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

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 7432006: Add an experimental permissions API for extensions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/common/extensions/api/extension_api.json
diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json
index b7cef603abf4529a894d208bbd056acda7352226..34f59678b846331fa58637fc4fb9f65a68e389e0 100644
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -1058,6 +1058,157 @@
]
},
{
+ "namespace": "permissions",
+ "types": [
+ {
+ "id": "Permissions",
+ "type": "object",
+ "properties": {
+ "apis": {
+ "type": "array",
+ "items": {"type": "string"},
+ "optional": true,
+ "description": "List of API permissions"
+ }
+ }
+ }
+ ],
+ "events": [
+ {
+ "name": "onAdded",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Fired when the extension acquires new permissions.",
+ "parameters": [
+ {
+ "$ref": "Permissions",
+ "name": "permissions",
+ "description": "The newly acquired permissions."
+ }
+ ]
+ },
+ {
+ "name": "onRemoved",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Fired when access to permissions has been removed from the extension.",
+ "parameters": [
+ {
+ "$ref": "Permissions",
+ "name": "permissions",
+ "description": "The permissions that have been removed."
+ }
+ ]
+ }
+ ],
+ "functions": [
+ {
+ "name": "getAll",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Gets the extension's current set of permissions.",
+ "parameters": [
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions",
+ "description": "The extension's active permissions."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "contains",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Checks if the extension has the specified permissions.",
+ "parameters": [
+ {
+ "name": "permissions",
+ "$ref": "Permissions"
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "parameters": [
+ {
+ "name": "result",
+ "type": "boolean",
+ "description": "True if the extension has the specified permissions."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "request",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Requests access to the specified permissions.",
jstritar 2011/07/19 17:15:13 Mention the optional_permissions field of the mani
jstritar 2011/07/22 19:21:55 Done.
+ "parameters": [
+ {
+ "name": "requestInfo",
+ "type": "object",
Mihai Parparita -not on Chrome 2011/07/20 22:03:43 Shouldn't this be of type Permissions?
jstritar 2011/07/22 19:21:55 Done.
+ "properties": {
+ "apis": {
+ "type": "array",
+ "items": {"type": "string"},
+ "optional": true
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "granted",
+ "type": "boolean",
+ "description": "True if the user granted the specified permissions."
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "name": "remove",
+ "type": "function",
+ "unprivileged": true,
+ "description": "Removes access to the specified permissions.",
+ "parameters": [
+ {
+ "name": "removeInfo",
+ "type": "object",
+ "properties": {
+ "apis": {
+ "type": "array",
+ "items": {"type": "string"},
+ "optional": true
+ }
+ }
+ },
+ {
+ "name": "callback",
+ "type": "function",
+ "optional": true,
+ "parameters": [
+ {
+ "name": "removed",
+ "type": "boolean",
+ "description": "True if the permissions were removed."
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
"namespace": "tabs",
"types": [
{
@@ -6380,7 +6531,7 @@
"title": {
"type": "string",
"optional": true,
- "description": "The title of the notification."
+ "description": "The title of the notification."
},
"bodyText": {
"type": "string",

Powered by Google App Engine
This is Rietveld 408576698