Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1236)

Unified Diff: chrome/browser/extensions/api/users_private/users_private_api.h

Issue 1143303004: Add IDL and stub implementation for chrome.usersPrivate API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make isOwner a required field Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/api/users_private/users_private_api.h
diff --git a/chrome/browser/extensions/api/users_private/users_private_api.h b/chrome/browser/extensions/api/users_private/users_private_api.h
new file mode 100644
index 0000000000000000000000000000000000000000..b1fd34dfb3c47f7bb310444ba2e35535dfc04247
--- /dev/null
+++ b/chrome/browser/extensions/api/users_private/users_private_api.h
@@ -0,0 +1,107 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_EXTENSIONS_API_USERS_PRIVATE_USERS_PRIVATE_API_H_
+#define CHROME_BROWSER_EXTENSIONS_API_USERS_PRIVATE_USERS_PRIVATE_API_H_
+
+#include <string>
+
+#include "base/macros.h"
+#include "extensions/browser/extension_function.h"
+
+namespace extensions {
+
+// Implements the chrome.usersPrivate.getWhitelistedUsers method.
+class UsersPrivateGetWhitelistedUsersFunction
+ : public UIThreadExtensionFunction {
+ public:
+ UsersPrivateGetWhitelistedUsersFunction();
+ DECLARE_EXTENSION_FUNCTION("usersPrivate.getWhitelistedUsers",
+ USERSPRIVATE_GETWHITELISTEDUSERS);
+
+ protected:
+ ~UsersPrivateGetWhitelistedUsersFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UsersPrivateGetWhitelistedUsersFunction);
+};
+
+// Implements the chrome.usersPrivate.addWhitelistedUser method.
+class UsersPrivateAddWhitelistedUserFunction
+ : public UIThreadExtensionFunction {
+ public:
+ UsersPrivateAddWhitelistedUserFunction();
+ DECLARE_EXTENSION_FUNCTION("usersPrivate.addWhitelistedUser",
+ USERSPRIVATE_ADDWHITELISTEDUSER);
+
+ protected:
+ ~UsersPrivateAddWhitelistedUserFunction() override;
+
+ // AsyncExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UsersPrivateAddWhitelistedUserFunction);
+};
+
+// Implements the chrome.usersPrivate.removeWhitelistedUser method.
+class UsersPrivateRemoveWhitelistedUserFunction
+ : public UIThreadExtensionFunction {
+ public:
+ UsersPrivateRemoveWhitelistedUserFunction();
+ DECLARE_EXTENSION_FUNCTION("usersPrivate.removeWhitelistedUser",
+ USERSPRIVATE_REMOVEWHITELISTEDUSER);
+
+ protected:
+ ~UsersPrivateRemoveWhitelistedUserFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UsersPrivateRemoveWhitelistedUserFunction);
+};
+
+// Implements the chrome.usersPrivate.isCurrentUserOwner method.
+class UsersPrivateIsCurrentUserOwnerFunction
+ : public UIThreadExtensionFunction {
+ public:
+ UsersPrivateIsCurrentUserOwnerFunction();
+ DECLARE_EXTENSION_FUNCTION("usersPrivate.isCurrentUserOwner",
+ USERSPRIVATE_ISCURRENTUSEROWNER);
+
+ protected:
+ ~UsersPrivateIsCurrentUserOwnerFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsCurrentUserOwnerFunction);
+};
+
+// Implements the chrome.usersPrivate.isWhitelistManaged method.
+class UsersPrivateIsWhitelistManagedFunction
+ : public UIThreadExtensionFunction {
+ public:
+ UsersPrivateIsWhitelistManagedFunction();
+ DECLARE_EXTENSION_FUNCTION("usersPrivate.isWhitelistManaged",
+ USERSPRIVATE_ISWHITELISTMANAGED);
+
+ protected:
+ ~UsersPrivateIsWhitelistManagedFunction() override;
+
+ // ExtensionFunction overrides.
+ ResponseAction Run() override;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(UsersPrivateIsWhitelistManagedFunction);
+};
+
+} // namespace extensions
+
+#endif // CHROME_BROWSER_EXTENSIONS_API_USERS_PRIVATE_USERS_PRIVATE_API_H_
« no previous file with comments | « chrome/browser/extensions/api/users_private/OWNERS ('k') | chrome/browser/extensions/api/users_private/users_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698