| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 #include "webkit/plugins/webplugininfo.h" | 125 #include "webkit/plugins/webplugininfo.h" |
| 126 | 126 |
| 127 #if defined(ENABLE_CONFIGURATION_POLICY) | 127 #if defined(ENABLE_CONFIGURATION_POLICY) |
| 128 #include "chrome/browser/policy/browser_policy_connector.h" | 128 #include "chrome/browser/policy/browser_policy_connector.h" |
| 129 #include "chrome/browser/policy/configuration_policy_provider.h" | 129 #include "chrome/browser/policy/configuration_policy_provider.h" |
| 130 #include "chrome/browser/policy/policy_map.h" | 130 #include "chrome/browser/policy/policy_map.h" |
| 131 #include "policy/policy_constants.h" | 131 #include "policy/policy_constants.h" |
| 132 #endif | 132 #endif |
| 133 | 133 |
| 134 #if defined(OS_CHROMEOS) | 134 #if defined(OS_CHROMEOS) |
| 135 #include "chrome/browser/chromeos/cros/cros_library.h" | 135 #include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" |
| 136 #include "chrome/browser/ui/webui/active_downloads_ui.h" | 136 #include "chrome/browser/ui/webui/active_downloads_ui.h" |
| 137 #else | 137 #else |
| 138 #include "chrome/browser/download/download_shelf.h" | 138 #include "chrome/browser/download/download_shelf.h" |
| 139 #endif | 139 #endif |
| 140 | 140 |
| 141 using automation_util::SendErrorIfModalDialogActive; | 141 using automation_util::SendErrorIfModalDialogActive; |
| 142 using content::BrowserThread; | 142 using content::BrowserThread; |
| 143 | 143 |
| 144 namespace { | 144 namespace { |
| 145 | 145 |
| (...skipping 43 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()->GetPowerManagerClient()-> |
| 200 AddObserver(this); |
| 200 #endif | 201 #endif |
| 201 } | 202 } |
| 202 | 203 |
| 203 TestingAutomationProvider::~TestingAutomationProvider() { | 204 TestingAutomationProvider::~TestingAutomationProvider() { |
| 204 BrowserList::RemoveObserver(this); | 205 BrowserList::RemoveObserver(this); |
| 205 } | 206 } |
| 206 | 207 |
| 207 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode( | 208 IPC::Channel::Mode TestingAutomationProvider::GetChannelMode( |
| 208 bool use_named_interface) { | 209 bool use_named_interface) { |
| 209 if (use_named_interface) | 210 if (use_named_interface) |
| (...skipping 6175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6385 | 6386 |
| 6386 Send(reply_message_); | 6387 Send(reply_message_); |
| 6387 redirect_query_ = 0; | 6388 redirect_query_ = 0; |
| 6388 reply_message_ = NULL; | 6389 reply_message_ = NULL; |
| 6389 } | 6390 } |
| 6390 | 6391 |
| 6391 void TestingAutomationProvider::OnRemoveProvider() { | 6392 void TestingAutomationProvider::OnRemoveProvider() { |
| 6392 if (g_browser_process) | 6393 if (g_browser_process) |
| 6393 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); | 6394 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); |
| 6394 } | 6395 } |
| OLD | NEW |