| 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 20 matching lines...) Expand all Loading... |
| 31 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus", | 31 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus", |
| 32 SYSTEMPRIVATE_GETUPDATESTATUS) | 32 SYSTEMPRIVATE_GETUPDATESTATUS) |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 virtual ~SystemPrivateGetUpdateStatusFunction() {} | 35 virtual ~SystemPrivateGetUpdateStatusFunction() {} |
| 36 | 36 |
| 37 // ExtensionFunction: | 37 // ExtensionFunction: |
| 38 virtual bool RunImpl() OVERRIDE; | 38 virtual bool RunImpl() OVERRIDE; |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 // API function which returns the Google API key. |
| 42 class SystemPrivateGetApiKeyFunction : public SyncExtensionFunction { |
| 43 public: |
| 44 DECLARE_EXTENSION_FUNCTION("systemPrivate.getApiKey", SYSTEMPRIVATE_GETAPIKEY) |
| 45 |
| 46 protected: |
| 47 virtual ~SystemPrivateGetApiKeyFunction() {} |
| 48 |
| 49 // ExtensionFunction: |
| 50 virtual bool RunImpl() OVERRIDE; |
| 51 }; |
| 52 |
| 41 // Dispatches systemPrivate.onBrightnessChanged event for extensions. | 53 // Dispatches systemPrivate.onBrightnessChanged event for extensions. |
| 42 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); | 54 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); |
| 43 | 55 |
| 44 // Dispatches systemPrivate.onVolumeChanged event for extensions. | 56 // Dispatches systemPrivate.onVolumeChanged event for extensions. |
| 45 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); | 57 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); |
| 46 | 58 |
| 47 // Dispatches systemPrivate.onScreenChanged event for extensions. | 59 // Dispatches systemPrivate.onScreenChanged event for extensions. |
| 48 void DispatchScreenUnlockedEvent(); | 60 void DispatchScreenUnlockedEvent(); |
| 49 | 61 |
| 50 // Dispatches systemPrivate.onWokeUp event for extensions. | 62 // Dispatches systemPrivate.onWokeUp event for extensions. |
| 51 void DispatchWokeUpEvent(); | 63 void DispatchWokeUpEvent(); |
| 52 | 64 |
| 53 } // namespace extensions | 65 } // namespace extensions |
| 54 | 66 |
| 55 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ | 67 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_ |
| OLD | NEW |