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

Unified Diff: content/browser/renderer_host/render_view_host_impl.h

Issue 2725993002: Move page closing hang timer duties to its own timer. (Closed)
Patch Set: creis Created 3 years, 10 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/renderer_host/render_view_host_impl.h
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
index fece1e032e82f9997b5b2bcd6265e21712e65756..bcc702b2b4f44508d50894ed828b23dd9ebd3369 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -36,6 +36,7 @@
namespace content {
struct FrameReplicationState;
+class TimeoutMonitor;
// This implements the RenderViewHost interface that is exposed to
// embedders of content, and adds things only visible to content.
@@ -252,11 +253,16 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
FRIEND_TEST_ALL_PREFIXES(RenderViewHostTest, RoutingIdSane);
FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest,
CleanUpSwappedOutRVHOnProcessCrash);
+ FRIEND_TEST_ALL_PREFIXES(RenderFrameHostManagerTest,
+ CloseWithPendingWhileUnresponsive);
FRIEND_TEST_ALL_PREFIXES(SitePerProcessBrowserTest,
NavigateMainFrameToChildSite);
void RenderViewReady();
+ // Called by |close_timeout_| when the page closing timeout fires.
+ void ClosePageTimeout();
+
// TODO(creis): Move to a private namespace on RenderFrameHostImpl.
// Delay to wait on closing the WebContents for a beforeunload/unload handler
// to fire.
@@ -312,6 +318,12 @@ class CONTENT_EXPORT RenderViewHostImpl : public RenderViewHost,
// values depend on.
std::unique_ptr<WebPreferences> web_preferences_;
+ // The timeout monitor that runs from when the page close is started in
+ // ClosePage() until either the render process ACKs the close with an IPC to
+ // OnClosePageACK(), or until the timeout triggers and the page is forcibly
+ // closed.
+ std::unique_ptr<TimeoutMonitor> close_timeout_;
+
bool updating_web_preferences_;
bool render_view_ready_on_process_launch_;
« no previous file with comments | « content/browser/renderer_host/render_view_host_delegate.cc ('k') | content/browser/renderer_host/render_view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698