// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This features file defines extension APIs implemented under src/chrome. // See extensions/common/features/* to understand this file, in particular // feature.h, simple_feature.h, and base_feature_provider.h. // // Note that specifying "web_page", "blessed_web_page", or "all" as a context // type will require manually updating chrome/renderer/resources/dispatcher.cc. // To add a new whitelisted ID, SHA-1 it and force it to uppercase. In Bash: // // $ echo -n "aaaabbbbccccddddeeeeffffgggghhhh" | \ // sha1sum | tr '[:lower:]' '[:upper:]' // 9A0417016F345C934A1A88F55CA17C05014EEEBA - // // Google employees: please update http://go/chrome-api-whitelist to map // hashes back to ids. { "accessibilityFeatures": [{ "dependencies": ["permission:accessibilityFeatures.modify"], "contexts": ["blessed_extension"] }, { "dependencies": ["permission:accessibilityFeatures.read"], "contexts": ["blessed_extension"] }], "accessibilityPrivate": { "dependencies": ["permission:accessibilityPrivate"], "contexts": ["blessed_extension"] }, "activityLogPrivate": { "dependencies": ["permission:activityLogPrivate"], "contexts": ["blessed_extension"] }, "alarms": { "dependencies": ["permission:alarms"], "contexts": ["blessed_extension"] }, "app": { "blacklist": [ "2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice "3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal "12E618C3C6E97495AAECF2AC12DEB082353241C6" // QO component extension ], "channel": "stable", "extension_types": ["hosted_app", "extension", "legacy_packaged_app"], "contexts": [ "blessed_extension", "unblessed_extension", "content_script", "web_page", "blessed_web_page" ], // Any webpage can use the app API. "matches": [""] }, // The API for the *embedder* of appview. Appview has both an embedder and // guest API, which are different. "appViewEmbedderInternal": { "internal": true, "contexts": ["blessed_extension"], "dependencies": ["permission:appview"] }, // TODO(fsamuel,kalman): Rename this appViewGuestInternal. "appViewInternal": { "internal": true, "channel": "dev", "contexts": ["blessed_extension"] }, "app.window": { "channel": "stable", "contexts": ["blessed_extension"], "extension_types": ["platform_app"], "noparent": true }, "app.currentWindowInternal": { "noparent": true, "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, "app.currentWindowInternal.setShape": { "dependencies": ["permission:app.window.shape"], "contexts": ["blessed_extension"] }, "app.getDetails": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"], "matches": [] }, "app.getDetailsForFrame": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"], "matches": [] }, "app.getIsInstalled": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"], "matches": [] }, "app.installState": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"], "matches": [] }, "app.runningState": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"], "matches": [] }, "audio": { "dependencies": ["permission:audio"], "contexts": ["blessed_extension"] }, "automationInternal": { "internal": true, "dependencies": ["manifest:automation"], "contexts": ["blessed_extension"] }, "automation": { "dependencies": ["manifest:automation"], "contexts": ["blessed_extension"] }, "autotestPrivate": { "dependencies": ["permission:autotestPrivate"], "contexts": ["blessed_extension"] }, "bluetooth": { "dependencies": ["manifest:bluetooth"], "contexts": ["blessed_extension"] }, "bluetoothLowEnergy": { "dependencies": ["manifest:bluetooth"], "contexts": ["blessed_extension"] }, "bluetoothPrivate": { "dependencies": ["permission:bluetoothPrivate"], "contexts": ["blessed_extension"] }, "bluetoothSocket": { "dependencies": ["manifest:bluetooth"], "contexts": ["blessed_extension"] }, "bookmarkManagerPrivate": { "dependencies": ["permission:bookmarkManagerPrivate"], "contexts": ["blessed_extension"] }, "bookmarks": { "dependencies": ["permission:bookmarks"], "contexts": ["blessed_extension"] }, "bookmarks.export": { "extension_types": ["extension"], "location": "component" }, "bookmarks.import": { "extension_types": ["extension"], "location": "component" }, "brailleDisplayPrivate": { "dependencies": ["permission:brailleDisplayPrivate"], "contexts": ["blessed_extension"] }, "browser": { "dependencies": ["permission:browser"], "contexts": ["blessed_extension"] }, "browserAction": { "dependencies": ["manifest:browser_action"], "contexts": ["blessed_extension"] }, // This API is whitelisted on stable and should not be enabled for a wider // audience without resolving security issues raised in API proposal and // review (https://codereview.chromium.org/25305002). "browserAction.openPopup": [{ "channel": "dev", "dependencies": ["manifest:browser_action"], "contexts": ["blessed_extension"] }, { "channel": "stable", "dependencies": ["manifest:browser_action"], "whitelist": [ "63ED55E43214C211F82122ED56407FF1A807F2A3", // Dev "FA01E0B81978950F2BC5A50512FD769725F57510", // Beta "B11A93E7E5B541F8010245EBDE2C74647D6C14B9", // Canary "F155646B5D1CA545F7E1E4E20D573DFDD44C2540", // Google Cast Beta "16CA7A47AAE4BE49B1E75A6B960C3875E945B264" // Google Cast Stable ], "contexts": ["blessed_extension"] }], "browsingData": { "dependencies": ["permission:browsingData"], "contexts": ["blessed_extension"] }, "cast.channel": { "dependencies": ["permission:cast"], "contexts": ["blessed_extension"] }, "cast.streaming.rtpStream": { "dependencies": ["permission:cast.streaming"], "contexts": ["blessed_extension"] }, "cast.streaming.session": { "dependencies": ["permission:cast.streaming"], "contexts": ["blessed_extension"] }, "cast.streaming.udpTransport": { "dependencies": ["permission:cast.streaming"], "contexts": ["blessed_extension"] }, "chromeosInfoPrivate": { "dependencies": ["permission:chromeosInfoPrivate"], "contexts": ["blessed_extension"] }, "cloudPrintPrivate": { "dependencies": ["permission:cloudPrintPrivate"], "contexts": ["blessed_extension"] }, "commandLinePrivate": { "dependencies": ["permission:commandLinePrivate"], "contexts": ["blessed_extension"] }, "commands": { "dependencies": ["manifest:commands"], "contexts": ["blessed_extension"] }, "contentSettings": { "dependencies": ["permission:contentSettings"], "contexts": ["blessed_extension"] }, "contextMenus": { "dependencies": ["permission:contextMenus"], "contexts": ["blessed_extension"] }, "contextMenusInternal": { "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, "cookies": { "dependencies": ["permission:cookies"], "contexts": ["blessed_extension"] }, "copresence": { "dependencies": ["permission:copresence"], "contexts": ["blessed_extension"] }, "copresencePrivate": { "dependencies": ["permission:copresencePrivate"], "contexts": ["blessed_extension"] }, "debugger": { "dependencies": ["permission:debugger"], "contexts": ["blessed_extension"] }, "declarativeContent": { "dependencies": ["permission:declarativeContent"], "contexts": ["blessed_extension"] }, "declarativeWebRequest": { "dependencies": ["permission:declarativeWebRequest"], "contexts": ["blessed_extension"] }, "desktopCapture": { "dependencies": ["permission:desktopCapture"], "contexts": ["blessed_extension"] }, "developerPrivate": { "dependencies": ["permission:developerPrivate"], "contexts": ["blessed_extension"] }, "devtools.inspectedWindow": { "dependencies": ["manifest:devtools_page"], "contexts": ["blessed_extension"] }, "devtools.network": { "dependencies": ["manifest:devtools_page"], "contexts": ["blessed_extension"] }, "devtools.panels": { "dependencies": ["manifest:devtools_page"], "contexts": ["blessed_extension"] }, "diagnostics": { "dependencies": ["permission:diagnostics"], "extension_types": ["platform_app"], "contexts": ["blessed_extension"] }, "dial": { "dependencies": ["permission:dial"], "contexts": ["blessed_extension"] }, "downloads": { "dependencies": ["permission:downloads"], "contexts": ["blessed_extension"] }, "downloadsInternal": { "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, "easyUnlockPrivate": { "dependencies": ["permission:easyUnlockPrivate"], "contexts": ["blessed_extension"] }, "echoPrivate": { "dependencies": ["permission:echoPrivate"], "contexts": ["blessed_extension"] }, "enterprise.platformKeys": { "dependencies": ["permission:enterprise.platformKeys"], "contexts": ["blessed_extension"] }, "enterprise.platformKeysInternal": { "dependencies": ["permission:enterprise.platformKeys"], "internal": true, "contexts": ["blessed_extension"] }, "enterprise.platformKeysPrivate": { "dependencies": ["permission:enterprise.platformKeysPrivate"], "contexts": ["blessed_extension"] }, "events": { "internal": true, "channel": "stable", "extension_types": ["platform_app", "extension"], "contexts": "all", "matches": [""] }, "experienceSamplingPrivate": { "dependencies": ["permission:experienceSamplingPrivate"], "contexts": ["blessed_extension"] }, "experimental.devtools.audits": { "dependencies": ["permission:experimental", "manifest:devtools_page"], "contexts": ["blessed_extension"] }, "experimental.devtools.console": { "dependencies": ["permission:experimental", "manifest:devtools_page"], "contexts": ["blessed_extension"] }, "extension": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], "contexts": ["blessed_extension"] }, "extension.getURL": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "extension.getViews": [ { "channel": "stable", "contexts": ["blessed_extension"], "extension_types": ["extension", "legacy_packaged_app"] }, { // TODO(yoz): Eliminate this usage. "channel": "stable", "contexts": ["blessed_extension"], "extension_types": ["platform_app"], "whitelist": [ "A948368FC53BE437A55FEB414106E207925482F5" // File manager ] } ], "extension.inIncognitoContext": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "extension.lastError": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "extension.onRequest": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "extension.sendNativeMessage": { "dependencies": ["permission:nativeMessaging"] }, "extension.sendRequest": { "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "extensionOptionsInternal": [{ "internal": true, "contexts": ["blessed_extension"], "dependencies": ["permission:embeddedExtensionOptions"] }, { "internal": true, "channel": "trunk", "contexts": ["webui"], "matches": ["chrome://extensions-frame/*", "chrome://extensions/*"] }], // This is not a real API, only here for documentation purposes. // See http://crbug.com/275944 for background. "extensionTypes": { "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, // This is not a real API, only here for documentation purposes. // See http://crbug.com/275944 for background. "extensionsManifestTypes": { "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, "feedbackPrivate": { "dependencies": ["permission:feedbackPrivate"], "contexts": ["blessed_extension"] }, "fileBrowserHandler": { "dependencies": ["permission:fileBrowserHandler"], "contexts": ["blessed_extension"] }, "fileBrowserHandlerInternal": { "internal": true, "dependencies": ["permission:fileBrowserHandler"], "contexts": ["blessed_extension"] }, "screenlockPrivate": { "dependencies": ["permission:screenlockPrivate"], "extension_types": ["platform_app"], "contexts": ["blessed_extension", "unblessed_extension"] }, "fileBrowserPrivate": { "dependencies": ["permission:fileBrowserPrivate"], "contexts": ["blessed_extension"] }, "fileBrowserPrivateInternal": { "internal": true, "dependencies": ["permission:fileBrowserPrivate"], "contexts": ["blessed_extension"] }, "fileSystem": { "dependencies": ["permission:fileSystem"], "contexts": ["blessed_extension"] }, "fileSystemProvider": { "dependencies": ["permission:fileSystemProvider"], "contexts": ["blessed_extension"] }, "fileSystemProviderInternal": { "internal": true, "dependencies": ["permission:fileSystemProvider"], "contexts": ["blessed_extension"] }, "firstRunPrivate": { "dependencies": ["permission:firstRunPrivate"], "contexts": ["blessed_extension"] }, "fontSettings": { "dependencies": ["permission:fontSettings"], "contexts": ["blessed_extension"] }, "gcdPrivate": { "dependencies": ["permission:gcdPrivate"], "contexts": ["blessed_extension"] }, "gcm": { "dependencies": ["permission:gcm"], "contexts": ["blessed_extension"] }, "guestViewInternal": [{ "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, { // Component extensions can use the guestViewInternal API from iframes. "location": "component", "internal": true, "dependencies": ["permission:webview"], "contexts": ["unblessed_extension"] }, { "internal": true, "channel": "trunk", "contexts": ["webui"], "matches": ["chrome://extensions-frame/*", "chrome://extensions/*"] }], "hangoutsPrivate": { "channel": "stable", "contexts": ["blessed_extension"], "whitelist": [ // http://crbug.com/309737 "nckgahadagoaajjgafhacjanaoiihapd", "ljclpkphhpbpinifbeabbhlfddcpfdde", "ppleadejekpmccmnpjdimmlfljlkdfej", "eggnbpckecmjlblplehfpjjdhhidfdoj", "jfjjdfefebklmdbmenmlehlopoocnoeh", "knipolnnllmklapflnccelgolnpehhpl" ] }, "history": { "dependencies": ["permission:history"], "contexts": ["blessed_extension"] }, "hotwordPrivate": { "dependencies": ["permission:hotwordPrivate"], "contexts": ["blessed_extension"] }, "i18n": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], "contexts": ["blessed_extension", "unblessed_extension", "content_script"] }, "identity": { "dependencies": ["permission:identity"], "contexts": ["blessed_extension"] }, "identity.getAccounts": { "channel": "dev", "dependencies": ["permission:identity"], "contexts": ["blessed_extension"] }, "identityPrivate": { "dependencies": ["permission:identityPrivate"], "contexts": ["blessed_extension"] }, "idltest": { "dependencies": ["permission:idltest"], "contexts": ["blessed_extension"] }, "idle": { "dependencies": ["permission:idle"], "contexts": ["blessed_extension"] }, "infobars": { "dependencies": ["permission:infobars"], "contexts": ["blessed_extension"] }, "input.ime": { "dependencies": ["permission:input"], "contexts": ["blessed_extension"] }, "inputMethodPrivate": { "dependencies": ["permission:inputMethodPrivate"], "contexts": ["blessed_extension"] }, "location": { "dependencies": ["permission:location"], "contexts": ["blessed_extension"] }, "logPrivate": { "dependencies": ["permission:logPrivate"], "contexts": ["blessed_extension"] }, "webcamPrivate": { "dependencies": ["permission:webcamPrivate"], "contexts": ["blessed_extension"] }, "management": { "dependencies": ["permission:management"], "contexts": ["blessed_extension"] }, "management.getPermissionWarningsByManifest": { "dependencies": [], "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"] }, "management.getSelf": { "dependencies": [], "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"] }, "management.uninstallSelf": { "dependencies": [], "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"] }, // This is not a real API, only here for documentation purposes. // See http://crbug.com/275944 for background. "manifestTypes": { "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, "mediaGalleries": { "dependencies": ["permission:mediaGalleries"], "contexts": ["blessed_extension"] }, "mediaGalleriesPrivate": { "dependencies": ["permission:mediaGalleriesPrivate"], "contexts": ["blessed_extension"] }, "mediaPlayerPrivate": { "dependencies": ["permission:mediaPlayerPrivate"], "contexts": ["blessed_extension"] }, "metricsPrivate": { "dependencies": ["permission:metricsPrivate"], "contexts": ["blessed_extension"] }, "mdns": { "dependencies": ["permission:mdns"], "contexts": ["blessed_extension"] }, "musicManagerPrivate": { "dependencies": ["permission:musicManagerPrivate"], "contexts": ["blessed_extension"] }, "networkingPrivate": { "dependencies": ["permission:networkingPrivate"], "contexts": ["blessed_extension"] }, "notificationProvider": { "dependencies": ["permission:notificationProvider"], "contexts": ["blessed_extension"] }, "notifications": { "dependencies": ["permission:notifications"], "contexts": ["blessed_extension"] }, "omnibox": { "dependencies": ["manifest:omnibox"], "contexts": ["blessed_extension"] }, "pageAction": { "dependencies": ["manifest:page_action"], "contexts": ["blessed_extension"] }, "pageActions": { "dependencies": ["manifest:page_actions"], "contexts": ["blessed_extension"] }, "pageCapture": { "dependencies": ["permission:pageCapture"], "contexts": ["blessed_extension"] }, "permissions": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app", "platform_app"], "contexts": ["blessed_extension"] }, "preferencesPrivate": { "dependencies": ["permission:preferencesPrivate"], "contexts": ["blessed_extension"] }, "principalsPrivate": { "dependencies": ["permission:principalsPrivate"], "contexts": ["blessed_extension"] }, "privacy": { "dependencies": ["permission:privacy"], "contexts": ["blessed_extension"] }, "processes": { "dependencies": ["permission:processes"], "contexts": ["blessed_extension"] }, "proxy": { "dependencies": ["permission:proxy"], "contexts": ["blessed_extension"] }, "pushMessaging": { "dependencies": ["permission:pushMessaging"], "contexts": ["blessed_extension"] }, "imageWriterPrivate": { "dependencies": ["permission:imageWriterPrivate"], "extension_types": ["platform_app"], "contexts": ["blessed_extension"] }, "readingListPrivate": { "dependencies": ["permission:readingListPrivate"], "contexts": ["blessed_extension"] }, "rtcPrivate": { "dependencies": ["permission:rtcPrivate"], "contexts": ["blessed_extension"] }, "scriptBadge": { "dependencies": ["manifest:script_badge"], "contexts": ["blessed_extension"] }, "sessions": { "dependencies": ["permission:sessions"], "contexts": ["blessed_extension"] }, "signedInDevices": { "dependencies": ["permission:signedInDevices"], "contexts": ["blessed_extension"] }, "streamsPrivate": { "dependencies": ["permission:streamsPrivate"], "contexts": ["blessed_extension"] }, "syncFileSystem": { "dependencies": ["permission:syncFileSystem"], "contexts": ["blessed_extension"] }, "syncedNotificationsPrivate": { "contexts": ["blessed_extension"], "dependencies": ["permission:syncedNotificationsPrivate"] }, "systemIndicator": { "dependencies": ["manifest:system_indicator"], "contexts": ["blessed_extension"] }, "system.cpu": { "dependencies": ["permission:system.cpu"], "contexts": ["blessed_extension"] }, "system.display": { "dependencies": ["permission:system.display"], "contexts": ["blessed_extension"] }, "system.memory": { "dependencies": ["permission:system.memory"], "contexts": ["blessed_extension"] }, "system.network": { "dependencies": ["permission:system.network"], "contexts": ["blessed_extension"] }, "system.storage": { "dependencies": ["permission:system.storage"], "contexts": ["blessed_extension"] }, "system.storage.getAvailableCapacity": { "channel": "dev" }, "systemPrivate": { "dependencies": ["permission:systemPrivate"], "contexts": ["blessed_extension"] }, "tabCapture": { "dependencies": ["permission:tabCapture"], "contexts": ["blessed_extension"] }, "tabs": { "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"], "contexts": ["blessed_extension"] }, "tabs.setZoom": { "channel": "dev" }, "tabs.getZoom": { "channel": "dev" }, "tabs.setZoomSettings": { "channel": "dev" }, "tabs.getZoomSettings": { "channel": "dev" }, "terminalPrivate": { "dependencies": ["permission:terminalPrivate"], "contexts": ["blessed_extension"] }, "topSites": { "dependencies": ["permission:topSites"], "contexts": ["blessed_extension"] }, "tts": { "dependencies": ["permission:tts"], "contexts": ["blessed_extension"] }, "ttsEngine": { "dependencies": ["permission:ttsEngine"], "contexts": ["blessed_extension"] }, "virtualKeyboardPrivate": { "dependencies": ["permission:virtualKeyboardPrivate"], "contexts": ["blessed_extension"] }, "wallpaper": { "dependencies": ["permission:wallpaper"], "contexts": ["blessed_extension"] }, "wallpaperPrivate": { "dependencies": ["permission:wallpaperPrivate"], "contexts": ["blessed_extension"] }, "webNavigation": { "dependencies": ["permission:webNavigation"], "contexts": ["blessed_extension"] }, "webRequest": { "dependencies": ["permission:webRequest"], "contexts": ["blessed_extension"] }, "webRequestInternal": [{ "internal": true, "channel": "stable", "contexts": ["blessed_extension"] }, { // webview uses webRequestInternal API. "channel": "stable", "internal": true, "dependencies": ["permission:webview"], "contexts": ["unblessed_extension"] }], "webrtcAudioPrivate": { "dependencies": ["permission:webrtcAudioPrivate"], "contexts": ["blessed_extension"] }, "webrtcLoggingPrivate": { "dependencies": ["permission:webrtcLoggingPrivate"], "contexts": ["blessed_extension"] }, "webstore": { // Hosted apps can use the webstore API from within a blessed context. "channel": "stable", // Set extension_types to 'all' to prevent webstore from being filtered. // Technically, webstore is not in apps or extensions, but it is currently // displayed on /extensions/webstore and /apps/webstore. The "contexts" // restriction effectively restricts this to hosted apps and webpages. "extension_types": "all", "contexts": ["blessed_web_page", "web_page"], // Any webpage can use the webstore API. "matches": [""] }, "webstorePrivate": { "dependencies": ["permission:webstorePrivate"], // NOTE: even though this is only used by the webstore hosted app, which // normally would mean blessed_web_page, component hosted apps are actually // given the blessed_extension denomination. Confusing. "contexts": ["blessed_extension"] }, "webViewExperimentalInternal": [{ "internal": true, "channel": "dev", "contexts": ["blessed_extension"], "dependencies": ["permission:webview"] }, { "internal": true, "channel": "stable", "contexts": ["blessed_extension"], "dependencies": ["permission:webview"], "whitelist": [ "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578", "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB", "1A26E32DE447A17CBE5E9750CDBA78F58539B39C", "59048028102D7B4C681DBC7BC6CD980C3DC66DA3" ] }], "webViewInternal": [{ "internal": true, "dependencies": ["permission:webview"], "contexts": ["blessed_extension"] }, { // Component extensions can use the webViewInternal API from iframes. "location": "component", "internal": true, "dependencies": ["permission:webview"], "contexts": ["unblessed_extension"] }], "webViewRequest": [{ "dependencies": ["permission:webview"], "contexts": ["blessed_extension"] }, { // Component extensions can use the webViewRequest API from iframes. "location": "component", "dependencies": ["permission:webview"], "contexts": ["unblessed_extension"] }], "webviewTag": { "internal": true, "channel": "stable", "dependencies": ["permission:webview"], "contexts": ["blessed_extension"] }, "windows": { "dependencies": ["api:tabs"], "contexts": ["blessed_extension"] } }