Add new certificateProvider extension API.
[chromium-blink-merge.git] / chrome / browser / extensions / api / system_private / system_private_api.h
blob30d230691259030bb595c55e77c1473331e27daf
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.
5 // This extension API contains system-wide preferences and functions that shall
6 // be only available to component extensions.
8 #ifndef CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_
9 #define CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_
11 #include "chrome/browser/extensions/chrome_extension_function.h"
13 namespace extensions {
15 class SystemPrivateGetIncognitoModeAvailabilityFunction
16 : public ChromeSyncExtensionFunction {
17 public:
18 DECLARE_EXTENSION_FUNCTION("systemPrivate.getIncognitoModeAvailability",
19 SYSTEMPRIVATE_GETINCOGNITOMODEAVAILABILITY)
21 protected:
22 ~SystemPrivateGetIncognitoModeAvailabilityFunction() override {}
24 // ExtensionFunction:
25 bool RunSync() override;
28 // API function which returns the status of system update.
29 class SystemPrivateGetUpdateStatusFunction
30 : public ChromeSyncExtensionFunction {
31 public:
32 DECLARE_EXTENSION_FUNCTION("systemPrivate.getUpdateStatus",
33 SYSTEMPRIVATE_GETUPDATESTATUS)
35 protected:
36 ~SystemPrivateGetUpdateStatusFunction() override {}
38 // ExtensionFunction:
39 bool RunSync() override;
42 // API function which returns the Google API key.
43 class SystemPrivateGetApiKeyFunction : public SyncExtensionFunction {
44 public:
45 DECLARE_EXTENSION_FUNCTION("systemPrivate.getApiKey", SYSTEMPRIVATE_GETAPIKEY)
47 protected:
48 ~SystemPrivateGetApiKeyFunction() override {}
50 // ExtensionFunction:
51 bool RunSync() override;
54 // Dispatches systemPrivate.onBrightnessChanged event for extensions.
55 void DispatchBrightnessChangedEvent(int brightness, bool user_initiated);
57 // Dispatches systemPrivate.onVolumeChanged event for extensions.
58 void DispatchVolumeChangedEvent(double volume, bool is_volume_muted);
60 // Dispatches systemPrivate.onScreenChanged event for extensions.
61 void DispatchScreenUnlockedEvent();
63 // Dispatches systemPrivate.onWokeUp event for extensions.
64 void DispatchWokeUpEvent();
66 } // namespace extensions
68 #endif // CHROME_BROWSER_EXTENSIONS_API_SYSTEM_PRIVATE_SYSTEM_PRIVATE_API_H_