mirror of
https://github.com/electron/electron.git
synced 2026-10-28 11:44:46 +08:00
* fix: report tab ids to extension webRequest and declarativeNetRequest ElectronExtensionsBrowserClient did not override GetTabAndWindowIdForWebContents, so the default of -1 reached every caller: chrome.webRequest reported details.tabId as -1 and declarativeNetRequest rules with a tabIds condition never matched. Return the WebContents id, the same id chrome.tabs uses. Co-Authored-By: Claude <noreply@anthropic.com> * fix: keep extension service workers registered when clearing storage Chrome's embedder refuses to delete or web-update the registration of an extension's background service worker and only lets the manifest's worker script register at the extension's root scope. Electron used the content defaults, so session.clearStorageData() deleted the registration and the extension stopped receiving events until it was reloaded. Override MayDeleteServiceWorkerRegistration, ShouldTryToUpdateServiceWorkerRegistration and AllowServiceWorker to match. Co-Authored-By: Claude <noreply@anthropic.com> * fix: crash in chrome.cookies.getAllCookieStores The cookies API now lives in //extensions, so extensions with the "cookies" permission can call it in Electron. Core code dereferences ExtensionsAPIClient::GetCookiesApiDelegate(), which Electron did not provide, crashing the browser process, and the CookiesAPI factory that dispatches cookies.onChanged is only built by embedders. Provide a delegate that lists the session as its own cookie store and build the factory. Co-Authored-By: Claude <noreply@anthropic.com> * fix: restore the management permission feature The "management" entry was dropped from Electron's permission features when the file was resynced with Chrome's in #44653. The management API feature depends on it, so a manifest requesting the permission lost it and chrome.management.getAll, get, onEnabled and onDisabled were unavailable. Co-Authored-By: Claude <noreply@anthropic.com> * fix: localize messages in extension stylesheets Chromium substitutes __MSG_*__ placeholders in extension CSS with a renderer URL loader throttle that only Chrome's throttle provider installs. Electron had no provider, so placeholders such as __MSG_@@extension_id__ were left as literal text. Install the throttle from RendererClientBase. Co-Authored-By: Claude <noreply@anthropic.com> * fix: let WebSocket activity keep extension service workers alive Chrome forwards ShouldNotifyServiceWorkerOnWebSocketActivity to the extensions dispatcher so traffic on a WebSocket resets an extension service worker's idle timer. Electron did not, so a worker holding an open socket was still stopped after 30 seconds. Co-Authored-By: Claude <noreply@anthropic.com> * fix: keep sandboxed extension frames out of the extension process map Chrome isolates only manifest-sandboxed extension pages (and sandboxed about:srcdoc and data: documents) in a separate process and leaves that process out of the extension ProcessMap, so it cannot be granted extension API access. Electron isolated every sandboxed extension frame and recorded each of those processes as a privileged extension process. Override ShouldAllowCrossProcessSandboxedFrameForPrecursor and skip sandboxed principals in SiteInstanceGotProcessAndSite to match. Co-Authored-By: Claude <noreply@anthropic.com> * fix: support navigator.clipboard in extension service workers Chromium exposes navigator.clipboard to extension service workers, but every piece that enables it lives in Chrome's embedder. Register chrome-extension as an extension scheme with Blink, pass --extension-process to extension renderers and turn the runtime feature on there, and answer IsClipboardAllowedForServiceWorker and AllowWorkerWriteToClipboard in the browser. Writes still require the clipboardWrite permission. Co-Authored-By: Claude <noreply@anthropic.com> * fix: run the extension service worker script on disk after a restart A service worker registration outlives the app, and Chromium trusts a stored registration as current while the extension's version is unchanged. Electron loads unpacked extensions on every launch, so an extension whose files changed without a version bump kept running the worker script from the launch that first registered it. Unregister a worker left by a previous launch before adding the extension so it is registered again from the files being loaded. Co-Authored-By: Claude <noreply@anthropic.com> * fix: persist extension alarms and dynamic content scripts ElectronExtensionSystem returned null for the state, rules and dynamic user scripts stores, so chrome.alarms and content scripts registered with persistAcrossSessions were forgotten when the app quit. Create the three StateStores as Chrome's extension system does. Co-Authored-By: Claude <noreply@anthropic.com> * fix: report webRequest proxying to the service worker loader content asks HasWebRequestAPIProxy before starting a service worker AutoPreload request, because a preload that is raced and dropped is reported to webRequest listeners as a failed request. Answer for both Electron's webRequest module and extensions that proxy requests. Co-Authored-By: Claude <noreply@anthropic.com> * fix: use the app name in extension warnings ElectronExtensionsClient::GetProductName still returned "app_shell", the name of the Chromium embedder it was copied from, which extension warning messages interpolate. Co-Authored-By: Claude <noreply@anthropic.com> * chore: remove stale extension feature entries These keys name permissions, manifest keys and API functions that Chromium has removed or that Electron's schemas do not define, so they matched nothing. Co-Authored-By: Claude <noreply@anthropic.com> * docs: update extension support notes The background key is supported for Manifest V3 service workers too, and chrome.management needs the management permission. Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
234 lines
5.9 KiB
JSON
234 lines
5.9 KiB
JSON
// Copyright 2012 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// This features file defines permissions for extension APIs implemented
|
|
// under src/chrome.
|
|
// See chrome/common/extensions/api/_features.md to understand this file, as
|
|
// well as feature.h, simple_feature.h, and feature_provider.h.
|
|
|
|
// If you add a new platform_app permission please update the "stubs_app" test:
|
|
// chrome/test/data/extensions/api_test/stubs_app/manifest.json
|
|
|
|
{
|
|
"accessibilityFeatures.modify": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"accessibilityFeatures.read": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"background": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"platform_app", "extension", "legacy_packaged_app", "hosted_app"
|
|
]
|
|
},
|
|
"bookmarks": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"browsingData": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"clipboardRead": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "hosted_app", "platform_app"
|
|
]
|
|
},
|
|
"clipboardWrite": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "hosted_app", "platform_app"
|
|
]
|
|
},
|
|
"contentSettings": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"contextMenus": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app", "platform_app"]
|
|
},
|
|
"debugger": [
|
|
{
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
{
|
|
"channel": "stable",
|
|
"extension_types": ["platform_app"]
|
|
}
|
|
],
|
|
"declarativeContent": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"desktopCapture": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"downloads": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"downloads.open": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"downloads.shelf": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"downloads.ui": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"experimental": {
|
|
"channel": "stable",
|
|
"command_line_switch": "experimental-extension-apis",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "hosted_app", "platform_app"
|
|
]
|
|
},
|
|
"experimentalAiData": {
|
|
"extension_types": ["extension"],
|
|
"channel": "dev",
|
|
"command_line_switch": "extension-ai-data-collection"
|
|
},
|
|
"favicon": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"fontSettings": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"gcm": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"geolocation": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "hosted_app", "platform_app"
|
|
]
|
|
},
|
|
"history": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"identity": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"identity.email": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "platform_app"]
|
|
},
|
|
"management": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"notifications": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "hosted_app", "platform_app"
|
|
]
|
|
},
|
|
"pageCapture": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"pdfViewerPrivate": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension"
|
|
],
|
|
"allowlist": [
|
|
"CBCC42ABED43A4B58FE3810E62AFFA010EB0349F"
|
|
]
|
|
},
|
|
"plugin": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"privacy": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"readingList": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"],
|
|
"min_manifest_version": 3
|
|
},
|
|
"resourcesPrivate": {
|
|
"channel": "stable",
|
|
"extension_types": [
|
|
"extension", "legacy_packaged_app", "platform_app"
|
|
],
|
|
"location": "component"
|
|
},
|
|
"scripting": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"],
|
|
"min_manifest_version": 3
|
|
},
|
|
"search": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"]
|
|
},
|
|
"sessions": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"sidePanel": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"],
|
|
"min_manifest_version": 3
|
|
},
|
|
"tabGroups": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"],
|
|
"min_manifest_version": 3
|
|
},
|
|
"tabs": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"tabCapture": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"topSites": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"transientBackground": {
|
|
"channel": "dev",
|
|
"extension_types": [
|
|
"extension"
|
|
]
|
|
},
|
|
"tts": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app", "platform_app"]
|
|
},
|
|
"ttsEngine": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
},
|
|
"webAuthenticationProxy": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension"],
|
|
"min_manifest_version": 3,
|
|
"platforms": ["win", "linux", "mac"]
|
|
},
|
|
"webNavigation": {
|
|
"channel": "stable",
|
|
"extension_types": ["extension", "legacy_packaged_app"]
|
|
}
|
|
} |