| OLD | NEW |
| (Empty) |
| 1 [ | |
| 2 { | |
| 3 "namespace": "permissions", | |
| 4 "types": [ | |
| 5 { | |
| 6 "id": "Permissions", | |
| 7 "type": "object", | |
| 8 "properties": { | |
| 9 "permissions": { | |
| 10 "type": "array", | |
| 11 "items": {"type": "string"}, | |
| 12 "optional": true, | |
| 13 "description": "List of named permissions (does not include hosts or
origins)." | |
| 14 }, | |
| 15 "origins": { | |
| 16 "type": "array", | |
| 17 "items": {"type": "string"}, | |
| 18 "optional": true, | |
| 19 "description": "List of origin permissions." | |
| 20 } | |
| 21 } | |
| 22 } | |
| 23 ], | |
| 24 "events": [ | |
| 25 { | |
| 26 "name": "onAdded", | |
| 27 "type": "function", | |
| 28 "description": "Fired when the extension acquires new permissions.", | |
| 29 "parameters": [ | |
| 30 { | |
| 31 "$ref": "Permissions", | |
| 32 "name": "permissions", | |
| 33 "description": "The newly acquired permissions." | |
| 34 } | |
| 35 ] | |
| 36 }, | |
| 37 { | |
| 38 "name": "onRemoved", | |
| 39 "type": "function", | |
| 40 "description": "Fired when access to permissions has been removed from t
he extension.", | |
| 41 "parameters": [ | |
| 42 { | |
| 43 "$ref": "Permissions", | |
| 44 "name": "permissions", | |
| 45 "description": "The permissions that have been removed." | |
| 46 } | |
| 47 ] | |
| 48 } | |
| 49 ], | |
| 50 "functions": [ | |
| 51 { | |
| 52 "name": "getAll", | |
| 53 "type": "function", | |
| 54 "description": "Gets the extension's current set of permissions.", | |
| 55 "parameters": [ | |
| 56 { | |
| 57 "name": "callback", | |
| 58 "type": "function", | |
| 59 "parameters": [ | |
| 60 { | |
| 61 "name": "permissions", | |
| 62 "$ref": "Permissions", | |
| 63 "description": "The extension's active permissions." | |
| 64 } | |
| 65 ] | |
| 66 } | |
| 67 ] | |
| 68 }, | |
| 69 { | |
| 70 "name": "contains", | |
| 71 "type": "function", | |
| 72 "description": "Checks if the extension has the specified permissions.", | |
| 73 "parameters": [ | |
| 74 { | |
| 75 "name": "permissions", | |
| 76 "$ref": "Permissions" | |
| 77 }, | |
| 78 { | |
| 79 "name": "callback", | |
| 80 "type": "function", | |
| 81 "parameters": [ | |
| 82 { | |
| 83 "name": "result", | |
| 84 "type": "boolean", | |
| 85 "description": "True if the extension has the specified permissi
ons." | |
| 86 } | |
| 87 ] | |
| 88 } | |
| 89 ] | |
| 90 }, | |
| 91 { | |
| 92 "name": "request", | |
| 93 "type": "function", | |
| 94 "description": "Requests access to the specified permissions. These perm
issions must be defined in the optional_permissions field of the manifest. If th
ere are any problems requesting the permissions, <a href='extension.html#propert
y-lastError'>chrome.runtime.lastError</a> will be set.", | |
| 95 "parameters": [ | |
| 96 { | |
| 97 "name": "permissions", | |
| 98 "$ref": "Permissions" | |
| 99 }, | |
| 100 { | |
| 101 "name": "callback", | |
| 102 "type": "function", | |
| 103 "optional": true, | |
| 104 "parameters": [ | |
| 105 { | |
| 106 "name": "granted", | |
| 107 "type": "boolean", | |
| 108 "description": "True if the user granted the specified permissio
ns." | |
| 109 } | |
| 110 ] | |
| 111 } | |
| 112 ] | |
| 113 }, | |
| 114 { | |
| 115 "name": "remove", | |
| 116 "type": "function", | |
| 117 "description": "Removes access to the specified permissions. If there ar
e any problems removing the permissions, <a href='extension.html#property-lastEr
ror'>chrome.runtime.lastError</a> will be set.", | |
| 118 "parameters": [ | |
| 119 { | |
| 120 "name": "permissions", | |
| 121 "$ref": "Permissions" | |
| 122 }, | |
| 123 { | |
| 124 "name": "callback", | |
| 125 "type": "function", | |
| 126 "optional": true, | |
| 127 "parameters": [ | |
| 128 { | |
| 129 "name": "removed", | |
| 130 "type": "boolean", | |
| 131 "description": "True if the permissions were removed." | |
| 132 } | |
| 133 ] | |
| 134 } | |
| 135 ] | |
| 136 } | |
| 137 ] | |
| 138 } | |
| 139 ] | |
| OLD | NEW |