Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Side by Side Diff: content/browser/frame_host/frame_tree.cc

Issue 1426403006: Reland #1 of: Move WebUI ownership from the RenderFrameHostManager to the RenderFrameHost. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address CR comments. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 // Create the swapped out RVH for the new SiteInstance. This will create 237 // Create the swapped out RVH for the new SiteInstance. This will create
238 // a top-level swapped out RFH as well, which will then be wrapped by a 238 // a top-level swapped out RFH as well, which will then be wrapped by a
239 // RenderFrameProxyHost. 239 // RenderFrameProxyHost.
240 if (!source || !source->IsMainFrame()) { 240 if (!source || !source->IsMainFrame()) {
241 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance); 241 RenderViewHostImpl* render_view_host = GetRenderViewHost(site_instance);
242 if (!render_view_host) { 242 if (!render_view_host) {
243 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) { 243 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
244 root()->render_manager()->CreateRenderFrameProxy(site_instance); 244 root()->render_manager()->CreateRenderFrameProxy(site_instance);
245 } else { 245 } else {
246 root()->render_manager()->CreateRenderFrame( 246 root()->render_manager()->CreateRenderFrame(
247 site_instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, 247 site_instance, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr);
248 nullptr);
249 } 248 }
250 } else { 249 } else {
251 root()->render_manager()->EnsureRenderViewInitialized(render_view_host, 250 root()->render_manager()->EnsureRenderViewInitialized(render_view_host,
252 site_instance); 251 site_instance);
253 } 252 }
254 } 253 }
255 254
256 scoped_refptr<SiteInstance> instance(site_instance); 255 scoped_refptr<SiteInstance> instance(site_instance);
257 256
258 // Proxies are created in the FrameTree in response to a node navigating to a 257 // Proxies are created in the FrameTree in response to a node navigating to a
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 // This is only used to set page-level focus in cross-process subframes, and 446 // This is only used to set page-level focus in cross-process subframes, and
448 // requests to set focus in main frame's SiteInstance are ignored. 447 // requests to set focus in main frame's SiteInstance are ignored.
449 if (instance != root_manager->current_frame_host()->GetSiteInstance()) { 448 if (instance != root_manager->current_frame_host()->GetSiteInstance()) {
450 RenderFrameProxyHost* proxy = 449 RenderFrameProxyHost* proxy =
451 root_manager->GetRenderFrameProxyHost(instance); 450 root_manager->GetRenderFrameProxyHost(instance);
452 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused)); 451 proxy->Send(new InputMsg_SetFocus(proxy->GetRoutingID(), is_focused));
453 } 452 }
454 } 453 }
455 454
456 } // namespace content 455 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/frame_host/navigator_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698