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

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

Issue 50223002: Prevent modal dialogs when preparing to swap out. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('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 (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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 int64 frame_id) { 664 int64 frame_id) {
665 RenderViewHostDelegate::RendererManagement* manager = 665 RenderViewHostDelegate::RendererManagement* manager =
666 delegate_->GetRendererManagementDelegate(); 666 delegate_->GetRendererManagementDelegate();
667 if (manager) { 667 if (manager) {
668 manager->OnCrossSiteResponse(this, global_request_id, is_transfer, 668 manager->OnCrossSiteResponse(this, global_request_id, is_transfer,
669 transfer_url_chain, referrer, page_transition, 669 transfer_url_chain, referrer, page_transition,
670 frame_id); 670 frame_id);
671 } 671 }
672 } 672 }
673 673
674 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() {
675 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID()));
676 }
677
674 void RenderViewHostImpl::SwapOut() { 678 void RenderViewHostImpl::SwapOut() {
675 // This will be set back to false in OnSwapOutACK, just before we replace 679 // This will be set back to false in OnSwapOutACK, just before we replace
676 // this RVH with the pending RVH. 680 // this RVH with the pending RVH.
677 is_waiting_for_unload_ack_ = true; 681 is_waiting_for_unload_ack_ = true;
678 // Start the hang monitor in case the renderer hangs in the unload handler. 682 // Start the hang monitor in case the renderer hangs in the unload handler.
679 // Increment the in-flight event count, to ensure that input events won't 683 // Increment the in-flight event count, to ensure that input events won't
680 // cancel the timeout timer. 684 // cancel the timeout timer.
681 increment_in_flight_event_count(); 685 increment_in_flight_event_count();
682 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); 686 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
683 687
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
2265 void RenderViewHostImpl::AttachToFrameTree() { 2269 void RenderViewHostImpl::AttachToFrameTree() {
2266 FrameTree* frame_tree = delegate_->GetFrameTree(); 2270 FrameTree* frame_tree = delegate_->GetFrameTree();
2267 2271
2268 frame_tree->SwapMainFrame(main_render_frame_host_.get()); 2272 frame_tree->SwapMainFrame(main_render_frame_host_.get());
2269 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { 2273 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) {
2270 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); 2274 frame_tree->OnFirstNavigationAfterSwap(main_frame_id());
2271 } 2275 }
2272 } 2276 }
2273 2277
2274 } // namespace content 2278 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698