Skip to content

Commit

Permalink
First part of PAGE_TRANSITION_START_PAGE cleanup.
Browse files Browse the repository at this point in the history
I replaced START_PAGE with AUTO_TOPLEVEL because that more accurately
describes how its being used in the code.  In a followed CL I will add
specific support for startup pages, which was the original intention of
START_PAGE.

This CL is basically a large search and replace and does not change the
behaviour of the code.

BUG=144002
TEST=No user visible change


Review URL: https://chromiumcodereview.appspot.com/10897034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155047 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
rogerta@chromium.org committed Sep 5, 2012
1 parent 60675bc commit a77809f
Show file tree
Hide file tree
Showing 39 changed files with 58 additions and 50 deletions.
2 changes: 1 addition & 1 deletion ash/screensaver/screensaver_view.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ void ScreensaverView::LoadScreensaver() {
screensaver_webview_->GetWebContents()->GetController().LoadURL(
url_,
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autocomplete/autocomplete_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ IN_PROC_BROWSER_TEST_F(AutocompleteBrowserTest, TabAwayRevertSelect) {
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
chrome::AddSelectedTabWithURL(browser(), GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
observer.Wait();
EXPECT_EQ(UTF8ToUTF16(chrome::kAboutBlankURL), location_entry->GetText());
chrome::CloseTab(browser());
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/autofill/autofill_popup_view_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ IN_PROC_BROWSER_TEST_F(AutofillPopupViewBrowserTest,
content::NOTIFICATION_WEB_CONTENTS_VISIBILITY_CHANGED,
content::Source<content::WebContents>(web_contents_));
chrome::AddSelectedTabWithURL(browser(), GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
observer.Wait();

// The mock verifies that the call was made.
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/debugger/devtools_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ DevToolsWindow* DevToolsWindow::Create(
tab_contents->web_contents()->GetController().LoadURL(
GetDevToolsUrl(profile, docked, shared_worker_frontend),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
return new DevToolsWindow(tab_contents, profile, inspected_rvh, docked);
}
Expand Down Expand Up @@ -381,7 +381,7 @@ void DevToolsWindow::CreateDevToolsBrowser() {

browser_ = new Browser(Browser::CreateParams::CreateForDevTools(profile_));
browser_->tab_strip_model()->AddTabContents(
tab_contents_, -1, content::PAGE_TRANSITION_START_PAGE,
tab_contents_, -1, content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_ACTIVE);
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/api/identity/identity_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ void IdentityGetAuthTokenFunction::ShowLoginPopup() {
true));
chrome::NavigateParams params(browser,
signin_url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.disposition = CURRENT_TAB;
params.window_action = chrome::NavigateParams::SHOW_WINDOW;
chrome::Navigate(&params);
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/extensions/api/identity/web_auth_flow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void WebAuthFlow::Start() {
controller->LoadURL(
provider_url_,
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/history/expire_history_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ bool ShouldArchiveVisit(const VisitRow& visit) {
// to see them.
if (no_qualifier == content::PAGE_TRANSITION_TYPED ||
no_qualifier == content::PAGE_TRANSITION_AUTO_BOOKMARK ||
no_qualifier == content::PAGE_TRANSITION_START_PAGE)
no_qualifier == content::PAGE_TRANSITION_AUTO_TOPLEVEL)
return true;

// Only archive these "less important" transitions when they were the final
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/history/history_extension_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ scoped_ptr<VisitItem> GetVisitItem(const history::VisitRow& row) {
case content::PAGE_TRANSITION_GENERATED:
transition = VisitItem::TRANSITION_GENERATED;
break;
case content::PAGE_TRANSITION_START_PAGE:
transition = VisitItem::TRANSITION_START_PAGE;
case content::PAGE_TRANSITION_AUTO_TOPLEVEL:
transition = VisitItem::TRANSITION_AUTO_TOPLEVEL;
break;
case content::PAGE_TRANSITION_FORM_SUBMIT:
transition = VisitItem::TRANSITION_FORM_SUBMIT;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/printing/print_preview_tab_controller.cc
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ void PrintPreviewTabController::OnNavEntryCommitted(

// New |preview_tab| is created. Don't update/erase map entry.
if (waiting_for_new_preview_page_ &&
transition_type == content::PAGE_TRANSITION_START_PAGE &&
transition_type == content::PAGE_TRANSITION_AUTO_TOPLEVEL &&
nav_type == content::NAVIGATION_TYPE_NEW_PAGE) {
waiting_for_new_preview_page_ = false;
SetInitiatorTabURLAndTitle(preview_tab);
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/protector/session_startup_change.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void SessionStartupChange::OpenPinnedTabs(Browser* browser,
const StartupTabs& tabs) {
for (size_t i = 0; i < tabs.size(); ++i) {
chrome::NavigateParams params(browser, tabs[i].url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.disposition = NEW_BACKGROUND_TAB;
params.tabstrip_index = -1;
params.tabstrip_add_types = TabStripModel::ADD_PINNED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
web_contents_->GetController().LoadURL(
GURL(chrome::kChromeUINewTabURL),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
}
return;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/sessions/session_restore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
add_types |= TabStripModel::ADD_ACTIVE;
int index = chrome::GetIndexForInsertionDuringRestore(browser, i);
chrome::NavigateParams params(browser, urls[i],
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.disposition = i == 0 ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
params.tabstrip_index = index;
params.tabstrip_add_types = add_types;
Expand Down
8 changes: 4 additions & 4 deletions chrome/browser/sync/glue/session_model_associator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -681,9 +681,9 @@ void SessionModelAssociator::PopulateSessionSpecificsNavigation(
tab_navigation->set_page_transition(
sync_pb::SyncEnums_PageTransition_GENERATED);
break;
case content::PAGE_TRANSITION_START_PAGE:
case content::PAGE_TRANSITION_AUTO_TOPLEVEL:
tab_navigation->set_page_transition(
sync_pb::SyncEnums_PageTransition_START_PAGE);
sync_pb::SyncEnums_PageTransition_AUTO_TOPLEVEL);
break;
case content::PAGE_TRANSITION_FORM_SUBMIT:
tab_navigation->set_page_transition(
Expand Down Expand Up @@ -1253,8 +1253,8 @@ void SessionModelAssociator::AppendSessionTabNavigation(
case sync_pb::SyncEnums_PageTransition_GENERATED:
transition = content::PAGE_TRANSITION_GENERATED;
break;
case sync_pb::SyncEnums_PageTransition_START_PAGE:
transition = content::PAGE_TRANSITION_START_PAGE;
case sync_pb::SyncEnums_PageTransition_AUTO_TOPLEVEL:
transition = content::PAGE_TRANSITION_AUTO_TOPLEVEL;
break;
case sync_pb::SyncEnums_PageTransition_FORM_SUBMIT:
transition = content::PAGE_TRANSITION_FORM_SUBMIT;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/browser_close_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class BrowserCloseTest : public InProcessBrowserTest {
Browser* CreateBrowserOnProfile(Profile* profile) {
Browser* new_browser = new Browser(Browser::CreateParams(profile));
chrome::AddSelectedTabWithURL(new_browser, GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
content::WaitForLoadStop(chrome::GetActiveWebContents(new_browser));
new_browser->window()->Show();
return new_browser;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/browser_navigator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ void Navigate(NavigateParams* params) {
base_transition == content::PAGE_TRANSITION_TYPED ||
base_transition == content::PAGE_TRANSITION_AUTO_BOOKMARK ||
base_transition == content::PAGE_TRANSITION_GENERATED ||
base_transition == content::PAGE_TRANSITION_START_PAGE ||
base_transition == content::PAGE_TRANSITION_AUTO_TOPLEVEL ||
base_transition == content::PAGE_TRANSITION_RELOAD ||
base_transition == content::PAGE_TRANSITION_KEYWORD;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/cocoa/web_dialog_window_controller.mm
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ - (void)loadDialogContents {
tabContents_->web_contents()->GetController().LoadURL(
delegate_->GetDialogContentURL(),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());

// TODO(akalin): add accelerator for ESC to close the dialog box.
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
inline_disposition_tab_contents_->web_contents()->GetController().LoadURL(
url,
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
[sheet_controller_ setInlineDispositionTitle:
base::SysUTF16ToNSString(title)];
Expand Down
4 changes: 2 additions & 2 deletions chrome/browser/ui/extensions/application_launch.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ WebContents* OpenApplicationWindow(
*app_browser = browser;

TabContents* tab_contents = chrome::AddSelectedTabWithURL(
browser, url, content::PAGE_TRANSITION_START_PAGE);
browser, url, content::PAGE_TRANSITION_AUTO_TOPLEVEL);
WebContents* contents = tab_contents->web_contents();
contents->GetMutableRendererPrefs()->can_accept_load_drops = false;
contents->GetRenderViewHost()->SyncRendererPrefs();
Expand Down Expand Up @@ -166,7 +166,7 @@ WebContents* OpenApplicationTab(Profile* profile,
// TODO(erikkay): START_PAGE doesn't seem like the right transition in all
// cases.
chrome::NavigateParams params(browser, extension_url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.tabstrip_add_types = add_type;
params.disposition = disposition;

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1340,7 +1340,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, MAYBE_NoIncognitoPrepopulate) {
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
chrome::AddSelectedTabWithURL(incognito_browser, url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
observer.Wait();
incognito_browser->window()->Show();

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/gtk/web_dialog_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ gfx::NativeWindow WebDialogGtk::InitDialog() {
tab_->web_contents()->GetController().LoadURL(
GetDialogContentURL(),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
GtkDialogFlags flags = GTK_DIALOG_NO_SEPARATOR;
if (delegate_->GetDialogModalType() != ui::MODAL_TYPE_NONE)
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/gtk/web_intent_picker_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ void WebIntentPickerGtk::OnInlineDisposition(const string16& title,
tab_contents_container_->SetTab(inline_disposition_tab_contents_.get());

inline_disposition_tab_contents_->web_contents()->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());

// Replace the picker contents with the inline disposition.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ content::WebContents* WebIntentInlineDispositionDelegate::OpenURLFromTab(

// Load in place.
source->GetController().LoadURL(params.url, content::Referrer(),
content::PAGE_TRANSITION_START_PAGE, std::string());
content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());

// Remove previous history entries - users should not navigate in intents.
source->GetController().PruneAllButActive();
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/panels/old_base_panel_browser_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Panel* OldBasePanelBrowserTest::CreatePanelWithParams(
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
chrome::AddSelectedTabWithURL(panel_browser, params.url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
observer.Wait();
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/startup/startup_browser_creator_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ Browser* StartupBrowserCreatorImpl::OpenTabsInBrowser(Browser* browser,
int index = chrome::GetIndexForInsertionDuringRestore(browser, i);

chrome::NavigateParams params(browser, tabs[i].url,
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB;
params.tabstrip_index = index;
params.tabstrip_add_types = add_types;
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/tabs/tab_strip_model.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ bool ShouldForgetOpenersForTransition(content::PageTransition transition) {
transition == content::PAGE_TRANSITION_AUTO_BOOKMARK ||
transition == content::PAGE_TRANSITION_GENERATED ||
transition == content::PAGE_TRANSITION_KEYWORD ||
transition == content::PAGE_TRANSITION_START_PAGE;
transition == content::PAGE_TRANSITION_AUTO_TOPLEVEL;
}

} // namespace
Expand Down
12 changes: 8 additions & 4 deletions chrome/browser/ui/tabs/tab_strip_model_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,8 @@ TEST_F(TabStripModelTest, AddTabContents_NewTabAtEndOfStripInheritsGroup) {

// Open page A
TabContents* page_a_contents = CreateTabContents();
strip.AddTabContents(page_a_contents, -1, content::PAGE_TRANSITION_START_PAGE,
strip.AddTabContents(page_a_contents, -1,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_ACTIVE);

// Open pages B, C and D in the background from links on page A...
Expand Down Expand Up @@ -1641,7 +1642,8 @@ TEST_F(TabStripModelTest, NavigationForgetsOpeners) {

// Open page A
TabContents* page_a_contents = CreateTabContents();
strip.AddTabContents(page_a_contents, -1, content::PAGE_TRANSITION_START_PAGE,
strip.AddTabContents(page_a_contents, -1,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_ACTIVE);

// Open pages B, C and D in the background from links on page A...
Expand All @@ -1657,7 +1659,8 @@ TEST_F(TabStripModelTest, NavigationForgetsOpeners) {

// Open page E in a different opener group from page A.
TabContents* page_e_contents = CreateTabContents();
strip.AddTabContents(page_e_contents, -1, content::PAGE_TRANSITION_START_PAGE,
strip.AddTabContents(page_e_contents, -1,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_NONE);

// Tell the TabStripModel that we are navigating page D via a link click.
Expand Down Expand Up @@ -1690,7 +1693,8 @@ TEST_F(TabStripModelTest, NavigationForgettingDoesntAffectNewTab) {
// Open a tab and several tabs from it, then select one of the tabs that was
// opened.
TabContents* page_a_contents = CreateTabContents();
strip.AddTabContents(page_a_contents, -1, content::PAGE_TRANSITION_START_PAGE,
strip.AddTabContents(page_a_contents, -1,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
TabStripModel::ADD_ACTIVE);

TabContents* page_b_contents = CreateTabContents();
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/external_tab_container_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1111,7 +1111,7 @@ void ExternalTabContainerWin::Navigate(const GURL& url, const GURL& referrer) {

tab_contents_->web_contents()->GetController().LoadURL(
url, content::Referrer(referrer, WebKit::WebReferrerPolicyDefault),
content::PAGE_TRANSITION_START_PAGE, std::string());
content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string());
}

bool ExternalTabContainerWin::OnGoToEntryOffset(int offset) {
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/ui/views/web_intent_picker_views.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ void WebIntentPickerViews::OnInlineDisposition(
web_contents->GetController().LoadURL(
url,
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());

// Disable all buttons and show throbber.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ ConstrainedWebDialogDelegateBase::ConstrainedWebDialogDelegateBase(

web_contents->GetController().LoadURL(delegate->GetDialogContentURL(),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
content::PAGE_TRANSITION_AUTO_TOPLEVEL,
std::string());
}

Expand Down
2 changes: 1 addition & 1 deletion chrome/common/extensions/api/history.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"referringVisitId": {"type": "string", "description": "The visit ID of the referrer."},
"transition": {
"type": "string",
"enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"],
"enum": ["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"],
"description": "The <a href='#transition_types'>transition type</a> for this visit from its referrer."
}
}
Expand Down
2 changes: 1 addition & 1 deletion chrome/common/extensions/docs/extensions/history.html
Original file line number Diff line number Diff line change
Expand Up @@ -1666,7 +1666,7 @@ <h4>history.VisitItem</h4>
<span id="typeTemplate">
<span>
<span>string</span>
<span>["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "start_page", "form_submit", "reload", "keyword", "keyword_generated"]</span>
<span>["link", "typed", "auto_bookmark", "auto_subframe", "manual_subframe", "generated", "auto_toplevel", "form_submit", "reload", "keyword", "keyword_generated"]</span>
</span>
</span>
)
Expand Down
4 changes: 2 additions & 2 deletions chrome/common/metrics/metrics_log_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,8 +348,8 @@ void MetricsLogBase::RecordLoadEvent(int window_id,
origin_string = "global-history";
break;

case content::PAGE_TRANSITION_START_PAGE:
origin_string = "start-page";
case content::PAGE_TRANSITION_AUTO_TOPLEVEL:
origin_string = "auto-toplevel";
break;

case content::PAGE_TRANSITION_FORM_SUBMIT:
Expand Down
2 changes: 1 addition & 1 deletion chrome/test/base/in_process_browser_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void InProcessBrowserTest::AddBlankTabAndShow(Browser* browser) {
content::NOTIFICATION_LOAD_STOP,
content::NotificationService::AllSources());
chrome::AddSelectedTabWithURL(browser, GURL(chrome::kAboutBlankURL),
content::PAGE_TRANSITION_START_PAGE);
content::PAGE_TRANSITION_AUTO_TOPLEVEL);
observer.Wait();

browser->window()->Show();
Expand Down
2 changes: 1 addition & 1 deletion content/public/common/page_transition_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const char* PageTransitionGetCoreTransitionString(PageTransition type) {
case PAGE_TRANSITION_AUTO_SUBFRAME: return "auto_subframe";
case PAGE_TRANSITION_MANUAL_SUBFRAME: return "manual_subframe";
case PAGE_TRANSITION_GENERATED: return "generated";
case PAGE_TRANSITION_START_PAGE: return "start_page";
case PAGE_TRANSITION_AUTO_TOPLEVEL: return "auto_toplevel";
case PAGE_TRANSITION_FORM_SUBMIT: return "form_submit";
case PAGE_TRANSITION_RELOAD: return "reload";
case PAGE_TRANSITION_KEYWORD: return "keyword";
Expand Down
8 changes: 6 additions & 2 deletions content/public/common/page_transition_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ enum PageTransition {
// See also KEYWORD.
PAGE_TRANSITION_GENERATED = 5,

// The page was specified in the command line or is the start page.
PAGE_TRANSITION_START_PAGE = 6,
// This is a toplevel navigation. This is any content that is automatically
// loaded in a toplevel frame. For example, opening a tab to show the ASH
// screen saver, opening the devtools window, opening the NTP after the safe
// browsing warning, opening web-based dialog boxes are examples of
// AUTO_TOPLEVEL navigations.
PAGE_TRANSITION_AUTO_TOPLEVEL = 6,

// The user filled out values in a form and submitted it. NOTE that in
// some situations submitting a form does not result in this transition
Expand Down
2 changes: 1 addition & 1 deletion sync/protocol/proto_enum_conversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const char* GetPageTransitionString(
ENUM_CASE(sync_pb::SyncEnums, AUTO_SUBFRAME);
ENUM_CASE(sync_pb::SyncEnums, MANUAL_SUBFRAME);
ENUM_CASE(sync_pb::SyncEnums, GENERATED);
ENUM_CASE(sync_pb::SyncEnums, START_PAGE);
ENUM_CASE(sync_pb::SyncEnums, AUTO_TOPLEVEL);
ENUM_CASE(sync_pb::SyncEnums, FORM_SUBMIT);
ENUM_CASE(sync_pb::SyncEnums, RELOAD);
ENUM_CASE(sync_pb::SyncEnums, KEYWORD);
Expand Down
Loading

0 comments on commit a77809f

Please sign in to comment.