Infobar material design refresh: bg color
[chromium-blink-merge.git] / extensions / shell / common / api / identity.idl
blobf5e681e9b6f8d49a9b1122cc74768b4cd4cab27f
1 // Copyright 2014 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.
5 // Simplified implementation of the <code>chrome.identity</code> for app_shell.
6 namespace identity {
8 dictionary GetAuthTokenDetails {
9 // Ignored parameter. Exists only for compatibility.
10 boolean? interactive;
13 dictionary InvalidTokenDetails {
14 // Ignored parameter. Exists only for compatibility.
15 DOMString? token;
18 // Called with the OAuth2 access token on success or undefined on error.
19 callback GetAuthTokenCallback = void (optional DOMString token);
21 // Called by removeCachedAuthToken().
22 callback InvalidateAuthTokenCallback = void ();
24 interface Functions {
25 // Returns an OAuth2 access token for the current app_shell user for scopes
26 // from the manifest. Does not prompt the user.
27 static void getAuthToken(GetAuthTokenDetails options,
28 GetAuthTokenCallback callback);
30 // Stub. Calls callback immediately because app_shell does not cache access
31 // tokens the way Chrome does.
32 static void removeCachedAuthToken(InvalidTokenDetails details,
33 InvalidateAuthTokenCallback callback);
36 interface Events {
37 // Stub. Never fired because app_shell only supports a single user account.
38 static void onSignInChanged(object account, boolean signedIn);