1 // Copyright (c) 2012 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/chrome.
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.
22 "accessibilityFeatures": [{
23 "dependencies": ["permission:accessibilityFeatures.modify"],
24 "contexts": ["blessed_extension"]
26 "dependencies": ["permission:accessibilityFeatures.read"],
27 "contexts": ["blessed_extension"]
29 "accessibilityPrivate": {
30 "dependencies": ["permission:accessibilityPrivate"],
31 "contexts": ["blessed_extension"]
33 "activityLogPrivate": {
34 "dependencies": ["permission:activityLogPrivate"],
35 "contexts": ["blessed_extension"]
39 "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
40 "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
41 "12E618C3C6E97495AAECF2AC12DEB082353241C6", // QO component extension
42 "06BE211D5F014BAB34BC22D9DDA09C63A81D828E", // Official xkb extension
43 "F94EE6AB36D6C6588670B2B01EB65212D9C64E33", // Open source xkb extension
44 "B9EF10DDFEA11EF77873CC5009809E5037FC4C7A" // Google input tools
47 "extension_types": ["hosted_app", "extension", "legacy_packaged_app"],
50 "unblessed_extension",
55 // Any webpage can use the app API.
56 "matches": ["<all_urls>"]
59 "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
62 "app.getDetailsForFrame": {
63 "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
66 "app.getIsInstalled": {
67 "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
71 "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
75 "contexts": ["blessed_extension", "unblessed_extension", "content_script"],
80 "dependencies": ["permission:appview"],
81 "contexts": ["blessed_extension"]
84 "dependencies": ["permission:audioModem"],
85 "contexts": ["blessed_extension"]
88 "dependencies": ["permission:autofillPrivate"],
89 "contexts": ["blessed_extension"]
92 "contexts": ["webui"],
94 "chrome://md-settings/*",
95 "chrome://settings/*",
96 "chrome://settings-frame/*"
99 "automationInternal": {
101 "dependencies": ["manifest:automation"],
102 "contexts": ["blessed_extension"]
105 "dependencies": ["manifest:automation"],
106 "contexts": ["blessed_extension"]
109 "dependencies": ["permission:autotestPrivate"],
110 "contexts": ["blessed_extension"]
112 "bookmarkManagerPrivate": {
113 "dependencies": ["permission:bookmarkManagerPrivate"],
114 "contexts": ["blessed_extension"]
117 "dependencies": ["permission:bookmarks"],
118 "contexts": ["blessed_extension"]
120 "bookmarks.export": {
122 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
123 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
124 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
127 "bookmarks.import": {
129 "D5736E4B5CF695CB93A2FB57E4FDC6E5AFAB6FE2", // http://crbug.com/312900
130 "D57DE394F36DC1C3220E7604C575D29C51A6C495", // http://crbug.com/319444
131 "3F65507A3B39259B38C8173C6FFA3D12DF64CCE9" // http://crbug.com/371562
134 "brailleDisplayPrivate": {
135 "dependencies": ["permission:brailleDisplayPrivate"],
136 "contexts": ["blessed_extension"]
139 "dependencies": ["permission:browser"],
140 "contexts": ["blessed_extension"]
143 "dependencies": ["manifest:browser_action"],
144 "contexts": ["blessed_extension"]
146 // This API is whitelisted on stable and should not be enabled for a wider
147 // audience without resolving security issues raised in API proposal and
148 // review (https://codereview.chromium.org/25305002).
149 "browserAction.openPopup": [{
151 "dependencies": ["manifest:browser_action"],
152 "contexts": ["blessed_extension"]
155 "dependencies": ["manifest:browser_action"],
157 "63ED55E43214C211F82122ED56407FF1A807F2A3", // Dev
158 "FA01E0B81978950F2BC5A50512FD769725F57510", // Beta
159 "B11A93E7E5B541F8010245EBDE2C74647D6C14B9", // Canary
160 "F155646B5D1CA545F7E1E4E20D573DFDD44C2540", // Google Cast Beta
161 "16CA7A47AAE4BE49B1E75A6B960C3875E945B264", // Google Cast Stable
162 // The extensions below here only use openPopup on a user action,
163 // so are safe, and can be removed when the whitelist on that
164 // capability is lifted. See crbug.com/436489 for context.
165 "A4577D8C2AF4CF26F40CBCA83FFA4251D6F6C8F8", // http://crbug.com/497301
166 "A8208CCC87F8261AFAEB6B85D5E8D47372DDEA6B" // http://crbug.com/497301
168 "contexts": ["blessed_extension"]
171 "dependencies": ["permission:browsingData"],
172 "contexts": ["blessed_extension"]
175 "dependencies": ["permission:cast"],
176 "contexts": ["blessed_extension"]
178 "cast.streaming.rtpStream": {
179 "dependencies": ["permission:cast.streaming"],
180 "contexts": ["blessed_extension"]
182 "cast.streaming.receiverSession": {
183 "dependencies": ["permission:cast.streaming"],
184 "contexts": ["blessed_extension"]
186 "cast.streaming.session": {
187 "dependencies": ["permission:cast.streaming"],
188 "contexts": ["blessed_extension"]
190 "cast.streaming.udpTransport": {
191 "dependencies": ["permission:cast.streaming"],
192 "contexts": ["blessed_extension"]
194 "chromeosInfoPrivate": {
195 "dependencies": ["permission:chromeosInfoPrivate"],
196 "contexts": ["blessed_extension"]
198 "chromeWebViewInternal": [{
200 "dependencies": ["permission:webview"],
201 "contexts": ["blessed_extension"]
205 "contexts": ["webui"],
206 "matches": ["chrome://chrome-signin/*", "chrome://oobe/*"]
208 "cloudPrintPrivate": {
209 "dependencies": ["permission:cloudPrintPrivate"],
210 "contexts": ["blessed_extension"]
212 "commandLinePrivate": {
213 "dependencies": ["permission:commandLinePrivate"],
214 "contexts": ["blessed_extension"]
217 "dependencies": ["manifest:commands"],
218 "contexts": ["blessed_extension"]
221 "dependencies": ["permission:contentSettings"],
222 "contexts": ["blessed_extension"]
225 "dependencies": ["permission:contextMenus"],
226 "contexts": ["blessed_extension"]
228 "contextMenusInternal": {
231 "contexts": ["blessed_extension"]
234 "dependencies": ["permission:cookies"],
235 "contexts": ["blessed_extension"]
238 "dependencies": ["permission:copresence"],
239 "contexts": ["blessed_extension"]
241 "copresencePrivate": {
242 "dependencies": ["permission:copresencePrivate"],
243 "contexts": ["blessed_extension"]
245 "cryptotokenPrivate": {
246 "dependencies": ["permission:cryptotokenPrivate"],
247 "contexts": ["blessed_extension"]
249 "dataReductionProxy": {
250 "dependencies": ["permission:dataReductionProxy"],
251 "contexts": ["blessed_extension"]
254 "dependencies": ["permission:debugger"],
255 "contexts": ["blessed_extension"]
257 "declarativeContent": {
258 "dependencies": ["permission:declarativeContent"],
259 "contexts": ["blessed_extension"]
262 "dependencies": ["permission:desktopCapture"],
263 "contexts": ["blessed_extension"]
265 "dependencies": ["permission:desktopCapturePrivate"],
267 "63ED55E43214C211F82122ED56407FF1A807F2A3", // Dev
268 "FA01E0B81978950F2BC5A50512FD769725F57510", // Beta
269 "B11A93E7E5B541F8010245EBDE2C74647D6C14B9", // Canary
270 "F155646B5D1CA545F7E1E4E20D573DFDD44C2540", // Google Cast Beta
271 "16CA7A47AAE4BE49B1E75A6B960C3875E945B264", // Google Cast Stable
272 "C17CD9E6868D7B9C67926E0EC612EA25C768418F", // http://crbug.com/457908
273 "EF2AB692559EA97C3BBDEA018A8C45F92457BD4E" // http://crbug.com/457908
275 "contexts": ["blessed_extension"]
277 "developerPrivate": [{
278 "dependencies": ["permission:developerPrivate", "permission:management"],
279 "contexts": ["blessed_extension"]
282 "contexts": ["webui"],
284 "chrome://extensions/*",
285 "chrome://extensions-frame/*",
286 "chrome://chrome/extensions/*"
289 // All devtools APIs are implemented by hand, so don't compile them.
290 "devtools.inspectedWindow": {
292 "dependencies": ["manifest:devtools_page"],
293 "contexts": ["blessed_extension"]
295 "devtools.network": {
297 "dependencies": ["manifest:devtools_page"],
298 "contexts": ["blessed_extension"]
302 "dependencies": ["manifest:devtools_page"],
303 "contexts": ["blessed_extension"]
306 "dependencies": ["permission:dial"],
307 "contexts": ["blessed_extension"]
310 "dependencies": ["permission:downloads"],
311 "contexts": ["blessed_extension"]
313 "downloadsInternal": {
316 "contexts": ["blessed_extension"]
318 "easyUnlockPrivate": {
319 "dependencies": ["permission:easyUnlockPrivate"],
320 "contexts": ["blessed_extension"]
323 "dependencies": ["permission:echoPrivate"],
324 "contexts": ["blessed_extension"]
326 "enterprise.platformKeys": {
327 "dependencies": ["permission:enterprise.platformKeys"],
328 "contexts": ["blessed_extension"]
330 "enterprise.platformKeysInternal": {
331 "dependencies": ["permission:enterprise.platformKeys"],
333 "contexts": ["blessed_extension"]
335 "enterprise.platformKeysPrivate": {
336 "dependencies": ["permission:enterprise.platformKeysPrivate"],
337 "contexts": ["blessed_extension"]
339 "experienceSamplingPrivate": {
340 "dependencies": ["permission:experienceSamplingPrivate"],
341 "contexts": ["blessed_extension"]
343 "experimental.devtools.audits": {
344 "dependencies": ["permission:experimental", "manifest:devtools_page"],
345 "contexts": ["blessed_extension"]
347 "experimental.devtools.console": {
348 "dependencies": ["permission:experimental", "manifest:devtools_page"],
349 "contexts": ["blessed_extension"]
353 "extension_types": ["extension", "legacy_packaged_app"],
354 "contexts": ["blessed_extension"]
356 "extension.getURL": {
357 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
359 "extension.getViews": [
362 "contexts": ["blessed_extension"],
363 "extension_types": ["extension", "legacy_packaged_app"]
366 // TODO(yoz): Eliminate this usage.
368 "contexts": ["blessed_extension"],
369 "extension_types": ["platform_app"],
371 "A948368FC53BE437A55FEB414106E207925482F5" // File manager
375 "extension.inIncognitoContext": {
376 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
378 "extension.lastError": {
379 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
381 "extension.onRequest": {
382 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
384 "extension.sendRequest": {
385 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
387 "extensionOptionsInternal": [{
389 "contexts": ["blessed_extension"],
390 "dependencies": ["permission:embeddedExtensionOptions"]
394 "contexts": ["webui"],
395 "matches": ["chrome://extensions-frame/*", "chrome://extensions/*"]
397 // This is not a real API, only here for documentation purposes.
398 // See http://crbug.com/275944 for background.
399 "extensionsManifestTypes": {
402 "contexts": ["blessed_extension"]
405 "dependencies": ["permission:feedbackPrivate"],
406 "contexts": ["blessed_extension"]
408 "fileBrowserHandler": {
409 "dependencies": ["permission:fileBrowserHandler"],
410 "contexts": ["blessed_extension"]
412 "fileBrowserHandlerInternal": {
414 "dependencies": ["permission:fileBrowserHandler"],
415 "contexts": ["blessed_extension"]
417 "screenlockPrivate": {
418 "dependencies": ["permission:screenlockPrivate"],
419 "extension_types": ["platform_app"],
420 "contexts": ["blessed_extension", "unblessed_extension"]
422 "fileManagerPrivate": {
423 "dependencies": ["permission:fileManagerPrivate"],
424 "contexts": ["blessed_extension"]
426 "fileManagerPrivateInternal": {
428 "dependencies": ["permission:fileManagerPrivate"],
429 "contexts": ["blessed_extension"]
432 "dependencies": ["permission:fileSystem"],
433 "contexts": ["blessed_extension"]
435 "fileSystemProvider": {
436 "dependencies": ["permission:fileSystemProvider"],
437 "contexts": ["blessed_extension"]
439 "fileSystemProviderInternal": {
441 "dependencies": ["permission:fileSystemProvider"],
442 "contexts": ["blessed_extension"]
445 "dependencies": ["permission:firstRunPrivate"],
446 "contexts": ["blessed_extension"]
449 "dependencies": ["permission:fontSettings"],
450 "contexts": ["blessed_extension"]
453 "dependencies": ["permission:gcdPrivate"],
454 "contexts": ["blessed_extension"]
457 "dependencies": ["permission:gcm"],
458 "contexts": ["blessed_extension"]
462 "contexts": ["blessed_extension"],
464 // http://crbug.com/309737
465 "nckgahadagoaajjgafhacjanaoiihapd",
466 "ljclpkphhpbpinifbeabbhlfddcpfdde",
467 "ppleadejekpmccmnpjdimmlfljlkdfej",
468 "eggnbpckecmjlblplehfpjjdhhidfdoj",
469 "jfjjdfefebklmdbmenmlehlopoocnoeh",
470 "knipolnnllmklapflnccelgolnpehhpl"
474 "dependencies": ["permission:history"],
475 "contexts": ["blessed_extension"]
478 "dependencies": ["permission:hotwordPrivate"],
479 "contexts": ["blessed_extension"]
483 "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
484 "contexts": ["blessed_extension", "unblessed_extension", "content_script"]
487 "dependencies": ["permission:identity"],
488 "contexts": ["blessed_extension"]
490 "identity.getAccounts": {
492 "dependencies": ["permission:identity"],
493 "contexts": ["blessed_extension"]
496 "dependencies": ["permission:identityPrivate"],
497 "contexts": ["blessed_extension"]
500 "dependencies": ["permission:idltest"],
501 "contexts": ["blessed_extension"]
503 "inlineInstallPrivate": {
504 "dependencies": ["permission:inlineInstallPrivate"],
505 "contexts": ["blessed_extension"]
508 "dependencies": ["permission:input"],
509 "contexts": ["blessed_extension"]
511 "inputMethodPrivate": {
512 "dependencies": ["permission:inputMethodPrivate"],
513 "contexts": ["blessed_extension"]
517 "dependencies": ["permission:gcm"],
518 "contexts": ["blessed_extension"]
521 "dependencies": ["manifest:launcher_page"],
522 "contexts": ["blessed_extension"]
524 "launcherSearchProvider": {
525 "dependencies": ["permission:launcherSearchProvider"],
526 "contexts": ["blessed_extension"]
529 "dependencies": ["permission:location"],
530 "contexts": ["blessed_extension"]
533 "dependencies": ["permission:logPrivate"],
534 "contexts": ["blessed_extension"]
537 "dependencies": ["permission:webcamPrivate"],
538 "contexts": ["blessed_extension"]
540 // This is not a real API, only here for documentation purposes.
541 // See http://crbug.com/275944 for background.
545 "contexts": ["blessed_extension"]
548 "dependencies": ["permission:mediaGalleries"],
549 "contexts": ["blessed_extension"]
551 "mediaPlayerPrivate": {
552 "dependencies": ["permission:mediaPlayerPrivate"],
553 "contexts": ["blessed_extension"]
556 "dependencies": ["permission:metricsPrivate"],
557 "contexts": ["blessed_extension"]
560 "dependencies": ["permission:mdns"],
561 "contexts": ["blessed_extension"]
563 "mimeHandlerViewGuestInternal": {
567 "matches": ["<all_urls>"]
569 "musicManagerPrivate": {
570 "dependencies": ["permission:musicManagerPrivate"],
571 "contexts": ["blessed_extension"]
573 "notificationProvider": {
574 "dependencies": ["permission:notificationProvider"],
575 "contexts": ["blessed_extension"]
578 "dependencies": ["permission:notifications"],
579 "contexts": ["blessed_extension"]
582 "dependencies": ["manifest:omnibox"],
583 "contexts": ["blessed_extension"]
586 "dependencies": ["manifest:page_action"],
587 "contexts": ["blessed_extension"]
590 "dependencies": ["permission:pageCapture"],
591 "contexts": ["blessed_extension"]
593 "passwordsPrivate": [{
594 "dependencies": ["permission:passwordsPrivate"],
595 "contexts": ["blessed_extension"]
598 "contexts": ["webui"],
600 "chrome://md-settings/*",
601 "chrome://settings/*",
602 "chrome://settings-frame/*"
607 "extension_types": ["extension", "legacy_packaged_app", "platform_app"],
608 "contexts": ["blessed_extension"]
611 "dependencies": ["permission:platformKeys"],
612 "contexts": ["blessed_extension"]
614 "platformKeys.verifyTLSServerCertificate": {
616 "dependencies": ["permission:platformKeys"],
617 "contexts": ["blessed_extension"]
619 "platformKeysInternal": [{
620 "dependencies": ["permission:platformKeys"],
622 "contexts": ["blessed_extension"]
624 "dependencies": ["permission:enterprise.platformKeys"],
626 "contexts": ["blessed_extension"]
628 "preferencesPrivate": {
629 "dependencies": ["permission:preferencesPrivate"],
630 "contexts": ["blessed_extension"]
632 "principalsPrivate": {
633 "dependencies": ["permission:principalsPrivate"],
634 "contexts": ["blessed_extension"]
637 "dependencies": ["permission:privacy"],
638 "contexts": ["blessed_extension"]
641 "dependencies": ["permission:processes"],
642 "contexts": ["blessed_extension"]
645 "dependencies": ["permission:proxy"],
646 "contexts": ["blessed_extension"]
648 "imageWriterPrivate": {
649 "dependencies": ["permission:imageWriterPrivate"],
650 "extension_types": ["platform_app"],
651 "contexts": ["blessed_extension"]
653 "readingListPrivate": {
654 "dependencies": ["permission:readingListPrivate"],
655 "contexts": ["blessed_extension"]
658 "dependencies": ["permission:rtcPrivate"],
659 "contexts": ["blessed_extension"]
661 "searchEnginesPrivate": [{
662 "dependencies": ["permission:searchEnginesPrivate"],
663 "contexts": ["blessed_extension"]
666 "contexts": ["webui"],
668 "chrome://md-settings/*",
669 "chrome://settings/*",
670 "chrome://settings-frame/*"
674 "dependencies": ["permission:sessions"],
675 "contexts": ["blessed_extension"]
677 "settingsPrivate": [{
678 "dependencies": ["permission:settingsPrivate"],
679 "contexts": ["blessed_extension"]
682 "contexts": ["webui"],
684 "chrome://md-settings/*",
685 "chrome://settings/*",
686 "chrome://settings-frame/*"
690 "dependencies": ["permission:signedInDevices"],
691 "contexts": ["blessed_extension"]
694 "dependencies": ["permission:streamsPrivate"],
695 "contexts": ["blessed_extension"]
698 "dependencies": ["permission:syncFileSystem"],
699 "contexts": ["blessed_extension"]
702 "dependencies": ["manifest:system_indicator"],
703 "contexts": ["blessed_extension"]
706 "dependencies": ["permission:systemPrivate"],
707 "contexts": ["blessed_extension"]
710 "dependencies": ["permission:tabCapture"],
711 "contexts": ["blessed_extension"]
715 "extension_types": ["extension", "legacy_packaged_app"],
716 "contexts": ["blessed_extension"]
719 "dependencies": ["permission:terminalPrivate"],
720 "contexts": ["blessed_extension"]
723 "dependencies": ["permission:topSites"],
724 "contexts": ["blessed_extension"]
727 "dependencies": ["permission:tts"],
728 "contexts": ["blessed_extension"]
731 "dependencies": ["permission:ttsEngine"],
732 "contexts": ["blessed_extension"]
735 "dependencies": ["permission:usersPrivate"],
736 "contexts": ["blessed_extension"]
739 "contexts": ["webui"],
741 "chrome://md-settings/*",
742 "chrome://settings/*",
743 "chrome://settings-frame/*"
746 "virtualKeyboardPrivate": {
747 "dependencies": ["permission:virtualKeyboardPrivate"],
748 "contexts": ["blessed_extension"]
751 "dependencies": ["permission:wallpaper"],
752 "contexts": ["blessed_extension"]
754 "wallpaperPrivate": {
755 "dependencies": ["permission:wallpaperPrivate"],
756 "contexts": ["blessed_extension"]
759 "dependencies": ["permission:webNavigation"],
760 "contexts": ["blessed_extension"]
762 "webrtcAudioPrivate": {
763 "dependencies": ["permission:webrtcAudioPrivate"],
764 "contexts": ["blessed_extension"]
766 "webrtcDesktopCapturePrivate": {
767 "dependencies": ["permission:webrtcDesktopCapturePrivate"],
768 "contexts": ["blessed_extension"]
770 "webrtcLoggingPrivate": {
771 "dependencies": ["permission:webrtcLoggingPrivate"],
772 "contexts": ["blessed_extension"]
775 // Hosted apps can use the webstore API from within a blessed context.
777 // Set extension_types to 'all' to prevent webstore from being filtered.
778 // Technically, webstore is not in apps or extensions, but it is currently
779 // displayed on /extensions/webstore and /apps/webstore. The "contexts"
780 // restriction effectively restricts this to hosted apps and webpages.
781 "extension_types": "all",
782 "contexts": ["blessed_web_page", "web_page"],
783 // Any webpage can use the webstore API.
784 "matches": ["<all_urls>"]
787 "dependencies": ["permission:webstorePrivate"],
788 // NOTE: even though this is only used by the webstore hosted app, which
789 // normally would mean blessed_web_page, component hosted apps are actually
790 // given the blessed_extension denomination. Confusing.
791 "contexts": ["blessed_extension"]
793 "webstoreWidgetPrivate": {
794 "dependencies": ["permission:webstoreWidgetPrivate"],
795 "contexts": ["blessed_extension"]
800 "dependencies": ["permission:webview"],
801 "contexts": ["blessed_extension"]
804 "dependencies": ["api:tabs"],
805 "contexts": ["blessed_extension"]