summaryrefslogtreecommitdiffstats
path: root/chrome/browser
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 00:46:20 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-04 00:46:20 +0000
commitcdcb1dee07b6c8e7fe968b2a5f4199c9c8fb2323 (patch)
tree4a9218cc8e53e78e565140e5e88d85c29280117e /chrome/browser
parent46a7e02c5bba1b9c68f86befaf586d0b17eb0b04 (diff)
downloadchromium_src-cdcb1dee07b6c8e7fe968b2a5f4199c9c8fb2323.zip
chromium_src-cdcb1dee07b6c8e7fe968b2a5f4199c9c8fb2323.tar.gz
chromium_src-cdcb1dee07b6c8e7fe968b2a5f4199c9c8fb2323.tar.bz2
Convert WebContents to return a content::NavigationController instead of the implementation. Update all the headers in chrome to use the interface only. In a subsequent cl, I'll rename the implementation to NavigationControllerImpl and also get rid of content::NavigationController everywhere.
BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/8983010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116244 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r--chrome/browser/DEPS1
-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.cc2
-rw-r--r--chrome/browser/automation/automation_provider_observers.cc2
-rw-r--r--chrome/browser/automation/automation_provider_win.cc2
-rw-r--r--chrome/browser/automation/automation_tab_tracker.cc2
-rw-r--r--chrome/browser/automation/testing_automation_provider.cc11
-rw-r--r--chrome/browser/browser_commands_unittest.cc4
-rw-r--r--chrome/browser/chromeos/boot_times_loader.cc2
-rw-r--r--chrome/browser/content_settings/tab_specific_content_settings.cc5
-rw-r--r--chrome/browser/debugger/devtools_window.cc4
-rw-r--r--chrome/browser/download/download_request_limiter.cc10
-rw-r--r--chrome/browser/download/download_request_limiter.h16
-rw-r--r--chrome/browser/download/download_request_limiter_unittest.cc2
-rw-r--r--chrome/browser/extensions/extension_browser_event_router.cc2
-rw-r--r--chrome/browser/extensions/extension_crash_recovery_browsertest.cc2
-rw-r--r--chrome/browser/extensions/extension_navigation_observer.cc2
-rw-r--r--chrome/browser/extensions/extension_tabs_module.cc5
-rw-r--r--chrome/browser/extensions/extension_url_rewrite_browsertest.cc4
-rw-r--r--chrome/browser/extensions/extension_web_ui.cc2
-rw-r--r--chrome/browser/extensions/webstore_installer.cc4
-rw-r--r--chrome/browser/extensions/webstore_installer.h9
-rw-r--r--chrome/browser/external_tab_container_win.cc4
-rw-r--r--chrome/browser/favicon/favicon_tab_helper.cc11
-rw-r--r--chrome/browser/geolocation/geolocation_browsertest.cc2
-rw-r--r--chrome/browser/google/google_url_tracker.cc2
-rw-r--r--chrome/browser/history/top_sites.cc2
-rw-r--r--chrome/browser/infobars/infobar_delegate.cc2
-rw-r--r--chrome/browser/infobars/infobar_tab_helper.cc2
-rw-r--r--chrome/browser/instant/instant_browsertest.cc2
-rw-r--r--chrome/browser/instant/instant_loader.cc2
-rw-r--r--chrome/browser/notifications/balloon_host.cc2
-rw-r--r--chrome/browser/prerender/prerender_manager.cc2
-rw-r--r--chrome/browser/printing/print_dialog_cloud.cc5
-rw-r--r--chrome/browser/printing/print_preview_tab_controller.cc2
-rw-r--r--chrome/browser/repost_form_warning_controller.cc2
-rw-r--r--chrome/browser/repost_form_warning_controller.h4
-rw-r--r--chrome/browser/safe_browsing/browser_feature_extractor.cc15
-rw-r--r--chrome/browser/safe_browsing/client_side_detection_host.cc2
-rw-r--r--chrome/browser/safe_browsing/malware_details.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page.cc2
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc2
-rw-r--r--chrome/browser/sessions/session_restore.cc10
-rw-r--r--chrome/browser/sessions/session_types.cc4
-rw-r--r--chrome/browser/sessions/tab_restore_service.cc6
-rw-r--r--chrome/browser/sessions/tab_restore_service.h9
-rw-r--r--chrome/browser/sessions/tab_restore_service_browsertest.cc2
-rw-r--r--chrome/browser/sessions/tab_restore_service_delegate.h4
-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.cc2
-rw-r--r--chrome/browser/sync/glue/session_change_processor.cc2
-rw-r--r--chrome/browser/tab_contents/language_state.cc4
-rw-r--r--chrome/browser/tab_contents/language_state.h7
-rw-r--r--chrome/browser/tabs/tab_strip_model.cc25
-rw-r--r--chrome/browser/tabs/tab_strip_model.h31
-rw-r--r--chrome/browser/tabs/tab_strip_model_order_controller.cc14
-rw-r--r--chrome/browser/tabs/tab_strip_model_unittest.cc9
-rw-r--r--chrome/browser/translate/options_menu_model.cc2
-rw-r--r--chrome/browser/translate/translate_manager.cc4
-rw-r--r--chrome/browser/ui/auto_login_prompter.cc12
-rw-r--r--chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc2
-rw-r--r--chrome/browser/ui/bookmarks/bookmark_tab_helper.cc2
-rw-r--r--chrome/browser/ui/browser.cc8
-rw-r--r--chrome/browser/ui/browser_tab_restore_service_delegate.cc4
-rw-r--r--chrome/browser/ui/cocoa/applescript/tab_applescript.mm8
-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/intents/web_intent_picker_controller.cc3
-rw-r--r--chrome/browser/ui/login/login_prompt.cc7
-rw-r--r--chrome/browser/ui/login/login_prompt_browsertest.cc36
-rw-r--r--chrome/browser/ui/pdf/pdf_browsertest.cc2
-rw-r--r--chrome/browser/ui/search_engines/search_engine_tab_helper.cc8
-rw-r--r--chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.cc2
-rw-r--r--chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc2
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model.cc6
-rw-r--r--chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc2
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.cc13
-rw-r--r--chrome/browser/ui/toolbar/toolbar_model.h5
-rw-r--r--chrome/browser/ui/views/location_bar/click_handler.cc2
-rw-r--r--chrome/browser/ui/views/sad_tab_view.cc2
-rw-r--r--chrome/browser/ui/webui/active_downloads_ui.cc2
-rw-r--r--chrome/browser/ui/webui/bug_report_ui.cc2
-rw-r--r--chrome/browser/ui/webui/cloud_print_signin_dialog.cc4
-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/options2/personal_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.cc2
-rw-r--r--chrome/browser/ui/webui/web_ui_browsertest.cc2
-rw-r--r--chrome/browser/ui/webui/web_ui_unittest.cc4
92 files changed, 251 insertions, 208 deletions
diff --git a/chrome/browser/DEPS b/chrome/browser/DEPS
index fa6a8ca..98c0362 100644
--- a/chrome/browser/DEPS
+++ b/chrome/browser/DEPS
@@ -30,6 +30,7 @@ include_rules = [
# TODO(jam): this needs to be removed, and only use content/public. BUG=98716
"+content/browser",
"-content/browser/notification_service_impl.h",
+ "-content/browser/tab_contents/navigation_controller.h",
"-content/browser/tab_contents/navigation_entry_impl.h",
"-content/browser/plugin_service_impl.h",
"-content/browser/worker_service_impl.h",
diff --git a/chrome/browser/alternate_nav_url_fetcher.cc b/chrome/browser/alternate_nav_url_fetcher.cc
index 08462c7..6c583d2 100644
--- a/chrome/browser/alternate_nav_url_fetcher.cc
+++ b/chrome/browser/alternate_nav_url_fetcher.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/tab_contents/link_infobar_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/common/url_fetcher.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/autofill/autofill_browsertest.cc b/chrome/browser/autofill/autofill_browsertest.cc
index 5d5897c..6796fd8 100644
--- a/chrome/browser/autofill/autofill_browsertest.cc
+++ b/chrome/browser/autofill/autofill_browsertest.cc
@@ -28,7 +28,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/mock_render_process_host.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "content/test/test_url_fetcher_factory.h"
diff --git a/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc b/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
index 75b4388..682757c 100644
--- a/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
+++ b/chrome/browser/autofill/autofill_feedback_infobar_delegate.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/webui/bug_report_ui.h"
#include "chrome/browser/userfeedback/proto/extension.pb.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
diff --git a/chrome/browser/automation/automation_provider_observers.cc b/chrome/browser/automation/automation_provider_observers.cc
index e15d327..6c39422 100644
--- a/chrome/browser/automation/automation_provider_observers.cc
+++ b/chrome/browser/automation/automation_provider_observers.cc
@@ -76,8 +76,8 @@
#include "chrome/common/extensions/extension.h"
#include "content/browser/download/save_package.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/process_type.h"
diff --git a/chrome/browser/automation/automation_provider_win.cc b/chrome/browser/automation/automation_provider_win.cc
index 1adcbc1..bcafa0b 100644
--- a/chrome/browser/automation/automation_provider_win.cc
+++ b/chrome/browser/automation/automation_provider_win.cc
@@ -24,7 +24,7 @@
#include "chrome/common/automation_messages.h"
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_zoom.h"
#include "ui/base/keycodes/keyboard_codes.h"
diff --git a/chrome/browser/automation/automation_tab_tracker.cc b/chrome/browser/automation/automation_tab_tracker.cc
index 2d8d033..4d6c09a 100644
--- a/chrome/browser/automation/automation_tab_tracker.cc
+++ b/chrome/browser/automation/automation_tab_tracker.cc
@@ -4,8 +4,8 @@
#include "chrome/browser/automation/automation_tab_tracker.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "chrome/common/chrome_notification_types.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_source.h"
AutomationTabTracker::AutomationTabTracker(IPC::Message::Sender* automation)
diff --git a/chrome/browser/automation/testing_automation_provider.cc b/chrome/browser/automation/testing_automation_provider.cc
index f40985a..7473ec4 100644
--- a/chrome/browser/automation/testing_automation_provider.cc
+++ b/chrome/browser/automation/testing_automation_provider.cc
@@ -2979,7 +2979,8 @@ void TestingAutomationProvider::GetNavigationInfo(
return;
}
scoped_ptr<DictionaryValue> return_value(new DictionaryValue);
- const NavigationController& controller = tab_contents->GetController();
+ const content::NavigationController& controller =
+ tab_contents->GetController();
NavigationEntry* nav_entry = controller.GetActiveEntry();
DCHECK(nav_entry);
@@ -3543,7 +3544,7 @@ void TestingAutomationProvider::OmniboxAcceptInput(
Browser* browser,
DictionaryValue* args,
IPC::Message* reply_message) {
- NavigationController& controller =
+ content::NavigationController& controller =
browser->GetSelectedWebContents()->GetController();
new OmniboxAcceptNotificationObserver(&controller, this, reply_message);
browser->window()->GetLocationBar()->AcceptInput();
@@ -6193,7 +6194,7 @@ void TestingAutomationProvider::GoForward(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->GetController();
+ content::NavigationController& controller = tab_contents->GetController();
if (!controller.CanGoForward()) {
DictionaryValue dict;
dict.SetBoolean("did_go_forward", false);
@@ -6217,7 +6218,7 @@ void TestingAutomationProvider::GoBack(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->GetController();
+ content::NavigationController& controller = tab_contents->GetController();
if (!controller.CanGoBack()) {
DictionaryValue dict;
dict.SetBoolean("did_go_back", false);
@@ -6241,7 +6242,7 @@ void TestingAutomationProvider::ReloadJSON(
AutomationJSONReply(this, reply_message).SendError(error);
return;
}
- NavigationController& controller = tab_contents->GetController();
+ content::NavigationController& controller = tab_contents->GetController();
new NavigationNotificationObserver(&controller, this, reply_message,
1, false, true);
controller.Reload(false);
diff --git a/chrome/browser/browser_commands_unittest.cc b/chrome/browser/browser_commands_unittest.cc
index 60ccb42..da0b2a0 100644
--- a/chrome/browser/browser_commands_unittest.cc
+++ b/chrome/browser/browser_commands_unittest.cc
@@ -8,8 +8,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/browser_with_test_window_test.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/test/test_browser_thread.h"
@@ -72,7 +72,7 @@ TEST_F(BrowserCommandsTest, DuplicateTab) {
ASSERT_EQ(2, browser()->tab_count());
// Verify the stack of urls.
- NavigationController& controller =
+ content::NavigationController& controller =
browser()->GetTabContentsAt(1)->GetController();
ASSERT_EQ(3, controller.GetEntryCount());
ASSERT_EQ(2, controller.GetCurrentEntryIndex());
diff --git a/chrome/browser/chromeos/boot_times_loader.cc b/chrome/browser/chromeos/boot_times_loader.cc
index 44422ed..37f7e54 100644
--- a/chrome/browser/chromeos/boot_times_loader.cc
+++ b/chrome/browser/chromeos/boot_times_loader.cc
@@ -27,9 +27,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
using content::BrowserThread;
diff --git a/chrome/browser/content_settings/tab_specific_content_settings.cc b/chrome/browser/content_settings/tab_specific_content_settings.cc
index 6eedb5d..33ab87d 100644
--- a/chrome/browser/content_settings/tab_specific_content_settings.cc
+++ b/chrome/browser/content_settings/tab_specific_content_settings.cc
@@ -25,7 +25,7 @@
#include "chrome/common/render_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
@@ -469,7 +469,8 @@ void TabSpecificContentSettings::Observe(
DCHECK(type == chrome::NOTIFICATION_CONTENT_SETTINGS_CHANGED);
content::Details<const ContentSettingsDetails> settings_details(details);
- const NavigationController& controller = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
NavigationEntry* entry = controller.GetActiveEntry();
GURL entry_url;
if (entry)
diff --git a/chrome/browser/debugger/devtools_window.cc b/chrome/browser/debugger/devtools_window.cc
index 45e9e779..d93c32d 100644
--- a/chrome/browser/debugger/devtools_window.cc
+++ b/chrome/browser/debugger/devtools_window.cc
@@ -35,13 +35,13 @@
#include "content/browser/in_process_webkit/session_storage_namespace.h"
#include "content/browser/load_notification_details.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/devtools_agent_host_registry.h"
#include "content/public/browser/devtools_manager.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_source.h"
#include "content/public/common/bindings_policy.h"
@@ -383,7 +383,7 @@ bool DevToolsWindow::FindInspectedBrowserAndTabIndex(Browser** browser,
if (!inspected_tab_)
return false;
- const NavigationController& controller =
+ const content::NavigationController& controller =
inspected_tab_->tab_contents()->GetController();
for (BrowserList::const_iterator it = BrowserList::begin();
it != BrowserList::end(); ++it) {
diff --git a/chrome/browser/download/download_request_limiter.cc b/chrome/browser/download/download_request_limiter.cc
index 372524b..4264707 100644
--- a/chrome/browser/download/download_request_limiter.cc
+++ b/chrome/browser/download/download_request_limiter.cc
@@ -12,9 +12,9 @@
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper.h"
#include "chrome/browser/ui/blocked_content/blocked_content_tab_helper_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
@@ -28,8 +28,8 @@ using content::WebContents;
DownloadRequestLimiter::TabDownloadState::TabDownloadState(
DownloadRequestLimiter* host,
- NavigationController* controller,
- NavigationController* originating_controller)
+ content::NavigationController* controller,
+ content::NavigationController* originating_controller)
: host_(host),
controller_(controller),
status_(DownloadRequestLimiter::ALLOW_ONE_DOWNLOAD),
@@ -231,8 +231,8 @@ void DownloadRequestLimiter::SetTestingDelegate(TestingDelegate* delegate) {
}
DownloadRequestLimiter::TabDownloadState* DownloadRequestLimiter::
- GetDownloadState(NavigationController* controller,
- NavigationController* originating_controller,
+ GetDownloadState(content::NavigationController* controller,
+ content::NavigationController* originating_controller,
bool create) {
DCHECK(controller);
StateMap::iterator i = state_map_.find(controller);
diff --git a/chrome/browser/download/download_request_limiter.h b/chrome/browser/download/download_request_limiter.h
index 0889924..5cf4b50 100644
--- a/chrome/browser/download/download_request_limiter.h
+++ b/chrome/browser/download/download_request_limiter.h
@@ -15,11 +15,11 @@
#include "content/public/browser/notification_registrar.h"
class DownloadRequestInfoBarDelegate;
-class NavigationController;
class TabContents;
class TabContentsWrapper;
namespace content {
+class NavigationController;
class WebContents;
}
@@ -82,8 +82,8 @@ class DownloadRequestLimiter
// is used. |originating_controller| is typically null, but differs from
// |controller| in the case of a constrained popup requesting the download.
TabDownloadState(DownloadRequestLimiter* host,
- NavigationController* controller,
- NavigationController* originating_controller);
+ content::NavigationController* controller,
+ content::NavigationController* originating_controller);
virtual ~TabDownloadState();
// Status of the download.
@@ -116,7 +116,7 @@ class DownloadRequestLimiter
bool is_showing_prompt() const { return (infobar_ != NULL); }
// NavigationController we're tracking.
- NavigationController* controller() const { return controller_; }
+ content::NavigationController* controller() const { return controller_; }
// Invoked from DownloadRequestDialogDelegate. Notifies the delegates and
// changes the status appropriately. Virtual for testing.
@@ -145,7 +145,7 @@ class DownloadRequestLimiter
DownloadRequestLimiter* host_;
- NavigationController* controller_;
+ content::NavigationController* controller_;
// Host of the first page the download started on. This may be empty.
std::string initial_page_host_;
@@ -215,8 +215,8 @@ class DownloadRequestLimiter
// The returned TabDownloadState is owned by the DownloadRequestLimiter and
// deleted when no longer needed (the Remove method is invoked).
TabDownloadState* GetDownloadState(
- NavigationController* controller,
- NavigationController* originating_controller,
+ content::NavigationController* controller,
+ content::NavigationController* originating_controller,
bool create);
// CanDownloadOnIOThread invokes this on the UI thread. This determines the
@@ -248,7 +248,7 @@ class DownloadRequestLimiter
// if the state is other than ALLOW_ONE_DOWNLOAD. Similarly once the state
// transitions from anything but ALLOW_ONE_DOWNLOAD back to ALLOW_ONE_DOWNLOAD
// the TabDownloadState is removed and deleted (by way of Remove).
- typedef std::map<NavigationController*, TabDownloadState*> StateMap;
+ typedef std::map<content::NavigationController*, TabDownloadState*> StateMap;
StateMap state_map_;
static TestingDelegate* delegate_;
diff --git a/chrome/browser/download/download_request_limiter_unittest.cc b/chrome/browser/download/download_request_limiter_unittest.cc
index e4e6463..cbdb149 100644
--- a/chrome/browser/download/download_request_limiter_unittest.cc
+++ b/chrome/browser/download/download_request_limiter_unittest.cc
@@ -5,8 +5,8 @@
#include "chrome/browser/download/download_request_limiter.h"
#include "chrome/browser/ui/tab_contents/test_tab_contents_wrapper.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/extensions/extension_browser_event_router.cc b/chrome/browser/extensions/extension_browser_event_router.cc
index 62d320c..dc3777e 100644
--- a/chrome/browser/extensions/extension_browser_event_router.cc
+++ b/chrome/browser/extensions/extension_browser_event_router.cc
@@ -18,7 +18,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
index 320525e..a63ea8d 100644
--- a/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
+++ b/chrome/browser/extensions/extension_crash_recovery_browsertest.cc
@@ -18,7 +18,7 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/result_codes.h"
diff --git a/chrome/browser/extensions/extension_navigation_observer.cc b/chrome/browser/extensions/extension_navigation_observer.cc
index 18a4edf..4af29cc 100644
--- a/chrome/browser/extensions/extension_navigation_observer.cc
+++ b/chrome/browser/extensions/extension_navigation_observer.cc
@@ -6,7 +6,7 @@
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/profiles/profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index 10de472..4848529 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -46,8 +46,8 @@
#include "content/browser/renderer_host/backing_store.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -1072,7 +1072,8 @@ bool UpdateTabFunction::RunImpl() {
NULL, &tab_strip, &contents, &tab_index, &error_)) {
return false;
}
- NavigationController& controller = contents->web_contents()->GetController();
+ content::NavigationController& controller =
+ contents->web_contents()->GetController();
// TODO(rafaelw): handle setting remaining tab properties:
// -title
diff --git a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
index 333fa3a..fa7e5df 100644
--- a/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
+++ b/chrome/browser/extensions/extension_url_rewrite_browsertest.cc
@@ -14,7 +14,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "googleurl/src/gurl.h"
@@ -32,7 +32,7 @@ class ExtensionURLRewriteBrowserTest : public ExtensionBrowserTest {
return GURL(GetLocationBarText());
}
- NavigationController* GetNavigationController() const {
+ content::NavigationController* GetNavigationController() const {
return &browser()->GetSelectedWebContents()->GetController();
}
diff --git a/chrome/browser/extensions/extension_web_ui.cc b/chrome/browser/extensions/extension_web_ui.cc
index 60790e75..f471122 100644
--- a/chrome/browser/extensions/extension_web_ui.cc
+++ b/chrome/browser/extensions/extension_web_ui.cc
@@ -24,7 +24,7 @@
#include "chrome/common/extensions/extension_icon_set.h"
#include "chrome/common/extensions/extension_resource.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/bindings_policy.h"
diff --git a/chrome/browser/extensions/webstore_installer.cc b/chrome/browser/extensions/webstore_installer.cc
index ecd0223..c475c73 100644
--- a/chrome/browser/extensions/webstore_installer.cc
+++ b/chrome/browser/extensions/webstore_installer.cc
@@ -22,10 +22,10 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "content/browser/download/download_types.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/download_file.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
@@ -104,7 +104,7 @@ void GetDownloadFilePath(const std::string& id,
WebstoreInstaller::WebstoreInstaller(Profile* profile,
Delegate* delegate,
- NavigationController* controller,
+ content::NavigationController* controller,
const std::string& id,
int flags)
: profile_(profile),
diff --git a/chrome/browser/extensions/webstore_installer.h b/chrome/browser/extensions/webstore_installer.h
index 345df9f..91656fe 100644
--- a/chrome/browser/extensions/webstore_installer.h
+++ b/chrome/browser/extensions/webstore_installer.h
@@ -16,9 +16,12 @@
#include "googleurl/src/gurl.h"
class FilePath;
-class NavigationController;
class Profile;
+namespace content {
+class NavigationController;
+}
+
// Downloads and installs extensions from the web store.
class WebstoreInstaller : public content::NotificationObserver,
public base::RefCounted<WebstoreInstaller> {
@@ -47,7 +50,7 @@ class WebstoreInstaller : public content::NotificationObserver,
// Note: the delegate should stay alive until being called back.
WebstoreInstaller(Profile* profile,
Delegate* delegate,
- NavigationController* controller,
+ content::NavigationController* controller,
const std::string& id,
int flags);
virtual ~WebstoreInstaller();
@@ -80,7 +83,7 @@ class WebstoreInstaller : public content::NotificationObserver,
content::NotificationRegistrar registrar_;
Profile* profile_;
Delegate* delegate_;
- NavigationController* controller_;
+ content::NavigationController* controller_;
std::string id_;
int flags_;
GURL download_url_;
diff --git a/chrome/browser/external_tab_container_win.cc b/chrome/browser/external_tab_container_win.cc
index e556937..6a948b1 100644
--- a/chrome/browser/external_tab_container_win.cc
+++ b/chrome/browser/external_tab_container_win.cc
@@ -180,7 +180,7 @@ bool ExternalTabContainer::Init(Profile* profile,
if (existing_contents) {
tab_contents_.reset(existing_contents);
- tab_contents_->tab_contents()->GetController().set_browser_context(profile);
+ tab_contents_->web_contents()->GetController().SetBrowserContext(profile);
} else {
TabContents* new_contents = new TabContents(profile, NULL, MSG_ROUTING_NONE,
NULL, NULL);
@@ -201,7 +201,7 @@ bool ExternalTabContainer::Init(Profile* profile,
content::BINDINGS_POLICY_EXTERNAL_HOST);
}
- NavigationController* controller =
+ content::NavigationController* controller =
&tab_contents_->web_contents()->GetController();
registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
content::Source<content::NavigationController>(controller));
diff --git a/chrome/browser/favicon/favicon_tab_helper.cc b/chrome/browser/favicon/favicon_tab_helper.cc
index 4bbdb74..3eea1f1 100644
--- a/chrome/browser/favicon/favicon_tab_helper.cc
+++ b/chrome/browser/favicon/favicon_tab_helper.cc
@@ -11,10 +11,10 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/icon_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
@@ -48,7 +48,8 @@ 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 = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->GetFavicon().bitmap;
@@ -60,7 +61,8 @@ SkBitmap FaviconTabHelper::GetFavicon() const {
}
bool FaviconTabHelper::FaviconIsValid() const {
- const NavigationController& controller = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
NavigationEntry* entry = controller.GetTransientEntry();
if (entry)
return entry->GetFavicon().valid;
@@ -74,7 +76,8 @@ bool FaviconTabHelper::FaviconIsValid() const {
bool FaviconTabHelper::ShouldDisplayFavicon() {
// Always display a throbber during pending loads.
- const NavigationController& controller = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
if (controller.GetLastCommittedEntry() && controller.GetPendingEntry())
return true;
diff --git a/chrome/browser/geolocation/geolocation_browsertest.cc b/chrome/browser/geolocation/geolocation_browsertest.cc
index ed6c4cd..3c2cc59 100644
--- a/chrome/browser/geolocation/geolocation_browsertest.cc
+++ b/chrome/browser/geolocation/geolocation_browsertest.cc
@@ -28,7 +28,7 @@
#include "content/browser/geolocation/location_arbitrator.h"
#include "content/browser/geolocation/mock_location_provider.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/google/google_url_tracker.cc b/chrome/browser/google/google_url_tracker.cc
index 080f15f..1270095 100644
--- a/chrome/browser/google/google_url_tracker.cc
+++ b/chrome/browser/google/google_url_tracker.cc
@@ -20,7 +20,7 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/history/top_sites.cc b/chrome/browser/history/top_sites.cc
index 533525d..96c9099a 100644
--- a/chrome/browser/history/top_sites.cc
+++ b/chrome/browser/history/top_sites.cc
@@ -27,8 +27,8 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/thumbnail_score.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/infobars/infobar_delegate.cc b/chrome/browser/infobars/infobar_delegate.cc
index 5c94b5c..d6d3c3b 100644
--- a/chrome/browser/infobars/infobar_delegate.cc
+++ b/chrome/browser/infobars/infobar_delegate.cc
@@ -7,7 +7,7 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/infobars/infobar_tab_helper.cc b/chrome/browser/infobars/infobar_tab_helper.cc
index fbe633e..ce08e27 100644
--- a/chrome/browser/infobars/infobar_tab_helper.cc
+++ b/chrome/browser/infobars/infobar_tab_helper.cc
@@ -9,7 +9,7 @@
#include "chrome/browser/tab_contents/insecure_content_infobar_delegate.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/instant/instant_browsertest.cc b/chrome/browser/instant/instant_browsertest.cc
index 7d52259..48e5a72 100644
--- a/chrome/browser/instant/instant_browsertest.cc
+++ b/chrome/browser/instant/instant_browsertest.cc
@@ -30,7 +30,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/instant/instant_loader.cc b/chrome/browser/instant/instant_loader.cc
index 0615225..b7cb3c4 100644
--- a/chrome/browser/instant/instant_loader.cc
+++ b/chrome/browser/instant/instant_loader.cc
@@ -34,11 +34,11 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/provisional_load_details.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/notifications/balloon_host.cc b/chrome/browser/notifications/balloon_host.cc
index 3899600..119f174 100644
--- a/chrome/browser/notifications/balloon_host.cc
+++ b/chrome/browser/notifications/balloon_host.cc
@@ -16,7 +16,7 @@
#include "chrome/common/chrome_view_type.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/render_process_host.h"
diff --git a/chrome/browser/prerender/prerender_manager.cc b/chrome/browser/prerender/prerender_manager.cc
index 613bfa3..e04263e 100644
--- a/chrome/browser/prerender/prerender_manager.cc
+++ b/chrome/browser/prerender/prerender_manager.cc
@@ -39,10 +39,10 @@
#include "content/browser/in_process_webkit/session_storage_namespace.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/render_view_host_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/devtools_agent_host_registry.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/printing/print_dialog_cloud.cc b/chrome/browser/printing/print_dialog_cloud.cc
index afa4c16..bdb3ad3 100644
--- a/chrome/browser/printing/print_dialog_cloud.cc
+++ b/chrome/browser/printing/print_dialog_cloud.cc
@@ -28,10 +28,10 @@
#include "chrome/common/print_messages.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
@@ -303,7 +303,8 @@ 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()->web_contents()->GetController();
+ content::NavigationController* controller =
+ &web_ui()->web_contents()->GetController();
NavigationEntry* pending_entry = controller->GetPendingEntry();
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 16143e4..3b2bfad 100644
--- a/chrome/browser/printing/print_preview_tab_controller.cc
+++ b/chrome/browser/printing/print_preview_tab_controller.cc
@@ -30,8 +30,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/repost_form_warning_controller.cc b/chrome/browser/repost_form_warning_controller.cc
index 36f7b30..b1874d5 100644
--- a/chrome/browser/repost_form_warning_controller.cc
+++ b/chrome/browser/repost_form_warning_controller.cc
@@ -10,7 +10,7 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/repost_form_warning_controller.h b/chrome/browser/repost_form_warning_controller.h
index ea693e90..15bba70 100644
--- a/chrome/browser/repost_form_warning_controller.h
+++ b/chrome/browser/repost_form_warning_controller.h
@@ -9,7 +9,9 @@
#include "base/compiler_specific.h"
#include "chrome/browser/ui/tab_modal_confirm_dialog_delegate.h"
+namespace content {
class NavigationController;
+}
// This class is used to continue or cancel a pending reload when the
// repost form warning is shown. It is owned by the platform-dependent
@@ -36,7 +38,7 @@ class RepostFormWarningController : public TabModalConfirmDialogDelegate {
const content::NotificationDetails& details) OVERRIDE;
// Weak pointer; this dialog is cancelled when the WebContents is closed.
- NavigationController* navigation_controller_;
+ content::NavigationController* navigation_controller_;
DISALLOW_COPY_AND_ASSIGN(RepostFormWarningController);
};
diff --git a/chrome/browser/safe_browsing/browser_feature_extractor.cc b/chrome/browser/safe_browsing/browser_feature_extractor.cc
index 7c6a0c0..de42d04 100644
--- a/chrome/browser/safe_browsing/browser_feature_extractor.cc
+++ b/chrome/browser/safe_browsing/browser_feature_extractor.cc
@@ -21,8 +21,8 @@
#include "chrome/browser/safe_browsing/browser_features.h"
#include "chrome/browser/safe_browsing/client_side_detection_service.h"
#include "chrome/common/safe_browsing/csd.pb.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/page_transition_types.h"
@@ -49,11 +49,12 @@ static void AddFeature(const std::string& feature_name,
VLOG(2) << "Browser feature: " << feature->name() << " " << feature->value();
}
-static void AddNavigationFeatures(const std::string& feature_prefix,
- const NavigationController& controller,
- int index,
- const std::vector<GURL>& redirect_chain,
- ClientPhishingRequest* request) {
+static void AddNavigationFeatures(
+ const std::string& feature_prefix,
+ const content::NavigationController& controller,
+ int index,
+ const std::vector<GURL>& redirect_chain,
+ ClientPhishingRequest* request) {
NavigationEntry* entry = controller.GetEntryAtIndex(index);
bool is_secure_referrer = entry->GetReferrer().url.SchemeIsSecure();
if (!is_secure_referrer) {
@@ -155,7 +156,7 @@ void BrowserFeatureExtractor::ExtractFeatures(const BrowseInfo* info,
}
// Extract features pertaining to this navigation.
- const NavigationController& controller = tab_->GetController();
+ const content::NavigationController& controller = tab_->GetController();
int url_index = -1;
int first_host_index = -1;
diff --git a/chrome/browser/safe_browsing/client_side_detection_host.cc b/chrome/browser/safe_browsing/client_side_detection_host.cc
index d5617f8..c850f9e 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host.cc
@@ -25,8 +25,8 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
#include "content/browser/renderer_host/resource_request_details.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/safe_browsing/malware_details.cc b/chrome/browser/safe_browsing/malware_details.cc
index 5eada97..8176b7a 100644
--- a/chrome/browser/safe_browsing/malware_details.cc
+++ b/chrome/browser/safe_browsing/malware_details.cc
@@ -16,8 +16,8 @@
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/common/safe_browsing/safebrowsing_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "net/base/io_buffer.h"
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
index 062b794..5a12b66 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page.cc
@@ -28,8 +28,8 @@
#include "chrome/common/jstemplate_builder.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "grit/browser_resources.h"
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 51bbad2..0195c7e 100644
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_test.cc
@@ -21,8 +21,8 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/resource_dispatcher_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/test/test_browser_thread.h"
diff --git a/chrome/browser/sessions/session_restore.cc b/chrome/browser/sessions/session_restore.cc
index 5044040..48e7385 100644
--- a/chrome/browser/sessions/session_restore.cc
+++ b/chrome/browser/sessions/session_restore.cc
@@ -31,9 +31,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_widget_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_service.h"
#include "net/base/network_change_notifier.h"
@@ -69,11 +69,11 @@ class TabLoader : public content::NotificationObserver,
virtual ~TabLoader();
// Schedules a tab for loading.
- void ScheduleLoad(NavigationController* controller);
+ void ScheduleLoad(content::NavigationController* controller);
// Notifies the loader that a tab has been scheduled for loading through
// some other mechanism.
- void TabIsLoading(NavigationController* controller);
+ void TabIsLoading(content::NavigationController* controller);
// Invokes |LoadNextTab| to load a tab.
//
@@ -168,7 +168,7 @@ TabLoader::~TabLoader() {
net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
}
-void TabLoader::ScheduleLoad(NavigationController* controller) {
+void TabLoader::ScheduleLoad(content::NavigationController* controller) {
DCHECK(controller);
DCHECK(find(tabs_to_load_.begin(), tabs_to_load_.end(), controller) ==
tabs_to_load_.end());
@@ -176,7 +176,7 @@ void TabLoader::ScheduleLoad(NavigationController* controller) {
RegisterForNotifications(controller);
}
-void TabLoader::TabIsLoading(NavigationController* controller) {
+void TabLoader::TabIsLoading(content::NavigationController* controller) {
DCHECK(controller);
DCHECK(find(tabs_loading_.begin(), tabs_loading_.end(), controller) ==
tabs_loading_.end());
diff --git a/chrome/browser/sessions/session_types.cc b/chrome/browser/sessions/session_types.cc
index ac689f0..84333c3 100644
--- a/chrome/browser/sessions/session_types.cc
+++ b/chrome/browser/sessions/session_types.cc
@@ -7,7 +7,7 @@
#include "base/string_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
using content::NavigationEntry;
@@ -62,7 +62,7 @@ TabNavigation& TabNavigation::operator=(const TabNavigation& tab) {
// static
NavigationEntry* TabNavigation::ToNavigationEntry(
int page_id, Profile *profile) const {
- NavigationEntry* entry = NavigationController::CreateNavigationEntry(
+ NavigationEntry* entry = content::NavigationController::CreateNavigationEntry(
virtual_url_,
referrer_,
// Use a transition type of reload so that we don't incorrectly
diff --git a/chrome/browser/sessions/tab_restore_service.cc b/chrome/browser/sessions/tab_restore_service.cc
index 4f59a28..1589ff4 100644
--- a/chrome/browser/sessions/tab_restore_service.cc
+++ b/chrome/browser/sessions/tab_restore_service.cc
@@ -27,8 +27,8 @@
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
using base::Time;
@@ -218,7 +218,7 @@ void TabRestoreService::RemoveObserver(TabRestoreServiceObserver* observer) {
observer_list_.RemoveObserver(observer);
}
-void TabRestoreService::CreateHistoricalTab(NavigationController* tab,
+void TabRestoreService::CreateHistoricalTab(content::NavigationController* tab,
int index) {
if (restoring_)
return;
@@ -486,7 +486,7 @@ void TabRestoreService::Save() {
void TabRestoreService::PopulateTab(Tab* tab,
int index,
TabRestoreServiceDelegate* delegate,
- NavigationController* controller) {
+ content::NavigationController* controller) {
const int pending_index = controller->GetPendingEntryIndex();
int entry_count = controller->GetEntryCount();
if (entry_count == 0 && pending_index == 0)
diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h
index c91b7d2..5eab5e6 100644
--- a/chrome/browser/sessions/tab_restore_service.h
+++ b/chrome/browser/sessions/tab_restore_service.h
@@ -19,12 +19,15 @@
#include "content/browser/in_process_webkit/session_storage_namespace.h"
#include "webkit/glue/window_open_disposition.h"
-class NavigationController;
class Profile;
class TabRestoreServiceDelegate;
class TabRestoreServiceObserver;
struct SessionWindow;
+namespace content {
+class NavigationController;
+}
+
// TabRestoreService is responsible for maintaining the most recently closed
// tabs and windows. When a tab is closed
// TabRestoreService::CreateHistoricalTab is invoked and a Tab is created to
@@ -130,7 +133,7 @@ class TabRestoreService : public BaseSessionService {
// Creates a Tab to represent |tab| and notifies observers the list of
// entries has changed.
- void CreateHistoricalTab(NavigationController* tab, int index);
+ void CreateHistoricalTab(content::NavigationController* tab, int index);
// Invoked when a browser is closing. If |delegate| is a tabbed browser with
// at least one tab, a Window is created, added to entries and observers are
@@ -204,7 +207,7 @@ class TabRestoreService : public BaseSessionService {
void PopulateTab(Tab* tab,
int index,
TabRestoreServiceDelegate* delegate,
- NavigationController* controller);
+ content::NavigationController* controller);
// Notifies observers the tabs have changed.
void NotifyTabsChanged();
diff --git a/chrome/browser/sessions/tab_restore_service_browsertest.cc b/chrome/browser/sessions/tab_restore_service_browsertest.cc
index 0022a2e..31e8b40 100644
--- a/chrome/browser/sessions/tab_restore_service_browsertest.cc
+++ b/chrome/browser/sessions/tab_restore_service_browsertest.cc
@@ -12,8 +12,8 @@
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/chrome_render_view_test.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/test/render_view_test.h"
#include "testing/gtest/include/gtest/gtest.h"
diff --git a/chrome/browser/sessions/tab_restore_service_delegate.h b/chrome/browser/sessions/tab_restore_service_delegate.h
index 29ce140..a3a6dda 100644
--- a/chrome/browser/sessions/tab_restore_service_delegate.h
+++ b/chrome/browser/sessions/tab_restore_service_delegate.h
@@ -10,13 +10,13 @@
#include "chrome/browser/sessions/session_id.h"
-class NavigationController;
class Profile;
class SessionStorageNamespace;
class TabContents;
class TabNavigation;
namespace content {
+class NavigationController;
class WebContents;
}
@@ -63,7 +63,7 @@ class TabRestoreServiceDelegate {
// see BrowserList::GetBrowserForController
static TabRestoreServiceDelegate* FindDelegateForController(
- const NavigationController* controller,
+ const content::NavigationController* controller,
int* index);
// see BrowserList::FindBrowserWithID
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index 5bde3f2..e1198e0 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -12,9 +12,9 @@
#include "chrome/common/extensions/extension_sidebar_defaults.h"
#include "chrome/common/extensions/extension_sidebar_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
diff --git a/chrome/browser/ssl/ssl_blocking_page.cc b/chrome/browser/ssl/ssl_blocking_page.cc
index 453d197..ad30ac9 100644
--- a/chrome/browser/ssl/ssl_blocking_page.cc
+++ b/chrome/browser/ssl/ssl_blocking_page.cc
@@ -16,7 +16,7 @@
#include "content/browser/cert_store.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/ssl/ssl_cert_error_handler.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 77e0d3a..5b125a4 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -16,7 +16,7 @@
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/interstitial_page.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/ssl_status.h"
diff --git a/chrome/browser/sync/glue/session_change_processor.cc b/chrome/browser/sync/glue/session_change_processor.cc
index 6402708..79035bc 100644
--- a/chrome/browser/sync/glue/session_change_processor.cc
+++ b/chrome/browser/sync/glue/session_change_processor.cc
@@ -20,7 +20,7 @@
#include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_source.h"
diff --git a/chrome/browser/tab_contents/language_state.cc b/chrome/browser/tab_contents/language_state.cc
index 6c76677..d57c959 100644
--- a/chrome/browser/tab_contents/language_state.cc
+++ b/chrome/browser/tab_contents/language_state.cc
@@ -4,10 +4,12 @@
#include "chrome/browser/tab_contents/language_state.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
+using content::NavigationController;
+
LanguageState::LanguageState(NavigationController* nav_controller)
: navigation_controller_(nav_controller),
page_translatable_(false),
diff --git a/chrome/browser/tab_contents/language_state.h b/chrome/browser/tab_contents/language_state.h
index 8f2abbb..771f013 100644
--- a/chrome/browser/tab_contents/language_state.h
+++ b/chrome/browser/tab_contents/language_state.h
@@ -10,9 +10,8 @@
#include "base/basictypes.h"
-class NavigationController;
-
namespace content {
+class NavigationController;
struct LoadCommittedDetails;
}
@@ -27,7 +26,7 @@ struct LoadCommittedDetails;
class LanguageState {
public:
- explicit LanguageState(NavigationController* nav_controller);
+ explicit LanguageState(content::NavigationController* nav_controller);
~LanguageState();
// Should be called when the page did a new navigation (whether it is a main
@@ -83,7 +82,7 @@ class LanguageState {
std::string prev_current_lang_;
// The navigation controller of the tab we are associated with.
- NavigationController* navigation_controller_;
+ content::NavigationController* navigation_controller_;
// Whether it is OK to offer to translate the page. Some pages explictly
// specify that they should not be translated by the browser (this is the case
diff --git a/chrome/browser/tabs/tab_strip_model.cc b/chrome/browser/tabs/tab_strip_model.cc
index 212d763..6f2e7ed 100644
--- a/chrome/browser/tabs/tab_strip_model.cc
+++ b/chrome/browser/tabs/tab_strip_model.cc
@@ -25,9 +25,9 @@
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_process_host.h"
@@ -154,7 +154,7 @@ void TabStripModel::InsertTabContentsAt(int index,
// confusing by having multiple groups active at the same time.
ForgetAllOpeners();
}
- data->opener = &selected_contents->tab_contents()->GetController();
+ data->opener = &selected_contents->web_contents()->GetController();
}
contents_data_.insert(contents_data_.begin() + index, data);
@@ -178,7 +178,7 @@ TabContentsWrapper* TabStripModel::ReplaceTabContentsAt(
TabContentsWrapper* old_contents = GetContentsAt(index);
ForgetOpenersAndGroupsReferencing(
- &(old_contents->tab_contents()->GetController()));
+ &(old_contents->web_contents()->GetController()));
contents_data_[index]->contents = new_contents;
@@ -246,7 +246,7 @@ TabContentsWrapper* TabStripModel::DetachTabContentsAt(int index) {
delete contents_data_.at(index);
contents_data_.erase(contents_data_.begin() + index);
ForgetOpenersAndGroupsReferencing(
- &(removed_contents->tab_contents()->GetController()));
+ &(removed_contents->web_contents()->GetController()));
if (empty())
closing_all_ = true;
FOR_EACH_OBSERVER(TabStripModelObserver, observers_,
@@ -432,13 +432,16 @@ bool TabStripModel::TabsAreLoading() const {
return false;
}
-NavigationController* TabStripModel::GetOpenerOfTabContentsAt(int index) {
+content::NavigationController* TabStripModel::GetOpenerOfTabContentsAt(
+ int index) {
DCHECK(ContainsIndex(index));
return contents_data_.at(index)->opener;
}
int TabStripModel::GetIndexOfNextTabContentsOpenedBy(
- const NavigationController* opener, int start_index, bool use_group) const {
+ const content::NavigationController* opener,
+ int start_index,
+ bool use_group) const {
DCHECK(opener);
DCHECK(ContainsIndex(start_index));
@@ -456,7 +459,7 @@ int TabStripModel::GetIndexOfNextTabContentsOpenedBy(
}
int TabStripModel::GetIndexOfFirstTabContentsOpenedBy(
- const NavigationController* opener,
+ const content::NavigationController* opener,
int start_index) const {
DCHECK(opener);
DCHECK(ContainsIndex(start_index));
@@ -469,7 +472,7 @@ int TabStripModel::GetIndexOfFirstTabContentsOpenedBy(
}
int TabStripModel::GetIndexOfLastTabContentsOpenedBy(
- const NavigationController* opener, int start_index) const {
+ const content::NavigationController* opener, int start_index) const {
DCHECK(opener);
DCHECK(ContainsIndex(start_index));
@@ -1089,7 +1092,7 @@ void TabStripModel::GetIndicesWithSameDomain(int index,
void TabStripModel::GetIndicesWithSameOpener(int index,
std::vector<int>* indices) {
- NavigationController* opener = contents_data_[index]->group;
+ content::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()->GetController());
@@ -1318,13 +1321,13 @@ void TabStripModel::MoveSelectedTabsToImpl(int index,
// static
bool TabStripModel::OpenerMatches(const TabContentsData* data,
- const NavigationController* opener,
+ const content::NavigationController* opener,
bool use_group) {
return data->opener == opener || (use_group && data->group == opener);
}
void TabStripModel::ForgetOpenersAndGroupsReferencing(
- const NavigationController* tab) {
+ const content::NavigationController* tab) {
for (TabContentsDataVector::const_iterator i = contents_data_.begin();
i != contents_data_.end(); ++i) {
if ((*i)->group == tab)
diff --git a/chrome/browser/tabs/tab_strip_model.h b/chrome/browser/tabs/tab_strip_model.h
index 1a98314..0a5733f 100644
--- a/chrome/browser/tabs/tab_strip_model.h
+++ b/chrome/browser/tabs/tab_strip_model.h
@@ -15,7 +15,6 @@
#include "content/public/browser/notification_registrar.h"
#include "content/public/common/page_transition_types.h"
-class NavigationController;
class Profile;
class TabContents;
class TabContentsWrapper;
@@ -300,26 +299,29 @@ class TabStripModel : public content::NotificationObserver {
bool TabsAreLoading() const;
// Returns the controller controller that opened the TabContents at |index|.
- NavigationController* GetOpenerOfTabContentsAt(int index);
+ content::NavigationController* GetOpenerOfTabContentsAt(int index);
// Returns the index of the next TabContents in the sequence of TabContentses
// spawned by the specified NavigationController after |start_index|.
// If |use_group| is true, the group property of the tab is used instead of
// the opener to find the next tab. Under some circumstances the group
// relationship may exist but the opener may not.
- int GetIndexOfNextTabContentsOpenedBy(const NavigationController* opener,
- int start_index,
- bool use_group) const;
+ int GetIndexOfNextTabContentsOpenedBy(
+ const content::NavigationController* opener,
+ int start_index,
+ bool use_group) const;
// Returns the index of the first TabContents in the model opened by the
// specified opener.
- int GetIndexOfFirstTabContentsOpenedBy(const NavigationController* opener,
- int start_index) const;
+ int GetIndexOfFirstTabContentsOpenedBy(
+ const content::NavigationController* opener,
+ int start_index) const;
// Returns the index of the last TabContents in the model opened by the
// specified opener, starting at |start_index|.
- int GetIndexOfLastTabContentsOpenedBy(const NavigationController* opener,
- int start_index) const;
+ int GetIndexOfLastTabContentsOpenedBy(
+ const content::NavigationController* opener,
+ int start_index) const;
// Called by the Browser when a navigation is about to occur in the specified
// TabContents. Depending on the tab, and the transition type of the
@@ -568,11 +570,12 @@ class TabStripModel : public content::NotificationObserver {
// fall back to check the group relationship as well.
struct TabContentsData;
static bool OpenerMatches(const TabContentsData* data,
- const NavigationController* opener,
+ const content::NavigationController* opener,
bool use_group);
// Sets the group/opener of any tabs that reference |tab| to NULL.
- void ForgetOpenersAndGroupsReferencing(const NavigationController* tab);
+ void ForgetOpenersAndGroupsReferencing(
+ const content::NavigationController* tab);
// Our delegate.
TabStripModelDelegate* delegate_;
@@ -593,7 +596,7 @@ class TabStripModel : public content::NotificationObserver {
// Create a relationship between this TabContents and other TabContentses.
// Used to identify which TabContents to select next after one is closed.
- void SetGroup(NavigationController* a_group) {
+ void SetGroup(content::NavigationController* a_group) {
group = a_group;
opener = a_group;
}
@@ -615,12 +618,12 @@ class TabStripModel : public content::NotificationObserver {
// navigation within that tab, the group relationship is lost). This
// property can safely be used to implement features that depend on a
// logical group of related tabs.
- NavigationController* group;
+ content::NavigationController* group;
// The owner models the same relationship as group, except it is more
// easily discarded, e.g. when the user switches to a tab not part of the
// same group. This property is used to determine what tab to select next
// when one is closed.
- NavigationController* opener;
+ content::NavigationController* opener;
// True if our group should be reset the moment selection moves away from
// this Tab. This is the case for tabs opened in the foreground at the end
// of the TabStrip while viewing another Tab. If these tabs are closed
diff --git a/chrome/browser/tabs/tab_strip_model_order_controller.cc b/chrome/browser/tabs/tab_strip_model_order_controller.cc
index cf3d7a6..e08a110 100644
--- a/chrome/browser/tabs/tab_strip_model_order_controller.cc
+++ b/chrome/browser/tabs/tab_strip_model_order_controller.cc
@@ -39,8 +39,8 @@ int TabStripModelOrderController::DetermineInsertionIndex(
// tab, insert it adjacent to the tab that opened that link.
return tabstrip_->active_index() + delta;
}
- NavigationController* opener =
- &tabstrip_->GetActiveTabContents()->tab_contents()->GetController();
+ content::NavigationController* opener =
+ &tabstrip_->GetActiveTabContents()->web_contents()->GetController();
// Get the index of the next item opened by this tab, and insert after
// it...
int index;
@@ -69,14 +69,14 @@ int TabStripModelOrderController::DetermineNewSelectedIndex(
int removing_index) const {
int tab_count = tabstrip_->count();
DCHECK(removing_index >= 0 && removing_index < tab_count);
- NavigationController* parent_opener =
+ content::NavigationController* parent_opener =
tabstrip_->GetOpenerOfTabContentsAt(removing_index);
// First see if the index being removed has any "child" tabs. If it does, we
// want to select the first in that child group, not the next tab in the same
// group of the removed tab.
- NavigationController* removed_controller =
+ content::NavigationController* removed_controller =
&tabstrip_->GetTabContentsAt(removing_index)->
- tab_contents()->GetController();
+ web_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,
@@ -114,7 +114,7 @@ void TabStripModelOrderController::ActiveTabChanged(
TabContentsWrapper* new_contents,
int index,
bool user_gesture) {
- NavigationController* old_opener = NULL;
+ content::NavigationController* old_opener = NULL;
if (old_contents) {
int index = tabstrip_->GetIndexOfTabContents(old_contents);
if (index != TabStripModel::kNoTab) {
@@ -126,7 +126,7 @@ void TabStripModelOrderController::ActiveTabChanged(
tabstrip_->ForgetGroup(old_contents);
}
}
- NavigationController* new_opener =
+ content::NavigationController* new_opener =
tabstrip_->GetOpenerOfTabContentsAt(index);
if (user_gesture && new_opener != old_opener &&
diff --git a/chrome/browser/tabs/tab_strip_model_unittest.cc b/chrome/browser/tabs/tab_strip_model_unittest.cc
index e8c683d..801af15 100644
--- a/chrome/browser/tabs/tab_strip_model_unittest.cc
+++ b/chrome/browser/tabs/tab_strip_model_unittest.cc
@@ -29,8 +29,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_registrar.h"
@@ -640,7 +640,7 @@ TEST_F(TabStripModelTest, TestBasicOpenerAPI) {
// background with opener_contents set as their opener.
TabContentsWrapper* opener_contents = CreateTabContents();
- NavigationController* opener =
+ content::NavigationController* opener =
&opener_contents->tab_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
TabContentsWrapper* contents1 = CreateTabContents();
@@ -679,7 +679,8 @@ 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()->GetController();
+ content::NavigationController* o1 =
+ &contents1->tab_contents()->GetController();
EXPECT_EQ(-1, tabstrip.GetIndexOfNextTabContentsOpenedBy(o1, 3, false));
EXPECT_EQ(-1, tabstrip.GetIndexOfLastTabContentsOpenedBy(o1, 3));
@@ -792,7 +793,7 @@ TEST_F(TabStripModelTest, TestInsertionIndexDetermination) {
EXPECT_TRUE(tabstrip.empty());
TabContentsWrapper* opener_contents = CreateTabContents();
- NavigationController* opener =
+ content::NavigationController* opener =
&opener_contents->tab_contents()->GetController();
tabstrip.AppendTabContents(opener_contents, true);
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index 5248c49..494ccb8 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -10,7 +10,7 @@
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/translate/translate_infobar_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "grit/generated_resources.h"
diff --git a/chrome/browser/translate/translate_manager.cc b/chrome/browser/translate/translate_manager.cc
index d704de6..d87d91f 100644
--- a/chrome/browser/translate/translate_manager.cc
+++ b/chrome/browser/translate/translate_manager.cc
@@ -35,8 +35,7 @@
#include "chrome/common/translate_errors.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
-#include "content/public/browser/web_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
@@ -44,6 +43,7 @@
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
+#include "content/public/browser/web_contents.h"
#include "content/public/common/url_fetcher.h"
#include "grit/browser_resources.h"
#include "net/base/escape.h"
diff --git a/chrome/browser/ui/auto_login_prompter.cc b/chrome/browser/ui/auto_login_prompter.cc
index 4922dd9..405d2a8 100644
--- a/chrome/browser/ui/auto_login_prompter.cc
+++ b/chrome/browser/ui/auto_login_prompter.cc
@@ -52,7 +52,7 @@ using content::WebContents;
class AutoLoginRedirector : public content::NotificationObserver {
public:
AutoLoginRedirector(TokenService* token_service,
- NavigationController* navigation_controller,
+ content::NavigationController* navigation_controller,
const std::string& args);
virtual ~AutoLoginRedirector();
@@ -66,7 +66,7 @@ class AutoLoginRedirector : public content::NotificationObserver {
// to the desired page.
void RedirectToMergeSession(const std::string& token);
- NavigationController* navigation_controller_;
+ content::NavigationController* navigation_controller_;
const std::string args_;
content::NotificationRegistrar registrar_;
@@ -75,7 +75,7 @@ class AutoLoginRedirector : public content::NotificationObserver {
AutoLoginRedirector::AutoLoginRedirector(
TokenService* token_service,
- NavigationController* navigation_controller,
+ content::NavigationController* navigation_controller,
const std::string& args)
: navigation_controller_(navigation_controller),
args_(args) {
@@ -141,7 +141,7 @@ void AutoLoginRedirector::RedirectToMergeSession(const std::string& token) {
class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate {
public:
AutoLoginInfoBarDelegate(InfoBarTabHelper* owner,
- NavigationController* navigation_controller,
+ content::NavigationController* navigation_controller,
TokenService* token_service,
PrefService* pref_service,
const std::string& username,
@@ -157,7 +157,7 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate {
virtual bool Accept() OVERRIDE;
virtual bool Cancel() OVERRIDE;
- NavigationController* navigation_controller_;
+ content::NavigationController* navigation_controller_;
TokenService* token_service_;
PrefService* pref_service_;
std::string username_;
@@ -168,7 +168,7 @@ class AutoLoginInfoBarDelegate : public ConfirmInfoBarDelegate {
AutoLoginInfoBarDelegate::AutoLoginInfoBarDelegate(
InfoBarTabHelper* owner,
- NavigationController* navigation_controller,
+ content::NavigationController* navigation_controller,
TokenService* token_service,
PrefService* pref_service,
const std::string& username,
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 4805e32..b16321b 100644
--- a/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
+++ b/chrome/browser/ui/blocked_content/blocked_content_tab_helper.cc
@@ -11,7 +11,7 @@
#include "chrome/browser/ui/blocked_content/blocked_content_container.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_details.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
index 5776409..7f2728e 100644
--- a/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
+++ b/chrome/browser/ui/bookmarks/bookmark_tab_helper.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/webui/chrome_web_ui.h"
#include "chrome/common/chrome_notification_types.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
namespace {
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 5b344f8..2033b7a 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -146,12 +146,12 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
#include "content/browser/tab_contents/interstitial_page.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
#include "content/public/browser/devtools_manager.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
@@ -1373,7 +1373,7 @@ bool Browser::CanRestoreTab() {
bool Browser::NavigateToIndexWithDisposition(int index,
WindowOpenDisposition disp) {
- NavigationController& controller =
+ content::NavigationController& controller =
GetOrCloneTabForDisposition(disp)->GetController();
if (index < 0 || index >= controller.GetEntryCount())
return false;
@@ -3103,7 +3103,7 @@ TabContentsWrapper* Browser::CreateTabContentsForURL(
}
bool Browser::CanDuplicateContentsAt(int index) {
- NavigationController& nc = GetTabContentsAt(index)->GetController();
+ content::NavigationController& nc = GetTabContentsAt(index)->GetController();
return nc.GetWebContents() && nc.GetLastCommittedEntry();
}
@@ -4596,7 +4596,7 @@ void Browser::UpdateCommandsForTabState() {
return;
// Navigation commands
- NavigationController& nc = current_tab->GetController();
+ content::NavigationController& nc = current_tab->GetController();
command_updater_.UpdateCommandEnabled(IDC_BACK, nc.CanGoBack());
command_updater_.UpdateCommandEnabled(IDC_FORWARD, nc.CanGoForward());
command_updater_.UpdateCommandEnabled(IDC_RELOAD,
diff --git a/chrome/browser/ui/browser_tab_restore_service_delegate.cc b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
index 2a64ba5..32ffe02 100644
--- a/chrome/browser/ui/browser_tab_restore_service_delegate.cc
+++ b/chrome/browser/ui/browser_tab_restore_service_delegate.cc
@@ -7,7 +7,7 @@
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_window.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
using content::WebContents;
@@ -82,7 +82,7 @@ TabRestoreServiceDelegate* TabRestoreServiceDelegate::Create(Profile* profile) {
// static
TabRestoreServiceDelegate* TabRestoreServiceDelegate::FindDelegateForController(
- const NavigationController* controller,
+ const content::NavigationController* controller,
int* index) {
Browser* browser = Browser::GetBrowserForController(controller, index);
if (browser)
diff --git a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
index 323e17e..de73ebd 100644
--- a/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
+++ b/chrome/browser/ui/cocoa/applescript/tab_applescript.mm
@@ -20,8 +20,8 @@
#include "chrome/common/url_constants.h"
#include "content/browser/download/save_package.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents_delegate.h"
#include "googleurl/src/gurl.h"
@@ -308,21 +308,21 @@ static NSAppleEventDescriptor* valueToDescriptor(Value* value) {
}
- (void)handlesGoBackScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController =
+ content::NavigationController& navigationController =
tabContents_->tab_contents()->GetController();
if (navigationController.CanGoBack())
navigationController.GoBack();
}
- (void)handlesGoForwardScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController =
+ content::NavigationController& navigationController =
tabContents_->tab_contents()->GetController();
if (navigationController.CanGoForward())
navigationController.GoForward();
}
- (void)handlesReloadScriptCommand:(NSScriptCommand*)command {
- NavigationController& navigationController =
+ content::NavigationController& navigationController =
tabContents_->tab_contents()->GetController();
const bool checkForRepost = true;
navigationController.Reload(checkForRepost);
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 43d0257..54eb98a 100644
--- a/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
+++ b/chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.mm
@@ -7,8 +7,8 @@
#include "base/memory/scoped_nsobject.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_widget_host_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_details.h"
diff --git a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
index 2a0bd59..11cbb56 100644
--- a/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
+++ b/chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm
@@ -51,9 +51,9 @@
#include "chrome/browser/ui/tabs/tab_menu_model.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
diff --git a/chrome/browser/ui/intents/web_intent_picker_controller.cc b/chrome/browser/ui/intents/web_intent_picker_controller.cc
index c370e1a..e406c37 100644
--- a/chrome/browser/ui/intents/web_intent_picker_controller.cc
+++ b/chrome/browser/ui/intents/web_intent_picker_controller.cc
@@ -116,7 +116,8 @@ WebIntentPickerController::WebIntentPickerController(
picker_(NULL),
pending_async_count_(0),
service_tab_(NULL) {
- NavigationController* controller = &wrapper->tab_contents()->GetController();
+ content::NavigationController* controller =
+ &wrapper->tab_contents()->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
content::Source<content::NavigationController>(controller));
registrar_.Add(this, content::NOTIFICATION_TAB_CLOSING,
diff --git a/chrome/browser/ui/login/login_prompt.cc b/chrome/browser/ui/login/login_prompt.cc
index 6162be2..6f6301f 100644
--- a/chrome/browser/ui/login/login_prompt.cc
+++ b/chrome/browser/ui/login/login_prompt.cc
@@ -278,7 +278,7 @@ void LoginHandler::NotifyAuthNeeded() {
content::NotificationService* service =
content::NotificationService::current();
- NavigationController* controller = NULL;
+ content::NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
if (requesting_contents)
@@ -297,7 +297,7 @@ void LoginHandler::NotifyAuthCancelled() {
content::NotificationService* service =
content::NotificationService::current();
- NavigationController* controller = NULL;
+ content::NavigationController* controller = NULL;
TabContents* requesting_contents = GetTabContentsForLogin();
if (requesting_contents)
@@ -321,7 +321,8 @@ void LoginHandler::NotifyAuthSupplied(const string16& username,
content::NotificationService* service =
content::NotificationService::current();
- NavigationController* controller = &requesting_contents->GetController();
+ content::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 dadc9ac..822360a 100644
--- a/chrome/browser/ui/login/login_prompt_browsertest.cc
+++ b/chrome/browser/ui/login/login_prompt_browsertest.cc
@@ -168,7 +168,7 @@ class WindowedNavigationObserver
class WindowedLoadStopObserver
: public WindowedNavigationObserver<content::NOTIFICATION_LOAD_STOP> {
public:
- WindowedLoadStopObserver(NavigationController* controller,
+ WindowedLoadStopObserver(content::NavigationController* controller,
int notification_count)
: WindowedNavigationObserver<content::NOTIFICATION_LOAD_STOP>(controller),
remaining_notification_count_(notification_count) {}
@@ -244,7 +244,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, PrefetchAuthCancels) {
TabContentsWrapper* contents =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -271,7 +272,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, TestCancelAuth) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -370,7 +372,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmCancellation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -423,7 +426,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, MultipleRealmConfirmation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -476,7 +480,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, IncorrectConfirmation) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -548,7 +553,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, NoLoginPromptForFavicon) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -605,7 +611,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, BlockCrossdomainPrompt) {
TabContentsWrapper* contents = browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
observer.Register(content::Source<content::NavigationController>(controller));
@@ -672,7 +679,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) {
TabContentsWrapper* contents_1 =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_1);
- NavigationController* controller_1 =
+ content::NavigationController* controller_1 =
&contents_1->web_contents()->GetController();
// Open a new tab.
@@ -687,7 +694,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, SupplyRedundantAuths) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_2);
ASSERT_NE(contents_1, contents_2);
- NavigationController* controller_2 =
+ content::NavigationController* controller_2 =
&contents_2->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
@@ -742,7 +749,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) {
TabContentsWrapper* contents_1 =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_1);
- NavigationController* controller_1 =
+ content::NavigationController* controller_1 =
&contents_1->web_contents()->GetController();
// Open a new tab.
@@ -757,7 +764,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest, CancelRedundantAuths) {
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_2);
ASSERT_NE(contents_1, contents_2);
- NavigationController* controller_2 =
+ content::NavigationController* controller_2 =
&contents_2->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
@@ -813,7 +820,8 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
TabContentsWrapper* contents =
browser()->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents);
- NavigationController* controller = &contents->web_contents()->GetController();
+ content::NavigationController* controller =
+ &contents->web_contents()->GetController();
// Open an incognito window.
Browser* browser_incognito = CreateIncognitoBrowser();
@@ -823,7 +831,7 @@ IN_PROC_BROWSER_TEST_F(LoginPromptBrowserTest,
browser_incognito->GetSelectedTabContentsWrapper();
ASSERT_TRUE(contents_incognito);
ASSERT_NE(contents, contents_incognito);
- NavigationController* controller_incognito =
+ content::NavigationController* controller_incognito =
&contents_incognito->web_contents()->GetController();
LoginPromptBrowserTestObserver observer;
diff --git a/chrome/browser/ui/pdf/pdf_browsertest.cc b/chrome/browser/ui/pdf/pdf_browsertest.cc
index 52b6902..bbe9f98 100644
--- a/chrome/browser/ui/pdf/pdf_browsertest.cc
+++ b/chrome/browser/ui/pdf/pdf_browsertest.cc
@@ -16,7 +16,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/web_contents.h"
#include "net/test/test_server.h"
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 a4dc987..8db0224 100644
--- a/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
+++ b/chrome/browser/ui/search_engines/search_engine_tab_helper.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/search_engines/template_url_service_factory.h"
#include "chrome/browser/ui/search_engines/template_url_fetcher_ui_callbacks.h"
#include "chrome/common/render_messages.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/frame_navigate_params.h"
@@ -92,7 +92,8 @@ void SearchEngineTabHelper::OnPageHasOSDD(
return;
}
- const NavigationController& controller = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
const NavigationEntry* entry = controller.GetLastCommittedEntry();
DCHECK(entry);
@@ -142,7 +143,8 @@ void SearchEngineTabHelper::GenerateKeywordIfNecessary(
if (profile->IsOffTheRecord())
return;
- const NavigationController& controller = web_contents()->GetController();
+ const content::NavigationController& controller =
+ web_contents()->GetController();
int last_index = controller.GetLastCommittedEntryIndex();
// 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 024fc1a..70b8d5d 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
@@ -4,12 +4,12 @@
#include "chrome/browser/ui/sync/tab_contents_wrapper_synced_tab_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "chrome/browser/extensions/extension_tab_helper.h"
#include "chrome/browser/sessions/restore_tab_helper.h"
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/extensions/extension.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
using content::NavigationEntry;
diff --git a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
index 8562be2..a4dc58b 100644
--- a/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
+++ b/chrome/browser/ui/tab_modal_confirm_dialog_delegate.cc
@@ -17,7 +17,7 @@ TabModalConfirmDialogDelegate::TabModalConfirmDialogDelegate(
WebContents* web_contents)
: window_(NULL),
closing_(false) {
- NavigationController* controller = &web_contents->GetController();
+ content::NavigationController* controller = &web_contents->GetController();
registrar_.Add(this, content::NOTIFICATION_LOAD_START,
content::Source<content::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 a86b97e..299d11f 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model.cc
@@ -16,8 +16,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/favicon_status.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
@@ -335,7 +335,7 @@ int BackForwardMenuModel::GetChapterStopCount(int history_items) const {
int BackForwardMenuModel::GetIndexOfNextChapterStop(int start_from,
bool forward) const {
WebContents* contents = GetWebContents();
- NavigationController& controller = contents->GetController();
+ content::NavigationController& controller = contents->GetController();
int max_count = controller.GetEntryCount();
if (start_from < 0 || start_from >= max_count)
@@ -445,7 +445,7 @@ int BackForwardMenuModel::MenuIndexToNavEntryIndex(int index) const {
NavigationEntry* BackForwardMenuModel::GetNavigationEntry(int index) const {
int controller_index = MenuIndexToNavEntryIndex(index);
- NavigationController& controller = GetWebContents()->GetController();
+ content::NavigationController& controller = GetWebContents()->GetController();
if (controller_index >= 0 && controller_index < controller.GetEntryCount())
return controller.GetEntryAtIndex(controller_index);
diff --git a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
index 6c3efa5..09bfc39 100644
--- a/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
+++ b/chrome/browser/ui/toolbar/back_forward_menu_model_unittest.cc
@@ -14,8 +14,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "chrome/test/base/testing_profile.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/test/test_browser_thread.h"
diff --git a/chrome/browser/ui/toolbar/toolbar_model.cc b/chrome/browser/ui/toolbar/toolbar_model.cc
index 455173b..175828f 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.cc
+++ b/chrome/browser/ui/toolbar/toolbar_model.cc
@@ -15,9 +15,9 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/cert_store.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/ssl_status.h"
#include "content/public/common/content_constants.h"
@@ -44,7 +44,8 @@ string16 ToolbarModel::GetText() const {
GURL url(chrome::kAboutBlankURL);
std::string languages; // Empty if we don't have a |navigation_controller|.
- NavigationController* navigation_controller = GetNavigationController();
+ content::NavigationController* navigation_controller =
+ GetNavigationController();
if (navigation_controller) {
Profile* profile =
Profile::FromBrowserContext(navigation_controller->GetBrowserContext());
@@ -74,7 +75,8 @@ bool ToolbarModel::ShouldDisplayURL() const {
// - The view-source test must come before the WebUI test because of the case
// of view-source:chrome://newtab, which should display its URL despite what
// chrome://newtab's WebUI says.
- NavigationController* controller = GetNavigationController();
+ content::NavigationController* controller =
+ GetNavigationController();
NavigationEntry* entry = controller ? controller->GetVisibleEntry() : NULL;
if (entry) {
if (entry->IsViewSourceMode() ||
@@ -97,7 +99,8 @@ ToolbarModel::SecurityLevel ToolbarModel::GetSecurityLevel() const {
if (input_in_progress_) // When editing, assume no security style.
return NONE;
- NavigationController* navigation_controller = GetNavigationController();
+ content::NavigationController* navigation_controller =
+ GetNavigationController();
if (!navigation_controller) // We might not have a controller on init.
return NONE;
@@ -169,7 +172,7 @@ string16 ToolbarModel::GetEVCertName(const net::X509Certificate& cert) {
UTF8ToUTF16(cert.subject().country_name));
}
-NavigationController* ToolbarModel::GetNavigationController() const {
+content::NavigationController* ToolbarModel::GetNavigationController() const {
// This |current_tab| can be NULL during the initialization of the
// toolbar during window creation (i.e. before any tabs have been added
// to the window).
diff --git a/chrome/browser/ui/toolbar/toolbar_model.h b/chrome/browser/ui/toolbar/toolbar_model.h
index ecc4a48..e15fed6 100644
--- a/chrome/browser/ui/toolbar/toolbar_model.h
+++ b/chrome/browser/ui/toolbar/toolbar_model.h
@@ -12,7 +12,10 @@
#include "base/string16.h"
class Browser;
+
+namespace content {
class NavigationController;
+}
namespace net {
class X509Certificate;
@@ -70,7 +73,7 @@ class ToolbarModel {
// Returns the navigation controller used to retrieve the navigation entry
// from which the states are retrieved.
// If this returns NULL, default values are used.
- NavigationController* GetNavigationController() const;
+ content::NavigationController* GetNavigationController() const;
Browser* browser_;
diff --git a/chrome/browser/ui/views/location_bar/click_handler.cc b/chrome/browser/ui/views/location_bar/click_handler.cc
index a4f7a5d..4c69b7f 100644
--- a/chrome/browser/ui/views/location_bar/click_handler.cc
+++ b/chrome/browser/ui/views/location_bar/click_handler.cc
@@ -6,8 +6,8 @@
#include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
#include "chrome/browser/ui/views/location_bar/location_bar_view.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "ui/views/view.h"
diff --git a/chrome/browser/ui/views/sad_tab_view.cc b/chrome/browser/ui/views/sad_tab_view.cc
index 47ab21d..6391dd4 100644
--- a/chrome/browser/ui/views/sad_tab_view.cc
+++ b/chrome/browser/ui/views/sad_tab_view.cc
@@ -11,8 +11,8 @@
#include "chrome/browser/ui/webui/bug_report_ui.h"
#include "chrome/browser/userfeedback/proto/extension.pb.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/web_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
diff --git a/chrome/browser/ui/webui/active_downloads_ui.cc b/chrome/browser/ui/webui/active_downloads_ui.cc
index 0984d28..c9503dc 100644
--- a/chrome/browser/ui/webui/active_downloads_ui.cc
+++ b/chrome/browser/ui/webui/active_downloads_ui.cc
@@ -44,9 +44,9 @@
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/download_item.h"
#include "content/public/browser/download_manager.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "grit/browser_resources.h"
diff --git a/chrome/browser/ui/webui/bug_report_ui.cc b/chrome/browser/ui/webui/bug_report_ui.cc
index efe3141..8f3eb9b 100644
--- a/chrome/browser/ui/webui/bug_report_ui.cc
+++ b/chrome/browser/ui/webui/bug_report_ui.cc
@@ -26,8 +26,8 @@
#include "chrome/browser/ui/window_snapshot/window_snapshot.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_message_handler.h"
diff --git a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
index 925284a..94f9385 100644
--- a/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
+++ b/chrome/browser/ui/webui/cloud_print_signin_dialog.cc
@@ -19,8 +19,8 @@
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "content/browser/renderer_host/render_view_host.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/tab_contents_view.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
@@ -65,7 +65,7 @@ CloudPrintSigninFlowHandler::CloudPrintSigninFlowHandler(
void CloudPrintSigninFlowHandler::RegisterMessages() {
if (web_ui() && web_ui()->web_contents()) {
- NavigationController* controller =
+ content::NavigationController* controller =
&web_ui()->web_contents()->GetController();
NavigationEntry* pending_entry = controller->GetPendingEntry();
if (pending_entry)
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 55aad49..594c482 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
@@ -19,7 +19,7 @@
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "grit/chromium_strings.h"
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 c0862f7..b37dd9e 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
@@ -19,7 +19,7 @@
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/browser.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
#include "grit/chromium_strings.h"
diff --git a/chrome/browser/ui/webui/options2/personal_options_handler2.cc b/chrome/browser/ui/webui/options2/personal_options_handler2.cc
index 34daf54..22de251 100644
--- a/chrome/browser/ui/webui/options2/personal_options_handler2.cc
+++ b/chrome/browser/ui/webui/options2/personal_options_handler2.cc
@@ -33,7 +33,7 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/net/gaia/google_service_auth_error.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents.h"
diff --git a/chrome/browser/ui/webui/print_preview_handler.cc b/chrome/browser/ui/webui/print_preview_handler.cc
index c81ea3b..44bb85d 100644
--- a/chrome/browser/ui/webui/print_preview_handler.cc
+++ b/chrome/browser/ui/webui/print_preview_handler.cc
@@ -42,9 +42,9 @@
#include "chrome/common/print_messages.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/render_view_host_delegate.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/webui/web_ui.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "printing/backend/print_backend.h"
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 3b1cc67..13923b4 100644
--- a/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
+++ b/chrome/browser/ui/webui/sync_promo/sync_promo_handler.cc
@@ -21,7 +21,7 @@
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
diff --git a/chrome/browser/ui/webui/web_ui_browsertest.cc b/chrome/browser/ui/webui/web_ui_browsertest.cc
index 650d132..a66efaa 100644
--- a/chrome/browser/ui/webui/web_ui_browsertest.cc
+++ b/chrome/browser/ui/webui/web_ui_browsertest.cc
@@ -22,7 +22,7 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/test_tab_strip_model_observer.h"
#include "chrome/test/base/ui_test_utils.h"
-#include "content/browser/tab_contents/navigation_controller.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_ui_message_handler.h"
#include "testing/gmock/include/gmock/gmock.h"
diff --git a/chrome/browser/ui/webui/web_ui_unittest.cc b/chrome/browser/ui/webui/web_ui_unittest.cc
index e022e93..c586de7 100644
--- a/chrome/browser/ui/webui/web_ui_unittest.cc
+++ b/chrome/browser/ui/webui/web_ui_unittest.cc
@@ -9,8 +9,8 @@
#include "chrome/common/url_constants.h"
#include "chrome/test/base/testing_profile.h"
#include "content/browser/site_instance.h"
-#include "content/browser/tab_contents/navigation_controller.h"
#include "content/browser/tab_contents/test_tab_contents.h"
+#include "content/public/browser/navigation_controller.h"
#include "content/test/test_browser_thread.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -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->GetController();
+ content::NavigationController* controller = &contents->GetController();
// Start a pending load.
GURL new_tab_url(chrome::kChromeUINewTabURL);