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