Whitelist "reduce data usage" extension for internal preferences API.
[chromium-blink-merge.git] / extensions / common / api / _api_features.json
blob343000dac15adaf174397273d4ded04fbcec93e2
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 // This features file defines extension APIs implemented under src/extensions.
6 // See extensions/common/features/* to understand this file, in particular
7 // feature.h, simple_feature.h, and base_feature_provider.h.
8 //
9 // Note that specifying "web_page", "blessed_web_page", or "all" as a context
10 // type will require manually updating chrome/renderer/resources/dispatcher.cc.
12 // To add a new whitelisted ID, SHA-1 it and force it to uppercase. In Bash:
14 // $ echo -n "aaaabbbbccccddddeeeeffffgggghhhh" | \
15 // sha1sum | tr '[:lower:]' '[:upper:]'
16 // 9A0417016F345C934A1A88F55CA17C05014EEEBA  -
18 // Google employees: please update http://go/chrome-api-whitelist to map
19 // hashes back to ids.
22   "app.runtime": [{
23     "channel": "stable",
24     "contexts": ["blessed_extension"],
25     "extension_types": ["platform_app"],
26     "noparent": true
27   }, {
28     "channel": "stable",
29     "component_extensions_auto_granted": false,
30     "contexts": ["blessed_extension"],
31     "extension_types": ["extension"],
32     "noparent": true,
33     "whitelist": [
34       "2FC374607C2DF285634B67C64A2E356C607091C3",  // Quickoffice
35       "3727DD3E564B6055387425027AD74C58784ACC15",  // Quickoffice internal
36       "12E618C3C6E97495AAECF2AC12DEB082353241C6"   // QO component extension
37     ]
38   }],
39   "app.window": [{
40     "channel": "stable",
41     "contexts": ["blessed_extension"],
42     "extension_types": ["platform_app"],
43     "noparent": true
44   }, {
45     "channel": "stable",
46     "contexts": ["blessed_extension"],
47     "extension_types": ["extension"],
48     "noparent": true,
49     "component_extensions_auto_granted": false,
50     "whitelist": [
51       "06BE211D5F014BAB34BC22D9DDA09C63A81D828E",  // Official xkb extension
52       "F94EE6AB36D6C6588670B2B01EB65212D9C64E33"   // Open source xkb extension
53     ]
54   }],
55   // This does not need to be a complex feature if we could set "noparent" here.
56   // But set "noparent" makes this feature available on stable channel. The
57   // issue is tracked in crbug.com/415750.
58   "app.window.canSetVisibleOnAllWorkspaces": [{
59     "contexts": ["blessed_extension"],
60     "channel": "dev"
61   }],
62   "app.currentWindowInternal": {
63     "noparent": true,
64     "internal": true,
65     "channel": "stable",
66     "contexts": ["blessed_extension"]
67   },
68   "app.currentWindowInternal.setShape": {
69     "dependencies": ["permission:app.window.shape"],
70     "contexts": ["blessed_extension"]
71   },
72   "bluetooth": {
73     "dependencies": ["manifest:bluetooth"],
74     "contexts": ["blessed_extension"]
75   },
76   "bluetoothLowEnergy": {
77     "dependencies": ["manifest:bluetooth"],
78     "contexts": ["blessed_extension"]
79   },
80   "bluetoothPrivate": {
81     "dependencies": ["permission:bluetoothPrivate"],
82     "contexts": ["blessed_extension"]
83   },
84   "bluetoothSocket": {
85     "dependencies": ["manifest:bluetooth"],
86     "contexts": ["blessed_extension"]
87   },
88   "declarativeWebRequest": {
89     "dependencies": ["permission:declarativeWebRequest"],
90     "contexts": ["blessed_extension"]
91   },
92   "dns": {
93     "dependencies": ["permission:dns"],
94     "contexts": ["blessed_extension"]
95   },
96   // This is not a real API, only here for documentation purposes.
97   // See http://crbug.com/275944 for background.
98   "extensionTypes": {
99     "internal": true,
100     "channel": "stable",
101     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
102     "contexts": ["blessed_extension"]
103   },
104   "events": {
105     "internal": true,
106     "channel": "stable",
107     "extension_types": ["platform_app", "extension"],
108     "contexts": "all",
109     "matches": ["<all_urls>"]
110   },
111   "guestViewInternal": [
112     {
113       "internal": true,
114       "channel": "stable",
115       "contexts": ["blessed_extension"]
116     }, {
117       "internal": true,
118       "channel": "trunk",
119       "contexts": ["webui"],
120       "matches": [
121         "chrome://extensions-frame/*",
122         "chrome://extensions/*",
123         "chrome://chrome-signin/*"
124       ]
125     }
126   ],
127   "hid": {
128     "dependencies": ["permission:hid"],
129     "contexts": ["blessed_extension"]
130   },
131   "power": {
132     "dependencies": ["permission:power"],
133     "contexts": ["blessed_extension"]
134   },
135   "runtime": {
136     "channel": "stable",
137     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
138     "contexts": ["blessed_extension"]
139   },
140   "runtime.getManifest": {
141     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
142   },
143   "runtime.connect": {
144     // Everything except WebUI.
145     "contexts": [
146       "blessed_web_page",
147       "content_script",
148       "blessed_extension",
149       "unblessed_extension",
150       "web_page"
151     ],
152     "matches": ["<all_urls>"]
153   },
154   "runtime.getURL": {
155     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
156   },
157   "runtime.id": {
158     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
159   },
160   "runtime.lastError": {
161     "contexts": "all",
162     "extension_types": "all",
163     "matches": ["<all_urls>"]
164   },
165   "runtime.onConnect": {
166     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
167   },
168   "runtime.onMessage": {
169     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
170   },
171   "runtime.sendMessage": {
172     // Everything except WebUI.
173     "contexts": [
174       "blessed_web_page",
175       "content_script",
176       "blessed_extension",
177       "unblessed_extension",
178       "web_page"
179     ],
180     "matches": ["<all_urls>"]
181   },
182   "runtime.setUninstallURL": {
183     "channel": "dev"
184   },
185   "serial": {
186     "dependencies": ["permission:serial"],
187     "contexts": ["blessed_extension"]
188   },
189   "shellPrivate": {
190     "channel": "trunk",
191     "extension_types": ["platform_app"],
192     "contexts": ["blessed_extension"]
193   },
194   "socket": {
195     "dependencies": ["permission:socket"],
196     "contexts": ["blessed_extension"]
197   },
198   "sockets.tcp": {
199     "dependencies": ["manifest:sockets"],
200     "contexts": ["blessed_extension"]
201   },
202   "sockets.tcpServer": {
203     "dependencies": ["manifest:sockets"],
204     "contexts": ["blessed_extension"]
205   },
206   "sockets.udp": {
207     "dependencies": ["manifest:sockets"],
208     "contexts": ["blessed_extension"]
209   },
210   "storage": {
211     "dependencies": ["permission:storage"],
212     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
213   },
214   "system.cpu": {
215     "dependencies": ["permission:system.cpu"],
216     "contexts": ["blessed_extension"]
217   },
218   "system.display": {
219     "dependencies": ["permission:system.display"],
220     "contexts": ["blessed_extension"]
221   },
222   "system.memory": {
223     "dependencies": ["permission:system.memory"],
224     "contexts": ["blessed_extension"]
225   },
226   "system.network": {
227     "dependencies": ["permission:system.network"],
228     "contexts": ["blessed_extension"]
229   },
230   "system.storage": {
231     "dependencies": ["permission:system.storage"],
232     "contexts": ["blessed_extension"]
233   },
234   "system.storage.getAvailableCapacity": {
235     "channel": "dev"
236   },
237   "test": [{
238     "channel": "stable",
239     "extension_types": "all",
240     // Everything except web pages and WebUI. WebUI is declared in a separate
241     // rule to keep the "matches" property isolated.
242     "contexts": [
243       "blessed_extension",
244       "blessed_web_page",
245       "content_script",
246       "unblessed_extension"
247     ]
248   }, {
249     "channel": "stable",
250     "contexts": ["webui"],
251     "matches": [
252       "chrome://extensions/*",
253       "chrome://extensions-frame/*",
254       "chrome://chrome/extensions/*"
255     ]
256   }],
257   "types": {
258     "internal": true,
259     "channel": "stable",
260     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
261     "contexts": ["blessed_extension"]
262   },
263   "types.private": {
264     // preferencesPrivate is the only API that uses types.private.
265     // If any other APIs need it then they'll need to be added in
266     // separate rules.
267     "dependencies": ["permission:preferencesPrivate"],
268     "contexts": ["blessed_extension"]
269   },
270   "usb": {
271     "dependencies": ["permission:usb"],
272     "contexts": ["blessed_extension"]
273   },
274   "webRequest": {
275     "dependencies": ["permission:webRequest"],
276     "contexts": ["blessed_extension"]
277   },
278   "webRequestInternal": [{
279     "internal": true,
280     "channel": "stable",
281     "contexts": ["blessed_extension"]
282   }, {
283     // webview uses webRequestInternal API.
284     "channel": "stable",
285     "internal": true,
286     "contexts": ["webui"],
287     "matches": ["chrome://chrome-signin/*"]
288   }],
289   "webViewExperimentalInternal": [{
290     "internal": true,
291     "channel": "dev",
292     "contexts": ["blessed_extension"],
293     "dependencies": ["permission:webview"]
294   },
295   {
296     "internal": true,
297     "channel": "stable",
298     "contexts": ["blessed_extension"],
299     "dependencies": ["permission:webview"],
300     "whitelist": [
301       "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578",
302       "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB",
303       "1A26E32DE447A17CBE5E9750CDBA78F58539B39C",
304       "59048028102D7B4C681DBC7BC6CD980C3DC66DA3"
305     ]
306   }],
307   "webViewInternal": [{
308     "internal": true,
309     "dependencies": ["permission:webview"],
310     "contexts": ["blessed_extension"]
311   }, {
312     "internal": true,
313     "channel": "dev",
314     "contexts": ["webui"],
315     "matches": ["chrome://chrome-signin/*"]
316   }],
317   "webViewRequest": [{
318     "dependencies": ["permission:webview"],
319     "contexts": ["blessed_extension"]
320   }, {
321     "channel": "stable",
322     "contexts": ["webui"],
323     "matches": ["chrome://chrome-signin/*"]
324   }]