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

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

Issue 1341003002: Prepare RFHM for disabling swapped out state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months 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 | no next file » | 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/render_frame_host_manager.h" 5 #include "content/browser/frame_host/render_frame_host_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 (rvh == pending_render_view_host()); 2572 (rvh == pending_render_view_host());
2573 if (rvh && rvh->IsRenderViewLive() && !need_proxy_for_pending_rvh) 2573 if (rvh && rvh->IsRenderViewLive() && !need_proxy_for_pending_rvh)
2574 return; 2574 return;
2575 2575
2576 if (rvh && !rvh->IsRenderViewLive()) { 2576 if (rvh && !rvh->IsRenderViewLive()) {
2577 EnsureRenderViewInitialized(rvh, instance); 2577 EnsureRenderViewInitialized(rvh, instance);
2578 } else { 2578 } else {
2579 // Create a swapped out RenderView in the given SiteInstance if none 2579 // Create a swapped out RenderView in the given SiteInstance if none
2580 // exists. Since an opener can point to a subframe, do this on the root 2580 // exists. Since an opener can point to a subframe, do this on the root
2581 // frame of the current opener's frame tree. 2581 // frame of the current opener's frame tree.
2582 frame_tree->root()->render_manager()->CreateRenderFrame( 2582 if (SiteIsolationPolicy::IsSwappedOutStateForbidden()) {
2583 instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN, nullptr); 2583 frame_tree->root()->render_manager()->CreateRenderFrameProxy(instance);
2584 } else {
2585 frame_tree->root()->render_manager()->CreateRenderFrame(
2586 instance, nullptr, CREATE_RF_SWAPPED_OUT | CREATE_RF_HIDDEN,
2587 nullptr);
2588 }
2584 } 2589 }
2585 } 2590 }
2586 } 2591 }
2587 2592
2588 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) { 2593 int RenderFrameHostManager::GetOpenerRoutingID(SiteInstance* instance) {
2589 if (!frame_tree_node_->opener()) 2594 if (!frame_tree_node_->opener())
2590 return MSG_ROUTING_NONE; 2595 return MSG_ROUTING_NONE;
2591 2596
2592 return frame_tree_node_->opener() 2597 return frame_tree_node_->opener()
2593 ->render_manager() 2598 ->render_manager()
2594 ->GetRoutingIdForSiteInstance(instance); 2599 ->GetRoutingIdForSiteInstance(instance);
2595 } 2600 }
2596 2601
2597 } // namespace content 2602 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698