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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 // Create the swapped out RVH for the new SiteInstance. This will create | 224 // Create the swapped out RVH for the new SiteInstance. This will create |
225 // a top-level swapped out RFH as well, which will then be wrapped by a | 225 // a top-level swapped out RFH as well, which will then be wrapped by a |
226 // RenderFrameProxyHost. | 226 // RenderFrameProxyHost. |
227 if (!source || !source->IsMainFrame()) { | 227 if (!source || !source->IsMainFrame()) { |
228 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance); | 228 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance); |
229 if (!render_view_host) { | 229 if (!render_view_host) { |
230 if (RenderFrameHostManager::IsSwappedOutStateForbidden()) { | 230 if (RenderFrameHostManager::IsSwappedOutStateForbidden()) { |
231 root()->render_manager()->CreateRenderFrameProxy(site_instance); | 231 root()->render_manager()->CreateRenderFrameProxy(site_instance); |
232 } else { | 232 } else { |
233 root()->render_manager()->CreateRenderFrame( | 233 root()->render_manager()->CreateRenderFrame( |
234 site_instance, nullptr, MSG_ROUTING_NONE, | 234 site_instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, |
235 CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr); | 235 nullptr); |
236 } | 236 } |
237 } else { | 237 } else { |
238 root()->render_manager()->EnsureRenderViewInitialized(render_view_host, | 238 root()->render_manager()->EnsureRenderViewInitialized(render_view_host, |
239 site_instance); | 239 site_instance); |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
243 scoped_refptr<SiteInstance> instance(site_instance); | 243 scoped_refptr<SiteInstance> instance(site_instance); |
244 | 244 |
245 // Proxies are created in the FrameTree in response to a node navigating to a | 245 // Proxies are created in the FrameTree in response to a node navigating to a |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
397 load_progress_ = 0.0; | 397 load_progress_ = 0.0; |
398 } | 398 } |
399 | 399 |
400 bool FrameTree::IsLoading() { | 400 bool FrameTree::IsLoading() { |
401 bool is_loading = false; | 401 bool is_loading = false; |
402 ForEach(base::Bind(&IsNodeLoading, &is_loading)); | 402 ForEach(base::Bind(&IsNodeLoading, &is_loading)); |
403 return is_loading; | 403 return is_loading; |
404 } | 404 } |
405 | 405 |
406 } // namespace content | 406 } // namespace content |
OLD | NEW |