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

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

Issue 2738943002: Move beforeunload hang timer duties to its own timer. (Closed)
Patch Set: better test Created 3 years, 9 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
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_frame_host_impl.h
diff --git a/content/browser/frame_host/render_frame_host_impl.h b/content/browser/frame_host/render_frame_host_impl.h
index 4b107988cab53ea883fc86af937dd1ed0515ff90..b5c7fe6b71aa79346ddb1f68cc9609efe8cc719e 100644
--- a/content/browser/frame_host/render_frame_host_impl.h
+++ b/content/browser/frame_host/render_frame_host_impl.h
@@ -459,7 +459,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
void JavaScriptDialogClosed(IPC::Message* reply_msg,
bool success,
const base::string16& user_input,
- bool is_before_unload_dialog,
bool dialog_was_suppressed);
// Get the accessibility mode from the delegate and Send a message to the
@@ -889,6 +888,9 @@ class CONTENT_EXPORT RenderFrameHostImpl
std::unique_ptr<NavigationHandleImpl> TakeNavigationHandleForCommit(
const FrameHostMsg_DidCommitProvisionalLoad_Params& params);
+ // Called by |beforeunload_timeout_| when the beforeunload timeout fires.
+ void BeforeUnloadTimeout();
+
// For now, RenderFrameHosts indirectly keep RenderViewHosts alive via a
// refcount that calls Shutdown when it reaches zero. This allows each
// RenderFrameHostManager to just care about RenderFrameHosts, while ensuring
@@ -993,6 +995,11 @@ class CONTENT_EXPORT RenderFrameHostImpl
// PlzNavigate: all navigations require a beforeUnload ACK.
bool unload_ack_is_for_navigation_;
+ // The timeout monitor that runs from when the beforeunload is started in
+ // DispatchBeforeUnload() until either the render process ACKs it with an IPC
+ // to OnBeforeUnloadACK(), or until the timeout triggers.
+ std::unique_ptr<TimeoutMonitor> beforeunload_timeout_;
+
// Indicates whether this RenderFrameHost is in the process of loading a
// document or not.
bool is_loading_;
« no previous file with comments | « no previous file | content/browser/frame_host/render_frame_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698