Compare commits

..

18 Commits

Author SHA1 Message Date
John Kleinschmidt
8e077a09f3 ci: only run auto close on PRs targeting main branch (#50357) 2026-03-19 00:19:25 +00:00
John Kleinschmidt
95f0d8156b ci: test linux 64k (#49961) 2026-03-18 19:14:49 -04:00
Noah Gregory
b881f86c8f fix: always call the original impl in swizzled mousedown impls (#50096)
fix: always call the original implementation in swizzled mousedown implementations
2026-03-18 17:54:43 -04:00
John Kleinschmidt
5959ecc3ee ci: auto close PRs that do not fill out the required template (#50348) 2026-03-18 17:52:03 -04:00
John Kleinschmidt
a6a44692dc chore: Respect HTTP(S) proxy env variable for Yarn (#50322)
Respect HTTP(S) proxy env variable for Yarn

Co-authored-by: Filip Mösner <filip.mosner@seznam.cz>
2026-03-18 17:13:05 -04:00
John Beutner
12ea28c23e fix: ensure WebContents::WasShown runs when window is shown (#49421)
Avoids a freeze when failing to enter fullscreen on macOS.
2026-03-18 12:34:11 -04:00
Kyle Cutler
ade684dc35 fix: correctly track BaseWindow::IsActive() on MacOS (#49460)
fix: correctly set IsActive() in BaseWindow on MacOS
2026-03-18 11:47:19 -04:00
electron-roller[bot]
4ec6923898 chore: bump chromium to 148.0.7738.0 (main) (#50323)
* chore: bump chromium in DEPS to 148.0.7738.0

* chore: fixup patch indices

* 7664509: Migrate ServiceWorkerInfo to ChildProcessId

https://chromium-review.googlesource.com/c/chromium/src/+/7664509

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-03-18 11:45:24 -04:00
Ryan Zimmerman
e86cd9da96 docs: fix markdown formatting in fuses.md (#50318)
* docs: fix markdown formatting in fuses.md

* Use bulleted list (was being run together on one line)
* Wrap ASCII diagram in code block

* docs: apply suggestions from code review

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>

* docs: fix misapplied suggestion

---------

Co-authored-by: John Kleinschmidt <kleinschmidtorama@gmail.com>
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2026-03-18 10:47:52 -04:00
reito
d6db1a27af feat: add nv12 osr format support. (#49799)
* feat: add nv12 osr output format.

* feat: add nv12 osr output format.
2026-03-17 17:14:01 -04:00
Shelley Vohr
76331f0564 refactor: replace CHILD_PLUGIN with CHILD_EMBEDDER_FIRST on macOS (#50278)
refactor: replace CHILD_PLUGIN with CHILD_EMBEDDER_FIRST on macOS

Chromium removed upstream support for child plugin processes without
library validation in https://crbug.com/461717105, which we patched
back via feat_restore_macos_child_plugin_process.patch.

Chromium's CHILD_EMBEDDER_FIRST mechanism already provides the right
extensibility point for this: values > CHILD_EMBEDDER_FIRST are reserved
for embedders and resolved via ContentBrowserClient::GetChildProcessSuffix().
Chrome itself uses this pattern for its Alerts helper process.

This commit replaces the Chromium patch with an Electron-native
implementation.
2026-03-17 14:41:15 -04:00
electron-roller[bot]
7cb6a737a9 chore: bump chromium to 148.0.7737.0 (main) (#50277)
* chore: bump chromium in DEPS to 148.0.7734.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 148.0.7736.0

* chore: fixup patch indices

* chore: bump chromium in DEPS to 148.0.7737.0

* chore: fixup patch indices

* 7666125: Migrate ServiceWorkerContext to ChildProcessId

https://chromium-review.googlesource.com/c/chromium/src/+/7666125

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2026-03-17 13:30:32 -04:00
dependabot[bot]
3659b97563 build(deps): bump dorny/paths-filter from 3.0.2 to 4.0.1 (#50306)
Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 3.0.2 to 4.0.1.
- [Release notes](https://github.com/dorny/paths-filter/releases)
- [Changelog](https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md)
- [Commits](de90cc6fb3...fbd0ab8f3e)

---
updated-dependencies:
- dependency-name: dorny/paths-filter
  dependency-version: 4.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 12:30:14 -04:00
John Kleinschmidt
7d72eb809e ci: update test timeout to 60 minutes (#50305) 2026-03-17 10:06:42 -04:00
dependabot[bot]
8ba0ae7fa8 build(deps): bump actions/download-artifact from 8.0.0 to 8.0.1 (#50309)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](70fc10c6e5...3e5f45b2cf)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-17 14:42:11 +01:00
David Sanders
36350d78d0 chore: add missing timers-shim.ts to filenames.auto.gni (#50311) 2026-03-17 09:46:15 +01:00
dependabot[bot]
9b80324d7f build(deps): bump github/codeql-action from 4.32.6 to 4.33.0 (#50308)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.32.6 to 4.33.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](0d579ffd05...b1bff81932)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 4.33.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 22:15:03 -07:00
dependabot[bot]
a549c56faa build(deps): bump slackapi/slack-github-action from 2.1.1 to 3.0.1 (#50307)
Bumps [slackapi/slack-github-action](https://github.com/slackapi/slack-github-action) from 2.1.1 to 3.0.1.
- [Release notes](https://github.com/slackapi/slack-github-action/releases)
- [Commits](91efab103c...af78098f53)

---
updated-dependencies:
- dependency-name: slackapi/slack-github-action
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 22:14:43 -07:00
78 changed files with 516 additions and 809 deletions

View File

@@ -5,6 +5,8 @@ Thank you for your Pull Request. Please provide a description above and review
the requirements below.
Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.md
NOTE: PRS submitted without this template will be automatically closed.
-->
#### Checklist

View File

@@ -26,7 +26,7 @@ jobs:
# Use dorny/paths-filter instead of the path filter under the on: pull_request: block
# so that the output can be used to conditionally run the apply-patches job, which lets
# the job be marked as a required status check (conditional skip counts as a success).
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |

View File

@@ -155,7 +155,7 @@ jobs:
await core.summary.write();
- name: Send Slack message if errors
if: ${{ always() && steps.audit-errors.outputs.errorsFound && github.ref == 'refs/heads/main' }}
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
payload: |
link: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"

View File

@@ -61,7 +61,7 @@ jobs:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
ref: ${{ github.event.pull_request.head.sha }}
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
@@ -365,6 +365,18 @@ jobs:
generate-symbols: false
upload-to-storage: '0'
secrets: inherit
test-linux-arm64-64k:
uses: ./.github/workflows/pipeline-segment-electron-test-64k.yml
permissions:
contents: read
issues: read
pull-requests: read
needs: [checkout-linux, linux-arm64]
with:
test-runs-on: ubuntu-22.04-arm
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
secrets: inherit
windows-x64:
permissions:

View File

@@ -126,7 +126,7 @@ jobs:
cd src/electron
git pack-refs
- name: Download Out Gen Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: out_gen_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src/out/${{ env.ELECTRON_OUT_DIR }}/gen

View File

@@ -0,0 +1,67 @@
name: Pipeline Segment - Electron Test on Linux ARM64 64k
on:
workflow_call:
inputs:
test-runs-on:
type: string
description: 'What host to run the tests on'
required: true
test-container:
type: string
description: 'JSON container information for aks runs-on'
required: false
default: '{"image":null}'
concurrency:
group: electron-test-linux-64k-${{ github.ref_protected == true && github.run_id || github.ref }}
cancel-in-progress: ${{ github.ref_protected != true }}
permissions: {}
env:
ELECTRON_OUT_DIR: Default
jobs:
test-linux-arm64-64k:
env:
BUILD_TYPE: linux
TARGET_ARCH: arm64
defaults:
run:
shell: bash
runs-on: ${{ inputs.test-runs-on }}
permissions:
contents: read
issues: read
pull-requests: read
steps:
- name: Checkout Electron
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
path: src/electron
fetch-depth: 0
ref: ${{ github.event.pull_request.head.sha }}
- name: Download Generated Artifacts
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131
with:
name: generated_artifacts_linux_arm64
path: ./generated_artifacts_linux_arm64
- name: Restore Generated Artifacts
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist
run: |
cd src/out/Default
unzip -:o dist.zip
- name: Run Electron Tests in QEMU 64k Container
shell: bash
env:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
DISPLAY: ':99.0'
run: |
container=$(echo '${{ inputs.test-container }}' | jq -r '.image')
src/electron/script/run-qemu-64k.sh --container $container --testfiles "`pwd`/src"

View File

@@ -173,12 +173,12 @@ jobs:
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
echo "IS_ASAN=true" >> $GITHUB_ENV
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_${{ env.ARTIFACT_KEY }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
@@ -214,7 +214,7 @@ jobs:
- name: Run Electron Tests
shell: bash
timeout-minutes: 40
timeout-minutes: 60
env:
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap

View File

@@ -65,12 +65,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
@@ -121,12 +121,12 @@ jobs:
- name: Install Dependencies
uses: ./src/electron/.github/actions/install-dependencies
- name: Download Generated Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
- name: Download Src Artifacts
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c
with:
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}

55
.github/workflows/pr-template-check.yml vendored Normal file
View File

@@ -0,0 +1,55 @@
name: PR Template Check
on:
pull_request_target:
types: [opened, edited]
branches:
- main
permissions: {}
jobs:
check-pr-template:
name: Check PR Template
runs-on: ubuntu-slim
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
sparse-checkout: .github/PULL_REQUEST_TEMPLATE.md
sparse-checkout-cone-mode: false
- name: Check for required sections
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const fs = require('fs');
const template = fs.readFileSync('.github/PULL_REQUEST_TEMPLATE.md', 'utf8');
const requiredSections = [...template.matchAll(/^(#{1,4} .+)$/gm)].map(
(m) => m[1],
);
if (requiredSections.length === 0) {
console.log('No heading sections found in PR template');
return;
}
const body = context.payload.pull_request.body || '';
const missingSections = requiredSections.filter(
(section) => !body.includes(section),
);
if (missingSections.length > 0) {
const list = missingSections.map((s) => `- \`${s}\``).join('\n');
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: `This PR was automatically closed because the PR template was not properly filled out. The following required sections are missing:\n\n${list}\n\nPlease update your PR description to include all required sections and reopen the PR.`,
});
await github.rest.pulls.update({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
state: 'closed',
});
}

View File

@@ -14,7 +14,7 @@ jobs:
permissions: {}
steps:
- name: Trigger Slack workflow
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
uses: slackapi/slack-github-action@af78098f536edbc4de71162a307590698245be95 # v3.0.1
with:
webhook: ${{ secrets.BACKPORT_REQUESTED_SLACK_WEBHOOK_URL }}
webhook-type: webhook-trigger

View File

@@ -51,6 +51,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v3.29.5
uses: github/codeql-action/upload-sarif@b1bff81932f5cdfc8695c7752dcee935dcd061c8 # v3.29.5
with:
sarif_file: results.sarif

View File

@@ -9,4 +9,8 @@ npmMinimalAgeGate: 10080
npmPreapprovedPackages:
- "@electron/*"
httpProxy: "${HTTP_PROXY:-}"
httpsProxy: "${HTTPS_PROXY:-}"
yarnPath: .yarn/releases/yarn-4.12.0.cjs

View File

@@ -1017,7 +1017,17 @@ if (is_mac) {
}
}
foreach(helper_params, content_mac_helpers) {
# Electron defines its own plugin helper (using CHILD_EMBEDDER_FIRST + 1) to
# allow loading of unsigned or third-party-signed libraries.
_electron_plugin_helper_params = [
"plugin",
".plugin",
" (Plugin)",
]
electron_mac_helpers =
content_mac_helpers + [ _electron_plugin_helper_params ]
foreach(helper_params, electron_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
@@ -1070,7 +1080,7 @@ if (is_mac) {
":stripped_squirrel_framework",
]
foreach(helper_params, content_mac_helpers) {
foreach(helper_params, electron_mac_helpers) {
sources +=
[ "$root_out_dir/${electron_helper_name}${helper_params[2]}.app" ]
public_deps += [ ":electron_helper_app_${helper_params[0]}" ]
@@ -1174,7 +1184,7 @@ if (is_mac) {
deps = [ ":electron_framework" ]
}
foreach(helper_params, content_mac_helpers) {
foreach(helper_params, electron_mac_helpers) {
_helper_target = helper_params[0]
_helper_bundle_id = helper_params[1]
_helper_suffix = helper_params[2]
@@ -1226,7 +1236,7 @@ if (is_mac) {
deps += [ ":crashpad_handler_syms" ]
}
foreach(helper_params, content_mac_helpers) {
foreach(helper_params, electron_mac_helpers) {
_helper_target = helper_params[0]
deps += [ ":electron_helper_syms_${_helper_target}" ]
}

2
DEPS
View File

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = {
'chromium_version':
'148.0.7733.0',
'148.0.7738.0',
'node_version':
'v24.14.0',
'nan_version':

View File

@@ -76,87 +76,11 @@ app.whenReady().then(() => {
})
```
#### `Notification.getHistory()` _macOS_
Returns `Promise<Notification[]>` - Resolves with an array of `Notification` objects representing all delivered notifications still present in Notification Center.
Each returned `Notification` is a live object connected to the corresponding delivered notification. Interaction events (`click`, `reply`, `action`, `close`) will fire on these objects when the user interacts with the notification in Notification Center. This is useful after an app restart to re-attach event handlers to notifications from a previous session.
The returned notifications have their `id`, `groupId`, `title`, `subtitle`, and `body` properties populated from what macOS provides. Other properties (e.g., `actions`, `silent`, `icon`) are not available from delivered notifications and will have default values.
> [!NOTE]
> Like all macOS notification APIs, this method requires the application to be
> code-signed. In unsigned development builds, notifications are not delivered
> to Notification Center and this method will resolve with an empty array.
> [!NOTE]
> Unlike notifications created with `new Notification()`, notifications returned
> by `getHistory()` will remain visible in Notification Center when the object
> is garbage collected.
```js
const { Notification, app } = require('electron')
app.whenReady().then(async () => {
// Restore notifications from a previous session
const notifications = await Notification.getHistory()
for (const n of notifications) {
console.log(`Found delivered notification: ${n.id} - ${n.title}`)
n.on('click', () => {
console.log(`User clicked: ${n.id}`)
})
n.on('reply', (event) => {
console.log(`User replied to ${n.id}: ${event.reply}`)
})
}
// Keep references so events continue to fire
})
```
#### `Notification.remove(id)` _macOS_
* `id` (string | string[]) - The notification identifier(s) to remove. These correspond to the `id` values set in the [`Notification` constructor](#new-notificationoptions).
Removes one or more delivered notifications from Notification Center by their identifier(s).
```js
const { Notification } = require('electron')
// Remove a single notification
Notification.remove('my-notification-id')
// Remove multiple notifications
Notification.remove(['msg-1', 'msg-2', 'msg-3'])
```
#### `Notification.removeAll()` _macOS_
Removes all of the app's delivered notifications from Notification Center.
```js
const { Notification } = require('electron')
Notification.removeAll()
```
#### `Notification.removeGroup(groupId)` _macOS_
* `groupId` string - The group identifier of the notifications to remove. This corresponds to the `groupId` value set in the [`Notification` constructor](#new-notificationoptions).
Removes all delivered notifications with the given `groupId` from Notification Center.
```js
const { Notification } = require('electron')
// Remove all notifications in the 'chat-thread-1' group
Notification.removeGroup('chat-thread-1')
```
### `new Notification([options])`
* `options` Object (optional)
* `id` string (optional) _macOS_ - A unique identifier for the notification, mapping to `UNNotificationRequest`'s [`identifier`](https://developer.apple.com/documentation/usernotifications/unnotificationrequest/identifier) property. Defaults to a random UUID if not provided or if an empty string is passed. Use this identifier with [`Notification.remove()`](#notificationremoveid-macos) to remove specific delivered notifications, or with [`Notification.getHistory()`](#notificationgethistory-macos) to identify them.
* `groupId` string (optional) _macOS_ - A string identifier used to visually group notifications together in Notification Center. Maps to `UNNotificationContent`'s [`threadIdentifier`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/threadidentifier) property. Use this identifier with [`Notification.removeGroup()`](#notificationremovegroupgroupid-macos) to remove all notifications in a group.
* `id` string (optional) _macOS_ - A unique identifier for the notification, mapping to `UNNotificationRequest`'s [`identifier`](https://developer.apple.com/documentation/usernotifications/unnotificationrequest/identifier) property. Defaults to a random UUID if not provided or if an empty string is passed. This can be used to remove or update previously delivered notifications.
* `groupId` string (optional) _macOS_ - A string identifier used to visually group notifications together in Notification Center. Maps to `UNNotificationContent`'s [`threadIdentifier`](https://developer.apple.com/documentation/usernotifications/unnotificationcontent/threadidentifier) property.
* `title` string (optional) - A title for the notification, which will be displayed at the top of the notification window when it is shown.
* `subtitle` string (optional) _macOS_ - A subtitle for the notification, which will be displayed below the title.
* `body` string (optional) - The body text of the notification, which will be displayed below the title or subtitle.

View File

@@ -94,6 +94,7 @@
The actual output pixel format and color space of the texture should refer to [`OffscreenSharedTexture`](../structures/offscreen-shared-texture.md) object in the `paint` event.
* `argb` - The requested output texture format is 8-bit unorm RGBA, with SRGB SDR color space.
* `rgbaf16` - The requested output texture format is 16-bit float RGBA, with scRGB HDR color space.
* `nv12` - The requested output texture format is 12bpp with Y plane followed by a 2x2 interleaved UV plane, with REC709 color space.
* `deviceScaleFactor` number (optional) _Experimental_ - The device scale factor of the offscreen rendering output. If not set, will use `1` as default.
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
the specified `preload` script in a separate JavaScript context. Defaults

View File

@@ -146,13 +146,15 @@ The extra privileges granted to the `file://` protocol by this fuse are incomple
The `wasmTrapHandlers` fuse controls whether V8 will use signal handlers to trap Out of Bounds memory
access from WebAssembly. The feature works by surrounding the WebAssembly memory with large guard regions
and then installing a signal handler that traps attempt to access memory in the guard region. The feature
is only supported on the following 64-bit systems.
is only supported on the following 64-bit systems:
Linux. MacOS, Windows - x86_64
Linux, MacOS - aarch64
* Linux, macOS, Windows - x86_64
* Linux, macOS - aarch64
```text
| Guard Pages | WASM heap | Guard Pages |
|-----8GB-----| |-----8GB-----|
```
When the fuse is disabled V8 will use explicit bound checks in the generated WebAssembly code to ensure
memory safety. However, this method has some downsides

View File

@@ -179,6 +179,7 @@ auto_filenames = {
"lib/common/define-properties.ts",
"lib/common/deprecate.ts",
"lib/common/ipc-messages.ts",
"lib/common/timers-shim.ts",
"lib/common/web-view-methods.ts",
"lib/common/webpack-globals-provider.ts",
"lib/renderer/api/context-bridge.ts",

View File

@@ -2,10 +2,6 @@ const binding = process._linkedBinding('electron_browser_notification');
const ElectronNotification = binding.Notification;
ElectronNotification.isSupported = binding.isSupported;
ElectronNotification.getHistory = binding.getHistory;
ElectronNotification.remove = binding.remove;
ElectronNotification.removeAll = binding.removeAll;
ElectronNotification.removeGroup = binding.removeGroup;
if (process.platform === 'win32' && binding.handleActivation) {
ElectronNotification.handleActivation = binding.handleActivation;

View File

@@ -148,5 +148,4 @@ fix_wayland_test_crash_on_teardown.patch
fix_set_correct_app_id_on_linux.patch
fix_pass_trigger_for_global_shortcuts_on_wayland.patch
feat_plumb_node_integration_in_worker_through_workersettings.patch
feat_restore_macos_child_plugin_process.patch
fix_restore_sdk_inputs_cross-toolchain_deps_for_macos.patch

View File

@@ -49,7 +49,7 @@ index 901b727ed898cdd840df5ff7e2380fbee5d7fde2..1caacaeed9ddf1162cfa393fe4a7c86a
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 85b472e644c4e705b5a176a6c8bcbdf15cdded54..4af17ceeb6e6eb6cf07c6e8723a2065671d12d13 100644
index 79e918fbad2706986ee13188efa99004ac2ece7c..61a32900134e2b977d29290089faf537894037e3 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -757,10 +757,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

View File

@@ -33,10 +33,10 @@ index 4b1fd316496e33f9e805aec89a91062587e6ee16..1b6fce9e2780a37e1e8bf3f8a62dc6bc
"//base",
"//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 8e3ef4d024dcf59f3a3d481312dc27521e313162..befd4aa9b849fcb6c249048095d55b4b7688550e 100644
index 37f3a6b1d9457b04bd1d0c85ce585418d5dd7cb2..e411e434a4e1c5dc610984395eeb769aa6077a53 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -4588,7 +4588,7 @@ static_library("browser") {
@@ -4561,7 +4561,7 @@ static_library("browser") {
]
}
@@ -46,10 +46,10 @@ index 8e3ef4d024dcf59f3a3d481312dc27521e313162..befd4aa9b849fcb6c249048095d55b4b
# than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index b800bca928e2c9c5e843fbf7b29d42e397c5f351..bd4a891a764152dc08b2ee08a09e5430bd83040e 100644
index 1c6ed791b83c6cb70c57fb14cd7e3d8b22736895..607b2eb775c37fc8e967a74acaca36b7b793596d 100644
--- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn
@@ -7757,9 +7757,12 @@ test("unit_tests") {
@@ -7772,9 +7772,12 @@ test("unit_tests") {
"//chrome/notification_helper",
]
@@ -63,7 +63,7 @@ index b800bca928e2c9c5e843fbf7b29d42e397c5f351..bd4a891a764152dc08b2ee08a09e5430
"//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests",
@@ -8753,6 +8756,10 @@ test("unit_tests") {
@@ -8771,6 +8774,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
]
@@ -74,7 +74,7 @@ index b800bca928e2c9c5e843fbf7b29d42e397c5f351..bd4a891a764152dc08b2ee08a09e5430
sources += [
# The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc",
@@ -8810,7 +8817,6 @@ test("unit_tests") {
@@ -8828,7 +8835,6 @@ test("unit_tests") {
# TODO(crbug.com/417513088): Maybe merge with the non-android `deps` declaration above?
deps += [
"../browser/screen_ai:screen_ai_install_state",

View File

@@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 12304d459b01d0e951065f90c98f4d24c4b138d3..43d64ce77ce86b961bbfd0e0e661577dae0708ca 100644
index 2e4480b98b9d8adf9abacff49e82e611511540c8..bb1442bcf2575bfd754469748d8322bb7ed76b17 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -10134,6 +10134,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -10126,6 +10126,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -224,7 +224,7 @@ index d92bab531c12c62a5321a23f4a0cb89691668127..2060e04795ba8e7a923fd0fe3485b8c5
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index 3fbc88748183fee47003947a9c2c3f9c2d768a59..90d6ef7e75a1765be57bdc4e28aeed69bd3289c2 100644
index 715ca6e188c7e821478fcbaa4496efd25a673c61..e58465eb936b2a8b3479201ec24580501f7fc2f3 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2341,6 +2341,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,

View File

@@ -80,7 +80,7 @@ index 39fa45f0a0f9076bd7ac0be6f455dd540a276512..3d0381d463eed73470b28085830f2a23
content::WebContents* source,
const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index f47a1155907d92146dabd72b5c7e8120a2b71c77..9122edca238bffc3b0949d71a217f2e6414d3fa9 100644
index 8899a3216052582e35c5c046e1e0baee48052452..461cb574dc1083fae0bc96e53ed94ba117f7691d 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -2288,7 +2288,8 @@ bool Browser::IsWebContentsCreationOverridden(

View File

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
index 59b61e92921c2a21ec6d0d98fecc27cb2465d917..a527eb1558a070361285070e047587a122423654 100644
index ca69af7a6a14182fe3b9eb049e9bfee476c8eb77..cbdc905d6578675b48045ebf5fa8c5d5bef2ee67 100644
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
@@ -1958,6 +1958,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1963,6 +1963,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
loader_factory_bundle_info =
context()->loader_factory_bundle_for_update_check()->Clone();
@@ -38,7 +38,7 @@ index 59b61e92921c2a21ec6d0d98fecc27cb2465d917..a527eb1558a070361285070e047587a1
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
browser_context(), scope)) {
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
@@ -1977,9 +1997,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
@@ -1982,9 +2002,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
features::kEnableServiceWorkersForChromeScheme) &&
scope.scheme() == kChromeUIScheme) {
config->RegisterURLDataSource(browser_context());

View File

@@ -17,7 +17,7 @@ as well as keeps these storage areas limited to a bounded
size meanwhile giving application developers more space to work with.
diff --git a/components/services/storage/dom_storage/dom_storage_constants.h b/components/services/storage/dom_storage/dom_storage_constants.h
index 6168559e4ee26c29d15aa56a84f23c6c68b8382a..58005a64044c0da29f221aa23c51a1d8b082af5b 100644
index 2ded9daa5611d3121677f4d67d19fcdbbcc68d26..d5a9f43850d3d7c3a73873ebb24bf2ccb937a6ed 100644
--- a/components/services/storage/dom_storage/dom_storage_constants.h
+++ b/components/services/storage/dom_storage/dom_storage_constants.h
@@ -11,7 +11,8 @@ namespace storage {
@@ -31,10 +31,10 @@ index 6168559e4ee26c29d15aa56a84f23c6c68b8382a..58005a64044c0da29f221aa23c51a1d8
// In the storage service we allow some overage to
// accommodate concurrent writes from different clients
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
index 2552cc9cfab2c54caf584b14944324b92ae22171..f6e9a4a998f13d55b4d213a8bae2d50b090f138a 100644
index 535d618c6cb99fea8116baf69f8056d40a15bbdd..d01c79fbc67cfb8e668a2282cb4c4ae48d71e3a3 100644
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom
+++ b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
@@ -50,7 +50,8 @@ struct KeyValue {
@@ -67,7 +67,8 @@ struct KeyValue {
interface StorageArea {
// The quota for each storage area.
// This value is enforced in renderer processes and the browser process.

View File

@@ -193,10 +193,10 @@ index d9c14f91747bde0e76056d7f2f2ada166e67f994..09335acac17f526fb8d8e42e4b2d993b
UtilityProcessHost::Start(std::move(utility_options),
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index bcb910d6c715535843ef515ee0bd7d3d794fb6c0..3739d028b77b5e33ad0435f99a101b6407128a0d 100644
index 1b6c5d15eaf06224d40bee70b2da2a6b9c623f9a..23731f8c98c50c3140867debba688c5720684444 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -241,13 +241,13 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithFileToPreload(
@@ -242,13 +242,13 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithFileToPreload(
}
#endif // BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
@@ -213,7 +213,7 @@ index bcb910d6c715535843ef515ee0bd7d3d794fb6c0..3739d028b77b5e33ad0435f99a101b64
#if BUILDFLAG(USE_ZYGOTE)
UtilityProcessHost::Options& UtilityProcessHost::Options::WithZygoteForTesting(
@@ -257,6 +257,45 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithZygoteForTesting(
@@ -258,6 +258,45 @@ UtilityProcessHost::Options& UtilityProcessHost::Options::WithZygoteForTesting(
}
#endif // BUILDFLAG(USE_ZYGOTE)
@@ -259,7 +259,7 @@ index bcb910d6c715535843ef515ee0bd7d3d794fb6c0..3739d028b77b5e33ad0435f99a101b64
UtilityProcessHost::Options&
UtilityProcessHost::Options::WithBoundReceiverOnChildProcessForTesting(
mojo::GenericPendingReceiver receiver) {
@@ -534,9 +573,30 @@ bool UtilityProcessHost::StartProcess() {
@@ -535,9 +574,30 @@ bool UtilityProcessHost::StartProcess() {
}
#endif // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)

View File

@@ -46,7 +46,7 @@ index 6e60de1319c5506d7180719fa230ab9cf537b832..e570e335fbd413340ddedeee423eca71
'internal-forced-visited-'):
internal_visited_order = 0
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index bce3a012ce093c64b273045a9fbcd4db88c4c365..6175f0d0ddbfbc6a4e43f0135c6b84f39efcecb0 100644
index 2a82493cedbce685ad8dce5856faeff7e94c7c74..ded8bd76c7c06a6f7ae41f5706c7780d12e06887 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5
+++ b/third_party/blink/renderer/core/css/css_properties.json5
@@ -9606,6 +9606,27 @@
@@ -132,10 +132,10 @@ index 59a95a74f542eea6b1a1ee85f77b6f8c124ebcad..6a6ab6dec5d9496380c876c1aef70ee7
} // namespace css_longhand
} // namespace blink
diff --git a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
index 59cbbbaf800308d1f2c917adeb25e55df394bee4..0022411e2a7cb36997c51c23f0214d369daef48c 100644
index b9be661d5723388aebd68037612ac2ac91377912..8737ab0c93639074341863f323e61c03e3abb622 100644
--- a/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
+++ b/third_party/blink/renderer/core/css/resolver/style_builder_converter.cc
@@ -4191,6 +4191,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
@@ -4193,6 +4193,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
return PositionTryFallback(scoped_name, tactic_list);
}
@@ -314,7 +314,7 @@ index 18f283e625101318ee14b50e6e765dfd1c9a1a44..44a3a55974c9e4b9e715574075f25661
auto DrawAsSinglePath = [&]() {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 7afb28fffccf3c117d742f08b31c1365e84af4b0..35bcd34d7a281a95c12c5831dc97a601715157b5 100644
index caba0f7e0eec826e95976a129feca71c029226cf..bf93c6a5276c68360646bb5f99a484a3a7971095 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -214,6 +214,10 @@

View File

@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index cbdc5064414818b8320ecf3ff1e3439d52adee08..134f2b52029760bbb6ffd5d6fd0df1840e6b4d66 100644
index 4ed0b92bd84e0bd97ebd0c6336d92191cc7bb8e8..901f6a4f446ba615a0d0d259735fcc055aeafe93 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -176,6 +176,8 @@ viz_component("service") {

View File

@@ -84,10 +84,10 @@ index 2648adb1cf38ab557b66ffd0e3034b26b04d76d6..98eab587f343f6ca472efc3d4e7b31b2
private:
const std::string service_interface_name_;
diff --git a/content/browser/service_host/utility_process_host.cc b/content/browser/service_host/utility_process_host.cc
index 3739d028b77b5e33ad0435f99a101b6407128a0d..512426af65fc421dfe48fe07a2a9a8274e5f33ec 100644
index 23731f8c98c50c3140867debba688c5720684444..234e822d265b09fcc338f0677e2135747699d70c 100644
--- a/content/browser/service_host/utility_process_host.cc
+++ b/content/browser/service_host/utility_process_host.cc
@@ -651,7 +651,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
@@ -652,7 +652,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
: Client::CrashType::kPreIpcInitialization;
}
#endif // BUILDFLAG(IS_WIN)

View File

@@ -17,7 +17,7 @@ headers, moving forward we should find a way in upstream to provide
access to these headers for loader clients created on the browser process.
diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
index f23e677790e757c664a80ff6d56cc85fe6bdd7c5..f2512fcd5c2a87ed0e51ad420b868f2a88d75297 100644
index a3f0786ceecfdcb80f9c8c4eef22daba4572cd29..0d8f16c92a8f9d05fcf7e2fd1f54c1840bdc6bea 100644
--- a/services/network/public/cpp/resource_request.cc
+++ b/services/network/public/cpp/resource_request.cc
@@ -203,6 +203,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@@ -28,7 +28,7 @@ index f23e677790e757c664a80ff6d56cc85fe6bdd7c5..f2512fcd5c2a87ed0e51ad420b868f2a
enabled_client_hints = other.enabled_client_hints;
cookie_observer =
Clone(&const_cast<mojo::PendingRemote<mojom::CookieAccessObserver>&>(
@@ -241,6 +242,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
@@ -243,6 +244,7 @@ bool ResourceRequest::TrustedParams::EqualsForTesting(
const TrustedParams& other) const {
return isolation_info.IsEqualForTesting(other.isolation_info) &&
disable_secure_dns == other.disable_secure_dns &&
@@ -37,7 +37,7 @@ index f23e677790e757c664a80ff6d56cc85fe6bdd7c5..f2512fcd5c2a87ed0e51ad420b868f2a
allow_cookies_from_browser == other.allow_cookies_from_browser &&
include_request_cookies_with_response ==
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
index 9318e70ace85699b8931c3f86f5f2c41cb46751d..307fc7afc4479cda7a8529c40c236e67ecd3aafb 100644
index 31fb318fc098a2ac4f3b4ea89caced757d520210..34545e9f2c2fc383344710e78c5904119572e2e6 100644
--- a/services/network/public/cpp/resource_request.h
+++ b/services/network/public/cpp/resource_request.h
@@ -116,6 +116,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -49,7 +49,7 @@ index 9318e70ace85699b8931c3f86f5f2c41cb46751d..307fc7afc4479cda7a8529c40c236e67
mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer;
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
index cdd4b909515cbf9734f21c8542e641df26acf584..1e8f18ee1612b8eef35f964ee72db6ddefea18b4 100644
index f258e06019ecaccc8e342c0fb5a54c400109f668..c883c93fa94666ab27092c5622e9db089175cc4b 100644
--- a/services/network/public/cpp/url_request_mojom_traits.cc
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
@@ -67,6 +67,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@@ -61,7 +61,7 @@ index cdd4b909515cbf9734f21c8542e641df26acf584..1e8f18ee1612b8eef35f964ee72db6dd
return false;
}
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
index 3969949030e7c73f4a53a28a5d0a22802389b058..a1f3302a43f23308d7d4ee0b35090377394c5a21 100644
index 35321e7d628e7db05a57d2a86775a313d8daedb0..845f7fe44a135fd98dec47e357365889d3591ab1 100644
--- a/services/network/public/cpp/url_request_mojom_traits.h
+++ b/services/network/public/cpp/url_request_mojom_traits.h
@@ -109,6 +109,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -76,7 +76,7 @@ index 3969949030e7c73f4a53a28a5d0a22802389b058..a1f3302a43f23308d7d4ee0b35090377
network::ResourceRequest::TrustedParams::EnabledClientHints>&
enabled_client_hints(
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
index e503e4940c6c5afa8e4907ce3fcabdf8a12e8d81..3df4be54916dda28e3725baba53a7bef1d369dc2 100644
index 0f3f9aa4328ac025c4627e550b8652004b4617e9..767bb928e64f06bad713163b004a977baf22c3cd 100644
--- a/services/network/public/mojom/url_request.mojom
+++ b/services/network/public/mojom/url_request.mojom
@@ -111,6 +111,9 @@ struct TrustedUrlRequestParams {

View File

@@ -1,68 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Maddock <smaddock@slack-corp.com>
Date: Fri, 13 Mar 2026 15:35:48 -0400
Subject: feat: restore macos child plugin process
Chromium has removed upstream support for child plugin processes
without library validation; see https://crbug.com/461717105.
This patch partially reverts
https://chromium-review.googlesource.com/c/chromium/src/+/7653455
diff --git a/content/browser/child_process_host_impl.cc b/content/browser/child_process_host_impl.cc
index efd3d6686fa2b3ca121e63ac674fed2d57e82c0c..645434ac6a872bf3f67dd1edd987c19fbb4b0ef6 100644
--- a/content/browser/child_process_host_impl.cc
+++ b/content/browser/child_process_host_impl.cc
@@ -87,6 +87,8 @@ base::FilePath ChildProcessHost::GetChildPath(int flags) {
child_base_name += kMacHelperSuffix_renderer;
} else if (flags == CHILD_GPU) {
child_base_name += kMacHelperSuffix_gpu;
+ } else if (flags == CHILD_PLUGIN) {
+ child_base_name += kMacHelperSuffix_plugin;
} else if (flags > CHILD_EMBEDDER_FIRST) {
child_base_name +=
GetContentClient()->browser()->GetChildProcessSuffix(flags);
diff --git a/content/public/app/mac_helpers.gni b/content/public/app/mac_helpers.gni
index d9588d963684354e9564ccce5a8f8371c144a58e..027158994bb7207125ca819f9f226b9fb691037a 100644
--- a/content/public/app/mac_helpers.gni
+++ b/content/public/app/mac_helpers.gni
@@ -45,4 +45,16 @@ content_mac_helpers = [
"",
" (GPU)",
],
+
+ # A helper that does not perform library validation, allowing code not signed
+ # by either Apple or the signing identity to be loaded, and that can execute
+ # unsigned memory.
+ #
+ # This was removed upstream and is now maintained for Electron; see
+ # https://crbug.com/461717105.
+ [
+ "plugin",
+ ".plugin",
+ " (Plugin)",
+ ],
]
diff --git a/content/public/browser/child_process_host.h b/content/public/browser/child_process_host.h
index 2028deaf624bbfc75b2fa563298f3f4f65b1d65f..5ee19fbca0a73bb81273d162b2c304427b1b85cb 100644
--- a/content/public/browser/child_process_host.h
+++ b/content/public/browser/child_process_host.h
@@ -97,6 +97,18 @@ class CONTENT_EXPORT ChildProcessHost {
// allow-jit entitlement instead.
CHILD_GPU,
+ // Starts a child process with the macOS entitlement that ignores the
+ // library validation code signing enforcement.
+ //
+ // Library validation mandates that all executable pages be backed by a code
+ // signature of either 1) Apple, or 2) the same Team ID as the main
+ // executable. Third-party plug-ins are not signed by the same Team ID as
+ // the main binary, so this flag must be used when loading them.
+ //
+ // This was removed upstream and is now maintained for Electron; see
+ // https://crbug.com/461717105.
+ CHILD_PLUGIN,
+
// Marker for the start of embedder-specific helper child process types.
// Values greater than CHILD_EMBEDDER_FIRST are reserved to be used by the
// embedder to add custom process types and will be resolved via

View File

@@ -34,10 +34,10 @@ index 2f6fbe5270245ddb1ef82f097ac1258781acb66e..727b73a37a3258aa44643d66dceba790
}
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index f263d96b11aee75bbd0e6b8f4ff5a520f7047e9e..d278eae0806c1d51e949c7026fa01f01494c8dd3 100644
index e25fee83684f514801199d3edf865bfee3684ae1..a75a65bed13d548494ad9a646e447002ef8b4ad4 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -97,7 +97,8 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
@@ -98,7 +98,8 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
case PermissionType::LOCAL_NETWORK_ACCESS:
case PermissionType::LOCAL_NETWORK:
case PermissionType::LOOPBACK_NETWORK:

View File

@@ -106,10 +106,10 @@ index 79eece0dfff27b4fdb6beb895271e419007de4e3..9dda823b2e80048ba6fdedf398c40327
bool is_visible_on_all_workspaces_ = false;
gfx::Rect window_bounds_before_fullscreen_;
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 03caee9409869b7009750cc68e1d1503b9719b76..994483c8e95451ed43aa00f5c4c4e45354bfa8bd 100644
index 96678f5de2a0b67cd338012fb84b9ea7ff904084..afc4c3030d15eeb7a270ca6d3cc29e64a2ad003d 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -477,6 +477,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -481,6 +481,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (!is_tooltip) {
tooltip_manager_ = std::make_unique<TooltipManagerMac>(GetNSWindowMojo());
}
@@ -117,7 +117,7 @@ index 03caee9409869b7009750cc68e1d1503b9719b76..994483c8e95451ed43aa00f5c4c4e453
if (params.workspace.length()) {
if (std::optional<std::vector<uint8_t>> restoration_data =
@@ -494,6 +495,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -498,6 +499,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
window_params->modal_type = widget->widget_delegate()->GetModalType();
window_params->is_translucent =
params.opacity == Widget::InitParams::WindowOpacity::kTranslucent;
@@ -125,7 +125,7 @@ index 03caee9409869b7009750cc68e1d1503b9719b76..994483c8e95451ed43aa00f5c4c4e453
window_params->is_tooltip = is_tooltip;
// macOS likes to put shadows on most things. However, frameless windows
@@ -682,9 +684,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -687,9 +689,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// case it will never become visible but we want its compositor to produce
// frames for screenshooting and screencasting.
UpdateCompositorProperties();

View File

@@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 26d4c43c9e09b58c764d38f8fbf62afc8f3a3c86..c9cbf38a30e299eb37552a1885362a87bd249495 100644
index 26f3bf19ec8df47ac11b90a2d7afb1f8730d8eed..5c0fc3b9c49970528798644db3fd5b7983e60d10 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -11712,6 +11712,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
@@ -11744,6 +11744,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
target_rph_id);
}
@@ -44,10 +44,10 @@ index 26d4c43c9e09b58c764d38f8fbf62afc8f3a3c86..c9cbf38a30e299eb37552a1885362a87
// origin of |common_params.url| and/or |common_params.initiator_origin|.
url::Origin resolved_origin = url::Origin::Resolve(
diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
index f70c3db4c441a500d000fdcd939a4cb988deb74a..caf60e5bffb5e8b0f109c42a9dfc4b2426fe9bb2 100644
index 34d9311842e191d0cfa3c42e60076ee7b3e0cb62..e770e4db684c420d90420ef8615db3eede15b8a9 100644
--- a/third_party/blink/renderer/core/loader/document_loader.cc
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
@@ -2355,6 +2355,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
@@ -2356,6 +2356,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
Document* owner_document) {
scoped_refptr<SecurityOrigin> origin;
@@ -55,7 +55,7 @@ index f70c3db4c441a500d000fdcd939a4cb988deb74a..caf60e5bffb5e8b0f109c42a9dfc4b24
// Whether the origin is newly created within this call, instead of copied
// from an existing document's origin or from `origin_to_commit_`. If this is
// true, we won't try to compare the nonce of this origin (if it's opaque) to
@@ -2391,6 +2392,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
@@ -2392,6 +2393,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
// non-renderer only origin bits will be the same, which will be asserted at
// the end of this function.
origin = origin_to_commit_;

View File

@@ -12,7 +12,7 @@ invisible state of the `viz::DisplayScheduler` owned
by the `ui::Compositor`.
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index f12e18ad1255c0e0228805f2ba334519b446ef63..10f4b53423a8a7cf7f1f09e4570871fa1ead27ca 100644
index e1d4c2dd4cf8c47ea555bf550f9c51bfd3a2e2fe..0a09e16571eeeb4ad8f2140f9a47b54da3d45e70 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -369,7 +369,8 @@ void Compositor::SetLayerTreeFrameSink(

View File

@@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index 4af17ceeb6e6eb6cf07c6e8723a2065671d12d13..b8973d07dd6beedf26a943149f856da7bd546cf9 100644
index 61a32900134e2b977d29290089faf537894037e3..214053450d585246b347da2a7a51e5c8820cbff7 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3200,6 +3200,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3196,6 +3196,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback,
@@ -70,7 +70,7 @@ index 4af17ceeb6e6eb6cf07c6e8723a2065671d12d13..b8973d07dd6beedf26a943149f856da7
BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) {
@@ -3257,7 +3258,7 @@ void LocalFrame::RequestExecuteScript(
@@ -3253,7 +3254,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option,
@@ -80,10 +80,10 @@ index 4af17ceeb6e6eb6cf07c6e8723a2065671d12d13..b8973d07dd6beedf26a943149f856da7
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index d48612c83ed164949227ca70aac6deaaa5388a36..c7efc832a839056dfb479df8e9955adecae07e7c 100644
index 0f119c1170f3379754b03ff38358ed6f191fb578..64024aaa3630bacbaf13b7491ff4ed5453f2abfd 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -835,6 +835,7 @@ class CORE_EXPORT LocalFrame final
@@ -832,6 +832,7 @@ class CORE_EXPORT LocalFrame final
mojom::blink::EvaluationTiming,
mojom::blink::LoadEventBlockingOption,
WebScriptExecutionCallback,
@@ -211,10 +211,10 @@ index f2c94689450f0333a144ccf82cf147c194896e6b..1c2e9fe36c297f7d614d9ca290e4d13c
const mojom::blink::UserActivationOption user_activation_option_;
const mojom::blink::LoadEventBlockingOption blocking_option_;
diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
index e281d26513e644465359d9c99e7240d24f6aaace..1688b62c0dd283f9d6a5190e7e269c8551c0f6f6 100644
index 6e87cd9a855bd3f1145f864367f34d966088ce6c..6b0448254eec33896686544ebc2a9bf662a5bd56 100644
--- a/third_party/blink/renderer/core/frame/web_frame_test.cc
+++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
@@ -298,6 +298,7 @@ void ExecuteScriptsInMainWorld(
@@ -300,6 +300,7 @@ void ExecuteScriptsInMainWorld(
DOMWrapperWorld::kMainWorldId, sources, user_gesture,
mojom::blink::EvaluationTiming::kSynchronous,
mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback),

View File

@@ -50,10 +50,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn
index 7ab4379d92fdaa2e7047100c18df204265656cf1..1590dd3ae2ee86daff32edb14281589bb34df3df 100644
index bc18a7ef68c23614b3bbdd9968139e63a8e81f44..95f40f43451a103cb19de86e632e1679e36fda3f 100644
--- a/base/BUILD.gn
+++ b/base/BUILD.gn
@@ -1082,6 +1082,7 @@ component("base") {
@@ -1084,6 +1084,7 @@ component("base") {
"//build:ios_buildflags",
"//build/config/compiler:compiler_buildflags",
"//third_party/modp_b64",
@@ -869,7 +869,7 @@ index 15c81d1f61c5dd994f24a194665de639b6355460..e74be476326c22821087939060ff744b
void NativeWidgetNSWindowBridge::SetColorMode(
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 7aab80076a041fac6cd81f477456a6c9169c3cb5..cbdc5064414818b8320ecf3ff1e3439d52adee08 100644
index dcdb614b91a773273e4785aff92a44b3bba6cf59..4ed0b92bd84e0bd97ebd0c6336d92191cc7bb8e8 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -390,6 +390,7 @@ viz_component("service") {
@@ -880,7 +880,7 @@ index 7aab80076a041fac6cd81f477456a6c9169c3cb5..cbdc5064414818b8320ecf3ff1e3439d
}
if (is_ios) {
@@ -717,6 +718,7 @@ viz_source_set("unit_tests") {
@@ -720,6 +721,7 @@ viz_source_set("unit_tests") {
"display_embedder/software_output_device_mac_unittest.mm",
]
frameworks = [ "IOSurface.framework" ]
@@ -940,7 +940,7 @@ index 010c713090e5038dc90db131c8f621422d30c03b..20c35e887a0496ee609c077e3b0494bd
void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 2f1fcace77c403c0e136ae2fc40633cccccce038..9ce9c1771310e81b18ba6fe4569544ff58730c73 100644
index 26e72978755365e99feef34c4210b35e0a1d0790..c83b38bf9d392301924805a1083079dc3dd0b27f 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -33,6 +33,7 @@
@@ -951,7 +951,7 @@ index 2f1fcace77c403c0e136ae2fc40633cccccce038..9ce9c1771310e81b18ba6fe4569544ff
#include "skia/ext/skia_utils_mac.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/mojom/input/input_handler.mojom.h"
@@ -2209,15 +2210,21 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -2233,15 +2234,21 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -1378,10 +1378,10 @@ index 3a079b0fc34031d062045510fe0e2444792ff942..1be75833d46aaa124e5467904f68e46c
} // namespace
#endif
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
index aa3411b03b674479df96af0d182ffa8e35c9f3be..79167ca3638a13aeb0f3e07b064afaa88cad3b2c 100644
index 012632a440f5078a71cbb327b04990654f282141..8e47b039b63fe74d3de441b8d21e7a9c4ec974f5 100644
--- a/net/dns/BUILD.gn
+++ b/net/dns/BUILD.gn
@@ -207,6 +207,8 @@ source_set("dns") {
@@ -223,6 +223,8 @@ source_set("dns") {
":host_resolver_manager",
":mdns_client",
]
@@ -2416,10 +2416,10 @@ index aa73ba06160c983189dd214529344a8bcf9fbe98..79eece0dfff27b4fdb6beb895271e419
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503b9719b76 100644
index 56caa43bcaaa536c66aa5734ec07cf95f99a95b3..96678f5de2a0b67cd338012fb84b9ea7ff904084 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -21,6 +21,7 @@
@@ -22,6 +22,7 @@
#include "components/remote_cocoa/browser/ns_view_ids.h"
#include "components/remote_cocoa/browser/window.h"
#include "components/remote_cocoa/common/native_widget_ns_window.mojom.h"
@@ -2427,7 +2427,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
#include "mojo/public/cpp/bindings/self_owned_associated_receiver.h"
#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
#include "ui/accessibility/accessibility_features.h"
@@ -372,8 +373,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -376,8 +377,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
if (in_process_ns_window_bridge_) {
return gfx::NativeViewAccessible(in_process_ns_window_bridge_->ns_view());
}
@@ -2440,7 +2440,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
}
gfx::NativeViewAccessible
@@ -389,8 +394,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -393,8 +398,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[in_process_ns_window_bridge_->ns_view() window]);
}
@@ -2453,7 +2453,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1500,9 +1509,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1505,9 +1514,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// for PWAs. However this breaks accessibility on in-process windows,
// so set it back to NO when a local window gains focus. See
// https://crbug.com/41485830.
@@ -2465,7 +2465,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
// Explicitly set the keyboard accessibility state on regaining key
// window status.
if (is_key && is_content_first_responder) {
@@ -1655,17 +1666,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1660,17 +1671,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -2486,7 +2486,7 @@ index 16d4bc1c96c8bb18f13fd66b12588c9f929c5c9a..03caee9409869b7009750cc68e1d1503
*pid = getpid();
id element_id = GetNativeViewAccessible();
@@ -1678,6 +1692,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1683,6 +1697,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
}
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

View File

@@ -133,7 +133,7 @@ index 9bf238e64af483294ae3c3f18a4e9aed49a8658d..b9b2a4c8c387b8e8b4eb1f02fc0f891c
const GURL& document_url,
const WeakDocumentPtr& weak_document_ptr,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 99ced941ed095fdb2b6c3c5599733ac1f3ec73c0..c56d8ce7b8d346357ad9f8293b252eaae0c8655d 100644
index ffa9cb9f1b001786f4315464a99cafcb666b7a4f..73e7132a5fcbfee56bfc0d1caad173ded4525453 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2376,7 +2376,7 @@ void RenderProcessHostImpl::CreateNotificationService(

View File

@@ -30,10 +30,10 @@ index 727b73a37a3258aa44643d66dceba79017d9dbc8..b3d872be603b68bb7aa2af267f05212a
return ContentSettingsType::DEFAULT;
diff --git a/content/browser/permissions/permission_controller_impl.cc b/content/browser/permissions/permission_controller_impl.cc
index d278eae0806c1d51e949c7026fa01f01494c8dd3..6e663bb95de59ddc06064a9bf26e6e58828c1a7f 100644
index a75a65bed13d548494ad9a646e447002ef8b4ad4..a425f011524f1e4a9d43400c2f9251c925312fe9 100644
--- a/content/browser/permissions/permission_controller_impl.cc
+++ b/content/browser/permissions/permission_controller_impl.cc
@@ -97,9 +97,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
@@ -98,9 +98,15 @@ PermissionToSchedulingFeature(PermissionType permission_name) {
case PermissionType::LOCAL_NETWORK_ACCESS:
case PermissionType::LOCAL_NETWORK:
case PermissionType::LOOPBACK_NETWORK:

View File

@@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index 971e2bf13b1afc456484556004b066cc55111617..2f1fcace77c403c0e136ae2fc40633cccccce038 100644
index d21256326ab6b031545a032809c21fbe9251317c..26e72978755365e99feef34c4210b35e0a1d0790 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -179,6 +179,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -47,7 +47,7 @@ index 971e2bf13b1afc456484556004b066cc55111617..2f1fcace77c403c0e136ae2fc40633cc
if (view == self)
hitSelf = YES;
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
@@ -1313,6 +1328,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -1337,6 +1352,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
eventType == NSEventTypeKeyDown &&
!(modifierFlags & NSEventModifierFlagCommand);

View File

@@ -245,7 +245,7 @@ index 1ef2c9052262eccdbc40030746a858b7f30ac469..c7101b0d71826b05f61bfe0e74429d92
}
diff --git a/content/common/features.cc b/content/common/features.cc
index 3b4ab9f49e73e4af20be84e53f8ff161f913a36c..defcfbb3683062fd80b166cf132458a805a8f365 100644
index d6be1eae15865ae774fcda6f2fb2cc8b1206450a..746dbf32320e8b2f925f63ea8ba47dc2825e2cd9 100644
--- a/content/common/features.cc
+++ b/content/common/features.cc
@@ -364,6 +364,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);

View File

@@ -10,10 +10,10 @@ on Windows. We should refactor our code so that this patch isn't
necessary.
diff --git a/testing/variations/fieldtrial_testing_config.json b/testing/variations/fieldtrial_testing_config.json
index 7f5e80f63cea16d9c75237ebeb198e1cdba6e595..d3a292eb0200ae2e0b517d1549ba945475afae61 100644
index 00ca9b81e6417f39d197f6c4e330fffa0dd8be86..8ff082655f23410dc1611524ded025471ec206fb 100644
--- a/testing/variations/fieldtrial_testing_config.json
+++ b/testing/variations/fieldtrial_testing_config.json
@@ -21997,6 +21997,21 @@
@@ -21961,6 +21961,21 @@
]
}
],

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index c56d8ce7b8d346357ad9f8293b252eaae0c8655d..a5826fd8d3ae43d0fcd3190f28ecb20ceeade474 100644
index 73e7132a5fcbfee56bfc0d1caad173ded4525453..dbc16dba57f72d40575eacf63558888296a518af 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -1956,6 +1956,10 @@ bool RenderProcessHostImpl::Init() {

View File

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 43d64ce77ce86b961bbfd0e0e661577dae0708ca..de6a1722a3dd3879549822893624dd5c4b8e33f6 100644
index bb1442bcf2575bfd754469748d8322bb7ed76b17..4b315dcc125506ee43083e8d148ca75be4e46ab2 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9189,6 +9189,17 @@ void RenderFrameHostImpl::EnterFullscreen(
@@ -9190,6 +9190,17 @@ void RenderFrameHostImpl::EnterFullscreen(
}
}

View File

@@ -10,10 +10,10 @@ to handle this without patching, but this is fairly clean for now and no longer
patching legacy devtools code.
diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
index f2554f8cabcfd0d0074e4e22de5de8716f1fcaf4..5b6c6056b575b14aa8b76d0238b4d83643db76f4 100644
index ad90070b7acdf891d5cb9e75c3ef06853a63069c..dfc9d200d27f8639c55665ce24609d3dcfe8f776 100644
--- a/front_end/entrypoints/main/MainImpl.ts
+++ b/front_end/entrypoints/main/MainImpl.ts
@@ -818,6 +818,8 @@ export class MainImpl {
@@ -816,6 +816,8 @@ export class MainImpl {
globalThis.Main = globalThis.Main || {};
// @ts-expect-error Exported for Tests.js
globalThis.Main.Main = MainImpl;

44
script/qemu-init.sh Executable file
View File

@@ -0,0 +1,44 @@
#!/bin/sh
echo "Mounting essential filesystems"
mount -t proc proc /proc
mount -t sysfs sys /sys
mkdir -p /dev/pts
mount -t devpts devpts /dev/pts
mkdir -p /dev/shm
mount -t tmpfs tmpfs /dev/shm
mount -t tmpfs tmpfs /tmp
chmod 1777 /tmp
mount -t tmpfs tmpfs /run
mkdir -p /run/dbus
mkdir -p /run/user/0
chmod 700 /run/user/0
mount -t tmpfs tmpfs /var/tmp
echo "Setting up hostname and machine-id for D-Bus"
echo "electron-test" > /etc/hostname
hostname electron-test
cat /proc/sys/kernel/random/uuid | tr -d '-' > /etc/machine-id
echo "Setting system clock"
date -s "$(cat /host-time)"
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
export XDG_RUNTIME_DIR=/run/user/0
echo "Starting entrypoint"
echo "System: $(uname -s) $(uname -r) $(uname -m), page size: $(getconf PAGESIZE) bytes"
sudo chown -R builduser:builduser /home/builduser
ls -la /home/builduser/src/out/Default/electron
cd /home/builduser/src
runuser -u builduser -- xvfb-run out/Default/electron electron/spec/fixtures/apps/open-new-window-from-link
EXIT_CODE=$?
echo "Test execution finished with exit code $EXIT_CODE"
echo $EXIT_CODE > /exit-code
sync
echo "Powering off"
# poweroff -f bypasses the init system (this script IS pid 1) and
# directly invokes the reboot() syscall, causing QEMU to exit immediately.
poweroff -f

100
script/run-qemu-64k.sh Executable file
View File

@@ -0,0 +1,100 @@
#!/bin/sh
set -e
CONTAINER=""
TESTFILES=""
ARGS=""
while [ $# -gt 0 ]; do
case "$1" in
--container) CONTAINER="$2"; shift 2 ;;
--testfiles) TESTFILES="$2"; shift 2 ;;
--) shift; ARGS="$*"; break ;;
*) echo "Unknown option: $1"; exit 1 ;;
esac
done
if [ -z "$CONTAINER" ]; then
echo "Usage: $0 --container CONTAINER [-- ARGS...]"
exit 1
fi
echo "Installing QEMU system emulation and tools"
sudo apt-get update && sudo apt-get install -y qemu-system-arm binutils
KERNEL_URL="http://ports.ubuntu.com/ubuntu-ports/pool/main/l/linux/linux-image-unsigned-6.8.0-90-generic-64k_6.8.0-90.91_arm64.deb"
KERNEL_DIR=$(mktemp -d)
ROOTFS_DIR=$(mktemp -d)
# Download kernel and export container filesystem in parallel
echo "Downloading kernel and exporting container filesystem in parallel"
curl -fL "$KERNEL_URL" -o "$KERNEL_DIR/kernel.deb" &
CURL_PID=$!
CONTAINER_ID=$(docker create --platform linux/arm64 "$CONTAINER")
docker export "$CONTAINER_ID" | sudo tar -xf - -C "$ROOTFS_DIR"
docker rm -f "$CONTAINER_ID"
echo "Removing container image to free disk space"
docker rmi "$CONTAINER" || true
docker system prune -f || true
wait $CURL_PID
echo "Extracting kernel"
(cd "$KERNEL_DIR" && ar x kernel.deb && tar xf data.tar*)
VMLINUZ="$KERNEL_DIR/boot/vmlinuz-6.8.0-90-generic-64k"
if [ ! -f "$VMLINUZ" ]; then
echo "Error: Could not find kernel at $VMLINUZ"
exit 1
fi
sudo cp -r $TESTFILES "$ROOTFS_DIR/home/builduser"
echo "Storing test arguments and installing init script"
echo "$ARGS" > "$ROOTFS_DIR/test-args"
date -u '+%Y-%m-%d %H:%M:%S' > "$ROOTFS_DIR/host-time"
sudo cp "$TESTFILES/electron/script/qemu-init.sh" "$ROOTFS_DIR/init"
sudo chmod +x "$ROOTFS_DIR/init"
echo "Creating disk image with root filesystem"
df -h
DISK_IMG=$(mktemp)
truncate -s 10G "$DISK_IMG"
sudo mkfs.ext4 -q -d "$ROOTFS_DIR" "$DISK_IMG"
sudo rm -rf "$ROOTFS_DIR"
# Use KVM acceleration if available (ARM64 host can run 64K-page guest via KVM)
if [ -e /dev/kvm ] && [ -w /dev/kvm ]; then
echo "KVM available, using hardware acceleration"
ACCEL="-accel kvm -cpu host"
else
echo "KVM not available, using TCG emulation"
ACCEL="-accel tcg,thread=multi -cpu max,pauth-impdef=on"
fi
echo "Starting QEMU VM with 64K page size kernel"
timeout 1800 qemu-system-aarch64 \
-M virt \
$ACCEL \
-m 4096 \
-smp 2 \
-kernel "$VMLINUZ" \
-append "console=ttyAMA0 root=/dev/vda rw init=/init net.ifnames=0 panic=1" \
-drive file="$DISK_IMG",format=raw,if=virtio \
-virtfs local,path="$TESTFILES",mount_tag=testfiles,security_model=none,id=testfiles \
-netdev user,id=net0 \
-device virtio-net-pci,netdev=net0 \
-nographic \
-no-reboot \
|| true
echo "Extracting test results from disk image"
MOUNT_DIR=$(mktemp -d)
sudo mount -o loop "$DISK_IMG" "$MOUNT_DIR"
if [ -f "$MOUNT_DIR/results.xml" ]; then
cp "$MOUNT_DIR/results.xml" .
fi
EXIT_CODE=$(cat "$MOUNT_DIR/exit-code" 2>/dev/null || echo 1)
sudo umount "$MOUNT_DIR"
exit $EXIT_CODE

View File

@@ -14,6 +14,7 @@
#include "base/strings/sys_string_conversions.h"
#include "content/browser/mac_helpers.h"
#include "content/public/common/content_paths.h"
#include "shell/browser/electron_child_process_host_flags.h"
#include "shell/browser/mac/electron_application.h"
#include "shell/common/application_info.h"
#include "shell/common/mac/main_application_bundle.h"
@@ -38,8 +39,8 @@ base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
helper_name += content::kMacHelperSuffix_renderer;
} else if (val.ends_with(content::kMacHelperSuffix_gpu)) {
helper_name += content::kMacHelperSuffix_gpu;
} else if (val.ends_with(content::kMacHelperSuffix_plugin)) {
helper_name += content::kMacHelperSuffix_plugin;
} else if (val.ends_with(kElectronMacHelperSuffixPlugin)) {
helper_name += kElectronMacHelperSuffixPlugin;
}
return frameworks_path.Append(name + " " + helper_name + ".app")

View File

@@ -96,6 +96,7 @@
#include <CoreFoundation/CoreFoundation.h>
#include "base/no_destructor.h"
#include "content/browser/mac_helpers.h"
#include "shell/browser/electron_child_process_host_flags.h"
#include "shell/browser/ui/cocoa/electron_bundle_mover.h"
#include "shell/common/process_util.h"
#endif
@@ -924,7 +925,7 @@ bool App::IsPackaged() {
"electron helper" +
base::ToLowerASCII(content::kMacHelperSuffix_renderer));
static const base::NoDestructor<std::string> plugin_helper(
"electron helper" + base::ToLowerASCII(content::kMacHelperSuffix_plugin));
"electron helper" + base::ToLowerASCII(kElectronMacHelperSuffixPlugin));
if (IsRendererProcess()) {
return base_name != *renderer_helper;
} else if (IsUtilityProcess()) {

View File

@@ -307,6 +307,12 @@ void BaseWindow::OnWindowSheetEnd() {
Emit("sheet-end");
}
void BaseWindow::OnWindowIsKeyChanged(bool is_key) {
#if BUILDFLAG(IS_MAC)
window()->SetActive(is_key);
#endif
}
void BaseWindow::OnWindowEnterHtmlFullScreen() {
Emit("enter-html-full-screen");
}

View File

@@ -84,6 +84,7 @@ class BaseWindow : public gin_helper::TrackableObject<BaseWindow>,
void OnWindowRotateGesture(float rotation) override;
void OnWindowSheetBegin() override;
void OnWindowSheetEnd() override;
void OnWindowIsKeyChanged(bool is_key) override;
void OnWindowEnterFullScreen() override;
void OnWindowLeaveFullScreen() override;
void OnWindowEnterHtmlFullScreen() override;

View File

@@ -276,16 +276,22 @@ v8::Local<v8::Value> BrowserWindow::GetWebContents(v8::Isolate* isolate) {
}
void BrowserWindow::OnWindowShow() {
if (!web_contents_shown_) {
web_contents()->WasShown();
web_contents_shown_ = true;
}
BaseWindow::OnWindowShow();
}
void BrowserWindow::OnWindowHide() {
web_contents()->WasOccluded();
web_contents_shown_ = false;
BaseWindow::OnWindowHide();
}
void BrowserWindow::Show() {
web_contents()->WasShown();
web_contents_shown_ = true;
BaseWindow::Show();
}
@@ -294,6 +300,7 @@ void BrowserWindow::ShowInactive() {
if (IsModal())
return;
web_contents()->WasShown();
web_contents_shown_ = true;
BaseWindow::ShowInactive();
}

View File

@@ -80,6 +80,7 @@ class BrowserWindow : public BaseWindow,
// Helpers.
v8::Global<v8::Value> web_contents_;
bool web_contents_shown_ = false;
v8::Global<v8::Value> web_contents_view_;
base::WeakPtr<api::WebContents> api_web_contents_;

View File

@@ -5,7 +5,6 @@
#include "shell/browser/api/electron_api_notification.h"
#include "base/functional/bind.h"
#include "base/strings/utf_string_conversions.h"
#include "base/uuid.h"
#include "build/build_config.h"
#include "content/public/browser/browser_task_traits.h"
@@ -14,12 +13,10 @@
#include "shell/browser/browser.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/common/gin_converters/image_converter.h"
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/handle.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/gin_helper/promise.h"
#include "shell/common/node_includes.h"
#include "url/gurl.h"
@@ -75,29 +72,27 @@ Notification::Notification(gin::Arguments* args) {
presenter_ = static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter();
if (args) {
gin::Dictionary opts(nullptr);
if (args->GetNext(&opts)) {
opts.Get("id", &id_);
opts.Get("groupId", &group_id_);
opts.Get("title", &title_);
opts.Get("subtitle", &subtitle_);
opts.Get("body", &body_);
opts.Get("icon", &icon_);
opts.Get("silent", &silent_);
opts.Get("replyPlaceholder", &reply_placeholder_);
opts.Get("urgency", &urgency_);
opts.Get("hasReply", &has_reply_);
opts.Get("timeoutType", &timeout_type_);
opts.Get("actions", &actions_);
opts.Get("sound", &sound_);
opts.Get("closeButtonText", &close_button_text_);
opts.Get("toastXml", &toast_xml_);
}
if (id_.empty())
id_ = base::Uuid::GenerateRandomV4().AsLowercaseString();
gin::Dictionary opts(nullptr);
if (args->GetNext(&opts)) {
opts.Get("id", &id_);
opts.Get("groupId", &group_id_);
opts.Get("title", &title_);
opts.Get("subtitle", &subtitle_);
opts.Get("body", &body_);
opts.Get("icon", &icon_);
opts.Get("silent", &silent_);
opts.Get("replyPlaceholder", &reply_placeholder_);
opts.Get("urgency", &urgency_);
opts.Get("hasReply", &has_reply_);
opts.Get("timeoutType", &timeout_type_);
opts.Get("actions", &actions_);
opts.Get("sound", &sound_);
opts.Get("closeButtonText", &close_button_text_);
opts.Get("toastXml", &toast_xml_);
}
if (id_.empty())
id_ = base::Uuid::GenerateRandomV4().AsLowercaseString();
}
Notification::~Notification() {
@@ -347,115 +342,6 @@ void Notification::HandleActivation(v8::Isolate* isolate,
}
#endif
// static
v8::Local<v8::Promise> Notification::GetHistory(v8::Isolate* isolate) {
gin_helper::Promise<v8::Local<v8::Value>> promise(isolate);
v8::Local<v8::Promise> handle = promise.GetHandle();
auto* presenter =
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter();
if (!presenter) {
promise.Resolve(v8::Array::New(isolate));
return handle;
}
presenter->GetDeliveredNotifications(base::BindOnce(
[](gin_helper::Promise<v8::Local<v8::Value>> promise,
electron::NotificationPresenter* presenter,
std::vector<electron::NotificationInfo> notifications) {
v8::Isolate* isolate = promise.isolate();
v8::HandleScope handle_scope(isolate);
v8::Local<v8::Array> result =
v8::Array::New(isolate, notifications.size());
for (size_t i = 0; i < notifications.size(); i++) {
const auto& info = notifications[i];
// Create a live Notification object for each delivered notification.
auto* notif = new Notification(/*args=*/nullptr);
notif->id_ = info.id;
notif->group_id_ = info.group_id;
notif->title_ = base::UTF8ToUTF16(info.title);
notif->subtitle_ = base::UTF8ToUTF16(info.subtitle);
notif->body_ = base::UTF8ToUTF16(info.body);
// Register with the presenter so click/reply events route here.
if (presenter) {
notif->notification_ =
presenter->CreateNotification(notif, notif->id_);
if (notif->notification_)
notif->notification_->Restore();
}
auto handle = gin_helper::CreateHandle(isolate, notif);
result
->Set(isolate->GetCurrentContext(), static_cast<uint32_t>(i),
handle.ToV8())
.Check();
}
promise.Resolve(result.As<v8::Value>());
},
std::move(promise), presenter));
return handle;
}
// static
void Notification::Remove(gin::Arguments* args) {
auto* presenter =
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter();
if (!presenter)
return;
// Accept either a single string or an array of strings.
// Peek at the value type first to avoid gin::Arguments cursor issues.
v8::Local<v8::Value> val;
if (!args->GetNext(&val)) {
args->ThrowTypeError("Expected a string or array of strings");
return;
}
if (val->IsString()) {
std::string id;
gin::ConvertFromV8(args->isolate(), val, &id);
presenter->RemoveDeliveredNotifications({id});
} else if (val->IsArray()) {
std::vector<std::string> ids;
if (!gin::ConvertFromV8(args->isolate(), val, &ids)) {
args->ThrowTypeError("Expected a string or array of strings");
return;
}
presenter->RemoveDeliveredNotifications(ids);
} else {
args->ThrowTypeError("Expected a string or array of strings");
}
}
// static
void Notification::RemoveAll() {
auto* presenter =
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter();
if (!presenter)
return;
presenter->RemoveAllDeliveredNotifications();
}
// static
void Notification::RemoveGroup(const std::string& group_id) {
auto* presenter =
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter();
if (!presenter)
return;
presenter->RemoveDeliveredNotificationsByGroupId(group_id);
}
void Notification::FillObjectTemplate(v8::Isolate* isolate,
v8::Local<v8::ObjectTemplate> templ) {
gin::ObjectTemplateBuilder(isolate, GetClassName(), templ)
@@ -509,10 +395,6 @@ void Initialize(v8::Local<v8::Object> exports,
#if BUILDFLAG(IS_WIN)
dict.SetMethod("handleActivation", &Notification::HandleActivation);
#endif
dict.SetMethod("getHistory", &Notification::GetHistory);
dict.SetMethod("remove", &Notification::Remove);
dict.SetMethod("removeAll", &Notification::RemoveAll);
dict.SetMethod("removeGroup", &Notification::RemoveGroup);
}
} // namespace

View File

@@ -38,10 +38,6 @@ class Notification final : public gin_helper::DeprecatedWrappable<Notification>,
public NotificationDelegate {
public:
static bool IsSupported();
static v8::Local<v8::Promise> GetHistory(v8::Isolate* isolate);
static void Remove(gin::Arguments* args);
static void RemoveAll();
static void RemoveGroup(const std::string& group_id);
#if BUILDFLAG(IS_WIN)
// Register a callback to handle all notification activations.

View File

@@ -242,7 +242,7 @@ v8::Local<v8::Promise> ServiceWorkerContext::StartWorkerForScope(
void ServiceWorkerContext::DidStartWorkerForScope(
std::shared_ptr<gin_helper::Promise<v8::Local<v8::Value>>> shared_promise,
int64_t version_id,
int process_id,
content::ChildProcessId process_id,
int thread_id,
const blink::ServiceWorkerToken& token) {
v8::Isolate* isolate = shared_promise->isolate();

View File

@@ -55,7 +55,7 @@ class ServiceWorkerContext final
void DidStartWorkerForScope(
std::shared_ptr<gin_helper::Promise<v8::Local<v8::Value>>> shared_promise,
int64_t version_id,
int process_id,
content::ChildProcessId process_id,
int thread_id,
const blink::ServiceWorkerToken& token);
void DidFailToStartWorkerForScope(

View File

@@ -23,6 +23,7 @@
#include "services/network/public/cpp/originating_process_id.h"
#include "shell/browser/api/message_port.h"
#include "shell/browser/browser.h"
#include "shell/browser/electron_child_process_host_flags.h"
#include "shell/browser/javascript_environment.h"
#include "shell/browser/net/system_network_context_manager.h"
#include "shell/common/gin_converters/callback_converter.h"
@@ -186,7 +187,8 @@ UtilityProcessWrapper::UtilityProcessWrapper(
#endif
#if BUILDFLAG(IS_MAC)
.WithChildFlags(use_plugin_helper
? content::ChildProcessHost::CHILD_PLUGIN
? static_cast<int>(ElectronChildProcessHostFlags::
kChildProcessHelperPlugin)
: content::ChildProcessHost::CHILD_NORMAL)
.WithDisclaimResponsibility(disclaim_responsibility)
#endif

View File

@@ -210,7 +210,7 @@ void ElectronApiSWIPCHandlerImpl::RenderProcessExited(
// static
void ElectronApiSWIPCHandlerImpl::BindReceiver(
int render_process_id,
content::ChildProcessId render_process_id,
int64_t version_id,
mojo::PendingAssociatedReceiver<mojom::ElectronApiIPC> receiver) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);

View File

@@ -10,6 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_process_host_observer.h"
#include "content/public/common/child_process_id.h"
#include "electron/shell/common/api/api.mojom.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "shell/common/gin_helper/event.h"
@@ -39,7 +40,7 @@ class ElectronApiSWIPCHandlerImpl : public mojom::ElectronApiIPC,
mojo::PendingAssociatedReceiver<mojom::ElectronApiIPC> receiver);
static void BindReceiver(
int render_process_id,
content::ChildProcessId render_process_id,
int64_t version_id,
mojo::PendingAssociatedReceiver<mojom::ElectronApiIPC> receiver);

View File

@@ -86,6 +86,7 @@
#include "shell/browser/electron_autofill_driver_factory.h"
#include "shell/browser/electron_browser_context.h"
#include "shell/browser/electron_browser_main_parts.h"
#include "shell/browser/electron_child_process_host_flags.h"
#include "shell/browser/electron_navigation_throttle.h"
#include "shell/browser/electron_plugin_info_host_impl.h"
#include "shell/browser/electron_speech_recognition_manager_delegate.h"
@@ -500,8 +501,9 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
content::ChildProcessHost::CHILD_RENDERER);
auto gpu_child_path = content::ChildProcessHost::GetChildPath(
content::ChildProcessHost::CHILD_GPU);
auto plugin_child_path = content::ChildProcessHost::GetChildPath(
content::ChildProcessHost::CHILD_PLUGIN);
auto plugin_child_path =
content::ChildProcessHost::GetChildPath(static_cast<int>(
ElectronChildProcessHostFlags::kChildProcessHelperPlugin));
if (program != renderer_child_path && program != gpu_child_path &&
program != plugin_child_path) {
child_path = content::ChildProcessHost::GetChildPath(
@@ -1456,8 +1458,7 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
void ElectronBrowserClient::RegisterAssociatedInterfaceBindersForServiceWorker(
const content::ServiceWorkerVersionBaseInfo& service_worker_version_info,
blink::AssociatedInterfaceRegistry& associated_registry) {
CHECK(service_worker_version_info.process_id !=
content::ChildProcessHost::kInvalidUniqueID);
CHECK(service_worker_version_info.process_id);
associated_registry.AddInterface<mojom::ElectronApiIPC>(
base::BindRepeating(&ElectronApiSWIPCHandlerImpl::BindReceiver,
service_worker_version_info.process_id,
@@ -1466,11 +1467,11 @@ void ElectronBrowserClient::RegisterAssociatedInterfaceBindersForServiceWorker(
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
associated_registry.AddInterface<extensions::mojom::RendererHost>(
base::BindRepeating(&extensions::RendererStartupHelper::BindForRenderer,
content::ChildProcessId::FromUnsafeValue(
service_worker_version_info.process_id)));
associated_registry.AddInterface<extensions::mojom::ServiceWorkerHost>(
base::BindRepeating(&extensions::ServiceWorkerHost::BindReceiver,
service_worker_version_info.process_id));
associated_registry.AddInterface<extensions::mojom::ServiceWorkerHost>(
base::BindRepeating(
&extensions::ServiceWorkerHost::BindReceiver,
service_worker_version_info.process_id.GetUnsafeValue()));
#endif
}
@@ -1808,6 +1809,15 @@ void ElectronBrowserClient::RegisterBrowserInterfaceBindersForServiceWorker(
}
#if BUILDFLAG(IS_MAC)
std::string ElectronBrowserClient::GetChildProcessSuffix(int child_flags) {
if (child_flags ==
static_cast<int>(
ElectronChildProcessHostFlags::kChildProcessHelperPlugin)) {
return kElectronMacHelperSuffixPlugin;
}
NOTREACHED() << "Unsupported child process flags: " << child_flags;
}
device::GeolocationSystemPermissionManager*
ElectronBrowserClient::GetGeolocationSystemPermissionManager() {
return device::GeolocationSystemPermissionManager::GetInstance();

View File

@@ -118,6 +118,7 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
content::WebAuthenticationDelegate* GetWebAuthenticationDelegate() override;
#if BUILDFLAG(IS_MAC)
std::string GetChildProcessSuffix(int child_flags) override;
device::GeolocationSystemPermissionManager*
GetGeolocationSystemPermissionManager() override;
#endif

View File

@@ -0,0 +1,34 @@
// Copyright (c) 2026 Microsoft GmbH. All rights reserved.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_CHILD_PROCESS_HOST_FLAGS_H_
#define ELECTRON_SHELL_BROWSER_ELECTRON_CHILD_PROCESS_HOST_FLAGS_H_
#include "build/build_config.h"
#include "content/public/browser/child_process_host.h"
namespace electron {
// Flags for Electron-specific child processes to resolve the appropriate
// helper executable via ElectronBrowserClient::GetChildProcessSuffix().
enum class ElectronChildProcessHostFlags {
#if BUILDFLAG(IS_MAC)
// Starts a child process with macOS entitlements that disable library
// validation and allow unsigned executable memory. This allows the process
// to load third-party libraries not signed by the same Team ID as the main
// executable.
kChildProcessHelperPlugin =
content::ChildProcessHost::CHILD_EMBEDDER_FIRST + 1,
#endif // BUILDFLAG(IS_MAC)
};
#if BUILDFLAG(IS_MAC)
// Helper app name suffix for the plugin child process. This must match the
// corresponding entry in Electron's BUILD.gn electron_plugin_helper_params.
inline constexpr const char kElectronMacHelperSuffixPlugin[] = " (Plugin)";
#endif // BUILDFLAG(IS_MAC)
} // namespace electron
#endif // ELECTRON_SHELL_BROWSER_ELECTRON_CHILD_PROCESS_HOST_FLAGS_H_

View File

@@ -24,7 +24,6 @@ class CocoaNotification : public Notification {
// Notification:
void Show(const NotificationOptions& options) override;
void Dismiss() override;
void Restore() override;
void NotificationDisplayed();
void NotificationReplied(const std::string& reply);
@@ -39,7 +38,6 @@ class CocoaNotification : public Notification {
void LogAction(const char* action);
void ScheduleNotification(UNMutableNotificationContent* content);
bool is_restored_ = false;
UNNotificationRequest* __strong notification_request_;
};

View File

@@ -31,10 +31,7 @@ CocoaNotification::CocoaNotification(NotificationDelegate* delegate,
: Notification(delegate, presenter) {}
CocoaNotification::~CocoaNotification() {
// Don't remove from Notification Center if this was a restored notification.
// Restored notifications are observed, not owned — destruction should just
// disconnect the event handler, not remove the visible notification.
if (notification_request_ && !is_restored_)
if (notification_request_)
[[UNUserNotificationCenter currentNotificationCenter]
removeDeliveredNotificationsWithIdentifiers:@[
notification_request_.identifier
@@ -236,24 +233,6 @@ void CocoaNotification::ScheduleNotification(
}];
}
void CocoaNotification::Restore() {
// Create a minimal UNNotificationRequest with just the identifier so that
// GetNotification() can match this object when the user interacts with the
// notification in Notification Center.
NSString* identifier = base::SysUTF8ToNSString(notification_id());
UNMutableNotificationContent* content =
[[UNMutableNotificationContent alloc] init];
notification_request_ =
[UNNotificationRequest requestWithIdentifier:identifier
content:content
trigger:nil];
is_restored_ = true;
if (electron::debug_notifications) {
LOG(INFO) << "Notification restored (" << [identifier UTF8String] << ")";
}
}
void CocoaNotification::Dismiss() {
if (notification_request_)
[[UNUserNotificationCenter currentNotificationCenter]

View File

@@ -24,15 +24,6 @@ class NotificationPresenterMac : public NotificationPresenter {
NotificationPresenterMac();
~NotificationPresenterMac() override;
// NotificationPresenter
void GetDeliveredNotifications(
GetDeliveredNotificationsCallback callback) override;
void RemoveDeliveredNotifications(
const std::vector<std::string>& identifiers) override;
void RemoveAllDeliveredNotifications() override;
void RemoveDeliveredNotificationsByGroupId(
const std::string& group_id) override;
NotificationImageRetainer* image_retainer() { return image_retainer_.get(); }
scoped_refptr<base::SequencedTaskRunner> image_task_runner() {
return image_task_runner_;

View File

@@ -2,16 +2,11 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "base/logging.h"
#include "base/task/thread_pool.h"
#include "shell/browser/notifications/mac/notification_presenter_mac.h"
#include <string>
#include <utility>
#include <vector>
#include "base/logging.h"
#include "base/strings/sys_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/thread_pool.h"
#include "shell/browser/notifications/mac/cocoa_notification.h"
#include "shell/browser/notifications/mac/notification_center_delegate.h"
@@ -85,72 +80,4 @@ Notification* NotificationPresenterMac::CreateNotificationObject(
return new CocoaNotification(delegate, this);
}
void NotificationPresenterMac::GetDeliveredNotifications(
GetDeliveredNotificationsCallback callback) {
scoped_refptr<base::SequencedTaskRunner> task_runner =
base::SequencedTaskRunner::GetCurrentDefault();
__block GetDeliveredNotificationsCallback block_callback =
std::move(callback);
[[UNUserNotificationCenter currentNotificationCenter]
getDeliveredNotificationsWithCompletionHandler:^(
NSArray<UNNotification*>* _Nonnull notifications) {
std::vector<NotificationInfo> results;
results.reserve([notifications count]);
for (UNNotification* notification in notifications) {
UNNotificationContent* content = notification.request.content;
NotificationInfo info;
info.id = base::SysNSStringToUTF8(notification.request.identifier);
info.title = base::SysNSStringToUTF8(content.title);
info.subtitle = base::SysNSStringToUTF8(content.subtitle);
info.body = base::SysNSStringToUTF8(content.body);
info.group_id = base::SysNSStringToUTF8(content.threadIdentifier);
results.push_back(std::move(info));
}
task_runner->PostTask(
FROM_HERE,
base::BindOnce(std::move(block_callback), std::move(results)));
}];
}
void NotificationPresenterMac::RemoveDeliveredNotifications(
const std::vector<std::string>& identifiers) {
NSMutableArray* ns_identifiers =
[NSMutableArray arrayWithCapacity:identifiers.size()];
for (const auto& id : identifiers) {
[ns_identifiers addObject:base::SysUTF8ToNSString(id)];
}
[[UNUserNotificationCenter currentNotificationCenter]
removeDeliveredNotificationsWithIdentifiers:ns_identifiers];
}
void NotificationPresenterMac::RemoveAllDeliveredNotifications() {
[[UNUserNotificationCenter currentNotificationCenter]
removeAllDeliveredNotifications];
}
void NotificationPresenterMac::RemoveDeliveredNotificationsByGroupId(
const std::string& group_id) {
NSString* target_group = base::SysUTF8ToNSString(group_id);
UNUserNotificationCenter* center =
[UNUserNotificationCenter currentNotificationCenter];
[center getDeliveredNotificationsWithCompletionHandler:^(
NSArray<UNNotification*>* _Nonnull notifications) {
NSMutableArray* matching_ids = [NSMutableArray array];
for (UNNotification* notification in notifications) {
if ([notification.request.content.threadIdentifier
isEqualToString:target_group]) {
[matching_ids addObject:notification.request.identifier];
}
}
if (matching_ids.count > 0) {
[center removeDeliveredNotificationsWithIdentifiers:matching_ids];
}
}];
}
} // namespace electron

View File

@@ -22,15 +22,6 @@ NotificationOptions& NotificationOptions::operator=(NotificationOptions&&) =
default;
NotificationOptions::~NotificationOptions() = default;
NotificationInfo::NotificationInfo() = default;
NotificationInfo::~NotificationInfo() = default;
NotificationInfo::NotificationInfo(const NotificationInfo&) = default;
NotificationInfo& NotificationInfo::operator=(const NotificationInfo&) =
default;
NotificationInfo::NotificationInfo(NotificationInfo&&) noexcept = default;
NotificationInfo& NotificationInfo::operator=(NotificationInfo&&) noexcept =
default;
NotificationAction::NotificationAction() = default;
NotificationAction::~NotificationAction() = default;
NotificationAction::NotificationAction(const NotificationAction&) = default;

View File

@@ -59,21 +59,6 @@ struct NotificationOptions {
~NotificationOptions();
};
struct NotificationInfo {
std::string id;
std::string title;
std::string subtitle;
std::string body;
std::string group_id;
NotificationInfo();
~NotificationInfo();
NotificationInfo(const NotificationInfo&);
NotificationInfo& operator=(const NotificationInfo&);
NotificationInfo(NotificationInfo&&) noexcept;
NotificationInfo& operator=(NotificationInfo&&) noexcept;
};
class Notification {
public:
virtual ~Notification();
@@ -90,11 +75,6 @@ class Notification {
// as can happen on some platforms including Windows.
virtual void Remove() {}
// Restores a previously delivered notification for event handling without
// re-showing it. Sets up platform state so interaction events (click, reply,
// etc.) route to this object.
virtual void Restore() {}
// Should be called by derived classes.
void NotificationClicked();
void NotificationDismissed(bool should_destroy = true,

View File

@@ -44,24 +44,4 @@ void NotificationPresenter::CloseNotificationWithId(
}
}
void NotificationPresenter::GetDeliveredNotifications(
GetDeliveredNotificationsCallback callback) {
// Default: return empty list. Overridden on macOS.
std::move(callback).Run({});
}
void NotificationPresenter::RemoveDeliveredNotifications(
const std::vector<std::string>& identifiers) {
// Default: no-op. Overridden on macOS.
}
void NotificationPresenter::RemoveAllDeliveredNotifications() {
// Default: no-op. Overridden on macOS.
}
void NotificationPresenter::RemoveDeliveredNotificationsByGroupId(
const std::string& group_id) {
// Default: no-op. Overridden on macOS.
}
} // namespace electron

View File

@@ -8,14 +8,12 @@
#include <memory>
#include <set>
#include <string>
#include <vector>
#include "base/functional/callback.h"
#include "base/memory/weak_ptr.h"
#include "shell/browser/notifications/notification.h"
namespace electron {
class Notification;
class NotificationDelegate;
class NotificationPresenter {
@@ -24,22 +22,11 @@ class NotificationPresenter {
virtual ~NotificationPresenter();
using GetDeliveredNotificationsCallback =
base::OnceCallback<void(std::vector<NotificationInfo>)>;
base::WeakPtr<Notification> CreateNotification(
NotificationDelegate* delegate,
const std::string& notification_id);
void CloseNotificationWithId(const std::string& notification_id);
virtual void GetDeliveredNotifications(
GetDeliveredNotificationsCallback callback);
virtual void RemoveDeliveredNotifications(
const std::vector<std::string>& identifiers);
virtual void RemoveAllDeliveredNotifications();
virtual void RemoveDeliveredNotificationsByGroupId(
const std::string& group_id);
std::set<Notification*> notifications() const { return notifications_; }
// disable copy

View File

@@ -24,6 +24,8 @@ media::VideoPixelFormat GetTargetPixelFormatFromOption(
return media::PIXEL_FORMAT_ARGB;
} else if (pixel_format_option == "rgbaf16") {
return media::PIXEL_FORMAT_RGBAF16;
} else if (pixel_format_option == "nv12") {
return media::PIXEL_FORMAT_NV12;
}
// Use ARGB as default.

View File

@@ -87,8 +87,8 @@ MouseDownImpl g_nsnextstepframe_mousedown;
(electron::NativeWindowMac*)[(id)self.window shell];
if (shell && !shell->has_frame())
[self cr_mouseDownOnFrameView:event];
g_nsthemeframe_mousedown(self, @selector(mouseDown:), event);
}
g_nsthemeframe_mousedown(self, @selector(mouseDown:), event);
}
- (void)swiz_nsnextstepframe_mouseDown:(NSEvent*)event {
@@ -98,8 +98,8 @@ MouseDownImpl g_nsnextstepframe_mousedown;
if (shell && !shell->has_frame()) {
[self cr_mouseDownOnFrameView:event];
}
g_nsnextstepframe_mousedown(self, @selector(mouseDown:), event);
}
g_nsnextstepframe_mousedown(self, @selector(mouseDown:), event);
}
- (void)swiz_nsview_swipeWithEvent:(NSEvent*)event {

View File

@@ -31,6 +31,8 @@ std::string OsrVideoPixelFormatToString(media::VideoPixelFormat format) {
return "rgba";
case media::PIXEL_FORMAT_RGBAF16:
return "rgbaf16";
case media::PIXEL_FORMAT_NV12:
return "nv12";
default:
NOTREACHED();
}

View File

@@ -10,6 +10,7 @@
#include "base/files/file_path.h"
#include "base/path_service.h"
#include "content/browser/mac_helpers.h"
#include "shell/browser/electron_child_process_host_flags.h"
namespace electron {
@@ -31,7 +32,7 @@ base::FilePath MainApplicationBundlePath() {
// Up to Contents.
if (!HasMainProcessKey() &&
(path.value().ends_with(" Helper") ||
path.value().ends_with(content::kMacHelperSuffix_plugin) ||
path.value().ends_with(kElectronMacHelperSuffixPlugin) ||
path.value().ends_with(content::kMacHelperSuffix_renderer) ||
path.value().ends_with(content::kMacHelperSuffix_gpu))) {
// The running executable is the helper. Go up five steps:

View File

@@ -261,223 +261,4 @@ describe('Notification module', () => {
});
// TODO(sethlu): Find way to test init with notification icon?
describe('static methods', () => {
ifit(process.platform === 'darwin')('getHistory returns a promise that resolves to an array', async () => {
const result = Notification.getHistory();
expect(result).to.be.a('promise');
const history = await result;
expect(history).to.be.an('array');
});
ifit(process.platform === 'darwin')('remove does not throw with a string argument', () => {
expect(() => Notification.remove('nonexistent-id')).to.not.throw();
});
ifit(process.platform === 'darwin')('remove does not throw with an array argument', () => {
expect(() => Notification.remove(['id-1', 'id-2'])).to.not.throw();
});
ifit(process.platform === 'darwin')('remove throws with no arguments', () => {
expect(() => (Notification.remove as any)()).to.throw(/Expected a string or array of strings/);
});
ifit(process.platform === 'darwin')('remove throws with an invalid argument type', () => {
expect(() => (Notification.remove as any)(123)).to.throw(/Expected a string or array of strings/);
});
ifit(process.platform === 'darwin')('removeAll does not throw', () => {
expect(() => Notification.removeAll()).to.not.throw();
});
ifit(process.platform === 'darwin')('getHistory returns Notification instances with correct properties', async () => {
const n = new Notification({
id: 'history-test-id',
title: 'history test',
subtitle: 'history subtitle',
body: 'history body',
groupId: 'history-group',
silent: true
});
const shown = once(n, 'show');
n.show();
await shown;
const history = await Notification.getHistory();
// getHistory requires code-signed builds to return results;
// skip the content assertions if Notification Center is empty.
if (history.length > 0) {
const found = history.find((item: any) => item.id === 'history-test-id');
expect(found).to.not.be.undefined();
expect(found).to.be.an.instanceOf(Notification);
expect(found.title).to.equal('history test');
expect(found.subtitle).to.equal('history subtitle');
expect(found.body).to.equal('history body');
expect(found.groupId).to.equal('history-group');
}
n.close();
});
ifit(process.platform === 'darwin')('getHistory returned notifications can be shown and closed', async () => {
const n = new Notification({
id: 'history-show-close',
title: 'show close test',
body: 'body',
silent: true
});
const shown = once(n, 'show');
n.show();
await shown;
const history = await Notification.getHistory();
if (history.length > 0) {
const found = history.find((item: any) => item.id === 'history-show-close');
expect(found).to.not.be.undefined();
// Calling show() and close() on a restored notification should not throw
expect(() => {
found.show();
found.close();
}).to.not.throw();
}
Notification.removeAll();
});
ifit(process.platform === 'darwin')('remove removes a notification by id', async () => {
const n = new Notification({
id: 'remove-test-id',
title: 'remove test',
body: 'remove body',
silent: true
});
const shown = once(n, 'show');
n.show();
await shown;
Notification.remove('remove-test-id');
// Give the notification center a moment to process the removal
await new Promise(resolve => setTimeout(resolve, 100));
const history = await Notification.getHistory();
const found = history.find((item: any) => item.id === 'remove-test-id');
expect(found).to.be.undefined();
});
ifit(process.platform === 'darwin')('remove accepts an array of ids', async () => {
const n1 = new Notification({
id: 'remove-array-1',
title: 'test 1',
body: 'body 1',
silent: true
});
const n2 = new Notification({
id: 'remove-array-2',
title: 'test 2',
body: 'body 2',
silent: true
});
const shown1 = once(n1, 'show');
n1.show();
await shown1;
const shown2 = once(n2, 'show');
n2.show();
await shown2;
Notification.remove(['remove-array-1', 'remove-array-2']);
await new Promise(resolve => setTimeout(resolve, 100));
const history = await Notification.getHistory();
const found1 = history.find((item: any) => item.id === 'remove-array-1');
const found2 = history.find((item: any) => item.id === 'remove-array-2');
expect(found1).to.be.undefined();
expect(found2).to.be.undefined();
});
ifit(process.platform === 'darwin')('removeAll removes all notifications', async () => {
const n = new Notification({
id: 'remove-all-test',
title: 'removeAll test',
body: 'body',
silent: true
});
const shown = once(n, 'show');
n.show();
await shown;
Notification.removeAll();
await new Promise(resolve => setTimeout(resolve, 100));
const history = await Notification.getHistory();
const found = history.find((item: any) => item.id === 'remove-all-test');
expect(found).to.be.undefined();
});
ifit(process.platform === 'darwin')('remove does not throw with an empty array', () => {
expect(() => Notification.remove([])).to.not.throw();
});
ifit(process.platform === 'darwin')('remove does not throw with an empty string', () => {
expect(() => Notification.remove('')).to.not.throw();
});
ifit(process.platform === 'darwin')('removeGroup does not throw', () => {
expect(() => Notification.removeGroup('nonexistent-group')).to.not.throw();
});
ifit(process.platform === 'darwin')('removeGroup removes notifications by groupId', async () => {
const n1 = new Notification({
id: 'group-keep',
title: 'keep',
body: 'body',
groupId: 'group-a',
silent: true
});
const n2 = new Notification({
id: 'group-remove-1',
title: 'remove 1',
body: 'body',
groupId: 'group-b',
silent: true
});
const n3 = new Notification({
id: 'group-remove-2',
title: 'remove 2',
body: 'body',
groupId: 'group-b',
silent: true
});
for (const n of [n1, n2, n3]) {
const shown = once(n, 'show');
n.show();
await shown;
}
Notification.removeGroup('group-b');
// Give the notification center a moment to fetch and remove
await new Promise(resolve => setTimeout(resolve, 500));
const history = await Notification.getHistory();
// In code-signed builds, group-a notification should remain
// while group-b notifications should be gone
const foundB1 = history.find((item: any) => item.id === 'group-remove-1');
const foundB2 = history.find((item: any) => item.id === 'group-remove-2');
expect(foundB1).to.be.undefined();
expect(foundB2).to.be.undefined();
// Clean up
Notification.removeAll();
});
});
});

View File

@@ -118,10 +118,6 @@ declare namespace NodeJS {
interface NotificationBinding {
isSupported(): boolean;
getHistory(): Promise<Electron.Notification[]>;
remove(id: string | string[]): void;
removeAll(): void;
removeGroup(groupId: string): void;
Notification: typeof Electron.Notification;
// Windows-only callback for cold-start notification activation
handleActivation?: (callback: (details: ActivationArgumentsInternal) => void) => void;