Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
| index a6f7a4567da0a113b7945b2b8058d651d49377af..271ca687bd2197adfc3b36a620afacc74341af66 100644 |
| --- a/content/browser/renderer_host/render_view_host_impl.cc |
| +++ b/content/browser/renderer_host/render_view_host_impl.cc |
| @@ -25,6 +25,7 @@ |
| #include "base/values.h" |
| #include "cc/base/switches.h" |
| #include "content/browser/bad_message.h" |
| +#include "content/browser/browser_plugin/browser_plugin_guest.h" |
| #include "content/browser/child_process_security_policy_impl.h" |
| #include "content/browser/dom_storage/session_storage_namespace_impl.h" |
| #include "content/browser/frame_host/frame_tree.h" |
| @@ -301,6 +302,16 @@ bool RenderViewHostImpl::CreateRenderView( |
| if (max_page_id > -1) |
| next_page_id = max_page_id + 1; |
| + int proxy_route_id_to_send = proxy_route_id; |
| + // Do not instruct the view to create a proxy if this is a swapped out |
|
nasko
2015/05/28 22:13:46
nit: Either an empty line above the comment or mov
lazyboy
2015/05/29 00:02:24
Done (first one).
|
| + // RenderView for an inner WebContents. |
| + // The proxy will be created using RFHM::SwapFrameWithProxy(). |
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kSitePerProcess) && |
| + BrowserPluginGuest::IsGuest(this)) { |
| + proxy_route_id_to_send = MSG_ROUTING_NONE; |
| + } |
| + |
| ViewMsg_New_Params params; |
| params.renderer_preferences = |
| delegate_->GetRendererPrefs(GetProcess()->GetBrowserContext()); |
| @@ -317,7 +328,7 @@ bool RenderViewHostImpl::CreateRenderView( |
| // Ensure the RenderView sets its opener correctly. |
| params.opener_route_id = opener_route_id; |
| params.swapped_out = !is_active_; |
| - params.proxy_routing_id = proxy_route_id; |
| + params.proxy_routing_id = proxy_route_id_to_send; |
| params.hidden = is_hidden(); |
| params.never_visible = delegate_->IsNeverVisible(); |
| params.window_was_created_with_opener = window_was_created_with_opener; |