blob: 5e072695ca550f348e5e61b4e14a94602d4f7155 [file] [log] [blame]
// Copyright 2014 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/extensions.
// 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.
{
"alarms": {
"dependencies": ["permission:alarms"],
"contexts": ["blessed_extension"]
},
"app.runtime": [{
"channel": "stable",
"contexts": ["blessed_extension"],
"extension_types": ["platform_app"],
"noparent": true
}, {
"channel": "stable",
"component_extensions_auto_granted": false,
"contexts": ["blessed_extension"],
"extension_types": ["extension"],
"noparent": true,
"whitelist": [
"2FC374607C2DF285634B67C64A2E356C607091C3", // Quickoffice
"3727DD3E564B6055387425027AD74C58784ACC15", // Quickoffice internal
"12E618C3C6E97495AAECF2AC12DEB082353241C6" // QO component extension
]
}],
"app.window": [{
"channel": "stable",
"contexts": ["blessed_extension"],
"extension_types": ["platform_app"],
"noparent": true
}, {
"channel": "stable",
"contexts": ["blessed_extension"],
"extension_types": ["extension"],
"noparent": true,
"component_extensions_auto_granted": false,
"whitelist": [
"B9EF10DDFEA11EF77873CC5009809E5037FC4C7A", // Google input tools
"06BE211D5F014BAB34BC22D9DDA09C63A81D828E", // Official xkb extension
"F94EE6AB36D6C6588670B2B01EB65212D9C64E33" // Open source xkb extension
]
}],
"app.currentWindowInternal": {
"noparent": true,
"internal": true,
"channel": "stable",
"contexts": ["blessed_extension"]
},
"app.currentWindowInternal.setShape": {
"dependencies": ["permission:app.window.shape"],
"contexts": ["blessed_extension"]
},
// 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"]
},
// Note that exposing this doesn't necessarily expose AppView,
// appViewEmbedderInternal is required for that.
// See http://crbug.com/437891.
"appViewGuestInternal": {
"internal": true,
"channel": "stable",
"contexts": ["blessed_extension"]
},
"audio": {
"dependencies": ["permission:audio"],
"contexts": ["blessed_extension"]
},
"bluetooth": [{
"dependencies": ["manifest:bluetooth"],
"contexts": ["blessed_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://bluetooth-pairing/*",
"chrome://md-settings/*",
"chrome://settings/*",
"chrome://settings-frame/*"
]
}],
"bluetoothLowEnergy": {
"dependencies": ["manifest:bluetooth"],
"contexts": ["blessed_extension"]
},
"bluetoothPrivate": [{
"dependencies": ["permission:bluetoothPrivate"],
"contexts": ["blessed_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://bluetooth-pairing/*",
"chrome://md-settings/*",
"chrome://settings/*",
"chrome://settings-frame/*"
]
}],
"bluetoothSocket": {
"dependencies": ["manifest:bluetooth"],
"contexts": ["blessed_extension"]
},
"declarativeWebRequest": {
"dependencies": ["permission:declarativeWebRequest"],
"contexts": ["blessed_extension"]
},
"diagnostics": {
"dependencies": ["permission:diagnostics"],
"extension_types": ["platform_app"],
"contexts": ["blessed_extension"]
},
"displaySource": {
"dependencies": ["permission:displaySource"],
"contexts": ["blessed_extension"]
},
"dns": {
"dependencies": ["permission:dns"],
"contexts": ["blessed_extension"]
},
"documentScan": {
"dependencies": ["permission:documentScan"],
"contexts": ["blessed_extension"]
},
// This is not a real API, only here for documentation purposes.
// See http://crbug.com/275944 for background.
"extensionTypes": {
"internal": true,
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
"contexts": ["blessed_extension"]
},
"extensionViewInternal": [
{
"internal": true,
"contexts": ["blessed_extension"],
"dependencies": ["permission:extensionview"]
}, {
"internal": true,
"channel": "stable",
"contexts": ["webui"],
"matches": ["chrome://media-router/*"]
}
],
"events": {
"internal": true,
"channel": "stable",
"extension_types": ["platform_app", "extension"],
"contexts": "all",
"matches": ["<all_urls>"]
},
"guestViewInternal": [
{
"internal": true,
"channel": "stable",
"contexts": ["blessed_extension"]
}, {
"internal": true,
"channel": "trunk",
"contexts": ["webui"],
"matches": [
"chrome://extensions-frame/*",
"chrome://extensions/*",
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://oobe/*"
]
},
// This allows GuestViews to be created on regular web pages for the Worker
// Thread Frame prototype: http://crbug.com/434226.
{
"internal": true,
"channel": "trunk",
"contexts": "all",
"matches": ["<all_urls>"]
}
],
"hid": {
"dependencies": ["permission:hid"],
"contexts": ["blessed_extension"]
},
"hid.getUserSelectedDevices": {
"contexts": ["blessed_extension"],
"channel": "dev",
"dependencies": ["permission:hid"]
},
"idle": {
"dependencies": ["permission:idle"],
"contexts": ["blessed_extension"]
},
"management": [{
"dependencies": ["permission:management"],
"contexts": ["blessed_extension"],
"default_parent": true
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://extensions/*",
"chrome://extensions-frame/*",
"chrome://chrome/extensions/*",
"chrome://md-settings/*",
"chrome://settings/*",
"chrome://settings-frame/*"
]
}],
"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"]
},
"mimeHandlerPrivate": {
"dependencies": ["manifest:mime_types_handler"],
"contexts": ["blessed_extension"]
},
"mojoPrivate": {
"contexts": ["blessed_extension"],
"channel": "stable",
"extension_types": ["platform_app", "extension"],
"whitelist": [
"226CF815E39A363090A1E547D53063472B8279FA", // http://crbug.com/574889
"C17CD9E6868D7B9C67926E0EC612EA25C768418F", // http://crbug.com/448569
"A45DABDB47A31CC812E5490AB748C7D05E2D32E9",
"BFEE2E3B80BE21A645E63E9346DFC383E7CB3BDA",
"63ED55E43214C211F82122ED56407FF1A807F2A3"
]
},
"networking.config": {
"dependencies": ["permission:networking.config"],
"contexts": ["blessed_extension"]
},
"networkingPrivate": [{
"dependencies": ["permission:networkingPrivate"],
"contexts": ["blessed_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://md-settings/*",
"chrome://network/*",
"chrome://settings/*",
"chrome://settings-frame/*"
]
}],
"power": {
"dependencies": ["permission:power"],
"contexts": ["blessed_extension"]
},
"printerProvider": {
"dependencies": ["permission:printerProvider"],
"contexts": ["blessed_extension"]
},
"printerProviderInternal": {
"internal": true,
"dependencies": ["permission:printerProvider"],
"contexts": ["blessed_extension"]
},
"runtime": {
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
"contexts": ["blessed_extension"]
},
"runtime.getManifest": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"runtime.connect": {
// Everything except WebUI.
"contexts": [
"blessed_web_page",
"content_script",
"blessed_extension",
"unblessed_extension",
"web_page"
],
"matches": ["<all_urls>"]
},
"runtime.connectNative": {
"dependencies": ["permission:nativeMessaging"],
"contexts": ["blessed_extension"]
},
"runtime.getURL": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"runtime.id": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"runtime.lastError": {
"contexts": "all",
"extension_types": "all",
"matches": ["<all_urls>"]
},
"runtime.onConnect": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"runtime.onMessage": {
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"runtime.sendMessage": {
// Everything except WebUI.
"contexts": [
"blessed_web_page",
"content_script",
"blessed_extension",
"unblessed_extension",
"web_page"
],
"matches": ["<all_urls>"]
},
"runtime.sendNativeMessage": {
"dependencies": ["permission:nativeMessaging"],
"contexts": ["blessed_extension"]
},
"serial": {
"dependencies": ["permission:serial"],
"contexts": ["blessed_extension"]
},
"socket": {
"dependencies": ["permission:socket"],
"contexts": ["blessed_extension"]
},
"sockets.tcp": {
"dependencies": ["manifest:sockets"],
"contexts": ["blessed_extension"]
},
"sockets.tcpServer": {
"dependencies": ["manifest:sockets"],
"contexts": ["blessed_extension"]
},
"sockets.udp": {
"dependencies": ["manifest:sockets"],
"contexts": ["blessed_extension"]
},
"storage": {
"dependencies": ["permission:storage"],
"contexts": ["blessed_extension", "unblessed_extension", "content_script"]
},
"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"
},
"test": [{
"channel": "stable",
"extension_types": "all",
// Everything except web pages and WebUI. WebUI is declared in a separate
// rule to keep the "matches" property isolated.
"contexts": [
"blessed_extension",
"blessed_web_page",
"content_script",
"unblessed_extension"
]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://extensions/*",
"chrome://extensions-frame/*",
"chrome://chrome/extensions/*"
]
}],
"types": {
"internal": true,
"channel": "stable",
"extension_types": ["extension", "legacy_packaged_app", "platform_app"],
"contexts": ["blessed_extension"]
},
"types.private": {
// preferencesPrivate is the only API that uses types.private.
// If any other APIs need it then they'll need to be added in
// separate rules.
"dependencies": ["permission:preferencesPrivate"],
"contexts": ["blessed_extension"]
},
"usb": {
"dependencies": ["permission:usb"],
"contexts": ["blessed_extension"]
},
"vpnProvider": {
"dependencies": ["permission:vpnProvider"],
"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,
"contexts": ["webui"],
"matches": [
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://oobe/*"
]
}],
"webViewInternal": [{
"internal": true,
"dependencies": ["permission:webview"],
"contexts": ["blessed_extension"]
}, {
"internal": true,
"channel": "dev",
"contexts": ["webui"],
"matches": [
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://oobe/*"
]
}],
"webViewExperimentalInternal": [{
"internal": true,
"channel": "dev",
"dependencies": ["permission:webview"],
"contexts": ["blessed_extension"]
}],
"webViewRequest": [{
"dependencies": ["permission:webview"],
"contexts": ["blessed_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": [
"chrome://chrome-signin/*",
"chrome://media-router/*",
"chrome://oobe/*"
]
}]
}