OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 #include "chrome/browser/extensions/extension_process_manager.h" | 55 #include "chrome/browser/extensions/extension_process_manager.h" |
56 #include "chrome/browser/extensions/extension_service.h" | 56 #include "chrome/browser/extensions/extension_service.h" |
57 #include "chrome/browser/extensions/extension_tab_util.h" | 57 #include "chrome/browser/extensions/extension_tab_util.h" |
58 #include "chrome/browser/extensions/unpacked_installer.h" | 58 #include "chrome/browser/extensions/unpacked_installer.h" |
59 #include "chrome/browser/extensions/updater/extension_updater.h" | 59 #include "chrome/browser/extensions/updater/extension_updater.h" |
60 #include "chrome/browser/history/top_sites.h" | 60 #include "chrome/browser/history/top_sites.h" |
61 #include "chrome/browser/importer/importer_host.h" | 61 #include "chrome/browser/importer/importer_host.h" |
62 #include "chrome/browser/importer/importer_list.h" | 62 #include "chrome/browser/importer/importer_list.h" |
63 #include "chrome/browser/infobars/infobar_tab_helper.h" | 63 #include "chrome/browser/infobars/infobar_tab_helper.h" |
64 #include "chrome/browser/instant/instant_controller.h" | 64 #include "chrome/browser/instant/instant_controller.h" |
| 65 #include "chrome/browser/lifetime/application_lifetime.h" |
65 #include "chrome/browser/notifications/balloon.h" | 66 #include "chrome/browser/notifications/balloon.h" |
66 #include "chrome/browser/notifications/balloon_collection.h" | 67 #include "chrome/browser/notifications/balloon_collection.h" |
67 #include "chrome/browser/notifications/notification.h" | 68 #include "chrome/browser/notifications/notification.h" |
68 #include "chrome/browser/notifications/notification_ui_manager.h" | 69 #include "chrome/browser/notifications/notification_ui_manager.h" |
69 #include "chrome/browser/password_manager/password_store.h" | 70 #include "chrome/browser/password_manager/password_store.h" |
70 #include "chrome/browser/password_manager/password_store_change.h" | 71 #include "chrome/browser/password_manager/password_store_change.h" |
71 #include "chrome/browser/password_manager/password_store_factory.h" | 72 #include "chrome/browser/password_manager/password_store_factory.h" |
72 #include "chrome/browser/platform_util.h" | 73 #include "chrome/browser/platform_util.h" |
73 #include "chrome/browser/plugin_prefs.h" | 74 #include "chrome/browser/plugin_prefs.h" |
74 #include "chrome/browser/prefs/pref_service.h" | 75 #include "chrome/browser/prefs/pref_service.h" |
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 IPC_MESSAGE_UNHANDLED( | 445 IPC_MESSAGE_UNHANDLED( |
445 handled = AutomationProvider::OnMessageReceived(message)) | 446 handled = AutomationProvider::OnMessageReceived(message)) |
446 IPC_END_MESSAGE_MAP_EX() | 447 IPC_END_MESSAGE_MAP_EX() |
447 if (!deserialize_success) | 448 if (!deserialize_success) |
448 OnMessageDeserializationFailure(); | 449 OnMessageDeserializationFailure(); |
449 return handled; | 450 return handled; |
450 } | 451 } |
451 | 452 |
452 void TestingAutomationProvider::OnChannelError() { | 453 void TestingAutomationProvider::OnChannelError() { |
453 if (!reinitialize_on_channel_error_ && | 454 if (!reinitialize_on_channel_error_ && |
454 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) | 455 browser_shutdown::GetShutdownType() == browser_shutdown::NOT_VALID) { |
455 BrowserList::AttemptExit(); | 456 browser::AttemptExit(); |
| 457 } |
456 AutomationProvider::OnChannelError(); | 458 AutomationProvider::OnChannelError(); |
457 } | 459 } |
458 | 460 |
459 void TestingAutomationProvider::CloseBrowser(int browser_handle, | 461 void TestingAutomationProvider::CloseBrowser(int browser_handle, |
460 IPC::Message* reply_message) { | 462 IPC::Message* reply_message) { |
461 if (!browser_tracker_->ContainsHandle(browser_handle)) | 463 if (!browser_tracker_->ContainsHandle(browser_handle)) |
462 return; | 464 return; |
463 | 465 |
464 Browser* browser = browser_tracker_->GetResource(browser_handle); | 466 Browser* browser = browser_tracker_->GetResource(browser_handle); |
465 new BrowserClosedNotificationObserver(browser, this, reply_message); | 467 new BrowserClosedNotificationObserver(browser, this, reply_message); |
(...skipping 6098 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6564 | 6566 |
6565 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( | 6567 void TestingAutomationProvider::WaitForProcessLauncherThreadToGoIdle( |
6566 IPC::Message* reply_message) { | 6568 IPC::Message* reply_message) { |
6567 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); | 6569 new WaitForProcessLauncherThreadToGoIdleObserver(this, reply_message); |
6568 } | 6570 } |
6569 | 6571 |
6570 void TestingAutomationProvider::OnRemoveProvider() { | 6572 void TestingAutomationProvider::OnRemoveProvider() { |
6571 if (g_browser_process) | 6573 if (g_browser_process) |
6572 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6574 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
6573 } | 6575 } |
OLD | NEW |