Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5372)

Unified Diff: chrome/browser/tab_contents/render_view_host_manager.cc

Issue 208040: Remove all direct references to NavigationController from the RenderViewHostM... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/tab_contents/render_view_host_manager.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/render_view_host_manager.cc
===================================================================
--- chrome/browser/tab_contents/render_view_host_manager.cc (revision 26649)
+++ chrome/browser/tab_contents/render_view_host_manager.cc (working copy)
@@ -95,11 +95,7 @@
RenderViewHostSwitchedDetails details;
details.new_host = render_view_host_;
details.old_host = NULL;
- NotificationService::current()->Notify(
- NotificationType::RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(
- &delegate_->GetControllerForRenderManager()),
- Details<RenderViewHostSwitchedDetails>(&details));
+ delegate_->NotifyRenderViewHostSwitchedFromRenderManager(&details);
}
}
@@ -369,12 +365,14 @@
// For now, though, we're in a hybrid model where you only switch
// SiteInstances if you type in a cross-site URL. This means we have to
// compare the entry's URL to the last committed entry's URL.
- NavigationController& controller = delegate_->GetControllerForRenderManager();
- NavigationEntry* curr_entry = controller.GetLastCommittedEntry();
+
+ NavigationEntry* curr_entry =
+ delegate_->GetLastCommittedNavigationEntryForRenderManager();
+
if (interstitial_page_) {
// The interstitial is currently the last committed entry, but we want to
// compare against the last non-interstitial entry.
- curr_entry = controller.GetEntryAtOffset(-1);
+ curr_entry = delegate_->GetEntryAtOffsetForRenderManager(-1);
}
// If there is no last non-interstitial entry (and curr_instance already
// has a site), then we must have been opened from another tab. We want
@@ -399,7 +397,7 @@
// that page, we want to explicity ignore that BrowsingInstance and group
// this page into the appropriate SiteInstance for its URL.
return SiteInstance::CreateSiteInstanceForURL(
- delegate_->GetControllerForRenderManager().profile(), dest_url);
+ delegate_->GetProfileForRenderManager(), dest_url);
} else {
// Start the new renderer in a new SiteInstance, but in the current
// BrowsingInstance. It is important to immediately give this new
@@ -412,7 +410,7 @@
bool RenderViewHostManager::CreatePendingRenderView(SiteInstance* instance) {
NavigationEntry* curr_entry =
- delegate_->GetControllerForRenderManager().GetLastCommittedEntry();
+ delegate_->GetLastCommittedNavigationEntryForRenderManager();
if (curr_entry) {
DCHECK(!curr_entry->content_state().empty());
// TODO(creis): Should send a message to the RenderView to let it know
@@ -481,10 +479,7 @@
RenderViewHostSwitchedDetails details;
details.new_host = render_view_host_;
details.old_host = old_render_view_host;
- NotificationService::current()->Notify(
- NotificationType::RENDER_VIEW_HOST_CHANGED,
- Source<NavigationController>(&delegate_->GetControllerForRenderManager()),
- Details<RenderViewHostSwitchedDetails>(&details));
+ delegate_->NotifyRenderViewHostSwitchedFromRenderManager(&details);
old_render_view_host->Shutdown();
« no previous file with comments | « chrome/browser/tab_contents/render_view_host_manager.h ('k') | chrome/browser/tab_contents/tab_contents.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698