mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Add the chrome.loginState API (#42853)
* Add the chrome.loginState API https://chromium.googlesource.com/chromium/src/+/HEAD/chrome/common/extensions/api/login_state.idl * Update index.d.ts * Update index.d.ts
This commit is contained in:
Vendored
+28
@@ -4153,6 +4153,34 @@ declare namespace chrome.input.ime {
|
||||
export var onReset: InputResetEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// LoginState
|
||||
////////////////////
|
||||
/**
|
||||
* Use the chrome.loginState API to read and monitor the login state.
|
||||
* Permissions: "loginState"
|
||||
* @since Chrome 78.
|
||||
* Important: This API works only on Chrome OS.
|
||||
*/
|
||||
declare namespace chrome.loginState {
|
||||
export interface SessionStateChangedEvent extends chrome.events.Event<(sessionState: SessionState) => void> { }
|
||||
|
||||
/** Possible profile types. */
|
||||
export type ProfileType = 'SIGNIN_PROFILE'|'USER_PROFILE';
|
||||
|
||||
/** Possible session states. */
|
||||
export type SessionState = 'UNKNOWN'|'IN_OOBE_SCREEN'|'IN_LOGIN_SCREEN'|'IN_SESSION'|'IN_LOCK_SCREEN';
|
||||
|
||||
/** Gets the type of the profile the extension is in. */
|
||||
export function getProfileType(callback: (profileType: ProfileType) => void): void;
|
||||
|
||||
/** Gets the current session state. */
|
||||
export function getSessionState(callback: (sessionState: SessionState) => void): void;
|
||||
|
||||
/** Dispatched when the session state changes. sessionState is the new session state.*/
|
||||
export const onSessionStateChanged: SessionStateChangedEvent;
|
||||
}
|
||||
|
||||
////////////////////
|
||||
// Management
|
||||
////////////////////
|
||||
|
||||
Reference in New Issue
Block a user