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 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
418 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition; | 418 unload_ack_is_for_cross_site_transition_ = for_cross_site_transition; |
419 // Increment the in-flight event count, to ensure that input events won't | 419 // Increment the in-flight event count, to ensure that input events won't |
420 // cancel the timeout timer. | 420 // cancel the timeout timer. |
421 increment_in_flight_event_count(); | 421 increment_in_flight_event_count(); |
422 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); | 422 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |
423 send_should_close_start_time_ = base::TimeTicks::Now(); | 423 send_should_close_start_time_ = base::TimeTicks::Now(); |
424 Send(new ViewMsg_ShouldClose(GetRoutingID())); | 424 Send(new ViewMsg_ShouldClose(GetRoutingID())); |
425 } | 425 } |
426 } | 426 } |
427 | 427 |
| 428 void RenderViewHostImpl::SuppressDialogsUntilSwapOut() { |
| 429 Send(new ViewMsg_SuppressDialogsUntilSwapOut(GetRoutingID())); |
| 430 } |
| 431 |
428 void RenderViewHostImpl::SwapOut() { | 432 void RenderViewHostImpl::SwapOut() { |
429 // This will be set back to false in OnSwapOutACK, just before we replace | 433 // This will be set back to false in OnSwapOutACK, just before we replace |
430 // this RVH with the pending RVH. | 434 // this RVH with the pending RVH. |
431 is_waiting_for_unload_ack_ = true; | 435 is_waiting_for_unload_ack_ = true; |
432 // Start the hang monitor in case the renderer hangs in the unload handler. | 436 // Start the hang monitor in case the renderer hangs in the unload handler. |
433 // Increment the in-flight event count, to ensure that input events won't | 437 // Increment the in-flight event count, to ensure that input events won't |
434 // cancel the timeout timer. | 438 // cancel the timeout timer. |
435 increment_in_flight_event_count(); | 439 increment_in_flight_event_count(); |
436 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); | 440 StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS)); |
437 | 441 |
(...skipping 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2045 void RenderViewHostImpl::AttachToFrameTree() { | 2049 void RenderViewHostImpl::AttachToFrameTree() { |
2046 FrameTree* frame_tree = delegate_->GetFrameTree(); | 2050 FrameTree* frame_tree = delegate_->GetFrameTree(); |
2047 | 2051 |
2048 frame_tree->SwapMainFrame(main_render_frame_host_.get()); | 2052 frame_tree->SwapMainFrame(main_render_frame_host_.get()); |
2049 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { | 2053 if (main_frame_id() != FrameTreeNode::kInvalidFrameId) { |
2050 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); | 2054 frame_tree->OnFirstNavigationAfterSwap(main_frame_id()); |
2051 } | 2055 } |
2052 } | 2056 } |
2053 | 2057 |
2054 } // namespace content | 2058 } // namespace content |
OLD | NEW |