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 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 // Create the swapped out RVH for the new SiteInstance. This will create | 235 // Create the swapped out RVH for the new SiteInstance. This will create |
236 // a top-level swapped out RFH as well, which will then be wrapped by a | 236 // a top-level swapped out RFH as well, which will then be wrapped by a |
237 // RenderFrameProxyHost. | 237 // RenderFrameProxyHost. |
238 if (!source || !source->IsMainFrame()) { | 238 if (!source || !source->IsMainFrame()) { |
239 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance); | 239 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance); |
240 if (!render_view_host) { | 240 if (!render_view_host) { |
241 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) { | 241 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) { |
242 root()->render_manager()->CreateRenderFrameProxy(site_instance); | 242 root()->render_manager()->CreateRenderFrameProxy(site_instance); |
243 } else { | 243 } else { |
244 root()->render_manager()->CreateRenderFrame( | 244 root()->render_manager()->CreateRenderFrame( |
245 site_instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, | 245 site_instance, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr); |
246 nullptr); | |
247 } | 246 } |
248 } else { | 247 } else { |
249 root()->render_manager()->EnsureRenderViewInitialized(render_view_host, | 248 root()->render_manager()->EnsureRenderViewInitialized(render_view_host, |
250 site_instance); | 249 site_instance); |
251 } | 250 } |
252 } | 251 } |
253 | 252 |
254 scoped_refptr<SiteInstance> instance(site_instance); | 253 scoped_refptr<SiteInstance> instance(site_instance); |
255 | 254 |
256 // Proxies are created in the FrameTree in response to a node navigating to a | 255 // Proxies are created in the FrameTree in response to a node navigating to a |
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
433 if (instance == root_->current_frame_host()->GetSiteInstance()) | 432 if (instance == root_->current_frame_host()->GetSiteInstance()) |
434 continue; | 433 continue; |
435 | 434 |
436 RenderFrameProxyHost* proxy = | 435 RenderFrameProxyHost* proxy = |
437 root_->render_manager()->GetRenderFrameProxyHost(instance); | 436 root_->render_manager()->GetRenderFrameProxyHost(instance); |
438 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); | 437 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); |
439 } | 438 } |
440 } | 439 } |
441 | 440 |
442 } // namespace content | 441 } // namespace content |
OLD | NEW |