Chromium Code Reviews| Index: content/browser/frame_host/render_frame_host_manager.cc |
| diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc |
| index 19e790617f40fdcfdcf8951d6bf6db5d89a529b2..bb1bfd6f2f20f04fb818d41d53501baffda0cbd8 100644 |
| --- a/content/browser/frame_host/render_frame_host_manager.cc |
| +++ b/content/browser/frame_host/render_frame_host_manager.cc |
| @@ -1188,13 +1188,28 @@ bool RenderFrameHostManager::InitRenderFrame( |
| return true; |
| int parent_routing_id = MSG_ROUTING_NONE; |
| + int proxy_routing_id = MSG_ROUTING_NONE; |
| if (frame_tree_node_->parent()) { |
| parent_routing_id = frame_tree_node_->parent()->render_manager()-> |
| GetRoutingIdForSiteInstance(render_frame_host->GetSiteInstance()); |
| CHECK_NE(parent_routing_id, MSG_ROUTING_NONE); |
| } |
| + // Check whether there is an existing proxy for this frame in this |
| + // SiteInstance. If there is, the new RenderFrame needs to be able to talk to |
|
Charlie Reis
2014/10/28 20:10:10
nit: talk to -> find
Nate Chapin
2014/10/30 19:00:51
Done.
|
| + // the proxy it is replacing, so that it can fully intiialize itself. |
|
Charlie Reis
2014/10/28 20:10:10
nit: initialize
Nate Chapin
2014/10/30 19:00:51
Done.
|
| + // NOTE: This is the only time that a RenderFrameProxy can be in the same |
|
nasko
2014/10/28 21:58:15
nit: Since this is code in the browser and SiteIns
Nate Chapin
2014/10/30 19:00:50
Done.
|
| + // SiteInstance as its RenderFrame. This is only the case until the |
| + // RenderFrame commits, at which point it will replace and delete the |
| + // RenderFrameProxy. |
| + RenderFrameProxyHost* existing_proxy = |
| + GetRenderFrameProxyHost(render_frame_host->GetSiteInstance()); |
| + if (existing_proxy) { |
| + proxy_routing_id = existing_proxy->GetRoutingID(); |
| + CHECK_NE(proxy_routing_id, MSG_ROUTING_NONE); |
| + } |
| return delegate_->CreateRenderFrameForRenderManager(render_frame_host, |
| - parent_routing_id); |
| + parent_routing_id, |
| + proxy_routing_id); |
| } |
| int RenderFrameHostManager::GetRoutingIdForSiteInstance( |