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

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 600553003: Enable swapping a frame back in to its parent process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remoteToLocal
Patch Set: Created 6 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/frame_host/frame_tree.h" 5 #include "content/browser/frame_host/frame_tree.h"
6 6
7 #include <queue> 7 #include <queue>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return true; 52 return true;
53 } 53 }
54 54
55 bool CreateProxyForSiteInstance(FrameTreeNode* source_node, 55 bool CreateProxyForSiteInstance(FrameTreeNode* source_node,
56 const scoped_refptr<SiteInstance>& instance, 56 const scoped_refptr<SiteInstance>& instance,
57 FrameTreeNode* node) { 57 FrameTreeNode* node) {
58 // Skip the node that initiated the creation. 58 // Skip the node that initiated the creation.
59 if (source_node == node) 59 if (source_node == node)
60 return true; 60 return true;
61 61
62 // If a given frame host has the same SiteInstance, no proxy is needed.
63 if (node->render_manager()->current_frame_host()->GetSiteInstance() ==
Nate Chapin 2014/09/30 21:44:47 If we're swapping a LocalFrame in place of a Remot
Charlie Reis 2014/09/30 23:02:43 Hmm, it feels wrong to be calling this function on
nasko 2014/10/08 16:42:58 CreateRenderFrameProxy already takes care of the c
Nate Chapin 2014/10/08 20:30:05 CreateRenderFrameProxy indeed correctly handles wh
Charlie Reis 2014/10/08 20:49:50 I keep hitting that CHECK as well. I think Nasko
nasko 2014/10/08 20:56:44 I think the CHECK should be there and is valid. Ch
64 instance)
65 return true;
66
62 node->render_manager()->CreateRenderFrameProxy(instance.get()); 67 node->render_manager()->CreateRenderFrameProxy(instance.get());
63 return true; 68 return true;
64 } 69 }
65 70
66 } // namespace 71 } // namespace
67 72
68 FrameTree::FrameTree(Navigator* navigator, 73 FrameTree::FrameTree(Navigator* navigator,
69 RenderFrameHostDelegate* render_frame_delegate, 74 RenderFrameHostDelegate* render_frame_delegate,
70 RenderViewHostDelegate* render_view_delegate, 75 RenderViewHostDelegate* render_view_delegate,
71 RenderWidgetHostDelegate* render_widget_delegate, 76 RenderWidgetHostDelegate* render_widget_delegate,
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 rvh->Shutdown(); 328 rvh->Shutdown();
324 render_view_host_pending_shutdown_map_.erase(multi_iter); 329 render_view_host_pending_shutdown_map_.erase(multi_iter);
325 } 330 }
326 break; 331 break;
327 } 332 }
328 CHECK(render_view_host_found); 333 CHECK(render_view_host_found);
329 } 334 }
330 } 335 }
331 336
332 } // namespace content 337 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698