blob: 52ac29c7e7e4b5f4437f7d447bcf2d8a5f8e9b9d [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.
{
"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": [
"06BE211D5F014BAB34BC22D9DDA09C63A81D828E", // Official xkb extension
"F94EE6AB36D6C6588670B2B01EB65212D9C64E33" // Open source xkb extension
]
}],
// This does not need to be a complex feature if we could set "noparent" here.
// But set "noparent" makes this feature available on stable channel. The
// issue is tracked in crbug.com/415750.
"app.window.canSetVisibleOnAllWorkspaces": [{
"contexts": ["blessed_extension"],
"channel": "dev"
}],
"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"]
},
"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"]
},
"declarativeWebRequest": {
"dependencies": ["permission:declarativeWebRequest"],
"contexts": ["blessed_extension"]
},
"copresenceSocket": {
"channel" : "dev",
"dependencies": ["permission:copresence"],
"contexts": ["blessed_extension"]
},
"dns": {
"dependencies": ["permission:dns"],
"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"]
},
"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/*"
]
}
],
"hid": {
"dependencies": ["permission:hid"],
"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"]
},
"power": {
"dependencies": ["permission:power"],
"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.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.setUninstallURL": {
"channel": "dev"
},
"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/*"]
}],
"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"]
}, {
"internal": true,
"channel": "dev",
"contexts": ["webui"],
"matches": ["chrome://chrome-signin/*"]
}],
"webViewRequest": [{
"dependencies": ["permission:webview"],
"contexts": ["blessed_extension"]
}, {
"channel": "stable",
"contexts": ["webui"],
"matches": ["chrome://chrome-signin/*"]
}]
}