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_
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
{
21 UsersPrivateGetWhitelistedUsersFunction();
22 DECLARE_EXTENSION_FUNCTION("usersPrivate.getWhitelistedUsers",
23 USERSPRIVATE_GETWHITELISTEDUSERS
);
26 ~UsersPrivateGetWhitelistedUsersFunction() override
;
28 // ExtensionFunction overrides.
29 ResponseAction
Run() override
;
32 ChromeExtensionFunctionDetails chrome_details_
;
34 DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetWhitelistedUsersFunction
);
37 // Implements the chrome.usersPrivate.addWhitelistedUser method.
38 class UsersPrivateAddWhitelistedUserFunction
39 : public UIThreadExtensionFunction
{
41 UsersPrivateAddWhitelistedUserFunction();
42 DECLARE_EXTENSION_FUNCTION("usersPrivate.addWhitelistedUser",
43 USERSPRIVATE_ADDWHITELISTEDUSER
);
46 ~UsersPrivateAddWhitelistedUserFunction() override
;
48 // AsyncExtensionFunction overrides.
49 ResponseAction
Run() override
;
52 ChromeExtensionFunctionDetails chrome_details_
;
54 DISALLOW_COPY_AND_ASSIGN(UsersPrivateAddWhitelistedUserFunction
);
57 // Implements the chrome.usersPrivate.removeWhitelistedUser method.
58 class UsersPrivateRemoveWhitelistedUserFunction
59 : public UIThreadExtensionFunction
{
61 UsersPrivateRemoveWhitelistedUserFunction();
62 DECLARE_EXTENSION_FUNCTION("usersPrivate.removeWhitelistedUser",
63 USERSPRIVATE_REMOVEWHITELISTEDUSER
);
66 ~UsersPrivateRemoveWhitelistedUserFunction() override
;
68 // ExtensionFunction overrides.
69 ResponseAction
Run() override
;
72 ChromeExtensionFunctionDetails chrome_details_
;
74 DISALLOW_COPY_AND_ASSIGN(UsersPrivateRemoveWhitelistedUserFunction
);
77 // Implements the chrome.usersPrivate.isCurrentUserOwner method.
78 class UsersPrivateIsCurrentUserOwnerFunction
79 : public UIThreadExtensionFunction
{
81 UsersPrivateIsCurrentUserOwnerFunction();
82 DECLARE_EXTENSION_FUNCTION("usersPrivate.isCurrentUserOwner",
83 USERSPRIVATE_ISCURRENTUSEROWNER
);
86 ~UsersPrivateIsCurrentUserOwnerFunction() override
;
88 // ExtensionFunction overrides.
89 ResponseAction
Run() override
;
92 ChromeExtensionFunctionDetails chrome_details_
;
94 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsCurrentUserOwnerFunction
);
97 // Implements the chrome.usersPrivate.isWhitelistManaged method.
98 class UsersPrivateIsWhitelistManagedFunction
99 : public UIThreadExtensionFunction
{
101 UsersPrivateIsWhitelistManagedFunction();
102 DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged",
103 USERSPRIVATE_ISWHITELISTMANAGED
);
106 ~UsersPrivateIsWhitelistManagedFunction() override
;
108 // ExtensionFunction overrides.
109 ResponseAction
Run() override
;
112 DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsWhitelistManagedFunction
);
115 } // namespace extensions
117 #endif // CHROME_BROWSER_CHROMEOS_EXTENSIONS_USERS_PRIVATE_USERS_PRIVATE_API_H_