summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-03 18:27:46 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-01-03 18:27:46 +0000
commitcca0f1e9ca8aa46a9088028ceb1f08e0a3f792b2 (patch)
tree84e486002d42744cea34f59d1b83ab29a0dc5354 /content
parent2a3197bb6a8a4c6f3a7affadce28cda638906131 (diff)
downloadchromium_src-cca0f1e9ca8aa46a9088028ceb1f08e0a3f792b2.zip
chromium_src-cca0f1e9ca8aa46a9088028ceb1f08e0a3f792b2.tar.gz
chromium_src-cca0f1e9ca8aa46a9088028ceb1f08e0a3f792b2.tar.bz2
Convert all the notifications which use NavigationController to content::NavigationController. After this is done, we can then make WebContents return a content::NavigationEntry instead of the impl.
BUG=98716 TBR=joi Review URL: http://codereview.chromium.org/9016047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@116150 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r--content/browser/speech/speech_input_browsertest.cc3
-rw-r--r--content/browser/ssl/ssl_manager.cc6
-rw-r--r--content/browser/tab_contents/interstitial_page.cc4
-rw-r--r--content/browser/tab_contents/navigation_controller.cc12
-rw-r--r--content/browser/tab_contents/navigation_controller_unittest.cc11
-rw-r--r--content/browser/tab_contents/render_view_host_manager.cc4
-rw-r--r--content/browser/tab_contents/render_view_host_manager_unittest.cc6
-rw-r--r--content/browser/tab_contents/tab_contents.cc6
-rw-r--r--content/public/browser/notification_types.h6
9 files changed, 32 insertions, 26 deletions
diff --git a/content/browser/speech/speech_input_browsertest.cc b/content/browser/speech/speech_input_browsertest.cc
index f0f9f2b..c6d6a2f 100644
--- a/content/browser/speech/speech_input_browsertest.cc
+++ b/content/browser/speech/speech_input_browsertest.cc
@@ -165,7 +165,8 @@ class SpeechInputBrowserTest : public InProcessBrowserTest {
WebContents* web_contents = browser()->GetSelectedWebContents();
ui_test_utils::WindowedNotificationObserver observer(
content::NOTIFICATION_LOAD_STOP,
- content::Source<NavigationController>(&web_contents->GetController()));
+ content::Source<content::NavigationController>(
+ &web_contents->GetController()));
web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
mouse_event.type = WebKit::WebInputEvent::MouseUp;
web_contents->GetRenderViewHost()->ForwardMouseEvent(mouse_event);
diff --git a/content/browser/ssl/ssl_manager.cc b/content/browser/ssl/ssl_manager.cc
index 2330516..518217a 100644
--- a/content/browser/ssl/ssl_manager.cc
+++ b/content/browser/ssl/ssl_manager.cc
@@ -109,7 +109,7 @@ SSLManager::SSLManager(NavigationController* controller)
// Subscribe to various notifications.
registrar_.Add(this, content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
- content::Source<NavigationController>(controller_));
+ content::Source<content::NavigationController>(controller_));
registrar_.Add(
this, content::NOTIFICATION_RESOURCE_RESPONSE_STARTED,
content::Source<WebContents>(controller_->tab_contents()));
@@ -118,7 +118,7 @@ SSLManager::SSLManager(NavigationController* controller)
content::Source<WebContents>(controller_->tab_contents()));
registrar_.Add(
this, content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE,
- content::Source<NavigationController>(controller_));
+ content::Source<content::NavigationController>(controller_));
registrar_.Add(
this, content::NOTIFICATION_SSL_INTERNAL_STATE_CHANGED,
content::Source<content::BrowserContext>(
@@ -263,7 +263,7 @@ void SSLManager::UpdateEntry(NavigationEntryImpl* entry) {
if (!entry->GetSSL().Equals(original_ssl_status)) {
content::NotificationService::current()->Notify(
content::NOTIFICATION_SSL_VISIBLE_STATE_CHANGED,
- content::Source<NavigationController>(controller_),
+ content::Source<content::NavigationController>(controller_),
content::NotificationService::NoDetails());
}
}
diff --git a/content/browser/tab_contents/interstitial_page.cc b/content/browser/tab_contents/interstitial_page.cc
index cbc0b29..41d9a32 100644
--- a/content/browser/tab_contents/interstitial_page.cc
+++ b/content/browser/tab_contents/interstitial_page.cc
@@ -211,9 +211,9 @@ void InterstitialPage::Show() {
content::NOTIFICATION_WEB_CONTENTS_DESTROYED,
content::Source<WebContents>(tab_));
notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(&tab_->GetController()));
+ content::Source<content::NavigationController>(&tab_->GetController()));
notification_registrar_.Add(this, content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::Source<NavigationController>(&tab_->GetController()));
+ content::Source<content::NavigationController>(&tab_->GetController()));
}
void InterstitialPage::Hide() {
diff --git a/content/browser/tab_contents/navigation_controller.cc b/content/browser/tab_contents/navigation_controller.cc
index 55e6ce3..dbbf9d4 100644
--- a/content/browser/tab_contents/navigation_controller.cc
+++ b/content/browser/tab_contents/navigation_controller.cc
@@ -52,7 +52,7 @@ void NotifyPrunedEntries(NavigationController* nav_controller,
details.count = count;
content::NotificationService::current()->Notify(
content::NOTIFICATION_NAV_LIST_PRUNED,
- content::Source<NavigationController>(nav_controller),
+ content::Source<content::NavigationController>(nav_controller),
content::Details<content::PrunedDetails>(&details));
}
@@ -178,7 +178,7 @@ NavigationController::~NavigationController() {
content::NotificationService::current()->Notify(
content::NOTIFICATION_TAB_CLOSED,
- content::Source<NavigationController>(this),
+ content::Source<content::NavigationController>(this),
content::NotificationService::NoDetails());
}
@@ -239,7 +239,7 @@ void NavigationController::ReloadInternal(bool check_for_repost,
// with check_for_repost = false.
content::NotificationService::current()->Notify(
content::NOTIFICATION_REPOST_WARNING_SHOWN,
- content::Source<NavigationController>(this),
+ content::Source<content::NavigationController>(this),
content::NotificationService::NoDetails());
pending_reload_ = reload_type;
@@ -300,7 +300,7 @@ void NavigationController::LoadEntry(NavigationEntryImpl* entry) {
pending_entry_ = entry;
content::NotificationService::current()->Notify(
content::NOTIFICATION_NAV_ENTRY_PENDING,
- content::Source<NavigationController>(this),
+ content::Source<content::NavigationController>(this),
content::Details<NavigationEntry>(entry));
NavigateToPendingEntry(NO_RELOAD);
}
@@ -1229,7 +1229,7 @@ void NavigationController::NotifyNavigationEntryCommitted(
content::NotificationService::current()->Notify(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(this),
+ content::Source<content::NavigationController>(this),
notification_details);
}
@@ -1268,7 +1268,7 @@ void NavigationController::NotifyEntryChanged(const NavigationEntry* entry,
det.index = index;
content::NotificationService::current()->Notify(
content::NOTIFICATION_NAV_ENTRY_CHANGED,
- content::Source<NavigationController>(this),
+ content::Source<content::NavigationController>(this),
content::Details<content::EntryChangedDetails>(&det));
}
diff --git a/content/browser/tab_contents/navigation_controller_unittest.cc b/content/browser/tab_contents/navigation_controller_unittest.cc
index b388f6d..e0d6827 100644
--- a/content/browser/tab_contents/navigation_controller_unittest.cc
+++ b/content/browser/tab_contents/navigation_controller_unittest.cc
@@ -48,11 +48,14 @@ class NavigationControllerTest : public RenderViewHostTestHarness {
void RegisterForAllNavNotifications(TestNotificationTracker* tracker,
NavigationController* controller) {
tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_COMMITTED,
- content::Source<NavigationController>(controller));
+ content::Source<content::NavigationController>(
+ controller));
tracker->ListenFor(content::NOTIFICATION_NAV_LIST_PRUNED,
- content::Source<NavigationController>(controller));
+ content::Source<content::NavigationController>(
+ controller));
tracker->ListenFor(content::NOTIFICATION_NAV_ENTRY_CHANGED,
- content::Source<NavigationController>(controller));
+ content::Source<content::NavigationController>(
+ controller));
}
class TestWebContentsDelegate : public content::WebContentsDelegate {
@@ -1393,7 +1396,7 @@ class PrunedListener : public content::NotificationObserver {
explicit PrunedListener(NavigationController* controller)
: notification_count_(0) {
registrar_.Add(this, content::NOTIFICATION_NAV_LIST_PRUNED,
- content::Source<NavigationController>(controller));
+ content::Source<content::NavigationController>(controller));
}
virtual void Observe(int type,
diff --git a/content/browser/tab_contents/render_view_host_manager.cc b/content/browser/tab_contents/render_view_host_manager.cc
index 2e64fd0..0963f8d 100644
--- a/content/browser/tab_contents/render_view_host_manager.cc
+++ b/content/browser/tab_contents/render_view_host_manager.cc
@@ -115,7 +115,7 @@ RenderViewHost* RenderViewHostManager::Navigate(
details.old_host = NULL;
content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(
+ content::Source<content::NavigationController>(
&delegate_->GetControllerForRenderManager()),
content::Details<RenderViewHostSwitchedDetails>(&details));
}
@@ -602,7 +602,7 @@ void RenderViewHostManager::CommitPending() {
details.old_host = old_render_view_host;
content::NotificationService::current()->Notify(
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(
+ content::Source<content::NavigationController>(
&delegate_->GetControllerForRenderManager()),
content::Details<RenderViewHostSwitchedDetails>(&details));
diff --git a/content/browser/tab_contents/render_view_host_manager_unittest.cc b/content/browser/tab_contents/render_view_host_manager_unittest.cc
index 6621154..1b28b01 100644
--- a/content/browser/tab_contents/render_view_host_manager_unittest.cc
+++ b/content/browser/tab_contents/render_view_host_manager_unittest.cc
@@ -294,7 +294,8 @@ TEST_F(RenderViewHostManagerTest, Navigate) {
TestTabContents tab_contents(browser_context(), instance);
notifications.ListenFor(
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(&tab_contents.GetController()));
+ content::Source<content::NavigationController>(
+ &tab_contents.GetController()));
// Create.
RenderViewHostManager manager(&tab_contents, &tab_contents);
@@ -382,7 +383,8 @@ TEST_F(RenderViewHostManagerTest, NavigateWithEarlyReNavigation) {
TestTabContents tab_contents(browser_context(), instance);
notifications.ListenFor(
content::NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
- content::Source<NavigationController>(&tab_contents.GetController()));
+ content::Source<content::NavigationController>(
+ &tab_contents.GetController()));
// Create.
RenderViewHostManager manager(&tab_contents, &tab_contents);
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index f8399ff..b7ebf7e 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -1242,7 +1242,7 @@ void TabContents::OnDidFailProvisionalLoadWithError(
content::NotificationService::current()->Notify(
content::NOTIFICATION_FAIL_PROVISIONAL_LOAD_WITH_ERROR,
- content::Source<NavigationController>(&controller_),
+ content::Source<content::NavigationController>(&controller_),
content::Details<ProvisionalLoadDetails>(&details));
FOR_EACH_OBSERVER(WebContentsObserver,
@@ -1276,7 +1276,7 @@ void TabContents::OnDidLoadResourceFromMemoryCache(
content::NotificationService::current()->Notify(
content::NOTIFICATION_LOAD_FROM_MEMORY_CACHE,
- content::Source<NavigationController>(&controller_),
+ content::Source<content::NavigationController>(&controller_),
content::Details<LoadFromMemoryCacheDetails>(&details));
}
@@ -1438,7 +1438,7 @@ void TabContents::SetIsLoading(bool is_loading,
if (details)
det = content::Details<LoadNotificationDetails>(details);
content::NotificationService::current()->Notify(type,
- content::Source<NavigationController>(&controller_),
+ content::Source<content::NavigationController>(&controller_),
det);
}
diff --git a/content/public/browser/notification_types.h b/content/public/browser/notification_types.h
index 36499c6..0dfdcdd 100644
--- a/content/public/browser/notification_types.h
+++ b/content/public/browser/notification_types.h
@@ -301,9 +301,9 @@ enum NotificationType {
NOTIFICATION_RENDERER_PROCESS_HANG,
// This is sent to notify that the RenderViewHost displayed in a
- // TabContents has changed. Source is the TabContents for which the change
- // happened, details is the previous RenderViewHost (can be NULL when the
- // first RenderViewHost is set).
+ // TabContents has changed. Source is the NavigationController for which the
+ // change happened, details is the previous RenderViewHost (can be NULL when
+ // the first RenderViewHost is set).
NOTIFICATION_RENDER_VIEW_HOST_CHANGED,
// Indicates that the render view host has received an accessibility tree