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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 118443008: Support cross-process navigations in a single subframe RenderFrameHost. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Minor cleanup Created 7 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 } 695 }
696 696
697 void RenderViewHostImpl::OnCrossSiteResponse( 697 void RenderViewHostImpl::OnCrossSiteResponse(
698 const GlobalRequestID& global_request_id, 698 const GlobalRequestID& global_request_id,
699 bool is_transfer, 699 bool is_transfer,
700 const std::vector<GURL>& transfer_url_chain, 700 const std::vector<GURL>& transfer_url_chain,
701 const Referrer& referrer, 701 const Referrer& referrer,
702 PageTransition page_transition, 702 PageTransition page_transition,
703 int64 frame_id, 703 int64 frame_id,
704 bool should_replace_current_entry) { 704 bool should_replace_current_entry) {
705 RenderViewHostDelegate::RendererManagement* manager = 705 FrameTreeNode* node = NULL;
706 delegate_->GetRendererManagementDelegate(); 706 if (frame_id != -1 &&
707 if (manager) { 707 CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
708 manager->OnCrossSiteResponse(this, global_request_id, is_transfer, 708 node = delegate_->GetFrameTree()->FindByFrameID(frame_id);
709 transfer_url_chain, referrer, page_transition,
710 frame_id, should_replace_current_entry);
711 } 709 }
710
711 // TODO(creis): We should always be able to get the RFHM for a frame_id,
712 // but today the frame_id is -1 for the main frame.
713 RenderViewHostDelegate::RendererManagement* manager = node ?
714 node->render_manager() : delegate_->GetRendererManagementDelegate();
715 manager->OnCrossSiteResponse(this, global_request_id, is_transfer,
716 transfer_url_chain, referrer, page_transition,
717 frame_id, should_replace_current_entry);
712 } 718 }
713 719
714 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { 720 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
715 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); 721 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
716 } 722 }
717 723
718 void RenderViewHostImpl::SwapOut() { 724 void RenderViewHostImpl::SwapOut() {
719 // This will be set back to false in OnSwapOutACK, just before we replace 725 // This will be set back to false in OnSwapOutACK, just before we replace
720 // this RVH with the pending RVH. 726 // this RVH with the pending RVH.
721 is_waiting_for_unload_ack_ = true; 727 is_waiting_for_unload_ack_ = true;
(...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after
2321 void RenderViewHostImpl::AttachToFrameTree() { 2327 void RenderViewHostImpl::AttachToFrameTree() {
2322 FrameTree* frame_tree = delegate_->GetFrameTree(); 2328 FrameTree* frame_tree = delegate_->GetFrameTree();
2323 2329
2324 frame_tree->ResetForMainFrameSwap(); 2330 frame_tree->ResetForMainFrameSwap();
2325 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2331 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2326 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2332 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2327 } 2333 }
2328 } 2334 }
2329 2335
2330 } // namespace content 2336 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698