users_private.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. // Copyright 2020 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. // This file was generated by:
  5. // tools/json_schema_compiler/compiler.py.
  6. // NOTE: The format of types has changed. 'FooType' is now
  7. // 'chrome.usersPrivate.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md
  10. /** @fileoverview Externs generated from namespace: usersPrivate */
  11. /** @const */
  12. chrome.usersPrivate = {};
  13. /**
  14. * @typedef {{
  15. * email: string,
  16. * displayEmail: string,
  17. * name: string,
  18. * isOwner: boolean,
  19. * isChild: boolean
  20. * }}
  21. */
  22. chrome.usersPrivate.User;
  23. /**
  24. * @typedef {{
  25. * isLoggedIn: boolean,
  26. * isScreenLocked: boolean
  27. * }}
  28. */
  29. chrome.usersPrivate.LoginStatusDict;
  30. /**
  31. * Gets a list of known users.
  32. * @param {function(!Array<!chrome.usersPrivate.User>): void} callback
  33. */
  34. chrome.usersPrivate.getUsers = function(callback) {};
  35. /**
  36. * Checks to see if the user is already present in the user list.
  37. * @param {string} email
  38. * @param {function(boolean): void} callback
  39. */
  40. chrome.usersPrivate.isUserInList = function(email, callback) {};
  41. /**
  42. * Adds a new user with the given email to the user list. The callback is called
  43. * with true if the user was added succesfully, or with false if not (e.g.
  44. * because the user was already present, or the current user isn't the owner).
  45. * @param {string} email
  46. * @param {function(boolean): void} callback
  47. */
  48. chrome.usersPrivate.addUser = function(email, callback) {};
  49. /**
  50. * Removes the user with the given email from the user list. The callback is
  51. * called with true if the user was removed succesfully, or with false if not
  52. * (e.g. because the user was not already present, or the current user isn't the
  53. * owner).
  54. * @param {string} email
  55. * @param {function(boolean): void} callback
  56. */
  57. chrome.usersPrivate.removeUser = function(email, callback) {};
  58. /**
  59. * Whether the user list is managed by enterprise.
  60. * @param {function(boolean): void} callback
  61. */
  62. chrome.usersPrivate.isUserListManaged = function(callback) {};
  63. /**
  64. * Returns the current user.
  65. * @param {function(!chrome.usersPrivate.User): void} callback
  66. */
  67. chrome.usersPrivate.getCurrentUser = function(callback) {};
  68. /**
  69. * Get login status.
  70. * @param {function(!chrome.usersPrivate.LoginStatusDict): void} callback
  71. */
  72. chrome.usersPrivate.getLoginStatus = function(callback) {};