mirror of
https://github.com/electron/electron.git
synced 2026-03-19 03:02:02 -04:00
Compare commits
7 Commits
pr/50256
...
test-unnot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d1b95cf40c | ||
|
|
f964eb3ccd | ||
|
|
41087ced3c | ||
|
|
82deb7872a | ||
|
|
3e6c984214 | ||
|
|
af25b8f947 | ||
|
|
1198fd7ddf |
68
.github/workflows/branch-created.yml
vendored
68
.github/workflows/branch-created.yml
vendored
@@ -31,45 +31,16 @@ jobs:
|
||||
else
|
||||
echo "Not a release branch: $BRANCH_NAME"
|
||||
fi
|
||||
- name: Determine Unsupported Major Version
|
||||
id: determine-unsupported-major
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
env:
|
||||
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
run: |
|
||||
# Fetch the release schedule
|
||||
SCHEDULE=$(curl -s https://releases.electronjs.org/schedule.json)
|
||||
|
||||
# Get the stableDate for the current major version
|
||||
STABLE_DATE=$(echo "$SCHEDULE" | jq -r --arg major "${MAJOR}.0.0" '.[] | select(.version == $major) | .stableDate')
|
||||
|
||||
if [[ -z "$STABLE_DATE" || "$STABLE_DATE" == "null" ]]; then
|
||||
echo "Could not find stableDate for version $MAJOR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Find the oldest version where eolDate >= stableDate of the new major
|
||||
# This gives us the oldest supported version when the new major goes stable
|
||||
UNSUPPORTED_MAJOR=$(echo "$SCHEDULE" | jq -r --arg stableDate "$STABLE_DATE" '
|
||||
[.[] | select(.eolDate != null and .eolDate >= $stableDate)] | sort_by(.version | split(".")[0] | tonumber) | first | .version | split(".")[0]
|
||||
')
|
||||
|
||||
if [[ -z "$UNSUPPORTED_MAJOR" || "$UNSUPPORTED_MAJOR" == "null" ]]; then
|
||||
echo "Could not determine oldest supported version"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "SCHEDULE=$SCHEDULE" >> "$GITHUB_OUTPUT"
|
||||
echo "UNSUPPORTED_MAJOR=$UNSUPPORTED_MAJOR" >> "$GITHUB_OUTPUT"
|
||||
- name: New Release Branch Tasks
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GH_REPO: electron/electron
|
||||
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
UNSUPPORTED_MAJOR: ${{ steps.determine-unsupported-major.outputs.UNSUPPORTED_MAJOR }}
|
||||
NUM_SUPPORTED_VERSIONS: 3
|
||||
run: |
|
||||
PREVIOUS_MAJOR=$((MAJOR - 1))
|
||||
UNSUPPORTED_MAJOR=$((MAJOR - NUM_SUPPORTED_VERSIONS - 1))
|
||||
|
||||
# Create new labels
|
||||
gh label create $MAJOR-x-y --color 8d9ee8 || true
|
||||
@@ -106,36 +77,12 @@ jobs:
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||
id: generate-project-metadata
|
||||
env:
|
||||
MAJOR: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
UNSUPPORTED_MAJOR: ${{ steps.determine-unsupported-major.outputs.UNSUPPORTED_MAJOR }}
|
||||
SCHEDULE: ${{ steps.determine-unsupported-major.outputs.SCHEDULE }}
|
||||
with:
|
||||
script: |
|
||||
const schedule = JSON.parse(process.env.SCHEDULE)
|
||||
|
||||
const major = parseInt(process.env.MAJOR)
|
||||
const major = ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
const nextMajor = major + 1
|
||||
const prevMajor = major - 1
|
||||
|
||||
const { betaDate, stableDate } = schedule.find(v => v.version === `${major}.0.0`)
|
||||
|
||||
const betaPrepWeek = new Date(betaDate)
|
||||
betaPrepWeek.setDate(betaPrepWeek.getDate() - 8)
|
||||
const betaPrepWeekEnd = new Date(betaPrepWeek)
|
||||
betaPrepWeekEnd.setDate(betaPrepWeekEnd.getDate() + 4)
|
||||
|
||||
const stablePrepWeek = new Date(stableDate)
|
||||
stablePrepWeek.setDate(stablePrepWeek.getDate() - 8)
|
||||
const stablePrepWeekEnd = new Date(stablePrepWeek)
|
||||
stablePrepWeekEnd.setDate(stablePrepWeekEnd.getDate() + 4)
|
||||
|
||||
const stableWeek = new Date(stableDate)
|
||||
stableWeek.setDate(stableWeek.getDate() - 1)
|
||||
|
||||
const nextAlphaDate = new Date(stableDate)
|
||||
nextAlphaDate.setDate(nextAlphaDate.getDate() + 2)
|
||||
|
||||
core.setOutput("major", major)
|
||||
core.setOutput("next-major", nextMajor)
|
||||
core.setOutput("prev-major", prevMajor)
|
||||
@@ -144,15 +91,6 @@ jobs:
|
||||
major,
|
||||
"next-major": nextMajor,
|
||||
"prev-major": prevMajor,
|
||||
"ending-support-major": parseInt(process.env.UNSUPPORTED_MAJOR),
|
||||
"beta-date": betaDate,
|
||||
"beta-prep-week": betaPrepWeek.toISOString().split('T')[0],
|
||||
"beta-prep-week-end": betaPrepWeekEnd.toISOString().split('T')[0],
|
||||
"stable-week": stableWeek.toISOString().split('T')[0],
|
||||
"stable-prep-week": stablePrepWeek.toISOString().split('T')[0],
|
||||
"stable-prep-week-end": stablePrepWeekEnd.toISOString().split('T')[0],
|
||||
"stable-date": stableDate,
|
||||
"next-alpha-date": nextAlphaDate.toISOString().split('T')[0],
|
||||
}))
|
||||
- name: Create Release Project Board
|
||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'147.0.7719.0',
|
||||
'147.0.7714.0',
|
||||
'node_version':
|
||||
'v24.14.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
# clipboard
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/48877
|
||||
description: "Using the `clipboard` API directly in the renderer process is deprecated."
|
||||
breaking-changes-header: deprecated-clipboard-api-access-from-renderer-processes
|
||||
```
|
||||
-->
|
||||
|
||||
> Perform copy and paste operations on the system clipboard.
|
||||
|
||||
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) _Deprecated_ (non-sandboxed only)
|
||||
|
||||
@@ -33,15 +33,6 @@ The `contentTracing` module has the following methods:
|
||||
|
||||
### `contentTracing.getCategories()`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/16583
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `Promise<string[]>` - resolves with an array of category groups once all child processes have acknowledged the `getCategories` request
|
||||
|
||||
Get a set of category groups. The category groups can change as new code paths
|
||||
@@ -53,17 +44,6 @@ are reached. See also the
|
||||
|
||||
### `contentTracing.startRecording(options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/13914
|
||||
description: "The `options` parameter now accepts `TraceConfig` in addition to `TraceCategoriesAndOptions`."
|
||||
- pr-url: https://github.com/electron/electron/pull/16584
|
||||
description: "This function now returns a callback`Promise<void>`."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` ([TraceConfig](structures/trace-config.md) | [TraceCategoriesAndOptions](structures/trace-categories-and-options.md))
|
||||
|
||||
Returns `Promise<void>` - resolved once all child processes have acknowledged the `startRecording` request.
|
||||
@@ -78,17 +58,6 @@ only one trace operation can be in progress at a time.
|
||||
|
||||
### `contentTracing.stopRecording([resultFilePath])`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/16584
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
- pr-url: https://github.com/electron/electron/pull/18411
|
||||
description: "The `resultFilePath` parameter is now optional."
|
||||
```
|
||||
-->
|
||||
|
||||
* `resultFilePath` string (optional)
|
||||
|
||||
Returns `Promise<string>` - resolves with a path to a file that contains the traced data once all child processes have acknowledged the `stopRecording` request
|
||||
@@ -107,15 +76,6 @@ will be returned in the promise.
|
||||
|
||||
### `contentTracing.getTraceBufferUsage()`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/16600
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `Promise<Object>` - Resolves with an object containing the `value` and `percentage` of trace buffer maximum usage
|
||||
|
||||
* `value` number
|
||||
|
||||
@@ -50,22 +50,6 @@ The `crashReporter` module has the following methods:
|
||||
|
||||
### `crashReporter.start(options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/23062
|
||||
description: "Added `rateLimit` and `compress` options."
|
||||
- pr-url: https://github.com/electron/electron/pull/23265
|
||||
description: "Deprecated calling this method in the renderer process."
|
||||
breaking-changes-header: deprecated-crashreporter-methods-in-the-renderer-process
|
||||
- pr-url: https://github.com/electron/electron/pull/25288
|
||||
description: "Default value of `compress` option changed from `false` to `true`."
|
||||
breaking-changes-header: default-changed-crashreporterstart-compress-true-
|
||||
- pr-url: https://github.com/electron/electron/pull/28105
|
||||
description: "The `submitURL` parameter is now optional when `uploadToServer` is `false`."
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` Object
|
||||
* `submitURL` string (optional) - URL that crash reports will be sent to as
|
||||
POST. Required unless `uploadToServer` is `false`.
|
||||
@@ -127,15 +111,6 @@ by the crash reporter.
|
||||
|
||||
### `crashReporter.getLastCrashReport()`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/23265
|
||||
description: "Deprecated calling this method in the renderer process."
|
||||
breaking-changes-header: deprecated-crashreporter-methods-in-the-renderer-process
|
||||
```
|
||||
-->
|
||||
|
||||
Returns [`CrashReport | null`](structures/crash-report.md) - The date and ID of the
|
||||
last crash report. Only crash reports that have been uploaded will be returned;
|
||||
even if a crash report is present on disk it will not be returned until it is
|
||||
@@ -146,15 +121,6 @@ uploaded. In the case that there are no uploaded reports, `null` is returned.
|
||||
|
||||
### `crashReporter.getUploadedReports()`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/23265
|
||||
description: "Deprecated calling this method in the renderer process."
|
||||
breaking-changes-header: deprecated-crashreporter-methods-in-the-renderer-process
|
||||
```
|
||||
-->
|
||||
|
||||
Returns [`CrashReport[]`](structures/crash-report.md):
|
||||
|
||||
Returns all uploaded crash reports. Each report contains the date and uploaded
|
||||
@@ -165,15 +131,6 @@ ID.
|
||||
|
||||
### `crashReporter.getUploadToServer()`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/23265
|
||||
description: "Deprecated calling this method in the renderer process."
|
||||
breaking-changes-header: deprecated-crashreporter-methods-in-the-renderer-process
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `boolean` - Whether reports should be submitted to the server. Set through
|
||||
the `start` method or `setUploadToServer`.
|
||||
|
||||
@@ -182,15 +139,6 @@ the `start` method or `setUploadToServer`.
|
||||
|
||||
### `crashReporter.setUploadToServer(uploadToServer)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/23265
|
||||
description: "Deprecated calling this method in the renderer process."
|
||||
breaking-changes-header: deprecated-crashreporter-methods-in-the-renderer-process
|
||||
```
|
||||
-->
|
||||
|
||||
* `uploadToServer` boolean - Whether reports should be submitted to the server.
|
||||
|
||||
This would normally be controlled by user preferences. This has no effect if
|
||||
|
||||
@@ -80,17 +80,6 @@ The `desktopCapturer` module has the following methods:
|
||||
|
||||
### `desktopCapturer.getSources(options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/2963
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/16427
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` Object
|
||||
* `types` string[] - An array of strings that lists the types of desktop sources
|
||||
to be captured, available types can be `screen` and `window`.
|
||||
@@ -105,7 +94,7 @@ changes:
|
||||
Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`DesktopCapturerSource`](structures/desktop-capturer-source.md) objects, each `DesktopCapturerSource` represents a screen or an individual window that can be captured.
|
||||
|
||||
> [!NOTE]
|
||||
<!-- markdownlint-disable-next-line MD032 -->
|
||||
|
||||
> * Capturing audio requires `NSAudioCaptureUsageDescription` Info.plist key on macOS 14.2 Sonoma and higher - [read more](#macos-versions-142-or-higher).
|
||||
> * Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher, which can detected by [`systemPreferences.getMediaAccessStatus`][].
|
||||
|
||||
@@ -120,41 +109,30 @@ Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`Desktop
|
||||
|
||||
PipeWire supports a single capture for both screens and windows. If you request the window and screen type, the selected source will be returned as a window capture.
|
||||
|
||||
### macOS versions 14.2 or higher
|
||||
---
|
||||
|
||||
`NSAudioCaptureUsageDescription` Info.plist key must be added in order for audio to be captured by
|
||||
`desktopCapturer`. If instead you are running Electron from another program like a terminal or IDE
|
||||
then that parent program must contain the Info.plist key.
|
||||
### MacOS versions 14.2 or higher
|
||||
|
||||
`NSAudioCaptureUsageDescription` Info.plist key must be added in-order for audio to be captured by `desktopCapturer`. If instead you are running electron from another program like a terminal or IDE then that parent program must contain the Info.plist key.
|
||||
|
||||
This is in order to facillitate use of Apple's new [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps#Configure-the-sample-code-project) by Chromium.
|
||||
|
||||
> [!WARNING]
|
||||
> Failure of `desktopCapturer` to start an audio stream due to `NSAudioCaptureUsageDescription`
|
||||
> permission not present will still create a dead audio stream however no warnings or errors are
|
||||
> displayed.
|
||||
> Failure of `desktopCapturer` to start an audio stream due to `NSAudioCaptureUsageDescription` permission not present will still create a dead audio stream however no warnings or errors are displayed.
|
||||
|
||||
As of Electron `v39.0.0-beta.4`, Chromium [made Apple's new `CoreAudio Tap API` the default](https://source.chromium.org/chromium/chromium/src/+/ad17e8f8b93d5f34891b06085d373a668918255e)
|
||||
for desktop audio capture. There is no fallback to the older `Screen & System Audio Recording`
|
||||
permissions system even if [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps) stream creation fails.
|
||||
As of electron `v39.0.0-beta.4` Chromium [made Apple's new `CoreAudio Tap API` the default](https://source.chromium.org/chromium/chromium/src/+/ad17e8f8b93d5f34891b06085d373a668918255e) for desktop audio capture. There is no fallback to the older `Screen & System Audio Recording` permissions system even if [CoreAudio Tap API](https://developer.apple.com/documentation/CoreAudio/capturing-system-audio-with-core-audio-taps) stream creation fails.
|
||||
|
||||
If you need to continue using `Screen & System Audio Recording` permissions for `desktopCapturer`
|
||||
on macOS versions 14.2 and later, you can apply a Chromium feature flag to force use of that older
|
||||
permissions system:
|
||||
If you need to continue using `Screen & System Audio Recording` permissions for `desktopCapturer` on macOS versions 14.2 and later, you can apply a chromium feature flag to force use of that older permissions system:
|
||||
|
||||
```js
|
||||
// main.js (right beneath your require/import statments)
|
||||
app.commandLine.appendSwitch('disable-features', 'MacCatapLoopbackAudioForScreenShare')
|
||||
```
|
||||
|
||||
### macOS versions 12.7.6 or lower
|
||||
---
|
||||
|
||||
`navigator.mediaDevices.getUserMedia` does not work on macOS versions 12.7.6 and prior for audio
|
||||
capture due to a fundamental limitation whereby apps that want to access the system's audio require
|
||||
a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html).
|
||||
Chromium, and by extension Electron, does not provide this. Only in macOS 13 and onwards does Apple
|
||||
provide APIs to capture desktop audio without the need for a signed kernel extension.
|
||||
### MacOS versions 12.7.6 or lower
|
||||
|
||||
It is possible to circumvent this limitation by capturing system audio with another macOS app like
|
||||
[BlackHole](https://existential.audio/blackhole/) or [Soundflower](https://rogueamoeba.com/freebies/soundflower/)
|
||||
and passing it through a virtual audio input device. This virtual device can then be queried
|
||||
with `navigator.mediaDevices.getUserMedia`.
|
||||
`navigator.mediaDevices.getUserMedia` does not work on macOS versions 12.7.6 and prior for audio capture due to a fundamental limitation whereby apps that want to access the system's audio require a [signed kernel extension](https://developer.apple.com/library/archive/documentation/Security/Conceptual/System_Integrity_Protection_Guide/KernelExtensions/KernelExtensions.html). Chromium, and by extension Electron, does not provide this. Only in macOS 13 and onwards does Apple provide APIs to capture desktop audio without the need for a signed kernel extension.
|
||||
|
||||
It is possible to circumvent this limitation by capturing system audio with another macOS app like [BlackHole](https://existential.audio/blackhole/) or [Soundflower](https://rogueamoeba.com/freebies/soundflower/) and passing it through a virtual audio input device. This virtual device can then be queried with `navigator.mediaDevices.getUserMedia`.
|
||||
|
||||
@@ -18,13 +18,6 @@ The `dialog` module has the following methods:
|
||||
|
||||
### `dialog.showOpenDialogSync([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/16973
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional)
|
||||
@@ -97,15 +90,6 @@ dialog.showOpenDialogSync(mainWindow, {
|
||||
|
||||
### `dialog.showOpenDialog([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/16973
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional)
|
||||
@@ -187,13 +171,6 @@ dialog.showOpenDialog(mainWindow, {
|
||||
|
||||
### `dialog.showSaveDialogSync([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/17054
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional) - The dialog title. Cannot be displayed on some _Linux_ desktop environments.
|
||||
@@ -225,15 +202,6 @@ The `filters` specifies an array of file types that can be displayed, see
|
||||
|
||||
### `dialog.showSaveDialog([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/17054
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional) - The dialog title. Cannot be displayed on some _Linux_ desktop environments.
|
||||
@@ -272,13 +240,6 @@ The `filters` specifies an array of file types that can be displayed, see
|
||||
|
||||
### `dialog.showMessageBoxSync([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/17298
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `message` string - Content of the message box.
|
||||
@@ -322,19 +283,6 @@ If `window` is not shown dialog will not be attached to it. In such case it will
|
||||
|
||||
### `dialog.showMessageBox([window, ]options)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/17298
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
- pr-url: https://github.com/electron/electron/pull/26102
|
||||
description: "Added the `signal` option."
|
||||
- pr-url: https://github.com/electron/electron/pull/30474
|
||||
description: "Added the `textWidth` option."
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `message` string - Content of the message box.
|
||||
@@ -401,17 +349,6 @@ and no GUI dialog will appear.
|
||||
|
||||
### `dialog.showCertificateTrustDialog([window, ]options)` _macOS_ _Windows_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/9099
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/17181
|
||||
description: "This method now returns a Promise instead of using a callback function."
|
||||
breaking-changes-header: api-changed-callback-based-versions-of-promisified-apis
|
||||
```
|
||||
-->
|
||||
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `certificate` [Certificate](structures/certificate.md) - The certificate to trust/import.
|
||||
|
||||
@@ -8,12 +8,6 @@ Process: [Main](../glossary.md#main-process)
|
||||
> If you want to show notifications from a renderer process you should use the
|
||||
> [web Notifications API](../tutorial/notifications.md)
|
||||
|
||||
> [!NOTE]
|
||||
> On MacOS, notifications use the UNNotification API as their underlying framework.
|
||||
> This API requires an application to be code-signed in order for notifications
|
||||
> to appear. Unsigned binaries will emit a `failed` event when notifications
|
||||
> are called.
|
||||
|
||||
## Class: Notification
|
||||
|
||||
> Create OS desktop notifications
|
||||
@@ -36,46 +30,6 @@ The `Notification` class has the following static methods:
|
||||
|
||||
Returns `boolean` - Whether or not desktop notifications are supported on the current system
|
||||
|
||||
#### `Notification.handleActivation(callback)` _Windows_
|
||||
|
||||
* `callback` Function
|
||||
* `details` [ActivationArguments](structures/activation-arguments.md) - Details about the notification activation.
|
||||
|
||||
Registers a callback to handle all notification activations. The callback is invoked whenever a
|
||||
notification is clicked, replied to, or has an action button pressed - regardless of whether
|
||||
the original `Notification` object is still in memory.
|
||||
|
||||
This method handles timing automatically:
|
||||
|
||||
* If an activation already occurred before calling this method, the callback is invoked immediately
|
||||
with those details.
|
||||
* For all subsequent activations, the callback is invoked when they occur.
|
||||
|
||||
The callback remains registered until replaced by another call to `handleActivation`.
|
||||
|
||||
This provides a centralized way to handle notification interactions that works in all scenarios:
|
||||
|
||||
* Cold start (app launched from notification click)
|
||||
* Notifications persisted in AC that have no in-memory representation after app re-start
|
||||
* Notification object was garbage collected
|
||||
* Notification object is still in memory (callback is invoked in addition to instance events)
|
||||
|
||||
```js
|
||||
const { Notification, app } = require('electron')
|
||||
|
||||
app.whenReady().then(() => {
|
||||
// Register handler for all notification activations
|
||||
Notification.handleActivation((details) => {
|
||||
console.log('Notification activated:', details.type)
|
||||
if (details.type === 'reply') {
|
||||
console.log('User reply:', details.reply)
|
||||
} else if (details.type === 'action') {
|
||||
console.log('Action index:', details.actionIndex)
|
||||
}
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
### `new Notification([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
|
||||
@@ -110,8 +110,6 @@ Returns [`Point`](structures/point.md)
|
||||
|
||||
The current absolute position of the mouse pointer.
|
||||
|
||||
Not supported on Wayland (Linux).
|
||||
|
||||
> [!NOTE]
|
||||
> The return value is a DIP point, not a screen physical point.
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
# ActivationArguments Object
|
||||
|
||||
> Used on Windows only.
|
||||
|
||||
* `type` string - The type of activation that launched the app: `'click'`, `'action'`, or `'reply'`.
|
||||
* `arguments` string - The raw activation arguments string from Windows.
|
||||
* `actionIndex` number (optional) - For `'action'` type, the index of the button that was clicked.
|
||||
* `reply` string (optional) - For `'reply'` type, the text the user entered in the reply field.
|
||||
* `userInputs` Record\<string, string\> (optional) - A dictionary of all user inputs from the notification.
|
||||
@@ -19,8 +19,9 @@ This document uses the following convention to categorize breaking changes:
|
||||
Electron has migrated from the deprecated `NSUserNotification` API to the
|
||||
[`UNNotification`](https://developer.apple.com/documentation/usernotifications)
|
||||
API on macOS. The new API requires that an application be code-signed in order
|
||||
for notifications to be displayed. If an application is not code-signed,
|
||||
notifications will emit a `failed` event on the `Notification` object.
|
||||
for notifications to be displayed. If an application is not code-signed
|
||||
(including ad-hoc signed), notifications will fail silently or emit a `failed`
|
||||
event on the `Notification` object.
|
||||
|
||||
### Behavior Changed: Offscreen rendering will use `1.0` as default device scale factor.
|
||||
|
||||
|
||||
@@ -7,7 +7,47 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
## Timeline
|
||||
|
||||
[Electron's Release Schedule](https://releases.electronjs.org/schedule) lists a schedule of Electron major releases showing key milestones including alpha, beta, and stable release dates, as well as end-of-life dates and dependency versions.
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 40.0.0 | 2025-Oct-30 | 2025-Dec-03 | 2026-Jan-13 | 2026-Jun-30 | M144 | TBD | ✅ |
|
||||
| 39.0.0 | 2025-Sep-04 | 2025-Oct-01 | 2025-Oct-28 | 2026-May-05 | M142 | v22.20 | ✅ |
|
||||
| 38.0.0 | 2025-Jun-26 | 2025-Aug-06 | 2025-Sep-02 | 2026-Mar-10 | M140 | v22.18 | ✅ |
|
||||
| 37.0.0 | 2025-May-01 | 2025-May-28 | 2025-Jun-24 | 2026-Jan-13 | M138 | v22.16 | ✅ |
|
||||
| 36.0.0 | 2025-Mar-06 | 2025-Apr-02 | 2025-Apr-29 | 2025-Oct-28 | M136 | v22.14 | 🚫 |
|
||||
| 35.0.0 | 2025-Jan-16 | 2025-Feb-05 | 2025-Mar-04 | 2025-Sep-02 | M134 | v22.14 | 🚫 |
|
||||
| 34.0.0 | 2024-Oct-17 | 2024-Nov-13 | 2025-Jan-14 | 2025-Jun-24 | M132 | v20.18 | 🚫 |
|
||||
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | v20.18 | 🚫 |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | v20.16 | 🚫 |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-14 | M126 | v20.14 | 🚫 |
|
||||
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.11 | 🚫 |
|
||||
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | 🚫 |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | 🚫 |
|
||||
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | 🚫 |
|
||||
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-20 | M116 | v18.16 | 🚫 |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | v18.15 | 🚫 |
|
||||
| 24.0.0 | 2023-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | 🚫 |
|
||||
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-15 | M110 | v18.12 | 🚫 |
|
||||
| 22.0.0 | 2022-Sep-29 | 2022-Oct-25 | 2022-Nov-29 | 2023-Oct-10 | M108 | v16.17 | 🚫 |
|
||||
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | 2023-Apr-04 | M106 | v16.16 | 🚫 |
|
||||
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | 2023-Feb-07 | M104 | v16.15 | 🚫 |
|
||||
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | 2022-Nov-29 | M102 | v16.14 | 🚫 |
|
||||
| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | 2022-Sep-27 | M100 | v16.13 | 🚫 |
|
||||
| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | 2022-Aug-02 | M98 | v16.13 | 🚫 |
|
||||
| 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | 2022-May-24 | M96 | v16.9 | 🚫 |
|
||||
| 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | 2022-May-24 | M94 | v16.5 | 🚫 |
|
||||
| 14.0.0 | -- | 2021-May-27 | 2021-Aug-31 | 2022-Mar-29 | M93 | v14.17 | 🚫 |
|
||||
| 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | 2022-Feb-01 | M91 | v14.16 | 🚫 |
|
||||
| 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | 2021-Nov-16 | M89 | v14.16 | 🚫 |
|
||||
| 11.0.0 | -- | 2020-Aug-27 | 2020-Nov-17 | 2021-Aug-31 | M87 | v12.18 | 🚫 |
|
||||
| 10.0.0 | -- | 2020-May-21 | 2020-Aug-25 | 2021-May-25 | M85 | v12.16 | 🚫 |
|
||||
| 9.0.0 | -- | 2020-Feb-06 | 2020-May-19 | 2021-Mar-02 | M83 | v12.14 | 🚫 |
|
||||
| 8.0.0 | -- | 2019-Oct-24 | 2020-Feb-04 | 2020-Nov-17 | M80 | v12.13 | 🚫 |
|
||||
| 7.0.0 | -- | 2019-Aug-01 | 2019-Oct-22 | 2020-Aug-25 | M78 | v12.8 | 🚫 |
|
||||
| 6.0.0 | -- | 2019-Apr-25 | 2019-Jul-30 | 2020-May-19 | M76 | v12.14.0 | 🚫 |
|
||||
| 5.0.0 | -- | 2019-Jan-22 | 2019-Apr-23 | 2020-Feb-04 | M73 | v12.0 | 🚫 |
|
||||
| 4.0.0 | -- | 2018-Oct-11 | 2018-Dec-20 | 2019-Oct-22 | M69 | v10.11 | 🚫 |
|
||||
| 3.0.0 | -- | 2018-Jun-21 | 2018-Sep-18 | 2019-Jul-30 | M66 | v10.2 | 🚫 |
|
||||
| 2.0.0 | -- | 2018-Feb-21 | 2018-May-01 | 2019-Apr-23 | M61 | v8.9 | 🚫 |
|
||||
|
||||
:::info Official support dates may change
|
||||
|
||||
|
||||
@@ -142,12 +142,8 @@ notification away.
|
||||
|
||||
### macOS
|
||||
|
||||
For notifications on macOS, your application will need to be code-signed in order
|
||||
for notification events to emit correctly. This requirement stems from the underlying
|
||||
UNNotification API provided by Apple. Unsigned binaries will emit a `failed` event
|
||||
when notification APIs are called.
|
||||
|
||||
Additionally, you should be aware of [Apple's Human Interface guidelines regarding notifications][apple-notification-guidelines].
|
||||
Notifications are straightforward on macOS, but you should be aware of
|
||||
[Apple's Human Interface guidelines regarding notifications][apple-notification-guidelines].
|
||||
|
||||
Note that notifications are limited to 256 bytes in size and will be truncated
|
||||
if you exceed that limit.
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
const binding = process._linkedBinding('electron_browser_notification');
|
||||
const {
|
||||
Notification: ElectronNotification,
|
||||
isSupported
|
||||
} = process._linkedBinding('electron_browser_notification');
|
||||
|
||||
const ElectronNotification = binding.Notification;
|
||||
ElectronNotification.isSupported = binding.isSupported;
|
||||
|
||||
if (process.platform === 'win32' && binding.handleActivation) {
|
||||
ElectronNotification.handleActivation = binding.handleActivation;
|
||||
}
|
||||
ElectronNotification.isSupported = isSupported;
|
||||
|
||||
export default ElectronNotification;
|
||||
|
||||
@@ -8,19 +8,13 @@ const {
|
||||
isOnBatteryPower
|
||||
} = process._linkedBinding('electron_browser_power_monitor');
|
||||
|
||||
// Hold the native PowerMonitor at module level so it is never garbage-collected
|
||||
// while this module is alive. The C++ side registers OS-level callbacks (HWND
|
||||
// user-data on Windows, shutdown handler on macOS, notification observers) that
|
||||
// prevent safe collection of the C++ wrapper while those registrations exist.
|
||||
let pm: any;
|
||||
|
||||
class PowerMonitor extends EventEmitter implements Electron.PowerMonitor {
|
||||
constructor () {
|
||||
super();
|
||||
// Don't start the event source until both a) the app is ready and b)
|
||||
// there's a listener registered for a powerMonitor event.
|
||||
this.once('newListener', () => {
|
||||
pm = createPowerMonitor();
|
||||
const pm = createPowerMonitor();
|
||||
pm.emit = this.emit.bind(this);
|
||||
|
||||
if (process.platform === 'linux') {
|
||||
|
||||
@@ -19,8 +19,8 @@ export function invokeInWebContents<T> (sender: Electron.WebContents, command: s
|
||||
const requestId = ++nextId;
|
||||
const channel = `${command}_RESPONSE_${requestId}`;
|
||||
ipcMainInternal.on(channel, function handler (event, error: Error, result: any) {
|
||||
if (event.type !== 'frame' || event.sender !== sender) {
|
||||
console.error(`Reply to ${command} sent by unexpected sender`);
|
||||
if (event.type === 'frame' && event.sender !== sender) {
|
||||
console.error(`Reply to ${command} sent by unexpected WebContents (${event.sender.id})`);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,8 @@ export function invokeInWebFrameMain<T> (sender: Electron.WebFrameMain, command:
|
||||
const channel = `${command}_RESPONSE_${requestId}`;
|
||||
const frameTreeNodeId = sender.frameTreeNodeId;
|
||||
ipcMainInternal.on(channel, function handler (event, error: Error, result: any) {
|
||||
if (event.type !== 'frame' || event.frameTreeNodeId !== frameTreeNodeId) {
|
||||
console.error(`Reply to ${command} sent by unexpected sender`);
|
||||
if (event.type === 'frame' && event.frameTreeNodeId !== frameTreeNodeId) {
|
||||
console.error(`Reply to ${command} sent by unexpected WebFrameMain (${event.frameTreeNodeId})`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -23,14 +23,11 @@ export default contextBridge;
|
||||
|
||||
export const internalContextBridge = {
|
||||
contextIsolationEnabled: process.contextIsolated,
|
||||
tryOverrideGlobalValueFromIsolatedWorld: (keys: string[], value: any) => {
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, true, true);
|
||||
},
|
||||
overrideGlobalValueFromIsolatedWorld: (keys: string[], value: any) => {
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, false, false);
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, false);
|
||||
},
|
||||
overrideGlobalValueWithDynamicPropsFromIsolatedWorld: (keys: string[], value: any) => {
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, true, false);
|
||||
return binding._overrideGlobalValueFromIsolatedWorld(keys, value, true);
|
||||
},
|
||||
overrideGlobalPropertyFromIsolatedWorld: (keys: string[], getter: Function, setter?: Function) => {
|
||||
return binding._overrideGlobalPropertyFromIsolatedWorld(keys, getter, setter || null);
|
||||
|
||||
@@ -11,12 +11,14 @@ const { contextIsolationEnabled } = internalContextBridge;
|
||||
* 1) Use menu API to show context menu.
|
||||
*/
|
||||
window.onload = function () {
|
||||
if (contextIsolationEnabled) {
|
||||
internalContextBridge.tryOverrideGlobalValueFromIsolatedWorld([
|
||||
'InspectorFrontendHost', 'showContextMenuAtPoint'
|
||||
], createMenu);
|
||||
} else {
|
||||
window.InspectorFrontendHost!.showContextMenuAtPoint = createMenu;
|
||||
if (window.InspectorFrontendHost) {
|
||||
if (contextIsolationEnabled) {
|
||||
internalContextBridge.overrideGlobalValueFromIsolatedWorld([
|
||||
'InspectorFrontendHost', 'showContextMenuAtPoint'
|
||||
], createMenu);
|
||||
} else {
|
||||
window.InspectorFrontendHost.showContextMenuAtPoint = createMenu;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -147,4 +147,3 @@ refactor_allow_customizing_config_in_freedesktopsecretkeyprovider.patch
|
||||
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
|
||||
|
||||
@@ -23,10 +23,10 @@ index 8077ed85e45e56d6cccb691223216c1f6a94b5ee..dd4cee346f16df703d414bf206bbe6c9
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 60661707197f972da2f6ee0718a344581da529cf..e4cb58ffaaeb9de75ec9658819f7305760fff9cb 100644
|
||||
index 415b2bf329db639e4d3732c290b055aa6b5825de..1b841c1df51abb0e0ec1b86a237dd73283083a37 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4759,6 +4759,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4762,6 +4762,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -79,10 +79,10 @@ index 851e792c6c6f26b6074ffe8b0ba39a5813fabacc..8bd06f4c155cc0ed8afaf89347f9fc97
|
||||
if (World().IsMainWorld()) {
|
||||
probe::DidCreateMainWorldContext(GetFrame());
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 52cc48e0099ded3686c6fc056514b6446afcae5d..a6331653b0aaf30cedba6ff6df787aa944142ac4 100644
|
||||
index 47dd48bd495f89f2dd3528053d9b6446df264c7c..ee43008b2bec7ea013cbbe7a782aa0a38e1acd02 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -309,6 +309,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -311,6 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,7 +92,7 @@ index 52cc48e0099ded3686c6fc056514b6446afcae5d..a6331653b0aaf30cedba6ff6df787aa9
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index ebf1c82da02efbe73f1bb7b20cb1011c1bd7a335..26410fc221baf1fadb6220eb653c651b47fb3da7 100644
|
||||
index 294c9ec4bfb788235be8047eb3174d7dcc97bdfb..6ab8ec1924a76f51d6e390d9457c596f9b0d8453 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -301,6 +301,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,10 +110,10 @@ index ebf1c82da02efbe73f1bb7b20cb1011c1bd7a335..26410fc221baf1fadb6220eb653c651b
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index 9bdfacfc0270bf4ac3a965f6308e4cfc19193f4f..ea9e16b6dd6c96333c653fc602edfbd84cd9e5de 100644
|
||||
index e7b822d45d608a78009576c2a299201014dd93ec..54be144d5b24b369e12d551e6c15d2d85fa8b8c3 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
@@ -123,10 +123,10 @@ index 9bdfacfc0270bf4ac3a965f6308e4cfc19193f4f..ea9e16b6dd6c96333c653fc602edfbd8
|
||||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index b1f17f3abd6763deaee274dd41693f0e6e420865..1e844f4709bc9e616711f717b4a79daf26c561fd 100644
|
||||
index ea958f895ca355680a44ed1257c2c9918be361f9..6e8016c02930af2751d6e9b6ed00b8026f6c3b20 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -423,6 +423,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -425,6 +425,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
index c33775220e161d38e41efe8fea897815737341f8..e9636b69a8eb748aaa493466c3190ec602e16449 100644
|
||||
index 497c23b182d9288950ff54b4c70bdb0fbe80f91b..7e2839bf619ce3c0b88b33b1df2032672292fe06 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -23,10 +23,10 @@ index c33775220e161d38e41efe8fea897815737341f8..e9636b69a8eb748aaa493466c3190ec6
|
||||
return receiver_.BindNewEndpointAndPassDedicatedRemote();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 4e63b70ed936dc675a0a38bc9b53477b867735aa..3587150432068e1c75b3da9a4108c51d47d48127 100644
|
||||
index b8193571d0a3b7609e89b284f57a9cbf36d593e0..0d42b04031006b844d5a2a2b73241d2b7e2fb93d 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -757,6 +757,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -759,6 +759,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
|
||||
@@ -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 d1928b0e0a22a61fdaa36b0bb8992b3c4e5bffdd..ccfff39476e867885eed383a1d0f455389ab7eec 100644
|
||||
index 841f86703907d2377345e14d4b5463545fe3709c..e3eb80fcc477d65cdd314328b8f85704d9aa1a66 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -778,10 +778,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -33,10 +33,10 @@ index 4b1fd316496e33f9e805aec89a91062587e6ee16..1b6fce9e2780a37e1e8bf3f8a62dc6bc
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index d9942ad11f3497f2870c1a4e5fd63fa3706a496c..19f58acab5d3c3eba98e9492a387cd9798c9172c 100644
|
||||
index 7a5e54470366e02c756a07782d82ee96a27eb453..e079f00f071982ca68cbc4331ef28f5bc6116abe 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4660,7 +4660,7 @@ static_library("browser") {
|
||||
@@ -4641,7 +4641,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index d9942ad11f3497f2870c1a4e5fd63fa3706a496c..19f58acab5d3c3eba98e9492a387cd97
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 559ebea3d099b71df92b644e78786cf086856633..6622bc9dec05351646ceef70b031b1242e2c0e83 100644
|
||||
index 4520fa090ce5829b5c64cded322143cd8fcc4e6e..9755dabce767465e1c6b2cf8b0cf6ba91ea3073b 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7785,9 +7785,12 @@ test("unit_tests") {
|
||||
@@ -7804,9 +7804,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index 559ebea3d099b71df92b644e78786cf086856633..6622bc9dec05351646ceef70b031b124
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8780,6 +8783,10 @@ test("unit_tests") {
|
||||
@@ -8792,6 +8795,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index 559ebea3d099b71df92b644e78786cf086856633..6622bc9dec05351646ceef70b031b124
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8837,7 +8844,6 @@ test("unit_tests") {
|
||||
@@ -8849,7 +8856,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",
|
||||
|
||||
@@ -15,7 +15,7 @@ References:
|
||||
* third_party/libc++/src/include/__configuration/abi.h
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
|
||||
index 8e1fb11322711b10256b3eaf5f0c30dabd18ff4f..5b26dbaf522b7f95ccdf4b40573db69b22603235 100644
|
||||
index 3cd0af88fd13613216464d31d04e26dbb8f61343..218cfaf258ebc55e4d332c67abd02b5b1ad2ba19 100644
|
||||
--- a/buildtools/third_party/libc++/__config_site
|
||||
+++ b/buildtools/third_party/libc++/__config_site
|
||||
@@ -18,7 +18,11 @@
|
||||
|
||||
@@ -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 4071923717092ce31fa8031184af71af089588ce..270e221668e27207970c2e131432d2efa7038a75 100644
|
||||
index b5cd09da713c37a45fcbc046f3aef8828fa51c9f..0b8a68977fc4dc7d1989197779016402f92f5e7d 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -10019,6 +10019,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -10017,6 +10017,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,
|
||||
@@ -21,7 +21,7 @@ index 4071923717092ce31fa8031184af71af089588ce..270e221668e27207970c2e131432d2ef
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 5106dc268e7ade5b89198f641b0a17902b87e951..cbd5c331e801445bd1ab0984776231a2a648a29a 100644
|
||||
index 64bc568b6ee9ac47588358bc4120a3a5646a24a7..003a171003baacb024cebf58b4957eb6979fda8e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5377,6 +5377,10 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -77,7 +77,7 @@ index ecfe129905639e9b7a5ed973017539cfaec9c2af..39308fa42e57b2dfba91aaa6f33d1a0b
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 3a7c61028412a84e3b96f689dd56b7f161afbb94..5eec6acbb6fa94ca9d7ee1324a7fdb62de8aa42f 100644
|
||||
index 3b7e54501698aeb6310780dd81ae23fa193a8edb..99cc391e52b6a8acd8083cffa2deb0bb725f1a4a 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -868,6 +868,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -90,7 +90,7 @@ index 3a7c61028412a84e3b96f689dd56b7f161afbb94..5eec6acbb6fa94ca9d7ee1324a7fdb62
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index bf77fbd24b051eb029fa283a1fa82f4995fb6d02..ec1bb0fec53be50236dcdddd5b09db01fdad3f4c 100644
|
||||
index 9fb362f1924868a486ec7e51ce31aef2f6931b0d..03372a5dad8cfe5f3866a4501293cd436e3f34af 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -205,6 +205,7 @@ class NetworkService;
|
||||
@@ -170,10 +170,10 @@ index 0650197909d484b8a0f48ab61b22471c71bce0e8..29c380d7845aab1a7b3417e0d3940ea0
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 2cf52ebc1ce7c469855554c83a07c4ef3d8aff57..60661707197f972da2f6ee0718a344581da529cf 100644
|
||||
index 6dfc8a618a4e454f5a25f8b188f09d0bc2662679..415b2bf329db639e4d3732c290b055aa6b5825de 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6844,6 +6844,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6854,6 +6854,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
params->started_by_ad =
|
||||
GetWebFrame()->IsAdFrame() || GetWebFrame()->IsAdScriptInStack();
|
||||
|
||||
@@ -224,10 +224,10 @@ 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 cbc875cf147d4cd76ceb6e769e1ad17f992bc6ca..dfbc59e40438c378b87df8e0ea64a08ae877b817 100644
|
||||
index 4f167a3dcd36f837415bda493ddd59a34db95049..373d601544c4218f972fca7a170e3b26d82e1b3d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2329,6 +2329,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2328,6 +2328,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ where callsites that deal with multiple contexts need to distinguish
|
||||
the current isolate.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index be73f8a82ec031899cfaa7a7ddcf9e0170d187ad..09ca1f311b68a195f52a90aa375e7ea83bd439fa 100644
|
||||
index a0a6c6815c553ca6a50c49f52ad45055a94fc221..53b8af297ff32de254b51cd534e08d59f6215952 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -388,6 +388,7 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -34,10 +34,10 @@ index dd4cee346f16df703d414bf206bbe6c9f4b1f796..5565f5a9259bd7da0722080bf01b3415
|
||||
virtual void DidClearWindowObject() {}
|
||||
virtual void DidChangeScrollOffset() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index e4cb58ffaaeb9de75ec9658819f7305760fff9cb..25c04e67478865344d0b1291f6a584324d8d2fa8 100644
|
||||
index 1b841c1df51abb0e0ec1b86a237dd73283083a37..d449c494ce099f069c5dadebd5db921733358720 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4765,10 +4765,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
@@ -4768,10 +4768,11 @@ void RenderFrameImpl::DidInstallConditionalFeatures(
|
||||
observer.DidInstallConditionalFeatures(context, world_id);
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index ced097d57cec93b3d3062a6d7d9f7d037a355e6c..c08b9323175e5ec62203fa74d93a307a
|
||||
void DidChangeScrollOffset() override;
|
||||
blink::WebMediaStreamDeviceObserver* MediaStreamDeviceObserver() override;
|
||||
diff --git a/content/renderer/service_worker/service_worker_context_client.cc b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
index 4ccae569b496608901a3c634a3ac41de5d0bf3e8..332f2d2bc690de8f5e9787ba22ad268a21781b95 100644
|
||||
index cf553bbee806209f05c4a4fc995223f3f1faaa36..d4fd7835eeffc25d655bc0506120bf64c4a61db0 100644
|
||||
--- a/content/renderer/service_worker/service_worker_context_client.cc
|
||||
+++ b/content/renderer/service_worker/service_worker_context_client.cc
|
||||
@@ -319,6 +319,7 @@ void ServiceWorkerContextClient::WorkerContextStarted(
|
||||
@@ -103,7 +103,7 @@ index 8482d7fab12634e6b9a8d5f9bab6c7e428bb99ee..4f131fbfc9350352bce4430f92b9f2cf
|
||||
void WillInitializeWorkerContext() override;
|
||||
void WillDestroyWorkerContext(v8::Local<v8::Context> context) override;
|
||||
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc
|
||||
index ae561f1b8555a93bf42efc0c93b89ba19c505f36..4fa04862fa3bed662dbc92422dfd1c7e808e74ba 100644
|
||||
index a81321462422d3a91f72c51131520710e6909814..9dbdb8e844e567a4043ca61c627d93341897bae0 100644
|
||||
--- a/extensions/renderer/dispatcher.cc
|
||||
+++ b/extensions/renderer/dispatcher.cc
|
||||
@@ -530,6 +530,7 @@ void Dispatcher::DidInitializeServiceWorkerContextOnWorkerThread(
|
||||
@@ -115,7 +115,7 @@ index ae561f1b8555a93bf42efc0c93b89ba19c505f36..4fa04862fa3bed662dbc92422dfd1c7e
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
diff --git a/extensions/renderer/dispatcher.h b/extensions/renderer/dispatcher.h
|
||||
index a3445e12264a410dd9d8ba8459c2e27851b03144..271eb740ebf29445a2f1ace81b84d37597a75809 100644
|
||||
index f5786a8e321d08b9e1cd008f797d5a4bcac791db..9e71d645ac1cb5c52a102f9f4ab539715b30d546 100644
|
||||
--- a/extensions/renderer/dispatcher.h
|
||||
+++ b/extensions/renderer/dispatcher.h
|
||||
@@ -151,6 +151,7 @@ class Dispatcher : public content::RenderThreadObserver,
|
||||
@@ -200,10 +200,10 @@ index 8bd06f4c155cc0ed8afaf89347f9fc9728bb1e41..85ae42670cc038e18e4a0ea05e3de25c
|
||||
->ContextWillBeDestroyed(script_state_);
|
||||
if (next_status == Lifecycle::kV8MemoryIsForciblyPurged ||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index a6331653b0aaf30cedba6ff6df787aa944142ac4..434376be228962e08f49fbfc3b81e8f79557301c 100644
|
||||
index ee43008b2bec7ea013cbbe7a782aa0a38e1acd02..2352aeaad71be960729e74305ed665583b15ed70 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -311,7 +311,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -313,7 +313,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
int32_t world_id) = 0;
|
||||
virtual void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -214,7 +214,7 @@ index a6331653b0aaf30cedba6ff6df787aa944142ac4..434376be228962e08f49fbfc3b81e8f7
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 26410fc221baf1fadb6220eb653c651b47fb3da7..462a581f4acb44e44a65cb163a1530e57c903e8f 100644
|
||||
index 6ab8ec1924a76f51d6e390d9457c596f9b0d8453..42f6281a44de055e964acbfbf20041ffa1fca592 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -309,10 +309,11 @@ void LocalFrameClientImpl::DidInstallConditionalFeatures(
|
||||
@@ -231,10 +231,10 @@ index 26410fc221baf1fadb6220eb653c651b47fb3da7..462a581f4acb44e44a65cb163a1530e5
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index ea9e16b6dd6c96333c653fc602edfbd84cd9e5de..78c7c3a446a531fb7c77813f4cae45546c868561 100644
|
||||
index 54be144d5b24b369e12d551e6c15d2d85fa8b8c3..0ddb1e0730618bba73e54c2618930355fcf6dc19 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -80,7 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -82,7 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
int32_t world_id) override;
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
@@ -245,10 +245,10 @@ index ea9e16b6dd6c96333c653fc602edfbd84cd9e5de..78c7c3a446a531fb7c77813f4cae4554
|
||||
|
||||
// Returns true if we should allow register V8 extensions to be added.
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index 1e844f4709bc9e616711f717b4a79daf26c561fd..3e22bc128660e8de8e4198bf26e78af7161e811f 100644
|
||||
index 6e8016c02930af2751d6e9b6ed00b8026f6c3b20..8064cc5d5e59bdce6f4115550d56d57568f330a0 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -425,7 +425,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -427,7 +427,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
int32_t world_id) override {}
|
||||
void DidInstallConditionalFeatures(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -10,10 +10,10 @@ Subject: chore: "grandfather in" Electron Views and Delegates
|
||||
6448510: Lock further access to View::set_owned_by_client(). | https://chromium-review.googlesource.com/c/chromium/src/+/6448510
|
||||
|
||||
diff --git a/ui/views/view.h b/ui/views/view.h
|
||||
index 97c8014fadf2231321c05a1f74d91418946bf9fc..5263aaef4498ae7a19842dd3eb90a09629c28f28 100644
|
||||
index d410372741fbe404a37ada06118c351a9480e564..3c81a2dc067789a58cc9e9d3b8cad783bc66827d 100644
|
||||
--- a/ui/views/view.h
|
||||
+++ b/ui/views/view.h
|
||||
@@ -77,6 +77,19 @@ class ArcNotificationContentView;
|
||||
@@ -78,6 +78,19 @@ class ArcNotificationContentView;
|
||||
class WideFrameView;
|
||||
} // namespace ash
|
||||
|
||||
@@ -33,7 +33,7 @@ index 97c8014fadf2231321c05a1f74d91418946bf9fc..5263aaef4498ae7a19842dd3eb90a096
|
||||
namespace exo {
|
||||
class ShellSurfaceBase;
|
||||
}
|
||||
@@ -308,6 +321,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
@@ -309,6 +322,14 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
|
||||
public:
|
||||
class OwnedByClientPassKey {
|
||||
private:
|
||||
|
||||
@@ -34,10 +34,10 @@ index cc3f9bc9383f8272a5cd95b1f2ac56529d86e493..5ca29b84cdaf42ef516ef819ae32b230
|
||||
|
||||
class ScrollEvent;
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 31060227432ab705c4f2c4c52233f2f23d860124..ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f 100644
|
||||
index 32d4b00eafcf534e806a0be65143d61270ba9317..ca91b370065b91f12764e188bb786b54ea45bcf3 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1405,6 +1405,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
@@ -1382,6 +1382,10 @@ HBRUSH DesktopWindowTreeHostWin::GetBackgroundPaintBrush() {
|
||||
return background_paint_brush_;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ track down the source of this problem & figure out if we can fix it
|
||||
by changing something in Electron.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index e4b50b13b686e4c89ca6e678fb78952a4d347c37..6dde94189fcff81a759bc73351f37b97fa39a9ee 100644
|
||||
index eea41c61ebe2ee40de3254b0fa361f2adb7e6442..d43c96dd6d2ecc180bbb7da5a3a96f8ccfd5b9c9 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5348,7 +5348,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -80,10 +80,10 @@ 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 dd77f2fda3db2e7974003085a22981cad3f6c794..793b0d4d0d03f42a7c646bed931969e4b29d2891 100644
|
||||
index db5adeae34543c2a17a1bb499ae367044e6d318a..b34d3763862ffc87f4d548fc79b05151dca09ebb 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2292,7 +2292,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2293,7 +2293,8 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
const std::string& frame_name,
|
||||
@@ -93,7 +93,7 @@ index dd77f2fda3db2e7974003085a22981cad3f6c794..793b0d4d0d03f42a7c646bed931969e4
|
||||
if (HasActorTaskPreventingNewWebContents(profile(), opener)) {
|
||||
// If an ExecutionEngine is acting on the opener, prevent it from creating a
|
||||
// new WebContents. We'll instead force the navigation to happen in the same
|
||||
@@ -2305,7 +2306,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2306,7 +2307,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
return (window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
@@ -103,10 +103,10 @@ index dd77f2fda3db2e7974003085a22981cad3f6c794..793b0d4d0d03f42a7c646bed931969e4
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index e92caadbec713996d7eb0af9e59ed4a3f14ea148..fe904aaa2ee0f94d3ff34174bac82464dfded91a 100644
|
||||
index bc20c6322289d13937a00255d63f026182b16c5c..d6ed05574d5fac21861346ed2c89875e49ecd30c 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -916,8 +916,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -915,8 +915,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -159,10 +159,10 @@ index 783d05c39ecbe5e556af2e5fd8b4f30fb5aa1196..e1895bcf9d3c6818aa64b1479774a143
|
||||
}
|
||||
content::WebContents* CreateCustomWebContents(
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
index a82c39208a2709d9e292dac5c89bd2c9bf529a98..d578299501e15815ac615528610889d270aaf6ad 100644
|
||||
index 6e3bab760b4a5156870c792782f499a4eff69eb8..763daa00d3cacb4530bf0e465888f9659bce6b5a 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -214,15 +214,14 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -207,15 +207,14 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -181,10 +181,10 @@ index a82c39208a2709d9e292dac5c89bd2c9bf529a98..d578299501e15815ac615528610889d2
|
||||
java_gurl);
|
||||
}
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
index 5754a774852d53a99d34568d0b98aa19171add2a..a75d85c97a75fffa5dba6ac427d7608e345c02ef 100644
|
||||
index c6d4d6aa57edf3a89ae0b1df0bb919fb183e772c..a0ae9f1dfaf4e69e14dc0af52f849e83d3927708 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -223,7 +223,7 @@ index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c5
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index db4f2316ba98a0ced74a303390fee16d0050eee6..861720198a3cbfe198ec328f899cdb6d0fcafdf7 100644
|
||||
index fbf9cc5bcf24533a10c6738a04d0c12eb472af79..5a331960133112c3dd78af932012946f97e423a1 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5312,8 +5312,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -11,10 +11,10 @@ not need this dependency.
|
||||
refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603
|
||||
|
||||
diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn
|
||||
index 6fff64b1b670e44f9222e26643d1a3ebfed67344..2d7e0ef167f47cf032dbad8cff5d6be72e130be0 100644
|
||||
index db1a2f393af2b561cb7d13861bc37f81ab3227c8..d371808e1e59e2dbb2da8790a2212cc001caa772 100644
|
||||
--- a/chrome/browser/ui/color/BUILD.gn
|
||||
+++ b/chrome/browser/ui/color/BUILD.gn
|
||||
@@ -89,9 +89,6 @@ source_set("mixers") {
|
||||
@@ -87,9 +87,6 @@ source_set("mixers") {
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -79,10 +79,10 @@ index 8c318a31454c57b0e8db3770a36c45be427f053c..6f809c9672448ed9797e3c9da492ad2c
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 136e728c4c7981c9180304a43d75b2f003161664..aef4af8ce2a3352535a1ea2f4777e839c4811817 100644
|
||||
index 6b7dffe9c65ee04787a0dbc39d8d055c4daf0582..e63c8e92e3d8ae1ff0bec37e614ca8ed989b21e4 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -634,8 +634,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -646,8 +646,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -92,7 +92,7 @@ index 136e728c4c7981c9180304a43d75b2f003161664..aef4af8ce2a3352535a1ea2f4777e839
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/40558459): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -644,10 +643,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -656,10 +655,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File 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 5dc2d7c4405eb32ea697c28c4c79a3da3d1d7ff2..0e71782c946029113b2da9989521cb06fbce11be 100644
|
||||
index 6436665d3084164ebe3ac2896c462360558a8d74..78a0b8b71f4fc31798bcb1dc89fe10480f19967b 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1950,6 +1950,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1941,6 +1941,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -38,7 +38,7 @@ index 5dc2d7c4405eb32ea697c28c4c79a3da3d1d7ff2..0e71782c946029113b2da9989521cb06
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1969,9 +1989,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1960,9 +1980,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme() == kChromeUIScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
@@ -49,7 +49,7 @@ index 5dc2d7c4405eb32ea697c28c4c79a3da3d1d7ff2..0e71782c946029113b2da9989521cb06
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -1979,9 +1997,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1970,9 +1988,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index c9edcfeb4df4a52dd744b43f04ff1675f566a620..31060227432ab705c4f2c4c52233f2f23d860124 100644
|
||||
index 8e2a68ffa63776c3782b1503b76a7f1845651e54..32d4b00eafcf534e806a0be65143d61270ba9317 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -638,7 +638,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -619,7 +619,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(
|
||||
const gfx::SizeF& aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index ce9c92a5ff2568baba932133c5d9430405d6d10b..063c91ef413a91e047cb52fea04e8fdb73e861ee 100644
|
||||
index 70204038a0f4f12f5b469c3975dcdde544990283..e861aedcf9f90a17b9b8caec1db7e940cdcb76b2 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1926,6 +1926,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1880,6 +1880,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index ce9c92a5ff2568baba932133c5d9430405d6d10b..063c91ef413a91e047cb52fea04e8fdb
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index f11fbd0c31ef0a160133d12beddbbfb0b5195afe..46d56af320bda5e0204c023d78533fd3a77e356e 100644
|
||||
index 4b03933f18e1556c397290b0492110ce5fecaa00..1b55290b129e833fd94db97b0a489fae751d7c7e 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -322,6 +322,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -321,6 +321,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void SetNetworkConditions(
|
||||
const base::UnguessableToken& throttling_profile_id,
|
||||
std::vector<mojom::MatchedNetworkConditionsPtr> conditions) override;
|
||||
@@ -63,10 +63,10 @@ index f11fbd0c31ef0a160133d12beddbbfb0b5195afe..46d56af320bda5e0204c023d78533fd3
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index daae87e4794a3a15f95c600721d1c25f6360bcd4..7dbc3878f18f12d0433172d7aca50692e951fbe6 100644
|
||||
index 91964a97001d05ce2fd1c881efe896bf1b12b1ab..3cd621ecd8322c8a9dce9f8eeae45bbbeaf27940 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1294,6 +1294,9 @@ interface NetworkContext {
|
||||
@@ -1276,6 +1276,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
array<MatchedNetworkConditions> conditions);
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ index f076d0f783e2c0f6b5444002f756001adf2729bd..a03d99f929e2d354cdba969567d78156
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool EscapeVirtualization(const base::FilePath& user_data_dir);
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b3092079464a4d5430 100644
|
||||
index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..0c423610fc2c5514693d33b527088cf839a404f2 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -619,6 +619,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
@@ -106,41 +106,22 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946
|
||||
const size_t kMinMessageLength = kStartToken.length() + 4;
|
||||
if (bytes_read_ < kMinMessageLength) {
|
||||
buf_[bytes_read_] = 0;
|
||||
@@ -745,10 +751,45 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
@@ -745,10 +751,26 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
tokens.erase(tokens.begin());
|
||||
tokens.erase(tokens.begin());
|
||||
|
||||
+ size_t num_args;
|
||||
+ if (!base::StringToSizeT(tokens[0], &num_args) ||
|
||||
+ num_args > tokens.size() - 1) {
|
||||
+ LOG(ERROR) << "Invalid num_args in socket message";
|
||||
+ CleanupAndDeleteSelf();
|
||||
+ return;
|
||||
+ }
|
||||
+ std::vector<std::string> command_line(tokens.begin() + 1,
|
||||
+ tokens.begin() + 1 + num_args);
|
||||
+ base::StringToSizeT(tokens[0], &num_args);
|
||||
+ std::vector<std::string> command_line(tokens.begin() + 1, tokens.begin() + 1 + num_args);
|
||||
+
|
||||
+ std::vector<uint8_t> additional_data;
|
||||
+ // After consuming [num_args, argv...], two more tokens are needed for
|
||||
+ // additional data: [size, payload]. Subtract to avoid overflow when
|
||||
+ // num_args is large.
|
||||
+ if (tokens.size() - 1 - num_args >= 2) {
|
||||
+ if (tokens.size() >= 3 + num_args) {
|
||||
+ size_t additional_data_size;
|
||||
+ if (!base::StringToSizeT(tokens[1 + num_args], &additional_data_size)) {
|
||||
+ LOG(ERROR) << "Invalid additional_data_size in socket message";
|
||||
+ CleanupAndDeleteSelf();
|
||||
+ return;
|
||||
+ }
|
||||
+ base::StringToSizeT(tokens[1 + num_args], &additional_data_size);
|
||||
+ std::string remaining_args = base::JoinString(
|
||||
+ base::span(tokens).subspan(2 + num_args),
|
||||
+ std::string(1, kTokenDelimiter));
|
||||
+ if (additional_data_size > remaining_args.size()) {
|
||||
+ LOG(ERROR) << "additional_data_size exceeds payload length";
|
||||
+ CleanupAndDeleteSelf();
|
||||
+ return;
|
||||
+ }
|
||||
+ const auto adspan =
|
||||
+ base::as_byte_span(remaining_args).first(additional_data_size);
|
||||
+ const auto adspan = base::as_byte_span(remaining_args).first(additional_data_size);
|
||||
+ additional_data.assign(adspan.begin(), adspan.end());
|
||||
+ }
|
||||
+
|
||||
@@ -153,7 +134,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946
|
||||
fd_watch_controller_.reset();
|
||||
|
||||
// LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader
|
||||
@@ -777,8 +818,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
@@ -777,8 +799,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
//
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const base::FilePath& user_data_dir,
|
||||
@@ -164,7 +145,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946
|
||||
current_pid_(base::GetCurrentProcId()) {
|
||||
socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename);
|
||||
lock_path_ = user_data_dir.Append(chrome::kSingletonLockFilename);
|
||||
@@ -899,7 +942,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -899,7 +923,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
sizeof(socket_timeout));
|
||||
|
||||
// Found another process, prepare our command line
|
||||
@@ -174,7 +155,7 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946
|
||||
std::string to_send(kStartToken);
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
|
||||
@@ -909,11 +953,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -909,11 +934,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
to_send.append(current_dir.value());
|
||||
|
||||
const std::vector<std::string>& argv = cmd_line.argv();
|
||||
@@ -197,18 +178,10 @@ index 5a88dfda5eb2c4bf5b547a76eef81b530f3ea96e..1204affca14f73d84b57c1b309207946
|
||||
if (!WriteToSocket(socket.fd(), to_send)) {
|
||||
// Try to kill the other process, because it might have been dead.
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fcaa5f2c2ff 100644
|
||||
index ae659d84a5ae2f2e87ce288477506575f8d86839..d93c7e8487ab1a2bbb5f56f2ca44868f947e6bfc 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <shellapi.h>
|
||||
#include <stddef.h>
|
||||
|
||||
+#include "base/base64.h"
|
||||
#include "base/base_paths.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
@@ -81,10 +82,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||
@@ -81,10 +81,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||
|
||||
bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
base::CommandLine* parsed_command_line,
|
||||
@@ -223,7 +196,7 @@ index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fca
|
||||
static const int min_message_size = 7;
|
||||
if (cds->cbData < min_message_size * sizeof(wchar_t) ||
|
||||
cds->cbData % sizeof(wchar_t) != 0) {
|
||||
@@ -134,6 +137,25 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
@@ -134,6 +136,23 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
const std::wstring cmd_line =
|
||||
msg.substr(second_null + 1, third_null - second_null);
|
||||
*parsed_command_line = base::CommandLine::FromString(cmd_line);
|
||||
@@ -236,20 +209,18 @@ index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fca
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ // Get the actual additional data. It is base64-encoded so it can
|
||||
+ // safely traverse the null-delimited wchar_t buffer.
|
||||
+ const std::wstring encoded_w =
|
||||
+ msg.substr(third_null + 1, fourth_null - third_null - 1);
|
||||
+ std::string encoded = base::WideToASCII(encoded_w);
|
||||
+ std::optional<std::vector<uint8_t>> decoded = base::Base64Decode(encoded);
|
||||
+ if (decoded) {
|
||||
+ *parsed_additional_data = std::move(*decoded);
|
||||
+ }
|
||||
+ // Get the actual additional data.
|
||||
+ const std::wstring additional_data =
|
||||
+ msg.substr(third_null + 1, fourth_null - third_null);
|
||||
+ base::span<const uint8_t> additional_data_bytes =
|
||||
+ base::as_byte_span(additional_data);
|
||||
+ *parsed_additional_data = std::vector<uint8_t>(
|
||||
+ additional_data_bytes.begin(), additional_data_bytes.end());
|
||||
+
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -155,13 +177,14 @@ bool ProcessLaunchNotification(
|
||||
@@ -155,13 +174,14 @@ bool ProcessLaunchNotification(
|
||||
|
||||
base::CommandLine parsed_command_line(base::CommandLine::NO_PROGRAM);
|
||||
base::FilePath current_directory;
|
||||
@@ -267,7 +238,7 @@ index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fca
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -265,9 +288,11 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
@@ -265,9 +285,11 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const std::string& program_name,
|
||||
const base::FilePath& user_data_dir,
|
||||
@@ -279,7 +250,7 @@ index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fca
|
||||
program_name_(program_name),
|
||||
is_app_sandboxed_(is_app_sandboxed),
|
||||
is_virtualized_(false),
|
||||
@@ -294,7 +319,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -294,7 +316,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
return PROCESS_NONE;
|
||||
}
|
||||
|
||||
@@ -289,18 +260,10 @@ index ae659d84a5ae2f2e87ce288477506575f8d86839..274887d62ff8d008bb86815a11205fca
|
||||
return PROCESS_NOTIFIED;
|
||||
case NotifyChromeResult::kFailed:
|
||||
diff --git a/chrome/browser/win/chrome_process_finder.cc b/chrome/browser/win/chrome_process_finder.cc
|
||||
index 594f3bc08a4385c177fb488123cef79448e94850..28e5a18a19718b2e748ada6882341413a1ab0705 100644
|
||||
index 594f3bc08a4385c177fb488123cef79448e94850..5a1dde19a4bc2bf728eba4c738f831c3e5b73942 100644
|
||||
--- a/chrome/browser/win/chrome_process_finder.cc
|
||||
+++ b/chrome/browser/win/chrome_process_finder.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
|
||||
+#include "base/base64.h"
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/files/file_path.h"
|
||||
@@ -39,7 +40,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) {
|
||||
@@ -39,7 +39,9 @@ HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) {
|
||||
return base::win::MessageWindow::FindWindow(user_data_dir.value());
|
||||
}
|
||||
|
||||
@@ -311,7 +274,7 @@ index 594f3bc08a4385c177fb488123cef79448e94850..28e5a18a19718b2e748ada6882341413
|
||||
TRACE_EVENT0("startup", "AttemptToNotifyRunningChrome");
|
||||
|
||||
DCHECK(remote_window);
|
||||
@@ -70,12 +73,22 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
|
||||
@@ -70,12 +72,24 @@ NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window) {
|
||||
new_command_line.AppendSwitch(switches::kSourceAppId);
|
||||
}
|
||||
// Send the command line to the remote chrome window.
|
||||
@@ -323,12 +286,14 @@ index 594f3bc08a4385c177fb488123cef79448e94850..28e5a18a19718b2e748ada6882341413
|
||||
std::wstring_view{L"\0", 1}, new_command_line.GetCommandLineString(),
|
||||
std::wstring_view{L"\0", 1}});
|
||||
|
||||
+ if (!additional_data.empty()) {
|
||||
+ // Base64-encode so the payload survives the null-delimited wchar_t
|
||||
+ // framing; raw serialized bytes can contain 0x0000 sequences which
|
||||
+ // would otherwise terminate the field early.
|
||||
+ std::string encoded = base::Base64Encode(additional_data);
|
||||
+ to_send.append(base::ASCIIToWide(encoded));
|
||||
+ size_t additional_data_size = additional_data.size_bytes();
|
||||
+ if (additional_data_size) {
|
||||
+ size_t padded_size = additional_data_size / sizeof(wchar_t);
|
||||
+ if (additional_data_size % sizeof(wchar_t) != 0) {
|
||||
+ padded_size++;
|
||||
+ }
|
||||
+ to_send.append(reinterpret_cast<const wchar_t*>(additional_data.data()),
|
||||
+ padded_size);
|
||||
+ to_send.append(L"\0", 1); // Null separator.
|
||||
+ }
|
||||
+
|
||||
|
||||
@@ -17,7 +17,7 @@ which removed range-requests-supported on non-http protocols. See https://issues
|
||||
for more information.
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
index f697f85d7e3e9eeeab249a6d4e8ef8383c5c0d72..a5f35e7782c047b147458e569924de0fd30db7ce 100644
|
||||
index d1565bfe05342915d516d9c46eb7c4922c361b22..a5f35e7782c047b147458e569924de0fd30db7ce 100644
|
||||
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
@@ -11,8 +11,10 @@
|
||||
@@ -61,7 +61,7 @@ index f697f85d7e3e9eeeab249a6d4e8ef8383c5c0d72..a5f35e7782c047b147458e569924de0f
|
||||
|
||||
bool MultiBufferDataSource::AssumeFullyBuffered() const {
|
||||
DCHECK(url_data_);
|
||||
- return !url_data_->url().ProtocolIsInHttpFamily();
|
||||
- return !url_data_->url().ProtocolIsInHTTPFamily();
|
||||
+
|
||||
+ const std::string scheme = url_data_->url().Protocol().Ascii();
|
||||
+ for (const std::string& streaming_scheme : *GetStreamingSchemes()) {
|
||||
@@ -104,7 +104,7 @@ index 5100bd21163f9ceadb728ed5306dcf8320e528a8..c2ee03ca6a75a2fef1ce778e663a74bd
|
||||
using InitializeCB = base::OnceCallback<void(bool)>;
|
||||
void Initialize(InitializeCB init_cb) override;
|
||||
diff --git a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
index 61b798d0b37588dbdaaced0cd88f6ed36fbaffa5..95cc5bde18ed79f2a4e6fc1d0d1138b0c41bd5d5 100644
|
||||
index 4beb963ecd1c42b1d236cbfdafa9daf27ac61c06..68175244b3496f7b999ae4a3a3e14b5f2b7e659d 100644
|
||||
--- a/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/resource_multi_buffer_data_provider.cc
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: add support for embedder snapshot validation
|
||||
IsValid is not exposed despite being commented as for embedders, this exposes something that works for us.
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index aef4af8ce2a3352535a1ea2f4777e839c4811817..d5d861292c399a18ec0af66e2d726619c939875e 100644
|
||||
index e63c8e92e3d8ae1ff0bec37e614ca8ed989b21e4..743b785e7effe57b8c55fd2e6d779353226f807e 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -76,11 +76,23 @@ bool GenerateEntropy(unsigned char* buffer, size_t amount) {
|
||||
|
||||
@@ -262,7 +262,7 @@ index 68a3095a49caf472c83b93b5cef66e5549a2d7cc..aa371ba5576f9fbaf5558e39704f7eb8
|
||||
+
|
||||
} // namespace content
|
||||
diff --git a/content/browser/renderer_host/code_cache_host_impl.cc b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
index a255629cbe33e132709689533fd23a7502f7a73e..ce503f82cdbc6c8f4da3ae11d6bed3ba16f7e1f5 100644
|
||||
index ffc684ad1e2dfbf148bb01b4d185a44619a2dceb..39b15dd921539c17e1038fabc64bf20b0974e20a 100644
|
||||
--- a/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/code_cache_host_impl.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
@@ -46,10 +46,10 @@ 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 f4fe8834fcbeb65563ec8da2f7e0ad2c53c16dff..9fdc5362ce5d5708741376f9703f65e1bad38c41 100644
|
||||
index d19776b90bd382ab43812d2fa09b1ceb6549149f..7266f42b698a0581ce114e4ddcba4c455c0fafb2 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_properties.json5
|
||||
+++ b/third_party/blink/renderer/core/css/css_properties.json5
|
||||
@@ -9555,6 +9555,26 @@
|
||||
@@ -9588,6 +9588,26 @@
|
||||
property_methods: ["ParseShorthand", "CSSValueFromComputedStyleInternal"],
|
||||
},
|
||||
|
||||
@@ -77,10 +77,10 @@ index f4fe8834fcbeb65563ec8da2f7e0ad2c53c16dff..9fdc5362ce5d5708741376f9703f65e1
|
||||
{
|
||||
name: "-internal-visited-color",
|
||||
diff --git a/third_party/blink/renderer/core/css/css_property_equality.cc b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
index 1ca69ff2d1c3fbbf46dd72c7ecb587b8da3e6596..d522c0c1ca4694218811432816f6808c06d78201 100644
|
||||
index 593b56ba4035f42ec39c398620b91d9a47f0652f..265ee39d2a9faa5d9683d1f7af3e0a5d7180a699 100644
|
||||
--- a/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
+++ b/third_party/blink/renderer/core/css/css_property_equality.cc
|
||||
@@ -421,6 +421,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
@@ -402,6 +402,8 @@ bool CSSPropertyEquality::PropertiesEqual(const PropertyHandle& property,
|
||||
return a.DominantBaseline() == b.DominantBaseline();
|
||||
case CSSPropertyID::kDynamicRangeLimit:
|
||||
return a.GetDynamicRangeLimit() == b.GetDynamicRangeLimit();
|
||||
@@ -131,7 +131,7 @@ index 91680e1e1b273a847c68a2de7aa4408669abb8ee..81e62e16728c52fc3fa2a74ec6645606
|
||||
} // 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 95385f759d94f8627c71f2626e9bb7071fc492ed..e3765fe54fce2fa8ca458b14dd158be7c7b0281c 100644
|
||||
index 513d21790fc15fb70ecf7a53734980c85efa51eb..5e4dbcef9cb1ea3f8f8f4112ad954ce5049d3e6a 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
|
||||
@@ -4179,6 +4179,15 @@ PositionTryFallback StyleBuilderConverter::ConvertSinglePositionTryFallback(
|
||||
@@ -313,7 +313,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 1d094ca3afdb7dd2643bb9d01e8545bc2afd2569..755c2230b1466302579230e410a4d49fb61e98e7 100644
|
||||
index 9751ef0522e695f84394798fbb454b414b49841f..7f6ea556a18ee927a24325cb2c88427a592f0845 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 @@
|
||||
|
||||
@@ -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 189230e448183c52b9da41ecc520b366d1bea14f..689d1ecf00b553c039b9d9e19540cd5a3e053118 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=(
|
||||
@@ -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 415e80174751de75bc9ef92a435679e22c32b39e..df25f808b55bccd72d5edba2be3f06a9f74f2e15 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 599ea96d28ad13e76c50a2153c59e563fb25b6b6..6b85715c4034f6894d550b62f5cef45e691db967 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 ce69b40f1738bea97f52ed954a2908c5abdcad8b..67e8b7093a6359afef3044b2e7fc63a86a36425d 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 9db6156ff06caca52cd4c2d47a9ff094a45eccb3..f141436a3b9feb56ca9c41b6c398451bc2bdd770 100644
|
||||
--- a/services/network/public/mojom/url_request.mojom
|
||||
+++ b/services/network/public/mojom/url_request.mojom
|
||||
@@ -111,6 +111,9 @@ struct TrustedUrlRequestParams {
|
||||
@@ -112,7 +112,7 @@ index 916dadfe0eba27c8493b1b64bb01f9e77153692e..4a599fed851ea5af4be66895b7b2d83c
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index eb1b02a8a311f5f02302fddf76e468d30951683b..e4c62716106a0665bbeca11f0c94ac431e8b1c4e 100644
|
||||
index c4f6d52508042c365a71060f5b64ad8b5b57d3aa..ad14c9357b85be82db9a75bc48084b5b961fccf1 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -373,6 +373,9 @@ URLLoader::URLLoader(
|
||||
@@ -134,7 +134,7 @@ index eb1b02a8a311f5f02302fddf76e468d30951683b..e4c62716106a0665bbeca11f0c94ac43
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1176,6 +1179,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1168,6 +1171,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
@@ -155,7 +155,7 @@ index eb1b02a8a311f5f02302fddf76e468d30951683b..e4c62716106a0665bbeca11f0c94ac43
|
||||
|
||||
if (expected_response_headers_for_synthetic_response &&
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index f6691de75d3c586c8644eaf1efffbb2b69916007..254cbddbfd5a21f142d2d2767b62320b29ebe27b 100644
|
||||
index f849b9ccd321fe5cf67266328a347ca72d089887..7d2ef80e723e872fb42a201f6fa29072d792ead3 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -629,6 +629,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
|
||||
@@ -1,73 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@anthropic.com>
|
||||
Date: Sat, 7 Mar 2026 23:07:30 -0800
|
||||
Subject: feat: plumb node_integration_in_worker through WorkerSettings
|
||||
|
||||
Copy the node_integration_in_worker flag from the initiating frame's
|
||||
WebPreferences into WorkerSettings at dedicated worker creation time,
|
||||
so the value is readable per-worker on the worker thread rather than
|
||||
relying on a process-wide command line switch. The value is also
|
||||
propagated to nested workers via WorkerSettings::Copy.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/workers/dedicated_worker.cc b/third_party/blink/renderer/core/workers/dedicated_worker.cc
|
||||
index d6a7c7ef529a82b8c0c843fc40ebe84737a86b75..27931353780db0753381755e72db43aacb4ca0b1 100644
|
||||
--- a/third_party/blink/renderer/core/workers/dedicated_worker.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/dedicated_worker.cc
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "third_party/blink/renderer/core/frame/local_frame_client.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_frame_widget_impl.h"
|
||||
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h"
|
||||
+#include "third_party/blink/renderer/core/exported/web_view_impl.h"
|
||||
#include "third_party/blink/renderer/core/inspector/inspector_trace_events.h"
|
||||
#include "third_party/blink/renderer/core/inspector/main_thread_debugger.h"
|
||||
#include "third_party/blink/renderer/core/loader/document_loader.h"
|
||||
@@ -564,6 +565,12 @@ DedicatedWorker::CreateGlobalScopeCreationParams(
|
||||
auto* frame = window->GetFrame();
|
||||
parent_devtools_token = frame->GetDevToolsFrameToken();
|
||||
settings = std::make_unique<WorkerSettings>(frame->GetSettings());
|
||||
+ if (auto* web_local_frame = WebLocalFrameImpl::FromFrame(frame)) {
|
||||
+ if (auto* web_view = web_local_frame->ViewImpl()) {
|
||||
+ settings->SetNodeIntegrationInWorker(
|
||||
+ web_view->GetWebPreferences().node_integration_in_worker);
|
||||
+ }
|
||||
+ }
|
||||
agent_group_scheduler_compositor_task_runner =
|
||||
execution_context->GetScheduler()
|
||||
->ToFrameScheduler()
|
||||
diff --git a/third_party/blink/renderer/core/workers/worker_settings.cc b/third_party/blink/renderer/core/workers/worker_settings.cc
|
||||
index 45680c5f6ea0c7e89ccf43eb88f8a11e3318c02e..3fa3af62f4e7ba8186441c5e3184b1c04fe32d12 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_settings.cc
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_settings.cc
|
||||
@@ -40,6 +40,8 @@ std::unique_ptr<WorkerSettings> WorkerSettings::Copy(
|
||||
old_settings->strictly_block_blockable_mixed_content_;
|
||||
new_settings->generic_font_family_settings_ =
|
||||
old_settings->generic_font_family_settings_;
|
||||
+ new_settings->node_integration_in_worker_ =
|
||||
+ old_settings->node_integration_in_worker_;
|
||||
return new_settings;
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/workers/worker_settings.h b/third_party/blink/renderer/core/workers/worker_settings.h
|
||||
index 45c60dd2c44b05fdd279f759069383479823c7f2..33a2a0337efb9a46293e11d0d09b3fc182ab9618 100644
|
||||
--- a/third_party/blink/renderer/core/workers/worker_settings.h
|
||||
+++ b/third_party/blink/renderer/core/workers/worker_settings.h
|
||||
@@ -43,6 +43,11 @@ class CORE_EXPORT WorkerSettings {
|
||||
return generic_font_family_settings_;
|
||||
}
|
||||
|
||||
+ bool NodeIntegrationInWorker() const { return node_integration_in_worker_; }
|
||||
+ void SetNodeIntegrationInWorker(bool value) {
|
||||
+ node_integration_in_worker_ = value;
|
||||
+ }
|
||||
+
|
||||
private:
|
||||
void CopyFlagValuesFromSettings(Settings*);
|
||||
|
||||
@@ -54,6 +59,7 @@ class CORE_EXPORT WorkerSettings {
|
||||
bool strict_mixed_content_checking_ = false;
|
||||
bool allow_running_of_insecure_content_ = false;
|
||||
bool strictly_block_blockable_mixed_content_ = false;
|
||||
+ bool node_integration_in_worker_ = false;
|
||||
|
||||
GenericFontFamilySettings generic_font_family_settings_;
|
||||
};
|
||||
@@ -66,10 +66,10 @@ index 8acf00d2618d9a0552750f0f8e1d734b52f790b1..d2ea06fa66c07baaf741382af40de154
|
||||
}
|
||||
NOTREACHED();
|
||||
diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc
|
||||
index 9c1b4762fe932618ec85a86a8367dce706d23c0b..a818b0b9a0eb3efdf8b2d851a6b51fccbfdad0fe 100644
|
||||
index 0d873c13f1463d37e0fcdeacf68a84817b6524ca..19b8fa4b094b646ad6a5864c5e14a2f125fb7880 100644
|
||||
--- a/third_party/blink/common/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/common/permissions/permission_utils.cc
|
||||
@@ -110,7 +110,10 @@ std::string GetPermissionString(PermissionType permission) {
|
||||
@@ -108,7 +108,10 @@ std::string GetPermissionString(PermissionType permission) {
|
||||
return "LocalNetwork";
|
||||
case PermissionType::LOOPBACK_NETWORK:
|
||||
return "LoopbackNetwork";
|
||||
@@ -81,7 +81,7 @@ index 9c1b4762fe932618ec85a86a8367dce706d23c0b..a818b0b9a0eb3efdf8b2d851a6b51fcc
|
||||
NOTREACHED();
|
||||
}
|
||||
NOTREACHED();
|
||||
@@ -191,6 +194,7 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
|
||||
@@ -189,6 +192,7 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
|
||||
case PermissionType::NOTIFICATIONS:
|
||||
case PermissionType::KEYBOARD_LOCK:
|
||||
case PermissionType::POINTER_LOCK:
|
||||
@@ -103,7 +103,7 @@ index b124d53fdd245f055f57ad00250112e2637e1cd1..31158388db2df745af999adc9d07fc92
|
||||
NUM,
|
||||
MIN_VALUE = MIDI_SYSEX,
|
||||
diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
index 7e5ab8bcc4756d3cf16594b69bd25d3df709e7cc..a25299b7222d43b6c4b4a5c18085171dbc322ec1 100644
|
||||
index 699f6dfd43f0f6f8ab2b717e75ad74fa9dca0789..8a2e1ec60c337d4fb40292b53ee8949e0ce2b8a4 100644
|
||||
--- a/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
+++ b/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
@@ -47,7 +47,7 @@ enum PermissionName {
|
||||
|
||||
@@ -93,7 +93,7 @@ index a9ad418f46fc6fdd437025a475f2538f706baa0c..9bdbd620a68ce3fad8eecd88cac3159f
|
||||
// window's workspace and fullscreen state, and can be retrieved from or
|
||||
// applied to a window.
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
index ac1905d73675e5645c8baa38c7c95af54dfb0c33..c2946ef91613438f56e333a198cfbeb1013ffdbc 100644
|
||||
index dccf58b3d0d1003d236e204cde4edbab00610eac..3bceb396989c59449e7f76183b9d13721509349e 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
@@ -560,6 +560,7 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
@@ -105,10 +105,10 @@ index ac1905d73675e5645c8baa38c7c95af54dfb0c33..c2946ef91613438f56e333a198cfbeb1
|
||||
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 fe1fc7c7c37918196773cb555423db9077048a0d..8e6a8771ff1e312f25b504d09fec2f7aa3bbbad0 100644
|
||||
index 04ccf05abbdeba229a39f547d1affc6e21e7d377..89275857eee2606c68279485e08f336d90a82f76 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -468,6 +468,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -467,6 +467,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
if (!is_tooltip) {
|
||||
tooltip_manager_ = std::make_unique<TooltipManagerMac>(GetNSWindowMojo());
|
||||
}
|
||||
@@ -116,7 +116,7 @@ index fe1fc7c7c37918196773cb555423db9077048a0d..8e6a8771ff1e312f25b504d09fec2f7a
|
||||
|
||||
if (params.workspace.length()) {
|
||||
std::string restoration_data;
|
||||
@@ -485,6 +486,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -484,6 +485,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;
|
||||
@@ -124,7 +124,7 @@ index fe1fc7c7c37918196773cb555423db9077048a0d..8e6a8771ff1e312f25b504d09fec2f7a
|
||||
window_params->is_tooltip = is_tooltip;
|
||||
|
||||
// macOS likes to put shadows on most things. However, frameless windows
|
||||
@@ -666,9 +668,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -665,9 +667,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();
|
||||
|
||||
@@ -8,7 +8,7 @@ Check for broken links by confirming the file exists before setting its utime.
|
||||
This patch should be upstreamed & removed.
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 31e2b5775021564b7c80b6756020973141c08530..88446019ce1a98eab8a648220e5ed0cac623c1e9 100755
|
||||
index d17117f9b2cf255e848639ed9e904957c0497848..bd7cb77e77f5ca13d82f720a6f887e232bdecf3e 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -201,10 +201,9 @@ def DownloadAndUnpack(url, output_dir, path_prefixes=None, is_known_zip=False):
|
||||
|
||||
@@ -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 d556646077f61e38c661039e3f8347a63a79e3a5..026ffca93b2f9d9996865e62eefc25d609264f36 100644
|
||||
index 2e111497a4aef49d1b731f595530f8f6a0a71ae9..2ddf483906c494a8ee3b6aae28221a688bcc5fb4 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -11705,6 +11705,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
@@ -11701,6 +11701,11 @@ url::Origin NavigationRequest::GetOriginForURLLoaderFactoryUnchecked() {
|
||||
target_rph_id);
|
||||
}
|
||||
|
||||
@@ -44,10 +44,10 @@ index d556646077f61e38c661039e3f8347a63a79e3a5..026ffca93b2f9d9996865e62eefc25d6
|
||||
// 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 2960f24d6d18dac8227e63dace24d9bdf711c85c..8937113a83eec4cf1659f7cd941a3b25e9daae29 100644
|
||||
index 4796524e7e518f57efba63e2fdbedc5c3f62852a..9bd508575daf65237e46c03a67dd2f13bdc5f5bc 100644
|
||||
--- a/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
+++ b/third_party/blink/renderer/core/loader/document_loader.cc
|
||||
@@ -2346,6 +2346,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
@@ -2337,6 +2337,7 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
|
||||
scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
Document* owner_document) {
|
||||
scoped_refptr<SecurityOrigin> origin;
|
||||
@@ -55,7 +55,7 @@ index 2960f24d6d18dac8227e63dace24d9bdf711c85c..8937113a83eec4cf1659f7cd941a3b25
|
||||
// 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
|
||||
@@ -2382,6 +2383,9 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
|
||||
@@ -2373,6 +2374,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_;
|
||||
|
||||
@@ -87,10 +87,10 @@ index 5158897a7a7af9f29580faa17498a8dbab40af87..96617b9bb0275144b0e9ed18547d9982
|
||||
// The view with active text input state, i.e., a focused <input> element.
|
||||
// It will be nullptr if no such view exists. Note that the active view
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 3079d14e75fe31cdc5f7d49a09b026f5d4f7bc62..e4b50b13b686e4c89ca6e678fb78952a4d347c37 100644
|
||||
index 98991532c6e05e36be0c10cb907fd51b4b4571bd..eea41c61ebe2ee40de3254b0fa361f2adb7e6442 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -10247,7 +10247,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -10240,7 +10240,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -8,10 +8,10 @@ such as the background turning black when maximizing the window and
|
||||
dynamic background material settings not taking effect.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 1f66f36c028b97f018e116ae41a8d9b078620757..e19955df73a287fcade8e6c90ed02558e45d210b 100644
|
||||
index fd3b1960cd567c7361effa0516782a5c2283526d..44ab9343a23b6a89a7d488a5be7d288857ffd039 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -184,6 +184,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) {
|
||||
@@ -183,6 +183,10 @@ void DesktopWindowTreeHostWin::FinishTouchDrag(gfx::Point screen_point) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ 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 ccfff39476e867885eed383a1d0f455389ab7eec..0f83d2d4de4dc2a8e76a727b4a3edbdf85c93979 100644
|
||||
index e3eb80fcc477d65cdd314328b8f85704d9aa1a66..b65fcbd5bf989354aa8290b11d4f664602b2ae52 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -3221,6 +3221,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -211,7 +211,7 @@ 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 782fe8b0931884226d19ad7224d7ec576ca78113..fd36db08a2f9900685280d72fe55bcd062c9060c 100644
|
||||
index 72c5cecc619aba2e106b838898f1d9c911bcb331..7ed7f7ff7fed1d71ee6330c2783941ad239715c6 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(
|
||||
@@ -223,7 +223,7 @@ index 782fe8b0931884226d19ad7224d7ec576ca78113..fd36db08a2f9900685280d72fe55bcd0
|
||||
mojom::blink::WantResultOption::kWantResult, wait_for_promise);
|
||||
}
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 888ef302f330986946cf43c52ccb855652640c38..e090dea38e64fe19ad8ceb1147391dbe48d7db33 100644
|
||||
index 5fae2e1a797ad30aaa51851377062f4acab54855..770c5995162000d7e47008dc063fe2ea36a0f318 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -1128,14 +1128,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
|
||||
@@ -20,7 +20,7 @@ index 9d38302c32a040272d9eeab4a7d20755231a3cb6..4c14e547fbedcd7918a3bd950dbed4ed
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index ec1bb0fec53be50236dcdddd5b09db01fdad3f4c..a143a356e3d3f3d26c0fce3d34eee17dab1cdab6 100644
|
||||
index 03372a5dad8cfe5f3866a4501293cd436e3f34af..73c9b4ba19d345fcb18c8178b22d013e5a007453 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -350,6 +350,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
@@ -41,7 +41,7 @@ index 3909e70dc1425c2cb02624f4b3017784a2ae6c9d..a57b92f02085d6392e6d9d0cc037df6b
|
||||
// Returns whether `Initialize` has already been invoked in the process.
|
||||
// Initialization is a one-way operation (i.e., this method cannot return
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 6146bd47bf3203b97084438ab51f96d515c74b55..136e728c4c7981c9180304a43d75b2f003161664 100644
|
||||
index 5cad9cf7b1a8d3d120c4f2fef5a0a5b2834501c7..6b7dffe9c65ee04787a0dbc39d8d055c4daf0582 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -529,7 +529,8 @@ void SetFeatureFlags() {
|
||||
|
||||
@@ -8,26 +8,17 @@ require a largeish patch to get working, so just redirect it to our
|
||||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index 50e5ac31c57cab1476df494da879615b305a93f3..4e600c23a554dfa63acbe6805ee8374156191377 100644
|
||||
index 9fd5f8813728f46d63a215df31e7542aef4d3899..4e600c23a554dfa63acbe6805ee8374156191377 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -12,8 +12,8 @@
|
||||
#include "base/numerics/safe_conversions.h"
|
||||
#include "base/unguessable_token.h"
|
||||
#include "base/uuid.h"
|
||||
-#include "chrome/browser/extensions/api/mime_handlers/dispatch_mime_handler_event.h"
|
||||
-#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
|
||||
-#include "chrome/browser/plugins/plugin_utils.h"
|
||||
+#include "electron/shell/browser/extensions/api/streams_private/streams_private_api.h"
|
||||
+#include "electron/shell/browser/plugins/plugin_utils.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/browser/download_utils.h"
|
||||
@@ -224,7 +224,7 @@ void PluginResponseInterceptorURLLoaderThrottle::WillProcessResponse(
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce(
|
||||
- &extensions::mime_handlers::SendExecuteMimeTypeHandlerEvent,
|
||||
+ &extensions::StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent,
|
||||
extension_id, stream_id, embedded, frame_tree_node_id_,
|
||||
std::move(transferrable_loader), response_url, internal_id));
|
||||
|
||||
|
||||
@@ -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 902ad8a5f40b547cf197cf143e16bed12a286c8e..dcae324d08cee5657bcfc711bc45f466b4ac592c 100644
|
||||
index 291a38ecaed529da92dd82d400ec27ca0933a273..6728aff04643e8e9524579adc6aae732f5e742ac 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",
|
||||
@@ -974,7 +974,7 @@ index 2f1fcace77c403c0e136ae2fc40633cccccce038..9ce9c1771310e81b18ba6fe4569544ff
|
||||
return kAttributes;
|
||||
}
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index fbef0553694736c84d9902d06113edb88d1a9881..e3f186c1d1966ad1e2099351d7d7ea2df3806fa7 100644
|
||||
index 1c7ac93d0629cd20fef14db85dc222ab2d6377a1..4d95a7d819287a9b44d831f8081b6eac4f7dfddd 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -345,6 +345,7 @@ source_set("browser") {
|
||||
@@ -1107,7 +1107,7 @@ index 5487c3756c60389a3442c2e59a08c91890fb6f87..f17ed8c3485102ac63f34239b3b31a3a
|
||||
|
||||
defines = []
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index bbb6f87c5b824b6899b07de1a0e202903c2c983a..278bfec27d0ce0bbd687133bc5ee5a8f4d106905 100644
|
||||
index 2f7415e27a43a9ccb8b5c9556f540de86b93dcfa..f7810a519cd011c25096622d2c397d8825f82736 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -324,6 +324,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -1189,7 +1189,7 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
|
||||
|
||||
} // namespace content
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index f02b00b5cf5bf1de44031596d5a8284ddbe5182c..9b88f0fde3ffde1860bd517a203e460271f61fa1 100644
|
||||
index ad5276da08af1059200c9267997c4f35bc086320..86d46ec7f3cdc39e75469b13aefd812ffecac2d8 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -699,6 +699,7 @@ static_library("test_support") {
|
||||
@@ -1209,7 +1209,7 @@ index f02b00b5cf5bf1de44031596d5a8284ddbe5182c..9b88f0fde3ffde1860bd517a203e4602
|
||||
}
|
||||
|
||||
mojom("content_test_mojo_bindings") {
|
||||
@@ -2064,6 +2067,7 @@ test("content_browsertests") {
|
||||
@@ -2063,6 +2066,7 @@ test("content_browsertests") {
|
||||
"//ui/shell_dialogs",
|
||||
"//ui/snapshot",
|
||||
"//ui/webui:test_support",
|
||||
@@ -1217,7 +1217,7 @@ index f02b00b5cf5bf1de44031596d5a8284ddbe5182c..9b88f0fde3ffde1860bd517a203e4602
|
||||
]
|
||||
|
||||
if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
|
||||
@@ -3413,6 +3417,7 @@ test("content_unittests") {
|
||||
@@ -3410,6 +3414,7 @@ test("content_unittests") {
|
||||
"//ui/shell_dialogs",
|
||||
"//ui/webui:test_support",
|
||||
"//url",
|
||||
@@ -1378,10 +1378,10 @@ index bbfc5f0377d33fb215b03d2c64cc6b04600a3c21..cc2c13e7a4ee31bf7333d005aca0e6b3
|
||||
} // namespace
|
||||
#endif
|
||||
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
|
||||
index d8509119f1c9e527d2a89faad239e13dead54257..7d55ecc59bcd535599ed37c7dd684ae571258c9a 100644
|
||||
index 348287f4846e059e1a2c139c02145e2feaa52a44..709aa1993252919c96c454b04d477af68be68a66 100644
|
||||
--- a/net/dns/BUILD.gn
|
||||
+++ b/net/dns/BUILD.gn
|
||||
@@ -207,6 +207,8 @@ source_set("dns") {
|
||||
@@ -205,6 +205,8 @@ source_set("dns") {
|
||||
":host_resolver_manager",
|
||||
":mdns_client",
|
||||
]
|
||||
@@ -2359,10 +2359,10 @@ index bbe355cf69f160866188216cc274d75bd35603db..06ee100d7ea2e892dbf3c0b1adc96c50
|
||||
// enough.
|
||||
return PlatformFontMac::SystemFontType::kGeneral;
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 5c0cad2640d84193e396ac1faff7d61230ab388c..edaf2a169d67cfa7903c56989801b1563ecf7af3 100644
|
||||
index 845041089b0feccf5e5fac6a0e108f9e44cf32ae..d85cb6e8e83e4f0ecb0711560c49e6520eb060e7 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -732,6 +732,8 @@ component("views") {
|
||||
@@ -730,6 +730,8 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
@@ -2371,7 +2371,7 @@ index 5c0cad2640d84193e396ac1faff7d61230ab388c..edaf2a169d67cfa7903c56989801b156
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1161,6 +1163,8 @@ source_set("test_support") {
|
||||
@@ -1159,6 +1161,8 @@ source_set("test_support") {
|
||||
"//ui/base/mojom:ui_base_types",
|
||||
]
|
||||
|
||||
@@ -2381,7 +2381,7 @@ index 5c0cad2640d84193e396ac1faff7d61230ab388c..edaf2a169d67cfa7903c56989801b156
|
||||
sources += [
|
||||
"test/desktop_window_tree_host_win_test_api.cc",
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
index 68fd2b250c73d25d00b88c54ff162c5258c2633a..ac1905d73675e5645c8baa38c7c95af54dfb0c33 100644
|
||||
index 197f6a9b1f12f723d34baa4c9efe2982c1f01c10..dccf58b3d0d1003d236e204cde4edbab00610eac 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
@@ -19,6 +19,7 @@
|
||||
@@ -2416,7 +2416,7 @@ index 68fd2b250c73d25d00b88c54ff162c5258c2633a..ac1905d73675e5645c8baa38c7c95af5
|
||||
// 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 d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db9077048a0d 100644
|
||||
index abdd8d9be9ef405f9159a5f1d19c5b08cbbe03e7..04ccf05abbdeba229a39f547d1affc6e21e7d377 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -20,6 +20,7 @@
|
||||
@@ -2427,7 +2427,7 @@ index d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db90
|
||||
#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"
|
||||
@@ -363,8 +364,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -362,8 +363,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 d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db90
|
||||
}
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
@@ -380,8 +385,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -379,8 +384,12 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
[in_process_ns_window_bridge_->ns_view() window]);
|
||||
}
|
||||
|
||||
@@ -2453,7 +2453,7 @@ index d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db90
|
||||
}
|
||||
|
||||
remote_cocoa::mojom::NativeWidgetNSWindow*
|
||||
@@ -1484,9 +1493,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1462,9 +1471,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 d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db90
|
||||
// Explicitly set the keyboard accessibility state on regaining key
|
||||
// window status.
|
||||
if (is_key && is_content_first_responder) {
|
||||
@@ -1639,17 +1650,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1617,17 +1628,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 d7d0c82f70f301fd7140230c4e9f53c3b68e18f2..fe1fc7c7c37918196773cb555423db90
|
||||
*pid = getpid();
|
||||
id element_id = GetNativeViewAccessible();
|
||||
|
||||
@@ -1662,6 +1676,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1640,6 +1654,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
}
|
||||
|
||||
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 4bbe1bb13c798c22eb6bca42efa557d3f71c155b..ce9c92a5ff2568baba932133c5d9430405d6d10b 100644
|
||||
index 90e788dd34052d64719689bdcb3bb92cd4b0d1b2..70204038a0f4f12f5b469c3975dcdde544990283 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -171,6 +171,11 @@
|
||||
@@ -134,7 +134,7 @@ index 4bbe1bb13c798c22eb6bca42efa557d3f71c155b..ce9c92a5ff2568baba932133c5d94304
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::NetworkContextHttpAuthPreferences::
|
||||
@@ -1039,6 +1149,13 @@ void NetworkContext::SetClient(
|
||||
@@ -1030,6 +1140,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -148,7 +148,7 @@ index 4bbe1bb13c798c22eb6bca42efa557d3f71c155b..ce9c92a5ff2568baba932133c5d94304
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2725,6 +2842,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2679,6 +2796,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
cert_verifier = std::make_unique<net::CachingCertVerifier>(
|
||||
std::make_unique<net::CoalescingCertVerifier>(
|
||||
std::move(cert_verifier)));
|
||||
@@ -160,10 +160,10 @@ index 4bbe1bb13c798c22eb6bca42efa557d3f71c155b..ce9c92a5ff2568baba932133c5d94304
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 1f89266833da7d955c1d537d637e1e5820ddcbd5..f11fbd0c31ef0a160133d12beddbbfb0b5195afe 100644
|
||||
index 0a66897041304092974991ad575e3542fc1bd965..4b03933f18e1556c397290b0492110ce5fecaa00 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -119,6 +119,7 @@ class SimpleUrlPatternMatcher;
|
||||
@@ -118,6 +118,7 @@ class SimpleUrlPatternMatcher;
|
||||
}
|
||||
|
||||
namespace network {
|
||||
@@ -171,7 +171,7 @@ index 1f89266833da7d955c1d537d637e1e5820ddcbd5..f11fbd0c31ef0a160133d12beddbbfb0
|
||||
class CookieManager;
|
||||
class HostResolver;
|
||||
class MdnsResponderManager;
|
||||
@@ -248,6 +249,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -247,6 +248,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
@@ -180,7 +180,7 @@ index 1f89266833da7d955c1d537d637e1e5820ddcbd5..f11fbd0c31ef0a160133d12beddbbfb0
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetViaObliviousHttp(
|
||||
mojom::ObliviousHttpRequestPtr request,
|
||||
@@ -969,6 +972,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -964,6 +967,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::vector<base::OnceClosure> dismount_closures_;
|
||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||
|
||||
@@ -190,10 +190,10 @@ index 1f89266833da7d955c1d537d637e1e5820ddcbd5..f11fbd0c31ef0a160133d12beddbbfb0
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 7648c9a76f98fe38ea9f5ea95b894d9ebc71ef9f..daae87e4794a3a15f95c600721d1c25f6360bcd4 100644
|
||||
index f15e345eb867a76b27389b2cf89bb18d5c12e44b..91964a97001d05ce2fd1c881efe896bf1b12b1ab 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -324,6 +324,17 @@ struct SocketBrokerRemotes {
|
||||
@@ -313,6 +313,17 @@ struct SocketBrokerRemotes {
|
||||
pending_remote<SocketBroker> server;
|
||||
};
|
||||
|
||||
@@ -211,7 +211,7 @@ index 7648c9a76f98fe38ea9f5ea95b894d9ebc71ef9f..daae87e4794a3a15f95c600721d1c25f
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -980,6 +991,9 @@ interface NetworkContext {
|
||||
@@ -962,6 +973,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ index 1455aa5083f8eef7bf9644a1cc522db3e67b0227..5df63357160d96b77c8c123a984aeef9
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index cbd5c331e801445bd1ab0984776231a2a648a29a..db4f2316ba98a0ced74a303390fee16d0050eee6 100644
|
||||
index 003a171003baacb024cebf58b4957eb6979fda8e..fbf9cc5bcf24533a10c6738a04d0c12eb472af79 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -6204,6 +6204,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -6197,6 +6197,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index cbd5c331e801445bd1ab0984776231a2a648a29a..db4f2316ba98a0ced74a303390fee16d
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 5a1133454eb9eeeff9672fb97243f51e478c33dd..08311b3d853761fc14c8c7d7c4132441448831be 100644
|
||||
index 581b6c62c44760af0e15a93b5f48a03e68cfc1d9..c6f3fcf7ab17cdeb1c30fd411618f8f5873c3dea 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1197,6 +1197,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
@@ -1193,6 +1193,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -90,10 +90,10 @@ index d2ea06fa66c07baaf741382af40de154068a7d6b..3397e741fbc52ce45cd62dd3fe12e73b
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/third_party/blink/common/permissions/permission_utils.cc b/third_party/blink/common/permissions/permission_utils.cc
|
||||
index a818b0b9a0eb3efdf8b2d851a6b51fccbfdad0fe..de25e8cf94b84c1c0c7b353f49070603b0f78370 100644
|
||||
index 19b8fa4b094b646ad6a5864c5e14a2f125fb7880..9728d674902d84f99fd93f258a8868ab811a8707 100644
|
||||
--- a/third_party/blink/common/permissions/permission_utils.cc
|
||||
+++ b/third_party/blink/common/permissions/permission_utils.cc
|
||||
@@ -110,11 +110,21 @@ std::string GetPermissionString(PermissionType permission) {
|
||||
@@ -108,11 +108,21 @@ std::string GetPermissionString(PermissionType permission) {
|
||||
return "LocalNetwork";
|
||||
case PermissionType::LOOPBACK_NETWORK:
|
||||
return "LoopbackNetwork";
|
||||
@@ -119,7 +119,7 @@ index a818b0b9a0eb3efdf8b2d851a6b51fccbfdad0fe..de25e8cf94b84c1c0c7b353f49070603
|
||||
}
|
||||
NOTREACHED();
|
||||
}
|
||||
@@ -194,7 +204,15 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
|
||||
@@ -192,7 +202,15 @@ PermissionTypeToPermissionsPolicyFeature(PermissionType permission) {
|
||||
case PermissionType::NOTIFICATIONS:
|
||||
case PermissionType::KEYBOARD_LOCK:
|
||||
case PermissionType::POINTER_LOCK:
|
||||
@@ -135,7 +135,7 @@ index a818b0b9a0eb3efdf8b2d851a6b51fccbfdad0fe..de25e8cf94b84c1c0c7b353f49070603
|
||||
return std::nullopt;
|
||||
|
||||
case PermissionType::NUM:
|
||||
@@ -372,6 +390,21 @@ std::optional<PermissionType> PermissionDescriptorInfoToPermissionType(
|
||||
@@ -368,6 +386,21 @@ std::optional<PermissionType> PermissionDescriptorInfoToPermissionType(
|
||||
return PermissionType::WEB_PRINTING;
|
||||
case PermissionName::SMART_CARD:
|
||||
return PermissionType::SMART_CARD;
|
||||
@@ -182,7 +182,7 @@ index 31158388db2df745af999adc9d07fc9272a2d6f8..fed5994c8563792405838d8923d3502a
|
||||
MIN_VALUE = MIDI_SYSEX,
|
||||
};
|
||||
diff --git a/third_party/blink/public/mojom/permissions/permission.mojom b/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
index a25299b7222d43b6c4b4a5c18085171dbc322ec1..eb98bc0dad9a0448ef3f6222a604032d93a487bc 100644
|
||||
index 8a2e1ec60c337d4fb40292b53ee8949e0ce2b8a4..e5d9922b15ccd8c08e4dd0b2656d606c8e896b66 100644
|
||||
--- a/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
+++ b/third_party/blink/public/mojom/permissions/permission.mojom
|
||||
@@ -47,8 +47,16 @@ enum PermissionName {
|
||||
|
||||
@@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
|
||||
accessed from our JS event. The filtering is moved into Electron's code.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6dde94189fcff81a759bc73351f37b97fa39a9ee..bc19afc0674f26e3d77b4af5544bb03095c7b31e 100644
|
||||
index d43c96dd6d2ecc180bbb7da5a3a96f8ccfd5b9c9..f17cfdeeee6729cc355093ecb4c6dfe1cf1d64a4 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -10409,25 +10409,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
@@ -10402,25 +10402,13 @@ void WebContentsImpl::RendererUnresponsive(
|
||||
base::RepeatingClosure hang_monitor_restarter) {
|
||||
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
|
||||
"render_widget_host", render_widget_host);
|
||||
|
||||
@@ -245,7 +245,7 @@ index 1ef2c9052262eccdbc40030746a858b7f30ac469..c7101b0d71826b05f61bfe0e74429d92
|
||||
}
|
||||
|
||||
diff --git a/content/common/features.cc b/content/common/features.cc
|
||||
index 98d558b26a945950c1911df124c0b845fd40aefd..77d44ead73ff425f279d8a5925b49f53276846f3 100644
|
||||
index a2e42f52b69f8cf85cdf57b4da688ef275299646..9dd375765d00e06e105219bf228cf6fc38c2d453 100644
|
||||
--- a/content/common/features.cc
|
||||
+++ b/content/common/features.cc
|
||||
@@ -369,6 +369,14 @@ BASE_FEATURE(kInterestGroupUpdateIfOlderThan, base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
@@ -264,7 +264,7 @@ index 98d558b26a945950c1911df124c0b845fd40aefd..77d44ead73ff425f279d8a5925b49f53
|
||||
BASE_FEATURE(kKeepChildProcessAfterIPCReset, base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
diff --git a/content/common/features.h b/content/common/features.h
|
||||
index 767d3b6bc803fad77bafc551ebcd476eb2ad0d68..87e366f23d9199139ec65f7b70fb5c3ab5a62cc9 100644
|
||||
index 2a2f9ebfa2b16d0aea2df89909bbc2b09c4574ef..bc2483ec543d6661882c6944059659ac48aad496 100644
|
||||
--- a/content/common/features.h
|
||||
+++ b/content/common/features.h
|
||||
@@ -143,6 +143,9 @@ CONTENT_EXPORT BASE_DECLARE_FEATURE(kInterestGroupUpdateIfOlderThan);
|
||||
|
||||
@@ -54,7 +54,7 @@ index 9b598ba34285bfe04c7c45557dd51af73bece3fe..c435d4441c99f87cc6a38fa73f73da6b
|
||||
if (mouse_event_callback.Run(mouse_event)) {
|
||||
return;
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index bc19afc0674f26e3d77b4af5544bb03095c7b31e..b8c2a2be98f4bbe5d05a11e82a131e156c20b858 100644
|
||||
index f17cfdeeee6729cc355093ecb4c6dfe1cf1d64a4..59c778a154e528c2d0470af4650b8c4bf7a85cc1 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4475,6 +4475,12 @@ void WebContentsImpl::RenderWidgetWasResized(
|
||||
@@ -71,10 +71,10 @@ index bc19afc0674f26e3d77b4af5544bb03095c7b31e..b8c2a2be98f4bbe5d05a11e82a131e15
|
||||
const gfx::PointF& client_pt) {
|
||||
if (delegate_) {
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 08311b3d853761fc14c8c7d7c4132441448831be..65848b8dc49bff70f12b1d28937d14ebb44afa1b 100644
|
||||
index c6f3fcf7ab17cdeb1c30fd411618f8f5873c3dea..d2a76e28bb64f347666b1390b15d28a7f6153334 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1127,6 +1127,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
@@ -1123,6 +1123,7 @@ class CONTENT_EXPORT WebContentsImpl
|
||||
|
||||
double GetPendingZoomLevel(RenderWidgetHostImpl* rwh) override;
|
||||
|
||||
|
||||
@@ -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 a59380373f612fc7b43eae9608904324dec2d77f..4c2cbeb11f6a7847f5253d88a18df42c1c9cc27c 100644
|
||||
index 8e53696964653c0efb6ca1a2b396deedd5ef155e..e56bc8872b33b5195935f7f1dac6f774d7ff29c9 100644
|
||||
--- a/testing/variations/fieldtrial_testing_config.json
|
||||
+++ b/testing/variations/fieldtrial_testing_config.json
|
||||
@@ -24105,6 +24105,21 @@
|
||||
@@ -26390,6 +26390,21 @@
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -67,10 +67,10 @@ index 5f5ea15678bd76399fdbbb8904fe155657f49335..a67c124878fb710599fed5d9714bfa72
|
||||
VIEWS_EXPORT BASE_DECLARE_FEATURE(kApplyInitialUrlToWebContents);
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f..1f66f36c028b97f018e116ae41a8d9b078620757 100644
|
||||
index ca91b370065b91f12764e188bb786b54ea45bcf3..fd3b1960cd567c7361effa0516782a5c2283526d 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -85,6 +85,23 @@ namespace {
|
||||
@@ -84,6 +84,23 @@ namespace {
|
||||
// This constant controls how many pixels wide that border is.
|
||||
const int kMouseCaptureRegionBorder = 5;
|
||||
|
||||
@@ -94,7 +94,7 @@ index ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f..1f66f36c028b97f018e116ae41a8d9b0
|
||||
// Updates the cursor clip region. Used for mouse locking.
|
||||
void UpdateMouseLockRegion(aura::Window* window, bool locked) {
|
||||
if (!locked) {
|
||||
@@ -342,9 +359,14 @@ bool DesktopWindowTreeHostWin::IsVisible() const {
|
||||
@@ -334,9 +351,14 @@ bool DesktopWindowTreeHostWin::IsVisible() const {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::SetSize(const gfx::Size& size) {
|
||||
@@ -111,7 +111,7 @@ index ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f..1f66f36c028b97f018e116ae41a8d9b0
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::StackAbove(aura::Window* window) {
|
||||
@@ -359,30 +381,40 @@ void DesktopWindowTreeHostWin::StackAtTop() {
|
||||
@@ -351,30 +373,40 @@ void DesktopWindowTreeHostWin::StackAtTop() {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::CenterWindow(const gfx::Size& size) {
|
||||
@@ -154,7 +154,7 @@ index ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f..1f66f36c028b97f018e116ae41a8d9b0
|
||||
return display::win::GetScreenWin()->ScreenToDIPRect(GetHWND(), pixel_bounds);
|
||||
}
|
||||
|
||||
@@ -701,37 +733,44 @@ void DesktopWindowTreeHostWin::HideImpl() {
|
||||
@@ -682,37 +714,44 @@ void DesktopWindowTreeHostWin::HideImpl() {
|
||||
// other get/set methods work in DIP.
|
||||
|
||||
gfx::Rect DesktopWindowTreeHostWin::GetBoundsInPixels() const {
|
||||
@@ -219,7 +219,7 @@ index ceb6e3ad0e60b1aaee47c24564ca9fd8b3c2e71f..1f66f36c028b97f018e116ae41a8d9b0
|
||||
}
|
||||
|
||||
gfx::Rect
|
||||
@@ -943,18 +982,26 @@ int DesktopWindowTreeHostWin::GetNonClientComponent(
|
||||
@@ -924,18 +963,26 @@ int DesktopWindowTreeHostWin::GetNonClientComponent(
|
||||
|
||||
void DesktopWindowTreeHostWin::GetWindowMask(const gfx::Size& size_px,
|
||||
SkPath* path) {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 9f16560b06c390ad1fc82001f8c44a64abd1d89a..7c5c60d2a91cc5ffdd1c1eec753a7a1ab4af6036 100644
|
||||
index 5428d74f02ba46fb48d885c0abc61c3e611ff8ed..3f1d496265c68b334116d6f429436b4a0772698a 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1133,11 +1133,11 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
|
||||
@@ -9,7 +9,7 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 861720198a3cbfe198ec328f899cdb6d0fcafdf7..8a733118b17d65ae9e9d5c0949e7f4db1be58716 100644
|
||||
index 5a331960133112c3dd78af932012946f97e423a1..460d85342ce6caaf0a36cdd33b480f84bc379282 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4192,6 +4192,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
|
||||
@@ -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 270e221668e27207970c2e131432d2efa7038a75..9941a16e36331535ef790f342f1c328a26415e31 100644
|
||||
index 0b8a68977fc4dc7d1989197779016402f92f5e7d..a5407b4dc7f9400b4c4c2dcf4fd76ed05fe43ddd 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9107,6 +9107,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -9105,6 +9105,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ index 270e221668e27207970c2e131432d2efa7038a75..9941a16e36331535ef790f342f1c328a
|
||||
if (had_fullscreen_token && !GetView()->HasFocus()) {
|
||||
GetView()->Focus();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 8a733118b17d65ae9e9d5c0949e7f4db1be58716..3079d14e75fe31cdc5f7d49a09b026f5d4f7bc62 100644
|
||||
index 460d85342ce6caaf0a36cdd33b480f84bc379282..98991532c6e05e36be0c10cb907fd51b4b4571bd 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4492,21 +4492,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
|
||||
|
||||
@@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 0f9aaa9b31b96b1310df344f481c5497e8b9780a..8e711da7c19fbf102708368a18edb65e4c8fc46b 100644
|
||||
index 36b734254b0c5836e9765f52587b7a1967c5c486..b7c3a63d126c1f8d83673c456d71c946d50ca067 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -420,6 +420,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -418,6 +418,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
|
||||
initialized.
|
||||
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 8e711da7c19fbf102708368a18edb65e4c8fc46b..be73f8a82ec031899cfaa7a7ddcf9e0170d187ad 100644
|
||||
index b7c3a63d126c1f8d83673c456d71c946d50ca067..a0a6c6815c553ca6a50c49f52ad45055a94fc221 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -420,6 +420,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -418,6 +418,11 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
virtual void DidInitializeWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {}
|
||||
|
||||
|
||||
@@ -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 9a012316cc00c6abdefe46a62c33a1afa33a2e39..6a2f71dafe8d06ed295fe408e2ebb50df349c098 100644
|
||||
index 20e8d49c8585dc2c6cebdd1d4e464b841bab75e6..ec5ece27150747117c6e77be43541ac7d0abef4a 100644
|
||||
--- a/front_end/entrypoints/main/MainImpl.ts
|
||||
+++ b/front_end/entrypoints/main/MainImpl.ts
|
||||
@@ -830,6 +830,8 @@ export class MainImpl {
|
||||
@@ -822,6 +822,8 @@ export class MainImpl {
|
||||
globalThis.Main = globalThis.Main || {};
|
||||
// @ts-expect-error Exported for Tests.js
|
||||
globalThis.Main.Main = MainImpl;
|
||||
|
||||
@@ -128,11 +128,6 @@ def format_patch(repo, since):
|
||||
os.path.dirname(os.path.realpath(__file__)),
|
||||
'electron.gitattributes',
|
||||
),
|
||||
# Pin rename/copy detection to git's default so that patch output is
|
||||
# deterministic regardless of local or system-level diff.renames config
|
||||
# (e.g. 'copies', which would encode similar new files as copies).
|
||||
'-c',
|
||||
'diff.renames=true',
|
||||
# Ensure it is not possible to match anything
|
||||
# Disabled for now as we have consistent chunk headers
|
||||
# '-c',
|
||||
|
||||
@@ -4,11 +4,7 @@
|
||||
|
||||
#include "shell/browser/api/electron_api_notification.h"
|
||||
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/uuid.h"
|
||||
#include "build/build_config.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/browser.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
@@ -20,14 +16,6 @@
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include <windows.h>
|
||||
|
||||
#include "base/no_destructor.h"
|
||||
#include "shell/browser/javascript_environment.h"
|
||||
#include "shell/browser/notifications/win/windows_toast_activator.h"
|
||||
#endif
|
||||
|
||||
namespace gin {
|
||||
|
||||
template <>
|
||||
@@ -264,79 +252,6 @@ bool Notification::IsSupported() {
|
||||
->GetNotificationPresenter();
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
namespace {
|
||||
|
||||
// Helper to convert ActivationArguments to JS object
|
||||
v8::Local<v8::Value> ActivationArgumentsToV8(
|
||||
v8::Isolate* isolate,
|
||||
const electron::ActivationArguments& details) {
|
||||
gin_helper::Dictionary dict = gin_helper::Dictionary::CreateEmpty(isolate);
|
||||
dict.Set("type", details.type);
|
||||
dict.Set("arguments", details.arguments);
|
||||
|
||||
if (details.type == "action") {
|
||||
dict.Set("actionIndex", details.action_index);
|
||||
} else if (details.type == "reply") {
|
||||
dict.Set("reply", details.reply);
|
||||
}
|
||||
|
||||
if (!details.user_inputs.empty()) {
|
||||
gin_helper::Dictionary inputs =
|
||||
gin_helper::Dictionary::CreateEmpty(isolate);
|
||||
for (const auto& [key, value] : details.user_inputs) {
|
||||
inputs.Set(key, value);
|
||||
}
|
||||
dict.Set("userInputs", inputs);
|
||||
}
|
||||
|
||||
return dict.GetHandle();
|
||||
}
|
||||
|
||||
// Storage for the JavaScript callback (persistent so it survives GC).
|
||||
// Uses base::NoDestructor to avoid exit-time destructor issues with globals.
|
||||
// v8::Global supports Reset() for reassignment.
|
||||
base::NoDestructor<v8::Global<v8::Function>> g_js_launch_callback;
|
||||
|
||||
void InvokeJsCallback(const electron::ActivationArguments& details) {
|
||||
if (g_js_launch_callback->IsEmpty())
|
||||
return;
|
||||
|
||||
v8::Isolate* isolate = electron::JavascriptEnvironment::GetIsolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Context> context = isolate->GetCurrentContext();
|
||||
if (context.IsEmpty())
|
||||
return;
|
||||
|
||||
v8::Context::Scope context_scope(context);
|
||||
|
||||
v8::Local<v8::Function> callback = g_js_launch_callback->Get(isolate);
|
||||
v8::Local<v8::Value> argv[] = {ActivationArgumentsToV8(isolate, details)};
|
||||
|
||||
v8::TryCatch try_catch(isolate);
|
||||
callback->Call(context, v8::Undefined(isolate), 1, argv)
|
||||
.FromMaybe(v8::Local<v8::Value>());
|
||||
// Callback stays registered for future activations
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
void Notification::HandleActivation(v8::Isolate* isolate,
|
||||
v8::Local<v8::Function> callback) {
|
||||
// Replace any previous callback using Reset (v8::Global supports this)
|
||||
g_js_launch_callback->Reset(isolate, callback);
|
||||
|
||||
// Register the C++ callback that invokes the JS callback.
|
||||
// - If activation details already exist, callback is invoked immediately.
|
||||
// - Callback remains registered for all future activations.
|
||||
electron::SetActivationHandler(
|
||||
[](const electron::ActivationArguments& details) {
|
||||
InvokeJsCallback(details);
|
||||
});
|
||||
}
|
||||
#endif
|
||||
|
||||
void Notification::FillObjectTemplate(v8::Isolate* isolate,
|
||||
v8::Local<v8::ObjectTemplate> templ) {
|
||||
gin::ObjectTemplateBuilder(isolate, GetClassName(), templ)
|
||||
@@ -385,9 +300,6 @@ void Initialize(v8::Local<v8::Object> exports,
|
||||
gin_helper::Dictionary dict{isolate, exports};
|
||||
dict.Set("Notification", Notification::GetConstructor(isolate, context));
|
||||
dict.SetMethod("isSupported", &Notification::IsSupported);
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
dict.SetMethod("handleActivation", &Notification::HandleActivation);
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "build/build_config.h"
|
||||
#include "shell/browser/event_emitter_mixin.h"
|
||||
#include "shell/browser/notifications/notification.h"
|
||||
#include "shell/browser/notifications/notification_delegate.h"
|
||||
@@ -39,16 +38,6 @@ class Notification final : public gin_helper::DeprecatedWrappable<Notification>,
|
||||
public:
|
||||
static bool IsSupported();
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Register a callback to handle all notification activations.
|
||||
// The callback is invoked for every activation (click, reply, action)
|
||||
// regardless of whether the Notification object is still in memory.
|
||||
// If an activation already occurred, callback is invoked immediately.
|
||||
// Callback remains registered until replaced by another call.
|
||||
static void HandleActivation(v8::Isolate* isolate,
|
||||
v8::Local<v8::Function> callback);
|
||||
#endif
|
||||
|
||||
// gin_helper::Constructible
|
||||
static gin_helper::Handle<Notification> New(gin_helper::ErrorThrower thrower,
|
||||
gin::Arguments* args);
|
||||
|
||||
@@ -80,14 +80,6 @@ PowerMonitor::PowerMonitor() {
|
||||
}
|
||||
|
||||
PowerMonitor::~PowerMonitor() {
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
DestroyPlatformSpecificMonitors();
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
Browser::Get()->SetShutdownHandler(base::RepeatingCallback<bool()>());
|
||||
#endif
|
||||
|
||||
auto* power_monitor = base::PowerMonitor::GetInstance();
|
||||
power_monitor->RemovePowerStateObserver(this);
|
||||
power_monitor->RemovePowerSuspendObserver(this);
|
||||
|
||||
@@ -54,7 +54,6 @@ class PowerMonitor final : public gin::Wrappable<PowerMonitor>,
|
||||
|
||||
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
|
||||
void InitPlatformSpecificMonitors();
|
||||
void DestroyPlatformSpecificMonitors();
|
||||
#endif
|
||||
|
||||
// base::PowerStateObserver implementations:
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
}
|
||||
|
||||
- (void)addEmitter:(electron::api::PowerMonitor*)monitor_;
|
||||
- (void)removeEmitter:(electron::api::PowerMonitor*)monitor_;
|
||||
|
||||
@end
|
||||
|
||||
@@ -63,10 +62,6 @@
|
||||
self->emitters.push_back(monitor_);
|
||||
}
|
||||
|
||||
- (void)removeEmitter:(electron::api::PowerMonitor*)monitor_ {
|
||||
std::erase(self->emitters, monitor_);
|
||||
}
|
||||
|
||||
- (void)onScreenLocked:(NSNotification*)notification {
|
||||
for (auto* emitter : self->emitters) {
|
||||
emitter->Emit("lock-screen");
|
||||
@@ -103,9 +98,4 @@ void PowerMonitor::InitPlatformSpecificMonitors() {
|
||||
[g_lock_monitor addEmitter:this];
|
||||
}
|
||||
|
||||
void PowerMonitor::DestroyPlatformSpecificMonitors() {
|
||||
if (g_lock_monitor)
|
||||
[g_lock_monitor removeEmitter:this];
|
||||
}
|
||||
|
||||
} // namespace electron::api
|
||||
|
||||
@@ -49,20 +49,6 @@ void PowerMonitor::InitPlatformSpecificMonitors() {
|
||||
DEVICE_NOTIFY_WINDOW_HANDLE);
|
||||
}
|
||||
|
||||
void PowerMonitor::DestroyPlatformSpecificMonitors() {
|
||||
if (window_) {
|
||||
WTSUnRegisterSessionNotification(window_);
|
||||
UnregisterSuspendResumeNotification(static_cast<HANDLE>(window_));
|
||||
gfx::SetWindowUserData(window_, nullptr);
|
||||
DestroyWindow(window_);
|
||||
window_ = nullptr;
|
||||
}
|
||||
if (atom_) {
|
||||
UnregisterClass(MAKEINTATOM(atom_), instance_);
|
||||
atom_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
LRESULT CALLBACK PowerMonitor::WndProcStatic(HWND hwnd,
|
||||
UINT message,
|
||||
WPARAM wparam,
|
||||
@@ -90,7 +76,7 @@ LRESULT CALLBACK PowerMonitor::WndProc(HWND hwnd,
|
||||
}
|
||||
if (should_treat_as_current_session) {
|
||||
if (wparam == WTS_SESSION_LOCK) {
|
||||
// SelfKeepAlive prevents GC of this object, so Unretained is safe.
|
||||
// Unretained is OK because this object is eternally pinned.
|
||||
content::GetUIThreadTaskRunner({})->PostTask(
|
||||
FROM_HERE,
|
||||
base::BindOnce([](PowerMonitor* pm) { pm->Emit("lock-screen"); },
|
||||
|
||||
@@ -32,6 +32,10 @@
|
||||
#include "shell/browser/linux/x11_util.h"
|
||||
#endif
|
||||
|
||||
#if defined(USE_OZONE)
|
||||
#include "ui/ozone/public/ozone_platform.h"
|
||||
#endif
|
||||
|
||||
namespace electron::api {
|
||||
|
||||
const gin::WrapperInfo Screen::kWrapperInfo = {{gin::kEmbedderNativeGin},
|
||||
@@ -90,9 +94,16 @@ Screen::~Screen() {
|
||||
}
|
||||
|
||||
gfx::Point Screen::GetCursorScreenPoint(v8::Isolate* isolate) {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
if (x11_util::IsWayland())
|
||||
#if defined(USE_OZONE)
|
||||
// Wayland will crash unless a window is created prior to calling
|
||||
// GetCursorScreenPoint.
|
||||
if (!ui::OzonePlatform::IsInitialized()) {
|
||||
gin_helper::ErrorThrower thrower(isolate);
|
||||
thrower.ThrowError(
|
||||
"screen.getCursorScreenPoint() cannot be called before a window has "
|
||||
"been created.");
|
||||
return {};
|
||||
}
|
||||
#endif
|
||||
auto* screen = GetDisplayScreen();
|
||||
return screen ? screen->GetCursorScreenPoint() : gfx::Point{};
|
||||
|
||||
@@ -243,8 +243,7 @@ void ServiceWorkerContext::DidStartWorkerForScope(
|
||||
std::shared_ptr<gin_helper::Promise<v8::Local<v8::Value>>> shared_promise,
|
||||
int64_t version_id,
|
||||
int process_id,
|
||||
int thread_id,
|
||||
const blink::ServiceWorkerToken& token) {
|
||||
int thread_id) {
|
||||
v8::Isolate* isolate = shared_promise->isolate();
|
||||
v8::HandleScope handle_scope(isolate);
|
||||
v8::Local<v8::Value> service_worker_main =
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include "shell/browser/event_emitter_mixin.h"
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
#include "third_party/blink/public/common/service_worker/embedded_worker_status.h"
|
||||
#include "third_party/blink/public/common/tokens/tokens.h"
|
||||
|
||||
namespace content {
|
||||
class StoragePartition;
|
||||
@@ -56,8 +55,7 @@ class ServiceWorkerContext final
|
||||
std::shared_ptr<gin_helper::Promise<v8::Local<v8::Value>>> shared_promise,
|
||||
int64_t version_id,
|
||||
int process_id,
|
||||
int thread_id,
|
||||
const blink::ServiceWorkerToken& token);
|
||||
int thread_id);
|
||||
void DidFailToStartWorkerForScope(
|
||||
std::shared_ptr<gin_helper::Promise<v8::Local<v8::Value>>> shared_promise,
|
||||
content::StatusCodeResponse status);
|
||||
|
||||
@@ -244,7 +244,7 @@ void UtilityProcessWrapper::OnServiceProcessLaunch(
|
||||
EmitWithoutEvent("spawn");
|
||||
}
|
||||
|
||||
void UtilityProcessWrapper::HandleTermination(uint32_t exit_code) {
|
||||
void UtilityProcessWrapper::HandleTermination(uint64_t exit_code) {
|
||||
// HandleTermination is called from multiple callsites,
|
||||
// we need to ensure we only process it for the first callsite.
|
||||
if (terminated_)
|
||||
@@ -312,7 +312,7 @@ void UtilityProcessWrapper::CloseConnectorPort() {
|
||||
}
|
||||
}
|
||||
|
||||
void UtilityProcessWrapper::Shutdown(uint32_t exit_code) {
|
||||
void UtilityProcessWrapper::Shutdown(uint64_t exit_code) {
|
||||
node_service_remote_.reset();
|
||||
HandleTermination(exit_code);
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ class UtilityProcessWrapper final
|
||||
static gin_helper::Handle<UtilityProcessWrapper> Create(gin::Arguments* args);
|
||||
static raw_ptr<UtilityProcessWrapper> FromProcessId(base::ProcessId pid);
|
||||
|
||||
void Shutdown(uint32_t exit_code);
|
||||
void Shutdown(uint64_t exit_code);
|
||||
|
||||
// gin_helper::Wrappable
|
||||
static gin::DeprecatedWrapperInfo kWrapperInfo;
|
||||
@@ -78,7 +78,7 @@ class UtilityProcessWrapper final
|
||||
void OnServiceProcessLaunch(const base::Process& process);
|
||||
void CloseConnectorPort();
|
||||
|
||||
void HandleTermination(uint32_t exit_code);
|
||||
void HandleTermination(uint64_t exit_code);
|
||||
|
||||
void PostMessage(gin::Arguments* args);
|
||||
bool Kill();
|
||||
|
||||
@@ -429,7 +429,6 @@ namespace {
|
||||
// Global toggle for disabling draggable regions checks.
|
||||
bool g_disable_draggable_regions = false;
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINTING)
|
||||
// Constants we use for printing.
|
||||
constexpr char kFrom[] = "from";
|
||||
constexpr char kTo[] = "to";
|
||||
@@ -459,7 +458,6 @@ constexpr char kFooterTemplate[] = "footerTemplate";
|
||||
constexpr char kPreferCSSPageSize[] = "preferCSSPageSize";
|
||||
constexpr char kGenerateTaggedPDF[] = "generateTaggedPDF";
|
||||
constexpr char kGenerateDocumentOutline[] = "generateDocumentOutline";
|
||||
#endif // BUILDFLAG(ENABLE_PRINTING)
|
||||
|
||||
constexpr std::string_view CursorTypeToString(
|
||||
ui::mojom::CursorType cursor_type) {
|
||||
@@ -1652,32 +1650,11 @@ void WebContents::RendererResponsive(
|
||||
|
||||
bool WebContents::HandleContextMenu(content::RenderFrameHost& render_frame_host,
|
||||
const content::ContextMenuParams& params) {
|
||||
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
|
||||
ui::ClipboardBuffer::kCopyPaste, std::nullopt,
|
||||
base::BindOnce(&WebContents::OnReadAvailableTypes, GetWeakPtr(), params,
|
||||
render_frame_host.GetGlobalId()));
|
||||
Emit("context-menu", std::make_pair(params, &render_frame_host));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void WebContents::OnReadAvailableTypes(
|
||||
const content::ContextMenuParams& params,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
std::vector<std::u16string> types) {
|
||||
content::RenderFrameHost* render_frame_host =
|
||||
content::RenderFrameHost::FromID(render_frame_host_id);
|
||||
if (!render_frame_host) {
|
||||
return;
|
||||
}
|
||||
|
||||
ContextMenuParamsWithRenderFrameHost event_data{
|
||||
params,
|
||||
render_frame_host,
|
||||
!types.empty(),
|
||||
};
|
||||
Emit("context-menu", event_data);
|
||||
}
|
||||
|
||||
void WebContents::FindReply(content::WebContents* web_contents,
|
||||
int request_id,
|
||||
int number_of_matches,
|
||||
@@ -2288,11 +2265,6 @@ void WebContents::DidUpdateFaviconURL(
|
||||
iter->icon_url.is_valid())
|
||||
unique_urls.insert(iter->icon_url);
|
||||
}
|
||||
// Only emit if favicon URLs actually changed
|
||||
if (unique_urls == last_favicon_urls_)
|
||||
return;
|
||||
last_favicon_urls_ = unique_urls;
|
||||
|
||||
Emit("page-favicon-updated", unique_urls);
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/containers/flat_set.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/memory/raw_ptr_exclusion.h"
|
||||
@@ -463,9 +462,6 @@ class WebContents final : public ExclusiveAccessContext,
|
||||
WebContents& operator=(const WebContents&) = delete;
|
||||
|
||||
private:
|
||||
// Store last emitted favicon URLs to avoid duplicate page-favicon-updated
|
||||
// events
|
||||
base::flat_set<GURL> last_favicon_urls_;
|
||||
// Does not manage lifetime of |web_contents|.
|
||||
WebContents(v8::Isolate* isolate, content::WebContents* web_contents);
|
||||
// Takes over ownership of |web_contents|.
|
||||
@@ -779,11 +775,6 @@ class WebContents final : public ExclusiveAccessContext,
|
||||
// Update the html fullscreen flag in both browser and renderer.
|
||||
void UpdateHtmlApiFullscreen(bool fullscreen);
|
||||
|
||||
void OnReadAvailableTypes(
|
||||
const content::ContextMenuParams& params,
|
||||
content::GlobalRenderFrameHostId render_frame_host_id,
|
||||
std::vector<std::u16string> types);
|
||||
|
||||
cppgc::Persistent<api::Session> session_;
|
||||
v8::Global<v8::Value> devtools_web_contents_;
|
||||
cppgc::Persistent<api::Debugger> debugger_;
|
||||
|
||||
@@ -4,27 +4,13 @@
|
||||
|
||||
#include "shell/browser/linux/x11_util.h"
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "ui/ozone/platform_selection.h" // nogncheck
|
||||
|
||||
namespace x11_util {
|
||||
|
||||
bool IsX11() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
static const bool is = ui::GetOzonePlatformId() == ui::kPlatformX11;
|
||||
return is;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool IsWayland() {
|
||||
#if BUILDFLAG(IS_LINUX)
|
||||
static const bool is = ui::GetOzonePlatformId() == ui::kPlatformWayland;
|
||||
return is;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
static const bool is_x11 = ui::GetOzonePlatformId() == ui::kPlatformX11;
|
||||
return is_x11;
|
||||
}
|
||||
|
||||
} // namespace x11_util
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
namespace x11_util {
|
||||
|
||||
[[nodiscard]] bool IsX11();
|
||||
[[nodiscard]] bool IsWayland();
|
||||
bool IsX11();
|
||||
|
||||
} // namespace x11_util
|
||||
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
#include "net/base/filename_util.h"
|
||||
#include "net/http/http_request_headers.h"
|
||||
#include "net/http/http_status_code.h"
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/url_request/redirect_util.h"
|
||||
#include "services/network/public/cpp/resource_request.h"
|
||||
#include "services/network/public/cpp/shared_url_loader_factory.h"
|
||||
@@ -139,17 +138,13 @@ network::mojom::URLResponseHeadPtr ToResponseHead(
|
||||
base::DictValue headers;
|
||||
if (dict.Get("headers", &headers)) {
|
||||
for (const auto iter : headers) {
|
||||
if (!net::HttpUtil::IsValidHeaderName(iter.first))
|
||||
continue;
|
||||
if (iter.second.is_string()) {
|
||||
// key, value
|
||||
if (net::HttpUtil::IsValidHeaderValue(iter.second.GetString()))
|
||||
head->headers->AddHeader(iter.first, iter.second.GetString());
|
||||
head->headers->AddHeader(iter.first, iter.second.GetString());
|
||||
} else if (iter.second.is_list()) {
|
||||
// key: [values...]
|
||||
for (const auto& item : iter.second.GetList()) {
|
||||
if (item.is_string() &&
|
||||
net::HttpUtil::IsValidHeaderValue(item.GetString()))
|
||||
if (item.is_string())
|
||||
head->headers->AddHeader(iter.first, item.GetString());
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
#undef StrCat
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -27,7 +26,6 @@
|
||||
#include "base/hash/hash.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/no_destructor.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_number_conversions_win.h"
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -47,43 +45,8 @@
|
||||
|
||||
namespace electron {
|
||||
|
||||
ActivationArguments::ActivationArguments() = default;
|
||||
ActivationArguments::~ActivationArguments() = default;
|
||||
ActivationArguments::ActivationArguments(const ActivationArguments&) = default;
|
||||
ActivationArguments& ActivationArguments::operator=(
|
||||
const ActivationArguments&) = default;
|
||||
|
||||
// Use NoDestructor to avoid exit-time destructor issues with globals.
|
||||
// unique_ptr provides automatic memory management.
|
||||
base::NoDestructor<std::unique_ptr<ActivationArguments>> g_activation_arguments;
|
||||
base::NoDestructor<std::unique_ptr<ActivationCallback>> g_launch_callback;
|
||||
|
||||
void SetActivationHandler(ActivationCallback callback) {
|
||||
*g_launch_callback =
|
||||
std::make_unique<ActivationCallback>(std::move(callback));
|
||||
|
||||
// If we already have stored details (late subscription), invoke immediately
|
||||
if (*g_activation_arguments) {
|
||||
(**g_launch_callback)(**g_activation_arguments);
|
||||
// Clear the details after handling
|
||||
g_activation_arguments->reset();
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
ActivationArguments& GetOrCreateActivationArguments() {
|
||||
if (!*g_activation_arguments)
|
||||
*g_activation_arguments = std::make_unique<ActivationArguments>();
|
||||
return **g_activation_arguments;
|
||||
}
|
||||
|
||||
void DebugLog(std::string_view log_msg) {
|
||||
if (electron::debug_notifications) {
|
||||
LOG(INFO) << log_msg;
|
||||
}
|
||||
}
|
||||
|
||||
class NotificationActivatorFactory final : public IClassFactory {
|
||||
public:
|
||||
NotificationActivatorFactory() : ref_count_(1) {}
|
||||
@@ -360,11 +323,6 @@ IFACEMETHODIMP NotificationActivator::Activate(
|
||||
std::wstring args = invoked_args ? invoked_args : L"";
|
||||
std::wstring aumid = app_user_model_id ? app_user_model_id : L"";
|
||||
|
||||
DebugLog("=== NotificationActivator::Activate CALLED ===");
|
||||
DebugLog(" AUMID: " + base::WideToUTF8(aumid));
|
||||
DebugLog(" Args: " + base::WideToUTF8(args));
|
||||
DebugLog(" Data count: " + base::NumberToString(data_count));
|
||||
|
||||
std::vector<ActivationUserInput> copied_inputs;
|
||||
if (data && data_count) {
|
||||
std::vector<NOTIFICATION_USER_INPUT_DATA> temp;
|
||||
@@ -389,10 +347,6 @@ IFACEMETHODIMP NotificationActivator::Activate(
|
||||
|
||||
void HandleToastActivation(const std::wstring& invoked_args,
|
||||
std::vector<ActivationUserInput> inputs) {
|
||||
DebugLog("=== HandleToastActivation CALLED ===");
|
||||
DebugLog(" invoked_args: " + base::WideToUTF8(invoked_args));
|
||||
DebugLog(" inputs count: " + base::NumberToString(inputs.size()));
|
||||
|
||||
// Expected invoked_args format:
|
||||
// type=<click|action|reply>&action=<index>&tag=<hash> Parse simple key=value
|
||||
// pairs separated by '&'.
|
||||
@@ -428,68 +382,14 @@ void HandleToastActivation(const std::wstring& invoked_args,
|
||||
}
|
||||
}
|
||||
|
||||
auto build_activation_args = [&]() -> ActivationArguments {
|
||||
ActivationArguments args;
|
||||
args.arguments = base::WideToUTF8(invoked_args);
|
||||
|
||||
if (type == L"action") {
|
||||
args.type = "action";
|
||||
args.action_index = action_index;
|
||||
} else if (type == L"reply" || !reply_text.empty()) {
|
||||
args.type = "reply";
|
||||
args.reply = reply_text;
|
||||
} else {
|
||||
args.type = "click";
|
||||
}
|
||||
|
||||
// Store all user inputs
|
||||
for (const auto& entry : inputs) {
|
||||
args.user_inputs[base::WideToUTF8(entry.key)] =
|
||||
base::WideToUTF8(entry.value);
|
||||
}
|
||||
|
||||
return args;
|
||||
};
|
||||
|
||||
// Helper to invoke or store callback
|
||||
auto handle_callback = [&](const ActivationArguments& args) {
|
||||
if (*g_launch_callback) {
|
||||
// Callback registered - invoke it (callback stays registered for future)
|
||||
DebugLog("Invoking registered activation callback");
|
||||
(**g_launch_callback)(args);
|
||||
// Clear any stored details (callback handled it)
|
||||
g_activation_arguments->reset();
|
||||
} else {
|
||||
// No callback yet - store details for late subscription
|
||||
DebugLog("Storing activation details (no callback registered yet)");
|
||||
auto& details = GetOrCreateActivationArguments();
|
||||
details = args;
|
||||
}
|
||||
};
|
||||
|
||||
auto* browser_client =
|
||||
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get());
|
||||
DebugLog(std::string("browser_client = ") +
|
||||
(browser_client ? "valid" : "NULL"));
|
||||
if (!browser_client) {
|
||||
// App not fully initialized - store for later retrieval
|
||||
DebugLog("App not initialized - storing details");
|
||||
handle_callback(build_activation_args());
|
||||
if (!browser_client)
|
||||
return;
|
||||
}
|
||||
|
||||
NotificationPresenter* presenter = browser_client->GetNotificationPresenter();
|
||||
DebugLog(std::string("presenter = ") + (presenter ? "valid" : "NULL"));
|
||||
if (!presenter) {
|
||||
// Presenter not ready - store for later retrieval
|
||||
DebugLog("Presenter not ready - storing details");
|
||||
handle_callback(build_activation_args());
|
||||
if (!presenter)
|
||||
return;
|
||||
}
|
||||
|
||||
ActivationArguments activation_args = build_activation_args();
|
||||
DebugLog("Activation: type=" + activation_args.type);
|
||||
handle_callback(activation_args);
|
||||
|
||||
Notification* target = nullptr;
|
||||
for (auto* n : presenter->notifications()) {
|
||||
@@ -501,12 +401,9 @@ void HandleToastActivation(const std::wstring& invoked_args,
|
||||
}
|
||||
}
|
||||
|
||||
if (!target) {
|
||||
DebugLog("No matching Notification object found");
|
||||
if (!target)
|
||||
return;
|
||||
}
|
||||
|
||||
DebugLog("Dispatching to Notification object delegate");
|
||||
if (type == L"action" && target->delegate()) {
|
||||
int selection_index = -1;
|
||||
for (const auto& entry : inputs) {
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
#include <NotificationActivationCallback.h>
|
||||
#include <windows.h>
|
||||
#include <wrl/implements.h>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@@ -43,32 +41,9 @@ struct ActivationUserInput {
|
||||
std::wstring value;
|
||||
};
|
||||
|
||||
// Arguments from a notification activation when the app was launched cold
|
||||
// (no existing notification object to receive the event)
|
||||
struct ActivationArguments {
|
||||
ActivationArguments();
|
||||
~ActivationArguments();
|
||||
ActivationArguments(const ActivationArguments&);
|
||||
ActivationArguments& operator=(const ActivationArguments&);
|
||||
|
||||
std::string type; // "click", "action", or "reply"
|
||||
int action_index = -1; // For action type, the button index
|
||||
std::string reply; // For reply type, the user's reply text
|
||||
std::string arguments; // Raw activation arguments
|
||||
std::map<std::string, std::string> user_inputs; // All user inputs
|
||||
};
|
||||
|
||||
void HandleToastActivation(const std::wstring& invoked_args,
|
||||
std::vector<ActivationUserInput> inputs);
|
||||
|
||||
// Callback type for launch activation handler
|
||||
using ActivationCallback = std::function<void(const ActivationArguments&)>;
|
||||
|
||||
// Set a callback to handle notification activation.
|
||||
// If details already exist, callback is invoked immediately.
|
||||
// Callback remains registered for all future activations.
|
||||
void SetActivationHandler(ActivationCallback callback);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_ACTIVATOR_H_
|
||||
|
||||
@@ -67,11 +67,9 @@ AutofillPopupView::~AutofillPopupView() {
|
||||
}
|
||||
|
||||
void AutofillPopupView::Show() {
|
||||
if (!popup_)
|
||||
return;
|
||||
bool visible = parent_widget_->IsVisible();
|
||||
visible = visible || view_proxy_;
|
||||
if (!visible || parent_widget_->IsClosed())
|
||||
if (!popup_ || !visible || parent_widget_->IsClosed())
|
||||
return;
|
||||
|
||||
const bool initialize_widget = !GetWidget();
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "components/input/native_web_keyboard_event.h"
|
||||
#include "shell/browser/native_window.h"
|
||||
#include "shell/browser/ui/views/menu_bar.h"
|
||||
#include "ui/events/keycodes/dom/keycode_converter.h"
|
||||
#include "ui/views/layout/box_layout.h"
|
||||
|
||||
namespace electron {
|
||||
@@ -21,9 +22,21 @@ bool IsAltKey(const input::NativeWebKeyboardEvent& event) {
|
||||
|
||||
bool IsAltModifier(const input::NativeWebKeyboardEvent& event) {
|
||||
using Mods = input::NativeWebKeyboardEvent::Modifiers;
|
||||
|
||||
// AltGraph (AltGr) should not be treated as a single Alt keypress for
|
||||
// menu-bar toggling.
|
||||
if (event.windows_key_code == ui::VKEY_ALTGR ||
|
||||
ui::KeycodeConverter::DomKeyToKeyString(event.dom_key) == "AltGraph") {
|
||||
return false;
|
||||
}
|
||||
|
||||
return (event.GetModifiers() & Mods::kKeyModifiers) == Mods::kAltKey;
|
||||
}
|
||||
|
||||
bool IsSingleAltKey(const input::NativeWebKeyboardEvent& event) {
|
||||
return IsAltKey(event) && IsAltModifier(event);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
RootView::RootView(NativeWindow* window)
|
||||
@@ -98,7 +111,7 @@ void RootView::HandleKeyEvent(const input::NativeWebKeyboardEvent& event) {
|
||||
return;
|
||||
|
||||
// Show accelerator when "Alt" is pressed.
|
||||
if (menu_bar_visible_ && IsAltKey(event))
|
||||
if (menu_bar_visible_ && IsSingleAltKey(event))
|
||||
menu_bar_->SetAcceleratorVisibility(
|
||||
event.GetType() == blink::WebInputEvent::Type::kRawKeyDown);
|
||||
|
||||
@@ -121,11 +134,11 @@ void RootView::HandleKeyEvent(const input::NativeWebKeyboardEvent& event) {
|
||||
|
||||
// Toggle the menu bar only when a single Alt is released.
|
||||
if (event.GetType() == blink::WebInputEvent::Type::kRawKeyDown &&
|
||||
IsAltKey(event)) {
|
||||
IsSingleAltKey(event)) {
|
||||
// When a single Alt is pressed:
|
||||
menu_bar_alt_pressed_ = true;
|
||||
} else if (event.GetType() == blink::WebInputEvent::Type::kKeyUp &&
|
||||
IsAltKey(event) && menu_bar_alt_pressed_) {
|
||||
IsSingleAltKey(event) && menu_bar_alt_pressed_) {
|
||||
// When a single Alt is released right after a Alt is pressed:
|
||||
menu_bar_alt_pressed_ = false;
|
||||
if (menu_bar_autohide_)
|
||||
|
||||
@@ -343,6 +343,9 @@ void WebContentsPreferences::AppendCommandLineSwitches(
|
||||
command_line->AppendSwitchASCII(::switches::kDisableBlinkFeatures,
|
||||
*disable_blink_features_);
|
||||
|
||||
if (node_integration_in_worker_)
|
||||
command_line->AppendSwitch(switches::kNodeIntegrationInWorker);
|
||||
|
||||
// We are appending args to a webContents so let's save the current state
|
||||
// of our preferences object so that during the lifetime of the WebContents
|
||||
// we can fetch the options used to initially configure the WebContents
|
||||
|
||||
@@ -40,20 +40,8 @@ std::vector<std::u16string> Clipboard::AvailableFormats(
|
||||
gin::Arguments* const args) {
|
||||
std::vector<std::u16string> format_types;
|
||||
ui::Clipboard* clipboard = ui::Clipboard::GetForCurrentThread();
|
||||
|
||||
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
|
||||
clipboard->ReadAvailableTypes(
|
||||
GetClipboardBuffer(args),
|
||||
/* data_dst = */ std::nullopt,
|
||||
base::BindOnce(
|
||||
[](std::vector<std::u16string>* out, base::OnceClosure quit,
|
||||
std::vector<std::u16string> result) {
|
||||
*out = std::move(result);
|
||||
std::move(quit).Run();
|
||||
},
|
||||
&format_types, run_loop.QuitClosure()));
|
||||
run_loop.Run();
|
||||
|
||||
clipboard->ReadAvailableTypes(GetClipboardBuffer(args),
|
||||
/* data_dst = */ nullptr, &format_types);
|
||||
return format_types;
|
||||
}
|
||||
|
||||
@@ -83,19 +71,7 @@ std::string Clipboard::Read(const std::string& format_string) {
|
||||
#endif
|
||||
if (rawFormatAvailable) {
|
||||
std::string data;
|
||||
|
||||
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
|
||||
clipboard->ReadData(
|
||||
rawFormat,
|
||||
/* data_dst = */ std::nullopt,
|
||||
base::BindOnce(
|
||||
[](std::string* out, base::OnceClosure quit, std::string result) {
|
||||
*out = std::move(result);
|
||||
std::move(quit).Run();
|
||||
},
|
||||
&data, run_loop.QuitClosure()));
|
||||
run_loop.Run();
|
||||
|
||||
clipboard->ReadData(rawFormat, /* data_dst = */ nullptr, &data);
|
||||
return data;
|
||||
}
|
||||
// Otherwise, resolve custom format names
|
||||
@@ -139,19 +115,7 @@ std::string Clipboard::Read(const std::string& format_string) {
|
||||
ui::ClipboardFormatType::CustomPlatformType(format_string));
|
||||
}
|
||||
std::string data;
|
||||
|
||||
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
|
||||
clipboard->ReadData(
|
||||
format,
|
||||
/* data_dst = */ std::nullopt,
|
||||
base::BindOnce(
|
||||
[](std::string* out, base::OnceClosure quit, std::string result) {
|
||||
*out = std::move(result);
|
||||
std::move(quit).Run();
|
||||
},
|
||||
&data, run_loop.QuitClosure()));
|
||||
run_loop.Run();
|
||||
|
||||
clipboard->ReadData(format, /* data_dst = */ nullptr, &data);
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -212,34 +176,14 @@ std::u16string Clipboard::ReadText(gin::Arguments* const args) {
|
||||
auto type = GetClipboardBuffer(args);
|
||||
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::PlainTextType(),
|
||||
type, /* data_dst = */ nullptr)) {
|
||||
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
|
||||
clipboard->ReadText(type,
|
||||
/* data_dst = */ std::nullopt,
|
||||
base::BindOnce(
|
||||
[](std::u16string* out, base::OnceClosure quit,
|
||||
std::u16string result) {
|
||||
*out = std::move(result);
|
||||
std::move(quit).Run();
|
||||
},
|
||||
&data, run_loop.QuitClosure()));
|
||||
run_loop.Run();
|
||||
clipboard->ReadText(type, /* data_dst = */ nullptr, &data);
|
||||
} else {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
if (clipboard->IsFormatAvailable(ui::ClipboardFormatType::PlainTextAType(),
|
||||
type,
|
||||
/* data_dst = */ nullptr)) {
|
||||
std::string result;
|
||||
base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
|
||||
clipboard->ReadAsciiText(
|
||||
type,
|
||||
/* data_dst = */ std::nullopt,
|
||||
base::BindOnce(
|
||||
[](std::string* out, base::OnceClosure quit, std::string value) {
|
||||
*out = std::move(value);
|
||||
std::move(quit).Run();
|
||||
},
|
||||
&result, run_loop.QuitClosure()));
|
||||
run_loop.Run();
|
||||
clipboard->ReadAsciiText(type, /* data_dst = */ nullptr, &result);
|
||||
data = base::ASCIIToUTF16(result);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "shell/common/gin_converters/blink_converter.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
@@ -615,9 +614,7 @@ Converter<std::optional<blink::mojom::FormControlType>>::ToV8(
|
||||
return StringToV8(isolate, str);
|
||||
}
|
||||
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate,
|
||||
int editFlags,
|
||||
bool is_paste_enabled) {
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags) {
|
||||
auto dict = gin_helper::Dictionary::CreateEmpty(isolate);
|
||||
dict.Set("canUndo",
|
||||
!!(editFlags & blink::ContextMenuDataEditFlags::kCanUndo));
|
||||
@@ -626,11 +623,16 @@ v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate,
|
||||
dict.Set("canCut", !!(editFlags & blink::ContextMenuDataEditFlags::kCanCut));
|
||||
dict.Set("canCopy",
|
||||
!!(editFlags & blink::ContextMenuDataEditFlags::kCanCopy));
|
||||
|
||||
bool pasteFlag = false;
|
||||
if (editFlags & blink::ContextMenuDataEditFlags::kCanPaste) {
|
||||
pasteFlag = is_paste_enabled;
|
||||
std::vector<std::u16string> types;
|
||||
ui::Clipboard::GetForCurrentThread()->ReadAvailableTypes(
|
||||
ui::ClipboardBuffer::kCopyPaste, /* data_dst = */ nullptr, &types);
|
||||
pasteFlag = !types.empty();
|
||||
}
|
||||
dict.Set("canPaste", pasteFlag);
|
||||
|
||||
dict.Set("canDelete",
|
||||
!!(editFlags & blink::ContextMenuDataEditFlags::kCanDelete));
|
||||
dict.Set("canSelectAll",
|
||||
|
||||
@@ -135,9 +135,7 @@ struct Converter<blink::mojom::ConsoleMessageLevel> {
|
||||
const blink::mojom::ConsoleMessageLevel& in);
|
||||
};
|
||||
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate,
|
||||
int editFlags,
|
||||
bool is_paste_enabled);
|
||||
v8::Local<v8::Value> EditFlagsToV8(v8::Isolate* isolate, int editFlags);
|
||||
v8::Local<v8::Value> MediaFlagsToV8(v8::Isolate* isolate, int mediaFlags);
|
||||
|
||||
} // namespace gin
|
||||
|
||||
@@ -89,8 +89,8 @@ v8::Local<v8::Value> Converter<blink::mojom::MenuItem::Type>::ToV8(
|
||||
v8::Local<v8::Value> Converter<ContextMenuParamsWithRenderFrameHost>::ToV8(
|
||||
v8::Isolate* isolate,
|
||||
const ContextMenuParamsWithRenderFrameHost& val) {
|
||||
const auto& params = val.params;
|
||||
content::RenderFrameHost* render_frame_host = val.render_frame_host;
|
||||
const auto& params = val.first;
|
||||
content::RenderFrameHost* render_frame_host = val.second;
|
||||
auto dict = gin_helper::Dictionary::CreateEmpty(isolate);
|
||||
dict.SetGetter("frame", render_frame_host, v8::DontEnum);
|
||||
dict.Set("x", params.x);
|
||||
@@ -107,8 +107,7 @@ v8::Local<v8::Value> Converter<ContextMenuParamsWithRenderFrameHost>::ToV8(
|
||||
params.has_image_contents;
|
||||
dict.Set("hasImageContents", has_image_contents);
|
||||
dict.Set("isEditable", params.is_editable);
|
||||
dict.Set("editFlags",
|
||||
EditFlagsToV8(isolate, params.edit_flags, val.is_paste_enabled));
|
||||
dict.Set("editFlags", EditFlagsToV8(isolate, params.edit_flags));
|
||||
dict.Set("selectionText", params.selection_text);
|
||||
dict.Set("titleText", params.title_text);
|
||||
dict.Set("altText", params.alt_text);
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "content/public/browser/context_menu_params.h"
|
||||
#include "content/public/common/referrer.h"
|
||||
#include "content/public/common/stop_find_action.h"
|
||||
#include "gin/converter.h"
|
||||
@@ -28,11 +26,8 @@ namespace input {
|
||||
struct NativeWebKeyboardEvent;
|
||||
}
|
||||
|
||||
struct ContextMenuParamsWithRenderFrameHost {
|
||||
content::ContextMenuParams params;
|
||||
raw_ptr<content::RenderFrameHost> render_frame_host;
|
||||
bool is_paste_enabled;
|
||||
};
|
||||
using ContextMenuParamsWithRenderFrameHost =
|
||||
std::pair<content::ContextMenuParams, content::RenderFrameHost*>;
|
||||
|
||||
namespace gin {
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
#include "net/cert/x509_certificate.h"
|
||||
#include "net/cert/x509_util.h"
|
||||
#include "net/http/http_response_headers.h"
|
||||
#include "net/http/http_util.h"
|
||||
#include "net/http/http_version.h"
|
||||
#include "net/url_request/redirect_info.h"
|
||||
#include "services/network/public/cpp/data_element.h"
|
||||
@@ -199,10 +198,6 @@ bool Converter<net::HttpResponseHeaders*>::FromV8(
|
||||
}
|
||||
std::string value;
|
||||
gin::ConvertFromV8(isolate, localStrVal, &value);
|
||||
if (!net::HttpUtil::IsValidHeaderName(key) ||
|
||||
!net::HttpUtil::IsValidHeaderValue(value)) {
|
||||
return false;
|
||||
}
|
||||
out->AddHeader(key, value);
|
||||
return true;
|
||||
};
|
||||
|
||||
@@ -279,6 +279,10 @@ inline constexpr base::cstring_view kAppPath = "app-path";
|
||||
// The command line switch versions of the options.
|
||||
inline constexpr base::cstring_view kScrollBounce = "scroll-bounce";
|
||||
|
||||
// Command switch passed to renderer process to control nodeIntegration.
|
||||
inline constexpr base::cstring_view kNodeIntegrationInWorker =
|
||||
"node-integration-in-worker";
|
||||
|
||||
// Widevine options
|
||||
// Path to Widevine CDM binaries.
|
||||
inline constexpr base::cstring_view kWidevineCdmPath = "widevine-cdm-path";
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
#include "shell/renderer/api/electron_api_context_bridge.h"
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@@ -828,18 +827,13 @@ void ExposeAPIInWorld(v8::Isolate* isolate,
|
||||
ExposeAPI(isolate, source_context, target_isolate, target_context, key, api);
|
||||
}
|
||||
|
||||
std::optional<gin_helper::Dictionary> TraceKeyPath(
|
||||
const gin_helper::Dictionary& start,
|
||||
const std::vector<std::string>& key_path,
|
||||
bool allow_silent_failure) {
|
||||
gin_helper::Dictionary TraceKeyPath(const gin_helper::Dictionary& start,
|
||||
const std::vector<std::string>& key_path) {
|
||||
gin_helper::Dictionary current = start;
|
||||
for (size_t i = 0; i < key_path.size() - 1; i++) {
|
||||
if (!current.Get(key_path[i], ¤t)) {
|
||||
if (allow_silent_failure)
|
||||
return std::nullopt;
|
||||
CHECK(false) << "Failed to get property '" << key_path[i] << "' at index "
|
||||
<< i << " in key path";
|
||||
}
|
||||
CHECK(current.Get(key_path[i], ¤t))
|
||||
<< "Failed to get property '" << key_path[i] << "' at index " << i
|
||||
<< " in key path";
|
||||
}
|
||||
return current;
|
||||
}
|
||||
@@ -848,8 +842,7 @@ void OverrideGlobalValueFromIsolatedWorld(
|
||||
v8::Isolate* isolate,
|
||||
const std::vector<std::string>& key_path,
|
||||
v8::Local<v8::Object> value,
|
||||
bool support_dynamic_properties,
|
||||
bool allow_silent_failure) {
|
||||
bool support_dynamic_properties) {
|
||||
if (key_path.empty())
|
||||
return;
|
||||
|
||||
@@ -861,11 +854,7 @@ void OverrideGlobalValueFromIsolatedWorld(
|
||||
gin_helper::Dictionary global(isolate, main_context->Global());
|
||||
|
||||
const std::string final_key = key_path[key_path.size() - 1];
|
||||
auto maybe_target_object =
|
||||
TraceKeyPath(global, key_path, allow_silent_failure);
|
||||
if (!maybe_target_object.has_value())
|
||||
return;
|
||||
gin_helper::Dictionary target_object = maybe_target_object.value();
|
||||
gin_helper::Dictionary target_object = TraceKeyPath(global, key_path);
|
||||
|
||||
{
|
||||
v8::Context::Scope main_context_scope(main_context);
|
||||
@@ -898,8 +887,8 @@ bool OverrideGlobalPropertyFromIsolatedWorld(
|
||||
gin_helper::Dictionary global(isolate, main_context->Global());
|
||||
|
||||
const std::string final_key = key_path[key_path.size() - 1];
|
||||
auto target_dict = TraceKeyPath(global, key_path, false);
|
||||
v8::Local<v8::Object> target_object = target_dict.value().GetHandle();
|
||||
v8::Local<v8::Object> target_object =
|
||||
TraceKeyPath(global, key_path).GetHandle();
|
||||
|
||||
{
|
||||
v8::Context::Scope main_context_scope(main_context);
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "base/command_line.h"
|
||||
#include "content/public/renderer/render_frame.h"
|
||||
#include "electron/fuses.h"
|
||||
#include "net/http/http_request_headers.h"
|
||||
@@ -15,6 +16,7 @@
|
||||
#include "shell/common/node_bindings.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/node_util.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/v8_util.h"
|
||||
#include "shell/renderer/electron_render_frame_observer.h"
|
||||
#include "shell/renderer/web_worker_observer.h"
|
||||
@@ -23,8 +25,6 @@
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
#include "third_party/blink/renderer/core/execution_context/execution_context.h" // nogncheck
|
||||
#include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" // nogncheck
|
||||
#include "third_party/blink/renderer/core/workers/worker_global_scope.h" // nogncheck
|
||||
#include "third_party/blink/renderer/core/workers/worker_settings.h" // nogncheck
|
||||
|
||||
namespace electron {
|
||||
|
||||
@@ -199,54 +199,44 @@ void ElectronRendererClient::WillReleaseScriptContext(
|
||||
electron_bindings_->EnvironmentDestroyed(env);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
bool WorkerHasNodeIntegration(blink::ExecutionContext* ec) {
|
||||
void ElectronRendererClient::WorkerScriptReadyForEvaluationOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {
|
||||
// We do not create a Node.js environment in service or shared workers
|
||||
// owing to an inability to customize sandbox policies in these workers
|
||||
// given that they're run out-of-process.
|
||||
// Also avoid creating a Node.js environment for worklet global scope
|
||||
// created on the main thread.
|
||||
auto* ec = blink::ExecutionContext::From(context);
|
||||
if (ec->IsServiceWorkerGlobalScope() || ec->IsSharedWorkerGlobalScope() ||
|
||||
ec->IsMainThreadWorkletGlobalScope())
|
||||
return false;
|
||||
|
||||
auto* wgs = blink::DynamicTo<blink::WorkerGlobalScope>(ec);
|
||||
if (!wgs)
|
||||
return false;
|
||||
|
||||
// Read the nodeIntegrationInWorker preference from the worker's settings,
|
||||
// which were copied from the initiating frame's WebPreferences at worker
|
||||
// creation time. This ensures that in-process child windows with different
|
||||
// webPreferences get the correct per-frame value rather than a process-wide
|
||||
// value.
|
||||
auto* worker_settings = wgs->GetWorkerSettings();
|
||||
return worker_settings && worker_settings->NodeIntegrationInWorker();
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
void ElectronRendererClient::WorkerScriptReadyForEvaluationOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {
|
||||
auto* ec = blink::ExecutionContext::From(context);
|
||||
if (!WorkerHasNodeIntegration(ec))
|
||||
return;
|
||||
|
||||
auto* current = WebWorkerObserver::GetCurrent();
|
||||
if (current)
|
||||
return;
|
||||
WebWorkerObserver::Create()->WorkerScriptReadyForEvaluation(context);
|
||||
// This won't be correct for in-process child windows with webPreferences
|
||||
// that have a different value for nodeIntegrationInWorker
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNodeIntegrationInWorker)) {
|
||||
auto* current = WebWorkerObserver::GetCurrent();
|
||||
if (current)
|
||||
return;
|
||||
WebWorkerObserver::Create()->WorkerScriptReadyForEvaluation(context);
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronRendererClient::WillDestroyWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context) {
|
||||
auto* ec = blink::ExecutionContext::From(context);
|
||||
if (!WorkerHasNodeIntegration(ec))
|
||||
if (ec->IsServiceWorkerGlobalScope() || ec->IsSharedWorkerGlobalScope() ||
|
||||
ec->IsMainThreadWorkletGlobalScope())
|
||||
return;
|
||||
|
||||
auto* current = WebWorkerObserver::GetCurrent();
|
||||
if (current)
|
||||
current->ContextWillDestroy(context);
|
||||
// TODO(loc): Note that this will not be correct for in-process child windows
|
||||
// with webPreferences that have a different value for nodeIntegrationInWorker
|
||||
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
switches::kNodeIntegrationInWorker)) {
|
||||
auto* current = WebWorkerObserver::GetCurrent();
|
||||
if (current)
|
||||
current->ContextWillDestroy(context);
|
||||
}
|
||||
}
|
||||
|
||||
void ElectronRendererClient::SetUpWebAssemblyTrapHandler() {
|
||||
|
||||
@@ -199,8 +199,7 @@ void ElectronSandboxedRendererClient::
|
||||
v8::Local<v8::Context> context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
const GURL& script_url) {
|
||||
if (service_worker_data) {
|
||||
DCHECK_EQ(service_worker_version_id,
|
||||
service_worker_data->service_worker_version_id());
|
||||
@@ -209,8 +208,7 @@ void ElectronSandboxedRendererClient::
|
||||
}
|
||||
|
||||
RendererClientBase::WillDestroyServiceWorkerContextOnWorkerThread(
|
||||
context, service_worker_version_id, service_worker_scope, script_url,
|
||||
service_worker_token);
|
||||
context, service_worker_version_id, service_worker_scope, script_url);
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
|
||||
@@ -57,8 +57,7 @@ class ElectronSandboxedRendererClient : public RendererClientBase {
|
||||
v8::Local<v8::Context> context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) override;
|
||||
const GURL& script_url) override;
|
||||
|
||||
private:
|
||||
void EmitProcessEvent(content::RenderFrame* render_frame,
|
||||
|
||||
@@ -506,13 +506,11 @@ void RendererClientBase::WillEvaluateServiceWorkerOnWorkerThread(
|
||||
void RendererClientBase::DidStartServiceWorkerContextOnWorkerThread(
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
const GURL& script_url) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_renderer_client_->dispatcher()
|
||||
->DidStartServiceWorkerContextOnWorkerThread(
|
||||
service_worker_version_id, service_worker_scope, script_url,
|
||||
service_worker_token);
|
||||
service_worker_version_id, service_worker_scope, script_url);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -520,13 +518,11 @@ void RendererClientBase::WillDestroyServiceWorkerContextOnWorkerThread(
|
||||
v8::Local<v8::Context> context,
|
||||
int64_t service_worker_version_id,
|
||||
const GURL& service_worker_scope,
|
||||
const GURL& script_url,
|
||||
const blink::ServiceWorkerToken& service_worker_token) {
|
||||
const GURL& script_url) {
|
||||
#if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
|
||||
extensions_renderer_client_->dispatcher()
|
||||
->WillDestroyServiceWorkerContextOnWorkerThread(
|
||||
context, service_worker_version_id, service_worker_scope, script_url,
|
||||
service_worker_token);
|
||||
context, service_worker_version_id, service_worker_scope, script_url);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user