summaryrefslogtreecommitdiffstats
path: root/extensions/shell/common
diff options
context:
space:
mode:
authorjamescook <jamescook@chromium.org>2014-12-15 13:25:17 -0800
committerCommit bot <commit-bot@chromium.org>2014-12-15 21:25:36 +0000
commite6324c7578dba3cf4c19bd74a82598c6f22cdb95 (patch)
treeb43cbda64ea3764a9948f04b03803739035d6e64 /extensions/shell/common
parent0db8ee2ffb6efbce5f14a40729e8fd5eebf9d38f (diff)
downloadchromium_src-e6324c7578dba3cf4c19bd74a82598c6f22cdb95.zip
chromium_src-e6324c7578dba3cf4c19bd74a82598c6f22cdb95.tar.gz
chromium_src-e6324c7578dba3cf4c19bd74a82598c6f22cdb95.tar.bz2
app_shell: Extend identity API stub
Provide stubs for chrome.identity.removeCachedAuthToken() and chrome.identity. onSignInChanged. BUG=441976 TEST=added to app_shell_unittests Review URL: https://codereview.chromium.org/804673002 Cr-Commit-Position: refs/heads/master@{#308421}
Diffstat (limited to 'extensions/shell/common')
-rw-r--r--extensions/shell/common/api/identity.idl17
1 files changed, 17 insertions, 0 deletions
diff --git a/extensions/shell/common/api/identity.idl b/extensions/shell/common/api/identity.idl
index a77509a..f5e681e 100644
--- a/extensions/shell/common/api/identity.idl
+++ b/extensions/shell/common/api/identity.idl
@@ -10,14 +10,31 @@ namespace identity {
boolean? interactive;
};
+ dictionary InvalidTokenDetails {
+ // Ignored parameter. Exists only for compatibility.
+ DOMString? token;
+ };
+
// Called with the OAuth2 access token on success or undefined on error.
callback GetAuthTokenCallback = void (optional DOMString token);
+
+ // Called by removeCachedAuthToken().
+ callback InvalidateAuthTokenCallback = void ();
interface Functions {
// Returns an OAuth2 access token for the current app_shell user for scopes
// from the manifest. Does not prompt the user.
static void getAuthToken(GetAuthTokenDetails options,
GetAuthTokenCallback callback);
+
+ // Stub. Calls callback immediately because app_shell does not cache access
+ // tokens the way Chrome does.
+ static void removeCachedAuthToken(InvalidTokenDetails details,
+ InvalidateAuthTokenCallback callback);
};
+ interface Events {
+ // Stub. Never fired because app_shell only supports a single user account.
+ static void onSignInChanged(object account, boolean signedIn);
+ };
};