Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / extensions / common / api / _api_features.json
blobbba4b4f714998f2bacfb30dcab74ff8f1fb354b9
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   "alarms": {
23     "dependencies": ["permission:alarms"],
24     "contexts": ["blessed_extension"]
25   },
26   "app.runtime": [{
27     "channel": "stable",
28     "contexts": ["blessed_extension"],
29     "extension_types": ["platform_app"],
30     "noparent": true
31   }, {
32     "channel": "stable",
33     "component_extensions_auto_granted": false,
34     "contexts": ["blessed_extension"],
35     "extension_types": ["extension"],
36     "noparent": true,
37     "whitelist": [
38       "2FC374607C2DF285634B67C64A2E356C607091C3",  // Quickoffice
39       "3727DD3E564B6055387425027AD74C58784ACC15",  // Quickoffice internal
40       "12E618C3C6E97495AAECF2AC12DEB082353241C6"   // QO component extension
41     ]
42   }],
43   "app.window": [{
44     "channel": "stable",
45     "contexts": ["blessed_extension"],
46     "extension_types": ["platform_app"],
47     "noparent": true
48   }, {
49     "channel": "stable",
50     "contexts": ["blessed_extension"],
51     "extension_types": ["extension"],
52     "noparent": true,
53     "component_extensions_auto_granted": false,
54     "whitelist": [
55       "B9EF10DDFEA11EF77873CC5009809E5037FC4C7A",  // Google input tools
56       "06BE211D5F014BAB34BC22D9DDA09C63A81D828E",  // Official xkb extension
57       "F94EE6AB36D6C6588670B2B01EB65212D9C64E33"   // Open source xkb extension
58     ]
59   }],
60   "app.currentWindowInternal": {
61     "noparent": true,
62     "internal": true,
63     "channel": "stable",
64     "contexts": ["blessed_extension"]
65   },
66   "app.currentWindowInternal.setShape": {
67     "dependencies": ["permission:app.window.shape"],
68     "contexts": ["blessed_extension"]
69   },
70   // The API for the *embedder* of appview. Appview has both an embedder and
71   // guest API, which are different.
72   "appViewEmbedderInternal": {
73     "internal": true,
74     "contexts": ["blessed_extension"],
75     "dependencies": ["permission:appview"]
76   },
77   // Note that exposing this doesn't necessarily expose AppView,
78   // appViewEmbedderInternal is required for that.
79   // See http://crbug.com/437891.
80   "appViewGuestInternal": {
81     "internal": true,
82     "channel": "stable",
83     "contexts": ["blessed_extension"]
84   },
85   "audio": {
86     "dependencies": ["permission:audio"],
87     "contexts": ["blessed_extension"]
88   },
89   "bluetooth": {
90     "dependencies": ["manifest:bluetooth"],
91     "contexts": ["blessed_extension"]
92   },
93   "bluetoothLowEnergy": {
94     "dependencies": ["manifest:bluetooth"],
95     "contexts": ["blessed_extension"]
96   },
97   "bluetoothPrivate": {
98     "dependencies": ["permission:bluetoothPrivate"],
99     "contexts": ["blessed_extension"]
100   },
101   "bluetoothSocket": {
102     "dependencies": ["manifest:bluetooth"],
103     "contexts": ["blessed_extension"]
104   },
105   "declarativeWebRequest": {
106     "dependencies": ["permission:declarativeWebRequest"],
107     "contexts": ["blessed_extension"]
108   },
109   "diagnostics": {
110     "dependencies": ["permission:diagnostics"],
111     "extension_types": ["platform_app"],
112     "contexts": ["blessed_extension"]
113   },
114   "dns": {
115     "dependencies": ["permission:dns"],
116     "contexts": ["blessed_extension"]
117   },
118   "documentScan": {
119     "dependencies": ["permission:documentScan"],
120     "contexts": ["blessed_extension"]
121   },
122   // This is not a real API, only here for documentation purposes.
123   // See http://crbug.com/275944 for background.
124   "extensionTypes": {
125     "internal": true,
126     "channel": "stable",
127     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
128     "contexts": ["blessed_extension"]
129   },
130   "extensionViewInternal": [
131     {
132       "internal": true,
133       "contexts": ["blessed_extension"],
134       "dependencies": ["permission:extensionview"]
135     }, {
136       "internal": true,
137       "channel": "stable",
138       "contexts": ["webui"],
139       "matches": ["chrome://media-router/*"]
140     }
141   ],
142   "events": {
143     "internal": true,
144     "channel": "stable",
145     "extension_types": ["platform_app", "extension"],
146     "contexts": "all",
147     "matches": ["<all_urls>"]
148   },
149   "guestViewInternal": [
150     {
151       "internal": true,
152       "channel": "stable",
153       "contexts": ["blessed_extension"]
154     }, {
155       "internal": true,
156       "channel": "trunk",
157       "contexts": ["webui"],
158       "matches": [
159         "chrome://extensions-frame/*",
160         "chrome://extensions/*",
161         "chrome://chrome-signin/*",
162         "chrome://media-router/*",
163         "chrome://oobe/*"
164       ]
165     },
166     // This allows GuestViews to be created on regular web pages for the Worker
167     // Thread Frame prototype: http://crbug.com/434226.
168     {
169       "internal": true,
170       "channel": "trunk",
171       "contexts": "all",
172       "matches": ["<all_urls>"]
173     }
174   ],
175   "hid": {
176     "dependencies": ["permission:hid"],
177     "contexts": ["blessed_extension"]
178   },
179   "hid.getUserSelectedDevices": {
180     "contexts": ["blessed_extension"],
181     "channel": "dev",
182     "dependencies": ["permission:hid"]
183   },
184   "idle": {
185     "dependencies": ["permission:idle"],
186     "contexts": ["blessed_extension"]
187   },
188   "management": [{
189     "dependencies": ["permission:management"],
190     "contexts": ["blessed_extension"],
191     "default_parent": true
192   }, {
193     "channel": "stable",
194     "contexts": ["webui"],
195     "matches": [
196       "chrome://extensions/*",
197       "chrome://extensions-frame/*",
198       "chrome://chrome/extensions/*",
199       "chrome://md-settings/*",
200       "chrome://settings/*",
201       "chrome://settings-frame/*"
202     ]
203   }],
204   "management.getPermissionWarningsByManifest": {
205     "dependencies": [],
206     "channel": "stable",
207     "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
208   },
209   "management.getSelf": {
210     "dependencies": [],
211     "channel": "stable",
212     "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
213   },
214   "management.uninstallSelf": {
215     "dependencies": [],
216     "channel": "stable",
217     "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
218   },
219   "mimeHandlerPrivate": {
220     "dependencies": ["manifest:mime_types_handler"],
221     "contexts": ["blessed_extension"]
222   },
223   "mojoPrivate": {
224     "contexts": ["blessed_extension"],
225     "channel": "stable",
226     "extension_types": ["platform_app", "extension"],
227     "whitelist": [
228       "EF2AB692559EA97C3BBDEA018A8C45F92457BD4E",  // http://crbug.com/448569
229       "C17CD9E6868D7B9C67926E0EC612EA25C768418F",
230       "A45DABDB47A31CC812E5490AB748C7D05E2D32E9",
231       "BFEE2E3B80BE21A645E63E9346DFC383E7CB3BDA",
232       "63ED55E43214C211F82122ED56407FF1A807F2A3"
233     ]
234   },
235   "networking.config": {
236     "dependencies": ["permission:networking.config"],
237     "contexts": ["blessed_extension"]
238   },
239   "networkingPrivate": [{
240     "dependencies": ["permission:networkingPrivate"],
241     "contexts": ["blessed_extension"]
242   }, {
243     "channel": "stable",
244     "contexts": ["webui"],
245     "matches": [
246       "chrome://md-settings/*",
247       "chrome://network/*",
248       "chrome://settings/*",
249       "chrome://settings-frame/*"
250     ]
251   }],
252   "power": {
253     "dependencies": ["permission:power"],
254     "contexts": ["blessed_extension"]
255   },
256   "printerProvider": {
257     "dependencies": ["permission:printerProvider"],
258     "contexts": ["blessed_extension"]
259   },
260   "printerProviderInternal": {
261     "internal": true,
262     "dependencies": ["permission:printerProvider"],
263     "contexts": ["blessed_extension"]
264   },
265   "runtime": {
266     "channel": "stable",
267     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
268     "contexts": ["blessed_extension"]
269   },
270   "runtime.getManifest": {
271     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
272   },
273   "runtime.connect": {
274     // Everything except WebUI.
275     "contexts": [
276       "blessed_web_page",
277       "content_script",
278       "blessed_extension",
279       "unblessed_extension",
280       "web_page"
281     ],
282     "matches": ["<all_urls>"]
283   },
284   "runtime.connectNative": {
285     "dependencies": ["permission:nativeMessaging"],
286     "contexts": ["blessed_extension"]
287   },
288   "runtime.getURL": {
289     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
290   },
291   "runtime.id": {
292     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
293   },
294   "runtime.lastError": {
295     "contexts": "all",
296     "extension_types": "all",
297     "matches": ["<all_urls>"]
298   },
299   "runtime.onConnect": {
300     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
301   },
302   "runtime.onMessage": {
303     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
304   },
305   "runtime.sendMessage": {
306     // Everything except WebUI.
307     "contexts": [
308       "blessed_web_page",
309       "content_script",
310       "blessed_extension",
311       "unblessed_extension",
312       "web_page"
313     ],
314     "matches": ["<all_urls>"]
315   },
316   "runtime.sendNativeMessage": {
317     "dependencies": ["permission:nativeMessaging"],
318     "contexts": ["blessed_extension"]
319   },
320   "serial": {
321     "dependencies": ["permission:serial"],
322     "contexts": ["blessed_extension"]
323   },
324   "socket": {
325     "dependencies": ["permission:socket"],
326     "contexts": ["blessed_extension"]
327   },
328   "sockets.tcp": {
329     "dependencies": ["manifest:sockets"],
330     "contexts": ["blessed_extension"]
331   },
332   "sockets.tcpServer": {
333     "dependencies": ["manifest:sockets"],
334     "contexts": ["blessed_extension"]
335   },
336   "sockets.udp": {
337     "dependencies": ["manifest:sockets"],
338     "contexts": ["blessed_extension"]
339   },
340   "storage": {
341     "dependencies": ["permission:storage"],
342     "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
343   },
344   "system.cpu": {
345     "dependencies": ["permission:system.cpu"],
346     "contexts": ["blessed_extension"]
347   },
348   "system.display": {
349     "dependencies": ["permission:system.display"],
350     "contexts": ["blessed_extension"]
351   },
352   "system.memory": {
353     "dependencies": ["permission:system.memory"],
354     "contexts": ["blessed_extension"]
355   },
356   "system.network": {
357     "dependencies": ["permission:system.network"],
358     "contexts": ["blessed_extension"]
359   },
360   "system.storage": {
361     "dependencies": ["permission:system.storage"],
362     "contexts": ["blessed_extension"]
363   },
364   "system.storage.getAvailableCapacity": {
365     "channel": "dev"
366   },
367   "test": [{
368     "channel": "stable",
369     "extension_types": "all",
370     // Everything except web pages and WebUI. WebUI is declared in a separate
371     // rule to keep the "matches" property isolated.
372     "contexts": [
373       "blessed_extension",
374       "blessed_web_page",
375       "content_script",
376       "unblessed_extension"
377     ]
378   }, {
379     "channel": "stable",
380     "contexts": ["webui"],
381     "matches": [
382       "chrome://extensions/*",
383       "chrome://extensions-frame/*",
384       "chrome://chrome/extensions/*"
385     ]
386   }],
387   "types": {
388     "internal": true,
389     "channel": "stable",
390     "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
391     "contexts": ["blessed_extension"]
392   },
393   "types.private": {
394     // preferencesPrivate is the only API that uses types.private.
395     // If any other APIs need it then they'll need to be added in
396     // separate rules.
397     "dependencies": ["permission:preferencesPrivate"],
398     "contexts": ["blessed_extension"]
399   },
400   "usb": {
401     "dependencies": ["permission:usb"],
402     "contexts": ["blessed_extension"]
403   },
404   "vpnProvider": {
405     "dependencies": ["permission:vpnProvider"],
406     "contexts": ["blessed_extension"]
407   },
408   "webRequest": {
409     "dependencies": ["permission:webRequest"],
410     "contexts": ["blessed_extension"]
411   },
412   "webRequestInternal": [{
413     "internal": true,
414     "channel": "stable",
415     "contexts": ["blessed_extension"]
416   }, {
417     // webview uses webRequestInternal API.
418     "channel": "stable",
419     "internal": true,
420     "contexts": ["webui"],
421     "matches": [
422       "chrome://chrome-signin/*",
423       "chrome://media-router/*",
424       "chrome://oobe/*"
425     ]
426   }],
427   "webViewInternal": [{
428     "internal": true,
429     "dependencies": ["permission:webview"],
430     "contexts": ["blessed_extension"]
431   }, {
432     "internal": true,
433     "channel": "dev",
434     "contexts": ["webui"],
435     "matches": [
436       "chrome://chrome-signin/*",
437       "chrome://media-router/*",
438       "chrome://oobe/*"
439     ]
440   }],
441   "webViewRequest": [{
442     "dependencies": ["permission:webview"],
443     "contexts": ["blessed_extension"]
444   }, {
445     "channel": "stable",
446     "contexts": ["webui"],
447     "matches": [
448       "chrome://chrome-signin/*",
449       "chrome://media-router/*",
450       "chrome://oobe/*"
451     ]
452   }]