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, |
40 public content::NotificationObserver { | 44 public content::NotificationObserver, |
45 public chromeos::PowerLibrary::Observer { | |
satorux1
2011/10/21 19:36:50
This needs to be #if defined(OS_CHROMEOS). I'd sug
Simon Que
2011/10/21 20:55:31
Done.
| |
46 | |
41 public: | 47 public: |
42 explicit TestingAutomationProvider(Profile* profile); | 48 explicit TestingAutomationProvider(Profile* profile); |
43 | 49 |
44 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); | 50 virtual IPC::Channel::Mode GetChannelMode(bool use_named_interface); |
45 | 51 |
46 // IPC::Channel::Listener: | 52 // IPC::Channel::Listener: |
47 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 53 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
48 virtual void OnChannelError() OVERRIDE; | 54 virtual void OnChannelError() OVERRIDE; |
49 | 55 |
56 virtual void PowerChanged(const chromeos::PowerSupplyStatus& status) OVERRIDE; | |
satorux1
2011/10/21 19:36:50
Add this.
// chromeos::PowerLibrary::Observer ove
Simon Que
2011/10/21 20:55:31
Done.
| |
57 virtual void SystemResumed() OVERRIDE {} | |
satorux1
2011/10/21 19:36:50
Ditto. This needs to be in #if defined(OS_CHROMEOS
Simon Que
2011/10/21 20:55:31
Done
| |
58 | |
50 private: | 59 private: |
51 class PopupMenuWaiter; | 60 class PopupMenuWaiter; |
52 | 61 |
53 // Storage for ImportSettings() to resume operations after a callback. | 62 // Storage for ImportSettings() to resume operations after a callback. |
54 struct ImportSettingsData { | 63 struct ImportSettingsData { |
55 string16 browser_name; | 64 string16 browser_name; |
56 int import_items; | 65 int import_items; |
57 bool first_run; | 66 bool first_run; |
58 Browser* browser; | 67 Browser* browser; |
59 IPC::Message* reply_message; | 68 IPC::Message* reply_message; |
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1403 HistoryService::Handle redirect_query_; | 1412 HistoryService::Handle redirect_query_; |
1404 | 1413 |
1405 content::NotificationRegistrar registrar_; | 1414 content::NotificationRegistrar registrar_; |
1406 | 1415 |
1407 // Used to enumerate browser profiles. | 1416 // Used to enumerate browser profiles. |
1408 scoped_refptr<ImporterList> importer_list_; | 1417 scoped_refptr<ImporterList> importer_list_; |
1409 | 1418 |
1410 // The stored data for the ImportSettings operation. | 1419 // The stored data for the ImportSettings operation. |
1411 ImportSettingsData import_settings_data_; | 1420 ImportSettingsData import_settings_data_; |
1412 | 1421 |
1422 // Last reported power status. | |
1423 chromeos::PowerSupplyStatus power_status_; | |
1424 | |
1413 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1425 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
1414 }; | 1426 }; |
1415 | 1427 |
1416 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1428 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
OLD | NEW |