OLD | NEW |
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 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
648 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition; | 648 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition; |
649 // Increment the in-flight event count, to ensure that input events won't | 649 // Increment the in-flight event count, to ensure that input events won't |
650 // cancel the timeout timer. | 650 // cancel the timeout timer. |
651 increment_in_flight_event_count(); | 651 increment_in_flight_event_count(); |
652 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); | 652 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |
653 send_should_close_start_time_ = base::TimeTicks::Now(); | 653 send_should_close_start_time_ = base::TimeTicks::Now(); |
654 Send(new ViewMsg_ShouldClose(GetRoutingID())); | 654 Send(new ViewMsg_ShouldClose(GetRoutingID())); |
655 } | 655 } |
656 } | 656 } |
657 | 657 |
| 658 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { |
| 659 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); |
| 660 } |
| 661 |
658 void RenderViewHostImpl::SwapOut() { | 662 void RenderViewHostImpl::SwapOut() { |
659 // This will be set back to false in OnSwapOutACK, just before we replace | 663 // This will be set back to false in OnSwapOutACK, just before we replace |
660 // this RVH with the pending RVH. | 664 // this RVH with the pending RVH. |
661 is_waiting_for_unload_ack_ = true; | 665 is_waiting_for_unload_ack_ = true; |
662 // Start the hang monitor in case the renderer hangs in the unload handler. | 666 // Start the hang monitor in case the renderer hangs in the unload handler. |
663 // Increment the in-flight event count, to ensure that input events won't | 667 // Increment the in-flight event count, to ensure that input events won't |
664 // cancel the timeout timer. | 668 // cancel the timeout timer. |
665 increment_in_flight_event_count(); | 669 increment_in_flight_event_count(); |
666 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); | 670 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |
667 | 671 |
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2249 void RenderViewHostImpl::AttachToFrameTree() { | 2253 void RenderViewHostImpl::AttachToFrameTree() { |
2250 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2254 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2251 | 2255 |
2252 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2256 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
2253 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2257 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2254 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2258 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2255 } | 2259 } |
2256 } | 2260 } |
2257 | 2261 |
2258 } // namespace content | 2262 } // namespace content |
OLD | NEW |