| 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();
|
|
|
|
|