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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 281663002: Create RenderFrameProxyHost at time of swap-out instead of commit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ready for review Created 6 years, 7 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
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index a5ff5cdcd4a29898e5344cda5b1777c0d969d2ed..e40e72c8193e623326beafdda7975c9f24c46086 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -15,6 +15,7 @@
#include "content/browser/frame_host/frame_tree_node.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/render_frame_host_delegate.h"
+#include "content/browser/frame_host/render_frame_proxy_host.h"
#include "content/browser/renderer_host/input/input_router.h"
#include "content/browser/renderer_host/input/timeout_monitor.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
@@ -244,6 +245,11 @@ bool RenderFrameHostImpl::Send(IPC::Message* message) {
make_scoped_ptr(message));
}
+ if (render_view_host_->IsSwappedOut()) {
+ DCHECK(render_frame_proxy_);
+ return render_frame_proxy_->Send(message);
+ }
+
return GetProcess()->Send(message);
}
@@ -508,7 +514,7 @@ void RenderFrameHostImpl::OnCrossSiteResponse(
should_replace_current_entry);
}
-void RenderFrameHostImpl::SwapOut() {
+void RenderFrameHostImpl::SwapOut(RenderFrameProxyHost* proxy) {
// TODO(creis): Move swapped out state to RFH. Until then, only update it
// when swapping out the main frame.
if (!GetParent()) {
@@ -524,8 +530,10 @@ void RenderFrameHostImpl::SwapOut() {
RenderViewHostImpl::kUnloadTimeoutMS));
}
+ set_render_frame_proxy(proxy);
+
if (render_view_host_->IsRenderViewLive())
- Send(new FrameMsg_SwapOut(routing_id_));
+ Send(new FrameMsg_SwapOut(routing_id_, proxy->GetRoutingID()));
if (!GetParent())
delegate_->SwappedOut(this);

Powered by Google App Engine
This is Rietveld 408576698