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