summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/common/extensions/api')
-rw-r--r--chrome/common/extensions/api/_api_features.json5
-rw-r--r--chrome/common/extensions/api/_permission_features.json4
-rw-r--r--chrome/common/extensions/api/identity.idl13
3 files changed, 20 insertions, 2 deletions
diff --git a/chrome/common/extensions/api/_api_features.json b/chrome/common/extensions/api/_api_features.json
index b6e72e7..9026c20 100644
--- a/chrome/common/extensions/api/_api_features.json
+++ b/chrome/common/extensions/api/_api_features.json
@@ -309,6 +309,11 @@
"dependencies": ["permission:identity"],
"contexts": ["blessed_extension"]
},
+ "identity.onSignInChanged": {
+ "channel": "dev",
+ "dependencies": ["permission:identity"],
+ "contexts": ["blessed_extension"]
+ },
"identityPrivate": {
"dependencies": ["permission:identityPrivate"],
"contexts": ["blessed_extension"]
diff --git a/chrome/common/extensions/api/_permission_features.json b/chrome/common/extensions/api/_permission_features.json
index ce62073..922176a 100644
--- a/chrome/common/extensions/api/_permission_features.json
+++ b/chrome/common/extensions/api/_permission_features.json
@@ -360,6 +360,10 @@
"channel": "stable",
"extension_types": ["extension", "platform_app"]
},
+ "identity.email": {
+ "channel": "dev",
+ "extension_types": ["extension", "platform_app"]
+ },
"identityPrivate": {
"channel": "stable",
"extension_types": [
diff --git a/chrome/common/extensions/api/identity.idl b/chrome/common/extensions/api/identity.idl
index cba84e4..cefd50c 100644
--- a/chrome/common/extensions/api/identity.idl
+++ b/chrome/common/extensions/api/identity.idl
@@ -39,6 +39,11 @@ namespace identity {
boolean? interactive;
};
+ dictionary AccountInfo {
+ DOMString id;
+ DOMString? email;
+ };
+
callback GetAuthTokenCallback = void (optional DOMString token);
callback InvalidateAuthTokenCallback = void ();
callback LaunchWebAuthFlowCallback = void (optional DOMString responseUrl);
@@ -85,6 +90,10 @@ namespace identity {
// |callback| : Called with the URL redirected back to your application.
static void launchWebAuthFlow(WebAuthFlowDetails details,
LaunchWebAuthFlowCallback callback);
- }
- ;
+ };
+
+ interface Events {
+ // Fired when signin state changes for an account on the user's profile.
+ static void onSignInChanged(AccountInfo account, boolean signedIn);
+ };
};