1 // Copyright 2015 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 #ifndef CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_API_H_
10 #include "base/macros.h"
11 #include "extensions/browser/extension_function.h"
13 namespace extensions
{
15 // Implements the chrome.settingsPrivate.setPref method.
16 class SettingsPrivateSetPrefFunction
: public UIThreadExtensionFunction
{
18 SettingsPrivateSetPrefFunction() {}
19 DECLARE_EXTENSION_FUNCTION("settingsPrivate.setPref",
20 SETTINGSPRIVATE_SETPREF
);
23 ~SettingsPrivateSetPrefFunction() override
;
25 // ExtensionFunction overrides.
26 ResponseAction
Run() override
;
28 DISALLOW_COPY_AND_ASSIGN(SettingsPrivateSetPrefFunction
);
31 // Implements the chrome.settingsPrivate.getAllPrefs method.
32 class SettingsPrivateGetAllPrefsFunction
: public UIThreadExtensionFunction
{
34 SettingsPrivateGetAllPrefsFunction() {}
35 DECLARE_EXTENSION_FUNCTION("settingsPrivate.getAllPrefs",
36 SETTINGSPRIVATE_GETALLPREFS
);
39 ~SettingsPrivateGetAllPrefsFunction() override
;
41 // AsyncExtensionFunction overrides.
42 ResponseAction
Run() override
;
44 DISALLOW_COPY_AND_ASSIGN(SettingsPrivateGetAllPrefsFunction
);
47 // Implements the chrome.settingsPrivate.getPref method.
48 class SettingsPrivateGetPrefFunction
: public UIThreadExtensionFunction
{
50 SettingsPrivateGetPrefFunction() {}
51 DECLARE_EXTENSION_FUNCTION("settingsPrivate.getPref",
52 SETTINGSPRIVATE_GETPREF
);
55 ~SettingsPrivateGetPrefFunction() override
;
57 // AsyncExtensionFunction overrides.
58 ResponseAction
Run() override
;
60 DISALLOW_COPY_AND_ASSIGN(SettingsPrivateGetPrefFunction
);
63 } // namespace extensions
65 #endif // CHROME_BROWSER_EXTENSIONS_API_SETTINGS_PRIVATE_SETTINGS_PRIVATE_API_H_