Index: content/browser/web_contents/web_contents_impl.cc |
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc |
index 471e056e8f341b1a20c801211639f604480d67a0..f24b7aa366bd3cf8c72bf09755acf30fa74a30ad 100644 |
--- a/content/browser/web_contents/web_contents_impl.cc |
+++ b/content/browser/web_contents/web_contents_impl.cc |
@@ -2796,19 +2796,22 @@ bool WebContentsImpl::UpdateTitleForEntry(NavigationEntryImpl* entry, |
return true; |
} |
-void WebContentsImpl::NotifySwapped(RenderViewHost* old_render_view_host) { |
+void WebContentsImpl::NotifySwapped(RenderViewHost* old_host, |
+ RenderViewHost* new_host) { |
// After sending out a swap notification, we need to send a disconnect |
// notification so that clients that pick up a pointer to |this| can NULL the |
// pointer. See Bug 1230284. |
notify_disconnection_ = true; |
FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
- RenderViewHostSwapped(old_render_view_host)); |
+ RenderViewHostSwapped(old_host, new_host)); |
// TODO(avi): Remove. http://crbug.com/170921 |
+ std::pair<RenderViewHost*, RenderViewHost*> details = |
+ std::make_pair(old_host, new_host); |
NotificationService::current()->Notify( |
NOTIFICATION_WEB_CONTENTS_SWAPPED, |
Source<WebContents>(this), |
- Details<RenderViewHost>(old_render_view_host)); |
+ Details<std::pair<RenderViewHost*, RenderViewHost*> >(&details)); |
// Ensure that the associated embedder gets cleared after a RenderViewHost |
// gets swapped, so we don't reuse the same embedder next time a |
@@ -3597,18 +3600,18 @@ void WebContentsImpl::UpdateRenderViewSizeForRenderManager() { |
view_->SizeContents(size); |
} |
-void WebContentsImpl::NotifySwappedFromRenderManager(RenderViewHost* rvh) { |
- NotifySwapped(rvh); |
+void WebContentsImpl::NotifySwappedFromRenderManager(RenderViewHost* old_host, |
+ RenderViewHost* new_host) { |
+ NotifySwapped(old_host, new_host); |
// Make sure the visible RVH reflects the new delegate's preferences. |
if (delegate_) |
view_->SetOverscrollControllerEnabled(delegate_->CanOverscrollContent()); |
- view_->RenderViewSwappedIn(render_manager_.current_host()); |
+ view_->RenderViewSwappedIn(new_host); |
FrameTreeNode* root = NULL; |
- RenderViewHostImpl* new_rvh = static_cast<RenderViewHostImpl*>( |
- render_manager_.current_host()); |
+ RenderViewHostImpl* new_rvh = static_cast<RenderViewHostImpl*>(new_host); |
// We are doing a cross-site navigation and swapping processes. Since frame |
// ids are unique to a process, we need to recreate the frame tree with the |