diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/components/extensions/schemas/permissions.json | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/extensions/schemas/permissions.json')
-rw-r--r-- | toolkit/components/extensions/schemas/permissions.json | 150 |
1 files changed, 150 insertions, 0 deletions
diff --git a/toolkit/components/extensions/schemas/permissions.json b/toolkit/components/extensions/schemas/permissions.json new file mode 100644 index 0000000000..eb66fa7c64 --- /dev/null +++ b/toolkit/components/extensions/schemas/permissions.json @@ -0,0 +1,150 @@ +[ + { + "namespace": "permissions", + "types": [ + { + "id": "Permissions", + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { "$ref": "manifest.OptionalPermission" }, + "optional": true, + "default": [] + }, + "origins": { + "type": "array", + "items": { "$ref": "manifest.MatchPattern" }, + "optional": true, + "default": [] + } + } + }, + { + "id": "AnyPermissions", + "type": "object", + "properties": { + "permissions": { + "type": "array", + "items": { "$ref": "manifest.Permission" }, + "optional": true, + "default": [] + }, + "origins": { + "type": "array", + "items": { "$ref": "manifest.MatchPattern" }, + "optional": true, + "default": [] + } + } + } + ], + "functions": [ + { + "name": "getAll", + "type": "function", + "async": "callback", + "description": "Get a list of all the extension's permissions.", + "parameters": [ + { + "name": "callback", + "type": "function", + "parameters": [ + { + "name": "permissions", + "$ref": "AnyPermissions" + } + ] + } + ] + }, + { + "name": "contains", + "type": "function", + "async": "callback", + "description": "Check if the extension has the given permissions.", + "parameters": [ + { + "name": "permissions", + "$ref": "AnyPermissions" + }, + { + "name": "callback", + "type": "function", + "parameters": [ + { + "name": "result", + "type": "boolean" + } + ] + } + ] + }, + { + "name": "request", + "type": "function", + "allowedContexts": ["content"], + "async": "callback", + "requireUserInput": true, + "description": "Request the given permissions.", + "parameters": [ + { + "name": "permissions", + "$ref": "Permissions" + }, + { + "name": "callback", + "type": "function", + "parameters": [ + { + "name": "granted", + "type": "boolean" + } + ] + } + ] + }, + { + "name": "remove", + "type": "function", + "async": "callback", + "description": "Relinquish the given permissions.", + "parameters": [ + { + "name": "permissions", + "$ref": "Permissions" + }, + { + "name": "callback", + "type": "function", + "parameters": [] + } + ] + } + ], + "events": [ + { + "name": "onAdded", + "type": "function", + "description": "Fired when the extension acquires new permissions.", + "parameters": [ + { + "name": "permissions", + "$ref": "Permissions" + } + ] + }, + { + "name": "onRemoved", + "type": "function", + "description": "Fired when permissions are removed from the extension.", + "parameters": [ + { + "name": "permissions", + "$ref": "Permissions" + } + ] + } + ] + } +] |