diff options
author | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 23:31:12 +0000 |
---|---|---|
committer | rogerta@chromium.org <rogerta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-05 23:31:12 +0000 |
commit | a77809f6c4c703fbb9c34a47cf24e3b77056a02f (patch) | |
tree | 20b9aefa78c1bc42c88acd5460a5b3f1c22bc792 | |
parent | 60675bca71fe85d9797b56333a3a351f3b836aa1 (diff) | |
download | chromium_src-a77809f6c4c703fbb9c34a47cf24e3b77056a02f.zip chromium_src-a77809f6c4c703fbb9c34a47cf24e3b77056a02f.tar.gz chromium_src-a77809f6c4c703fbb9c34a47cf24e3b77056a02f.tar.bz2 |
First part of PAGE_TRANSITION_START_PAGE cleanup.
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
39 files changed, 58 insertions, 50 deletions
diff --git a/ash/screensaver/screensaver_view.cc b/ash/screensaver/screensaver_view.cc index 013024a..3c89e66 100644 --- a/ash/screensaver/screensaver_view.cc +++ b/ash/screensaver/screensaver_view.cc @@ -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()); } diff --git a/chrome/browser/autocomplete/autocomplete_browsertest.cc b/chrome/browser/autocomplete/autocomplete_browsertest.cc index 8a41505..ca38c40 100644 --- a/chrome/browser/autocomplete/autocomplete_browsertest.cc +++ b/chrome/browser/autocomplete/autocomplete_browsertest.cc @@ -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()); diff --git a/chrome/browser/autofill/autofill_popup_view_browsertest.cc b/chrome/browser/autofill/autofill_popup_view_browsertest.cc index 7fd9ced..9cad953 100644 --- a/chrome/browser/autofill/autofill_popup_view_browsertest.cc +++ b/chrome/browser/autofill/autofill_popup_view_browsertest.cc @@ -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. diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc index f8a5d15..acd0e0d 100644 --- a/chrome/browser/debugger/devtools_window.cc +++ b/chrome/browser/debugger/devtools_window.cc @@ -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); } @@ -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); } diff --git a/chrome/browser/extensions/api/identity/identity_api.cc b/chrome/browser/extensions/api/identity/identity_api.cc index aa3c12a..f3e5c2c 100644 --- a/chrome/browser/extensions/api/identity/identity_api.cc +++ b/chrome/browser/extensions/api/identity/identity_api.cc @@ -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(¶ms); diff --git a/chrome/browser/extensions/api/identity/web_auth_flow.cc b/chrome/browser/extensions/api/identity/web_auth_flow.cc index e5f37d0..0a08e7e 100644 --- a/chrome/browser/extensions/api/identity/web_auth_flow.cc +++ b/chrome/browser/extensions/api/identity/web_auth_flow.cc @@ -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()); } diff --git a/chrome/browser/history/expire_history_backend.cc b/chrome/browser/history/expire_history_backend.cc index 7089a38..39fa382 100644 --- a/chrome/browser/history/expire_history_backend.cc +++ b/chrome/browser/history/expire_history_backend.cc @@ -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 diff --git a/chrome/browser/history/history_extension_api.cc b/chrome/browser/history/history_extension_api.cc index 96d2e8a..687c79e 100644 --- a/chrome/browser/history/history_extension_api.cc +++ b/chrome/browser/history/history_extension_api.cc @@ -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; diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc index 732792b..c943195 100644 --- a/chrome/browser/printing/print_preview_tab_controller.cc +++ b/chrome/browser/printing/print_preview_tab_controller.cc @@ -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); diff --git a/chrome/browser/protector/session_startup_change.cc b/chrome/browser/protector/session_startup_change.cc index d7d05b5..4a73756 100644 --- a/chrome/browser/protector/session_startup_change.cc +++ b/chrome/browser/protector/session_startup_change.cc @@ -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; diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc index a12ed72..7dd0cc4 100644 --- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc +++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc @@ -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; diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc index 3251656..3b54a79 100644 --- a/chrome/browser/sessions/session_restore.cc +++ b/chrome/browser/sessions/session_restore.cc @@ -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; diff --git a/chrome/browser/sync/glue/session_model_associator.cc b/chrome/browser/sync/glue/session_model_associator.cc index 58dc3a6..7cfbc15 100644 --- a/chrome/browser/sync/glue/session_model_associator.cc +++ b/chrome/browser/sync/glue/session_model_associator.cc @@ -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( @@ -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; diff --git a/chrome/browser/ui/browser_close_browsertest.cc b/chrome/browser/ui/browser_close_browsertest.cc index 1fb8ae9..a56c4ac 100644 --- a/chrome/browser/ui/browser_close_browsertest.cc +++ b/chrome/browser/ui/browser_close_browsertest.cc @@ -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; diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc index 0b41fda..6049b93 100644 --- a/chrome/browser/ui/browser_navigator.cc +++ b/chrome/browser/ui/browser_navigator.cc @@ -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; diff --git a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm index d74b1c7..2885d19 100644 --- a/chrome/browser/ui/cocoa/web_dialog_window_controller.mm +++ b/chrome/browser/ui/cocoa/web_dialog_window_controller.mm @@ -360,7 +360,7 @@ void WebDialogWindowDelegateBridge::HandleKeyboardEvent( 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. diff --git a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm index acf5329..563a500 100644 --- a/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm +++ b/chrome/browser/ui/cocoa/web_intent_picker_cocoa.mm @@ -176,7 +176,7 @@ void WebIntentPickerCocoa::OnInlineDisposition(const string16& title, 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)]; diff --git a/chrome/browser/ui/extensions/application_launch.cc b/chrome/browser/ui/extensions/application_launch.cc index d7acfa5..9af96e0 100644 --- a/chrome/browser/ui/extensions/application_launch.cc +++ b/chrome/browser/ui/extensions/application_launch.cc @@ -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(); @@ -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; diff --git a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc index 14b4fe9..9b5e8ef 100644 --- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc +++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc @@ -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(); diff --git a/chrome/browser/ui/gtk/web_dialog_gtk.cc b/chrome/browser/ui/gtk/web_dialog_gtk.cc index 51c2a60..6452c62 100644 --- a/chrome/browser/ui/gtk/web_dialog_gtk.cc +++ b/chrome/browser/ui/gtk/web_dialog_gtk.cc @@ -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) diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc index e6d579d..8ff01862 100644 --- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc +++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc @@ -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. diff --git a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc index bd4b38b..1b26737 100644 --- a/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc +++ b/chrome/browser/ui/intents/web_intent_inline_disposition_delegate.cc @@ -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(); diff --git a/chrome/browser/ui/panels/old_base_panel_browser_test.cc b/chrome/browser/ui/panels/old_base_panel_browser_test.cc index fc7fa9e..a2b6501b 100644 --- a/chrome/browser/ui/panels/old_base_panel_browser_test.cc +++ b/chrome/browser/ui/panels/old_base_panel_browser_test.cc @@ -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(); } diff --git a/chrome/browser/ui/startup/startup_browser_creator_impl.cc b/chrome/browser/ui/startup/startup_browser_creator_impl.cc index 61f6d69..8bafd9e 100644 --- a/chrome/browser/ui/startup/startup_browser_creator_impl.cc +++ b/chrome/browser/ui/startup/startup_browser_creator_impl.cc @@ -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; diff --git a/chrome/browser/ui/tabs/tab_strip_model.cc b/chrome/browser/ui/tabs/tab_strip_model.cc index 127d0e5..3885ee8 100644 --- a/chrome/browser/ui/tabs/tab_strip_model.cc +++ b/chrome/browser/ui/tabs/tab_strip_model.cc @@ -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 diff --git a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc index 550d394..e5e9b83 100644 --- a/chrome/browser/ui/tabs/tab_strip_model_unittest.cc +++ b/chrome/browser/ui/tabs/tab_strip_model_unittest.cc @@ -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... @@ -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... @@ -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. @@ -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(); diff --git a/chrome/browser/ui/views/external_tab_container_win.cc b/chrome/browser/ui/views/external_tab_container_win.cc index 5a960cb..a2b47a7 100644 --- a/chrome/browser/ui/views/external_tab_container_win.cc +++ b/chrome/browser/ui/views/external_tab_container_win.cc @@ -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) { diff --git a/chrome/browser/ui/views/web_intent_picker_views.cc b/chrome/browser/ui/views/web_intent_picker_views.cc index 61d0a18..0c50753 100644 --- a/chrome/browser/ui/views/web_intent_picker_views.cc +++ b/chrome/browser/ui/views/web_intent_picker_views.cc @@ -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. diff --git a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc index 9be55db..c9d9c4d 100644 --- a/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc +++ b/chrome/browser/ui/webui/constrained_web_dialog_delegate_base.cc @@ -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()); } diff --git a/chrome/common/extensions/api/history.json b/chrome/common/extensions/api/history.json index b1d1b19..c72caee 100644 --- a/chrome/common/extensions/api/history.json +++ b/chrome/common/extensions/api/history.json @@ -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." } } diff --git a/chrome/common/extensions/docs/extensions/history.html b/chrome/common/extensions/docs/extensions/history.html index 4ae5c58..c386a39 100644 --- a/chrome/common/extensions/docs/extensions/history.html +++ b/chrome/common/extensions/docs/extensions/history.html @@ -1666,7 +1666,7 @@ For other examples and for help in viewing the source code, see <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> ) diff --git a/chrome/common/metrics/metrics_log_base.cc b/chrome/common/metrics/metrics_log_base.cc index e16b46d..5b12cfd 100644 --- a/chrome/common/metrics/metrics_log_base.cc +++ b/chrome/common/metrics/metrics_log_base.cc @@ -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: diff --git a/chrome/test/base/in_process_browser_test.cc b/chrome/test/base/in_process_browser_test.cc index f28dfa11..f683d00 100644 --- a/chrome/test/base/in_process_browser_test.cc +++ b/chrome/test/base/in_process_browser_test.cc @@ -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(); diff --git a/content/public/common/page_transition_types.cc b/content/public/common/page_transition_types.cc index bc6b197..8063cf9 100644 --- a/content/public/common/page_transition_types.cc +++ b/content/public/common/page_transition_types.cc @@ -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"; diff --git a/content/public/common/page_transition_types.h b/content/public/common/page_transition_types.h index 14e80a6..7c46b79 100644 --- a/content/public/common/page_transition_types.h +++ b/content/public/common/page_transition_types.h @@ -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 diff --git a/sync/protocol/proto_enum_conversions.cc b/sync/protocol/proto_enum_conversions.cc index d80b4e3..42d8ab5 100644 --- a/sync/protocol/proto_enum_conversions.cc +++ b/sync/protocol/proto_enum_conversions.cc @@ -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); diff --git a/sync/protocol/sync_enums.proto b/sync/protocol/sync_enums.proto index 0842cff..f0381fc 100644 --- a/sync/protocol/sync_enums.proto +++ b/sync/protocol/sync_enums.proto @@ -43,7 +43,7 @@ message SyncEnums { AUTO_SUBFRAME = 3; MANUAL_SUBFRAME = 4; GENERATED = 5; - START_PAGE = 6; + AUTO_TOPLEVEL = 6; FORM_SUBMIT = 7; RELOAD = 8; KEYWORD = 9; diff --git a/ui/views/controls/webview/webview.cc b/ui/views/controls/webview/webview.cc index 74d24f4..9e5c722 100644 --- a/ui/views/controls/webview/webview.cc +++ b/ui/views/controls/webview/webview.cc @@ -66,7 +66,7 @@ void WebView::SetWebContents(content::WebContents* web_contents) { void WebView::LoadInitialURL(const GURL& url) { GetWebContents()->GetController().LoadURL( - url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE, + url, content::Referrer(), content::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); } diff --git a/ui/views/controls/webview/webview.h b/ui/views/controls/webview/webview.h index e860d85..7c1d0dc 100644 --- a/ui/views/controls/webview/webview.h +++ b/ui/views/controls/webview/webview.h @@ -46,7 +46,7 @@ class WEBVIEW_EXPORT WebView : public View, // Loads the initial URL to display in the attached WebContents. Creates the // WebContents if none is attached yet. Note that this is intended as a // convenience for loading the initial URL, and so URLs are navigated with - // PAGE_TRANSITION_START_PAGE, so this is not intended as a general purpose + // PAGE_TRANSITION_AUTO_TOPLEVEL, so this is not intended as a general purpose // navigation method - use WebContents' API directly. void LoadInitialURL(const GURL& url); |