| 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 <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 handled = AutomationProvider::OnMessageReceived(message)) | 470 handled = AutomationProvider::OnMessageReceived(message)) |
| 471 IPC_END_MESSAGE_MAP_EX() | 471 IPC_END_MESSAGE_MAP_EX() |
| 472 if (!deserialize_success) | 472 if (!deserialize_success) |
| 473 OnMessageDeserializationFailure(); | 473 OnMessageDeserializationFailure(); |
| 474 return handled; | 474 return handled; |
| 475 } | 475 } |
| 476 | 476 |
| 477 void TestingAutomationProvider::OnChannelError() { | 477 void TestingAutomationProvider::OnChannelError() { |
| 478 if (!reinitialize_on_channel_error_ && | 478 if (!reinitialize_on_channel_error_ && |
| 479 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) | 479 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) |
| 480 BrowserList::AttemptExit(); | 480 BrowserList::AttemptExit(false); |
| 481 AutomationProvider::OnChannelError(); | 481 AutomationProvider::OnChannelError(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 void TestingAutomationProvider::CloseBrowser(int browser_handle, | 484 void TestingAutomationProvider::CloseBrowser(int browser_handle, |
| 485 IPC::Message* reply_message) { | 485 IPC::Message* reply_message) { |
| 486 if (!browser_tracker_->ContainsHandle(browser_handle)) | 486 if (!browser_tracker_->ContainsHandle(browser_handle)) |
| 487 return; | 487 return; |
| 488 | 488 |
| 489 Browser* browser = browser_tracker_->GetResource(browser_handle); | 489 Browser* browser = browser_tracker_->GetResource(browser_handle); |
| 490 new BrowserClosedNotificationObserver(browser, this, reply_message); | 490 new BrowserClosedNotificationObserver(browser, this, reply_message); |
| (...skipping 6070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6561 | 6561 |
| 6562 Send(reply_message_); | 6562 Send(reply_message_); |
| 6563 redirect_query_ = 0; | 6563 redirect_query_ = 0; |
| 6564 reply_message_ = NULL; | 6564 reply_message_ = NULL; |
| 6565 } | 6565 } |
| 6566 | 6566 |
| 6567 void TestingAutomationProvider::OnRemoveProvider() { | 6567 void TestingAutomationProvider::OnRemoveProvider() { |
| 6568 if (g_browser_process) | 6568 if (g_browser_process) |
| 6569 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6569 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6570 } | 6570 } |
| OLD | NEW |