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

Side by Side Diff: chrome/common/extensions/api/users_private.idl

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, 6 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 // Use the <code>chrome.usersPrivate</code> API to manage users.
6 namespace usersPrivate {
7
8 dictionary User {
9 // Email for the user.
10 DOMString email;
11
12 // Whether this user is the device owner.
13 boolean isOwner;
14 };
15
16 callback UsersCallback = void (User[] users);
17 callback UserAddedCallback = void (boolean success);
18 callback UserRemovedCallback = void (boolean success);
19 callback IsOwnerCallback = void (boolean isOwner);
20 callback ManagedCallback = void (boolean managed);
21
22 interface Functions {
23 // Gets a list of the currently whitelisted users.
24 static void getWhitelistedUsers(UsersCallback callback);
25
26 // Adds a new user with the given email to the whitelist.
27 // The callback is called with true if the user was added succesfully, or
28 // with false if not (e.g. because the user was already present, or the
29 // current user isn't the owner).
30 static void addWhitelistedUser(DOMString email, UserAddedCallback callback);
31
32 // Removes the user with the given email from the whitelist.
33 // The callback is called with true if the user was removed succesfully, or
34 // with false if not (e.g. because the user was not already present, or
35 // the current user isn't the owner).
36 static void removeWhitelistedUser(DOMString email, UserRemovedCallback callb ack);
37
38 // Whether the current user is the owner of the device.
39 static void isCurrentUserOwner(IsOwnerCallback callback);
40
41 // Whether the whitelist is managed by enterprise.
42 static void isWhitelistManaged(ManagedCallback callback);
43 };
44 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/schemas.gypi ('k') | chrome/common/extensions/permissions/chrome_api_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698