Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Side by Side Diff: chrome/browser/automation/testing_automation_provider.cc

Issue 8271024: chromeos: Add power supply info reading capability (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed #if 0 Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 6323 matching lines...) Expand 10 before | Expand all | Expand 10 after
6533 6533
6534 Send(reply_message_); 6534 Send(reply_message_);
6535 redirect_query_ = 0; 6535 redirect_query_ = 0;
6536 reply_message_ = NULL; 6536 reply_message_ = NULL;
6537 } 6537 }
6538 6538
6539 void TestingAutomationProvider::OnRemoveProvider() { 6539 void TestingAutomationProvider::OnRemoveProvider() {
6540 if (g_browser_process) 6540 if (g_browser_process)
6541 g_browser_process->GetAutomationProviderList()->RemoveProvider(this); 6541 g_browser_process->GetAutomationProviderList()->RemoveProvider(this);
6542 } 6542 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698