login_state.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2021 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.loginState.FooType'.
  8. // Please run the closure compiler before committing changes.
  9. // See https://chromium.googlesource.com/chromium/src/+/main/docs/closure_compilation.md
  10. /** @fileoverview Externs generated from namespace: loginState */
  11. /** @const */
  12. chrome.loginState = {};
  13. /**
  14. * @enum {string}
  15. * @see https://developer.chrome.com/extensions/loginState#type-ProfileType
  16. */
  17. chrome.loginState.ProfileType = {
  18. SIGNIN_PROFILE: 'SIGNIN_PROFILE',
  19. USER_PROFILE: 'USER_PROFILE',
  20. };
  21. /**
  22. * @enum {string}
  23. * @see https://developer.chrome.com/extensions/loginState#type-SessionState
  24. */
  25. chrome.loginState.SessionState = {
  26. UNKNOWN: 'UNKNOWN',
  27. IN_OOBE_SCREEN: 'IN_OOBE_SCREEN',
  28. IN_LOGIN_SCREEN: 'IN_LOGIN_SCREEN',
  29. IN_SESSION: 'IN_SESSION',
  30. IN_LOCK_SCREEN: 'IN_LOCK_SCREEN',
  31. IN_RMA_SCREEN: 'IN_RMA_SCREEN',
  32. };
  33. /**
  34. * Gets the type of the profile the extension is in.
  35. * @param {function(!chrome.loginState.ProfileType): void} callback
  36. * @see https://developer.chrome.com/extensions/loginState#method-getProfileType
  37. */
  38. chrome.loginState.getProfileType = function(callback) {};
  39. /**
  40. * Gets the current session state.
  41. * @param {function(!chrome.loginState.SessionState): void} callback
  42. * @see https://developer.chrome.com/extensions/loginState#method-getSessionState
  43. */
  44. chrome.loginState.getSessionState = function(callback) {};
  45. /**
  46. * Dispatched when the session state changes. <code>sessionState</code> is the
  47. * new session state.
  48. * @type {!ChromeEvent}
  49. * @see https://developer.chrome.com/extensions/loginState#event-onSessionStateChanged
  50. */
  51. chrome.loginState.onSessionStateChanged;