summaryrefslogtreecommitdiffstats
path: root/chrome/browser/render_view_host.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 21:35:10 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 21:35:10 +0000
commit7e2fa03804bef4bff9c5bb941f2edf09b6d234c0 (patch)
tree535d81a14867f7b037bec19764bfaa56a53acd33 /chrome/browser/render_view_host.cc
parent5f715e9411a0b4b8e207072fdbfad5160f5ad1e2 (diff)
downloadchromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.zip
chromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.tar.gz
chromium_src-7e2fa03804bef4bff9c5bb941f2edf09b6d234c0.tar.bz2
Stop spamming delayed tasks on each input event.
R=mbelshe BUG=2693 Review URL: http://codereview.chromium.org/4262 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2609 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/render_view_host.cc')
-rw-r--r--chrome/browser/render_view_host.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/browser/render_view_host.cc b/chrome/browser/render_view_host.cc
index 8c95e07..27b25c9 100644
--- a/chrome/browser/render_view_host.cc
+++ b/chrome/browser/render_view_host.cc
@@ -233,7 +233,7 @@ void RenderViewHost::FirePageBeforeUnload() {
// Start the hang monitor in case the renderer hangs in the beforeunload
// handler.
is_waiting_for_unload_ack_ = true;
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
Send(new ViewMsg_ShouldClose(routing_id_));
} else {
// This RenderViewHost doesn't have a live renderer, so just skip running
@@ -245,7 +245,7 @@ void RenderViewHost::FirePageBeforeUnload() {
void RenderViewHost::FirePageUnload() {
// Start the hang monitor in case the renderer hangs in the unload handler.
is_waiting_for_unload_ack_ = true;
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
ClosePage(site_instance()->process_host_id(),
routing_id());
}
@@ -487,7 +487,7 @@ void RenderViewHost::JavaScriptMessageBoxClosed(IPC::Message* reply_msg,
bool success,
const std::wstring& prompt) {
if (is_waiting_for_unload_ack_)
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
if (--modal_dialog_count_ == 0)
ResetEvent(modal_dialog_event_.Get());
@@ -498,7 +498,7 @@ void RenderViewHost::JavaScriptMessageBoxClosed(IPC::Message* reply_msg,
void RenderViewHost::ModalHTMLDialogClosed(IPC::Message* reply_msg,
const std::string& json_retval) {
if (is_waiting_for_unload_ack_)
- StartHangMonitorTimeout(kUnloadTimeoutMS);
+ StartHangMonitorTimeout(TimeDelta::FromMilliseconds(kUnloadTimeoutMS));
if (--modal_dialog_count_ == 0)
ResetEvent(modal_dialog_event_.Get());