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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 SiteInstance* site_instance) { | 179 SiteInstance* site_instance) { |
180 // Create the swapped out RVH for the new SiteInstance. This will create | 180 // Create the swapped out RVH for the new SiteInstance. This will create |
181 // a top-level swapped out RFH as well, which will then be wrapped by a | 181 // a top-level swapped out RFH as well, which will then be wrapped by a |
182 // RenderFrameProxyHost. | 182 // RenderFrameProxyHost. |
183 if (!source->IsMainFrame()) { | 183 if (!source->IsMainFrame()) { |
184 RenderViewHostImpl* render_view_host = | 184 RenderViewHostImpl* render_view_host = |
185 source->frame_tree()->GetRenderViewHost(site_instance); | 185 source->frame_tree()->GetRenderViewHost(site_instance); |
186 if (!render_view_host) { | 186 if (!render_view_host) { |
187 root()->render_manager()->CreateRenderFrame(site_instance, | 187 root()->render_manager()->CreateRenderFrame(site_instance, |
188 MSG_ROUTING_NONE, | 188 MSG_ROUTING_NONE, |
189 true, | 189 SWAPPED_OUT | HIDDEN); |
190 false, | |
191 true); | |
192 } | 190 } |
193 } | 191 } |
194 | 192 |
195 scoped_refptr<SiteInstance> instance(site_instance); | 193 scoped_refptr<SiteInstance> instance(site_instance); |
196 ForEach(base::Bind(&CreateProxyForSiteInstance, source, instance)); | 194 ForEach(base::Bind(&CreateProxyForSiteInstance, source, instance)); |
197 } | 195 } |
198 | 196 |
199 void FrameTree::ResetForMainFrameSwap() { | 197 void FrameTree::ResetForMainFrameSwap() { |
200 root_->ResetForNewProcess(); | 198 root_->ResetForNewProcess(); |
201 focused_frame_tree_node_id_ = -1; | 199 focused_frame_tree_node_id_ = -1; |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 rvh->Shutdown(); | 320 rvh->Shutdown(); |
323 render_view_host_pending_shutdown_map_.erase(multi_iter); | 321 render_view_host_pending_shutdown_map_.erase(multi_iter); |
324 } | 322 } |
325 break; | 323 break; |
326 } | 324 } |
327 CHECK(render_view_host_found); | 325 CHECK(render_view_host_found); |
328 } | 326 } |
329 } | 327 } |
330 | 328 |
331 } // namespace content | 329 } // namespace content |
OLD | NEW |