| 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_SYSTEM_SYSTEM_API_H_ | 8 #ifndef CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ |
| 9 #define CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ | 9 #define CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ |
| 10 | 10 |
| 11 #include "chrome/browser/extensions/extension_function.h" | 11 #include "chrome/browser/extensions/extension_function.h" |
| 12 | 12 |
| 13 namespace extensions { | 13 namespace extensions { |
| 14 | 14 |
| 15 class GetIncognitoModeAvailabilityFunction : public SyncExtensionFunction { | 15 class GetIncognitoModeAvailabilityFunction : public SyncExtensionFunction { |
| 16 public: | 16 public: |
| 17 DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getIncognitoModeAvailability") |
| 18 |
| 19 protected: |
| 17 virtual ~GetIncognitoModeAvailabilityFunction() {} | 20 virtual ~GetIncognitoModeAvailabilityFunction() {} |
| 21 |
| 22 // ExtensionFunction: |
| 18 virtual bool RunImpl() OVERRIDE; | 23 virtual bool RunImpl() OVERRIDE; |
| 19 DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getIncognitoModeAvailability") | |
| 20 }; | 24 }; |
| 21 | 25 |
| 22 // API function which returns the status of system update. | 26 // API function which returns the status of system update. |
| 23 class GetUpdateStatusFunction : public SyncExtensionFunction { | 27 class GetUpdateStatusFunction : public SyncExtensionFunction { |
| 24 public: | 28 public: |
| 29 DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getUpdateStatus") |
| 30 |
| 31 protected: |
| 25 virtual ~GetUpdateStatusFunction() {} | 32 virtual ~GetUpdateStatusFunction() {} |
| 33 |
| 34 // ExtensionFunction: |
| 26 virtual bool RunImpl() OVERRIDE; | 35 virtual bool RunImpl() OVERRIDE; |
| 27 DECLARE_EXTENSION_FUNCTION_NAME("systemPrivate.getUpdateStatus") | |
| 28 }; | 36 }; |
| 29 | 37 |
| 30 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); | 38 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); |
| 31 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); | 39 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); |
| 32 void DispatchScreenUnlockedEvent(); | 40 void DispatchScreenUnlockedEvent(); |
| 33 void DispatchWokeUpEvent(); | 41 void DispatchWokeUpEvent(); |
| 34 | 42 |
| 35 } // namespace extensions | 43 } // namespace extensions |
| 36 | 44 |
| 37 #endif // CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ | 45 #endif // CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ |
| OLD | NEW |