| 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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 #include "webkit/plugins/webplugininfo.h" | 126 #include "webkit/plugins/webplugininfo.h" |
| 127 | 127 |
| 128 #if defined(ENABLE_CONFIGURATION_POLICY) | 128 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 129 #include "chrome/browser/policy/browser_policy_connector.h" | 129 #include "chrome/browser/policy/browser_policy_connector.h" |
| 130 #include "chrome/browser/policy/configuration_policy_provider.h" | 130 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 131 #include "chrome/browser/policy/policy_map.h" | 131 #include "chrome/browser/policy/policy_map.h" |
| 132 #include "policy/policy_constants.h" | 132 #include "policy/policy_constants.h" |
| 133 #endif | 133 #endif |
| 134 | 134 |
| 135 #if defined(OS_CHROMEOS) | 135 #if defined(OS_CHROMEOS) |
| 136 #include "chrome/browser/chromeos/cros/cros_library.h" | 136 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 137 #include "chrome/browser/ui/webui/active_downloads_ui.h" | 137 #include "chrome/browser/ui/webui/active_downloads_ui.h" |
| 138 #else | 138 #else |
| 139 #include "chrome/browser/download/download_shelf.h" | 139 #include "chrome/browser/download/download_shelf.h" |
| 140 #endif | 140 #endif |
| 141 | 141 |
| 142 using automation_util::SendErrorIfModalDialogActive; | 142 using automation_util::SendErrorIfModalDialogActive; |
| 143 | 143 |
| 144 namespace { | 144 namespace { |
| 145 | 145 |
| 146 void SendMouseClick(int flags) { | 146 void SendMouseClick(int flags) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 TestingAutomationProvider::TestingAutomationProvider(Profile* profile) | 189 TestingAutomationProvider::TestingAutomationProvider(Profile* profile) |
| 190 : AutomationProvider(profile), | 190 : AutomationProvider(profile), |
| 191 #if defined(TOOLKIT_VIEWS) | 191 #if defined(TOOLKIT_VIEWS) |
| 192 popup_menu_waiter_(NULL), | 192 popup_menu_waiter_(NULL), |
| 193 #endif | 193 #endif |
| 194 redirect_query_(0) { | 194 redirect_query_(0) { |
| 195 BrowserList::AddObserver(this); | 195 BrowserList::AddObserver(this); |
| 196 registrar_.Add(this, chrome::NOTIFICATION_SESSION_END, | 196 registrar_.Add(this, chrome::NOTIFICATION_SESSION_END, |
| 197 content::NotificationService::AllSources()); | 197 content::NotificationService::AllSources()); |
| 198 #if defined(OS_CHROMEOS) | 198 #if defined(OS_CHROMEOS) |
| 199 chromeos::CrosLibrary::Get()->GetPowerLibrary()->AddObserver(this); | 199 chromeos::DBusThreadManager::Get()->power_manager_client()->AddObserver(this); |
| 200 #endif | 200 #endif |
| 201 } | 201 } |
| 202 | 202 |
| 203 TestingAutomationProvider::~TestingAutomationProvider() { | 203 TestingAutomationProvider::~TestingAutomationProvider() { |
| 204 BrowserList::RemoveObserver(this); | 204 BrowserList::RemoveObserver(this); |
| 205 } | 205 } |
| 206 | 206 |
| 207 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode( | 207 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode( |
| 208 bool use_named_interface) { | 208 bool use_named_interface) { |
| 209 if (use_named_interface) | 209 if (use_named_interface) |
| (...skipping 6318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6528 | 6528 |
| 6529 Send(reply_message_); | 6529 Send(reply_message_); |
| 6530 redirect_query_ = 0; | 6530 redirect_query_ = 0; |
| 6531 reply_message_ = NULL; | 6531 reply_message_ = NULL; |
| 6532 } | 6532 } |
| 6533 | 6533 |
| 6534 void TestingAutomationProvider::OnRemoveProvider() { | 6534 void TestingAutomationProvider::OnRemoveProvider() { |
| 6535 if (g_browser_process) | 6535 if (g_browser_process) |
| 6536 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6536 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6537 } | 6537 } |
| OLD | NEW |