summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:35:56 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-21 22:35:56 +0000
commitf5fa20e471b2fc9bb18f6f673146704483d0b18e (patch)
tree0fc2253432ce98c202ae00afdea927f5bda22730 /chrome
parentec55bd7353cbae29541cc348869319104e7349f4 (diff)
downloadchromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.zip
chromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.tar.gz
chromium_src-f5fa20e471b2fc9bb18f6f673146704483d0b18e.tar.bz2
Revert 115346. The change didn't break anything, the test was faulty. Will disable in a followup. - Revert r115276, it broke PanelDownloadTest.Download in interactive_ui_tests
on win,linux,mac. Original change: Rename TabContents::controller() to GetController and put it into the WebContents namespace. BUG=98716 TBR=dpranke Review URL: http://codereview.chromium.org/8956050 TBR=jam Review URL: http://codereview.chromium.org/9018016 TBR=thakis@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115428 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/alternate_nav_url_fetcher.cc2
-rw-r--r--chrome/browser/autofill/autofill_browsertest.cc2
-rw-r--r--chrome/browser/autofill/autofill_feedback_infobar_delegate.cc4
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc6
-rw-r--r--chrome/browser/automation/automation_provider_win.cc2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc24
-rw-r--r--chrome/browser/background/background_contents_service.cc2
-rw-r--r--chrome/browser/browser_commands_unittest.cc24
-rw-r--r--chrome/browser/browser_focus_uitest.cc6
-rw-r--r--chrome/browser/browser_keyevents_browsertest.cc2
-rw-r--r--chrome/browser/bug_report_util.cc2
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc2
-rw-r--r--chrome/browser/chromeos/notifications/balloon_view.cc2
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc2
-rw-r--r--chrome/browser/crash_recovery_browsertest.cc4
-rw-r--r--chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc2
-rw-r--r--chrome/browser/debugger/devtools_sanity_unittest.cc4
-rw-r--r--chrome/browser/debugger/devtools_window.cc12
-rw-r--r--chrome/browser/download/download_request_limiter.cc9
-rw-r--r--chrome/browser/errorpage_browsertest.cc2
-rw-r--r--chrome/browser/extensions/app_process_apitest.cc22
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc9
-rw-r--r--chrome/browser/extensions/extension_browsertests_misc.cc6
-rw-r--r--chrome/browser/extensions/extension_crash_recovery_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_host.cc4
-rw-r--r--chrome/browser/extensions/extension_message_service.cc4
-rw-r--r--chrome/browser/extensions/extension_override_apitest.cc12
-rw-r--r--chrome/browser/extensions/extension_page_actions_module.cc2
-rw-r--r--chrome/browser/extensions/extension_tab_util.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc14
-rw-r--r--chrome/browser/extensions/extension_url_rewrite_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_web_ui.cc2
-rw-r--r--chrome/browser/extensions/extension_webstore_private_api.cc4
-rw-r--r--chrome/browser/extensions/isolated_app_browsertest.cc2
-rw-r--r--chrome/browser/extensions/webstore_inline_installer.cc2
-rw-r--r--chrome/browser/external_tab_container_win.cc14
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc10
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context.cc2
-rw-r--r--chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc10
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc10
-rw-r--r--chrome/browser/infobars/infobar_delegate.cc2
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.cc11
-rw-r--r--chrome/browser/instant/instant_browsertest.cc2
-rw-r--r--chrome/browser/instant/instant_controller.cc4
-rw-r--r--chrome/browser/instant/instant_loader.cc37
-rw-r--r--chrome/browser/memory_details.cc4
-rw-r--r--chrome/browser/notifications/balloon_host.cc4
-rw-r--r--chrome/browser/omnibox_search_hint.cc4
-rw-r--r--chrome/browser/password_manager_delegate_impl.cc2
-rw-r--r--chrome/browser/prerender/prerender_browsertest.cc6
-rw-r--r--chrome/browser/prerender/prerender_contents.cc4
-rw-r--r--chrome/browser/prerender/prerender_manager.cc4
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc2
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc4
-rw-r--r--chrome/browser/repost_form_warning_controller.cc2
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc2
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc2
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc8
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc20
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc10
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc6
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_service.cc2
-rw-r--r--chrome/browser/sessions/session_restore.cc10
-rw-r--r--chrome/browser/sessions/session_service.cc16
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc4
-rw-r--r--chrome/browser/sidebar/sidebar_browsertest.cc3
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc2
-rw-r--r--chrome/browser/ssl/ssl_blocking_page.cc2
-rw-r--r--chrome/browser/ssl/ssl_browser_tests.cc56
-rw-r--r--chrome/browser/tab_contents/background_contents.cc2
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu.cc18
-rw-r--r--chrome/browser/tab_contents/render_view_context_menu_browsertest.cc2
-rw-r--r--chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc2
-rw-r--r--chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm2
-rw-r--r--chrome/browser/tab_contents/web_drop_target_win.cc2
-rw-r--r--chrome/browser/tabs/pinned_tab_codec.cc6
-rw-r--r--chrome/browser/tabs/tab_finder.cc3
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc22
-rw-r--r--chrome/browser/tabs/tab_strip_model_order_controller.cc8
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc12
-rw-r--r--chrome/browser/translate/options_menu_model.cc2
-rw-r--r--chrome/browser/translate/translate_infobar_delegate.cc2
-rw-r--r--chrome/browser/translate/translate_manager.cc12
-rw-r--r--chrome/browser/translate/translate_manager_browsertest.cc10
-rw-r--r--chrome/browser/translate/translate_tab_helper.cc2
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc4
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc3
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc2
-rw-r--r--chrome/browser/ui/browser.cc69
-rw-r--r--chrome/browser/ui/browser_browsertest.cc24
-rw-r--r--chrome/browser/ui/browser_navigator.cc8
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm14
-rw-r--r--chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm8
-rw-r--r--chrome/browser/ui/cocoa/html_dialog_window_controller.mm10
-rw-r--r--chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm2
-rw-r--r--chrome/browser/ui/cocoa/notifications/balloon_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm2
-rw-r--r--chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm2
-rw-r--r--chrome/browser/ui/collected_cookies_infobar_delegate.cc2
-rw-r--r--chrome/browser/ui/find_bar/find_bar_controller.cc4
-rw-r--r--chrome/browser/ui/find_bar/find_bar_host_browsertest.cc4
-rw-r--r--chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc8
-rw-r--r--chrome/browser/ui/gtk/html_dialog_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/location_bar_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc2
-rw-r--r--chrome/browser/ui/gtk/web_intent_picker_gtk.cc2
-rw-r--r--chrome/browser/ui/intents/web_intent_picker_controller.cc4
-rw-r--r--chrome/browser/ui/login/login_prompt.cc6
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc26
-rw-r--r--chrome/browser/ui/pdf/pdf_browsertest.cc4
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc4
-rw-r--r--chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc13
-rw-r--r--chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc2
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc18
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc2
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model_unittest.cc2
-rw-r--r--chrome/browser/ui/views/constrained_html_delegate_gtk.cc8
-rw-r--r--chrome/browser/ui/views/constrained_html_delegate_views.cc8
-rw-r--r--chrome/browser/ui/views/dom_view.cc2
-rw-r--r--chrome/browser/ui/views/location_bar/click_handler.cc2
-rw-r--r--chrome/browser/ui/views/notifications/balloon_view.cc2
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc4
-rw-r--r--chrome/browser/ui/views/tab_contents/tab_contents_container.cc6
-rw-r--r--chrome/browser/ui/web_applications/web_app_ui.cc4
-rw-r--r--chrome/browser/ui/webui/active_downloads_ui.cc2
-rw-r--r--chrome/browser/ui/webui/bug_report_ui.cc4
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc3
-rw-r--r--chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc2
-rw-r--r--chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc2
-rw-r--r--chrome/browser/ui/webui/print_preview_handler.cc2
-rw-r--r--chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc4
-rw-r--r--chrome/browser/ui/webui/web_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/web_ui_unittest.cc4
-rw-r--r--chrome/test/base/browser_with_test_window_test.cc4
-rw-r--r--chrome/test/base/browser_with_test_window_test.h2
-rw-r--r--chrome/test/base/test_html_dialog_observer.cc4
-rw-r--r--chrome/test/base/test_tab_strip_model_observer.cc2
-rw-r--r--chrome/test/base/ui_test_utils.cc14
140 files changed, 478 insertions, 462 deletions
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index 2ab5455..d284323 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -133,7 +133,7 @@ void AlternateNavURLFetcher::Observe(
// See above.
NavigationController* controller =
&content::Source<TabContentsWrapper>(source)->
- tab_contents()->controller();
+ tab_contents()->GetController();
if (controller_ == controller) {
delete this;
} else if (!controller_) {
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 53be1fe..4d1d1e6 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -635,7 +635,7 @@ IN_PROC_BROWSER_TEST_F(AutofillTest, MAYBE_AutofillAfterReload) {
LOG(WARNING) << "Reloading the page.";
TabContents* tab =
browser()->GetSelectedTabContentsWrapper()->tab_contents();
- tab->controller().Reload(false);
+ tab->GetController().Reload(false);
ui_test_utils::WaitForLoadStop(tab);
// Invoke Autofill.
diff --git a/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc b/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
index d51736b..1149462 100644
--- a/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
@@ -49,8 +49,8 @@ bool AutofillFeedbackInfoBarDelegate::LinkClicked(
#endif
browser::ShowHtmlBugReportView(
- Browser::GetBrowserForController(&owner()->tab_contents()->controller(),
- NULL),
+ Browser::GetBrowserForController(
+ &owner()->tab_contents()->GetController(), NULL),
feedback_message_,
issue_type);
return true;
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index d0f2ba6..ad48c70 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -392,7 +392,7 @@ void TabStripNotificationObserver::Observe(
if (type == notification_) {
if (type == content::NOTIFICATION_TAB_PARENTED) {
ObserveTab(&(content::Source<TabContentsWrapper>(source).ptr()->
- tab_contents()->controller()));
+ tab_contents()->GetController()));
} else {
ObserveTab(content::Source<NavigationController>(source).ptr());
}
@@ -1079,7 +1079,7 @@ bool ExecuteBrowserCommandObserver::CreateAndRegisterObserver(
case IDC_FORWARD:
case IDC_RELOAD: {
new NavigationNotificationObserver(
- &browser->GetSelectedTabContents()->controller(),
+ &browser->GetSelectedTabContents()->GetController(),
automation, reply_message, 1, false, false);
break;
}
@@ -2751,7 +2751,7 @@ void NewTabObserver::Observe(int type,
DCHECK_EQ(content::NOTIFICATION_TAB_PARENTED, type);
NavigationController* controller =
&(content::Source<TabContentsWrapper>(source).ptr()->
- tab_contents()->controller());
+ tab_contents()->GetController());
if (automation_) {
// TODO(phajdan.jr): Clean up this hack. We write the correct return type
// here, but don't send the message. NavigationNotificationObserver
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index ace7239..3b0a8dc 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -207,7 +207,7 @@ bool AutomationProvider::AddExternalTab(ExternalTabContainer* external_tab) {
TabContents* tab_contents = external_tab->tab_contents();
if (tab_contents) {
- int tab_handle = tab_tracker_->Add(&tab_contents->controller());
+ int tab_handle = tab_tracker_->Add(&tab_contents->GetController());
external_tab->SetTabHandle(tab_handle);
return true;
}
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index df89306..7dfd511 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -534,7 +534,7 @@ void TestingAutomationProvider::AppendTab(int handle,
browser->AddSelectedTabWithURL(url, content::PAGE_TRANSITION_TYPED);
if (contents) {
append_tab_response = GetIndexForNavigationController(
- &contents->tab_contents()->controller(), browser);
+ &contents->tab_contents()->GetController(), browser);
}
}
@@ -1251,7 +1251,7 @@ void TestingAutomationProvider::GetTab(int win_handle,
Browser* browser = browser_tracker_->GetResource(win_handle);
if (tab_index < browser->tab_count()) {
TabContents* tab_contents = browser->GetTabContentsAt(tab_index);
- *tab_handle = tab_tracker_->Add(&tab_contents->controller());
+ *tab_handle = tab_tracker_->Add(&tab_contents->GetController());
}
}
}
@@ -2962,7 +2962,7 @@ void TestingAutomationProvider::GetNavigationInfo(
return;
}
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- const NavigationController& controller = tab_contents->controller();
+ const NavigationController& controller = tab_contents->GetController();
NavigationEntry* nav_entry = controller.GetActiveEntry();
DCHECK(nav_entry);
@@ -3526,7 +3526,7 @@ void TestingAutomationProvider::OmniboxAcceptInput(
DictionaryValue* args,
IPC::Message* reply_message) {
NavigationController& controller =
- browser->GetSelectedTabContents()->controller();
+ browser->GetSelectedTabContents()->GetController();
new OmniboxAcceptNotificationObserver(&controller, this, reply_message);
browser->window()->GetLocationBar()->AcceptInput();
}
@@ -4540,7 +4540,7 @@ void EnsureTabSelected(Browser* browser, TabContents* tab) {
if (!active || active->tab_contents() != tab ||
browser != BrowserList::GetLastActive()) {
browser->ActivateTabAt(
- browser->tabstrip_model()->GetIndexOfController(&tab->controller()),
+ browser->tabstrip_model()->GetIndexOfController(&tab->GetController()),
true /* user_gesture */);
}
}
@@ -5709,7 +5709,7 @@ void TestingAutomationProvider::SendOSLevelKeyEventToTab(
// The key events will be sent to the browser window, we need the current tab
// containing the element we send the text in to be shown.
browser->ActivateTabAt(
- browser->GetIndexOfController(&tab_contents->controller()), true);
+ browser->GetIndexOfController(&tab_contents->GetController()), true);
BrowserWindow* browser_window = browser->window();
if (!browser_window) {
@@ -5842,7 +5842,7 @@ void TestingAutomationProvider::LaunchApp(
}
// This observer will delete itself.
- new AppLaunchObserver(&old_contents->controller(), this, reply_message,
+ new AppLaunchObserver(&old_contents->GetController(), this, reply_message,
launch_container);
Browser::OpenApplication(profile(), extension, launch_container, GURL(),
CURRENT_TAB);
@@ -6087,7 +6087,7 @@ void TestingAutomationProvider::NavigateToURL(
return;
}
new NavigationNotificationObserver(
- &tab_contents->controller(), this, reply_message,
+ &tab_contents->GetController(), this, reply_message,
navigation_count, false, true);
browser->OpenURLFromTab(tab_contents, OpenURLParams(
GURL(url), content::Referrer(), CURRENT_TAB,
@@ -6175,7 +6175,7 @@ void TestingAutomationProvider::GoForward(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->controller();
+ NavigationController& controller = tab_contents->GetController();
if (!controller.CanGoForward()) {
DictionaryValue dict;
dict.SetBoolean("did_go_forward", false);
@@ -6199,7 +6199,7 @@ void TestingAutomationProvider::GoBack(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->controller();
+ NavigationController& controller = tab_contents->GetController();
if (!controller.CanGoBack()) {
DictionaryValue dict;
dict.SetBoolean("did_go_back", false);
@@ -6223,7 +6223,7 @@ void TestingAutomationProvider::ReloadJSON(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->controller();
+ NavigationController& controller = tab_contents->GetController();
new NavigationNotificationObserver(&controller, this, reply_message,
1, false, true);
controller.Reload(false);
@@ -6409,7 +6409,7 @@ void TestingAutomationProvider::ActivateTabJSON(
return;
}
browser->ActivateTabAt(
- browser->GetIndexOfController(&tab_contents->controller()), true);
+ browser->GetIndexOfController(&tab_contents->GetController()), true);
reply.SendSuccess(NULL);
}
diff --git a/chrome/browser/background/background_contents_service.cc b/chrome/browser/background/background_contents_service.cc
index 16f7bf7..c78c429 100644
--- a/chrome/browser/background/background_contents_service.cc
+++ b/chrome/browser/background/background_contents_service.cc
@@ -455,7 +455,7 @@ void BackgroundContentsService::LoadBackgroundContents(
// TODO(atwilson): Create RenderViews asynchronously to avoid increasing
// startup latency (http://crbug.com/47236).
- contents->tab_contents()->controller().LoadURL(
+ contents->tab_contents()->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_LINK, std::string());
}
diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc
index 7cf1872..4554170 100644
--- a/chrome/browser/browser_commands_unittest.cc
+++ b/chrome/browser/browser_commands_unittest.cc
@@ -70,7 +70,7 @@ TEST_F(BrowserCommandsTest, DuplicateTab) {
// Verify the stack of urls.
NavigationController& controller =
- browser()->GetTabContentsAt(1)->controller();
+ browser()->GetTabContentsAt(1)->GetController();
ASSERT_EQ(3, controller.entry_count());
ASSERT_EQ(2, controller.GetCurrentEntryIndex());
ASSERT_TRUE(url1 == controller.GetEntryAtIndex(0)->url());
@@ -118,14 +118,14 @@ TEST_F(BrowserCommandsTest, BackForwardInNewTab) {
// The original tab should be unchanged.
TabContents* zeroth = browser()->GetTabContentsAt(0);
EXPECT_EQ(url2, zeroth->GetURL());
- EXPECT_TRUE(zeroth->controller().CanGoBack());
- EXPECT_FALSE(zeroth->controller().CanGoForward());
+ EXPECT_TRUE(zeroth->GetController().CanGoBack());
+ EXPECT_FALSE(zeroth->GetController().CanGoForward());
// The new tab should be like the first one but navigated back.
TabContents* first = browser()->GetTabContentsAt(1);
EXPECT_EQ(url1, browser()->GetTabContentsAt(1)->GetURL());
- EXPECT_FALSE(first->controller().CanGoBack());
- EXPECT_TRUE(first->controller().CanGoForward());
+ EXPECT_FALSE(first->GetController().CanGoBack());
+ EXPECT_TRUE(first->GetController().CanGoForward());
// Select the second tab and make it go forward in a new background tab.
browser()->ActivateTabAt(1, true);
@@ -133,35 +133,35 @@ TEST_F(BrowserCommandsTest, BackForwardInNewTab) {
// but because of this bug, it will assert later if we don't. When the bug is
// fixed, one of the three commits here related to this bug should be removed
// (to test both codepaths).
- CommitPendingLoad(&first->controller());
+ CommitPendingLoad(&first->GetController());
EXPECT_EQ(1, browser()->active_index());
browser()->GoForward(NEW_BACKGROUND_TAB);
// The previous tab should be unchanged and still in the foreground.
EXPECT_EQ(url1, first->GetURL());
- EXPECT_FALSE(first->controller().CanGoBack());
- EXPECT_TRUE(first->controller().CanGoForward());
+ EXPECT_FALSE(first->GetController().CanGoBack());
+ EXPECT_TRUE(first->GetController().CanGoForward());
EXPECT_EQ(1, browser()->active_index());
// There should be a new tab navigated forward.
ASSERT_EQ(3, browser()->tab_count());
TabContents* second = browser()->GetTabContentsAt(2);
EXPECT_EQ(url2, second->GetURL());
- EXPECT_TRUE(second->controller().CanGoBack());
- EXPECT_FALSE(second->controller().CanGoForward());
+ EXPECT_TRUE(second->GetController().CanGoBack());
+ EXPECT_FALSE(second->GetController().CanGoForward());
// Now do back in a new foreground tab. Don't bother re-checking every sngle
// thing above, just validate that it's opening properly.
browser()->ActivateTabAt(2, true);
// TODO(brettw) bug 11055: see the comment above about why we need this.
- CommitPendingLoad(&second->controller());
+ CommitPendingLoad(&second->GetController());
browser()->GoBack(NEW_FOREGROUND_TAB);
ASSERT_EQ(3, browser()->active_index());
ASSERT_EQ(url1, browser()->GetSelectedTabContents()->GetURL());
// Same thing again for forward.
// TODO(brettw) bug 11055: see the comment above about why we need this.
- CommitPendingLoad(&browser()->GetSelectedTabContents()->controller());
+ CommitPendingLoad(&browser()->GetSelectedTabContents()->GetController());
browser()->GoForward(NEW_FOREGROUND_TAB);
ASSERT_EQ(4, browser()->active_index());
ASSERT_EQ(url2, browser()->GetSelectedTabContents()->GetURL());
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index 78e509a..228cdc2 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -853,7 +853,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
@@ -869,7 +869,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, FocusOnReload) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
@@ -892,7 +892,7 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_FocusOnReloadCrashedTab) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
diff --git a/chrome/browser/browser_keyevents_browsertest.cc b/chrome/browser/browser_keyevents_browsertest.cc
index dd18dc3..18f7c29 100644
--- a/chrome/browser/browser_keyevents_browsertest.cc
+++ b/chrome/browser/browser_keyevents_browsertest.cc
@@ -712,7 +712,7 @@ IN_PROC_BROWSER_TEST_F(BrowserKeyEventsTest, MAYBE_ReservedAccelerators) {
ui_test_utils::WindowedNotificationObserver wait_for_tab_closed(
content::NOTIFICATION_TAB_CLOSED, content::Source<NavigationController>(
- &browser()->GetTabContentsAt(1)->controller()));
+ &browser()->GetTabContentsAt(1)->GetController()));
// Press Ctrl/Cmd+W, which will close the tab.
#if defined(OS_MACOSX)
diff --git a/chrome/browser/bug_report_util.cc b/chrome/browser/bug_report_util.cc
index e36991c..72284a0 100644
--- a/chrome/browser/bug_report_util.cc
+++ b/chrome/browser/bug_report_util.cc
@@ -363,7 +363,7 @@ void BugReportUtil::SendReport(
// static
void BugReportUtil::ReportPhishing(TabContents* currentTab,
const std::string& phishing_url) {
- currentTab->controller().LoadURL(
+ currentTab->GetController().LoadURL(
safe_browsing_util::GeneratePhishingReportUrl(
kReportPhishingUrl, phishing_url,
false /* not client-side detection */),
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 21f1632..7137f71 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -475,7 +475,7 @@ void BootTimesLoader::Observe(
case content::NOTIFICATION_TAB_CONTENTS_DESTROYED: {
TabContents* tab_contents = content::Source<TabContents>(source).ptr();
RenderWidgetHost* render_widget_host =
- GetRenderWidgetHost(&tab_contents->controller());
+ GetRenderWidgetHost(&tab_contents->GetController());
render_widget_hosts_loading_.erase(render_widget_host);
break;
}
diff --git a/chrome/browser/chromeos/notifications/balloon_view.cc b/chrome/browser/chromeos/notifications/balloon_view.cc
index cea579f..0e6009c 100644
--- a/chrome/browser/chromeos/notifications/balloon_view.cc
+++ b/chrome/browser/chromeos/notifications/balloon_view.cc
@@ -237,7 +237,7 @@ void BalloonViewImpl::Update() {
stale_ = false;
if (!html_contents_->tab_contents())
return;
- html_contents_->tab_contents()->controller().LoadURL(
+ html_contents_->tab_contents()->GetController().LoadURL(
balloon_->notification().content_url(), content::Referrer(),
content::PAGE_TRANSITION_LINK, std::string());
}
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index a3d2dc7..2afe890 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -464,7 +464,7 @@ void TabSpecificContentSettings::Observe(
DCHECK(type == chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED);
content::Details<const ContentSettingsDetails> settings_details(details);
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
NavigationEntry* entry = controller.GetActiveEntry();
GURL entry_url;
if (entry)
diff --git a/chrome/browser/crash_recovery_browsertest.cc b/chrome/browser/crash_recovery_browsertest.cc
index 3d644a3..6913bae 100644
--- a/chrome/browser/crash_recovery_browsertest.cc
+++ b/chrome/browser/crash_recovery_browsertest.cc
@@ -49,7 +49,7 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, Reload) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
@@ -79,7 +79,7 @@ IN_PROC_BROWSER_TEST_F(CrashRecoveryBrowserTest, LoadInNewTab) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
ASSERT_TRUE(ui_test_utils::GetCurrentTabTitle(browser(),
diff --git a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
index 91c8543..a831887 100644
--- a/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
+++ b/chrome/browser/custom_handlers/protocol_handler_registry_browsertest.cc
@@ -44,7 +44,7 @@ class RegisterProtocolHandlerBrowserTest : public InProcessBrowserTest {
params.link_url = url;
params.unfiltered_link_url = url;
TabContents* tab_contents = browser()->GetSelectedTabContents();
- params.page_url = tab_contents->controller().GetActiveEntry()->url();
+ params.page_url = tab_contents->GetController().GetActiveEntry()->url();
#if defined(OS_MACOSX)
params.writing_direction_default = 0;
params.writing_direction_left_to_right = 0;
diff --git a/chrome/browser/debugger/devtools_sanity_unittest.cc b/chrome/browser/debugger/devtools_sanity_unittest.cc
index d245296..f5f5321 100644
--- a/chrome/browser/debugger/devtools_sanity_unittest.cc
+++ b/chrome/browser/debugger/devtools_sanity_unittest.cc
@@ -404,7 +404,7 @@ class WorkerDevToolsSanityTest : public InProcessBrowserTest {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &client_contents->controller()));
+ &client_contents->GetController()));
observer.Wait();
}
}
@@ -510,7 +510,7 @@ IN_PROC_BROWSER_TEST_F(DevToolsSanityTest, TestReattachAfterCrash) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 384f854..f1f2399 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -161,7 +161,7 @@ DevToolsWindow* DevToolsWindow::Create(
Browser::TabContentsFactory(profile, NULL, MSG_ROUTING_NONE, NULL, NULL);
tab_contents->tab_contents()->GetRenderViewHost()->AllowBindings(
content::BINDINGS_POLICY_WEB_UI);
- tab_contents->tab_contents()->controller().LoadURL(
+ tab_contents->tab_contents()->GetController().LoadURL(
GetDevToolsUrl(profile, docked, shared_worker_frontend),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
@@ -187,7 +187,7 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
g_instances.Get().push_back(this);
// Wipe out page icon so that the default application icon is used.
NavigationEntry* entry =
- tab_contents_->tab_contents()->controller().GetActiveEntry();
+ tab_contents_->tab_contents()->GetController().GetActiveEntry();
entry->favicon().set_bitmap(SkBitmap());
entry->favicon().set_is_valid(true);
@@ -196,12 +196,12 @@ DevToolsWindow::DevToolsWindow(TabContentsWrapper* tab_contents,
this,
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab_contents_->tab_contents()->controller()));
+ &tab_contents_->tab_contents()->GetController()));
registrar_.Add(
this,
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(
- &tab_contents_->tab_contents()->controller()));
+ &tab_contents_->tab_contents()->GetController()));
registrar_.Add(
this,
chrome::NOTIFICATION_BROWSER_THEME_CHANGED,
@@ -369,7 +369,7 @@ bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser,
return false;
const NavigationController& controller =
- inspected_tab_->tab_contents()->controller();
+ inspected_tab_->tab_contents()->GetController();
for (BrowserList::const_iterator it = BrowserList::begin();
it != BrowserList::end(); ++it) {
int tab_index = (*it)->GetIndexOfController(&controller);
@@ -469,7 +469,7 @@ void DevToolsWindow::Observe(int type,
AddDevToolsExtensionsToClient();
} else if (type == content::NOTIFICATION_TAB_CLOSING) {
if (content::Source<NavigationController>(source).ptr() ==
- &tab_contents_->tab_contents()->controller()) {
+ &tab_contents_->tab_contents()->GetController()) {
// This happens when browser closes all of its tabs as a result
// of window.Close event.
// Notify manager that this DevToolsClientHost no longer exists and
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index 0c8d2b8..f5996b0 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -195,7 +195,7 @@ DownloadRequestLimiter::~DownloadRequestLimiter() {
DownloadRequestLimiter::DownloadStatus
DownloadRequestLimiter::GetDownloadStatus(TabContents* tab) {
- TabDownloadState* state = GetDownloadState(&tab->controller(), NULL, false);
+ TabDownloadState* state = GetDownloadState(&tab->GetController(), NULL, false);
return state ? state->download_status() : ALLOW_ONE_DOWNLOAD;
}
@@ -213,7 +213,8 @@ void DownloadRequestLimiter::CanDownloadOnIOThread(int render_process_host_id,
}
void DownloadRequestLimiter::OnUserGesture(TabContents* tab) {
- TabDownloadState* state = GetDownloadState(&tab->controller(), NULL, false);
+ TabDownloadState* state =
+ GetDownloadState(&tab->GetController(), NULL, false);
if (!state)
return;
@@ -286,8 +287,8 @@ void DownloadRequestLimiter::CanDownloadImpl(
}
TabDownloadState* state = GetDownloadState(
- &effective_wrapper->tab_contents()->controller(),
- &originating_tab->tab_contents()->controller(), true);
+ &effective_wrapper->tab_contents()->GetController(),
+ &originating_tab->tab_contents()->GetController(), true);
switch (state->download_status()) {
case ALLOW_ALL_DOWNLOADS:
if (state->download_count() && !(state->download_count() %
diff --git a/chrome/browser/errorpage_browsertest.cc b/chrome/browser/errorpage_browsertest.cc
index 8e2b9b4..fec22f3 100644
--- a/chrome/browser/errorpage_browsertest.cc
+++ b/chrome/browser/errorpage_browsertest.cc
@@ -83,7 +83,7 @@ class ErrorPageTest : public InProcessBrowserTest {
TestNavigationObserver test_navigation_observer(
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()),
+ GetController()),
NULL,
num_navigations);
if (direction == HISTORY_NAVIGATE_BACK) {
diff --git a/chrome/browser/extensions/app_process_apitest.cc b/chrome/browser/extensions/app_process_apitest.cc
index ef12422..2d3139a 100644
--- a/chrome/browser/extensions/app_process_apitest.cc
+++ b/chrome/browser/extensions/app_process_apitest.cc
@@ -57,7 +57,7 @@ static void WindowOpenHelper(Browser* browser,
TabContents* newtab = last_active_browser->GetSelectedTabContents();
EXPECT_TRUE(newtab);
observer.Wait();
- EXPECT_EQ(url, newtab->controller().GetLastCommittedEntry()->url());
+ EXPECT_EQ(url, newtab->GetController().GetLastCommittedEntry()->url());
if (newtab_process_should_equal_opener)
EXPECT_EQ(opener_host->process(), newtab->GetRenderProcessHost());
else
@@ -79,7 +79,7 @@ static void NavigateTabHelper(TabContents* contents, const GURL& url) {
&result));
ASSERT_TRUE(result);
observer.Wait();
- EXPECT_EQ(url, contents->controller().GetLastCommittedEntry()->url());
+ EXPECT_EQ(url, contents->GetController().GetLastCommittedEntry()->url());
}
IN_PROC_BROWSER_TEST_F(AppApiTest, AppProcess) {
@@ -374,7 +374,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, MAYBE_AppProcessRedirectBack) {
// process.
ASSERT_EQ(3, browser()->tab_count());
EXPECT_EQ("/files/extensions/api_test/app_process/path1/empty.html",
- browser()->GetTabContentsAt(2)->controller().
+ browser()->GetTabContentsAt(2)->GetController().
GetLastCommittedEntry()->url().path());
EXPECT_EQ(browser()->GetTabContentsAt(1)->GetRenderProcessHost(),
browser()->GetTabContentsAt(2)->GetRenderProcessHost());
@@ -423,7 +423,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
reload_observer.Wait();
EXPECT_TRUE(process_map->Contains(
@@ -435,7 +435,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
reload_observer2.Wait();
EXPECT_FALSE(process_map->Contains(
@@ -447,7 +447,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
L"", L"location.reload();"));
js_reload_observer.Wait();
@@ -460,7 +460,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, DISABLED_ReloadIntoAppProcess) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(contents->GetRenderViewHost(),
L"", L"location.reload();"));
js_reload_observer2.Wait();
@@ -505,14 +505,14 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, OpenAppFromIframe) {
ASSERT_NE(browser(), last_active_browser);
TabContents* newtab = last_active_browser->GetSelectedTabContents();
EXPECT_TRUE(newtab);
- if (!newtab->controller().GetLastCommittedEntry() ||
- newtab->controller().GetLastCommittedEntry()->url() != app_url) {
+ if (!newtab->GetController().GetLastCommittedEntry() ||
+ newtab->GetController().GetLastCommittedEntry()->url() != app_url) {
// TODO(gbillock): This still looks racy. Need to make a custom
// observer to intercept new window creation and then look for
// NAV_ENTRY_COMMITTED on the new tab there.
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&(newtab->controller())));
+ content::Source<NavigationController>(&(newtab->GetController())));
observer.Wait();
}
@@ -652,7 +652,7 @@ IN_PROC_BROWSER_TEST_F(AppApiTest, ReloadAppAfterCrash) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
ASSERT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 2cfa328..a415f5b 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -142,8 +142,9 @@ void ExtensionBrowserEventRouter::RegisterForBrowserNotifications(
void ExtensionBrowserEventRouter::RegisterForTabNotifications(
TabContents* contents) {
- registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&contents->controller()));
+ registrar_.Add(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(&contents->GetController()));
// Observing TAB_CONTENTS_DESTROYED is necessary because it's
// possible for tabs to be created, detached and then destroyed without
@@ -156,7 +157,7 @@ void ExtensionBrowserEventRouter::RegisterForTabNotifications(
void ExtensionBrowserEventRouter::UnregisterForTabNotifications(
TabContents* contents) {
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->GetController()));
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
content::Source<TabContents>(contents));
}
@@ -541,7 +542,7 @@ void ExtensionBrowserEventRouter::Observe(
// Tab was destroyed after being detached (without being re-attached).
TabContents* contents = content::Source<TabContents>(source).ptr();
registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->GetController()));
registrar_.Remove(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
content::Source<TabContents>(contents));
} else if (type == chrome::NOTIFICATION_BROWSER_WINDOW_READY) {
diff --git a/chrome/browser/extensions/extension_browsertests_misc.cc b/chrome/browser/extensions/extension_browsertests_misc.cc
index a044667..4eb7a12 100644
--- a/chrome/browser/extensions/extension_browsertests_misc.cc
+++ b/chrome/browser/extensions/extension_browsertests_misc.cc
@@ -702,7 +702,7 @@ static void WindowOpenHelper(Browser* browser, const GURL& start_url,
GURL expected_url = start_url.Resolve(newtab_url);
observer.Wait();
EXPECT_EQ(expected_url,
- newtab->controller().GetLastCommittedEntry()->url());
+ newtab->GetController().GetLastCommittedEntry()->url());
if (newtab_result)
*newtab_result = newtab;
}
@@ -811,7 +811,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
@@ -838,7 +838,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionBrowserTest, MAYBE_PluginLoadUnload) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index e6fee79..0003cb5 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -473,7 +473,7 @@ IN_PROC_BROWSER_TEST_F(ExtensionCrashRecoveryTest,
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
}
diff --git a/chrome/browser/extensions/extension_host.cc b/chrome/browser/extensions/extension_host.cc
index cf1e2e5..b007ce2 100644
--- a/chrome/browser/extensions/extension_host.cc
+++ b/chrome/browser/extensions/extension_host.cc
@@ -133,7 +133,7 @@ ExtensionHost::ExtensionHost(const Extension* extension,
profile_, site_instance, MSG_ROUTING_NONE, NULL, NULL));
TabContentsObserver::Observe(host_contents_.get());
host_contents_->SetDelegate(this);
- host_contents_->set_view_type(host_type);
+ host_contents_->SetViewType(host_type);
prefs_tab_helper_.reset(new PrefsTabHelper(host_contents()));
@@ -247,7 +247,7 @@ void ExtensionHost::LoadInitialURL() {
return;
}
- host_contents_->controller().LoadURL(
+ host_contents_->GetController().LoadURL(
initial_url_, content::Referrer(), content::PAGE_TRANSITION_LINK,
std::string());
}
diff --git a/chrome/browser/extensions/extension_message_service.cc b/chrome/browser/extensions/extension_message_service.cc
index efacfed..839b474 100644
--- a/chrome/browser/extensions/extension_message_service.cc
+++ b/chrome/browser/extensions/extension_message_service.cc
@@ -199,7 +199,7 @@ void ExtensionMessageService::OpenChannelToTab(
contents->tab_contents()->GetRenderViewHost()->routing_id();
}
- if (contents && contents->tab_contents()->controller().needs_reload()) {
+ if (contents && contents->tab_contents()->GetController().needs_reload()) {
// The tab isn't loaded yet. Don't attempt to connect. Treat this as a
// disconnect.
DispatchOnDisconnect(MessagePort(source, MSG_ROUTING_CONTROL),
@@ -287,7 +287,7 @@ int ExtensionMessageService::OpenSpecialChannelToTab(
TabContents* target_tab_contents, IPC::Message::Sender* source) {
DCHECK(target_tab_contents);
- if (target_tab_contents->controller().needs_reload()) {
+ if (target_tab_contents->GetController().needs_reload()) {
// The tab isn't loaded yet. Don't attempt to connect.
return -1;
}
diff --git a/chrome/browser/extensions/extension_override_apitest.cc b/chrome/browser/extensions/extension_override_apitest.cc
index 778ec2e..f11795e 100644
--- a/chrome/browser/extensions/extension_override_apitest.cc
+++ b/chrome/browser/extensions/extension_override_apitest.cc
@@ -47,8 +47,8 @@ class ExtensionOverrideTest : public ExtensionApiTest {
void NavigateToKeyboard() {
ui_test_utils::NavigateToURL(browser(), GURL("chrome://keyboard/"));
TabContents* tab = browser()->GetSelectedTabContents();
- ASSERT_TRUE(tab->controller().GetActiveEntry());
- EXPECT_TRUE(tab->controller().GetActiveEntry()->url().
+ ASSERT_TRUE(tab->GetController().GetActiveEntry());
+ EXPECT_TRUE(tab->GetController().GetActiveEntry()->url().
SchemeIs(chrome::kExtensionScheme));
}
#endif
@@ -62,8 +62,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, OverrideNewtab) {
// will call chrome.test.notifyPass() .
ui_test_utils::NavigateToURL(browser(), GURL("chrome://newtab/"));
TabContents* tab = browser()->GetSelectedTabContents();
- ASSERT_TRUE(tab->controller().GetActiveEntry());
- EXPECT_TRUE(tab->controller().GetActiveEntry()->url().
+ ASSERT_TRUE(tab->GetController().GetActiveEntry());
+ EXPECT_TRUE(tab->GetController().GetActiveEntry()->url().
SchemeIs(chrome::kExtensionScheme));
ASSERT_TRUE(catcher.GetNextResult());
@@ -89,8 +89,8 @@ IN_PROC_BROWSER_TEST_F(ExtensionOverrideTest, MAYBE_OverrideNewtabIncognito) {
Browser* otr_browser = BrowserList::FindTabbedBrowser(
browser()->profile()->GetOffTheRecordProfile(), false);
TabContents* tab = otr_browser->GetSelectedTabContents();
- ASSERT_TRUE(tab->controller().GetActiveEntry());
- EXPECT_FALSE(tab->controller().GetActiveEntry()->url().
+ ASSERT_TRUE(tab->GetController().GetActiveEntry());
+ EXPECT_FALSE(tab->GetController().GetActiveEntry()->url().
SchemeIs(chrome::kExtensionScheme));
}
diff --git a/chrome/browser/extensions/extension_page_actions_module.cc b/chrome/browser/extensions/extension_page_actions_module.cc
index 5e2aa5c..f83168a 100644
--- a/chrome/browser/extensions/extension_page_actions_module.cc
+++ b/chrome/browser/extensions/extension_page_actions_module.cc
@@ -81,7 +81,7 @@ bool PageActionFunction::SetPageActionEnabled(bool enable) {
// Make sure the URL hasn't changed.
NavigationEntry* entry =
- contents->tab_contents()->controller().GetActiveEntry();
+ contents->tab_contents()->GetController().GetActiveEntry();
if (!entry || url != entry->url().spec()) {
error_ = ExtensionErrorUtils::FormatErrorMessage(kUrlNotActiveError, url);
return false;
diff --git a/chrome/browser/extensions/extension_tab_util.cc b/chrome/browser/extensions/extension_tab_util.cc
index c6ccb66..ba8a740 100644
--- a/chrome/browser/extensions/extension_tab_util.cc
+++ b/chrome/browser/extensions/extension_tab_util.cc
@@ -116,7 +116,7 @@ DictionaryValue* ExtensionTabUtil::CreateTabValue(const TabContents* contents,
contents->browser_context()->IsOffTheRecord());
if (!is_loading) {
- NavigationEntry* entry = contents->controller().GetActiveEntry();
+ NavigationEntry* entry = contents->GetController().GetActiveEntry();
if (entry) {
if (entry->favicon().is_valid())
result->SetString(keys::kFaviconUrlKey, entry->favicon().url().spec());
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 52eda3be..9a4ee58 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -1066,7 +1066,7 @@ bool UpdateTabFunction::RunImpl() {
NULL, &tab_strip, &contents, &tab_index, &error_)) {
return false;
}
- NavigationController& controller = contents->tab_contents()->controller();
+ NavigationController& controller = contents->tab_contents()->GetController();
// TODO(rafaelw): handle setting remaining tab properties:
// -title
@@ -1373,13 +1373,13 @@ bool ReloadTabFunction::RunImpl() {
TabContents* tab_contents = contents->tab_contents();
if (tab_contents->showing_interstitial_page()) {
// This does as same as Browser::ReloadInternal.
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
GetCurrentBrowser()->OpenURL(entry->url(), GURL(), CURRENT_TAB,
content::PAGE_TRANSITION_RELOAD);
} else if (bypass_cache) {
- tab_contents->controller().ReloadIgnoringCache(true);
+ tab_contents->GetController().ReloadIgnoringCache(true);
} else {
- tab_contents->controller().Reload(true);
+ tab_contents->GetController().Reload(true);
}
return true;
@@ -1608,7 +1608,7 @@ bool DetectTabLanguageFunction::RunImpl() {
return false;
}
- if (contents->tab_contents()->controller().needs_reload()) {
+ if (contents->tab_contents()->GetController().needs_reload()) {
// If the tab hasn't been loaded, don't wait for the tab to load.
error_ = keys::kCannotDetermineLanguageOfUnloadedTab;
return false;
@@ -1632,11 +1632,11 @@ bool DetectTabLanguageFunction::RunImpl() {
registrar_.Add(
this, content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(
- &(contents->tab_contents()->controller())));
+ &(contents->tab_contents()->GetController())));
registrar_.Add(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &(contents->tab_contents()->controller())));
+ &(contents->tab_contents()->GetController())));
return true;
}
diff --git a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
index 511784c..0589036 100644
--- a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
+++ b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
@@ -30,7 +30,7 @@ class ExtensionURLRewriteBrowserTest : public ExtensionBrowserTest {
}
NavigationController* GetNavigationController() const {
- return &browser()->GetSelectedTabContents()->controller();
+ return &browser()->GetSelectedTabContents()->GetController();
}
NavigationEntry* GetNavigationEntry() const {
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 0ccb47e..80ecfa9 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -352,7 +352,7 @@ void ExtensionWebUI::UnregisterAndReplaceOverride(const std::string& page,
// Don't use Reload() since |url| isn't the same as the internal URL
// that NavigationController has.
- tab->controller().LoadURL(
+ tab->GetController().LoadURL(
url, content::Referrer(url, WebKit::WebReferrerPolicyDefault),
content::PAGE_TRANSITION_RELOAD, std::string());
}
diff --git a/chrome/browser/extensions/extension_webstore_private_api.cc b/chrome/browser/extensions/extension_webstore_private_api.cc
index b38703c..85c6c38 100644
--- a/chrome/browser/extensions/extension_webstore_private_api.cc
+++ b/chrome/browser/extensions/extension_webstore_private_api.cc
@@ -371,7 +371,7 @@ bool CompleteInstallFunction::RunImpl() {
// permissions install dialog.
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
profile(), test_webstore_installer_delegate,
- &(dispatcher()->delegate()->GetAssociatedTabContents()->controller()),
+ &(dispatcher()->delegate()->GetAssociatedTabContents()->GetController()),
id, WebstoreInstaller::FLAG_NONE);
installer->Start();
@@ -426,7 +426,7 @@ void SilentlyInstallFunction::OnWebstoreParseSuccess(
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
profile(), this,
- &(dispatcher()->delegate()->GetAssociatedTabContents()->controller()),
+ &(dispatcher()->delegate()->GetAssociatedTabContents()->GetController()),
id_, WebstoreInstaller::FLAG_NONE);
installer->Start();
}
diff --git a/chrome/browser/extensions/isolated_app_browsertest.cc b/chrome/browser/extensions/isolated_app_browsertest.cc
index 79424ba..7bfe238 100644
--- a/chrome/browser/extensions/isolated_app_browsertest.cc
+++ b/chrome/browser/extensions/isolated_app_browsertest.cc
@@ -119,7 +119,7 @@ IN_PROC_BROWSER_TEST_F(IsolatedAppTest, CookieIsolation) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
EXPECT_TRUE(HasCookie(tab1, "app1=3"));
diff --git a/chrome/browser/extensions/webstore_inline_installer.cc b/chrome/browser/extensions/webstore_inline_installer.cc
index f31c08d..73c0589 100644
--- a/chrome/browser/extensions/webstore_inline_installer.cc
+++ b/chrome/browser/extensions/webstore_inline_installer.cc
@@ -394,7 +394,7 @@ void WebstoreInlineInstaller::InstallUIProceed() {
tab_contents()->browser_context());
scoped_refptr<WebstoreInstaller> installer = new WebstoreInstaller(
- profile, this, &(tab_contents()->controller()), id_,
+ profile, this, &(tab_contents()->GetController()), id_,
WebstoreInstaller::FLAG_INLINE_INSTALL);
installer->Start();
}
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index 9d984b2..31d61f4 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -170,7 +170,7 @@ bool ExternalTabContainer::Init(Profile* profile,
if (existing_contents) {
tab_contents_.reset(existing_contents);
- tab_contents_->tab_contents()->controller().set_browser_context(profile);
+ tab_contents_->tab_contents()->GetController().set_browser_context(profile);
} else {
TabContents* new_contents = new TabContents(profile, NULL, MSG_ROUTING_NONE,
NULL, NULL);
@@ -192,7 +192,7 @@ bool ExternalTabContainer::Init(Profile* profile,
}
NavigationController* controller =
- &tab_contents_->tab_contents()->controller();
+ &tab_contents_->tab_contents()->GetController();
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
@@ -249,7 +249,7 @@ void ExternalTabContainer::Uninitialize() {
content::NotificationService::current()->Notify(
chrome::NOTIFICATION_EXTERNAL_TAB_CLOSED,
content::Source<NavigationController>(
- &tab_contents_->tab_contents()->controller()),
+ &tab_contents_->tab_contents()->GetController()),
content::Details<ExternalTabContainer>(this));
tab_contents_.reset(NULL);
@@ -826,7 +826,7 @@ void ExternalTabContainer::Observe(int type,
if (InitNavigationInfo(&navigation_info, commit->type,
commit->previous_entry_index -
tab_contents_->tab_contents()->
- controller().last_committed_entry_index()))
+ GetController().last_committed_entry_index()))
automation_->Send(new AutomationMsg_DidNavigate(tab_handle_,
navigation_info));
}
@@ -948,7 +948,7 @@ bool ExternalTabContainer::InitNavigationInfo(NavigationInfo* nav_info,
int relative_offset) {
DCHECK(nav_info);
NavigationEntry* entry =
- tab_contents_->tab_contents()->controller().GetActiveEntry();
+ tab_contents_->tab_contents()->GetController().GetActiveEntry();
// If this is very early in the game then we may not have an entry.
if (!entry)
return false;
@@ -956,7 +956,7 @@ bool ExternalTabContainer::InitNavigationInfo(NavigationInfo* nav_info,
nav_info->navigation_type = nav_type;
nav_info->relative_offset = relative_offset;
nav_info->navigation_index =
- tab_contents_->tab_contents()->controller().GetCurrentEntryIndex();
+ tab_contents_->tab_contents()->GetController().GetCurrentEntryIndex();
nav_info->url = entry->url();
nav_info->referrer = entry->referrer().url;
nav_info->title = UTF16ToWideHack(entry->title());
@@ -1052,7 +1052,7 @@ void ExternalTabContainer::Navigate(const GURL& url, const GURL& referrer) {
TRACE_EVENT_BEGIN_ETW("ExternalTabContainer::Navigate", 0, url.spec());
- tab_contents_->tab_contents()->controller().LoadURL(
+ tab_contents_->tab_contents()->GetController().LoadURL(
url, content::Referrer(referrer, WebKit::WebReferrerPolicyDefault),
content::PAGE_TRANSITION_START_PAGE, std::string());
}
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index b6402d4..8df87aa 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -42,7 +42,7 @@ void FaviconTabHelper::FetchFavicon(const GURL& url) {
SkBitmap FaviconTabHelper::GetFavicon() const {
// Like GetTitle(), we also want to use the favicon for the last committed
// entry rather than a pending navigation entry.
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->favicon().bitmap();
@@ -54,7 +54,7 @@ SkBitmap FaviconTabHelper::GetFavicon() const {
}
bool FaviconTabHelper::FaviconIsValid() const {
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->favicon().is_valid();
@@ -68,7 +68,7 @@ bool FaviconTabHelper::FaviconIsValid() const {
bool FaviconTabHelper::ShouldDisplayFavicon() {
// Always display a throbber during pending loads.
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
if (controller.GetLastCommittedEntry() && controller.pending_entry())
return true;
@@ -79,7 +79,7 @@ bool FaviconTabHelper::ShouldDisplayFavicon() {
}
void FaviconTabHelper::SaveFavicon() {
- NavigationEntry* entry = tab_contents()->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents()->GetController().GetActiveEntry();
if (!entry || entry->url().is_empty())
return;
@@ -128,7 +128,7 @@ void FaviconTabHelper::OnUpdateFaviconURL(
}
NavigationEntry* FaviconTabHelper::GetActiveEntry() {
- return tab_contents()->controller().GetActiveEntry();
+ return tab_contents()->GetController().GetActiveEntry();
}
void FaviconTabHelper::StartDownload(int id, const GURL& url, int image_size) {
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
index 5bc344e..2e738fc 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context.cc
@@ -175,7 +175,7 @@ GeolocationConfirmInfoBarDelegate::GeolocationConfirmInfoBarDelegate(
requesting_frame_url_(requesting_frame_url),
display_languages_(display_languages) {
const NavigationEntry* committed_entry =
- infobar_helper->tab_contents()->controller().GetLastCommittedEntry();
+ infobar_helper->tab_contents()->GetController().GetLastCommittedEntry();
committed_contents_unique_id_ = committed_entry ?
committed_entry->unique_id() : 0;
}
diff --git a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
index 0fe86e45..4c1eb2e 100644
--- a/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
+++ b/chrome/browser/geolocation/chrome_geolocation_permission_context_unittest.cc
@@ -209,8 +209,8 @@ void GeolocationPermissionContextTests::CheckPermissionMessageSentInternal(
void GeolocationPermissionContextTests::AddNewTab(const GURL& url) {
TabContents* new_tab =
new TabContents(profile(), NULL, MSG_ROUTING_NONE, NULL, NULL);
- new_tab->controller().LoadURL(url, content::Referrer(),
- content::PAGE_TRANSITION_TYPED, std::string());
+ new_tab->GetController().LoadURL(
+ url, content::Referrer(), content::PAGE_TRANSITION_TYPED, std::string());
static_cast<TestRenderViewHost*>(new_tab->render_manager_for_testing()->
current_host())->SendNavigate(extra_tabs_.size() + 1, url);
extra_tabs_.push_back(new TabContentsWrapper(new_tab));
@@ -579,7 +579,7 @@ TEST_F(GeolocationPermissionContextTests, InfoBarUsesCommittedEntry) {
EXPECT_EQ(0U, infobar_tab_helper()->infobar_count());
// Go back: navigate to a pending entry before requesting geolocation
// permission.
- contents()->controller().GoBack();
+ contents()->GetController().GoBack();
// Request permission for the committed frame (not the pending one).
RequestGeolocationPermission(
process_id(), render_id(), bridge_id(), requesting_frame_1);
@@ -589,11 +589,11 @@ TEST_F(GeolocationPermissionContextTests, InfoBarUsesCommittedEntry) {
ASSERT_TRUE(infobar_0);
// Ensure the infobar is not yet expired.
content::LoadCommittedDetails details;
- details.entry = contents()->controller().GetLastCommittedEntry();
+ details.entry = contents()->GetController().GetLastCommittedEntry();
ASSERT_FALSE(infobar_0->ShouldExpire(details));
// Commit the "GoBack()" above, and ensure the infobar is now expired.
contents()->CommitPendingNavigation();
- details.entry = contents()->controller().GetLastCommittedEntry();
+ details.entry = contents()->GetController().GetLastCommittedEntry();
ASSERT_TRUE(infobar_0->ShouldExpire(details));
// Delete the tab contents.
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index 712ce9b..3a41d99 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -46,7 +46,7 @@ class IFrameLoader : public content::NotificationObserver {
: navigation_completed_(false),
javascript_completed_(false) {
NavigationController* controller =
- &browser->GetSelectedTabContents()->controller();
+ &browser->GetSelectedTabContents()->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(controller));
registrar_.Add(this, chrome::NOTIFICATION_DOM_OPERATION_RESPONSE,
@@ -324,7 +324,7 @@ class GeolocationBrowserTest : public InProcessBrowserTest {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab_contents_wrapper->tab_contents()->controller()));
+ &tab_contents_wrapper->tab_contents()->GetController()));
if (allowed)
infobar_->AsConfirmInfoBarDelegate()->Accept();
else
@@ -507,7 +507,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest,
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &current_browser_->GetSelectedTabContents()->controller()));
+ &current_browser_->GetSelectedTabContents()->GetController()));
NotifyGeoposition(fresh_position);
observer.Wait();
CheckGeoposition(fresh_position);
@@ -544,7 +544,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest,
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &current_browser_->GetSelectedTabContents()->controller()));
+ &current_browser_->GetSelectedTabContents()->GetController()));
NotifyGeoposition(cached_position);
observer.Wait();
CheckGeoposition(cached_position);
@@ -652,7 +652,7 @@ IN_PROC_BROWSER_TEST_F(GeolocationBrowserTest, TwoWatchesInOneFrame) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &current_browser_->GetSelectedTabContents()->controller()));
+ &current_browser_->GetSelectedTabContents()->GetController()));
NotifyGeoposition(final_position);
observer.Wait();
CheckGeoposition(final_position);
diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc
index 777e054..614400f 100644
--- a/chrome/browser/infobars/infobar_delegate.cc
+++ b/chrome/browser/infobars/infobar_delegate.cc
@@ -84,7 +84,7 @@ InfoBarDelegate::InfoBarDelegate(InfoBarTabHelper* infobar_helper)
void InfoBarDelegate::StoreActiveEntryUniqueID(
InfoBarTabHelper* infobar_helper) {
NavigationEntry* active_entry =
- infobar_helper->tab_contents()->controller().GetActiveEntry();
+ infobar_helper->tab_contents()->GetController().GetActiveEntry();
contents_unique_id_ = active_entry ? active_entry->unique_id() : 0;
}
diff --git a/chrome/browser/infobars/infobar_tab_helper.cc b/chrome/browser/infobars/infobar_tab_helper.cc
index 000bfb4..d3baf4a 100644
--- a/chrome/browser/infobars/infobar_tab_helper.cc
+++ b/chrome/browser/infobars/infobar_tab_helper.cc
@@ -55,7 +55,8 @@ void InfoBarTabHelper::AddInfoBar(InfoBarDelegate* delegate) {
if (infobars_.size() == 1) {
registrar_.Add(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&tab_contents()->controller()));
+ content::Source<NavigationController>(
+ &tab_contents()->GetController()));
}
}
@@ -118,8 +119,10 @@ void InfoBarTabHelper::RemoveInfoBarInternal(InfoBarDelegate* delegate,
infobars_.erase(infobars_.begin() + i);
// Remove ourselves as an observer if we are tracking no more InfoBars.
if (infobars_.empty()) {
- registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&tab_contents()->controller()));
+ registrar_.Remove(
+ this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
+ content::Source<NavigationController>(
+ &tab_contents()->GetController()));
}
}
@@ -176,7 +179,7 @@ void InfoBarTabHelper::Observe(int type,
const content::NotificationDetails& details) {
switch (type) {
case content::NOTIFICATION_NAV_ENTRY_COMMITTED: {
- DCHECK(&tab_contents()->controller() ==
+ DCHECK(&tab_contents()->GetController() ==
content::Source<NavigationController>(source).ptr());
content::LoadCommittedDetails& committed_details =
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 93f389e..d0e5316 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -314,7 +314,7 @@ IN_PROC_BROWSER_TEST_F(InstantTest, MAYBE(OnSubmitEvent)) {
// We should have two entries. One corresponding to the page the user was
// first on, and one for the search page.
- EXPECT_EQ(2, preview_tab->controller().entry_count());
+ EXPECT_EQ(2, preview_tab->GetController().entry_count());
// Check that the value is reflected and onsubmit is called.
EXPECT_EQ("true 1 0 1 true d false defghi true 3 3",
diff --git a/chrome/browser/instant/instant_controller.cc b/chrome/browser/instant/instant_controller.cc
index b8f10d1..74a0d72 100644
--- a/chrome/browser/instant/instant_controller.cc
+++ b/chrome/browser/instant/instant_controller.cc
@@ -269,8 +269,8 @@ TabContentsWrapper* InstantController::CommitCurrentPreview(
InstantCommitType type) {
DCHECK(loader_.get());
TabContentsWrapper* tab = ReleasePreviewContents(type);
- tab->tab_contents()->controller().CopyStateFromAndPrune(
- &tab_contents_->tab_contents()->controller());
+ tab->tab_contents()->GetController().CopyStateFromAndPrune(
+ &tab_contents_->tab_contents()->GetController());
delegate_->CommitInstant(tab);
CompleteRelease(tab);
return tab;
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index cc09d01..a04969e 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -96,7 +96,8 @@ class InstantLoader::FrameLoadObserver : public content::NotificationObserver {
tab_contents_(tab_contents),
text_(text),
verbatim_(verbatim),
- unique_id_(tab_contents_->controller().pending_entry()->unique_id()) {
+ unique_id_(
+ tab_contents_->GetController().pending_entry()->unique_id()) {
registrar_.Add(this, content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME,
content::Source<TabContents>(tab_contents_));
}
@@ -141,7 +142,7 @@ void InstantLoader::FrameLoadObserver::Observe(
case content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME: {
int page_id = *(content::Details<int>(details).ptr());
NavigationEntry* active_entry =
- tab_contents_->controller().GetActiveEntry();
+ tab_contents_->GetController().GetActiveEntry();
if (!active_entry || active_entry->page_id() != page_id ||
active_entry->unique_id() != unique_id_) {
return;
@@ -290,7 +291,7 @@ InstantLoader::TabContentsDelegateImpl::TabContentsDelegateImpl(
content::Source<TabContents>(loader->preview_contents()->tab_contents()));
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
content::Source<NavigationController>(
- &loader->preview_contents()->tab_contents()->controller()));
+ &loader->preview_contents()->tab_contents()->GetController()));
}
void InstantLoader::TabContentsDelegateImpl::PrepareForNewLoad() {
@@ -331,7 +332,7 @@ void InstantLoader::TabContentsDelegateImpl::CommitHistory(
}
NavigationEntry* active_entry =
- tab->tab_contents()->controller().GetActiveEntry();
+ tab->tab_contents()->GetController().GetActiveEntry();
if (!active_entry) {
// It appears to be possible to get here with no active entry. This seems
// to be possible with an auth dialog, but I can't narrow down the
@@ -424,7 +425,7 @@ void InstantLoader::TabContentsDelegateImpl::NavigationStateChanged(
const TabContents* source,
unsigned changed_flags) {
if (!loader_->ready() && !registered_render_widget_host_ &&
- source->controller().entry_count()) {
+ source->GetController().entry_count()) {
// The load has been committed. Install an observer that waits for the
// first paint then makes the preview active. We wait for the load to be
// committed before waiting on paint as there is always an initial paint
@@ -547,9 +548,9 @@ void InstantLoader::TabContentsDelegateImpl::OnSetSuggestions(
const std::vector<std::string>& suggestions,
InstantCompleteBehavior behavior) {
TabContentsWrapper* source = loader_->preview_contents();
- if (!source->tab_contents()->controller().GetActiveEntry() ||
+ if (!source->tab_contents()->GetController().GetActiveEntry() ||
page_id !=
- source->tab_contents()->controller().GetActiveEntry()->page_id()) {
+ source->tab_contents()->GetController().GetActiveEntry()->page_id()) {
return;
}
@@ -563,8 +564,8 @@ void InstantLoader::TabContentsDelegateImpl::OnInstantSupportDetermined(
int32 page_id,
bool result) {
TabContents* source = loader_->preview_contents()->tab_contents();
- if (!source->controller().GetActiveEntry() ||
- page_id != source->controller().GetActiveEntry()->page_id())
+ if (!source->GetController().GetActiveEntry() ||
+ page_id != source->GetController().GetActiveEntry()->page_id())
return;
content::Details<const bool> details(&result);
@@ -693,7 +694,7 @@ bool InstantLoader::Update(TabContentsWrapper* tab_contents,
DCHECK(template_url_id_ == 0);
preview_tab_contents_delegate_->PrepareForNewLoad();
frame_load_observer_.reset(NULL);
- preview_contents_->tab_contents()->controller().LoadURL(
+ preview_contents_->tab_contents()->GetController().LoadURL(
url_, content::Referrer(), transition_type, std::string());
}
return true;
@@ -774,7 +775,7 @@ TabContentsWrapper* InstantLoader::ReleasePreviewContents(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->controller()));
+ &preview_contents_->tab_contents()->GetController()));
#endif
}
preview_contents_->tab_contents()->SetDelegate(NULL);
@@ -811,7 +812,7 @@ void InstantLoader::MaybeLoadInstantURL(TabContentsWrapper* tab_contents,
bool InstantLoader::IsNavigationPending() const {
return preview_contents_.get() &&
- preview_contents_->tab_contents()->controller().pending_entry();
+ preview_contents_->tab_contents()->GetController().pending_entry();
}
void InstantLoader::Observe(int type,
@@ -994,13 +995,13 @@ void InstantLoader::ReplacePreviewContents(TabContentsWrapper* old_tc,
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &old_tc->tab_contents()->controller()));
+ &old_tc->tab_contents()->GetController()));
#endif
registrar_.Remove(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &old_tc->tab_contents()->controller()));
+ &old_tc->tab_contents()->GetController()));
// We prerendered so we should be ready to show. If we're ready, swap in
// immediately, otherwise show the preview as normal.
@@ -1024,7 +1025,7 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
// will overlap.
int32 max_page_id = tab_contents->tab_contents()->GetMaxPageID();
if (max_page_id != -1) {
- preview_contents_->tab_contents()->controller().set_max_restored_page_id(
+ preview_contents_->tab_contents()->GetController().set_max_restored_page_id(
max_page_id + 1);
}
@@ -1040,14 +1041,14 @@ void InstantLoader::SetupPreviewContents(TabContentsWrapper* tab_contents) {
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->controller()));
+ &preview_contents_->tab_contents()->GetController()));
#endif
registrar_.Add(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &preview_contents_->tab_contents()->controller()));
+ &preview_contents_->tab_contents()->GetController()));
gfx::Rect tab_bounds;
tab_contents->tab_contents()->GetView()->GetContainerBounds(&tab_bounds);
@@ -1086,7 +1087,7 @@ void InstantLoader::LoadInstantURL(TabContentsWrapper* tab_contents,
CommandLine* cl = CommandLine::ForCurrentProcess();
if (cl->HasSwitch(switches::kInstantURL))
instant_url = GURL(cl->GetSwitchValueASCII(switches::kInstantURL));
- preview_contents_->tab_contents()->controller().LoadURL(
+ preview_contents_->tab_contents()->GetController().LoadURL(
instant_url, content::Referrer(), transition_type, std::string());
RenderViewHost* host = preview_contents_->tab_contents()->GetRenderViewHost();
preview_contents_->tab_contents()->HideContents();
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
index eac05b6..f651837 100644
--- a/chrome/browser/memory_details.cc
+++ b/chrome/browser/memory_details.cc
@@ -285,9 +285,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
//
// Either the pending or last committed entries can be NULL.
const NavigationEntry* pending_entry =
- contents->controller().pending_entry();
+ contents->GetController().pending_entry();
const NavigationEntry* last_committed_entry =
- contents->controller().GetLastCommittedEntry();
+ contents->GetController().GetLastCommittedEntry();
if ((last_committed_entry &&
LowerCaseEqualsASCII(last_committed_entry->virtual_url().spec(),
chrome::kChromeUIMemoryURL)) ||
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index ccde276..19c2552 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -117,11 +117,11 @@ void BalloonHost::Init() {
MSG_ROUTING_NONE,
NULL,
NULL));
- tab_contents_->set_view_type(chrome::VIEW_TYPE_NOTIFICATION);
+ tab_contents_->SetViewType(chrome::VIEW_TYPE_NOTIFICATION);
tab_contents_->SetDelegate(this);
Observe(tab_contents_.get());
- tab_contents_->controller().LoadURL(
+ tab_contents_->GetController().LoadURL(
balloon_->notification().content_url(), content::Referrer(),
content::PAGE_TRANSITION_LINK, std::string());
diff --git a/chrome/browser/omnibox_search_hint.cc b/chrome/browser/omnibox_search_hint.cc
index bded9c0..2a980a0 100644
--- a/chrome/browser/omnibox_search_hint.cc
+++ b/chrome/browser/omnibox_search_hint.cc
@@ -149,7 +149,7 @@ bool HintInfoBar::Accept() {
// OmniboxSearchHint ----------------------------------------------------------
OmniboxSearchHint::OmniboxSearchHint(TabContentsWrapper* tab) : tab_(tab) {
- NavigationController* controller = &(tab->tab_contents()->controller());
+ NavigationController* controller = &(tab->tab_contents()->GetController());
notification_registrar_.Add(
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
@@ -172,7 +172,7 @@ void OmniboxSearchHint::Observe(int type,
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationEntry* entry =
- tab_->tab_contents()->controller().GetActiveEntry();
+ tab_->tab_contents()->GetController().GetActiveEntry();
if (search_engine_urls_.find(entry->url().spec()) ==
search_engine_urls_.end()) {
// The search engine is not in our white-list, bail.
diff --git a/chrome/browser/password_manager_delegate_impl.cc b/chrome/browser/password_manager_delegate_impl.cc
index da7a6e2..d9a326e 100644
--- a/chrome/browser/password_manager_delegate_impl.cc
+++ b/chrome/browser/password_manager_delegate_impl.cc
@@ -129,6 +129,6 @@ Profile* PasswordManagerDelegateImpl::GetProfileForPasswordManager() {
}
bool PasswordManagerDelegateImpl::DidLastPageLoadEncounterSSLErrors() {
- return tab_contents_->tab_contents()->controller().ssl_manager()->
+ return tab_contents_->tab_contents()->GetController().ssl_manager()->
ProcessedSSLErrorFromRequest();
}
diff --git a/chrome/browser/prerender/prerender_browsertest.cc b/chrome/browser/prerender/prerender_browsertest.cc
index cdea761..d26ce9e 100644
--- a/chrome/browser/prerender/prerender_browsertest.cc
+++ b/chrome/browser/prerender/prerender_browsertest.cc
@@ -584,7 +584,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
EXPECT_FALSE(tab->IsLoading());
ui_test_utils::WindowedNotificationObserver back_nav_observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
browser->GoBack(CURRENT_TAB);
back_nav_observer.Wait();
bool js_result;
@@ -763,7 +763,7 @@ class PrerenderBrowserTest : public InProcessBrowserTest {
new ui_test_utils::WindowedNotificationObserver(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab_contents->controller())));
+ &tab_contents->GetController())));
}
// ui_test_utils::NavigateToURL waits until DidStopLoading is called on
@@ -1351,7 +1351,7 @@ IN_PROC_BROWSER_TEST_F(PrerenderBrowserTest, PrerenderRendererCrash) {
// Navigate to about:crash and then wait for the renderer to crash.
ASSERT_TRUE(GetPrerenderContents());
ASSERT_TRUE(GetPrerenderContents()->prerender_contents());
- GetPrerenderContents()->prerender_contents()->tab_contents()->controller().
+ GetPrerenderContents()->prerender_contents()->tab_contents()->GetController().
LoadURL(
GURL(chrome::kAboutCrashURL),
content::Referrer(),
diff --git a/chrome/browser/prerender/prerender_contents.cc b/chrome/browser/prerender/prerender_contents.cc
index e3a7b3c..1c493e3 100644
--- a/chrome/browser/prerender/prerender_contents.cc
+++ b/chrome/browser/prerender/prerender_contents.cc
@@ -285,7 +285,7 @@ void PrerenderContents::StartPrerendering(
if (starting_page_id_ < 0)
starting_page_id_ = 0;
starting_page_id_ += kPrerenderPageIdOffset;
- prerender_contents_->tab_contents()->controller().set_max_restored_page_id(
+ prerender_contents_->tab_contents()->GetController().set_max_restored_page_id(
starting_page_id_);
tab_contents_delegate_.reset(new TabContentsDelegateImpl(this));
@@ -343,7 +343,7 @@ void PrerenderContents::StartPrerendering(
content::PageTransition transition = content::PAGE_TRANSITION_LINK;
if (origin_ == ORIGIN_OMNIBOX_EXACT || origin_ == ORIGIN_OMNIBOX_EXACT_FULL)
transition = content::PAGE_TRANSITION_TYPED;
- new_contents->controller().LoadURL(
+ new_contents->GetController().LoadURL(
prerender_url_,
referrer_,
transition, std::string());
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index c213092..52ef74a 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -663,8 +663,8 @@ bool PrerenderManager::MaybeUsePrerenderedPage(TabContents* tab_contents,
MarkTabContentsAsPrerendered(new_tab_contents->tab_contents());
// Merge the browsing history.
- new_tab_contents->tab_contents()->controller().CopyStateFromAndPrune(
- &old_tab_contents->tab_contents()->controller());
+ new_tab_contents->tab_contents()->GetController().CopyStateFromAndPrune(
+ &old_tab_contents->tab_contents()->GetController());
old_tab_contents->core_tab_helper()->delegate()->
SwapTabContents(old_tab_contents, new_tab_contents);
prerender_contents->CommitHistory(new_tab_contents);
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index 6823c06..d0f2248 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -299,7 +299,7 @@ void CloudPrintFlowHandler::RegisterMessages() {
// Register for appropriate notifications, and re-direct the URL
// to the real server URL, now that we've gotten an HTML dialog
// going.
- NavigationController* controller = &web_ui_->tab_contents()->controller();
+ NavigationController* controller = &web_ui_->tab_contents()->GetController();
NavigationEntry* pending_entry = controller->pending_entry();
if (pending_entry) {
Profile* profile = Profile::FromWebUI(web_ui_);
diff --git a/chrome/browser/printing/print_preview_tab_controller.cc b/chrome/browser/printing/print_preview_tab_controller.cc
index be62cea..3c634d9 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -410,7 +410,7 @@ void PrintPreviewTabController::AddObservers(TabContentsWrapper* tab) {
content::Source<TabContents>(contents));
registrar_.Add(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->GetController()));
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
@@ -430,7 +430,7 @@ void PrintPreviewTabController::RemoveObservers(TabContentsWrapper* tab) {
content::Source<TabContents>(contents));
registrar_.Remove(
this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->GetController()));
// Multiple sites may share the same RenderProcessHost, so check if this
// notification has already been added.
diff --git a/chrome/browser/repost_form_warning_controller.cc b/chrome/browser/repost_form_warning_controller.cc
index a53e95e..3578221 100644
--- a/chrome/browser/repost_form_warning_controller.cc
+++ b/chrome/browser/repost_form_warning_controller.cc
@@ -20,7 +20,7 @@
RepostFormWarningController::RepostFormWarningController(
TabContents* tab_contents)
: TabModalConfirmDialogDelegate(tab_contents),
- navigation_controller_(&tab_contents->controller()) {
+ navigation_controller_(&tab_contents->GetController()) {
registrar_.Add(this, content::NOTIFICATION_REPOST_WARNING_SHOWN,
content::Source<NavigationController>(navigation_controller_));
}
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index be9022d..f91cd839 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -151,7 +151,7 @@ void BrowserFeatureExtractor::ExtractFeatures(const BrowseInfo* info,
}
// Extract features pertaining to this navigation.
- const NavigationController& controller = tab_->controller();
+ const NavigationController& controller = tab_->GetController();
int url_index = -1;
int first_host_index = -1;
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
index a47f1b1..d5b4dc7 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor_unittest.cc
@@ -92,7 +92,7 @@ class BrowserFeatureExtractorTest : public ChromeRenderViewHostTestHarness {
void NavigateAndCommit(const GURL& url,
const GURL& referrer,
content::PageTransition type) {
- contents()->controller().LoadURL(
+ contents()->GetController().LoadURL(
url, content::Referrer(referrer, WebKit::WebReferrerPolicyDefault),
type, std::string());
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index 29d9e43..f4ef976 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -347,9 +347,9 @@ void ClientSideDetectionHost::OnSafeBrowsingHit(
resource.render_view_id &&
(resource.threat_type == SafeBrowsingService::URL_PHISHING ||
resource.threat_type == SafeBrowsingService::URL_MALWARE) &&
- tab_contents()->controller().GetActiveEntry()) {
+ tab_contents()->GetController().GetActiveEntry()) {
unsafe_unique_page_id_ =
- tab_contents()->controller().GetActiveEntry()->unique_id();
+ tab_contents()->GetController().GetActiveEntry()->unique_id();
// We also keep the resource around in order to be able to send the
// malicious URL to the server.
unsafe_resource_.reset(new SafeBrowsingService::UnsafeResource(resource));
@@ -426,7 +426,7 @@ void ClientSideDetectionHost::MaybeShowPhishingWarning(GURL phishing_url,
if (!sb_service_->IsWhitelisted(resource)) {
// We need to stop any pending navigations, otherwise the interstital
// might not get created properly.
- tab_contents()->controller().DiscardNonCommittedEntries();
+ tab_contents()->GetController().DiscardNonCommittedEntries();
resource.client = new CsdClient(); // Will delete itself
sb_service_->DoDisplayBlockingPage(resource);
}
@@ -474,7 +474,7 @@ bool ClientSideDetectionHost::DidShowSBInterstitial() {
return false;
}
const NavigationEntry* nav_entry =
- tab_contents()->controller().GetActiveEntry();
+ tab_contents()->GetController().GetActiveEntry();
return (nav_entry && nav_entry->unique_id() == unsafe_unique_page_id_);
}
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index 05f1954..481cb70 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -167,7 +167,7 @@ void MalwareDetails::StartCollection() {
}
GURL referrer_url;
- NavigationEntry* nav_entry = tab_contents()->controller().GetActiveEntry();
+ NavigationEntry* nav_entry = tab_contents()->GetController().GetActiveEntry();
if (nav_entry) {
referrer_url = nav_entry->referrer().url;
if (IsPublicUrl(referrer_url)) {
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index feca329..4ea3212 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -146,7 +146,7 @@ SafeBrowsingBlockingPage::SafeBrowsingBlockingPage(
RecordUserAction(SHOW);
if (!is_main_frame_load_blocked_) {
navigation_entry_index_to_remove_ =
- tab()->controller().last_committed_entry_index();
+ tab()->GetController().last_committed_entry_index();
} else {
navigation_entry_index_to_remove_ = -1;
}
@@ -467,13 +467,13 @@ void SafeBrowsingBlockingPage::CommandReceived(const std::string& cmd) {
// Otherwise the offending entry has committed, and we need to go back or
// to a safe page. We will close the interstitial when that page commits.
- if (tab()->controller().CanGoBack()) {
- tab()->controller().GoBack();
+ if (tab()->GetController().CanGoBack()) {
+ tab()->GetController().GoBack();
} else {
- tab()->controller().LoadURL(GURL(chrome::kChromeUINewTabURL),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab()->GetController().LoadURL(GURL(chrome::kChromeUINewTabURL),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
}
return;
}
@@ -599,11 +599,13 @@ void SafeBrowsingBlockingPage::DontProceed() {
// for the tab has by then already been destroyed. We also don't delete the
// current entry if it has been committed again, which is possible on a page
// that had a subresource warning.
- int last_committed_index = tab()->controller().last_committed_entry_index();
+ int last_committed_index =
+ tab()->GetController().last_committed_entry_index();
if (navigation_entry_index_to_remove_ != -1 &&
navigation_entry_index_to_remove_ != last_committed_index &&
!tab()->is_being_destroyed()) {
- tab()->controller().RemoveEntryAtIndex(navigation_entry_index_to_remove_);
+ tab()->GetController().RemoveEntryAtIndex(
+ navigation_entry_index_to_remove_);
navigation_entry_index_to_remove_ = -1;
}
InterstitialPage::DontProceed();
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
index b7e54d3..8433c4d 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -423,7 +423,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareProceed) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
SendCommand("\"proceed\""); // Simulate the user clicking "proceed"
observer.Wait();
AssertNoInterstitial(true); // Assert the interstitial is gone.
@@ -452,7 +452,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingProceed) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
SendCommand("\"proceed\""); // Simulate the user clicking "proceed".
observer.Wait();
AssertNoInterstitial(true); // Assert the interstitial is gone
@@ -469,7 +469,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, PhishingReportError) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
SendCommand("\"reportError\""); // Simulate the user clicking "report error"
observer.Wait();
AssertNoInterstitial(false); // Assert the interstitial is gone
@@ -490,7 +490,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest,
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
SendCommand("\"learnMore\""); // Simulate the user clicking "learn more"
observer.Wait();
AssertNoInterstitial(false); // Assert the interstitial is gone
@@ -511,7 +511,7 @@ IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageTest, MalwareIframeDontProceed) {
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
SendCommand("\"takeMeBack\""); // Simulate the user clicking "back"
observer.Wait();
AssertNoInterstitial(false); // Assert the interstitial is gone
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
index fec4514..a6c2704 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc
@@ -115,9 +115,9 @@ class SafeBrowsingBlockingPageTest : public ChromeRenderViewHostTestHarness,
}
void GoBack(bool is_cross_site) {
- NavigationEntry* entry = contents()->controller().GetEntryAtOffset(-1);
+ NavigationEntry* entry = contents()->GetController().GetEntryAtOffset(-1);
ASSERT_TRUE(entry);
- contents()->controller().GoBack();
+ contents()->GetController().GoBack();
// The pending RVH should commit for cross-site navigations.
RenderViewHost* rvh = is_cross_site ?
@@ -493,7 +493,7 @@ TEST_F(SafeBrowsingBlockingPageTest, NavigatingBackAndForth) {
EXPECT_EQ(kGoodURL, controller().GetActiveEntry()->url().spec());
// Navigate forward to the malware URL.
- contents()->controller().GoForward();
+ contents()->GetController().GoForward();
ShowInterstitial(false, kBadURL);
sb_interstitial = GetSafeBrowsingBlockingPage();
ASSERT_TRUE(sb_interstitial);
diff --git a/chrome/browser/safe_browsing/safe_browsing_service.cc b/chrome/browser/safe_browsing/safe_browsing_service.cc
index f792476..db5ea42 100644
--- a/chrome/browser/safe_browsing/safe_browsing_service.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_service.cc
@@ -1054,7 +1054,7 @@ void SafeBrowsingService::DoDisplayBlockingPage(
CanReportStats()) {
GURL page_url = tab_contents->GetURL();
GURL referrer_url;
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (entry)
referrer_url = entry->referrer().url;
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index f74ff2d..5be29d0 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -252,10 +252,10 @@ void TabLoader::Observe(int type,
TabContents* tab_contents = content::Source<TabContents>(source).ptr();
if (!got_first_paint_) {
RenderWidgetHost* render_widget_host =
- GetRenderWidgetHost(&tab_contents->controller());
+ GetRenderWidgetHost(&tab_contents->GetController());
render_widget_hosts_loading_.erase(render_widget_host);
}
- HandleTabClosedOrLoaded(&tab_contents->controller());
+ HandleTabClosedOrLoaded(&tab_contents->GetController());
break;
}
case content::NOTIFICATION_LOAD_STOP: {
@@ -468,7 +468,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
RestoreTabsToBrowser(*(*i), browser, selected_tab_index);
ShowBrowser(browser, initial_tab_count, selected_tab_index);
tab_loader_->TabIsLoading(
- &browser->GetSelectedTabContents()->controller());
+ &browser->GetSelectedTabContents()->GetController());
NotifySessionServiceOfRestoredTabs(browser, initial_tab_count);
}
@@ -661,7 +661,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
active_tab = NULL;
}
tab_loader_->TabIsLoading(
- &browser->GetSelectedTabContents()->controller());
+ &browser->GetSelectedTabContents()->GetController());
NotifySessionServiceOfRestoredTabs(browser, initial_tab_count);
}
@@ -730,7 +730,7 @@ class SessionRestoreImpl : public content::NotificationObserver {
true,
NULL);
if (schedule_load)
- tab_loader_->ScheduleLoad(&tab_contents->controller());
+ tab_loader_->ScheduleLoad(&tab_contents->GetController());
}
Browser* CreateRestoredBrowser(Browser::Type type,
diff --git a/chrome/browser/sessions/session_service.cc b/chrome/browser/sessions/session_service.cc
index e60d30e..93f2ad1 100644
--- a/chrome/browser/sessions/session_service.cc
+++ b/chrome/browser/sessions/session_service.cc
@@ -560,7 +560,7 @@ void SessionService::Observe(int type,
TabNavigationPathPrunedFromBack(
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
- tab->tab_contents()->controller().entry_count());
+ tab->tab_contents()->GetController().entry_count());
}
RecordSessionUpdateHistogramData(content::NOTIFICATION_NAV_LIST_PRUNED,
&last_updated_nav_list_pruned_time_);
@@ -590,7 +590,7 @@ void SessionService::Observe(int type,
if (!tab || tab->profile() != profile())
return;
int current_entry_index =
- tab->tab_contents()->controller().GetCurrentEntryIndex();
+ tab->tab_contents()->GetController().GetCurrentEntryIndex();
SetSelectedNavigationIndex(tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
current_entry_index);
@@ -598,7 +598,7 @@ void SessionService::Observe(int type,
tab->restore_tab_helper()->window_id(),
tab->restore_tab_helper()->session_id(),
current_entry_index,
- *tab->tab_contents()->controller().GetEntryAtIndex(
+ *tab->tab_contents()->GetController().GetEntryAtIndex(
current_entry_index));
content::Details<content::LoadCommittedDetails> changed(details);
if (changed->type == content::NAVIGATION_TYPE_NEW_PAGE ||
@@ -1114,14 +1114,14 @@ void SessionService::BuildCommandsForTab(
const SessionID& session_id(tab->restore_tab_helper()->session_id());
commands->push_back(CreateSetTabWindowCommand(window_id, session_id));
const int current_index =
- tab->tab_contents()->controller().GetCurrentEntryIndex();
+ tab->tab_contents()->GetController().GetCurrentEntryIndex();
const int min_index = std::max(0,
current_index - max_persist_navigation_count);
const int max_index =
std::min(current_index + max_persist_navigation_count,
- tab->tab_contents()->controller().entry_count());
+ tab->tab_contents()->GetController().entry_count());
const int pending_index =
- tab->tab_contents()->controller().pending_entry_index();
+ tab->tab_contents()->GetController().pending_entry_index();
if (tab_to_available_range) {
(*tab_to_available_range)[session_id.id()] =
std::pair<int, int>(min_index, max_index);
@@ -1139,8 +1139,8 @@ void SessionService::BuildCommandsForTab(
}
for (int i = min_index; i < max_index; ++i) {
const NavigationEntry* entry = (i == pending_index) ?
- tab->tab_contents()->controller().pending_entry() :
- tab->tab_contents()->controller().GetEntryAtIndex(i);
+ tab->tab_contents()->GetController().pending_entry() :
+ tab->tab_contents()->GetController().GetEntryAtIndex(i);
DCHECK(entry);
if (ShouldTrackEntry(entry->virtual_url())) {
commands->push_back(
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 3fb872a..1582c88 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -250,7 +250,7 @@ void TabRestoreService::BrowserClosing(TabRestoreServiceDelegate* delegate) {
PopulateTab(&(window->tabs[entry_index]),
tab_index,
delegate,
- &delegate->GetTabContentsAt(tab_index)->controller());
+ &delegate->GetTabContentsAt(tab_index)->GetController());
if (window->tabs[entry_index].navigations.empty()) {
window->tabs.erase(window->tabs.begin() + entry_index);
} else {
@@ -361,7 +361,7 @@ void TabRestoreService::RestoreEntryById(TabRestoreServiceDelegate* delegate,
tab.pinned, tab.from_last_session,
tab.session_storage_namespace);
if (restored_tab) {
- restored_tab->controller().LoadIfNecessary();
+ restored_tab->GetController().LoadIfNecessary();
RecordAppLaunch(profile(), tab);
}
}
diff --git a/chrome/browser/sidebar/sidebar_browsertest.cc b/chrome/browser/sidebar/sidebar_browsertest.cc
index f98f9fa..914ee30 100644
--- a/chrome/browser/sidebar/sidebar_browsertest.cc
+++ b/chrome/browser/sidebar/sidebar_browsertest.cc
@@ -77,7 +77,8 @@ class SidebarTest : public ExtensionBrowserTest {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&client_contents->controller()));
+ content::Source<NavigationController>(
+ &client_contents->GetController()));
sidebar_manager->NavigateSidebar(tab, content_id_, url);
observer.Wait();
}
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index e2c326b..17b83c4 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -89,7 +89,7 @@ void SidebarContainer::Collapse() {
void SidebarContainer::Navigate(const GURL& url) {
// TODO(alekseys): add a progress UI.
navigate_to_default_page_on_expand_ = false;
- sidebar_contents_->controller().LoadURL(
+ sidebar_contents_->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
std::string());
}
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 88f5eb7..6698581 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -120,7 +120,7 @@ void SSLBlockingPage::UpdateEntry(NavigationEntry* entry) {
entry->ssl().set_security_bits(ssl_info.security_bits);
content::NotificationService::current()->Notify(
content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
- content::Source<NavigationController>(&tab()->controller()),
+ content::Source<NavigationController>(&tab()->GetController()),
content::NotificationService::NoDetails());
}
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index c486318..fab7815 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -47,7 +47,7 @@ class SSLUITest : public InProcessBrowserTest {
void CheckAuthenticatedState(TabContents* tab,
bool displayed_insecure_content) {
ASSERT_FALSE(tab->is_crashed());
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type());
EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATED,
@@ -60,7 +60,7 @@ class SSLUITest : public InProcessBrowserTest {
void CheckUnauthenticatedState(TabContents* tab) {
ASSERT_FALSE(tab->is_crashed());
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->page_type());
EXPECT_EQ(content::SECURITY_STYLE_UNAUTHENTICATED,
@@ -75,7 +75,7 @@ class SSLUITest : public InProcessBrowserTest {
bool ran_insecure_content,
bool interstitial) {
ASSERT_FALSE(tab->is_crashed());
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
EXPECT_EQ(interstitial ?
content::PAGE_TYPE_INTERSTITIAL : content::PAGE_TYPE_NORMAL,
@@ -127,7 +127,7 @@ class SSLUITest : public InProcessBrowserTest {
ASSERT_TRUE(interstitial_page);
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
interstitial_page->Proceed();
observer.Wait();
}
@@ -317,7 +317,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, MAYBE_TestHTTPSExpiredCertAndDontProceed) {
https_server_.GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
GURL cross_site_url =
@@ -360,7 +360,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestHTTPSExpiredCertAndGoBackViaButton) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -396,7 +396,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoBackViaMenu) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -406,7 +406,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoBackViaMenu) {
true); // Interstitial showing
// Simulate user clicking and holding on back button (crbug.com/37215).
- tab->controller().GoToOffset(-1);
+ tab->GetController().GoToOffset(-1);
// We should be back at the original good page.
EXPECT_FALSE(browser()->GetSelectedTabContents()->interstitial_page());
@@ -423,23 +423,23 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/google.html"));
TabContents* tab = browser()->GetSelectedTabContents();
- NavigationEntry* entry1 = tab->controller().GetActiveEntry();
+ NavigationEntry* entry1 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry1);
ui_test_utils::NavigateToURL(browser(),
test_server()->GetURL("files/ssl/blank_page.html"));
- NavigationEntry* entry2 = tab->controller().GetActiveEntry();
+ NavigationEntry* entry2 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry2);
// Now go back so that a page is in the forward history.
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
- tab->controller().GoBack();
+ content::Source<NavigationController>(&tab->GetController()));
+ tab->GetController().GoBack();
observer.Wait();
}
- ASSERT_TRUE(tab->controller().CanGoForward());
- NavigationEntry* entry3 = tab->controller().GetActiveEntry();
+ ASSERT_TRUE(tab->GetController().CanGoForward());
+ NavigationEntry* entry3 = tab->GetController().GetActiveEntry();
ASSERT_TRUE(entry1 == entry3);
// Now go to a bad HTTPS page that shows an interstitial.
@@ -452,16 +452,16 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestHTTPSExpiredCertAndGoForward) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
- tab->controller().GoToOffset(1);
+ content::Source<NavigationController>(&tab->GetController()));
+ tab->GetController().GoToOffset(1);
observer.Wait();
}
// We should be showing the second good page.
EXPECT_FALSE(browser()->GetSelectedTabContents()->interstitial_page());
CheckUnauthenticatedState(tab);
- EXPECT_FALSE(tab->controller().CanGoForward());
- NavigationEntry* entry4 = tab->controller().GetActiveEntry();
+ EXPECT_FALSE(tab->GetController().CanGoForward());
+ NavigationEntry* entry4 = tab->GetController().GetActiveEntry();
EXPECT_TRUE(entry2 == entry4);
}
@@ -1036,7 +1036,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1052,7 +1052,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('badHTTPSLink'));",
@@ -1078,8 +1078,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
- tab->controller().GoBack();
+ content::Source<NavigationController>(&tab->GetController()));
+ tab->GetController().GoBack();
observer.Wait();
}
CheckAuthenticatedState(tab, false);
@@ -1088,7 +1088,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('HTTPLink'));",
@@ -1104,8 +1104,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
{
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
- tab->controller().GoBack();
+ content::Source<NavigationController>(&tab->GetController()));
+ tab->GetController().GoBack();
observer.Wait();
}
CheckAuthenticatedState(tab, true);
@@ -1136,7 +1136,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, FLAKY_TestBadFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1173,7 +1173,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestUnauthenticatedFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('goodHTTPSLink'));",
@@ -1190,7 +1190,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestUnauthenticatedFrameNavigation) {
bool success = false;
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
EXPECT_TRUE(ui_test_utils::ExecuteJavaScriptAndExtractBool(
tab->GetRenderViewHost(), std::wstring(),
L"window.domAutomationController.send(clickLink('badHTTPSLink'));",
diff --git a/chrome/browser/tab_contents/background_contents.cc b/chrome/browser/tab_contents/background_contents.cc
index c153edb..134bfd5 100644
--- a/chrome/browser/tab_contents/background_contents.cc
+++ b/chrome/browser/tab_contents/background_contents.cc
@@ -33,7 +33,7 @@ BackgroundContents::BackgroundContents(SiteInstance* site_instance,
// TODO(rafaelw): Implement correct session storage.
tab_contents_.reset(new TabContents(
profile_, site_instance, routing_id, NULL, NULL));
- tab_contents_->set_view_type(chrome::VIEW_TYPE_BACKGROUND_CONTENTS);
+ tab_contents_->SetViewType(chrome::VIEW_TYPE_BACKGROUND_CONTENTS);
tab_contents_->SetDelegate(this);
TabContentsObserver::Observe(tab_contents_.get());
diff --git a/chrome/browser/tab_contents/render_view_context_menu.cc b/chrome/browser/tab_contents/render_view_context_menu.cc
index 933c175..6f22541 100644
--- a/chrome/browser/tab_contents/render_view_context_menu.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu.cc
@@ -1049,10 +1049,10 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
IncognitoModePrefs::GetAvailability(profile_->GetPrefs());
switch (id) {
case IDC_BACK:
- return source_tab_contents_->controller().CanGoBack();
+ return source_tab_contents_->GetController().CanGoBack();
case IDC_FORWARD:
- return source_tab_contents_->controller().CanGoForward();
+ return source_tab_contents_->GetController().CanGoForward();
case IDC_RELOAD:
return source_tab_contents_->GetDelegate() &&
@@ -1061,13 +1061,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_VIEW_SOURCE:
case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
- return source_tab_contents_->controller().CanViewSource();
+ return source_tab_contents_->GetController().CanViewSource();
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
return IsDevCommandEnabled(id);
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
- return source_tab_contents_->controller().GetActiveEntry() != NULL;
+ return source_tab_contents_->GetController().GetActiveEntry() != NULL;
case IDC_CONTENT_CONTEXT_TRANSLATE: {
TabContentsWrapper* tab_contents_wrapper =
@@ -1193,7 +1193,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
// rather than the display one (returned by GetURL) which may be
// different (like having "view-source:" on the front).
NavigationEntry* active_entry =
- source_tab_contents_->controller().GetActiveEntry();
+ source_tab_contents_->GetController().GetActiveEntry();
return SavePackage::IsSavableURL(
(active_entry) ? active_entry->url() : GURL());
}
@@ -1521,11 +1521,11 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
break;
case IDC_BACK:
- source_tab_contents_->controller().GoBack();
+ source_tab_contents_->GetController().GoBack();
break;
case IDC_FORWARD:
- source_tab_contents_->controller().GoForward();
+ source_tab_contents_->GetController().GoForward();
break;
case IDC_SAVE_PAGE:
@@ -1535,7 +1535,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
case IDC_RELOAD:
// Prevent the modal "Resubmit form post" dialog from appearing in the
// context of an external context menu.
- source_tab_contents_->controller().Reload(!external_);
+ source_tab_contents_->GetController().Reload(!external_);
break;
case IDC_PRINT:
@@ -1564,7 +1564,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
NavigationEntry* nav_entry =
- source_tab_contents_->controller().GetActiveEntry();
+ source_tab_contents_->GetController().GetActiveEntry();
source_tab_contents_->ShowPageInfo(nav_entry->url(), nav_entry->ssl(),
true);
break;
diff --git a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
index b198ab1..d0e3d27 100644
--- a/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
+++ b/chrome/browser/tab_contents/render_view_context_menu_browsertest.cc
@@ -44,7 +44,7 @@ class ContextMenuBrowserTest : public InProcessBrowserTest {
params.unfiltered_link_url = unfiltered_url;
params.link_url = url;
TabContents* tab_contents = browser()->GetSelectedTabContents();
- params.page_url = tab_contents->controller().GetActiveEntry()->url();
+ params.page_url = tab_contents->GetController().GetActiveEntry()->url();
#if defined(OS_MACOSX)
params.writing_direction_default = 0;
params.writing_direction_left_to_right = 0;
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
index 8422665..6674fa0 100644
--- a/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_gtk.cc
@@ -82,7 +82,7 @@ void WebDragBookmarkHandlerGtk::OnDrop() {
// Focus the target browser.
Browser* browser = Browser::GetBrowserForController(
- &tab_->tab_contents()->controller(), NULL);
+ &tab_->tab_contents()->GetController(), NULL);
if (browser)
browser->window()->Show();
}
diff --git a/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
index 765290e..6a2f2cb 100644
--- a/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
+++ b/chrome/browser/tab_contents/web_drag_bookmark_handler_mac.mm
@@ -49,7 +49,7 @@ void WebDragBookmarkHandlerMac::OnDrop() {
// Focus the target browser.
Browser* browser = Browser::GetBrowserForController(
- &tab_->tab_contents()->controller(), NULL);
+ &tab_->tab_contents()->GetController(), NULL);
if (browser)
browser->window()->Show();
}
diff --git a/chrome/browser/tab_contents/web_drop_target_win.cc b/chrome/browser/tab_contents/web_drop_target_win.cc
index b25e1fa..84b70ac3 100644
--- a/chrome/browser/tab_contents/web_drop_target_win.cc
+++ b/chrome/browser/tab_contents/web_drop_target_win.cc
@@ -229,7 +229,7 @@ DWORD WebDropTarget::OnDrop(IDataObject* data_object,
// Focus the target browser.
Browser* browser = Browser::GetBrowserForController(
- &tab_contents_->controller(), NULL);
+ &tab_contents_->GetController(), NULL);
if (browser)
browser->window()->Show();
diff --git a/chrome/browser/tabs/pinned_tab_codec.cc b/chrome/browser/tabs/pinned_tab_codec.cc
index eaa02da..7733708 100644
--- a/chrome/browser/tabs/pinned_tab_codec.cc
+++ b/chrome/browser/tabs/pinned_tab_codec.cc
@@ -54,9 +54,9 @@ static void EncodePinnedTab(TabStripModel* model,
values->Append(value.release());
} else {
NavigationEntry* entry =
- tab_contents->tab_contents()->controller().GetActiveEntry();
- if (!entry && tab_contents->tab_contents()->controller().entry_count())
- entry = tab_contents->tab_contents()->controller().GetEntryAtIndex(0);
+ tab_contents->tab_contents()->GetController().GetActiveEntry();
+ if (!entry && tab_contents->tab_contents()->GetController().entry_count())
+ entry = tab_contents->tab_contents()->GetController().GetEntryAtIndex(0);
if (entry) {
value->SetString(kURL, entry->url().spec());
values->Append(value.release());
diff --git a/chrome/browser/tabs/tab_finder.cc b/chrome/browser/tabs/tab_finder.cc
index b84fb1f..311552c9 100644
--- a/chrome/browser/tabs/tab_finder.cc
+++ b/chrome/browser/tabs/tab_finder.cc
@@ -207,7 +207,8 @@ void TabFinder::FetchRedirectStart(TabContents* tab) {
if (profile->IsOffTheRecord())
return;
- NavigationEntry* committed_entry = tab->controller().GetLastCommittedEntry();
+ NavigationEntry* committed_entry =
+ tab->GetController().GetLastCommittedEntry();
if (!committed_entry || committed_entry->url().is_empty())
return;
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 469e468..3a2be64 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -144,14 +144,14 @@ void TabStripModel::InsertTabContentsAt(int index,
ForgetAllOpeners();
}
// Anything opened by a link we deem to have an opener.
- data->SetGroup(&selected_contents->tab_contents()->controller());
+ data->SetGroup(&selected_contents->tab_contents()->GetController());
} else if ((add_types & ADD_INHERIT_OPENER) && selected_contents) {
if (active) {
// Forget any existing relationships, we don't want to make things too
// confusing by having multiple groups active at the same time.
ForgetAllOpeners();
}
- data->opener = &selected_contents->tab_contents()->controller();
+ data->opener = &selected_contents->tab_contents()->GetController();
}
contents_data_.insert(contents_data_.begin() + index, data);
@@ -175,7 +175,7 @@ TabContentsWrapper* TabStripModel::ReplaceTabContentsAt(
TabContentsWrapper* old_contents = GetContentsAt(index);
ForgetOpenersAndGroupsReferencing(
- &(old_contents->tab_contents()->controller()));
+ &(old_contents->tab_contents()->GetController()));
contents_data_[index]->contents = new_contents;
@@ -215,14 +215,14 @@ TabContentsWrapper* TabStripModel::DiscardTabContentsAt(int index) {
NULL /* session_storage_namespace */));
TabContentsWrapper* old_contents = GetContentsAt(index);
NavigationEntry* old_nav_entry =
- old_contents->tab_contents()->controller().GetActiveEntry();
+ old_contents->tab_contents()->GetController().GetActiveEntry();
if (old_nav_entry) {
// Set the new tab contents to reload this URL when clicked.
// This also allows the tab to keep drawing the favicon and page title.
NavigationEntry* new_nav_entry = new NavigationEntry(*old_nav_entry);
std::vector<NavigationEntry*> entries;
entries.push_back(new_nav_entry);
- null_contents->tab_contents()->controller().Restore(0, false, &entries);
+ null_contents->tab_contents()->GetController().Restore(0, false, &entries);
}
ReplaceTabContentsAt(index, null_contents);
// Mark the tab so it will reload when we click.
@@ -243,7 +243,7 @@ TabContentsWrapper* TabStripModel::DetachTabContentsAt(int index) {
delete contents_data_.at(index);
contents_data_.erase(contents_data_.begin() + index);
ForgetOpenersAndGroupsReferencing(
- &(removed_contents->tab_contents()->controller()));
+ &(removed_contents->tab_contents()->GetController()));
if (empty())
closing_all_ = true;
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
@@ -389,7 +389,7 @@ int TabStripModel::GetIndexOfController(
int index = 0;
TabContentsDataVector::const_iterator iter = contents_data_.begin();
for (; iter != contents_data_.end(); ++iter, ++index) {
- if (&(*iter)->contents->tab_contents()->controller() == controller)
+ if (&(*iter)->contents->tab_contents()->GetController() == controller)
return index;
}
return kNoTab;
@@ -846,7 +846,7 @@ void TabStripModel::ExecuteContextMenuCommand(
TabContentsWrapper* tab = GetTabContentsAt(indices[i]);
if (tab && tab->tab_contents()->GetDelegate()->CanReloadContents(
tab->tab_contents())) {
- tab->tab_contents()->controller().Reload(true);
+ tab->tab_contents()->GetController().Reload(true);
}
}
break;
@@ -1089,7 +1089,7 @@ void TabStripModel::GetIndicesWithSameOpener(int index,
NavigationController* opener = contents_data_[index]->group;
if (!opener) {
// If there is no group, find all tabs with the selected tab as the opener.
- opener = &(GetTabContentsAt(index)->tab_contents()->controller());
+ opener = &(GetTabContentsAt(index)->tab_contents()->GetController());
if (!opener)
return;
}
@@ -1097,7 +1097,7 @@ void TabStripModel::GetIndicesWithSameOpener(int index,
if (i == index)
continue;
if (contents_data_[i]->group == opener ||
- &(GetTabContentsAt(i)->tab_contents()->controller()) == opener) {
+ &(GetTabContentsAt(i)->tab_contents()->GetController()) == opener) {
indices->push_back(i);
}
}
@@ -1118,7 +1118,7 @@ bool TabStripModel::IsNewTabAtEndOfTabStrip(
return url.SchemeIs(chrome::kChromeUIScheme) &&
url.host() == chrome::kChromeUINewTabHost &&
contents == GetContentsAt(count() - 1) &&
- contents->tab_contents()->controller().entry_count() == 1;
+ contents->tab_contents()->GetController().entry_count() == 1;
}
bool TabStripModel::InternalCloseTabs(const std::vector<int>& in_indices,
diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.cc b/chrome/browser/tabs/tab_strip_model_order_controller.cc
index 5917dfa..cf3d7a6 100644
--- a/chrome/browser/tabs/tab_strip_model_order_controller.cc
+++ b/chrome/browser/tabs/tab_strip_model_order_controller.cc
@@ -40,7 +40,7 @@ int TabStripModelOrderController::DetermineInsertionIndex(
return tabstrip_->active_index() + delta;
}
NavigationController* opener =
- &tabstrip_->GetActiveTabContents()->tab_contents()->controller();
+ &tabstrip_->GetActiveTabContents()->tab_contents()->GetController();
// Get the index of the next item opened by this tab, and insert after
// it...
int index;
@@ -76,7 +76,7 @@ int TabStripModelOrderController::DetermineNewSelectedIndex(
// group of the removed tab.
NavigationController* removed_controller =
&tabstrip_->GetTabContentsAt(removing_index)->
- tab_contents()->controller();
+ tab_contents()->GetController();
// The parent opener should never be the same as the controller being removed.
DCHECK(parent_opener != removed_controller);
int index = tabstrip_->GetIndexOfNextTabContentsOpenedBy(removed_controller,
@@ -131,9 +131,9 @@ void TabStripModelOrderController::ActiveTabChanged(
if (user_gesture && new_opener != old_opener &&
((old_contents == NULL && new_opener == NULL) ||
- new_opener != &old_contents->tab_contents()->controller()) &&
+ new_opener != &old_contents->tab_contents()->GetController()) &&
((new_contents == NULL && old_opener == NULL) ||
- old_opener != &new_contents->tab_contents()->controller())) {
+ old_opener != &new_contents->tab_contents()->GetController())) {
tabstrip_->ForgetAllOpeners();
}
}
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index 71f464b..b592a34 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -584,9 +584,9 @@ TEST_F(TabStripModelTest, TestBasicAPI) {
EXPECT_EQ(0, tabstrip.GetIndexOfTabContents(contents2));
EXPECT_EQ(1, tabstrip.GetIndexOfTabContents(contents1));
EXPECT_EQ(0, tabstrip.GetIndexOfController(
- &contents2->tab_contents()->controller()));
+ &contents2->tab_contents()->GetController()));
EXPECT_EQ(1, tabstrip.GetIndexOfController(
- &contents1->tab_contents()->controller()));
+ &contents1->tab_contents()->GetController()));
}
// Test UpdateTabContentsStateAt
@@ -639,7 +639,8 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) {
// background with opener_contents set as their opener.
TabContentsWrapper* opener_contents = CreateTabContents();
- NavigationController* opener = &opener_contents->tab_contents()->controller();
+ NavigationController* opener =
+ &opener_contents->tab_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
TabContentsWrapper* contents1 = CreateTabContents();
TabContentsWrapper* contents2 = CreateTabContents();
@@ -677,7 +678,7 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) {
// For a tab that has opened no other tabs, the return value should always be
// -1...
- NavigationController* o1 = &contents1->tab_contents()->controller();
+ NavigationController* o1 = &contents1->tab_contents()->GetController();
EXPECT_EQ(-1, tabstrip.GetIndexOfNextTabContentsOpenedBy(o1, 3, false));
EXPECT_EQ(-1, tabstrip.GetIndexOfLastTabContentsOpenedBy(o1, 3));
@@ -790,7 +791,8 @@ TEST_F(TabStripModelTest, TestInsertionIndexDetermination) {
EXPECT_TRUE(tabstrip.empty());
TabContentsWrapper* opener_contents = CreateTabContents();
- NavigationController* opener = &opener_contents->tab_contents()->controller();
+ NavigationController* opener =
+ &opener_contents->tab_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
// Open some other random unrelated tab in the background to monkey with our
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index d0dcbda..f687db0 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -96,7 +96,7 @@ bool OptionsMenuModel::IsCommandIdEnabled(int command_id) const {
DCHECK(translate_infobar_delegate_->owner() != NULL);
DCHECK(translate_infobar_delegate_->owner()->tab_contents() != NULL);
NavigationEntry* entry = translate_infobar_delegate_->owner()->
- tab_contents()->controller().GetActiveEntry();
+ tab_contents()->GetController().GetActiveEntry();
// Delegate and tab contents should never be NULL, but active entry
// can be NULL when running tests. We want to return false if NULL.
return (entry != NULL) && !entry->url().SchemeIsSecure();
diff --git a/chrome/browser/translate/translate_infobar_delegate.cc b/chrome/browser/translate/translate_infobar_delegate.cc
index 65dbe1c..1439d25 100644
--- a/chrome/browser/translate/translate_infobar_delegate.cc
+++ b/chrome/browser/translate/translate_infobar_delegate.cc
@@ -399,6 +399,6 @@ TranslateInfoBarDelegate*
std::string TranslateInfoBarDelegate::GetPageHost() {
NavigationEntry* entry =
- owner()->tab_contents()->controller().GetActiveEntry();
+ owner()->tab_contents()->GetController().GetActiveEntry();
return entry ? entry->url().HostNoBrackets() : std::string();
}
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index abcf065..0d23440 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -400,7 +400,7 @@ void TranslateManager::OnURLFetchComplete(const content::URLFetcher* source) {
// The tab went away while we were retrieving the script.
continue;
}
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry || entry->page_id() != request.page_id) {
// We navigated away from the page the translation was triggered on.
continue;
@@ -466,7 +466,7 @@ void TranslateManager::InitiateTranslation(TabContents* tab,
if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableTranslate))
return;
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
// This can happen for popups created with window.open("").
return;
@@ -551,7 +551,7 @@ void TranslateManager::InitiateTranslationPosted(
void TranslateManager::TranslatePage(TabContents* tab_contents,
const std::string& source_lang,
const std::string& target_lang) {
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -583,7 +583,7 @@ void TranslateManager::TranslatePage(TabContents* tab_contents,
}
void TranslateManager::RevertTranslation(TabContents* tab_contents) {
- NavigationEntry* entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* entry = tab_contents->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
@@ -599,7 +599,7 @@ void TranslateManager::RevertTranslation(TabContents* tab_contents) {
void TranslateManager::ReportLanguageDetectionError(TabContents* tab_contents) {
UMA_HISTOGRAM_COUNTS("Translate.ReportLanguageDetectionError", 1);
- GURL page_url = tab_contents->controller().GetActiveEntry()->url();
+ GURL page_url = tab_contents->GetController().GetActiveEntry()->url();
// Report option should be disabled for secure URLs.
DCHECK(!page_url.SchemeIsSecure());
std::string report_error_url(kReportLanguageDetectionErrorURL);
@@ -629,7 +629,7 @@ void TranslateManager::DoTranslatePage(TabContents* tab,
const std::string& translate_script,
const std::string& source_lang,
const std::string& target_lang) {
- NavigationEntry* entry = tab->controller().GetActiveEntry();
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
if (!entry) {
NOTREACHED();
return;
diff --git a/chrome/browser/translate/translate_manager_browsertest.cc b/chrome/browser/translate/translate_manager_browsertest.cc
index 6447cf3..cb168fc 100644
--- a/chrome/browser/translate/translate_manager_browsertest.cc
+++ b/chrome/browser/translate/translate_manager_browsertest.cc
@@ -268,7 +268,7 @@ class NavEntryCommittedObserver : public content::NotificationObserver {
explicit NavEntryCommittedObserver(TabContents* tab_contents) {
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &tab_contents->controller()));
+ &tab_contents->GetController()));
}
virtual void Observe(int type,
@@ -305,7 +305,7 @@ class TestRenderViewContextMenu : public RenderViewContextMenu {
params.media_flags = 0;
params.spellcheck_enabled = false;
params.is_editable = false;
- params.page_url = tab_contents->controller().GetActiveEntry()->url();
+ params.page_url = tab_contents->GetController().GetActiveEntry()->url();
#if defined(OS_MACOSX)
params.writing_direction_default = 0;
params.writing_direction_left_to_right = 0;
@@ -708,9 +708,9 @@ TEST_F(TranslateManagerTest, ReloadFromLocationBar) {
// Create a pending navigation and simulate a page load. That should be the
// equivalent of typing the URL again in the location bar.
NavEntryCommittedObserver nav_observer(contents());
- contents()->controller().LoadURL(url, content::Referrer(),
- content::PAGE_TRANSITION_TYPED,
- std::string());
+ contents()->GetController().LoadURL(url, content::Referrer(),
+ content::PAGE_TRANSITION_TYPED,
+ std::string());
rvh()->SendNavigate(0, url);
// Test that we are really getting a same page navigation, the test would be
diff --git a/chrome/browser/translate/translate_tab_helper.cc b/chrome/browser/translate/translate_tab_helper.cc
index ba39a3c..dc00597 100644
--- a/chrome/browser/translate/translate_tab_helper.cc
+++ b/chrome/browser/translate/translate_tab_helper.cc
@@ -12,7 +12,7 @@
TranslateTabHelper::TranslateTabHelper(TabContents* tab_contents)
: TabContentsObserver(tab_contents),
- language_state_(&tab_contents->controller()) {
+ language_state_(&tab_contents->GetController()) {
}
TranslateTabHelper::~TranslateTabHelper() {
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 9bb0994..ae47d63 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -227,7 +227,7 @@ AutoLoginPrompter::AutoLoginPrompter(
args_(args) {
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab_contents_->controller()));
+ &tab_contents_->GetController()));
registrar_.Add(this, content::NOTIFICATION_TAB_CONTENTS_DESTROYED,
content::Source<TabContents>(tab_contents_));
}
@@ -333,7 +333,7 @@ void AutoLoginPrompter::Observe(int type,
InfoBarTabHelper* infobar_helper = wrapper->infobar_tab_helper();
Profile* profile = wrapper->profile();
infobar_helper->AddInfoBar(new AutoLoginInfoBarDelegate(
- infobar_helper, &tab_contents_->controller(),
+ infobar_helper, &tab_contents_->GetController(),
profile->GetTokenService(), profile->GetPrefs(),
username_, args_));
}
diff --git a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
index fc24f03..ac3b8d6 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -80,7 +80,8 @@ void BlockedContentTabHelper::AddPopup(TabContentsWrapper* new_contents,
// entry is the page to be loaded as we navigate away from the unloading
// page. For this reason, we can't use GetURL() to get the opener URL,
// because it returns the active entry.
- NavigationEntry* entry = tab_contents()->controller().GetLastCommittedEntry();
+ NavigationEntry* entry =
+ tab_contents()->GetController().GetLastCommittedEntry();
GURL creator = entry ? entry->virtual_url() : GURL::EmptyGURL();
Profile* profile =
Profile::FromBrowserContext(tab_contents()->browser_context());
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index 5e22dee..b4aa381 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -49,7 +49,7 @@ bool BookmarkTabHelper::ShouldShowBookmarkBar() {
// is very similar, but for non-first loads, we want to use the committed
// entry. This is so the bookmarks bar disappears at the same time the page
// does.
- if (tab_contents()->controller().GetLastCommittedEntry()) {
+ if (tab_contents()->GetController().GetLastCommittedEntry()) {
// Not the first load, always use the committed Web UI.
return CanShowBookmarkBar(tab_contents()->committed_web_ui());
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 9f2b127..d9ffe73 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1305,7 +1305,7 @@ TabContents* Browser::AddRestoredTab(
std::vector<NavigationEntry*> entries;
TabNavigation::CreateNavigationEntriesFromTabNavigations(
profile_, navigations, &entries);
- new_tab->controller().Restore(
+ new_tab->GetController().Restore(
selected_navigation, from_last_session, &entries);
DCHECK_EQ(0u, entries.size());
@@ -1328,7 +1328,7 @@ TabContents* Browser::AddRestoredTab(
// contains similar logic.
new_tab->GetView()->SizeContents(window_->GetRestoredBounds().size());
new_tab->HideContents();
- new_tab->controller().LoadIfNecessary();
+ new_tab->GetController().LoadIfNecessary();
}
SessionService* session_service =
SessionServiceFactory::GetForProfileIfExisting(profile_);
@@ -1355,7 +1355,7 @@ void Browser::ReplaceRestoredTab(
std::vector<NavigationEntry*> entries;
TabNavigation::CreateNavigationEntriesFromTabNavigations(
profile_, navigations, &entries);
- replacement->controller().Restore(
+ replacement->GetController().Restore(
selected_navigation, from_last_session, &entries);
DCHECK_EQ(0u, entries.size());
@@ -1371,7 +1371,7 @@ bool Browser::CanRestoreTab() {
bool Browser::NavigateToIndexWithDisposition(int index,
WindowOpenDisposition disp) {
NavigationController& controller =
- GetOrCloneTabForDisposition(disp)->controller();
+ GetOrCloneTabForDisposition(disp)->GetController();
if (index < 0 || index >= controller.entry_count())
return false;
controller.GoToIndex(index);
@@ -1500,7 +1500,7 @@ bool Browser::IsClosingPermitted() {
bool Browser::CanGoBack() const {
return GetSelectedTabContentsWrapper()->
- tab_contents()->controller().CanGoBack();
+ tab_contents()->GetController().CanGoBack();
}
void Browser::GoBack(WindowOpenDisposition disposition) {
@@ -1514,19 +1514,19 @@ void Browser::GoBack(WindowOpenDisposition disposition) {
if (current_tab->tab_contents()->showing_interstitial_page() &&
(new_tab != current_tab->tab_contents()))
return;
- new_tab->controller().GoBack();
+ new_tab->GetController().GoBack();
}
}
bool Browser::CanGoForward() const {
return GetSelectedTabContentsWrapper()->
- tab_contents()->controller().CanGoForward();
+ tab_contents()->GetController().CanGoForward();
}
void Browser::GoForward(WindowOpenDisposition disposition) {
content::RecordAction(UserMetricsAction("Forward"));
if (CanGoForward())
- GetOrCloneTabForDisposition(disposition)->controller().GoForward();
+ GetOrCloneTabForDisposition(disposition)->GetController().GoForward();
}
void Browser::Reload(WindowOpenDisposition disposition) {
@@ -1544,7 +1544,7 @@ void Browser::ReloadInternal(WindowOpenDisposition disposition,
// If we are showing an interstitial, treat this as an OpenURL.
TabContents* current_tab = GetSelectedTabContents();
if (current_tab && current_tab->showing_interstitial_page()) {
- NavigationEntry* entry = current_tab->controller().GetActiveEntry();
+ NavigationEntry* entry = current_tab->GetController().GetActiveEntry();
DCHECK(entry); // Should exist if interstitial is showing.
OpenURL(entry->url(), GURL(), disposition, content::PAGE_TRANSITION_RELOAD);
return;
@@ -1555,9 +1555,9 @@ void Browser::ReloadInternal(WindowOpenDisposition disposition,
if (!tab->FocusLocationBarByDefault())
tab->Focus();
if (ignore_cache)
- tab->controller().ReloadIgnoringCache(true);
+ tab->GetController().ReloadIgnoringCache(true);
else
- tab->controller().Reload(true);
+ tab->GetController().Reload(true);
}
void Browser::Home(WindowOpenDisposition disposition) {
@@ -2061,7 +2061,7 @@ void Browser::OpenCreateShortcutsDialog() {
"Menu item should be disabled.";
NavigationEntry* entry =
- current_tab->tab_contents()->controller().GetLastCommittedEntry();
+ current_tab->tab_contents()->GetController().GetLastCommittedEntry();
if (!entry)
return;
@@ -2175,7 +2175,7 @@ void Browser::ShowAboutConflictsTab() {
void Browser::ShowBrokenPageTab(TabContents* contents) {
content::RecordAction(UserMetricsAction("ReportBug"));
string16 page_title = contents->GetTitle();
- NavigationEntry* entry = contents->controller().GetActiveEntry();
+ NavigationEntry* entry = contents->GetController().GetActiveEntry();
if (!entry)
return;
std::string page_url = entry->url().spec();
@@ -3095,7 +3095,7 @@ TabContentsWrapper* Browser::CreateTabContentsForURL(
if (!defer_load) {
// Load the initial URL before adding the new tab contents to the tab strip
// so that the tab contents has navigation state.
- contents->tab_contents()->controller().LoadURL(
+ contents->tab_contents()->GetController().LoadURL(
url, referrer, transition, std::string());
}
@@ -3103,7 +3103,7 @@ TabContentsWrapper* Browser::CreateTabContentsForURL(
}
bool Browser::CanDuplicateContentsAt(int index) {
- NavigationController& nc = GetTabContentsAt(index)->controller();
+ NavigationController& nc = GetTabContentsAt(index)->GetController();
return nc.tab_contents() && nc.GetLastCommittedEntry();
}
@@ -3182,7 +3182,7 @@ void Browser::CreateHistoricalTab(TabContentsWrapper* contents) {
// We only create historical tab entries for tabbed browser windows.
if (service && CanSupportWindowFeature(FEATURE_TABSTRIP)) {
- service->CreateHistoricalTab(&contents->tab_contents()->controller(),
+ service->CreateHistoricalTab(&contents->tab_contents()->GetController(),
tab_handler_->GetTabStripModel()->GetIndexOfTabContents(contents));
}
}
@@ -3274,7 +3274,7 @@ void Browser::TabClosingAt(TabStripModel* tab_strip_model,
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(
- &contents->tab_contents()->controller()),
+ &contents->tab_contents()->GetController()),
content::NotificationService::NoDetails());
// Sever the TabContents' connection back to us.
@@ -3372,11 +3372,11 @@ void Browser::TabReplacedAt(TabStripModel* tab_strip_model,
TabInsertedAt(new_contents, index,
(index == tab_handler_->GetTabStripModel()->active_index()));
- int entry_count = new_contents->tab_contents()->controller().entry_count();
+ int entry_count = new_contents->tab_contents()->GetController().entry_count();
if (entry_count > 0) {
// Send out notification so that observers are updated appropriately.
- new_contents->tab_contents()->controller().NotifyEntryChanged(
- new_contents->tab_contents()->controller().GetEntryAtIndex(
+ new_contents->tab_contents()->GetController().NotifyEntryChanged(
+ new_contents->tab_contents()->GetController().GetEntryAtIndex(
entry_count - 1),
entry_count - 1);
}
@@ -3544,7 +3544,7 @@ void Browser::LoadingStateChanged(TabContents* source) {
// last committed entry is not NULL. Last committed entry could be NULL
// when an interstitial page is injected (e.g. bad https certificate,
// malware site etc). When this happens, we abort the shortcut update.
- NavigationEntry* entry = source->controller().GetLastCommittedEntry();
+ NavigationEntry* entry = source->GetController().GetLastCommittedEntry();
if (entry) {
TabContentsWrapper::GetCurrentWrapperForContents(source)->
extension_tab_helper()->GetApplicationInfo(entry->page_id());
@@ -3645,7 +3645,7 @@ bool Browser::IsApplication() const {
}
void Browser::ConvertContentsToApplication(TabContents* contents) {
- const GURL& url = contents->controller().GetActiveEntry()->url();
+ const GURL& url = contents->GetController().GetActiveEntry()->url();
std::string app_name = web_app::GenerateApplicationNameFromURL(url);
DetachContents(contents);
@@ -3763,7 +3763,7 @@ void Browser::OnStartDownload(TabContents* source,
}
// If the download occurs in a new tab, close it.
- if (source->controller().IsInitialNavigation() && tab_count() > 1)
+ if (source->GetController().IsInitialNavigation() && tab_count() > 1)
CloseContents(source);
}
@@ -3990,7 +3990,7 @@ void Browser::OnDidGetApplicationInfo(TabContentsWrapper* source,
return;
NavigationEntry* entry =
- source->tab_contents()->controller().GetLastCommittedEntry();
+ source->tab_contents()->GetController().GetLastCommittedEntry();
if (!entry || (entry->page_id() != page_id))
return;
@@ -4101,7 +4101,7 @@ void Browser::Observe(int type,
// actually be for a different window while we're doing asynchronous
// closing of this one.
if (GetSelectedTabContents() &&
- &GetSelectedTabContents()->controller() ==
+ &GetSelectedTabContents()->GetController() ==
content::Source<NavigationController>(source).ptr())
UpdateToolbar(false);
break;
@@ -4581,7 +4581,7 @@ void Browser::UpdateCommandsForTabState() {
return;
// Navigation commands
- NavigationController& nc = current_tab->controller();
+ NavigationController& nc = current_tab->GetController();
command_updater_.UpdateCommandEnabled(IDC_BACK, nc.CanGoBack());
command_updater_.UpdateCommandEnabled(IDC_FORWARD, nc.CanGoForward());
command_updater_.UpdateCommandEnabled(IDC_RELOAD,
@@ -4597,7 +4597,7 @@ void Browser::UpdateCommandsForTabState() {
window_->SetStarredState(
current_tab_wrapper->bookmark_tab_helper()->is_starred());
command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
- current_tab->controller().CanViewSource());
+ current_tab->GetController().CanViewSource());
command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION,
toolbar_model_.ShouldDisplayURL() && current_tab->GetURL().is_valid());
if (is_devtools())
@@ -4753,7 +4753,7 @@ void Browser::ScheduleUIUpdate(const TabContents* source,
// this for any tab so they start & stop quickly.
tab_handler_->GetTabStripModel()->UpdateTabContentsStateAt(
tab_handler_->GetTabStripModel()->GetIndexOfController(
- &source->controller()),
+ &source->GetController()),
TabStripModelObserver::LOADING_ONLY);
// The status bubble needs to be updated during INVALIDATE_LOAD too, but
// we do that asynchronously by not stripping INVALIDATE_LOAD from
@@ -4767,7 +4767,7 @@ void Browser::ScheduleUIUpdate(const TabContents* source,
// asynchronously.
tab_handler_->GetTabStripModel()->UpdateTabContentsStateAt(
tab_handler_->GetTabStripModel()->GetIndexOfController(
- &source->controller()),
+ &source->GetController()),
TabStripModelObserver::TITLE_NOT_LOADING);
}
@@ -5175,7 +5175,7 @@ bool Browser::OpenInstant(WindowOpenDisposition disposition) {
// HideInstant is invoked after release so that InstantController is not
// active when HideInstant asks it for its state.
HideInstant();
- preview_contents->tab_contents()->controller().PruneAllButActive();
+ preview_contents->tab_contents()->GetController().PruneAllButActive();
tab_handler_->GetTabStripModel()->AddTabContents(
preview_contents,
-1,
@@ -5207,7 +5207,7 @@ void Browser::ViewSource(TabContentsWrapper* contents) {
DCHECK(contents);
NavigationEntry* active_entry =
- contents->tab_contents()->controller().GetActiveEntry();
+ contents->tab_contents()->GetController().GetActiveEntry();
if (!active_entry)
return;
@@ -5221,9 +5221,9 @@ void Browser::ViewSource(TabContentsWrapper* contents,
DCHECK(contents);
TabContentsWrapper* view_source_contents = contents->Clone();
- view_source_contents->tab_contents()->controller().PruneAllButActive();
+ view_source_contents->tab_contents()->GetController().PruneAllButActive();
NavigationEntry* active_entry =
- view_source_contents->tab_contents()->controller().GetActiveEntry();
+ view_source_contents->tab_contents()->GetController().GetActiveEntry();
if (!active_entry)
return;
@@ -5277,7 +5277,8 @@ int Browser::GetContentRestrictionsForSelectedTab() {
TabContents* current_tab = GetSelectedTabContents();
if (current_tab) {
content_restrictions = current_tab->content_restrictions();
- NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
+ NavigationEntry* active_entry =
+ current_tab->GetController().GetActiveEntry();
// See comment in UpdateCommandsForTabState about why we call url().
if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())
|| current_tab->showing_interstitial_page())
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 91bedf1..4bbfe20 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -398,9 +398,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
EXPECT_TRUE(newtab);
EXPECT_NE(oldtab, newtab);
nav_observer.Wait();
- ASSERT_TRUE(newtab->controller().GetLastCommittedEntry());
+ ASSERT_TRUE(newtab->GetController().GetLastCommittedEntry());
EXPECT_EQ(https_url.spec(),
- newtab->controller().GetLastCommittedEntry()->url().spec());
+ newtab->GetController().GetLastCommittedEntry()->url().spec());
// Popup window should not be in the opener's process.
content::RenderProcessHost* popup_process =
@@ -432,9 +432,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, NullOpenerRedirectForksProcess) {
EXPECT_TRUE(newtab2);
EXPECT_NE(oldtab, newtab2);
nav_observer2.Wait();
- ASSERT_TRUE(newtab2->controller().GetLastCommittedEntry());
+ ASSERT_TRUE(newtab2->GetController().GetLastCommittedEntry());
EXPECT_EQ(https_url.spec(),
- newtab2->controller().GetLastCommittedEntry()->url().spec());
+ newtab2->GetController().GetLastCommittedEntry()->url().spec());
// This popup window should also not be in the opener's process.
content::RenderProcessHost* popup_process2 =
@@ -485,9 +485,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
EXPECT_TRUE(newtab);
EXPECT_NE(oldtab, newtab);
nav_observer.Wait();
- ASSERT_TRUE(newtab->controller().GetLastCommittedEntry());
+ ASSERT_TRUE(newtab->GetController().GetLastCommittedEntry());
EXPECT_EQ(https_url.spec(),
- newtab->controller().GetLastCommittedEntry()->url().spec());
+ newtab->GetController().GetLastCommittedEntry()->url().spec());
// Popup window should still be in the opener's process.
content::RenderProcessHost* popup_process =
@@ -505,9 +505,9 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, OtherRedirectsDontForkProcess) {
oldtab->GetRenderViewHost()->
ExecuteJavascriptInWebFrame(string16(), ASCIIToUTF16(navigate_str));
nav_observer2.Wait();
- ASSERT_TRUE(oldtab->controller().GetLastCommittedEntry());
+ ASSERT_TRUE(oldtab->GetController().GetLastCommittedEntry());
EXPECT_EQ(https_url.spec(),
- oldtab->controller().GetLastCommittedEntry()->url().spec());
+ oldtab->GetController().GetLastCommittedEntry()->url().spec());
// Original window should still be in the original process.
content::RenderProcessHost* new_process = newtab->GetRenderProcessHost();
@@ -662,7 +662,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest,
ui_test_utils::NavigateToURL(browser(), url);
NavigationEntry* entry = browser()->GetSelectedTabContents()->
- controller().GetActiveEntry();
+ GetController().GetActiveEntry();
EXPECT_EQ(expected_favicon_url.spec(), entry->favicon().url().spec());
}
@@ -682,7 +682,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, MAYBE_FaviconChange) {
ui_test_utils::NavigateToURL(browser(), file_url);
NavigationEntry* entry = browser()->GetSelectedTabContents()->
- controller().GetActiveEntry();
+ GetController().GetActiveEntry();
static const FilePath::CharType* kIcon =
FILE_PATH_LITERAL("test1.png");
GURL expected_favicon_url(
@@ -1151,7 +1151,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) {
ui_test_utils::WindowedNotificationObserver back_nav_load_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContents()->controller()));
+ &browser()->GetSelectedTabContents()->GetController()));
browser()->GoBack(CURRENT_TAB);
back_nav_load_observer.Wait();
EXPECT_TRUE(browser()->command_updater()->IsCommandEnabled(IDC_FORWARD));
@@ -1159,7 +1159,7 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, ForwardDisabledOnForward) {
ui_test_utils::WindowedNotificationObserver forward_nav_load_observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContents()->controller()));
+ &browser()->GetSelectedTabContents()->GetController()));
browser()->GoForward(CURRENT_TAB);
// This check will happen before the navigation completes, since the browser
// won't process the renderer's response until the Wait() call below.
diff --git a/chrome/browser/ui/browser_navigator.cc b/chrome/browser/ui/browser_navigator.cc
index 84a673f..c4a6aec 100644
--- a/chrome/browser/ui/browser_navigator.cc
+++ b/chrome/browser/ui/browser_navigator.cc
@@ -247,19 +247,19 @@ void LoadURLInContents(TabContents* target_contents,
browser::NavigateParams* params,
const std::string& extra_headers) {
if (params->transferred_global_request_id != GlobalRequestID()) {
- target_contents->controller().TransferURL(
+ target_contents->GetController().TransferURL(
url,
params->referrer,
params->transition, extra_headers,
params->transferred_global_request_id,
params->is_renderer_initiated);
} else if (params->is_renderer_initiated) {
- target_contents->controller().LoadURLFromRenderer(
+ target_contents->GetController().LoadURLFromRenderer(
url,
params->referrer,
params->transition, extra_headers);
} else {
- target_contents->controller().LoadURL(
+ target_contents->GetController().LoadURL(
url,
params->referrer,
params->transition, extra_headers);
@@ -569,7 +569,7 @@ void Navigate(NavigateParams* params) {
TabContents* target = params->browser->GetTabContentsAt(singleton_index);
if (target->is_crashed()) {
- target->controller().Reload(true);
+ target->GetController().Reload(true);
} else if (params->path_behavior == NavigateParams::IGNORE_AND_NAVIGATE &&
target->GetURL() != params->url) {
InitializeExtraHeaders(params, NULL, &extra_headers);
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index cf43749..b215f1a 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -187,7 +187,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
NavigationEntry* entry =
- tabContents_->tab_contents()->controller().GetActiveEntry();
+ tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry) {
return nil;
}
@@ -211,7 +211,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
NavigationEntry* entry =
- tabContents_->tab_contents()->controller().GetActiveEntry();
+ tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry)
return;
@@ -226,7 +226,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
- (NSString*)title {
NavigationEntry* entry =
- tabContents_->tab_contents()->controller().GetActiveEntry();
+ tabContents_->tab_contents()->GetController().GetActiveEntry();
if (!entry)
return nil;
@@ -305,21 +305,21 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
- (void)handlesGoBackScriptCommand:(NSScriptCommand*)command {
NavigationController& navigationController =
- tabContents_->tab_contents()->controller();
+ tabContents_->tab_contents()->GetController();
if (navigationController.CanGoBack())
navigationController.GoBack();
}
- (void)handlesGoForwardScriptCommand:(NSScriptCommand*)command {
NavigationController& navigationController =
- tabContents_->tab_contents()->controller();
+ tabContents_->tab_contents()->GetController();
if (navigationController.CanGoForward())
navigationController.GoForward();
}
- (void)handlesReloadScriptCommand:(NSScriptCommand*)command {
NavigationController& navigationController =
- tabContents_->tab_contents()->controller();
+ tabContents_->tab_contents()->GetController();
const bool checkForRepost = true;
navigationController.Reload(checkForRepost);
}
@@ -388,7 +388,7 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
- (void)handlesViewSourceScriptCommand:(NSScriptCommand*)command {
NavigationEntry* entry =
- tabContents_->tab_contents()->controller().GetLastCommittedEntry();
+ tabContents_->tab_contents()->GetController().GetLastCommittedEntry();
if (entry) {
tabContents_->tab_contents()->OpenURL(
GURL(chrome::kViewSourceScheme + std::string(":") +
diff --git a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
index 426d959..29494e7 100644
--- a/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
+++ b/chrome/browser/ui/cocoa/constrained_html_delegate_mac.mm
@@ -105,10 +105,10 @@ ConstrainedHtmlDelegateMac::ConstrainedHtmlDelegateMac(
ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
tab_contents->GetPropertyBag(), this);
- tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab_contents->GetController().LoadURL(delegate->GetDialogContentURL(),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
// Create NSWindow to hold tab_contents in the constrained sheet:
gfx::Size size;
diff --git a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
index 694afe5f..f1daf98 100644
--- a/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
+++ b/chrome/browser/ui/cocoa/html_dialog_window_controller.mm
@@ -298,11 +298,11 @@ void HtmlDialogWindowDelegateBridge::HandleKeyboardEvent(
HtmlDialogUI::GetPropertyAccessor().SetProperty(
contentsWrapper_->tab_contents()->GetPropertyBag(), delegate_.get());
- contentsWrapper_->tab_contents()->controller().LoadURL(
- delegate_->GetDialogContentURL(),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ contentsWrapper_->tab_contents()->GetController().LoadURL(
+ delegate_->GetDialogContentURL(),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
// TODO(akalin): add accelerator for ESC to close the dialog box.
//
diff --git a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
index 195386b..bcf4086 100644
--- a/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
+++ b/chrome/browser/ui/cocoa/location_bar/location_icon_decoration.mm
@@ -93,7 +93,7 @@ bool LocationIconDecoration::OnMousePressed(NSRect frame) {
return true;
TabContents* tab = owner_->GetTabContents();
- NavigationEntry* nav_entry = tab->controller().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return true;
diff --git a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
index 54ac791..d60c92d 100644
--- a/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
+++ b/chrome/browser/ui/cocoa/notifications/balloon_controller.mm
@@ -176,7 +176,7 @@ const int kRightMargin = 2;
- (void)updateContents {
DCHECK(htmlContents_.get()) << "BalloonView::Update called before Show";
if (htmlContents_->tab_contents()) {
- htmlContents_->tab_contents()->controller().LoadURL(
+ htmlContents_->tab_contents()->GetController().LoadURL(
balloon_->notification().content_url(), content::Referrer(),
content::PAGE_TRANSITION_LINK, std::string());
}
diff --git a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
index 4b4aa77..a5f5a4d 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -66,7 +66,7 @@ void TabContentsNotificationBridge::ChangeTabContents(TabContents* contents) {
registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(&contents->controller()));
+ content::Source<NavigationController>(&contents->GetController()));
}
}
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 97c0917..a5988c6 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -1178,7 +1178,7 @@ private:
if (oldContents) {
int oldModelIndex = browser_->GetIndexOfController(
- &(oldContents->tab_contents()->controller()));
+ &(oldContents->tab_contents()->GetController()));
if (oldModelIndex != -1) { // When closing a tab, the old tab may be gone.
NSInteger oldIndex = [self indexFromModelIndex:oldModelIndex];
TabContentsController* oldController =
diff --git a/chrome/browser/ui/collected_cookies_infobar_delegate.cc b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
index 0bd0d4f..75fad89 100644
--- a/chrome/browser/ui/collected_cookies_infobar_delegate.cc
+++ b/chrome/browser/ui/collected_cookies_infobar_delegate.cc
@@ -41,6 +41,6 @@ string16 CollectedCookiesInfoBarDelegate::GetButtonLabel(
}
bool CollectedCookiesInfoBarDelegate::Accept() {
- owner()->tab_contents()->controller().Reload(true);
+ owner()->tab_contents()->GetController().Reload(true);
return true;
}
diff --git a/chrome/browser/ui/find_bar/find_bar_controller.cc b/chrome/browser/ui/find_bar/find_bar_controller.cc
index 19e9e1f8..7a3abd9 100644
--- a/chrome/browser/ui/find_bar/find_bar_controller.cc
+++ b/chrome/browser/ui/find_bar/find_bar_controller.cc
@@ -93,7 +93,7 @@ void FindBarController::ChangeTabContents(TabContentsWrapper* contents) {
this,
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<NavigationController>(
- &tab_contents_->tab_contents()->controller()));
+ &tab_contents_->tab_contents()->GetController()));
MaybeSetPrepopulateText();
@@ -133,7 +133,7 @@ void FindBarController::Observe(int type,
} else if (type == content::NOTIFICATION_NAV_ENTRY_COMMITTED) {
NavigationController* source_controller =
content::Source<NavigationController>(source).ptr();
- if (source_controller == &tab_contents_->tab_contents()->controller()) {
+ if (source_controller == &tab_contents_->tab_contents()->GetController()) {
content::LoadCommittedDetails* commit_details =
content::Details<content::LoadCommittedDetails>(details).ptr();
content::PageTransition transition_type =
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 acbcb2f..a77db9c 100644
--- a/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
+++ b/chrome/browser/ui/find_bar/find_bar_host_browsertest.cc
@@ -589,7 +589,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, FindDisappearOnNavigate) {
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()));
+ GetController()));
browser()->Reload(CURRENT_TAB);
observer.Wait();
@@ -1115,7 +1115,7 @@ IN_PROC_BROWSER_TEST_F(FindInPageControllerTest, ActivateLinkNavigatesPage) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &tab->tab_contents()->controller()));
+ &tab->tab_contents()->GetController()));
tab->find_tab_helper()->StopFinding(FindBarController::kActivateSelection);
observer.Wait();
}
diff --git a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
index 50de533..6701c7f 100644
--- a/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
+++ b/chrome/browser/ui/gtk/constrained_html_delegate_gtk.cc
@@ -108,10 +108,10 @@ ConstrainedHtmlDelegateGtk::ConstrainedHtmlDelegateGtk(
ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
tab_contents->GetPropertyBag(), this);
- tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab_contents->GetController().LoadURL(delegate->GetDialogContentURL(),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
tab_contents_container_.SetTab(tab_.get());
gfx::Size dialog_size;
diff --git a/chrome/browser/ui/gtk/html_dialog_gtk.cc b/chrome/browser/ui/gtk/html_dialog_gtk.cc
index f1059a8..405bbd7 100644
--- a/chrome/browser/ui/gtk/html_dialog_gtk.cc
+++ b/chrome/browser/ui/gtk/html_dialog_gtk.cc
@@ -179,7 +179,7 @@ gfx::NativeWindow HtmlDialogGtk::InitDialog() {
HtmlDialogUI::GetPropertyAccessor().SetProperty(
tab_->tab_contents()->GetPropertyBag(), this);
- tab_->tab_contents()->controller().LoadURL(
+ tab_->tab_contents()->GetController().LoadURL(
GetDialogContentURL(),
content::Referrer(),
content::PAGE_TRANSITION_START_PAGE,
diff --git a/chrome/browser/ui/gtk/location_bar_view_gtk.cc b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
index dbc4c28..c5d94e0 100644
--- a/chrome/browser/ui/gtk/location_bar_view_gtk.cc
+++ b/chrome/browser/ui/gtk/location_bar_view_gtk.cc
@@ -1044,7 +1044,7 @@ gboolean LocationBarViewGtk::OnIconReleased(GtkWidget* sender,
if (event->x == 0 && event->y == 0)
return FALSE;
- NavigationEntry* nav_entry = tab->controller().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return FALSE;
diff --git a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
index 4c588bf..475e0cf 100644
--- a/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
+++ b/chrome/browser/ui/gtk/notifications/balloon_view_gtk.cc
@@ -348,7 +348,7 @@ void BalloonViewImpl::Update() {
DCHECK(html_contents_.get()) << "BalloonView::Update called before Show";
if (!html_contents_->tab_contents())
return;
- html_contents_->tab_contents()->controller().LoadURL(
+ html_contents_->tab_contents()->GetController().LoadURL(
balloon_->notification().content_url(), content::Referrer(),
content::PAGE_TRANSITION_LINK, std::string());
}
diff --git a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
index 9f0067b..0cee824 100644
--- a/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
+++ b/chrome/browser/ui/gtk/web_intent_picker_gtk.cc
@@ -253,7 +253,7 @@ TabContents* WebIntentPickerGtk::SetInlineDisposition(const GURL& url) {
tab_contents_container_.reset(new TabContentsContainerGtk(NULL));
tab_contents_container_->SetTab(inline_disposition_tab_contents_.get());
- inline_disposition_tab_contents_->tab_contents()->controller().LoadURL(
+ inline_disposition_tab_contents_->tab_contents()->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
std::string());
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index 39ebd40..d71479b 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -116,7 +116,7 @@ WebIntentPickerController::WebIntentPickerController(
picker_(NULL),
pending_async_count_(0),
service_tab_(NULL) {
- NavigationController* controller = &wrapper->tab_contents()->controller();
+ NavigationController* controller = &wrapper->tab_contents()->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
@@ -213,7 +213,7 @@ void WebIntentPickerController::OnSendReturnMessage() {
if (service_tab_) {
int index = TabStripModel::kNoTab;
Browser* browser = Browser::GetBrowserForController(
- &service_tab_->controller(), &index);
+ &service_tab_->GetController(), &index);
if (browser) {
browser->tabstrip_model()->CloseTabContentsAt(
index, TabStripModel::CLOSE_CREATE_HISTORICAL_TAB);
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index ed351c1..09c76f9 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -282,7 +282,7 @@ void LoginHandler::NotifyAuthNeeded() {
TabContents* requesting_contents = GetTabContentsForLogin();
if (requesting_contents)
- controller = &requesting_contents->controller();
+ controller = &requesting_contents->GetController();
LoginNotificationDetails details(this);
@@ -301,7 +301,7 @@ void LoginHandler::NotifyAuthCancelled() {
TabContents* requesting_contents = GetTabContentsForLogin();
if (requesting_contents)
- controller = &requesting_contents->controller();
+ controller = &requesting_contents->GetController();
LoginNotificationDetails details(this);
@@ -321,7 +321,7 @@ void LoginHandler::NotifyAuthSupplied(const string16& username,
content::NotificationService* service =
content::NotificationService::current();
- NavigationController* controller = &requesting_contents->controller();
+ NavigationController* controller = &requesting_contents->GetController();
AuthSuppliedLoginNotificationDetails details(this, username, password);
service->Notify(
diff --git a/chrome/browser/ui/login/login_prompt_browsertest.cc b/chrome/browser/ui/login/login_prompt_browsertest.cc
index 5917fc7..ba8dcea 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -241,7 +241,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, PrefetchAuthCancels) {
TabContentsWrapper* contents =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -267,7 +267,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -362,7 +362,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmCancellation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -414,7 +414,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmConfirmation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -466,7 +466,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, IncorrectConfirmation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -537,7 +537,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, NoLoginPromptForFavicon) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -592,7 +592,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, BlockCrossdomainPrompt) {
TabContentsWrapper* contents = browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
@@ -658,7 +658,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_1);
NavigationController* controller_1 =
- &contents_1->tab_contents()->controller();
+ &contents_1->tab_contents()->GetController();
// Open a new tab.
ui_test_utils::NavigateToURLWithDisposition(
@@ -673,7 +673,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) {
ASSERT_TRUE(contents_2);
ASSERT_NE(contents_1, contents_2);
NavigationController* controller_2 =
- &contents_2->tab_contents()->controller();
+ &contents_2->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller_1));
@@ -726,7 +726,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_1);
NavigationController* controller_1 =
- &contents_1->tab_contents()->controller();
+ &contents_1->tab_contents()->GetController();
// Open a new tab.
ui_test_utils::NavigateToURLWithDisposition(
@@ -741,7 +741,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) {
ASSERT_TRUE(contents_2);
ASSERT_NE(contents_1, contents_2);
NavigationController* controller_2 =
- &contents_2->tab_contents()->controller();
+ &contents_2->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller_1));
@@ -794,7 +794,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
TabContentsWrapper* contents =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->tab_contents()->controller();
+ NavigationController* controller = &contents->tab_contents()->GetController();
// Open an incognito window.
Browser* browser_incognito = CreateIncognitoBrowser();
@@ -805,7 +805,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
ASSERT_TRUE(contents_incognito);
ASSERT_NE(contents, contents_incognito);
NavigationController* controller_incognito =
- &contents_incognito->tab_contents()->controller();
+ &contents_incognito->tab_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<NavigationController>(controller));
diff --git a/chrome/browser/ui/pdf/pdf_browsertest.cc b/chrome/browser/ui/pdf/pdf_browsertest.cc
index 0061627..1d9d768 100644
--- a/chrome/browser/ui/pdf/pdf_browsertest.cc
+++ b/chrome/browser/ui/pdf/pdf_browsertest.cc
@@ -282,7 +282,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, FLAKY_SLOW_Loading) {
ASSERT_TRUE(pdf_test_server()->Start());
NavigationController* controller =
- &(browser()->GetSelectedTabContents()->controller());
+ &(browser()->GetSelectedTabContents()->GetController());
content::NotificationRegistrar registrar;
registrar.Add(this,
content::NOTIFICATION_LOAD_STOP,
@@ -348,7 +348,7 @@ IN_PROC_BROWSER_TEST_F(PDFBrowserTest, MAYBE_OnLoadAndReload) {
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &browser()->GetSelectedTabContents()->controller()));
+ &browser()->GetSelectedTabContents()->GetController()));
ASSERT_TRUE(ui_test_utils::ExecuteJavaScript(
browser()->GetSelectedTabContents()->GetRenderViewHost(),
std::wstring(),
diff --git a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
index 278008c..5ba0c11 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
@@ -86,7 +86,7 @@ void SearchEngineTabHelper::OnPageHasOSDD(
return;
}
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
const NavigationEntry* entry = controller.GetLastCommittedEntry();
DCHECK(entry);
@@ -136,7 +136,7 @@ void SearchEngineTabHelper::GenerateKeywordIfNecessary(
if (profile->IsOffTheRecord())
return;
- const NavigationController& controller = tab_contents()->controller();
+ const NavigationController& controller = tab_contents()->GetController();
int last_index = controller.last_committed_entry_index();
// When there was no previous page, the last index will be 0. This is
// normally due to a form submit that opened in a new tab.
diff --git a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
index 65d66a5..4e9cee3 100644
--- a/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
+++ b/chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc
@@ -46,28 +46,29 @@ const std::string& TabContentsWrapperSyncedTabDelegate::GetExtensionAppId()
}
int TabContentsWrapperSyncedTabDelegate::GetCurrentEntryIndex() const {
- return tab_contents_wrapper_->tab_contents()->controller().
+ return tab_contents_wrapper_->tab_contents()->GetController().
GetCurrentEntryIndex();
}
int TabContentsWrapperSyncedTabDelegate::GetEntryCount() const {
- return tab_contents_wrapper_->tab_contents()->controller().entry_count();
+ return tab_contents_wrapper_->tab_contents()->GetController().entry_count();
}
int TabContentsWrapperSyncedTabDelegate::GetPendingEntryIndex() const {
- return tab_contents_wrapper_->tab_contents()->controller().
+ return tab_contents_wrapper_->tab_contents()->GetController().
pending_entry_index();
}
NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetPendingEntry() const {
- return tab_contents_wrapper_->tab_contents()->controller().pending_entry();
+ return tab_contents_wrapper_->tab_contents()->GetController().pending_entry();
}
NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetEntryAtIndex(int i)
const {
- return tab_contents_wrapper_->tab_contents()->controller().GetEntryAtIndex(i);
+ return
+ tab_contents_wrapper_->tab_contents()->GetController().GetEntryAtIndex(i);
}
NavigationEntry* TabContentsWrapperSyncedTabDelegate::GetActiveEntry() const {
- return tab_contents_wrapper_->tab_contents()->controller().GetActiveEntry();
+ return tab_contents_wrapper_->tab_contents()->GetController().GetActiveEntry();
}
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
index f2b3590..4b97bb4 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
@@ -15,7 +15,7 @@ TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate(
TabContents* tab_contents)
: window_(NULL),
closing_(false) {
- NavigationController* controller = &tab_contents->controller();
+ NavigationController* controller = &tab_contents->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
content::Source<NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model.cc b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
index 0fdd356..fbea791 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -289,10 +289,10 @@ int BackForwardMenuModel::GetHistoryItemCount() const {
if (model_type_ == FORWARD_MENU) {
// Only count items from n+1 to end (if n is current entry)
- items = contents->controller().entry_count() -
- contents->controller().GetCurrentEntryIndex() - 1;
+ items = contents->GetController().entry_count() -
+ contents->GetController().GetCurrentEntryIndex() - 1;
} else {
- items = contents->controller().GetCurrentEntryIndex();
+ items = contents->GetController().GetCurrentEntryIndex();
}
if (items > kMaxHistoryItems)
@@ -307,7 +307,7 @@ int BackForwardMenuModel::GetChapterStopCount(int history_items) const {
TabContents* contents = GetTabContents();
int chapter_stops = 0;
- int current_entry = contents->controller().GetCurrentEntryIndex();
+ int current_entry = contents->GetController().GetCurrentEntryIndex();
if (history_items == kMaxHistoryItems) {
int chapter_id = current_entry;
@@ -331,7 +331,7 @@ int BackForwardMenuModel::GetChapterStopCount(int history_items) const {
int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from,
bool forward) const {
TabContents* contents = GetTabContents();
- NavigationController& controller = contents->controller();
+ NavigationController& controller = contents->GetController();
int max_count = controller.entry_count();
if (start_from < 0 || start_from >= max_count)
@@ -383,7 +383,7 @@ int BackForwardMenuModel::FindChapterStop(int offset,
offset *= -1;
TabContents* contents = GetTabContents();
- int entry = contents->controller().GetCurrentEntryIndex() + offset;
+ int entry = contents->GetController().GetCurrentEntryIndex() + offset;
for (int i = 0; i < skip + 1; i++)
entry = GetIndexOfNextChapterStop(entry, forward);
@@ -417,10 +417,10 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
// Convert anything above the History items separator.
if (index < history_items) {
if (model_type_ == FORWARD_MENU) {
- index += contents->controller().GetCurrentEntryIndex() + 1;
+ index += contents->GetController().GetCurrentEntryIndex() + 1;
} else {
// Back menu is reverse.
- index = contents->controller().GetCurrentEntryIndex() - (index + 1);
+ index = contents->GetController().GetCurrentEntryIndex() - (index + 1);
}
return index;
}
@@ -440,7 +440,7 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
NavigationEntry* BackForwardMenuModel::GetNavigationEntry(int index) const {
int controller_index = MenuIndexToNavEntryIndex(index);
- NavigationController& controller = GetTabContents()->controller();
+ NavigationController& controller = GetTabContents()->GetController();
if (controller_index >= 0 && controller_index < controller.entry_count())
return controller.GetEntryAtIndex(controller_index);
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index f2425ef..3810495 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -169,5 +169,5 @@ NavigationController* ToolbarModel::GetNavigationController() const {
// toolbar during window creation (i.e. before any tabs have been added
// to the window).
TabContents* current_tab = browser_->GetSelectedTabContents();
- return current_tab ? &current_tab->controller() : NULL;
+ return current_tab ? &current_tab->GetController() : NULL;
}
diff --git a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
index 349c3dc..5d321bc 100644
--- a/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model_unittest.cc
@@ -29,7 +29,7 @@ class ToolbarModelTest : public BrowserWithTestWindowTest {
browser()->toolbar_model()->GetText());
// Check after commit.
- CommitPendingLoad(&contents->controller());
+ CommitPendingLoad(&contents->GetController());
EXPECT_EQ(should_display, browser()->toolbar_model()->ShouldDisplayURL());
EXPECT_EQ(ASCIIToUTF16(expected_text),
browser()->toolbar_model()->GetText());
diff --git a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
index ea6200d..fc3f167 100644
--- a/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
+++ b/chrome/browser/ui/views/constrained_html_delegate_gtk.cc
@@ -103,10 +103,10 @@ ConstrainedHtmlDelegateGtk::ConstrainedHtmlDelegateGtk(
// Set |this| as a property so the ConstrainedHtmlUI can retrieve it.
ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
tab_contents->GetPropertyBag(), this);
- tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab_contents->GetController().LoadURL(delegate->GetDialogContentURL(),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
views::Widget::InitParams params(views::Widget::InitParams::TYPE_CONTROL);
params.native_widget = this;
diff --git a/chrome/browser/ui/views/constrained_html_delegate_views.cc b/chrome/browser/ui/views/constrained_html_delegate_views.cc
index c41dd95..64a29fb 100644
--- a/chrome/browser/ui/views/constrained_html_delegate_views.cc
+++ b/chrome/browser/ui/views/constrained_html_delegate_views.cc
@@ -115,10 +115,10 @@ ConstrainedHtmlDelegateViews::ConstrainedHtmlDelegateViews(
// Set |this| as a property so the ConstrainedHtmlUI can retrieve it.
ConstrainedHtmlUI::GetPropertyAccessor().SetProperty(
html_tab_contents_->tab_contents()->GetPropertyBag(), this);
- tab_contents->controller().LoadURL(delegate->GetDialogContentURL(),
- content::Referrer(),
- content::PAGE_TRANSITION_START_PAGE,
- std::string());
+ tab_contents->GetController().LoadURL(delegate->GetDialogContentURL(),
+ content::Referrer(),
+ content::PAGE_TRANSITION_START_PAGE,
+ std::string());
}
ConstrainedHtmlDelegateViews::~ConstrainedHtmlDelegateViews() {
diff --git a/chrome/browser/ui/views/dom_view.cc b/chrome/browser/ui/views/dom_view.cc
index 73482a5..5854f6f5 100644
--- a/chrome/browser/ui/views/dom_view.cc
+++ b/chrome/browser/ui/views/dom_view.cc
@@ -52,7 +52,7 @@ TabContents* DOMView::CreateTabContents(Profile* profile,
void DOMView::LoadURL(const GURL& url) {
DCHECK(initialized_);
- dom_contents_->tab_contents()->controller().LoadURL(
+ dom_contents_->tab_contents()->GetController().LoadURL(
url, content::Referrer(), content::PAGE_TRANSITION_START_PAGE,
std::string());
}
diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc
index 710ec09..d94c83f 100644
--- a/chrome/browser/ui/views/location_bar/click_handler.cc
+++ b/chrome/browser/ui/views/location_bar/click_handler.cc
@@ -26,7 +26,7 @@ void ClickHandler::OnMouseReleased(const views::MouseEvent& event) {
return;
TabContents* tab = location_bar_->GetTabContentsWrapper()->tab_contents();
- NavigationEntry* nav_entry = tab->controller().GetActiveEntry();
+ NavigationEntry* nav_entry = tab->GetController().GetActiveEntry();
if (!nav_entry) {
NOTREACHED();
return;
diff --git a/chrome/browser/ui/views/notifications/balloon_view.cc b/chrome/browser/ui/views/notifications/balloon_view.cc
index c4b7543..311c877 100644
--- a/chrome/browser/ui/views/notifications/balloon_view.cc
+++ b/chrome/browser/ui/views/notifications/balloon_view.cc
@@ -232,7 +232,7 @@ void BalloonViewImpl::Update() {
DCHECK(html_contents_.get()) << "BalloonView::Update called before Show";
if (!html_contents_->tab_contents())
return;
- html_contents_->tab_contents()->controller().LoadURL(
+ html_contents_->tab_contents()->GetController().LoadURL(
balloon_->notification().content_url(), content::Referrer(),
content::PAGE_TRANSITION_LINK, std::string());
}
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 046a794..cbf5dcc 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -76,7 +76,7 @@ void SadTabView::LinkClicked(views::Link* source, int event_flags) {
false /* is renderer initiated */));
} else if (source == feedback_link_) {
browser::ShowHtmlBugReportView(
- Browser::GetBrowserForController(&tab_contents_->controller(), NULL),
+ Browser::GetBrowserForController(&tab_contents_->GetController(), NULL),
l10n_util::GetStringUTF8(IDS_KILLED_TAB_FEEDBACK_MESSAGE),
userfeedback::ChromeOsData_ChromeOsCategory_CRASH);
}
@@ -86,7 +86,7 @@ void SadTabView::ButtonPressed(views::Button* source,
const views::Event& event) {
DCHECK(tab_contents_);
DCHECK(source == reload_button_);
- tab_contents_->controller().Reload(true);
+ tab_contents_->GetController().Reload(true);
}
void SadTabView::Layout() {
diff --git a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
index 1e89da1..8604952 100644
--- a/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
+++ b/chrome/browser/ui/views/tab_contents/tab_contents_container.cc
@@ -133,10 +133,10 @@ bool TabContentsContainer::OnMousePressed(const views::MouseEvent& event) {
}
switch (button) {
case 8:
- tab_contents_->controller().GoBack();
+ tab_contents_->GetController().GoBack();
return true;
case 9:
- tab_contents_->controller().GoForward();
+ tab_contents_->GetController().GoForward();
return true;
}
@@ -163,7 +163,7 @@ void TabContentsContainer::AddObservers() {
registrar_.Add(
this,
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(&tab_contents_->controller()));
+ content::Source<NavigationController>(&tab_contents_->GetController()));
registrar_.Add(
this,
diff --git a/chrome/browser/ui/web_applications/web_app_ui.cc b/chrome/browser/ui/web_applications/web_app_ui.cc
index 225fd85c..5d08a2f 100644
--- a/chrome/browser/ui/web_applications/web_app_ui.cc
+++ b/chrome/browser/ui/web_applications/web_app_ui.cc
@@ -104,7 +104,7 @@ UpdateShortcutWorker::UpdateShortcutWorker(TabContentsWrapper* tab_contents)
this,
content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(
- &tab_contents_->tab_contents()->controller()));
+ &tab_contents_->tab_contents()->GetController()));
}
void UpdateShortcutWorker::Run() {
@@ -118,7 +118,7 @@ void UpdateShortcutWorker::Observe(
const content::NotificationDetails& details) {
if (type == content::NOTIFICATION_TAB_CLOSING &&
content::Source<NavigationController>(source).ptr() ==
- &tab_contents_->tab_contents()->controller()) {
+ &tab_contents_->tab_contents()->GetController()) {
// Underlying tab is closing.
tab_contents_ = NULL;
}
diff --git a/chrome/browser/ui/webui/active_downloads_ui.cc b/chrome/browser/ui/webui/active_downloads_ui.cc
index c886758..f59af2a 100644
--- a/chrome/browser/ui/webui/active_downloads_ui.cc
+++ b/chrome/browser/ui/webui/active_downloads_ui.cc
@@ -220,7 +220,7 @@ void ActiveDownloadsHandler::PlayMediaFile(const ListValue* args) {
FilePath file_path(UTF16ToUTF8(ExtractStringValue(args)));
Browser* browser = Browser::GetBrowserForController(
- &tab_contents_->controller(), NULL);
+ &tab_contents_->GetController(), NULL);
MediaPlayer* mediaplayer = MediaPlayer::GetInstance();
mediaplayer->PopupMediaPlayer(browser);
mediaplayer->ForcePlayMediaFile(profile_, file_path);
diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc
index 1767709..ca36cca 100644
--- a/chrome/browser/ui/webui/bug_report_ui.cc
+++ b/chrome/browser/ui/webui/bug_report_ui.cc
@@ -356,8 +356,8 @@ WebUIMessageHandler* BugReportHandler::Attach(WebUI* web_ui) {
bool BugReportHandler::Init() {
std::string page_url;
- if (tab_->controller().GetActiveEntry()) {
- page_url = tab_->controller().GetActiveEntry()->url().spec();
+ if (tab_->GetController().GetActiveEntry()) {
+ page_url = tab_->GetController().GetActiveEntry()->url().spec();
}
std::string params = page_url.substr(strlen(chrome::kChromeUIBugReportURL));
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 0da4fb2..5742e18 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -60,7 +60,8 @@ CloudPrintSigninFlowHandler::CloudPrintSigninFlowHandler(
void CloudPrintSigninFlowHandler::RegisterMessages() {
if (web_ui_ && web_ui_->tab_contents()) {
- NavigationController* controller = &web_ui_->tab_contents()->controller();
+ NavigationController* controller =
+ &web_ui_->tab_contents()->GetController();
NavigationEntry* pending_entry = controller->pending_entry();
if (pending_entry)
pending_entry->set_url(CloudPrintURL(
diff --git a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
index 575cf7d..24cea89 100644
--- a/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
+++ b/chrome/browser/ui/webui/ntp/recently_closed_tabs_handler.cc
@@ -62,7 +62,7 @@ RecentlyClosedTabsHandler::~RecentlyClosedTabsHandler() {
void RecentlyClosedTabsHandler::HandleReopenTab(const ListValue* args) {
TabRestoreServiceDelegate* delegate =
TabRestoreServiceDelegate::FindDelegateForController(
- &web_ui_->tab_contents()->controller(), NULL);
+ &web_ui_->tab_contents()->GetController(), NULL);
if (!delegate || !tab_restore_service_)
return;
diff --git a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
index e0410be..06bfbc4 100644
--- a/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
+++ b/chrome/browser/ui/webui/options/chromeos/cros_language_options_handler.cc
@@ -212,7 +212,7 @@ void CrosLanguageOptionsHandler::RestartCallback(const ListValue* args) {
content::RecordAction(UserMetricsAction("LanguageOptions_SignOut"));
Browser* browser = Browser::GetBrowserForController(
- &web_ui_->tab_contents()->controller(), NULL);
+ &web_ui_->tab_contents()->GetController(), NULL);
if (browser)
browser->ExecuteCommand(IDC_EXIT);
}
diff --git a/chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc b/chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc
index b3bbcc8..9aeedaf 100644
--- a/chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/chromeos/cros_language_options_handler2.cc
@@ -214,7 +214,7 @@ void CrosLanguageOptionsHandler::RestartCallback(const ListValue* args) {
content::RecordAction(UserMetricsAction("LanguageOptions_SignOut"));
Browser* browser = Browser::GetBrowserForController(
- &web_ui_->tab_contents()->controller(), NULL);
+ &web_ui_->tab_contents()->GetController(), NULL);
if (browser)
browser->ExecuteCommand(IDC_EXIT);
}
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index 4161476..10b9f22 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -312,7 +312,7 @@ void PrintPreviewHandler::HandleGetPreview(const ListValue* args) {
initiator_tab->tab_contents()->GetTitle());
std::string url;
NavigationEntry* entry =
- initiator_tab->tab_contents()->controller().GetActiveEntry();
+ initiator_tab->tab_contents()->GetController().GetActiveEntry();
if (entry)
url = entry->virtual_url().spec();
settings->SetString(printing::kSettingHeaderFooterURL, url);
diff --git a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
index b535894..136c507 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
@@ -90,12 +90,12 @@ WebUIMessageHandler* SyncPromoHandler::Attach(WebUI* web_ui) {
prefs_ = Profile::FromWebUI(web_ui)->GetPrefs();
DCHECK(prefs_);
// Ignore events from view-source:chrome://syncpromo.
- if (!web_ui->tab_contents()->controller().GetActiveEntry()->
+ if (!web_ui->tab_contents()->GetController().GetActiveEntry()->
IsViewSourceMode()) {
// Listen to see if the tab we're in gets closed.
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
content::Source<NavigationController>(
- &web_ui->tab_contents()->controller()));
+ &web_ui->tab_contents()->GetController()));
// Listen to see if the window we're in gets closed.
registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSING,
content::NotificationService::AllSources());
diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc
index 7544751..e7cdc64 100644
--- a/chrome/browser/ui/webui/web_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/web_ui_browsertest.cc
@@ -179,7 +179,7 @@ void WebUIBrowserTest::BrowsePreload(const GURL& browse_to) {
TestNavigationObserver navigation_observer(
content::Source<NavigationController>(
&browser()->GetSelectedTabContentsWrapper()->tab_contents()->
- controller()),
+ GetController()),
this, 1);
browser::NavigateParams params(
browser(), GURL(browse_to), content::PAGE_TRANSITION_TYPED);
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index eeb3d0d..40f0eee 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -26,7 +26,7 @@ class WebUITest : public TabContentsWrapperTestHarness {
// values. This must be increasing for the life of the tests.
static void DoNavigationTest(TabContentsWrapper* wrapper, int page_id) {
TabContents* contents = wrapper->tab_contents();
- NavigationController* controller = &contents->controller();
+ NavigationController* controller = &contents->GetController();
// Start a pending load.
GURL new_tab_url(chrome::kChromeUINewTabURL);
@@ -169,7 +169,7 @@ TEST_F(WebUITest, FocusOnNavigate) {
TabContentsForFocusTest* tc = new TabContentsForFocusTest(
contents()->browser_context(),
SiteInstance::CreateSiteInstance(contents()->browser_context()));
- tc->controller().CopyStateFrom(controller());
+ tc->GetController().CopyStateFrom(controller());
SetContents(tc);
int page_id = 200;
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index a6c0fe0..ec8b2c0 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -66,7 +66,7 @@ void BrowserWithTestWindowTest::AddTab(Browser* browser, const GURL& url) {
params.tabstrip_index = 0;
params.disposition = NEW_FOREGROUND_TAB;
browser::Navigate(&params);
- CommitPendingLoad(&params.target_contents->tab_contents()->controller());
+ CommitPendingLoad(&params.target_contents->tab_contents()->GetController());
}
void BrowserWithTestWindowTest::CommitPendingLoad(
@@ -121,7 +121,7 @@ void BrowserWithTestWindowTest::NavigateAndCommit(
}
void BrowserWithTestWindowTest::NavigateAndCommitActiveTab(const GURL& url) {
- NavigateAndCommit(&browser()->GetSelectedTabContents()->controller(), url);
+ NavigateAndCommit(&browser()->GetSelectedTabContents()->GetController(), url);
}
void BrowserWithTestWindowTest::DestroyBrowser() {
diff --git a/chrome/test/base/browser_with_test_window_test.h b/chrome/test/base/browser_with_test_window_test.h
index 34ecb6c..e48aa36 100644
--- a/chrome/test/base/browser_with_test_window_test.h
+++ b/chrome/test/base/browser_with_test_window_test.h
@@ -37,7 +37,7 @@ class NavigationController;
// // Add a new tab and navigate it. This will be at index 0.
// AddTab(browser(), GURL("http://foo/1"));
// NavigationController* controller =
-// &browser()->GetTabContentsAt(0)->controller();
+// &browser()->GetTabContentsAt(0)->GetController();
//
// // Navigate somewhere else.
// GURL url2("http://foo/2");
diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc
index 1221fa4..6b648d5 100644
--- a/chrome/test/base/test_html_dialog_observer.cc
+++ b/chrome/test/base/test_html_dialog_observer.cc
@@ -48,13 +48,13 @@ void TestHtmlDialogObserver::Observe(
// navigate in this method, ensuring that this is not a race condition.
registrar_.Add(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &web_ui_->tab_contents()->controller()));
+ &web_ui_->tab_contents()->GetController()));
break;
case content::NOTIFICATION_LOAD_STOP:
DCHECK(web_ui_);
registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP,
content::Source<NavigationController>(
- &web_ui_->tab_contents()->controller()));
+ &web_ui_->tab_contents()->GetController()));
done_ = true;
// If the message loop is running stop it.
if (running_) {
diff --git a/chrome/test/base/test_tab_strip_model_observer.cc b/chrome/test/base/test_tab_strip_model_observer.cc
index dcb8196..87bb8c3 100644
--- a/chrome/test/base/test_tab_strip_model_observer.cc
+++ b/chrome/test/base/test_tab_strip_model_observer.cc
@@ -43,7 +43,7 @@ void TestTabStripModelObserver::ObservePrintPreviewTabContents(
tab_controller->GetPrintPreviewForTab(contents);
if (preview_tab) {
RegisterAsObserver(content::Source<NavigationController>(
- &preview_tab->tab_contents()->controller()));
+ &preview_tab->tab_contents()->GetController()));
}
}
}
diff --git a/chrome/test/base/ui_test_utils.cc b/chrome/test/base/ui_test_utils.cc
index ee65854..9459bd1 100644
--- a/chrome/test/base/ui_test_utils.cc
+++ b/chrome/test/base/ui_test_utils.cc
@@ -301,7 +301,7 @@ bool GetCurrentTabTitle(const Browser* browser, string16* title) {
TabContents* tab_contents = browser->GetSelectedTabContents();
if (!tab_contents)
return false;
- NavigationEntry* last_entry = tab_contents->controller().GetActiveEntry();
+ NavigationEntry* last_entry = tab_contents->GetController().GetActiveEntry();
if (!last_entry)
return false;
title->assign(last_entry->GetTitleForDisplay(""));
@@ -335,7 +335,7 @@ void WaitForBrowserActionUpdated(ExtensionAction* browser_action) {
void WaitForLoadStop(TabContents* tab) {
WindowedNotificationObserver load_stop_observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab->controller()));
+ content::Source<NavigationController>(&tab->GetController()));
// In many cases, the load may have finished before we get here. Only wait if
// the tab still has a pending navigation.
if (!tab->IsLoading())
@@ -365,7 +365,7 @@ void OpenURLOffTheRecord(Profile* profile, const GURL& url) {
Browser::OpenURLOffTheRecord(profile, url);
Browser* browser = BrowserList::FindTabbedBrowser(
profile->GetOffTheRecordProfile(), false);
- WaitForNavigations(&browser->GetSelectedTabContents()->controller(), 1);
+ WaitForNavigations(&browser->GetSelectedTabContents()->GetController(), 1);
}
void NavigateToURL(browser::NavigateParams* params) {
@@ -398,7 +398,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
WaitForLoadStop(browser->GetSelectedTabContents());
TestNavigationObserver same_tab_observer(
content::Source<NavigationController>(
- &browser->GetSelectedTabContents()->controller()),
+ &browser->GetSelectedTabContents()->GetController()),
NULL,
number_of_navigations);
@@ -443,7 +443,7 @@ static void NavigateToURLWithDispositionBlockUntilNavigationsComplete(
base::Unretained(MessageLoopForUI::current())));
return;
} else if (tab_contents) {
- NavigationController* controller = &tab_contents->controller();
+ NavigationController* controller = &tab_contents->GetController();
WaitForNavigations(controller, number_of_navigations);
return;
}
@@ -922,7 +922,7 @@ TitleWatcher::TitleWatcher(TabContents* tab_contents,
notification_registrar_.Add(
this,
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&tab_contents->controller()));
+ content::Source<NavigationController>(&tab_contents->GetController()));
}
void TitleWatcher::AlsoWaitForTitle(const string16& expected_title) {
@@ -949,7 +949,7 @@ void TitleWatcher::Observe(int type,
} else if (type == content::NOTIFICATION_LOAD_STOP) {
NavigationController* controller =
content::Source<NavigationController>(source).ptr();
- ASSERT_EQ(&tab_contents_->controller(), controller);
+ ASSERT_EQ(&tab_contents_->GetController(), controller);
} else {
FAIL() << "Unexpected notification received.";
}