| 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 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "chrome/browser/automation/automation_provider.h" | 14 #include "chrome/browser/automation/automation_provider.h" |
| 15 #include "chrome/browser/automation/automation_provider_json.h" | 15 #include "chrome/browser/automation/automation_provider_json.h" |
| 16 #include "chrome/browser/history/history.h" | 16 #include "chrome/browser/history/history.h" |
| 17 #include "chrome/browser/importer/importer_list_observer.h" | 17 #include "chrome/browser/importer/importer_list_observer.h" |
| 18 #include "chrome/browser/sync/profile_sync_service_harness.h" | 18 #include "chrome/browser/sync/profile_sync_service_harness.h" |
| 19 #include "chrome/browser/ui/browser_list.h" | 19 #include "chrome/browser/ui/browser_list.h" |
| 20 #include "content/public/browser/notification_registrar.h" | 20 #include "content/public/browser/notification_registrar.h" |
| 21 #include "content/public/common/page_type.h" | 21 #include "content/public/common/page_type.h" |
| 22 #include "net/base/cert_status_flags.h" | 22 #include "net/base/cert_status_flags.h" |
| 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
| 24 | 24 |
| 25 #if defined(OS_CHROMEOS) | 25 #if defined(OS_CHROMEOS) |
| 26 // TODO(sque): move to a ChromeOS-specific class. See crosbug.com/22081. | 26 // TODO(sque): move to a ChromeOS-specific class. See crosbug.com/22081. |
| 27 #include "chrome/browser/chromeos/cros/power_library.h" | 27 #include "chrome/browser/chromeos/dbus/power_manager_client.h" |
| 28 #endif // defined(OS_CHROMEOS) | 28 #endif // defined(OS_CHROMEOS) |
| 29 | 29 |
| 30 class ImporterList; | 30 class ImporterList; |
| 31 class TemplateURLService; | 31 class TemplateURLService; |
| 32 | 32 |
| 33 namespace base { | 33 namespace base { |
| 34 class DictionaryValue; | 34 class DictionaryValue; |
| 35 } | 35 } |
| 36 | 36 |
| 37 namespace webkit { | 37 namespace webkit { |
| 38 struct WebPluginInfo; | 38 struct WebPluginInfo; |
| 39 } | 39 } |
| 40 | 40 |
| 41 // This is an automation provider containing testing calls. | 41 // This is an automation provider containing testing calls. |
| 42 class TestingAutomationProvider : public AutomationProvider, | 42 class TestingAutomationProvider : public AutomationProvider, |
| 43 public BrowserList::Observer, | 43 public BrowserList::Observer, |
| 44 public importer::ImporterListObserver, | 44 public importer::ImporterListObserver, |
| 45 #if defined(OS_CHROMEOS) | 45 #if defined(OS_CHROMEOS) |
| 46 public chromeos::PowerLibrary::Observer, | 46 public chromeos::PowerManagerClient::Observer, |
| 47 #endif // defined(OS_CHROMEOS) | 47 #endif // defined(OS_CHROMEOS) |
| 48 public content::NotificationObserver { | 48 public content::NotificationObserver { |
| 49 | 49 |
| 50 public: | 50 public: |
| 51 explicit TestingAutomationProvider(Profile* profile); | 51 explicit TestingAutomationProvider(Profile* profile); |
| 52 | 52 |
| 53 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); | 53 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
| 54 | 54 |
| 55 // IPC::Channel::Listener: | 55 // IPC::Channel::Listener: |
| 56 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 56 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| (...skipping 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1324 void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message); | 1324 void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1325 | 1325 |
| 1326 void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message); | 1326 void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1327 | 1327 |
| 1328 void SetMute(base::DictionaryValue* args, IPC::Message* reply_message); | 1328 void SetMute(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1329 | 1329 |
| 1330 void CaptureProfilePhoto(Browser* browser, | 1330 void CaptureProfilePhoto(Browser* browser, |
| 1331 DictionaryValue* args, | 1331 DictionaryValue* args, |
| 1332 IPC::Message* reply_message); | 1332 IPC::Message* reply_message); |
| 1333 | 1333 |
| 1334 // chromeos::PowerLibrary::Observer overrides. | 1334 // chromeos::PowerManagerClient::Observer overrides. |
| 1335 virtual void PowerChanged(const chromeos::PowerSupplyStatus& status) OVERRIDE; | 1335 virtual void PowerChanged(const chromeos::PowerSupplyStatus& status) OVERRIDE; |
| 1336 virtual void SystemResumed() OVERRIDE {} | |
| 1337 #endif // defined(OS_CHROMEOS) | 1336 #endif // defined(OS_CHROMEOS) |
| 1338 | 1337 |
| 1339 void WaitForTabCountToBecome(int browser_handle, | 1338 void WaitForTabCountToBecome(int browser_handle, |
| 1340 int target_tab_count, | 1339 int target_tab_count, |
| 1341 IPC::Message* reply_message); | 1340 IPC::Message* reply_message); |
| 1342 | 1341 |
| 1343 void WaitForInfoBarCount(int tab_handle, | 1342 void WaitForInfoBarCount(int tab_handle, |
| 1344 size_t target_count, | 1343 size_t target_count, |
| 1345 IPC::Message* reply_message); | 1344 IPC::Message* reply_message); |
| 1346 | 1345 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1399 // Used to enumerate browser profiles. | 1398 // Used to enumerate browser profiles. |
| 1400 scoped_refptr<ImporterList> importer_list_; | 1399 scoped_refptr<ImporterList> importer_list_; |
| 1401 | 1400 |
| 1402 // The stored data for the ImportSettings operation. | 1401 // The stored data for the ImportSettings operation. |
| 1403 ImportSettingsData import_settings_data_; | 1402 ImportSettingsData import_settings_data_; |
| 1404 | 1403 |
| 1405 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1404 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1406 }; | 1405 }; |
| 1407 | 1406 |
| 1408 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1407 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |