OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 // This extension API contains system-wide preferences and functions that shall | |
6 // be only available to component extensions. | |
7 | |
8 #ifndef CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ | |
9 #define CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ | |
10 | |
11 #include "chrome/browser/extensions/extension_function.h" | |
12 | |
13 namespace extensions { | |
14 | |
15 class GetIncognitoModeAvailabilityFunction : public SyncExtensionFunction { | |
16 public: | |
17 DECLARE_EXTENSION_FUNCTION("systemPrivate.getIncognitoModeAvailability", | |
18 SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY) | |
19 | |
20 protected: | |
21 virtual ~GetIncognitoModeAvailabilityFunction() {} | |
22 | |
23 // ExtensionFunction: | |
24 virtual bool RunImpl() OVERRIDE; | |
25 }; | |
26 | |
27 // API function which returns the status of system update. | |
28 class GetUpdateStatusFunction : public SyncExtensionFunction { | |
29 public: | |
30 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus", | |
31 SYSTEMPRIVATE_GETUPDATESTATUS) | |
32 | |
33 protected: | |
34 virtual ~GetUpdateStatusFunction() {} | |
35 | |
36 // ExtensionFunction: | |
37 virtual bool RunImpl() OVERRIDE; | |
38 }; | |
39 | |
40 // Dispatches systemPrivate.onBrightnessChanged event for extensions. | |
41 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated); | |
42 | |
43 // Dispatches systemPrivate.onVolumeChanged event for extensions. | |
44 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted); | |
45 | |
46 // Dispatches systemPrivate.onScreenChanged event for extensions. | |
47 void DispatchScreenUnlockedEvent(); | |
48 | |
49 // Dispatches systemPrivate.onWokeUp event for extensions. | |
50 void DispatchWokeUpEvent(); | |
51 | |
52 } // namespace extensions | |
53 | |
54 #endif // CHROME_BROWSER_EXTENSIONS_SYSTEM_SYSTEM_API_H_ | |
OLD | NEW |