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.
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.
24 "contexts": ["blessed_extension"],
25 "extension_types": ["platform_app"],
29 "component_extensions_auto_granted": false,
30 "contexts": ["blessed_extension"],
31 "extension_types": ["extension"],
34 "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
35 "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
36 "12E618C3C6E97495AAECF2AC12DEB082353241C6" // QO component extension
41 "contexts": ["blessed_extension"],
42 "extension_types": ["platform_app"],
46 "contexts": ["blessed_extension"],
47 "extension_types": ["extension"],
49 "component_extensions_auto_granted": false,
51 "06BE211D5F014BAB34BC22D9DDA09C63A81D828E", // Official xkb extension
52 "F94EE6AB36D6C6588670B2B01EB65212D9C64E33" // Open source xkb extension
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"],
62 "app.currentWindowInternal": {
66 "contexts": ["blessed_extension"]
68 "app.currentWindowInternal.setShape": {
69 "dependencies": ["permission:app.window.shape"],
70 "contexts": ["blessed_extension"]
72 // The API for the *embedder* of appview. Appview has both an embedder and
73 // guest API, which are different.
74 "appViewEmbedderInternal": {
76 "contexts": ["blessed_extension"],
77 "dependencies": ["permission:appview"]
79 "appViewGuestInternal": {
82 "contexts": ["blessed_extension"]
85 "dependencies": ["manifest:bluetooth"],
86 "contexts": ["blessed_extension"]
88 "bluetoothLowEnergy": {
89 "dependencies": ["manifest:bluetooth"],
90 "contexts": ["blessed_extension"]
93 "dependencies": ["permission:bluetoothPrivate"],
94 "contexts": ["blessed_extension"]
97 "dependencies": ["manifest:bluetooth"],
98 "contexts": ["blessed_extension"]
100 "declarativeWebRequest": {
101 "dependencies": ["permission:declarativeWebRequest"],
102 "contexts": ["blessed_extension"]
104 "copresenceSocket": {
106 "dependencies": ["permission:copresence"],
107 "contexts": ["blessed_extension"]
110 "dependencies": ["permission:dns"],
111 "contexts": ["blessed_extension"]
113 // This is not a real API, only here for documentation purposes.
114 // See http://crbug.com/275944 for background.
118 "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
119 "contexts": ["blessed_extension"]
124 "extension_types": ["platform_app", "extension"],
126 "matches": ["<all_urls>"]
128 "guestViewInternal": [
132 "contexts": ["blessed_extension"]
136 "contexts": ["webui"],
138 "chrome://extensions-frame/*",
139 "chrome://extensions/*",
140 "chrome://chrome-signin/*"
145 "dependencies": ["permission:hid"],
146 "contexts": ["blessed_extension"]
149 "dependencies": ["permission:management"],
150 "contexts": ["blessed_extension"]
152 "management.getPermissionWarningsByManifest": {
155 "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
157 "management.getSelf": {
160 "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
162 "management.uninstallSelf": {
165 "extension_types": ["extension", "legacy_packaged_app", "platform_app"]
168 "dependencies": ["permission:power"],
169 "contexts": ["blessed_extension"]
173 "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
174 "contexts": ["blessed_extension"]
176 "runtime.getManifest": {
177 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
180 // Everything except WebUI.
185 "unblessed_extension",
188 "matches": ["<all_urls>"]
191 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
194 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
196 "runtime.lastError": {
198 "extension_types": "all",
199 "matches": ["<all_urls>"]
201 "runtime.onConnect": {
202 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
204 "runtime.onMessage": {
205 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
207 "runtime.sendMessage": {
208 // Everything except WebUI.
213 "unblessed_extension",
216 "matches": ["<all_urls>"]
219 "dependencies": ["permission:serial"],
220 "contexts": ["blessed_extension"]
223 "dependencies": ["permission:socket"],
224 "contexts": ["blessed_extension"]
227 "dependencies": ["manifest:sockets"],
228 "contexts": ["blessed_extension"]
230 "sockets.tcpServer": {
231 "dependencies": ["manifest:sockets"],
232 "contexts": ["blessed_extension"]
235 "dependencies": ["manifest:sockets"],
236 "contexts": ["blessed_extension"]
239 "dependencies": ["permission:storage"],
240 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
243 "dependencies": ["permission:system.cpu"],
244 "contexts": ["blessed_extension"]
247 "dependencies": ["permission:system.display"],
248 "contexts": ["blessed_extension"]
251 "dependencies": ["permission:system.memory"],
252 "contexts": ["blessed_extension"]
255 "dependencies": ["permission:system.network"],
256 "contexts": ["blessed_extension"]
259 "dependencies": ["permission:system.storage"],
260 "contexts": ["blessed_extension"]
262 "system.storage.getAvailableCapacity": {
267 "extension_types": "all",
268 // Everything except web pages and WebUI. WebUI is declared in a separate
269 // rule to keep the "matches" property isolated.
274 "unblessed_extension"
278 "contexts": ["webui"],
280 "chrome://extensions/*",
281 "chrome://extensions-frame/*",
282 "chrome://chrome/extensions/*"
288 "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
289 "contexts": ["blessed_extension"]
292 // preferencesPrivate is the only API that uses types.private.
293 // If any other APIs need it then they'll need to be added in
295 "dependencies": ["permission:preferencesPrivate"],
296 "contexts": ["blessed_extension"]
299 "dependencies": ["permission:usb"],
300 "contexts": ["blessed_extension"]
303 "dependencies": ["permission:vpnProvider"],
304 "contexts": ["blessed_extension"]
307 "dependencies": ["permission:webRequest"],
308 "contexts": ["blessed_extension"]
310 "webRequestInternal": [{
313 "contexts": ["blessed_extension"]
315 // webview uses webRequestInternal API.
318 "contexts": ["webui"],
319 "matches": ["chrome://chrome-signin/*"]
321 "webViewExperimentalInternal": [{
324 "contexts": ["blessed_extension"],
325 "dependencies": ["permission:webview"]
330 "contexts": ["blessed_extension"],
331 "dependencies": ["permission:webview"],
333 "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578",
334 "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB",
335 "1A26E32DE447A17CBE5E9750CDBA78F58539B39C",
336 "59048028102D7B4C681DBC7BC6CD980C3DC66DA3"
339 "webViewInternal": [{
341 "dependencies": ["permission:webview"],
342 "contexts": ["blessed_extension"]
346 "contexts": ["webui"],
347 "matches": ["chrome://chrome-signin/*"]
350 "dependencies": ["permission:webview"],
351 "contexts": ["blessed_extension"]
354 "contexts": ["webui"],
355 "matches": ["chrome://chrome-signin/*"]