| 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) |
| 26 // TODO(sque): move to a ChromeOS-specific class. See crosbug.com/22081. |
| 27 #include "chrome/browser/chromeos/cros/power_library.h" |
| 28 #endif // defined(OS_CHROMEOS) |
| 29 |
| 25 class ImporterList; | 30 class ImporterList; |
| 26 class TemplateURLService; | 31 class TemplateURLService; |
| 27 | 32 |
| 28 namespace base { | 33 namespace base { |
| 29 class DictionaryValue; | 34 class DictionaryValue; |
| 30 } | 35 } |
| 31 | 36 |
| 32 namespace webkit { | 37 namespace webkit { |
| 33 struct WebPluginInfo; | 38 struct WebPluginInfo; |
| 34 } | 39 } |
| 35 | 40 |
| 36 // This is an automation provider containing testing calls. | 41 // This is an automation provider containing testing calls. |
| 37 class TestingAutomationProvider : public AutomationProvider, | 42 class TestingAutomationProvider : public AutomationProvider, |
| 38 public BrowserList::Observer, | 43 public BrowserList::Observer, |
| 39 public importer::ImporterListObserver, | 44 public importer::ImporterListObserver, |
| 45 #if defined(OS_CHROMEOS) |
| 46 public chromeos::PowerLibrary::Observer, |
| 47 #endif // defined(OS_CHROMEOS) |
| 40 public content::NotificationObserver { | 48 public content::NotificationObserver { |
| 49 |
| 41 public: | 50 public: |
| 42 explicit TestingAutomationProvider(Profile* profile); | 51 explicit TestingAutomationProvider(Profile* profile); |
| 43 | 52 |
| 44 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); | 53 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
| 45 | 54 |
| 46 // IPC::Channel::Listener: | 55 // IPC::Channel::Listener: |
| 47 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 56 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 48 virtual void OnChannelError() OVERRIDE; | 57 virtual void OnChannelError() OVERRIDE; |
| 49 | 58 |
| 50 private: | 59 private: |
| (...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1336 // Volume. | 1345 // Volume. |
| 1337 void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message); | 1346 void GetVolumeInfo(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1338 | 1347 |
| 1339 void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message); | 1348 void SetVolume(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1340 | 1349 |
| 1341 void SetMute(base::DictionaryValue* args, IPC::Message* reply_message); | 1350 void SetMute(base::DictionaryValue* args, IPC::Message* reply_message); |
| 1342 | 1351 |
| 1343 void CaptureProfilePhoto(Browser* browser, | 1352 void CaptureProfilePhoto(Browser* browser, |
| 1344 DictionaryValue* args, | 1353 DictionaryValue* args, |
| 1345 IPC::Message* reply_message); | 1354 IPC::Message* reply_message); |
| 1355 |
| 1356 // chromeos::PowerLibrary::Observer overrides. |
| 1357 virtual void PowerChanged(const chromeos::PowerSupplyStatus& status) OVERRIDE; |
| 1358 virtual void SystemResumed() OVERRIDE {} |
| 1346 #endif // defined(OS_CHROMEOS) | 1359 #endif // defined(OS_CHROMEOS) |
| 1347 | 1360 |
| 1348 void WaitForTabCountToBecome(int browser_handle, | 1361 void WaitForTabCountToBecome(int browser_handle, |
| 1349 int target_tab_count, | 1362 int target_tab_count, |
| 1350 IPC::Message* reply_message); | 1363 IPC::Message* reply_message); |
| 1351 | 1364 |
| 1352 void WaitForInfoBarCount(int tab_handle, | 1365 void WaitForInfoBarCount(int tab_handle, |
| 1353 size_t target_count, | 1366 size_t target_count, |
| 1354 IPC::Message* reply_message); | 1367 IPC::Message* reply_message); |
| 1355 | 1368 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1408 // Used to enumerate browser profiles. | 1421 // Used to enumerate browser profiles. |
| 1409 scoped_refptr<ImporterList> importer_list_; | 1422 scoped_refptr<ImporterList> importer_list_; |
| 1410 | 1423 |
| 1411 // The stored data for the ImportSettings operation. | 1424 // The stored data for the ImportSettings operation. |
| 1412 ImportSettingsData import_settings_data_; | 1425 ImportSettingsData import_settings_data_; |
| 1413 | 1426 |
| 1414 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1427 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1415 }; | 1428 }; |
| 1416 | 1429 |
| 1417 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1430 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |