Index: chrome/browser/automation/automation_provider.cc |
diff --git a/chrome/browser/automation/automation_provider.cc b/chrome/browser/automation/automation_provider.cc |
index 65dae1db0b61de9abe8380a1cebca9cf9ebf41ef..10af34a73590fd8c83ebc285988759b889532ee9 100644 |
--- a/chrome/browser/automation/automation_provider.cc |
+++ b/chrome/browser/automation/automation_provider.cc |
@@ -428,6 +428,7 @@ void AutomationProvider::OnMessageReceived(const IPC::Message& message) { |
#if defined(OS_WIN) |
IPC_MESSAGE_HANDLER(AutomationMsg_ConnectExternalTab, ConnectExternalTab) |
#endif |
+ IPC_MESSAGE_HANDLER(AutomationMsg_QuitAfterTimeout, QuitAfterTimeout) |
IPC_END_MESSAGE_MAP() |
} |
@@ -2020,6 +2021,12 @@ void AutomationProvider::GoForwardBlockUntilNavigationsComplete( |
Send(reply_message); |
} |
+void AutomationProvider::QuitAfterTimeout(int timeout_ms) { |
+ MessageLoop::current()->PostDelayedTask(FROM_HERE, |
+ new MessageLoop::QuitTask(), |
+ timeout_ms); |
+} |
+ |
RenderViewHost* AutomationProvider::GetViewForTab(int tab_handle) { |
if (tab_tracker_->ContainsHandle(tab_handle)) { |
NavigationController* tab = tab_tracker_->GetResource(tab_handle); |