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

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

Issue 27283002: Identity API: Add chrome.identity.onSignInChanged routing and IDL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 7 years, 2 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 // Use the <code>chrome.identity</code> API to get OAuth2 access tokens. 5 // Use the <code>chrome.identity</code> API to get OAuth2 access tokens.
6 namespace identity { 6 namespace identity {
7 7
8 dictionary TokenDetails { 8 dictionary TokenDetails {
9 // Fetching a token may require the user to sign-in to Chrome, or 9 // Fetching a token may require the user to sign-in to Chrome, or
10 // approve the application's requested scopes. If the interactive 10 // approve the application's requested scopes. If the interactive
(...skipping 21 matching lines...) Expand all
32 // loading a page meant to be displayed. 32 // loading a page meant to be displayed.
33 // 33 //
34 // If the interactive flag is <code>true</code>, the window will 34 // If the interactive flag is <code>true</code>, the window will
35 // be displayed when a page load completes. If the flag is 35 // be displayed when a page load completes. If the flag is
36 // <code>false</code> or omitted, <code>launchWebAuthFlow</code> 36 // <code>false</code> or omitted, <code>launchWebAuthFlow</code>
37 // will return with an error if the initial navigation does not 37 // will return with an error if the initial navigation does not
38 // complete the flow. 38 // complete the flow.
39 boolean? interactive; 39 boolean? interactive;
40 }; 40 };
41 41
42 dictionary AccountInfo {
43 DOMString id;
44 DOMString? email;
45 };
46
42 callback GetAuthTokenCallback = void (optional DOMString token); 47 callback GetAuthTokenCallback = void (optional DOMString token);
43 callback InvalidateAuthTokenCallback = void (); 48 callback InvalidateAuthTokenCallback = void ();
44 callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl); 49 callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl);
45 50
46 interface Functions { 51 interface Functions {
47 // Gets an OAuth2 access token using the client ID and scopes 52 // Gets an OAuth2 access token using the client ID and scopes
48 // specified in the <a 53 // specified in the <a
49 // href="app_identity.html#update_manifest"><code>oauth2</code> 54 // href="app_identity.html#update_manifest"><code>oauth2</code>
50 // section of manifest.json</a>. 55 // section of manifest.json</a>.
51 // 56 //
(...skipping 26 matching lines...) Expand all
78 // first URL in the provider's auth flow. When the provider 83 // first URL in the provider's auth flow. When the provider
79 // redirects to a URL matching the pattern 84 // redirects to a URL matching the pattern
80 // <code>https://&lt;app-id&gt;.chromiumapp.org/*</code>, the 85 // <code>https://&lt;app-id&gt;.chromiumapp.org/*</code>, the
81 // window will close, and the final redirect URL will be passed to 86 // window will close, and the final redirect URL will be passed to
82 // the <var>callback</var> function. 87 // the <var>callback</var> function.
83 // 88 //
84 // |details| : WebAuth flow options. 89 // |details| : WebAuth flow options.
85 // |callback| : Called with the URL redirected back to your application. 90 // |callback| : Called with the URL redirected back to your application.
86 static void launchWebAuthFlow(WebAuthFlowDetails details, 91 static void launchWebAuthFlow(WebAuthFlowDetails details,
87 LaunchWebAuthFlowCallback callback); 92 LaunchWebAuthFlowCallback callback);
88 } 93 };
89 ; 94
95 interface Events {
96 // Fired when signin state changes for an account on the user's profile.
97 static void onSignInChanged(AccountInfo account, boolean signedIn);
98 };
90 }; 99 };
OLDNEW
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | chrome/common/extensions/permissions/chrome_api_permissions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698