diff options
author | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-29 23:32:47 +0000 |
---|---|---|
committer | ojan@google.com <ojan@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-07-29 23:32:47 +0000 |
commit | c82192d62ae8518837f448f9bbd9d0c93cd4af13 (patch) | |
tree | 795361f6bb6033caf55862386541c70e08b969be /chrome/browser/render_widget_host.h | |
parent | 9a2bba4ed0996b8bc9f8dab235ad83af3f155948 (diff) | |
download | chromium_src-c82192d62ae8518837f448f9bbd9d0c93cd4af13.zip chromium_src-c82192d62ae8518837f448f9bbd9d0c93cd4af13.tar.gz chromium_src-c82192d62ae8518837f448f9bbd9d0c93cd4af13.tar.bz2 |
Fix not closing the browser with hung, crashed and interstitial tabs. Adds a 1 second hang monitor for the beforeunload/unload events to fire.
BUG=1296059
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@81 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_widget_host.h')
-rw-r--r-- | chrome/browser/render_widget_host.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/render_widget_host.h b/chrome/browser/render_widget_host.h index e7a14e6..bb71df8 100644 --- a/chrome/browser/render_widget_host.h +++ b/chrome/browser/render_widget_host.h @@ -202,11 +202,22 @@ class RenderWidgetHost : public IPC::Channel::Listener { // javascript call. virtual bool CanBlur() const { return true; } - // Reset the active hang monitor timeout. + // Restart the active hang monitor timeout. Clears all existing timeouts + // and starts with a new one. // This can be because the renderer has become active, the tab is being // hidden, or the user has chosen to wait some more to give the tab a chance // to become active and we don't want to display a warning too soon. - void ResetHangMonitorTimeout(); + void RestartHangMonitorTimeout(); + + // Stops all existing hang monitor timeouts and assumes the renderer is + // responsive. + void StopHangMonitorTimeout(); + + // Starts a hang monitor timeout. If there's already a hang monitor timeout + // the new one will only fire if it has a shorter delay than the time + // left on the existing timeouts. + void StartHangMonitorTimeout(int delay); + protected: // Represents a cache of BackingStore objects indexed by RenderWidgetHost. |