OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This extension API contains system-wide preferences and functions that shall | 5 // This extension API contains system-wide preferences and functions that shall |
6 // be only available to component extensions. | 6 // be only available to component extensions. |
7 | 7 |
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ |
9 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus", | 32 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus", |
33 SYSTEMPRIVATE_GETUPDATESTATUS) | 33 SYSTEMPRIVATE_GETUPDATESTATUS) |
34 | 34 |
35 protected: | 35 protected: |
36 virtual ~SystemPrivateGetUpdateStatusFunction() {} | 36 virtual ~SystemPrivateGetUpdateStatusFunction() {} |
37 | 37 |
38 // ExtensionFunction: | 38 // ExtensionFunction: |
39 virtual bool RunImpl() OVERRIDE; | 39 virtual bool RunImpl() OVERRIDE; |
40 }; | 40 }; |
41 | 41 |
| 42 // API function which returns the Google API key. |
| 43 class SystemPrivateGetApiKeyFunction : public SyncExtensionFunction { |
| 44 public: |
| 45 DECLARE_EXTENSION_FUNCTION("systemPrivate.getApiKey", SYSTEMPRIVATE_GETAPIKEY) |
| 46 |
| 47 protected: |
| 48 virtual ~SystemPrivateGetApiKeyFunction() {} |
| 49 |
| 50 // ExtensionFunction: |
| 51 virtual bool RunImpl() OVERRIDE; |
| 52 }; |
| 53 |
42 // Dispatches systemPrivate.onBrightnessChanged event for extensions. | 54 // Dispatches systemPrivate.onBrightnessChanged event for extensions. |
43 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); | 55 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); |
44 | 56 |
45 // Dispatches systemPrivate.onVolumeChanged event for extensions. | 57 // Dispatches systemPrivate.onVolumeChanged event for extensions. |
46 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); | 58 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); |
47 | 59 |
48 // Dispatches systemPrivate.onScreenChanged event for extensions. | 60 // Dispatches systemPrivate.onScreenChanged event for extensions. |
49 void DispatchScreenUnlockedEvent(); | 61 void DispatchScreenUnlockedEvent(); |
50 | 62 |
51 // Dispatches systemPrivate.onWokeUp event for extensions. | 63 // Dispatches systemPrivate.onWokeUp event for extensions. |
52 void DispatchWokeUpEvent(); | 64 void DispatchWokeUpEvent(); |
53 | 65 |
54 } // namespace extensions | 66 } // namespace extensions |
55 | 67 |
56 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ | 68 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ |
OLD | NEW |