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.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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 void FrameTree::CreateProxiesForSiteInstance( | 198 void FrameTree::CreateProxiesForSiteInstance( |
199 FrameTreeNode* source, | 199 FrameTreeNode* source, |
200 SiteInstance* site_instance) { | 200 SiteInstance* site_instance) { |
201 // Create the swapped out RVH for the new SiteInstance. This will create | 201 // Create the swapped out RVH for the new SiteInstance. This will create |
202 // a top-level swapped out RFH as well, which will then be wrapped by a | 202 // a top-level swapped out RFH as well, which will then be wrapped by a |
203 // RenderFrameProxyHost. | 203 // RenderFrameProxyHost. |
204 if (!source->IsMainFrame()) { | 204 if (!source->IsMainFrame()) { |
205 RenderViewHostImpl* render_view_host = | 205 RenderViewHostImpl* render_view_host = |
206 source->frame_tree()->GetRenderViewHost(site_instance); | 206 source->frame_tree()->GetRenderViewHost(site_instance); |
207 if (!render_view_host) { | 207 if (!render_view_host) { |
208 root()->render_manager()->CreateRenderFrame(site_instance, | 208 root()->render_manager()->CreateSwappedOutHiddenRenderFrame( |
209 MSG_ROUTING_NONE, | 209 site_instance, MSG_ROUTING_NONE, false); |
210 true, | |
211 false, | |
212 true); | |
213 } | 210 } |
214 } | 211 } |
215 | 212 |
216 scoped_refptr<SiteInstance> instance(site_instance); | 213 scoped_refptr<SiteInstance> instance(site_instance); |
217 | 214 |
218 // Proxies are created in the FrameTree in response to a node navigating to a | 215 // Proxies are created in the FrameTree in response to a node navigating to a |
219 // new SiteInstance. Since |source|'s navigation will replace the currently | 216 // new SiteInstance. Since |source|'s navigation will replace the currently |
220 // loaded document, the entire subtree under |source| will be removed. | 217 // loaded document, the entire subtree under |source| will be removed. |
221 ForEach(base::Bind(&CreateProxyForSiteInstance, instance), source); | 218 ForEach(base::Bind(&CreateProxyForSiteInstance, instance), source); |
222 } | 219 } |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 rvh->Shutdown(); | 346 rvh->Shutdown(); |
350 render_view_host_pending_shutdown_map_.erase(multi_iter); | 347 render_view_host_pending_shutdown_map_.erase(multi_iter); |
351 } | 348 } |
352 break; | 349 break; |
353 } | 350 } |
354 CHECK(render_view_host_found); | 351 CHECK(render_view_host_found); |
355 } | 352 } |
356 } | 353 } |
357 | 354 |
358 } // namespace content | 355 } // namespace content |
OLD | NEW |