| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
fix: extension code drift (#55155) * 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> | 8 天前 | |
chore: bump chromium to 149.0.7817.0 (main) (#51383) * chore: bump chromium in DEPS to 149.0.7815.0 * chore: update patches (trivial only) Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * 7747370: [Extensions] Move manifest_url_handlers.{h,cc} Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7747370 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: node ./script/gen-libc++-filenames.js * gfx::CALayerParams: Make move-only, add fence mach port | https://chromium-review.googlesource.com/c/chromium/src/+/7790009 * fix: preserve renderer stdio behavior on Windows https://chromium-review.googlesource.com/c/chromium/src/+/7665803 now opens CONOUT$ with rw permissions for proper TTY detection. That makes libuv classify inherited console handles as UV_TTY, so Node now exposes process.stdout.isTTY as true in renderer processes. Electron's renderer treats stdout/stderr as non-TTY and our spec expects process.stdout.isTTY to be undefined. This PR preserves that by masking isTTY on process.stdout and process.stderr in the Windows renderer init path, but keeps the underlying streams rw for #50268. Xref: https://github.com/electron/electron/pull/50268 Co-authored-by: GitHub Copilot <copilot@github.com> * chore: bump chromium in DEPS to 149.0.7817.0 * chore: update patches (trivial only) * Reland "Migrate ProcessMap to use ChildProcessId" | https://chromium-review.googlesource.com/c/chromium/src/+/7793314 * chore: node ./script/gen-libc++-filenames.js * fixup! fix: preserve renderer stdio behavior on Windows * test: use code review suggestions --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: chromium-roller[bot] <chromium-roller[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com> Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: GitHub Copilot <copilot@github.com> | 5 个月前 | |
chore: bump chromium to 147.0.7703.0 (main) (#49935) * chore: bump chromium in DEPS to 147.0.7702.0 * chore: update patches (trivial only) Co-Authored-By: Claude (claude-3-5-sonnet, Anthropic) * chore: bump chromium in DEPS to 147.0.7703.0 * 7582039: [Extensions] Use dependency injection for ManifestHandlerRegistry Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7582039 Co-Authored-By: Claude (claude-3-5-sonnet, Anthropic) * 7582477: spanification: migrate base::ReadUnicodeCharacter usage to string_view Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7582477 Co-Authored-By: Claude (claude-3-5-sonnet, Anthropic) * chore: update patches (trivial only) Co-Authored-By: Claude (claude-3-5-sonnet, Anthropic) * 7590029: Remove 5 unused deprecated sync methods in ui::Clipboard Migrate clipboard API calls from synchronous methods to async callback-based methods with RunLoop pattern. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7590029 * 7599553: [rust png] Chromium: Update `png` to version `0.18.1`. https://chromium-review.googlesource.com/c/chromium/src/+/7599553 Chromium updated their to Rust PNG implementation which produces different (but valid) PNG output. Update tests to compare raw bitmap data instead of encoded PNG data URLs. * test: fixup clipboard tests to properly handle urls Needed after migrating clipboard API calls from synchronous methods to async callback-based methods with RunLoop pattern. Ref: https://chromium-review.googlesource.com/c/chromium/src/+/7590029 * fixup "7599553: [rust png] Chromium: Update `png` to version `0.18.1`." https://chromium-review.googlesource.com/c/chromium/src/+/7599553 Chromium updated their Rust PNG implementation which produces different (but valid) PNG data URLs. --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com> | 7 个月前 | |
fix: extension code drift (#55155) * 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> | 8 天前 | |
chore: remove unused #includes (#42971) * chore: iwyu buildflags.h * chore: iwyu dictionary.h * chore: iwyu arguments.h * chore: iwyu values.h * chore: iwyu compiler_specific.h * chore: iwyu binder_map.h * chore: iwyu <vector> * chore: iwyu <set> * chore: iwyu raw_ptr * chore: iwyu gfx/canvas.h * chore: iwyu gfx/color_utils.h * chore: iwyu base/strings/stringprintf.h * chore: iwyu base/task/thread_pool.h * chore: iwyu base/no_destructor.h * chore: iwyu base/path_service.h * chore: iwyu base/files/file_pathh * chore: iwyu base/strings/sys_string_conversions.h * chore: iwyu base/logging.h * chore: iwyu base/command_line.h * chore: iwyu base/files/file_util.h * chore: iwyu base/files/scoped_file.h * chore: iwyu base/strings/utf_string_conversions.h * chore: iwyu base/environment.h * chore: iwyu base/scoped_observation.h * chore: iwyu base/strings/string_split.h * chore: iwyu base/strings/pattern.h * chore: iwyu base/json/string_escape.h * chore: iwyu base/json/json_reader.h * chore: iwyu base/memory/singleton.h * chore: iwyu base/observer_list.h * chore: iwyu base/timer/timer.h * fixup! chore: iwyu values.h * chore: iwyu shell/browser/browser.h * chore: iwyu base/stl_util.h * chore: iwyu base/strings/string_util.h * chore: iwyu shell/browser/javascript_environment.h * chore: iwyu base/memory/ref_counted.h * chore: iwyu base/environment.h * chore: iwyu content/public/browser/browser_thread.h * chore: remove unused typedef gin_helper::EventEmitter::ValueArray * chore: iwyu gin/wrappable.h * chore: iwyu shell/common/gin_helper/function_template_extensions.h * chore: iwyu shell/common/gin_converters/login_item_settings_converter.h * chore: iwyu shell/common/gin_helper/arguments.h * chore: iwyu ui/gfx/skia_util.h * chore: iwyu ui/gfx/geometry/rect.h * chore: iwyu ui/gfx/image/image.h * chore: iwyu base/strings/strcat.h * chore: iwyu ui/native_theme/native_theme.h * fixup! chore: iwyu shell/browser/javascript_environment.h * fixup! chore: iwyu gfx/canvas.h * fixup! chore: iwyu content/public/browser/browser_thread.h * fixup! chore: iwyu ui/native_theme/native_theme.h * fixup! chore: iwyu ui/native_theme/native_theme.h | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 8 天前 | ||
| 5 个月前 | ||
| 7 个月前 | ||
| 8 天前 | ||
| 2 年前 |