OLD | NEW |
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_node.h" | 5 #include "content/browser/frame_host/frame_tree_node.h" |
6 | 6 |
7 #include <queue> | 7 #include <queue> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/profiler/scoped_tracker.h" | 10 #include "base/profiler/scoped_tracker.h" |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // Child frame must always be created in the same process as the parent. | 127 // Child frame must always be created in the same process as the parent. |
128 CHECK_EQ(process_id, render_manager_.current_host()->GetProcess()->GetID()); | 128 CHECK_EQ(process_id, render_manager_.current_host()->GetProcess()->GetID()); |
129 | 129 |
130 // Initialize the RenderFrameHost for the new node. We always create child | 130 // Initialize the RenderFrameHost for the new node. We always create child |
131 // frames in the same SiteInstance as the current frame, and they can swap to | 131 // frames in the same SiteInstance as the current frame, and they can swap to |
132 // a different one if they navigate away. | 132 // a different one if they navigate away. |
133 child->render_manager()->Init( | 133 child->render_manager()->Init( |
134 render_manager_.current_host()->GetSiteInstance()->GetBrowserContext(), | 134 render_manager_.current_host()->GetSiteInstance()->GetBrowserContext(), |
135 render_manager_.current_host()->GetSiteInstance(), | 135 render_manager_.current_host()->GetSiteInstance(), |
136 render_manager_.current_host()->GetRoutingID(), frame_routing_id, | 136 render_manager_.current_host()->GetRoutingID(), frame_routing_id, |
137 MSG_ROUTING_NONE, 0 /* surface_id */); | 137 MSG_ROUTING_NONE); |
138 child->set_parent(this); | 138 child->set_parent(this); |
139 | 139 |
140 // Other renderer processes in this BrowsingInstance may need to find out | 140 // Other renderer processes in this BrowsingInstance may need to find out |
141 // about the new frame. Create a proxy for the child frame in all | 141 // about the new frame. Create a proxy for the child frame in all |
142 // SiteInstances that have a proxy for the frame's parent, since all frames | 142 // SiteInstances that have a proxy for the frame's parent, since all frames |
143 // in a frame tree should have the same set of proxies. | 143 // in a frame tree should have the same set of proxies. |
144 // TODO(alexmos, nick): We ought to do this for non-oopif too, for openers. | 144 // TODO(alexmos, nick): We ought to do this for non-oopif too, for openers. |
145 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) | 145 if (SiteIsolationPolicy::AreCrossProcessFramesPossible()) |
146 render_manager_.CreateProxiesForChildFrame(child.get()); | 146 render_manager_.CreateProxiesForChildFrame(child.get()); |
147 | 147 |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 // TODO(nasko): see if child frames should send IPCs in site-per-process | 378 // TODO(nasko): see if child frames should send IPCs in site-per-process |
379 // mode. | 379 // mode. |
380 if (!IsMainFrame()) | 380 if (!IsMainFrame()) |
381 return true; | 381 return true; |
382 | 382 |
383 render_manager_.Stop(); | 383 render_manager_.Stop(); |
384 return true; | 384 return true; |
385 } | 385 } |
386 | 386 |
387 } // namespace content | 387 } // namespace content |
OLD | NEW |