Elim cr-checkbox
[chromium-blink-merge.git] / chrome / browser / chromeos / extensions / users_private / users_private_api.h
blob78f141faa738fd69d72b8eea37f684dfb7518c40
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_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_
6 #define CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_
8 #include <string>
10 #include "base/macros.h"
11 #include "chrome/browser/extensions/api/settings_private/prefs_util.h"
12 #include "chrome/browser/extensions/chrome_extension_function_details.h"
13 #include "extensions/browser/extension_function.h"
15 namespace extensions {
17 // Implements the chrome.usersPrivate.getWhitelistedUsers method.
18 class UsersPrivateGetWhitelistedUsersFunction
19 : public UIThreadExtensionFunction {
20 public:
21 UsersPrivateGetWhitelistedUsersFunction();
22 DECLARE_EXTENSION_FUNCTION("usersPrivate.getWhitelistedUsers",
23 USERSPRIVATE_GETWHITELISTEDUSERS);
25 protected:
26 ~UsersPrivateGetWhitelistedUsersFunction() override;
28 // ExtensionFunction overrides.
29 ResponseAction Run() override;
31 private:
32 ChromeExtensionFunctionDetails chrome_details_;
34 DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetWhitelistedUsersFunction);
37 // Implements the chrome.usersPrivate.addWhitelistedUser method.
38 class UsersPrivateAddWhitelistedUserFunction
39 : public UIThreadExtensionFunction {
40 public:
41 UsersPrivateAddWhitelistedUserFunction();
42 DECLARE_EXTENSION_FUNCTION("usersPrivate.addWhitelistedUser",
43 USERSPRIVATE_ADDWHITELISTEDUSER);
45 protected:
46 ~UsersPrivateAddWhitelistedUserFunction() override;
48 // AsyncExtensionFunction overrides.
49 ResponseAction Run() override;
51 private:
52 ChromeExtensionFunctionDetails chrome_details_;
54 DISALLOW_COPY_AND_ASSIGN(UsersPrivateAddWhitelistedUserFunction);
57 // Implements the chrome.usersPrivate.removeWhitelistedUser method.
58 class UsersPrivateRemoveWhitelistedUserFunction
59 : public UIThreadExtensionFunction {
60 public:
61 UsersPrivateRemoveWhitelistedUserFunction();
62 DECLARE_EXTENSION_FUNCTION("usersPrivate.removeWhitelistedUser",
63 USERSPRIVATE_REMOVEWHITELISTEDUSER);
65 protected:
66 ~UsersPrivateRemoveWhitelistedUserFunction() override;
68 // ExtensionFunction overrides.
69 ResponseAction Run() override;
71 private:
72 ChromeExtensionFunctionDetails chrome_details_;
74 DISALLOW_COPY_AND_ASSIGN(UsersPrivateRemoveWhitelistedUserFunction);
77 // Implements the chrome.usersPrivate.isCurrentUserOwner method.
78 class UsersPrivateIsCurrentUserOwnerFunction
79 : public UIThreadExtensionFunction {
80 public:
81 UsersPrivateIsCurrentUserOwnerFunction();
82 DECLARE_EXTENSION_FUNCTION("usersPrivate.isCurrentUserOwner",
83 USERSPRIVATE_ISCURRENTUSEROWNER);
85 protected:
86 ~UsersPrivateIsCurrentUserOwnerFunction() override;
88 // ExtensionFunction overrides.
89 ResponseAction Run() override;
91 private:
92 ChromeExtensionFunctionDetails chrome_details_;
94 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsCurrentUserOwnerFunction);
97 // Implements the chrome.usersPrivate.isWhitelistManaged method.
98 class UsersPrivateIsWhitelistManagedFunction
99 : public UIThreadExtensionFunction {
100 public:
101 UsersPrivateIsWhitelistManagedFunction();
102 DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged",
103 USERSPRIVATE_ISWHITELISTMANAGED);
105 protected:
106 ~UsersPrivateIsWhitelistManagedFunction() override;
108 // ExtensionFunction overrides.
109 ResponseAction Run() override;
111 private:
112 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsWhitelistManagedFunction);
115 } // namespace extensions
117 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_