| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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( | 208 root()->render_manager()->CreateRenderFrame( |
| 209 site_instance, MSG_ROUTING_NONE, | 209 site_instance, nullptr, MSG_ROUTING_NONE, |
| 210 CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN); | 210 CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr); |
| 211 } | 211 } |
| 212 } | 212 } |
| 213 | 213 |
| 214 scoped_refptr<SiteInstance> instance(site_instance); | 214 scoped_refptr<SiteInstance> instance(site_instance); |
| 215 | 215 |
| 216 // Proxies are created in the FrameTree in response to a node navigating to a | 216 // Proxies are created in the FrameTree in response to a node navigating to a |
| 217 // new SiteInstance. Since |source|'s navigation will replace the currently | 217 // new SiteInstance. Since |source|'s navigation will replace the currently |
| 218 // loaded document, the entire subtree under |source| will be removed. | 218 // loaded document, the entire subtree under |source| will be removed. |
| 219 ForEach(base::Bind(&CreateProxyForSiteInstance, instance), source); | 219 ForEach(base::Bind(&CreateProxyForSiteInstance, instance), source); |
| 220 } | 220 } |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 347 rvh->Shutdown(); | 347 rvh->Shutdown(); |
| 348 render_view_host_pending_shutdown_map_.erase(multi_iter); | 348 render_view_host_pending_shutdown_map_.erase(multi_iter); |
| 349 } | 349 } |
| 350 break; | 350 break; |
| 351 } | 351 } |
| 352 CHECK(render_view_host_found); | 352 CHECK(render_view_host_found); |
| 353 } | 353 } |
| 354 } | 354 } |
| 355 | 355 |
| 356 } // namespace content | 356 } // namespace content |
| OLD | NEW |