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

Side by Side Diff: extensions/shell/common/api/identity.idl

Issue 804673002: app_shell: Extend identity API stub (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@unlimited-storage
Patch Set: (identity-stub) rebase Created 6 years 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
« no previous file with comments | « extensions/shell/browser/api/identity/identity_api_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Simplified implementation of the <code>chrome.identity</code> for app_shell. 5 // Simplified implementation of the <code>chrome.identity</code> for app_shell.
6 namespace identity { 6 namespace identity {
7 7
8 dictionary GetAuthTokenDetails { 8 dictionary GetAuthTokenDetails {
9 // Ignored parameter. Exists only for compatibility. 9 // Ignored parameter. Exists only for compatibility.
10 boolean? interactive; 10 boolean? interactive;
11 }; 11 };
12 12
13 dictionary InvalidTokenDetails {
14 // Ignored parameter. Exists only for compatibility.
15 DOMString? token;
16 };
17
13 // Called with the OAuth2 access token on success or undefined on error. 18 // Called with the OAuth2 access token on success or undefined on error.
14 callback GetAuthTokenCallback = void (optional DOMString token); 19 callback GetAuthTokenCallback = void (optional DOMString token);
20
21 // Called by removeCachedAuthToken().
22 callback InvalidateAuthTokenCallback = void ();
15 23
16 interface Functions { 24 interface Functions {
17 // Returns an OAuth2 access token for the current app_shell user for scopes 25 // Returns an OAuth2 access token for the current app_shell user for scopes
18 // from the manifest. Does not prompt the user. 26 // from the manifest. Does not prompt the user.
19 static void getAuthToken(GetAuthTokenDetails options, 27 static void getAuthToken(GetAuthTokenDetails options,
20 GetAuthTokenCallback callback); 28 GetAuthTokenCallback callback);
29
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);
21 }; 34 };
22 35
36 interface Events {
37 // Stub. Never fired because app_shell only supports a single user account.
38 static void onSignInChanged(object account, boolean signedIn);
39 };
23 }; 40 };
OLDNEW
« no previous file with comments | « extensions/shell/browser/api/identity/identity_api_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698