| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/automation/testing_automation_provider.h" | 5 #include "chrome/browser/automation/testing_automation_provider.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 AutomationMsg_WaitForProcessLauncherThreadToGoIdle, | 399 AutomationMsg_WaitForProcessLauncherThreadToGoIdle, |
| 400 WaitForProcessLauncherThreadToGoIdle) | 400 WaitForProcessLauncherThreadToGoIdle) |
| 401 | 401 |
| 402 IPC_MESSAGE_UNHANDLED( | 402 IPC_MESSAGE_UNHANDLED( |
| 403 handled = AutomationProvider::OnMessageReceived(message)) | 403 handled = AutomationProvider::OnMessageReceived(message)) |
| 404 IPC_END_MESSAGE_MAP() | 404 IPC_END_MESSAGE_MAP() |
| 405 return handled; | 405 return handled; |
| 406 } | 406 } |
| 407 | 407 |
| 408 void TestingAutomationProvider::OnChannelError() { | 408 void TestingAutomationProvider::OnChannelError() { |
| 409 if (browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) | 409 if (!reconnect_on_channel_error_ && |
| 410 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) |
| 410 BrowserList::CloseAllBrowsersAndExit(); | 411 BrowserList::CloseAllBrowsersAndExit(); |
| 411 AutomationProvider::OnChannelError(); | 412 AutomationProvider::OnChannelError(); |
| 412 } | 413 } |
| 413 | 414 |
| 414 void TestingAutomationProvider::CloseBrowser(int browser_handle, | 415 void TestingAutomationProvider::CloseBrowser(int browser_handle, |
| 415 IPC::Message* reply_message) { | 416 IPC::Message* reply_message) { |
| 416 if (!browser_tracker_->ContainsHandle(browser_handle)) | 417 if (!browser_tracker_->ContainsHandle(browser_handle)) |
| 417 return; | 418 return; |
| 418 | 419 |
| 419 Browser* browser = browser_tracker_->GetResource(browser_handle); | 420 Browser* browser = browser_tracker_->GetResource(browser_handle); |
| (...skipping 4233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4653 // If you change this, update Observer for NotificationType::SESSION_END | 4654 // If you change this, update Observer for NotificationType::SESSION_END |
| 4654 // below. | 4655 // below. |
| 4655 MessageLoop::current()->PostTask(FROM_HERE, | 4656 MessageLoop::current()->PostTask(FROM_HERE, |
| 4656 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); | 4657 NewRunnableMethod(this, &TestingAutomationProvider::OnRemoveProvider)); |
| 4657 } | 4658 } |
| 4658 } | 4659 } |
| 4659 | 4660 |
| 4660 void TestingAutomationProvider::OnRemoveProvider() { | 4661 void TestingAutomationProvider::OnRemoveProvider() { |
| 4661 AutomationProviderList::GetInstance()->RemoveProvider(this); | 4662 AutomationProviderList::GetInstance()->RemoveProvider(this); |
| 4662 } | 4663 } |
| OLD | NEW |