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

Unified Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 2901833002: Create NavigationHandle after beforeunload with PlzNavigate. (Closed)
Patch Set: small fix from jam Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/frame_host/render_frame_host_impl.cc
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index f0397dfb883eb9b0dfa289fc3e2c5e4daa8c4269..8717433cf9417785e813e85c94e37c9707767800 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -1678,12 +1678,11 @@ void RenderFrameHostImpl::OnBeforeUnloadACK(
if (IsBrowserSideNavigationEnabled() && unload_ack_is_for_navigation_) {
// TODO(clamy): see if before_unload_end_time should be transmitted to the
// Navigator.
- frame_tree_node_->navigator()->OnBeforeUnloadACK(
- frame_tree_node_, proceed);
+ frame_tree_node_->navigator()->OnBeforeUnloadACK(frame_tree_node_, proceed,
+ before_unload_end_time);
} else {
frame_tree_node_->render_manager()->OnBeforeUnloadACK(
- unload_ack_is_for_navigation_, proceed,
- before_unload_end_time);
+ unload_ack_is_for_navigation_, proceed, before_unload_end_time);
}
// If canceled, notify the delegate to cancel its pending navigation entry.
@@ -2977,6 +2976,7 @@ void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation,
// handler.
is_waiting_for_beforeunload_ack_ = true;
unload_ack_is_for_navigation_ = for_navigation;
+ send_before_unload_start_time_ = base::TimeTicks::Now();
if (render_view_host_->GetDelegate()->IsJavaScriptDialogShowing()) {
// If there is a JavaScript dialog up, don't bother sending the renderer
// the unload event because it is known unresponsive, waiting for the
@@ -2987,7 +2987,6 @@ void RenderFrameHostImpl::DispatchBeforeUnload(bool for_navigation,
beforeunload_timeout_->Start(
TimeDelta::FromMilliseconds(RenderViewHostImpl::kUnloadTimeoutMS));
}
- send_before_unload_start_time_ = base::TimeTicks::Now();
Send(new FrameMsg_BeforeUnload(routing_id_, is_reload));
}
}

Powered by Google App Engine
This is Rietveld 408576698