mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
148 Commits
build/pres
...
permission
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8bf80ccdb8 | ||
|
|
d7ff2bf7b7 | ||
|
|
ca221f6d80 | ||
|
|
38512efd25 | ||
|
|
7cea992926 | ||
|
|
2390706030 | ||
|
|
56829f75c1 | ||
|
|
5994b34a5d | ||
|
|
e6555ac5e1 | ||
|
|
5a1eeea102 | ||
|
|
7f34b0e6f5 | ||
|
|
c1eee18e41 | ||
|
|
9ce0ca74c3 | ||
|
|
3a5a1ea7bd | ||
|
|
6e4d90fcdb | ||
|
|
fd8d9f06fd | ||
|
|
ca0837c852 | ||
|
|
1aeca6fd0e | ||
|
|
b481966f02 | ||
|
|
baf0182a42 | ||
|
|
50ce448556 | ||
|
|
7391db93e2 | ||
|
|
b27dc7514e | ||
|
|
ae0c8881c3 | ||
|
|
4ae43dcb3b | ||
|
|
46bed807ca | ||
|
|
755c6640fd | ||
|
|
4fbf18a021 | ||
|
|
f366caac84 | ||
|
|
4874233aae | ||
|
|
b7af0537c8 | ||
|
|
7da9c0b2f7 | ||
|
|
46af43db49 | ||
|
|
93a6f3e607 | ||
|
|
a2de94dda1 | ||
|
|
2cc14c6e8f | ||
|
|
945aabfaee | ||
|
|
3186c2f0ef | ||
|
|
44e4e4521c | ||
|
|
189675575c | ||
|
|
4c3014944c | ||
|
|
cc16de7032 | ||
|
|
4d51edc504 | ||
|
|
8474bbe689 | ||
|
|
3f71ed7355 | ||
|
|
d7689bb9b5 | ||
|
|
b497700e36 | ||
|
|
1c991ff765 | ||
|
|
4801a54d08 | ||
|
|
a7c52f1fb2 | ||
|
|
286384258b | ||
|
|
f6bae51025 | ||
|
|
ffcbc32031 | ||
|
|
9b166b3ed4 | ||
|
|
62406708cd | ||
|
|
d004329f6f | ||
|
|
275b6a13b7 | ||
|
|
a9e56f2c36 | ||
|
|
bc2628ad7e | ||
|
|
bba31189a0 | ||
|
|
0f55b45282 | ||
|
|
d294871980 | ||
|
|
c9b7806418 | ||
|
|
23bcca3ffc | ||
|
|
bff298987f | ||
|
|
6d13c503c5 | ||
|
|
7721fdf886 | ||
|
|
c35739d60d | ||
|
|
c4dfff9844 | ||
|
|
346244ef9e | ||
|
|
4edc7a4372 | ||
|
|
f49f6ff68b | ||
|
|
0718c2b9ee | ||
|
|
1a6563fb66 | ||
|
|
11fdc6f78e | ||
|
|
0fcc18359f | ||
|
|
70dda694e2 | ||
|
|
aa19087bed | ||
|
|
3fabf7837e | ||
|
|
8d5ad8afe1 | ||
|
|
45891aa75b | ||
|
|
6293bbced0 | ||
|
|
f42331f277 | ||
|
|
29fd2d343b | ||
|
|
c70f86fe03 | ||
|
|
701a09d44f | ||
|
|
a4dcb0fb32 | ||
|
|
acd39bd077 | ||
|
|
3d766e9ccb | ||
|
|
6877671390 | ||
|
|
e64302cc91 | ||
|
|
2a613cabaa | ||
|
|
78995b956e | ||
|
|
f508f6b6b5 | ||
|
|
20e77afe0f | ||
|
|
5a809a6694 | ||
|
|
305b28e9c7 | ||
|
|
5b18cc46bc | ||
|
|
7c79221a54 | ||
|
|
e7ca92a574 | ||
|
|
3a07bd8821 | ||
|
|
cc956420ef | ||
|
|
2337d8676d | ||
|
|
45e5ccc55e | ||
|
|
a68a33f036 | ||
|
|
791e6df82a | ||
|
|
283810dbfc | ||
|
|
ed3242adc1 | ||
|
|
87fb2ad70c | ||
|
|
1bcc566ad8 | ||
|
|
60bb4a2617 | ||
|
|
47dde3b6e2 | ||
|
|
1a6e651844 | ||
|
|
d09a2e513c | ||
|
|
7e9eb9e3f1 | ||
|
|
e70ce89235 | ||
|
|
92496c1930 | ||
|
|
4286234721 | ||
|
|
55e7a47d70 | ||
|
|
8db1563d73 | ||
|
|
b3d52c01e8 | ||
|
|
77ba40bc01 | ||
|
|
2fd04a78a1 | ||
|
|
0886d2f50f | ||
|
|
660872c048 | ||
|
|
976f5d1b75 | ||
|
|
aa23198ad8 | ||
|
|
cfdcf48e1b | ||
|
|
c2c079dc82 | ||
|
|
f979d4c742 | ||
|
|
df524c6eca | ||
|
|
5669a40d5c | ||
|
|
9fc760bc4c | ||
|
|
3e22f992b0 | ||
|
|
364631ee0b | ||
|
|
3c9d4452c6 | ||
|
|
daa8244cdf | ||
|
|
8454f4e49f | ||
|
|
60c4c9fec6 | ||
|
|
296a558c32 | ||
|
|
780677e00f | ||
|
|
8c8a7709e6 | ||
|
|
c72a714dd5 | ||
|
|
7a101a1c4b | ||
|
|
5b7ed6097e | ||
|
|
32a74b0942 | ||
|
|
5773a2dce6 | ||
|
|
bc345db351 |
6
.github/CODEOWNERS
vendored
6
.github/CODEOWNERS
vendored
@@ -20,3 +20,9 @@ appveyor-woa.yml @electron/wg-releases
|
||||
/lib/browser/guest-view-manager.ts @electron/wg-security
|
||||
/lib/browser/rpc-server.ts @electron/wg-security
|
||||
/lib/renderer/security-warnings.ts @electron/wg-security
|
||||
|
||||
# Infra WG
|
||||
/.github/actions/ @electron/wg-infra
|
||||
/.github/workflows/*-publish.yml @electron/wg-infra
|
||||
/.github/workflows/build.yml @electron/wg-infra
|
||||
/.github/workflows/pipeline-*.yml @electron/wg-infra
|
||||
|
||||
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -20,8 +20,8 @@ body:
|
||||
description: |
|
||||
What version of Electron are you using?
|
||||
|
||||
Note: Please only report issues for [currently supported versions of Electron](https://www.electronjs.org/docs/latest/tutorial/support#currently-supported-versions).
|
||||
placeholder: 17.0.0
|
||||
Note: Please only report issues for [currently supported versions of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline).
|
||||
placeholder: 32.0.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
|
||||
2
.github/actions/build-electron/action.yml
vendored
2
.github/actions/build-electron/action.yml
vendored
@@ -36,7 +36,7 @@ runs:
|
||||
shell: bash
|
||||
if: ${{ inputs.target-arch == 'x64' && inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
GN_APPENDED_ARGS="$GN_EXTRA_ARGS v8_snapshot_toolchain=\"//build/toolchain/mac:clang_x64\""
|
||||
GN_APPENDED_ARGS="$GN_EXTRA_ARGS target_cpu=\"x64\" v8_snapshot_toolchain=\"//build/toolchain/mac:clang_x64\""
|
||||
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
|
||||
- name: Build Electron ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
|
||||
8
.github/actions/checkout/action.yml
vendored
8
.github/actions/checkout/action.yml
vendored
@@ -75,7 +75,7 @@ runs:
|
||||
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
||||
|
||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags -vvvvv
|
||||
if [ "${{ inputs.is-release }}" != "true" ]; then
|
||||
if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; then
|
||||
# Re-export all the patches to check if there were changes.
|
||||
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
|
||||
cd src/electron
|
||||
@@ -87,7 +87,7 @@ runs:
|
||||
# Export it
|
||||
mkdir -p ../../patches
|
||||
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
|
||||
if (node ./script/push-patch.js 2> /dev/null > /dev/null); then
|
||||
if node ./script/push-patch.js; then
|
||||
echo
|
||||
echo "======================================================================"
|
||||
echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
|
||||
@@ -100,6 +100,8 @@ runs:
|
||||
echo "There were changes to the patches when applying."
|
||||
echo "Check the CI artifacts for a patch you can apply to fix it."
|
||||
echo "======================================================================"
|
||||
echo
|
||||
cat ../../patches/update-patches.patch
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
@@ -151,4 +153,4 @@ runs:
|
||||
exit 1
|
||||
else
|
||||
echo "Cache key persisted in $final_cache_path"
|
||||
fi
|
||||
fi
|
||||
|
||||
2
.github/actions/fix-sync-macos/action.yml
vendored
2
.github/actions/fix-sync-macos/action.yml
vendored
@@ -46,7 +46,7 @@ runs:
|
||||
fi
|
||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||
|
||||
echo 'infra/3pp/build_support/ninja-1_11_1/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/build_support/ninja-1_11_1/${platform}'` > ninja_ensure_file
|
||||
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||
sed $SEDOPTION "s/Updating depot_tools... //g" ninja_ensure_file
|
||||
cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
|
||||
|
||||
|
||||
9
.github/config.yml
vendored
9
.github/config.yml
vendored
@@ -2,6 +2,8 @@
|
||||
newPRWelcomeComment: |
|
||||
💖 Thanks for opening this pull request! 💖
|
||||
|
||||
### Semantic PR titles
|
||||
|
||||
We use [semantic commit messages](https://github.com/electron/electron/blob/main/docs/development/pull-requests.md#commit-message-guidelines) to streamline the release process. Before your pull request can be merged, you should **update your pull request title** to start with a semantic prefix.
|
||||
|
||||
Examples of commit messages with semantic prefixes:
|
||||
@@ -10,6 +12,13 @@ newPRWelcomeComment: |
|
||||
- `feat: add app.isPackaged() method`
|
||||
- `docs: app.isDefaultProtocolClient is now available on Linux`
|
||||
|
||||
### Commit signing
|
||||
|
||||
This repo enforces [commit signatures](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) for all incoming PRs.
|
||||
To sign your commits, see GitHub's documentation on [Telling Git about your signing key](https://docs.github.com/en/authentication/managing-commit-signature-verification/telling-git-about-your-signing-key).
|
||||
|
||||
### PR tips
|
||||
|
||||
Things that will help get your PR across the finish line:
|
||||
|
||||
- Follow the JavaScript, C++, and Python [coding style](https://github.com/electron/electron/blob/main/docs/development/coding-style.md).
|
||||
|
||||
3
.github/dependabot.yml
vendored
3
.github/dependabot.yml
vendored
@@ -7,3 +7,6 @@ updates:
|
||||
directory: /
|
||||
schedule:
|
||||
interval: weekly
|
||||
labels:
|
||||
- "no-backport"
|
||||
- "semver/none"
|
||||
|
||||
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -115,6 +115,7 @@ jobs:
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
||||
outputs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||
steps:
|
||||
@@ -136,6 +137,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-13
|
||||
target-platform: macos
|
||||
target-arch: x64
|
||||
@@ -154,6 +156,7 @@ jobs:
|
||||
needs: checkout-macos
|
||||
with:
|
||||
build-runs-on: macos-14-xlarge
|
||||
check-runs-on: macos-14
|
||||
test-runs-on: macos-14
|
||||
target-platform: macos
|
||||
target-arch: arm64
|
||||
@@ -172,6 +175,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -192,6 +196,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-amd64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
@@ -213,6 +218,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
||||
@@ -233,6 +239,7 @@ jobs:
|
||||
needs: checkout-linux
|
||||
with:
|
||||
build-runs-on: electron-arc-linux-amd64-32core
|
||||
check-runs-on: electron-arc-linux-amd64-8core
|
||||
test-runs-on: electron-arc-linux-arm64-4core
|
||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||
|
||||
26
.github/workflows/issue-opened.yml
vendored
26
.github/workflows/issue-opened.yml
vendored
@@ -76,7 +76,8 @@ jobs:
|
||||
const { ElectronVersions } = await import('${{ github.workspace }}/node_modules/@electron/fiddle-core/dist/index.js');
|
||||
const versions = await ElectronVersions.create(undefined, { ignoreCache: true });
|
||||
|
||||
if (!versions.supportedMajors.includes(major)) {
|
||||
const validVersions = [...versions.supportedMajors, ...versions.prereleaseMajors];
|
||||
if (!validVersions.includes(major)) {
|
||||
core.setOutput('unsupportedMajor', true);
|
||||
labels.push('blocked/need-info ❌');
|
||||
}
|
||||
@@ -86,6 +87,29 @@ jobs:
|
||||
}
|
||||
}
|
||||
|
||||
const operatingSystems = select('heading:has(> text[value="What operating system(s) are you using?"]) + paragraph > text', tree)?.value.trim().split(', ');
|
||||
const platformLabels = new Set();
|
||||
for (const operatingSystem of (operatingSystems ?? [])) {
|
||||
switch (operatingSystem) {
|
||||
case 'Windows':
|
||||
platformLabels.add('platform/windows');
|
||||
break;
|
||||
case 'macOS':
|
||||
platformLabels.add('platform/macOS');
|
||||
break;
|
||||
case 'Ubuntu':
|
||||
case 'Other Linux':
|
||||
platformLabels.add('platform/linux');
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (platformLabels.size === 3) {
|
||||
labels.push('platform/all');
|
||||
} else {
|
||||
labels.push(...platformLabels);
|
||||
}
|
||||
|
||||
const gistUrl = select('heading:has(> text[value="Testcase Gist URL"]) + paragraph > text', tree)?.value.trim();
|
||||
if (gistUrl !== undefined && gistUrl.startsWith('https://gist.github.com/')) {
|
||||
labels.push('has-repro-gist');
|
||||
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -77,7 +81,7 @@ jobs:
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.build-runs-on }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
|
||||
@@ -15,6 +15,10 @@ on:
|
||||
type: string
|
||||
description: 'What host to run the build'
|
||||
required: true
|
||||
check-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the gn-check'
|
||||
required: true
|
||||
test-runs-on:
|
||||
type: string
|
||||
description: 'What host to run the tests on'
|
||||
@@ -83,7 +87,7 @@ jobs:
|
||||
with:
|
||||
target-platform: ${{ inputs.target-platform }}
|
||||
target-arch: ${{ inputs.target-arch }}
|
||||
check-runs-on: ${{ inputs.build-runs-on }}
|
||||
check-runs-on: ${{ inputs.check-runs-on }}
|
||||
check-container: ${{ inputs.build-container }}
|
||||
gn-build-type: ${{ inputs.gn-build-type }}
|
||||
is-asan: ${{ inputs.is-asan }}
|
||||
|
||||
4
.github/workflows/pipeline-electron-lint.yml
vendored
4
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -32,7 +32,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
# "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file.
|
||||
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools
|
||||
echo "$(pwd)/src/third_party/depot_tools" >> $GITHUB_PATH
|
||||
- name: Download GN Binary
|
||||
shell: bash
|
||||
@@ -74,4 +74,4 @@ jobs:
|
||||
run: |
|
||||
cd src/electron
|
||||
node script/yarn tsc -p tsconfig.script.json
|
||||
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ jobs:
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
|
||||
@@ -62,7 +62,7 @@ jobs:
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
@@ -127,7 +127,8 @@ jobs:
|
||||
cd src
|
||||
gn check out/Default //electron:electron_lib
|
||||
gn check out/Default //electron:electron_app
|
||||
gn check out/Default //electron/shell/common/api:mojo
|
||||
gn check out/Default //electron/shell/common:mojo
|
||||
gn check out/Default //electron/shell/common:plugin
|
||||
|
||||
# Check the hunspell filenames
|
||||
node electron/script/gen-hunspell-filenames.js --check
|
||||
|
||||
@@ -103,18 +103,17 @@ jobs:
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||
sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
else
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||
cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
fi
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
if [ "`uname`" = "Darwin" ]; then
|
||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||
sed -i '' '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
||||
else
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
fi
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
@@ -189,7 +188,7 @@ jobs:
|
||||
fi
|
||||
- name: Upload Test Artifacts
|
||||
if: always() && !cancelled()
|
||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a
|
||||
with:
|
||||
name: test_artifacts_${{ env.ARTIFACT_KEY }}
|
||||
path: src/electron/spec/artifacts
|
||||
|
||||
@@ -61,12 +61,11 @@ jobs:
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
@@ -125,12 +124,11 @@ jobs:
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||
cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
# Ensure depot_tools does not update.
|
||||
test -d depot_tools && cd depot_tools
|
||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||
touch .disable_auto_update
|
||||
- name: Add Depot Tools to PATH
|
||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||
|
||||
6
.github/workflows/scorecards.yml
vendored
6
.github/workflows/scorecards.yml
vendored
@@ -28,7 +28,7 @@ jobs:
|
||||
|
||||
# This is a pre-submit / pre-release.
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@dc50aa9510b46c811795eb24b2f1ba02a914e534 # v2.3.3
|
||||
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
@@ -42,7 +42,7 @@ jobs:
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
|
||||
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
@@ -50,6 +50,6 @@ jobs:
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@4fa2a7953630fd2f3fb380f21be14ede0169dd4f # v3.25.12
|
||||
uses: github/codeql-action/upload-sarif@883d8588e56d1753a8a58c1c86e88976f0c23449 # v3.26.3
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
|
||||
4
.github/workflows/update_appveyor_image.yml
vendored
4
.github/workflows/update_appveyor_image.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
fi
|
||||
- name: (Optionally) Update Appveyor Image
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
uses: mikefarah/yq@f15500b20a1c991c8729870ba60a4dc3524b6a94 # v4.44.2
|
||||
uses: mikefarah/yq@bbdd97482f2d439126582a59689eb1c855944955 # v4.44.3
|
||||
with:
|
||||
cmd: |
|
||||
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor.yml" > "appveyor2.yml"
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
git add appveyor-woa.yml
|
||||
- name: (Optionally) Commit to Branch
|
||||
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||
uses: dsanders11/github-app-commit-action@48d2ff8c1a855eb15d16afa97ae12616456d7cbc # v1.4.0
|
||||
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
|
||||
with:
|
||||
message: 'build: update appveyor image to latest version'
|
||||
ref: bump-appveyor-image
|
||||
|
||||
19
BUILD.gn
19
BUILD.gn
@@ -38,7 +38,7 @@ if (is_mac) {
|
||||
import("build/rules.gni")
|
||||
|
||||
assert(
|
||||
mac_deployment_target == "10.15",
|
||||
mac_deployment_target == "11.0",
|
||||
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
|
||||
}
|
||||
|
||||
@@ -425,7 +425,8 @@ source_set("electron_lib") {
|
||||
"buildflags",
|
||||
"chromium_src:chrome",
|
||||
"chromium_src:chrome_spellchecker",
|
||||
"shell/common/api:mojo",
|
||||
"shell/common:mojo",
|
||||
"shell/common:plugin",
|
||||
"shell/services/node/public/mojom",
|
||||
"//base:base_static",
|
||||
"//base/allocator:buildflags",
|
||||
@@ -672,22 +673,9 @@ source_set("electron_lib") {
|
||||
}
|
||||
|
||||
if (enable_plugins) {
|
||||
deps += [ "chromium_src:plugins" ]
|
||||
sources += [
|
||||
"shell/common/plugin_info.cc",
|
||||
"shell/common/plugin_info.h",
|
||||
"shell/renderer/electron_renderer_pepper_host_factory.cc",
|
||||
"shell/renderer/electron_renderer_pepper_host_factory.h",
|
||||
"shell/renderer/pepper_helper.cc",
|
||||
"shell/renderer/pepper_helper.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_ppapi) {
|
||||
deps += [
|
||||
"//ppapi/host",
|
||||
"//ppapi/proxy",
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -745,6 +733,7 @@ source_set("electron_lib") {
|
||||
"//components/pdf/common:util",
|
||||
"//components/pdf/renderer",
|
||||
"//pdf",
|
||||
"//pdf:content_restriction",
|
||||
]
|
||||
sources += [
|
||||
"shell/browser/electron_pdf_document_helper_client.cc",
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'128.0.6573.0',
|
||||
'130.0.6672.0',
|
||||
'node_version':
|
||||
'v20.15.1',
|
||||
'v20.17.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -38,7 +38,7 @@ For more installation options and troubleshooting tips, see
|
||||
|
||||
Each Electron release provides binaries for macOS, Windows, and Linux.
|
||||
|
||||
* macOS (Catalina and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
|
||||
* macOS (Big Sur and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
|
||||
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
||||
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
|
||||
* Ubuntu 18.04 and newer
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-128.0.6571.0
|
||||
image: e-130.0.6672.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
@@ -140,7 +140,8 @@ for:
|
||||
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
|
||||
- gn check out/Default //electron:electron_lib
|
||||
- gn check out/Default //electron:electron_app
|
||||
- gn check out/Default //electron/shell/common/api:mojo
|
||||
- gn check out/Default //electron/shell/common:mojo
|
||||
- gn check out/Default //electron/shell/common:plugin
|
||||
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
|
||||
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
||||
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-128.0.6571.0
|
||||
image: e-130.0.6672.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
@@ -138,7 +138,8 @@ for:
|
||||
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
|
||||
- gn check out/Default //electron:electron_lib
|
||||
- gn check out/Default //electron:electron_app
|
||||
- gn check out/Default //electron/shell/common/api:mojo
|
||||
- gn check out/Default //electron/shell/common:mojo
|
||||
- gn check out/Default //electron/shell/common:plugin
|
||||
- if DEFINED ELECTRON_RBE_JWT (autoninja -j 300 -C out/Default electron:electron_app) else (autoninja -C out/Default electron:electron_app)
|
||||
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
||||
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||
node_module_version = 128
|
||||
node_module_version = 130
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -73,3 +73,7 @@ clang_unsafe_buffers_paths = ""
|
||||
# Disable snapshotting a page when printing for its content to be analyzed for
|
||||
# sensitive content by enterprise users.
|
||||
enterprise_cloud_content_analysis = false
|
||||
|
||||
# TODO: remove dependency on legacy ipc
|
||||
# https://issues.chromium.org/issues/40943039
|
||||
content_enable_legacy_ipc = true
|
||||
|
||||
@@ -24,11 +24,8 @@ template("extract_symbols") {
|
||||
assert(defined(invoker.binary), "Need binary to dump")
|
||||
assert(defined(invoker.symbol_dir), "Need directory for symbol output")
|
||||
|
||||
if (host_os == "win" && target_cpu == "x86") {
|
||||
dump_syms_label = "//third_party/breakpad:dump_syms(//build/toolchain/win:win_clang_x64)"
|
||||
} else {
|
||||
dump_syms_label = "//third_party/breakpad:dump_syms($host_toolchain)"
|
||||
}
|
||||
dump_syms_label =
|
||||
"//third_party/breakpad:dump_syms($host_system_allocator_toolchain)"
|
||||
dump_syms_binary = get_label_info(dump_syms_label, "root_out_dir") +
|
||||
"/dump_syms$_host_executable_suffix"
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ import("//build/config/ozone.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//components/spellcheck/spellcheck_build_features.gni")
|
||||
import("//electron/buildflags/buildflags.gni")
|
||||
import("//ppapi/buildflags/buildflags.gni")
|
||||
import("//printing/buildflags/buildflags.gni")
|
||||
import("//third_party/widevine/cdm/widevine.gni")
|
||||
|
||||
@@ -41,6 +40,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/icon_loader.h",
|
||||
"//chrome/browser/icon_manager.cc",
|
||||
"//chrome/browser/icon_manager.h",
|
||||
"//chrome/browser/media/webrtc/delegated_source_list_capturer.cc",
|
||||
"//chrome/browser/media/webrtc/delegated_source_list_capturer.h",
|
||||
"//chrome/browser/media/webrtc/desktop_capturer_wrapper.cc",
|
||||
"//chrome/browser/media/webrtc/desktop_capturer_wrapper.h",
|
||||
"//chrome/browser/media/webrtc/desktop_media_list.cc",
|
||||
@@ -113,6 +114,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/ui/view_ids.h",
|
||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper.cc",
|
||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper.h",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_button.h",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_label_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/close_image_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/close_image_button.h",
|
||||
@@ -421,46 +424,6 @@ static_library("chrome") {
|
||||
}
|
||||
}
|
||||
|
||||
source_set("plugins") {
|
||||
sources = []
|
||||
deps = []
|
||||
frameworks = []
|
||||
|
||||
# browser side
|
||||
sources += [
|
||||
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.cc",
|
||||
"//chrome/browser/renderer_host/pepper/chrome_browser_pepper_host_factory.h",
|
||||
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc",
|
||||
"//chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.h",
|
||||
]
|
||||
|
||||
# renderer side
|
||||
sources += [
|
||||
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc",
|
||||
"//chrome/renderer/pepper/chrome_renderer_pepper_host_factory.h",
|
||||
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.cc",
|
||||
"//chrome/renderer/pepper/pepper_shared_memory_message_filter.h",
|
||||
]
|
||||
|
||||
deps += [
|
||||
"//components/strings",
|
||||
"//media:media_buildflags",
|
||||
"//services/device/public/mojom",
|
||||
"//skia",
|
||||
"//storage/browser",
|
||||
]
|
||||
|
||||
if (enable_ppapi) {
|
||||
deps += [
|
||||
"//ppapi/buildflags",
|
||||
"//ppapi/host",
|
||||
"//ppapi/proxy",
|
||||
"//ppapi/proxy:ipc",
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
# This source set is just so we don't have to depend on all of //chrome/browser
|
||||
# You may have to add new files here during the upgrade if //chrome/browser/spellchecker
|
||||
# gets more files
|
||||
|
||||
47
docs/api-history.schema.json
Normal file
47
docs/api-history.schema.json
Normal file
@@ -0,0 +1,47 @@
|
||||
{
|
||||
"title": "JSON schema for API history blocks in Electron documentation",
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"$comment": "If you change this schema, remember to edit the TypeScript interfaces in the linting script.",
|
||||
"definitions": {
|
||||
"baseChangeSchema": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"pr-url": {
|
||||
"description": "URL to the 'main' GitHub Pull Request for the change (i.e. not a backport PR)",
|
||||
"type": "string", "pattern": "^https://github.com/electron/electron/pull/\\d+$",
|
||||
"examples": [ "https://github.com/electron/electron/pull/26789" ]
|
||||
},
|
||||
"breaking-changes-header": {
|
||||
"description": "Heading ID for the change in `electron/docs/breaking-changes.md`",
|
||||
"type": "string", "minLength": 3,
|
||||
"examples": [ "deprecated-browserwindowsettrafficlightpositionposition" ]
|
||||
},
|
||||
"description": {
|
||||
"description": "Short description of the change",
|
||||
"type": "string", "minLength": 3, "maxLength": 120,
|
||||
"examples": [ "Made `trafficLightPosition` option work for `customButtonOnHover`." ]
|
||||
}
|
||||
},
|
||||
"required": [ "pr-url" ],
|
||||
"additionalProperties": false
|
||||
},
|
||||
"addedChangeSchema": {
|
||||
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
|
||||
},
|
||||
"deprecatedChangeSchema": {
|
||||
"$comment": "TODO: Make 'breaking-changes-header' required in the future.",
|
||||
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" } ]
|
||||
},
|
||||
"changesChangeSchema": {
|
||||
"$comment": "Unlike RFC, added `'type': 'object'` to appease AJV strict mode",
|
||||
"allOf": [ { "$ref": "#/definitions/baseChangeSchema" }, { "type": "object", "required": [ "description" ] } ]
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"added": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/addedChangeSchema" } },
|
||||
"deprecated": { "type": "array", "minItems": 1, "maxItems": 1, "items": { "$ref": "#/definitions/deprecatedChangeSchema" } },
|
||||
"changes": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/changesChangeSchema" } }
|
||||
},
|
||||
"additionalProperties": false
|
||||
}
|
||||
@@ -345,9 +345,10 @@ app.on('select-client-certificate', (event, webContents, url, list, callback) =>
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `webContents` [WebContents](web-contents.md)
|
||||
* `webContents` [WebContents](web-contents.md) (optional)
|
||||
* `authenticationResponseDetails` Object
|
||||
* `url` URL
|
||||
* `pid` number
|
||||
* `authInfo` Object
|
||||
* `isProxy` boolean
|
||||
* `scheme` string
|
||||
@@ -358,7 +359,7 @@ Returns:
|
||||
* `username` string (optional)
|
||||
* `password` string (optional)
|
||||
|
||||
Emitted when `webContents` wants to do basic auth.
|
||||
Emitted when `webContents` or [Utility process](../glossary.md#utility-process) wants to do basic auth.
|
||||
|
||||
The default behavior is to cancel all authentications. To override this you
|
||||
should prevent the default behavior with `event.preventDefault()` and call
|
||||
@@ -1357,7 +1358,7 @@ Show the app's about panel options. These options can be overridden with `app.se
|
||||
* `credits` string (optional) _macOS_ _Windows_ - Credit information.
|
||||
* `authors` string[] (optional) _Linux_ - List of app authors.
|
||||
* `website` string (optional) _Linux_ - The app's website.
|
||||
* `iconPath` string (optional) _Linux_ _Windows_ - Path to the app's icon in a JPEG or PNG file format. On Linux, will be shown as 64x64 pixels while retaining aspect ratio.
|
||||
* `iconPath` string (optional) _Linux_ _Windows_ - Path to the app's icon in a JPEG or PNG file format. On Linux, will be shown as 64x64 pixels while retaining aspect ratio. On Windows, a 48x48 PNG will result in the best visual quality.
|
||||
|
||||
Set the about panel options. This will override the values defined in the app's `.plist` file on macOS. See the [Apple docs][about-panel-options] for more details. On Linux, values must be set in order to be shown; there are no defaults.
|
||||
|
||||
|
||||
@@ -926,6 +926,17 @@ win.setSheetOffset(toolbarRect.height)
|
||||
|
||||
#### `win.flashFrame(flag)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/41391
|
||||
description: "`window.flashFrame(bool)` will flash dock icon continuously on macOS"
|
||||
breaking-changes-header: behavior-changed-windowflashframebool-will-flash-dock-icon-continuously-on-macos
|
||||
```
|
||||
-->
|
||||
|
||||
* `flag` boolean
|
||||
|
||||
Starts or stops flashing the window to attract user's attention.
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
# BrowserView
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
> **Note**
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
@@ -11,6 +19,14 @@ relative to its owning window. It is meant to be an alternative to the
|
||||
|
||||
## Class: BrowserView
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
> Create and control views.
|
||||
|
||||
> **Note**
|
||||
@@ -40,6 +56,14 @@ app.whenReady().then(() => {
|
||||
|
||||
### `new BrowserView([options])` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` Object (optional)
|
||||
* `webPreferences` [WebPreferences](structures/web-preferences.md?inline) (optional) - Settings of web page's features.
|
||||
|
||||
@@ -49,6 +73,14 @@ Objects created with `new BrowserView` have the following properties:
|
||||
|
||||
#### `view.webContents` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
A [`WebContents`](web-contents.md) object owned by this view.
|
||||
|
||||
### Instance Methods
|
||||
@@ -57,6 +89,18 @@ Objects created with `new BrowserView` have the following instance methods:
|
||||
|
||||
#### `view.setAutoResize(options)` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
description: "Standardized auto-resizing behavior across all platforms"
|
||||
breaking-changes-header: behavior-changed-browserviewsetautoresize-behavior-on-macos
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` Object
|
||||
* `width` boolean (optional) - If `true`, the view's width will grow and shrink together
|
||||
with the window. `false` by default.
|
||||
@@ -69,18 +113,42 @@ Objects created with `new BrowserView` have the following instance methods:
|
||||
|
||||
#### `view.setBounds(bounds)` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
* `bounds` [Rectangle](structures/rectangle.md)
|
||||
|
||||
Resizes and moves the view to the supplied bounds relative to the window.
|
||||
|
||||
#### `view.getBounds()` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md)
|
||||
|
||||
The `bounds` of this BrowserView instance as `Object`.
|
||||
|
||||
#### `view.setBackgroundColor(color)` _Experimental_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/35658
|
||||
breaking-changes-header: deprecated-browserview
|
||||
```
|
||||
-->
|
||||
|
||||
* `color` string - Color in Hex, RGB, ARGB, HSL, HSLA or named CSS color format. The alpha channel is
|
||||
optional for the hex type.
|
||||
|
||||
|
||||
@@ -690,6 +690,8 @@ Sets whether the window should be in fullscreen mode.
|
||||
|
||||
Returns `boolean` - Whether the window is in fullscreen mode.
|
||||
|
||||
**Note:** On macOS, fullscreen transitions take place asynchronously. When querying for a BrowserWindow's fullscreen status, you should ensure that either the ['enter-full-screen'](browser-window.md#event-enter-full-screen) or ['leave-full-screen'](browser-window.md#event-leave-full-screen) events have been emitted.
|
||||
|
||||
#### `win.setSimpleFullScreen(flag)` _macOS_
|
||||
|
||||
* `flag` boolean
|
||||
@@ -1049,6 +1051,15 @@ win.setSheetOffset(toolbarRect.height)
|
||||
|
||||
#### `win.flashFrame(flag)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/41391
|
||||
description: "`window.flashFrame(bool)` will flash dock icon continuously on macOS"
|
||||
breaking-changes-header: behavior-changed-windowflashframebool-will-flash-dock-icon-continuously-on-macos
|
||||
```
|
||||
-->
|
||||
|
||||
* `flag` boolean
|
||||
|
||||
Starts or stops flashing the window to attract user's attention.
|
||||
|
||||
@@ -1,5 +1,14 @@
|
||||
# contextBridge
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/40330
|
||||
description: "`ipcRenderer` can no longer be sent over the `contextBridge`"
|
||||
breaking-changes-header: behavior-changed-ipcrenderer-can-no-longer-be-sent-over-the-contextbridge
|
||||
```
|
||||
-->
|
||||
|
||||
> Create a safe, bi-directional, synchronous bridge across isolated contexts
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
@@ -74,7 +74,7 @@ The following methods are available on instances of `Cookies`:
|
||||
`url`. Empty implies retrieving cookies of all URLs.
|
||||
* `name` string (optional) - Filters cookies by name.
|
||||
* `domain` string (optional) - Retrieves cookies whose domains match or are
|
||||
subdomains of `domains`.
|
||||
subdomains of `domain`.
|
||||
* `path` string (optional) - Retrieves cookies whose path matches `path`.
|
||||
* `secure` boolean (optional) - Filters cookies by their Secure property.
|
||||
* `session` boolean (optional) - Filters out session or persistent cookies.
|
||||
|
||||
@@ -9,80 +9,66 @@ The following example shows how to capture video from a desktop window whose
|
||||
title is `Electron`:
|
||||
|
||||
```js
|
||||
// In the main process.
|
||||
const { BrowserWindow, desktopCapturer } = require('electron')
|
||||
// main.js
|
||||
const { app, BrowserWindow, desktopCapturer, session } = require('electron')
|
||||
|
||||
const mainWindow = new BrowserWindow()
|
||||
app.whenReady().then(() => {
|
||||
const mainWindow = new BrowserWindow()
|
||||
|
||||
desktopCapturer.getSources({ types: ['window', 'screen'] }).then(async sources => {
|
||||
for (const source of sources) {
|
||||
if (source.name === 'Electron') {
|
||||
mainWindow.webContents.send('SET_SOURCE', source.id)
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
```js @ts-nocheck
|
||||
// In the preload script.
|
||||
const { ipcRenderer } = require('electron')
|
||||
|
||||
ipcRenderer.on('SET_SOURCE', async (event, sourceId) => {
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({
|
||||
audio: false,
|
||||
video: {
|
||||
mandatory: {
|
||||
chromeMediaSource: 'desktop',
|
||||
chromeMediaSourceId: sourceId,
|
||||
minWidth: 1280,
|
||||
maxWidth: 1280,
|
||||
minHeight: 720,
|
||||
maxHeight: 720
|
||||
}
|
||||
}
|
||||
session.defaultSession.setDisplayMediaRequestHandler((request, callback) => {
|
||||
desktopCapturer.getSources({ types: ['screen'] }).then((sources) => {
|
||||
// Grant access to the first screen found.
|
||||
callback({ video: sources[0], audio: 'loopback' })
|
||||
})
|
||||
handleStream(stream)
|
||||
} catch (e) {
|
||||
handleError(e)
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.loadFile('index.html')
|
||||
})
|
||||
|
||||
function handleStream (stream) {
|
||||
const video = document.querySelector('video')
|
||||
video.srcObject = stream
|
||||
video.onloadedmetadata = (e) => video.play()
|
||||
}
|
||||
|
||||
function handleError (e) {
|
||||
console.log(e)
|
||||
}
|
||||
```
|
||||
|
||||
To capture video from a source provided by `desktopCapturer` the constraints
|
||||
passed to [`navigator.mediaDevices.getUserMedia`][] must include
|
||||
`chromeMediaSource: 'desktop'`, and `audio: false`.
|
||||
|
||||
To capture both audio and video from the entire desktop the constraints passed
|
||||
to [`navigator.mediaDevices.getUserMedia`][] must include `chromeMediaSource: 'desktop'`,
|
||||
for both `audio` and `video`, but should not include a `chromeMediaSourceId` constraint.
|
||||
|
||||
```js
|
||||
const constraints = {
|
||||
audio: {
|
||||
mandatory: {
|
||||
chromeMediaSource: 'desktop'
|
||||
// renderer.js
|
||||
const startButton = document.getElementById('startButton')
|
||||
const stopButton = document.getElementById('stopButton')
|
||||
const video = document.querySelector('video')
|
||||
|
||||
startButton.addEventListener('click', () => {
|
||||
navigator.mediaDevices.getDisplayMedia({
|
||||
audio: true,
|
||||
video: {
|
||||
width: 320,
|
||||
height: 240,
|
||||
frameRate: 30
|
||||
}
|
||||
},
|
||||
video: {
|
||||
mandatory: {
|
||||
chromeMediaSource: 'desktop'
|
||||
}
|
||||
}
|
||||
}
|
||||
}).then(stream => {
|
||||
video.srcObject = stream
|
||||
video.onloadedmetadata = (e) => video.play()
|
||||
}).catch(e => console.log(e))
|
||||
})
|
||||
|
||||
stopButton.addEventListener('click', () => {
|
||||
video.pause()
|
||||
})
|
||||
```
|
||||
|
||||
```html
|
||||
<!-- index.html -->
|
||||
<html>
|
||||
<meta http-equiv="content-security-policy" content="script-src 'self' 'unsafe-inline'" />
|
||||
<body>
|
||||
<button id="startButton" class="button">Start</button>
|
||||
<button id="stopButton" class="button">Stop</button>
|
||||
<video width="320" height="240" autoplay></video>
|
||||
<script src="renderer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
||||
See [`navigator.mediaDevices.getDisplayMedia`](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia) for more information.
|
||||
|
||||
**Note:** `navigator.mediaDevices.getDisplayMedia` does not permit the use of `deviceId` for
|
||||
selection of a source - see [specification](https://w3c.github.io/mediacapture-screen-share/#constraints).
|
||||
|
||||
## Methods
|
||||
|
||||
The `desktopCapturer` module has the following methods:
|
||||
|
||||
@@ -15,9 +15,9 @@ console.log(dialog.showOpenDialog({ properties: ['openFile', 'multiSelections']
|
||||
|
||||
The `dialog` module has the following methods:
|
||||
|
||||
### `dialog.showOpenDialogSync([browserWindow, ]options)`
|
||||
### `dialog.showOpenDialogSync([window, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional)
|
||||
* `defaultPath` string (optional)
|
||||
@@ -47,7 +47,7 @@ The `dialog` module has the following methods:
|
||||
|
||||
Returns `string[] | undefined`, the file paths chosen by the user; if the dialog is cancelled it returns `undefined`.
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
The `filters` specifies an array of file types that can be displayed or
|
||||
selected when you want to limit the user to a specific type. For example:
|
||||
@@ -72,15 +72,15 @@ and a directory selector, so if you set `properties` to
|
||||
`['openFile', 'openDirectory']` on these platforms, a directory selector will be
|
||||
shown.
|
||||
|
||||
```js @ts-type={mainWindow:Electron.BrowserWindow}
|
||||
```js @ts-type={mainWindow:Electron.BaseWindow}
|
||||
dialog.showOpenDialogSync(mainWindow, {
|
||||
properties: ['openFile', 'openDirectory']
|
||||
})
|
||||
```
|
||||
|
||||
### `dialog.showOpenDialog([browserWindow, ]options)`
|
||||
### `dialog.showOpenDialog([window, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional)
|
||||
* `defaultPath` string (optional)
|
||||
@@ -114,7 +114,7 @@ Returns `Promise<Object>` - Resolve with an object containing the following:
|
||||
* `filePaths` string[] - An array of file paths chosen by the user. If the dialog is cancelled this will be an empty array.
|
||||
* `bookmarks` string[] (optional) _macOS_ _mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated. (For return values, see [table here](#bookmarks-array).)
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
The `filters` specifies an array of file types that can be displayed or
|
||||
selected when you want to limit the user to a specific type. For example:
|
||||
@@ -139,7 +139,7 @@ and a directory selector, so if you set `properties` to
|
||||
`['openFile', 'openDirectory']` on these platforms, a directory selector will be
|
||||
shown.
|
||||
|
||||
```js @ts-type={mainWindow:Electron.BrowserWindow}
|
||||
```js @ts-type={mainWindow:Electron.BaseWindow}
|
||||
dialog.showOpenDialog(mainWindow, {
|
||||
properties: ['openFile', 'openDirectory']
|
||||
}).then(result => {
|
||||
@@ -150,9 +150,9 @@ dialog.showOpenDialog(mainWindow, {
|
||||
})
|
||||
```
|
||||
|
||||
### `dialog.showSaveDialogSync([browserWindow, ]options)`
|
||||
### `dialog.showSaveDialogSync([window, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional) - The dialog title. Cannot be displayed on some _Linux_ desktop environments.
|
||||
* `defaultPath` string (optional) - Absolute directory path, absolute file
|
||||
@@ -176,14 +176,14 @@ dialog.showOpenDialog(mainWindow, {
|
||||
|
||||
Returns `string`, the path of the file chosen by the user; if the dialog is cancelled it returns an empty string.
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
The `filters` specifies an array of file types that can be displayed, see
|
||||
`dialog.showOpenDialog` for an example.
|
||||
|
||||
### `dialog.showSaveDialog([browserWindow, ]options)`
|
||||
### `dialog.showSaveDialog([window, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `title` string (optional) - The dialog title. Cannot be displayed on some _Linux_ desktop environments.
|
||||
* `defaultPath` string (optional) - Absolute directory path, absolute file
|
||||
@@ -210,7 +210,7 @@ Returns `Promise<Object>` - Resolve with an object containing the following:
|
||||
* `filePath` string - If the dialog is canceled, this will be an empty string.
|
||||
* `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present. (For return values, see [table here](#bookmarks-array).)
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
The `filters` specifies an array of file types that can be displayed, see
|
||||
`dialog.showOpenDialog` for an example.
|
||||
@@ -218,9 +218,9 @@ The `filters` specifies an array of file types that can be displayed, see
|
||||
**Note:** On macOS, using the asynchronous version is recommended to avoid issues when
|
||||
expanding and collapsing the dialog.
|
||||
|
||||
### `dialog.showMessageBoxSync([browserWindow, ]options)`
|
||||
### `dialog.showMessageBoxSync([wndow, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `message` string - Content of the message box.
|
||||
* `type` string (optional) - Can be `none`, `info`, `error`, `question` or
|
||||
@@ -258,12 +258,12 @@ Returns `Integer` - the index of the clicked button.
|
||||
Shows a message box, it will block the process until the message box is closed.
|
||||
It returns the index of the clicked button.
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
If `browserWindow` is not shown dialog will not be attached to it. In such case it will be displayed as an independent window.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
If `window` is not shown dialog will not be attached to it. In such case it will be displayed as an independent window.
|
||||
|
||||
### `dialog.showMessageBox([browserWindow, ]options)`
|
||||
### `dialog.showMessageBox([window, ]options)`
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `message` string - Content of the message box.
|
||||
* `type` string (optional) - Can be `none`, `info`, `error`, `question` or
|
||||
@@ -313,7 +313,7 @@ Returns `Promise<Object>` - resolves with a promise containing the following pro
|
||||
|
||||
Shows a message box.
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
The `window` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
### `dialog.showErrorBox(title, content)`
|
||||
|
||||
@@ -327,9 +327,9 @@ it is usually used to report errors in early stage of startup. If called
|
||||
before the app `ready`event on Linux, the message will be emitted to stderr,
|
||||
and no GUI dialog will appear.
|
||||
|
||||
### `dialog.showCertificateTrustDialog([browserWindow, ]options)` _macOS_ _Windows_
|
||||
### `dialog.showCertificateTrustDialog([window, ]options)` _macOS_ _Windows_
|
||||
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) (optional)
|
||||
* `window` [BaseWindow](base-window.md) (optional)
|
||||
* `options` Object
|
||||
* `certificate` [Certificate](structures/certificate.md) - The certificate to trust/import.
|
||||
* `message` string - The message to display to the user.
|
||||
@@ -338,14 +338,14 @@ Returns `Promise<void>` - resolves when the certificate trust dialog is shown.
|
||||
|
||||
On macOS, this displays a modal dialog that shows a message and certificate
|
||||
information, and gives the user the option of trusting/importing the
|
||||
certificate. If you provide a `browserWindow` argument the dialog will be
|
||||
certificate. If you provide a `window` argument the dialog will be
|
||||
attached to the parent window, making it modal.
|
||||
|
||||
On Windows the options are more limited, due to the Win32 APIs used:
|
||||
|
||||
* The `message` argument is not used, as the OS provides its own confirmation
|
||||
dialog.
|
||||
* The `browserWindow` argument is ignored since it is not possible to make
|
||||
* The `window` argument is ignored since it is not possible to make
|
||||
this confirmation dialog modal.
|
||||
|
||||
## Bookmarks array
|
||||
@@ -362,10 +362,10 @@ On Windows the options are more limited, due to the Win32 APIs used:
|
||||
## Sheets
|
||||
|
||||
On macOS, dialogs are presented as sheets attached to a window if you provide
|
||||
a [`BrowserWindow`](browser-window.md) reference in the `browserWindow` parameter, or modals if no
|
||||
a [`BaseWindow`](base-window.md) reference in the `window` parameter, or modals if no
|
||||
window is provided.
|
||||
|
||||
You can call `BrowserWindow.getCurrentWindow().setSheetOffset(offset)` to change
|
||||
You can call `BaseWindow.getCurrentWindow().setSheetOffset(offset)` to change
|
||||
the offset from the window frame where sheets are attached.
|
||||
|
||||
[AbortSignal]: https://nodejs.org/api/globals.html#globals_class_abortsignal
|
||||
|
||||
@@ -7,6 +7,15 @@ hide_title: false
|
||||
|
||||
# ipcRenderer
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/40330
|
||||
description: "`ipcRenderer` can no longer be sent over the `contextBridge`"
|
||||
breaking-changes-header: behavior-changed-ipcrenderer-can-no-longer-be-sent-over-the-contextbridge
|
||||
```
|
||||
-->
|
||||
|
||||
> Communicate asynchronously from a renderer process to the main process.
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
|
||||
@@ -10,9 +10,9 @@ See [`Menu`](menu.md) for examples.
|
||||
|
||||
* `options` Object
|
||||
* `click` Function (optional) - Will be called with
|
||||
`click(menuItem, browserWindow, event)` when the menu item is clicked.
|
||||
`click(menuItem, window, event)` when the menu item is clicked.
|
||||
* `menuItem` MenuItem
|
||||
* `browserWindow` [BrowserWindow](browser-window.md) | undefined - This will not be defined if no window is open.
|
||||
* `window` [BaseWindow](base-window.md) | undefined - This will not be defined if no window is open.
|
||||
* `event` [KeyboardEvent](structures/keyboard-event.md)
|
||||
* `role` string (optional) - Can be `undo`, `redo`, `cut`, `copy`, `paste`, `pasteAndMatchStyle`, `delete`, `selectAll`, `reload`, `forceReload`, `toggleDevTools`, `resetZoom`, `zoomIn`, `zoomOut`, `toggleSpellChecker`, `togglefullscreen`, `window`, `minimize`, `close`, `help`, `about`, `services`, `hide`, `hideOthers`, `unhide`, `quit`, `showSubstitutions`, `toggleSmartQuotes`, `toggleSmartDashes`, `toggleTextReplacement`, `startSpeaking`, `stopSpeaking`, `zoom`, `front`, `appMenu`, `fileMenu`, `editMenu`, `viewMenu`, `shareMenu`, `recentDocuments`, `toggleTabBar`, `selectNextTab`, `selectPreviousTab`, `showAllTabs`, `mergeAllWindows`, `clearRecentDocuments`, `moveTabToNewWindow` or `windowMenu` - Define the action of the menu item, when specified the
|
||||
`click` property will be ignored. See [roles](#roles).
|
||||
@@ -146,7 +146,7 @@ A `Function` that is fired when the MenuItem receives a click event.
|
||||
It can be called with `menuItem.click(event, focusedWindow, focusedWebContents)`.
|
||||
|
||||
* `event` [KeyboardEvent](structures/keyboard-event.md)
|
||||
* `focusedWindow` [BrowserWindow](browser-window.md)
|
||||
* `focusedWindow` [BaseWindow](browser-window.md)
|
||||
* `focusedWebContents` [WebContents](web-contents.md)
|
||||
|
||||
#### `menuItem.submenu`
|
||||
|
||||
@@ -257,6 +257,15 @@ data.
|
||||
|
||||
#### `image.toDataURL([options])`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
description: "`nativeImage.toDataURL` will preserve PNG colorspace"
|
||||
breaking-changes-header: behavior-changed-nativeimagetodataurl-will-preserve-png-colorspace
|
||||
```
|
||||
-->
|
||||
|
||||
* `options` Object (optional)
|
||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
||||
|
||||
|
||||
@@ -72,3 +72,7 @@ or is being instructed to use an inverted color scheme.
|
||||
|
||||
A `boolean` indicating whether Chromium is in forced colors mode, controlled by system accessibility settings.
|
||||
Currently, Windows high contrast is the only system setting that triggers forced colors mode.
|
||||
|
||||
### `nativeTheme.prefersReducedTransparency` _Readonly_
|
||||
|
||||
A `boolean` that indicates the whether the user has chosen via system accessibility settings to reduce transparency at the OS level.
|
||||
|
||||
@@ -35,10 +35,7 @@ Returns `Integer` - The index of the current page, from which we would go back/f
|
||||
|
||||
* `index` Integer
|
||||
|
||||
Returns `Object`:
|
||||
|
||||
* `url` string - The URL of the navigation entry at the given index.
|
||||
* `title` string - The page title of the navigation entry at the given index.
|
||||
Returns [`NavigationEntry`](structures/navigation-entry.md) - Navigation entry at the given index.
|
||||
|
||||
If index is out of bounds (greater than history length or less than 0), null will be returned.
|
||||
|
||||
@@ -65,3 +62,15 @@ Navigates to the specified offset from the current entry.
|
||||
#### `navigationHistory.length()`
|
||||
|
||||
Returns `Integer` - History length.
|
||||
|
||||
#### `navigationHistory.removeEntryAtIndex(index)`
|
||||
|
||||
* `index` Integer
|
||||
|
||||
Removes the navigation entry at the given index. Can't remove entry at the "current active index".
|
||||
|
||||
Returns `boolean` - Whether the navigation entry was removed from the webContents history.
|
||||
|
||||
#### `navigationHistory.getAllEntries()`
|
||||
|
||||
Returns [`NavigationEntry[]`](structures/navigation-entry.md) - WebContents complete history.
|
||||
|
||||
@@ -36,7 +36,7 @@ Returns `boolean` - Whether or not desktop notifications are supported on the cu
|
||||
* `subtitle` string (optional) _macOS_ - A subtitle for the notification, which will be displayed below the title.
|
||||
* `body` string (optional) - The body text of the notification, which will be displayed below the title or subtitle.
|
||||
* `silent` boolean (optional) - Whether or not to suppress the OS notification noise when showing the notification.
|
||||
* `icon` (string | [NativeImage](native-image.md)) (optional) - An icon to use in the notification.
|
||||
* `icon` (string | [NativeImage](native-image.md)) (optional) - An icon to use in the notification. If a string is passed, it must be a valid path to a local icon file.
|
||||
* `hasReply` boolean (optional) _macOS_ - Whether or not to add an inline reply option to the notification.
|
||||
* `timeoutType` string (optional) _Linux_ _Windows_ - The timeout duration of the notification. Can be 'default' or 'never'.
|
||||
* `replyPlaceholder` string (optional) _macOS_ - The placeholder to write in the inline reply input field.
|
||||
|
||||
@@ -189,6 +189,15 @@ Returns `boolean` - Whether `scheme` is already handled.
|
||||
|
||||
### `protocol.registerFileProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -210,6 +219,15 @@ from protocols that follow the "generic URI syntax" like `file:`.
|
||||
|
||||
### `protocol.registerBufferProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -234,6 +252,15 @@ protocol.registerBufferProtocol('atom', (request, callback) => {
|
||||
|
||||
### `protocol.registerStringProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -250,6 +277,15 @@ property.
|
||||
|
||||
### `protocol.registerHttpProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -265,6 +301,15 @@ should be called with an object that has the `url` property.
|
||||
|
||||
### `protocol.registerStreamProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -314,6 +359,15 @@ protocol.registerStreamProtocol('atom', (request, callback) => {
|
||||
|
||||
### `protocol.unregisterProtocol(scheme)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
|
||||
Returns `boolean` - Whether the protocol was successfully unregistered
|
||||
@@ -322,12 +376,30 @@ Unregisters the custom protocol of `scheme`.
|
||||
|
||||
### `protocol.isProtocolRegistered(scheme)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
|
||||
Returns `boolean` - Whether `scheme` is already registered.
|
||||
|
||||
### `protocol.interceptFileProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -341,6 +413,15 @@ which sends a file as a response.
|
||||
|
||||
### `protocol.interceptStringProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -354,6 +435,15 @@ which sends a `string` as a response.
|
||||
|
||||
### `protocol.interceptBufferProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -367,6 +457,15 @@ which sends a `Buffer` as a response.
|
||||
|
||||
### `protocol.interceptHttpProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -380,6 +479,15 @@ which sends a new HTTP request as a response.
|
||||
|
||||
### `protocol.interceptStreamProtocol(scheme, handler)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
* `handler` Function
|
||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||
@@ -393,6 +501,15 @@ protocol handler.
|
||||
|
||||
### `protocol.uninterceptProtocol(scheme)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
|
||||
Returns `boolean` - Whether the protocol was successfully unintercepted
|
||||
@@ -401,6 +518,15 @@ Remove the interceptor installed for `scheme` and restore its original handler.
|
||||
|
||||
### `protocol.isProtocolIntercepted(scheme)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/36674
|
||||
description: "`protocol.register*Protocol` and `protocol.intercept*Protocol` methods have been replaced with `protocol.handle`"
|
||||
breaking-changes-header: deprecated-protocolunregisterinterceptbufferstringstreamfilehttpprotocol-and-protocolisprotocolregisteredintercepted
|
||||
```
|
||||
-->
|
||||
|
||||
* `scheme` string
|
||||
|
||||
Returns `boolean` - Whether `scheme` is already intercepted.
|
||||
|
||||
@@ -143,6 +143,71 @@ Returns:
|
||||
Emitted after an extension is loaded and all necessary browser state is
|
||||
initialized to support the start of the extension's background page.
|
||||
|
||||
#### Event: 'file-system-access-restricted'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Object
|
||||
* `origin` string - The origin that initiated access to the blocked path.
|
||||
* `isDirectory` boolean - Whether or not the path is a directory.
|
||||
* `path` string - The blocked path attempting to be accessed.
|
||||
* `callback` Function
|
||||
* `action` string - The action to take as a result of the restricted path access attempt.
|
||||
* `allow` - This will allow `path` to be accessed despite restricted status.
|
||||
* `deny` - This will block the access request and trigger an [`AbortError`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort).
|
||||
* `tryAgain` - This will open a new file picker and allow the user to choose another path.
|
||||
|
||||
```js
|
||||
const { app, dialog, BrowserWindow, session } = require('electron')
|
||||
|
||||
async function createWindow () {
|
||||
const mainWindow = new BrowserWindow()
|
||||
|
||||
await mainWindow.loadURL('https://buzzfeed.com')
|
||||
|
||||
session.defaultSession.on('file-system-access-restricted', async (e, details, callback) => {
|
||||
const { origin, path } = details
|
||||
const { response } = await dialog.showMessageBox({
|
||||
message: `Are you sure you want ${origin} to open restricted path ${path}?`,
|
||||
title: 'File System Access Restricted',
|
||||
buttons: ['Choose a different folder', 'Allow', 'Cancel'],
|
||||
cancelId: 2
|
||||
})
|
||||
|
||||
if (response === 0) {
|
||||
callback('tryAgain')
|
||||
} else if (response === 1) {
|
||||
callback('allow')
|
||||
} else {
|
||||
callback('deny')
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.webContents.executeJavaScript(`
|
||||
window.showDirectoryPicker({
|
||||
id: 'electron-demo',
|
||||
mode: 'readwrite',
|
||||
startIn: 'downloads',
|
||||
}).catch(e => {
|
||||
console.log(e)
|
||||
})`, true
|
||||
)
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow()
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
app.on('window-all-closed', function () {
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
```
|
||||
|
||||
#### Event: 'preconnect'
|
||||
|
||||
Returns:
|
||||
@@ -211,7 +276,7 @@ Emitted when a HID device needs to be selected when a call to
|
||||
`navigator.hid.requestDevice` is made. `callback` should be called with
|
||||
`deviceId` to be selected; passing no arguments to `callback` will
|
||||
cancel the request. Additionally, permissioning on `navigator.hid` can
|
||||
be further managed by using [`ses.setPermissionCheckHandler(handler)`](#sessetpermissioncheckhandlerhandler)
|
||||
be further managed by using [`ses.setPermissionCheckHandler(handler)`](#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
and [`ses.setDevicePermissionHandler(handler)`](#sessetdevicepermissionhandlerhandler).
|
||||
|
||||
```js @ts-type={fetchGrantedDevices:()=>(Array<Electron.DevicePermissionHandlerHandlerDetails['device']>)}
|
||||
@@ -317,7 +382,7 @@ Emitted when a serial port needs to be selected when a call to
|
||||
`navigator.serial.requestPort` is made. `callback` should be called with
|
||||
`portId` to be selected, passing an empty string to `callback` will
|
||||
cancel the request. Additionally, permissioning on `navigator.serial` can
|
||||
be managed by using [ses.setPermissionCheckHandler(handler)](#sessetpermissioncheckhandlerhandler)
|
||||
be managed by using [ses.setPermissionCheckHandler(handler)](#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
with the `serial` permission.
|
||||
|
||||
```js @ts-type={fetchGrantedDevices:()=>(Array<Electron.DevicePermissionHandlerHandlerDetails['device']>)}
|
||||
@@ -460,7 +525,7 @@ Emitted when a USB device needs to be selected when a call to
|
||||
`navigator.usb.requestDevice` is made. `callback` should be called with
|
||||
`deviceId` to be selected; passing no arguments to `callback` will
|
||||
cancel the request. Additionally, permissioning on `navigator.usb` can
|
||||
be further managed by using [`ses.setPermissionCheckHandler(handler)`](#sessetpermissioncheckhandlerhandler)
|
||||
be further managed by using [`ses.setPermissionCheckHandler(handler)`](#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
and [`ses.setDevicePermissionHandler(handler)`](#sessetdevicepermissionhandlerhandler).
|
||||
|
||||
```js @ts-type={fetchGrantedDevices:()=>(Array<Electron.DevicePermissionHandlerHandlerDetails['device']>)} @ts-type={updateGrantedDevices:(devices:Array<Electron.DevicePermissionHandlerHandlerDetails['device']>)=>void}
|
||||
@@ -793,10 +858,107 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
|
||||
> **NOTE:** The result of this procedure is cached by the network service.
|
||||
|
||||
#### `ses.setPermissionRequestHandler(handler)`
|
||||
#### `ses.setPermissionHandlers(permissionHandlers)`
|
||||
|
||||
* `permissionHandlers` Object | null
|
||||
* `isGranted` Function\<[PermissionCheckResult](structures/permission-check-result.md)>
|
||||
* `permission` string - Type of permission check.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
* `geolocation` - Access the user's geolocation data via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
||||
* `fullscreen` - Control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
* `hid` - Access the HID protocol to manipulate HID devices via the [WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API).
|
||||
* `idle-detection` - Access the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
||||
* `media` - Access to media devices such as camera, microphone and speakers.
|
||||
* `mediaKeySystem` - Access to DRM protected content.
|
||||
* `midi` - Enable MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `midiSysex` - Use system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `notifications` - Configure and display desktop notifications to the user with the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification).
|
||||
* `openExternal` - Open links in external applications.
|
||||
* `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
||||
* `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API).
|
||||
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `effectiveOrigin` string - The origin of the URL of the permission check, you should use this origin to perform security checks on whether to accept or deny this permission check. You may augment checks with additional information, but this is the primary source of truth you should rely on.
|
||||
* `permissionCheckDetails` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
* `securityOrigin` string (optional) _Deprecated_ - The security origin of the `media` check. This value is identical to `effectiveOrigin`, use that value instead.
|
||||
* `mediaType` string (optional) - The type of media access being requested, can be `video`, `audio` or `unknown`
|
||||
* `isMainFrame` boolean (optional) - Whether the frame making the request is the main frame. This value is `undefined` in cases where the request is coming from a background worker and therefore is not related to a specific frame.
|
||||
* `onRequest` Function\<Promise\<[PermissionRequestResponse](structures/permission-request-response.md)\>\>
|
||||
* `permission` string - The type of requested permission.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
* `display-capture` - Request access to capture the screen via the [Screen Capture API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API).
|
||||
* `fullscreen` - Request control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
* `geolocation` - Request access to the user's location via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
||||
* `idle-detection` - Request access to the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
||||
* `media` - Request access to media devices such as camera, microphone and speakers.
|
||||
* `mediaKeySystem` - Request access to DRM protected content.
|
||||
* `midi` - Request MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `midiSysex` - Request the use of system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `notifications` - Request notification creation and the ability to display them in the user's system tray using the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification)
|
||||
* `pointerLock` - Request to directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
||||
* `keyboardLock` - Request capture of keypresses for any or all of the keys on the physical keyboard via the [Keyboard Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock). These requests always appear to originate from the main frame.
|
||||
* `openExternal` - Request to open links in external applications.
|
||||
* `speaker-selection` - Request to enumerate and select audio output devices via the [speaker-selection permissions policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/speaker-selection).
|
||||
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
|
||||
* `unknown` - An unrecognized permission request.
|
||||
* `fileSystem` - Request access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
|
||||
* `effectiveOrigin` String - The origin of the URL of the permission check, you should use this origin to perform security checks on whether to accept or deny this permission check. You may augment checks with additional information, but this is the primary source of truth you should rely on.
|
||||
* `permissionRequestDetails` [PermissionRequest](structures/permission-request.md) | [FilesystemPermissionRequest](structures/filesystem-permission-request.md) | [MediaAccessPermissionRequest](structures/media-access-permission-request.md) | [OpenExternalPermissionRequest](structures/open-external-permission-request.md) - Additional information about the permission being requested.
|
||||
|
||||
<!--
|
||||
STUFF
|
||||
|
||||
Sets the handler which can be used to respond to permission requests for the `session`.
|
||||
Calling `callback(true)` will allow the permission and `callback(false)` will reject it.
|
||||
To clear the handler, call `setPermissionRequestHandler(null)`. Please note that
|
||||
you must also implement `setPermissionCheckHandler` to get complete permission handling.
|
||||
Most web APIs do a permission check and then make a permission request if the check is denied.
|
||||
|
||||
```js
|
||||
const { session } = require('electron')
|
||||
session.fromPartition('some-partition').setPermissionRequestHandler((webContents, permission, callback) => {
|
||||
if (webContents.getURL() === 'some-host' && permission === 'notifications') {
|
||||
return callback(false) // denied.
|
||||
}
|
||||
|
||||
callback(true)
|
||||
})
|
||||
```
|
||||
|
||||
#### `ses.setPermissionCheckHandler(handler)`
|
||||
|
||||
* `handler`
|
||||
|
||||
Sets the handler which can be used to respond to permission checks for the `session`.
|
||||
Returning `true` will allow the permission and `false` will reject it. Please note that
|
||||
you must also implement `setPermissionRequestHandler` to get complete permission handling.
|
||||
Most web APIs do a permission check and then make a permission request if the check is denied.
|
||||
To clear the handler, call `setPermissionCheckHandler(null)`.
|
||||
|
||||
```js
|
||||
const { session } = require('electron')
|
||||
const url = require('url')
|
||||
session.fromPartition('some-partition').setPermissionCheckHandler((webContents, permission, requestingOrigin) => {
|
||||
if (new URL(requestingOrigin).hostname === 'some-host' && permission === 'notifications') {
|
||||
return true // granted
|
||||
}
|
||||
|
||||
return false // denied
|
||||
})
|
||||
```
|
||||
|
||||
-->
|
||||
|
||||
#### `ses.setPermissionRequestHandler(handler)` _Deprecated_
|
||||
|
||||
* `handler` Function | null
|
||||
* `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin.
|
||||
* `webContents` [WebContents](web-contents.md) - WebContents requesting the permission. Please note that if the request comes from a subframe you should use `effectiveOrigin` to check the request origin.
|
||||
* `permission` string - The type of requested permission.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
@@ -821,6 +983,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `callback` Function
|
||||
* `permissionGranted` boolean - Allow or deny the permission.
|
||||
* `details` [PermissionRequest](structures/permission-request.md) | [FilesystemPermissionRequest](structures/filesystem-permission-request.md) | [MediaAccessPermissionRequest](structures/media-access-permission-request.md) | [OpenExternalPermissionRequest](structures/open-external-permission-request.md) - Additional information about the permission being requested.
|
||||
* `effectiveOrigin` string - The origin of the URL of the permission check, you should use this origin to perform security checks on whether to accept or deny this permission check. You may augment checks with additional information, but this is the primary source of truth you should rely on.
|
||||
|
||||
Sets the handler which can be used to respond to permission requests for the `session`.
|
||||
Calling `callback(true)` will allow the permission and `callback(false)` will reject it.
|
||||
@@ -839,10 +1002,10 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
})
|
||||
```
|
||||
|
||||
#### `ses.setPermissionCheckHandler(handler)`
|
||||
#### `ses.setPermissionCheckHandler(handler)` _Deprecated_
|
||||
|
||||
* `handler` Function\<boolean> | null
|
||||
* `webContents` ([WebContents](web-contents.md) | null) - WebContents checking the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin. All cross origin sub frames making permission checks will pass a `null` webContents to this handler, while certain other permission checks such as `notifications` checks will always pass `null`. You should use `embeddingOrigin` and `requestingOrigin` to determine what origin the owning frame and the requesting frame are on respectively.
|
||||
* `webContents` ([WebContents](web-contents.md) | null) - WebContents checking the permission. Please note that if the request comes from a subframe you should use `effectiveOrigin` to check the request origin. All cross origin sub frames making permission checks will pass a `null` webContents to this handler, while certain other permission checks such as `notifications` checks will always pass `null`. You should use `embeddingOrigin` and `effectiveOrigin` to determine what origin the owning frame and the requesting frame are on respectively.
|
||||
* `permission` string - Type of permission check.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
@@ -861,7 +1024,7 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `effectiveOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
* `securityOrigin` string (optional) - The security origin of the `media` check.
|
||||
@@ -1446,7 +1609,7 @@ Returns `Promise<void>` - resolves when all data has been cleared.
|
||||
|
||||
Clears various different types of data.
|
||||
|
||||
This method clears more types of data and is more thourough than the
|
||||
This method clears more types of data and is more thorough than the
|
||||
`clearStorageData` method.
|
||||
|
||||
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.
|
||||
|
||||
@@ -91,6 +91,10 @@
|
||||
title bar and a full size content window, the traffic light buttons will
|
||||
display when being hovered over in the top left of the window.
|
||||
**Note:** This option is currently experimental.
|
||||
* `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
|
||||
* `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
|
||||
* `trafficLightPosition` [Point](point.md) (optional) _macOS_ -
|
||||
Set a custom position for the traffic light buttons in frameless windows.
|
||||
* `roundedCorners` boolean (optional) _macOS_ - Whether frameless window
|
||||
@@ -139,8 +143,7 @@ Possible values are:
|
||||
-webkit-app-region: drag. This type is commonly used for splash screens.
|
||||
* The `notification` type creates a window that behaves like a system notification.
|
||||
* On macOS, possible types are `desktop`, `textured`, `panel`.
|
||||
* The `textured` type adds metal gradient appearance
|
||||
(`NSWindowStyleMaskTexturedBackground`).
|
||||
* The `textured` type adds metal gradient appearance. This option is **deprecated**.
|
||||
* The `desktop` type places the window at the desktop background window level
|
||||
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
|
||||
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
|
||||
@@ -150,3 +153,6 @@ Possible values are:
|
||||
reserved for NSPanel, at runtime. Also, the window will appear on all
|
||||
spaces (desktops).
|
||||
* On Windows, possible type is `toolbar`.
|
||||
|
||||
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
|
||||
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis
|
||||
|
||||
@@ -2,10 +2,3 @@
|
||||
|
||||
* `webPreferences` [WebPreferences](web-preferences.md?inline) (optional) - Settings of web page's features.
|
||||
* `paintWhenInitiallyHidden` boolean (optional) - Whether the renderer should be active when `show` is `false` and it has just been created. In order for `document.visibilityState` to work correctly on first load with `show: false` you should set this to `false`. Setting this to `false` will cause the `ready-to-show` event to not fire. Default is `true`.
|
||||
* `titleBarOverlay` Object | Boolean (optional) - When using a frameless window in conjunction with `win.setWindowButtonVisibility(true)` on macOS or using a `titleBarStyle` so that the standard window controls ("traffic lights" on macOS) are visible, this property enables the Window Controls Overlay [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars]. Specifying `true` will result in an overlay with default system colors. Default is `false`.
|
||||
* `color` String (optional) _Windows_ _Linux_ - The CSS color of the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `symbolColor` String (optional) _Windows_ - The CSS color of the symbols on the Window Controls Overlay when enabled. Default is the system color.
|
||||
* `height` Integer (optional) - The height of the title bar and Window Controls Overlay in pixels. Default is system height.
|
||||
|
||||
[overlay-css-env-vars]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#css-environment-variables
|
||||
[overlay-javascript-apis]: https://github.com/WICG/window-controls-overlay/blob/main/explainer.md#javascript-apis
|
||||
|
||||
4
docs/api/structures/navigation-entry.md
Normal file
4
docs/api/structures/navigation-entry.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# NavigationEntry Object
|
||||
|
||||
* `url` string
|
||||
* `title` string
|
||||
24
docs/api/structures/offscreen-shared-texture.md
Normal file
24
docs/api/structures/offscreen-shared-texture.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# OffscreenSharedTexture Object
|
||||
|
||||
* `textureInfo` Object - The shared texture info.
|
||||
* `widgetType` string - The widget type of the texture. Can be `popup` or `frame`.
|
||||
* `pixelFormat` string - The pixel format of the texture. Can be `rgba` or `bgra`.
|
||||
* `codedSize` [Size](size.md) - The full dimensions of the video frame.
|
||||
* `visibleRect` [Rectangle](rectangle.md) - A subsection of [0, 0, codedSize.width(), codedSize.height()]. In OSR case, it is expected to have the full section area.
|
||||
* `contentRect` [Rectangle](rectangle.md) - The region of the video frame that capturer would like to populate. In OSR case, it is the same with `dirtyRect` that needs to be painted.
|
||||
* `timestamp` number - The time in microseconds since the capture start.
|
||||
* `metadata` Object - Extra metadata. See comments in src\media\base\video_frame_metadata.h for accurate details.
|
||||
* `captureUpdateRect` [Rectangle](rectangle.md) (optional) - Updated area of frame, can be considered as the `dirty` area.
|
||||
* `regionCaptureRect` [Rectangle](rectangle.md) (optional) - May reflect the frame's contents origin if region capture is used internally.
|
||||
* `sourceSize` [Rectangle](rectangle.md) (optional) - Full size of the source frame.
|
||||
* `frameCount` number (optional) - The increasing count of captured frame. May contain gaps if frames are dropped between two consecutively received frames.
|
||||
* `sharedTextureHandle` Buffer _Windows_ _macOS_ - The handle to the shared texture.
|
||||
* `planes` Object[] _Linux_ - Each plane's info of the shared texture.
|
||||
* `stride` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
|
||||
* `offset` number - The strides and offsets in bytes to be used when accessing the buffers via a memory mapping. One per plane per entry.
|
||||
* `size` number - Size in bytes of the plane. This is necessary to map the buffers.
|
||||
* `fd` number - File descriptor for the underlying memory object (usually dmabuf).
|
||||
* `modifier` string _Linux_ - The modifier is retrieved from GBM library and passed to EGL driver.
|
||||
* `release` Function - Release the resources. The `texture` cannot be directly passed to another process, users need to maintain texture lifecycles in
|
||||
main process, but it is safe to pass the `textureInfo` to another process. Only a limited number of textures can exist at the same time, so it's important
|
||||
that you call `texture.release()` as soon as you're done with the texture.
|
||||
5
docs/api/structures/permission-check-result.md
Normal file
5
docs/api/structures/permission-check-result.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# PermissionCheckResult Object
|
||||
|
||||
* `status` string - Can be `granted`, `denied` or `ask`. Controls whether the permission check should be approved. Granted and Denied have their implied effects, `ask` will result in a permission request being fired to your permission request handler.
|
||||
|
||||
Note: For media permission checks `ask` is equivilant to `granted`.
|
||||
3
docs/api/structures/permission-request-response.md
Normal file
3
docs/api/structures/permission-request-response.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# PermissionRequestResponse Object
|
||||
|
||||
* `status` string - Can be `granted` or `denied`. Controls whether the permission should be granted.
|
||||
@@ -79,10 +79,14 @@
|
||||
[browserWindow](../browser-window.md) has disabled `backgroundThrottling` then
|
||||
frames will be drawn and swapped for the whole window and other
|
||||
[webContents](../web-contents.md) displayed by it. Defaults to `true`.
|
||||
* `offscreen` boolean (optional) - Whether to enable offscreen rendering for the browser
|
||||
* `offscreen` Object | boolean (optional) - Whether to enable offscreen rendering for the browser
|
||||
window. Defaults to `false`. See the
|
||||
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for
|
||||
more details.
|
||||
* `useSharedTexture` boolean (optional) _Experimental_ - Whether to use GPU shared texture for accelerated
|
||||
paint event. Defaults to `false`. See the
|
||||
[offscreen rendering tutorial](../../tutorial/offscreen-rendering.md) for
|
||||
more details.
|
||||
* `contextIsolation` boolean (optional) - Whether to run Electron APIs and
|
||||
the specified `preload` script in a separate JavaScript context. Defaults
|
||||
to `true`. The context that the `preload` script runs in will only have
|
||||
|
||||
@@ -401,10 +401,12 @@ Returns an object with system animation settings.
|
||||
|
||||
## Properties
|
||||
|
||||
### `systemPreferences.accessibilityDisplayShouldReduceTransparency()` _macOS_
|
||||
### `systemPreferences.accessibilityDisplayShouldReduceTransparency` _macOS_ _Deprecated_
|
||||
|
||||
A `boolean` property which determines whether the app avoids using semitransparent backgrounds. This maps to [NSWorkspace.accessibilityDisplayShouldReduceTransparency](https://developer.apple.com/documentation/appkit/nsworkspace/1533006-accessibilitydisplayshouldreduce)
|
||||
|
||||
**Deprecated:** Use the new [`nativeTheme.prefersReducedTransparency`](native-theme.md#nativethemeprefersreducedtransparency-readonly) API.
|
||||
|
||||
### `systemPreferences.effectiveAppearance` _macOS_ _Readonly_
|
||||
|
||||
A `string` property that can be `dark`, `light` or `unknown`.
|
||||
|
||||
@@ -39,7 +39,7 @@ updates the control in the touch bar. Possible values:
|
||||
|
||||
#### `touchBarScrubber.overlayStyle`
|
||||
|
||||
A `string` representing the style that selected items in the scrubber should have. This style is overlayed on top
|
||||
A `string` representing the style that selected items in the scrubber should have. This style is overlaid on top
|
||||
of the scrubber item instead of being placed behind it. Updating this value immediately updates the control in the
|
||||
touch bar. Possible values:
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ Process: [Main](../glossary.md#main-process)<br />
|
||||
`com.apple.security.cs.allow-unsigned-executable-memory` entitlements. This will allow the utility process
|
||||
to load unsigned libraries. Unless you specifically need this capability, it is best to leave this disabled.
|
||||
Default is `false`.
|
||||
* `respondToAuthRequestsFromMainProcess` boolean (optional) - With this flag, all HTTP 401 and 407 network
|
||||
requests created via the [net module](net.md) will allow responding to them via the [`app#login`](app.md#event-login) event in the main process instead of the default [`login`](client-request.md#event-login) event on the [`ClientRequest`](client-request.md) object.
|
||||
|
||||
Returns [`UtilityProcess`](utility-process.md#class-utilityprocess)
|
||||
|
||||
|
||||
@@ -869,12 +869,12 @@ app.whenReady().then(() => {
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Event\<\>
|
||||
* `texture` [OffscreenSharedTexture](structures/offscreen-shared-texture.md) (optional) _Experimental_ - The GPU shared texture of the frame, when `webPreferences.offscreen.useSharedTexture` is `true`.
|
||||
* `dirtyRect` [Rectangle](structures/rectangle.md)
|
||||
* `image` [NativeImage](native-image.md) - The image data of the whole frame.
|
||||
|
||||
Emitted when a new frame is generated. Only the dirty area is passed in the
|
||||
buffer.
|
||||
Emitted when a new frame is generated. Only the dirty area is passed in the buffer.
|
||||
|
||||
```js
|
||||
const { BrowserWindow } = require('electron')
|
||||
@@ -886,6 +886,33 @@ win.webContents.on('paint', (event, dirty, image) => {
|
||||
win.loadURL('https://github.com')
|
||||
```
|
||||
|
||||
When using shared texture (set `webPreferences.offscreen.useSharedTexture` to `true`) feature, you can pass the texture handle to external rendering pipeline without the overhead of
|
||||
copying data between CPU and GPU memory, with Chromium's hardware acceleration support. This feature is helpful for high-performance rendering scenarios.
|
||||
|
||||
Only a limited number of textures can exist at the same time, so it's important that you call `texture.release()` as soon as you're done with the texture.
|
||||
By managing the texture lifecycle by yourself, you can safely pass the `texture.textureInfo` to other processes through IPC.
|
||||
|
||||
```js
|
||||
const { BrowserWindow } = require('electron')
|
||||
|
||||
const win = new BrowserWindow({ webPreferences: { offscreen: { useSharedTexture: true } } })
|
||||
win.webContents.on('paint', async (e, dirty, image) => {
|
||||
if (e.texture) {
|
||||
// By managing lifecycle yourself, you can handle the event in async handler or pass the `e.texture.textureInfo`
|
||||
// to other processes (not `e.texture`, the `e.texture.release` function is not passable through IPC).
|
||||
await new Promise(resolve => setTimeout(resolve, 50))
|
||||
|
||||
// You can send the native texture handle to native code for importing into your rendering pipeline.
|
||||
// For example: https://github.com/electron/electron/tree/main/spec/fixtures/native-addon/osr-gpu
|
||||
// importTextureHandle(dirty, e.texture.textureInfo)
|
||||
|
||||
// You must call `e.texture.release()` as soon as possible, before the underlying frame pool is drained.
|
||||
e.texture.release()
|
||||
}
|
||||
})
|
||||
win.loadURL('https://github.com')
|
||||
```
|
||||
|
||||
#### Event: 'devtools-reload-page'
|
||||
|
||||
Emitted when the devtools window instructs the webContents to reload
|
||||
@@ -1126,18 +1153,42 @@ Reloads current page and ignores cache.
|
||||
|
||||
#### `contents.canGoBack()` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `boolean` - Whether the browser can go back to previous web page.
|
||||
|
||||
**Deprecated:** Should use the new [`contents.navigationHistory.canGoBack`](navigation-history.md#navigationhistorycangoback) API.
|
||||
|
||||
#### `contents.canGoForward()` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `boolean` - Whether the browser can go forward to next web page.
|
||||
|
||||
**Deprecated:** Should use the new [`contents.navigationHistory.canGoForward`](navigation-history.md#navigationhistorycangoforward) API.
|
||||
|
||||
#### `contents.canGoToOffset(offset)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
* `offset` Integer
|
||||
|
||||
Returns `boolean` - Whether the web page can go to `offset`.
|
||||
@@ -1146,24 +1197,56 @@ Returns `boolean` - Whether the web page can go to `offset`.
|
||||
|
||||
#### `contents.clearHistory()` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
Clears the navigation history.
|
||||
|
||||
**Deprecated:** Should use the new [`contents.navigationHistory.clear`](navigation-history.md#navigationhistoryclear) API.
|
||||
|
||||
#### `contents.goBack()` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
Makes the browser go back a web page.
|
||||
|
||||
**Deprecated:** Should use the new [`contents.navigationHistory.goBack`](navigation-history.md#navigationhistorygoback) API.
|
||||
|
||||
#### `contents.goForward()` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
Makes the browser go forward a web page.
|
||||
|
||||
**Deprecated:** Should use the new [`contents.navigationHistory.goForward`](navigation-history.md#navigationhistorygoforward) API.
|
||||
|
||||
#### `contents.goToIndex(index)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
* `index` Integer
|
||||
|
||||
Navigates browser to the specified absolute web page index.
|
||||
@@ -1172,6 +1255,14 @@ Navigates browser to the specified absolute web page index.
|
||||
|
||||
#### `contents.goToOffset(offset)` _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/41752
|
||||
breaking-changes-header: deprecated-clearhistory-cangoback-goback-cangoforward-goforward-gotoindex-cangotooffset-gotooffset-on-webcontents
|
||||
```
|
||||
-->
|
||||
|
||||
* `offset` Integer
|
||||
|
||||
Navigates to the specified offset from the "current entry".
|
||||
@@ -1943,9 +2034,9 @@ ipcRenderer.on('port', (e, msg) => {
|
||||
})
|
||||
```
|
||||
|
||||
#### `contents.enableDeviceEmulation(parameters)`
|
||||
#### `contents.enableDeviceEmulation(deviceEmulationParameters)`
|
||||
|
||||
* `parameters` Object
|
||||
* `deviceEmulationParameters` Object
|
||||
* `screenPosition` string - Specify the screen type to emulate
|
||||
(default: `desktop`):
|
||||
* `desktop` - Desktop screen type.
|
||||
@@ -2148,6 +2239,15 @@ when the page becomes backgrounded. This also affects the Page Visibility API.
|
||||
|
||||
#### `contents.setBackgroundThrottling(allowed)`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/38924
|
||||
description: "`WebContents.backgroundThrottling` set to false affects all `WebContents` in the host `BrowserWindow`"
|
||||
breaking-changes-header: behavior-changed-webcontentsbackgroundthrottling-set-to-false-affects-all-webcontents-in-the-host-browserwindow
|
||||
```
|
||||
-->
|
||||
|
||||
* `allowed` boolean
|
||||
|
||||
Controls whether or not this WebContents will throttle animations and timers
|
||||
@@ -2258,6 +2358,15 @@ A [`Debugger`](debugger.md) instance for this webContents.
|
||||
|
||||
#### `contents.backgroundThrottling`
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/38924
|
||||
description: "`WebContents.backgroundThrottling` set to false affects all `WebContents` in the host `BrowserWindow`"
|
||||
breaking-changes-header: behavior-changed-webcontentsbackgroundthrottling-set-to-false-affects-all-webcontents-in-the-host-browserwindow
|
||||
```
|
||||
-->
|
||||
|
||||
A `boolean` property that determines whether or not this WebContents will throttle animations and timers
|
||||
when the page becomes backgrounded. This also affects the Page Visibility API.
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ The `webUtils` module has the following methods:
|
||||
|
||||
Returns `string` - The file system path that this `File` object points to. In the case where the object passed in is not a `File` object an exception is thrown. In the case where the File object passed in was constructed in JS and is not backed by a file on disk an empty string is returned.
|
||||
|
||||
This method superceded the previous augmentation to the `File` object with the `path` property. An example is included below.
|
||||
This method superseded the previous augmentation to the `File` object with the `path` property. An example is included below.
|
||||
|
||||
```js
|
||||
// Before
|
||||
|
||||
@@ -12,6 +12,37 @@ This document uses the following convention to categorize breaking changes:
|
||||
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||
|
||||
## Planned Breaking API Changes (33.0)
|
||||
|
||||
### Behavior Changed: `webContents` property on `login` on `app`
|
||||
|
||||
The `webContents` property in the `login` event from `app` will be `null`
|
||||
when the event is triggered for requests from the [utility process](api/utility-process.md)
|
||||
created with `respondToAuthRequestsFromMainProcess` option.
|
||||
|
||||
### Deprecated: `textured` option in `BrowserWindowConstructorOption.type`
|
||||
|
||||
The `textured` option of `type` in `BrowserWindowConstructorOptions` has been deprecated with no replacement. This option relied on the [`NSWindowStyleMaskTexturedBackground`](https://developer.apple.com/documentation/appkit/nswindowstylemask/nswindowstylemasktexturedbackground) style mask on macOS, which has been deprecated with no alternative.
|
||||
|
||||
### Removed: macOS 10.15 support
|
||||
|
||||
macOS 10.15 (Catalina) is no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/5734361).
|
||||
|
||||
Older versions of Electron will continue to run on Catalina, but macOS 11 (Big Sur)
|
||||
or later will be required to run Electron v33.0.0 and higher.
|
||||
|
||||
### Deprecated: `systemPreferences.accessibilityDisplayShouldReduceTransparency`
|
||||
|
||||
The `systemPreferences.accessibilityDisplayShouldReduceTransparency` property is now deprecated in favor of the new `nativeTheme.prefersReducedTransparency`, which provides identical information and works cross-platform.
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
const shouldReduceTransparency = systemPreferences.accessibilityDisplayShouldReduceTransparency
|
||||
|
||||
// Replace with:
|
||||
const prefersReducedTransparency = nativeTheme.prefersReducedTransparency
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (32.0)
|
||||
|
||||
### Removed: `File.path`
|
||||
@@ -44,7 +75,7 @@ contextBridge.exposeInMainWorld('electron', {
|
||||
})
|
||||
```
|
||||
|
||||
### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `canGoToOffset`, `goToOffset` on `WebContents`
|
||||
### Deprecated: `clearHistory`, `canGoBack`, `goBack`, `canGoForward`, `goForward`, `goToIndex`, `canGoToOffset`, `goToOffset` on `WebContents`
|
||||
|
||||
The navigation-related APIs are now deprecated.
|
||||
|
||||
@@ -57,6 +88,7 @@ win.webContents.canGoBack()
|
||||
win.webContents.goBack()
|
||||
win.webContents.canGoForward()
|
||||
win.webContents.goForward()
|
||||
win.webContents.goToIndex(index)
|
||||
win.webContents.canGoToOffset()
|
||||
win.webContents.goToOffset(index)
|
||||
|
||||
@@ -115,6 +147,24 @@ The autoresizing behavior is now standardized across all platforms.
|
||||
If your app uses `BrowserView.setAutoResize` to do anything more complex than making a BrowserView fill the entire window, it's likely you already had custom logic in place to handle this difference in behavior on macOS.
|
||||
If so, that logic will no longer be needed in Electron 30 as autoresizing behavior is consistent.
|
||||
|
||||
### Deprecated: `BrowserView`
|
||||
|
||||
The [`BrowserView`](./api/browser-view.md) class has been deprecated and
|
||||
replaced by the new [`WebContentsView`](./api/web-contents-view.md) class.
|
||||
|
||||
`BrowserView` related methods in [`BrowserWindow`](./api/browser-window.md) have
|
||||
also been deprecated:
|
||||
|
||||
```js
|
||||
BrowserWindow.fromBrowserView(browserView)
|
||||
win.setBrowserView(browserView)
|
||||
win.getBrowserView()
|
||||
win.addBrowserView(browserView)
|
||||
win.removeBrowserView(browserView)
|
||||
win.setTopBrowserView(browserView)
|
||||
win.getBrowserViews()
|
||||
```
|
||||
|
||||
### Removed: `params.inputFormType` property on `context-menu` on `WebContents`
|
||||
|
||||
The `inputFormType` property of the params object in the `context-menu`
|
||||
@@ -442,7 +492,7 @@ systemPreferences.getColor('selected-content-background')
|
||||
|
||||
## Planned Breaking API Changes (25.0)
|
||||
|
||||
### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
|
||||
### Deprecated: `protocol.{un,}{register,intercept}{Buffer,String,Stream,File,Http}Protocol` and `protocol.isProtocol{Registered,Intercepted}`
|
||||
|
||||
The `protocol.register*Protocol` and `protocol.intercept*Protocol` methods have
|
||||
been replaced with [`protocol.handle`](api/protocol.md#protocolhandlescheme-handler).
|
||||
@@ -1777,7 +1827,7 @@ In Electron 7, this now returns a `FileList` with a `File` object for:
|
||||
|
||||
Note that `webkitdirectory` no longer exposes the path to the selected folder.
|
||||
If you require the path to the selected folder rather than the folder contents,
|
||||
see the `dialog.showOpenDialog` API ([link](api/dialog.md#dialogshowopendialogbrowserwindow-options)).
|
||||
see the `dialog.showOpenDialog` API ([link](api/dialog.md#dialogshowopendialogwindow-options)).
|
||||
|
||||
### API Changed: Callback-based versions of promisified APIs
|
||||
|
||||
|
||||
190
docs/development/api-history-migration-guide.md
Normal file
190
docs/development/api-history-migration-guide.md
Normal file
@@ -0,0 +1,190 @@
|
||||
# Electron API History Migration Guide
|
||||
|
||||
This document demonstrates how to add API History blocks to existing APIs.
|
||||
|
||||
## API history information
|
||||
|
||||
Here are some resources you can use to find information on the history of an API:
|
||||
|
||||
### Breaking Changes
|
||||
|
||||
* [`breaking-changes.md`](../breaking-changes.md)
|
||||
|
||||
### Additions
|
||||
|
||||
* `git blame`
|
||||
* [Release notes](https://github.com/electron/electron/releases/)
|
||||
* [`electron-api-historian`](https://github.com/electron/electron-api-historian)
|
||||
|
||||
## Example
|
||||
|
||||
> [!NOTE]
|
||||
> The associated API is already removed, we will ignore that for the purpose of
|
||||
> this example.
|
||||
|
||||
If we search through [`breaking-changes.md`](../breaking-changes.md) we can find
|
||||
[a function that was deprecated in Electron `25.0`](../breaking-changes.md#deprecated-browserwindowsettrafficlightpositionposition).
|
||||
|
||||
```markdown
|
||||
<!-- docs/breaking-changes.md -->
|
||||
### Deprecated: `BrowserWindow.getTrafficLightPosition()`
|
||||
|
||||
`BrowserWindow.getTrafficLightPosition()` has been deprecated, the
|
||||
`BrowserWindow.getWindowButtonPosition()` API should be used instead
|
||||
which returns `null` instead of `{ x: 0, y: 0 }` when there is no custom
|
||||
position.
|
||||
|
||||
<!-- docs/api/browser-window.md -->
|
||||
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
|
||||
Returns `Point` - The custom position for the traffic light buttons in
|
||||
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
|
||||
position.
|
||||
```
|
||||
|
||||
We can then use `git blame` to find the Pull Request associated with that entry:
|
||||
|
||||
```bash
|
||||
$ grep -n "BrowserWindow.getTrafficLightPosition" docs/breaking-changes.md
|
||||
523:### Deprecated: `BrowserWindow.getTrafficLightPosition()`
|
||||
525:`BrowserWindow.getTrafficLightPosition()` has been deprecated, the
|
||||
|
||||
$ git blame -L523,524 -- docs/breaking-changes.md
|
||||
1e206deec3e (Keeley Hammond 2023-04-06 21:23:29 -0700 523) ### Deprecated: `BrowserWindow.getTrafficLightPosition()`
|
||||
1e206deec3e (Keeley Hammond 2023-04-06 21:23:29 -0700 524)
|
||||
|
||||
$ git log -1 1e206deec3e
|
||||
commit 1e206deec3ef142460c780307752a84782f9baed (tag: v26.0.0-nightly.20230407)
|
||||
Author: Keeley Hammond <vertedinde@electronjs.org>
|
||||
Date: Thu Apr 6 21:23:29 2023 -0700
|
||||
|
||||
docs: update E24/E25 breaking changes (#37878) <-- This is the associated Pull Request
|
||||
```
|
||||
|
||||
Verify that the Pull Request is correct and make a corresponding entry in the
|
||||
API History:
|
||||
|
||||
> [!NOTE]
|
||||
> Refer to the [API History section of `styleguide.md`](../styleguide.md#api-history)
|
||||
for information on how to create API History blocks.
|
||||
|
||||
`````markdown
|
||||
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/37878
|
||||
breaking-changes-header: deprecated-browserwindowgettrafficlightposition
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `Point` - The custom position for the traffic light buttons in
|
||||
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
|
||||
position.
|
||||
`````
|
||||
|
||||
You can keep looking through `breaking-changes.md` to find other breaking changes
|
||||
and add those in.
|
||||
|
||||
You can also use [`git log -L :<funcname>:<file>`](https://git-scm.com/docs/git-log#Documentation/git-log.txt--Lltfuncnamegtltfilegt):
|
||||
|
||||
```bash
|
||||
$ git log --reverse -L :GetTrafficLightPosition:shell/browser/native_window_mac.mm
|
||||
commit e01b1831d96d5d68f54af879b00c617358df5372
|
||||
Author: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Wed Dec 16 14:30:39 2020 +0900
|
||||
|
||||
feat: make trafficLightPosition work for customButtonOnHover (#26789)
|
||||
```
|
||||
|
||||
Verify that the Pull Request is correct and make a corresponding entry in the
|
||||
API History:
|
||||
|
||||
`````markdown
|
||||
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/22533
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/26789
|
||||
description: "Made `trafficLightPosition` option work for `customButtonOnHover` window."
|
||||
breaking-changes-header: behavior-changed-draggable-regions-on-macos
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `Point` - The custom position for the traffic light buttons in
|
||||
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
|
||||
position.
|
||||
`````
|
||||
|
||||
We will then look for when the API was originally added:
|
||||
|
||||
```bash
|
||||
$ git log --reverse -L :GetTrafficLightPosition:shell/browser/native_window_mac.mm
|
||||
commit 3e2cec83d927b991855e21cc311ca9046e332601
|
||||
Author: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Thu Mar 5 14:22:12 2020 -0800
|
||||
|
||||
feat: programmatically modify traffic light positioning (#22533)
|
||||
```
|
||||
|
||||
Alternatively, you can use `git blame`:
|
||||
|
||||
```bash
|
||||
$ git checkout 1e206deec3e^
|
||||
HEAD is now at e8c87859c4 fix: showAboutPanel also on linux (#37828)
|
||||
|
||||
$ grep -n "getTrafficLightPosition" docs/api/browser-window.md
|
||||
1867:#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
|
||||
$ git blame -L1867,1868 -- docs/api/browser-window.md
|
||||
0de1012280e (Cheng Zhao 2023-02-17 19:06:32 +0900 1867) #### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
3e2cec83d92 (Samuel Attard 2020-03-05 14:22:12 -0800 1868)
|
||||
|
||||
$ git checkout 0de1012280e^
|
||||
HEAD is now at 0a5e634736 test: rename & split internal module tests (#37318)
|
||||
|
||||
$ grep -n "getTrafficLightPosition" docs/api/browser-window.md
|
||||
1851:#### `win.getTrafficLightPosition()` _macOS_
|
||||
|
||||
$ git blame -L1851,1852 -- docs/api/browser-window.md
|
||||
3e2cec83d92 (Samuel Attard 2020-03-05 14:22:12 -0800 1851) #### `win.getTrafficLightPosition()` _macOS_
|
||||
3e2cec83d92 (Samuel Attard 2020-03-05 14:22:12 -0800 1852)
|
||||
|
||||
$ git checkout 3e2cec83d92^
|
||||
HEAD is now at 1811751c6c docs: clean up dark mode related docs (#22489)
|
||||
|
||||
$ grep -n "getTrafficLightPosition" docs/api/browser-window.md
|
||||
(Nothing)
|
||||
|
||||
$ git checkout 3e2cec83d92
|
||||
HEAD is now at 3e2cec83d9 feat: programmatically modify traffic light positioning (#22533)
|
||||
```
|
||||
|
||||
Verify that the Pull Request is correct and make a corresponding entry in the
|
||||
API History:
|
||||
|
||||
`````markdown
|
||||
#### `win.getTrafficLightPosition()` _macOS_ _Deprecated_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/22533
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/26789
|
||||
description: "Made `trafficLightPosition` option work for `customButtonOnHover` window."
|
||||
breaking-changes-header: behavior-changed-draggable-regions-on-macos
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/37878
|
||||
breaking-changes-header: deprecated-browserwindowgettrafficlightposition
|
||||
```
|
||||
-->
|
||||
|
||||
Returns `Point` - The custom position for the traffic light buttons in
|
||||
frameless window, `{ x: 0, y: 0 }` will be returned when there is no custom
|
||||
position.
|
||||
`````
|
||||
@@ -250,6 +250,157 @@ The properties chapter must be in following form:
|
||||
The heading can be `###` or `####`-levels depending on whether the property
|
||||
belongs to a module or a class.
|
||||
|
||||
## API History
|
||||
|
||||
An "API History" block is a YAML code block encapsulated by an HTML comment that
|
||||
should be placed directly after the Markdown header for a class or method, like so:
|
||||
|
||||
`````markdown
|
||||
#### `win.setTrafficLightPosition(position)` _macOS_
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
added:
|
||||
- pr-url: https://github.com/electron/electron/pull/22533
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/26789
|
||||
description: "Made `trafficLightPosition` option work for `customButtonOnHover` window."
|
||||
deprecated:
|
||||
- pr-url: https://github.com/electron/electron/pull/37094
|
||||
breaking-changes-header: deprecated-browserwindowsettrafficlightpositionposition
|
||||
```
|
||||
-->
|
||||
|
||||
* `position` [Point](structures/point.md)
|
||||
|
||||
Set a custom position for the traffic light buttons. Can only be used with `titleBarStyle` set to `hidden`.
|
||||
`````
|
||||
|
||||
It should adhere to the API History [JSON Schema](https://json-schema.org/)
|
||||
(`api-history.schema.json`) which you can find in the `docs` folder.
|
||||
The [API History Schema RFC][api-history-schema-rfc] includes example usage and detailed
|
||||
explanations for each aspect of the schema.
|
||||
|
||||
The purpose of the API History block is to describe when/where/how/why an API was:
|
||||
|
||||
* Added
|
||||
* Changed (usually breaking changes)
|
||||
* Deprecated
|
||||
|
||||
Each API change listed in the block should include a link to the
|
||||
PR where that change was made along with an optional short description of the
|
||||
change. If applicable, include the [heading id](https://gist.github.com/asabaylus/3071099)
|
||||
for that change from the [breaking changes documentation](./breaking-changes.md).
|
||||
|
||||
The [API History linting script][api-history-linting-script] (`lint:api-history`)
|
||||
validates API History blocks in the Electron documentation against the schema and
|
||||
performs some other checks. You can look at its [tests][api-history-tests] for more
|
||||
details.
|
||||
|
||||
There are a few style guidelines that aren't covered by the linting script:
|
||||
|
||||
### Format
|
||||
|
||||
Always adhere to this format:
|
||||
|
||||
```markdown
|
||||
API HEADER | #### `win.flashFrame(flag)`
|
||||
BLANK LINE |
|
||||
HTML COMMENT OPENING TAG | <!--
|
||||
API HISTORY OPENING TAG | ```YAML history
|
||||
API HISTORY | added:
|
||||
| - pr-url: https://github.com/electron/electron/pull/22533
|
||||
API HISTORY CLOSING TAG | ```
|
||||
HTML COMMENT CLOSING TAG | -->
|
||||
BLANK LINE |
|
||||
```
|
||||
|
||||
### YAML
|
||||
|
||||
* Use two spaces for indentation.
|
||||
* Do not use comments.
|
||||
|
||||
### Descriptions
|
||||
|
||||
* Always wrap descriptions with double quotation marks (i.e. "example").
|
||||
* [Certain special characters (e.g. `[`, `]`) can break YAML parsing](https:/stackoverflow.com/a/37015689/19020549).
|
||||
* Describe the change in a way relevant to app developers and make it
|
||||
capitalized, punctuated, and past tense.
|
||||
* Refer to [Clerk](https://github.com/electron/clerk/blob/main/README.md#examples)
|
||||
for examples.
|
||||
* Keep descriptions concise.
|
||||
* Ideally, a description will match its corresponding header in the
|
||||
breaking changes document.
|
||||
* Favor using the release notes from the associated PR whenever possible.
|
||||
* Developers can always view the breaking changes document or linked
|
||||
pull request for more details.
|
||||
|
||||
### Placement
|
||||
|
||||
Generally, you should place the API History block directly after the Markdown header
|
||||
for a class or method that was changed. However, there are some instances where this
|
||||
is ambiguous:
|
||||
|
||||
#### Chromium bump
|
||||
|
||||
* [chore: bump chromium to 122.0.6194.0 (main)](https://github.com/electron/electron/pull/40750)
|
||||
* [Behavior Changed: cross-origin iframes now use Permission Policy to access features][api-history-cross-origin]
|
||||
|
||||
Sometimes a breaking change doesn't relate to any of the existing APIs. In this
|
||||
case, it is ok not to add API History anywhere.
|
||||
|
||||
#### Change affecting multiple APIs
|
||||
|
||||
* [refactor: ensure IpcRenderer is not bridgable](https://github.com/electron/electron/pull/40330)
|
||||
* [Behavior Changed: ipcRenderer can no longer be sent over the contextBridge][api-history-ipc-renderer]
|
||||
|
||||
Sometimes a breaking change involves multiple APIs. In this case, place the
|
||||
API History block under the top-level Markdown header for each of the
|
||||
involved APIs.
|
||||
|
||||
`````markdown
|
||||
# contextBridge
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/40330
|
||||
description: "`ipcRenderer` can no longer be sent over the `contextBridge`"
|
||||
breaking-changes-header: behavior-changed-ipcrenderer-can-no-longer-be-sent-over-the-contextbridge
|
||||
```
|
||||
-->
|
||||
|
||||
> Create a safe, bi-directional, synchronous bridge across isolated contexts
|
||||
`````
|
||||
|
||||
`````markdown
|
||||
# ipcRenderer
|
||||
|
||||
<!--
|
||||
```YAML history
|
||||
changes:
|
||||
- pr-url: https://github.com/electron/electron/pull/40330
|
||||
description: "`ipcRenderer` can no longer be sent over the `contextBridge`"
|
||||
breaking-changes-header: behavior-changed-ipcrenderer-can-no-longer-be-sent-over-the-contextbridge
|
||||
```
|
||||
-->
|
||||
|
||||
Process: [Renderer](../glossary.md#renderer-process)
|
||||
`````
|
||||
|
||||
Notice how an API History block wasn't added under:
|
||||
|
||||
* `contextBridge.exposeInMainWorld(apiKey, api)`
|
||||
|
||||
since that function wasn't changed, only how it may be used:
|
||||
|
||||
```patch
|
||||
contextBridge.exposeInMainWorld('app', {
|
||||
- ipcRenderer,
|
||||
+ onEvent: (cb) => ipcRenderer.on('foo', (e, ...args) => cb(args))
|
||||
})
|
||||
```
|
||||
|
||||
## Documentation translations
|
||||
|
||||
See [electron/i18n](https://github.com/electron/i18n#readme)
|
||||
@@ -257,3 +408,8 @@ See [electron/i18n](https://github.com/electron/i18n#readme)
|
||||
[title-case]: https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case
|
||||
[sentence-case]: https://apastyle.apa.org/style-grammar-guidelines/capitalization/sentence-case
|
||||
[markdownlint]: https://github.com/DavidAnson/markdownlint
|
||||
[api-history-schema-rfc]: https://github.com/electron/rfcs/blob/f36e0a8483e1ea844710890a8a7a1bd58ecbac05/text/0004-api-history-schema.md
|
||||
[api-history-linting-script]: https://github.com/electron/lint-roller/blob/3030970136ec6b41028ef973f944d3e5cad68e1c/bin/lint-markdown-api-history.ts
|
||||
[api-history-tests]: https://github.com/electron/lint-roller/blob/main/tests/lint-roller-markdown-api-history.spec.ts
|
||||
[api-history-cross-origin]: https://github.com/electron/electron/blob/f508f6b6b570481a2b61d8c4f8c1951f492e4309/docs/breaking-changes.md#behavior-changed-cross-origin-iframes-now-use-permission-policy-to-access-features
|
||||
[api-history-ipc-renderer]: https://github.com/electron/electron/blob/f508f6b6b570481a2b61d8c4f8c1951f492e4309/docs/breaking-changes.md#behavior-changed-ipcrenderer-can-no-longer-be-sent-over-the-contextbridge
|
||||
|
||||
@@ -52,7 +52,7 @@ the WebHID API:
|
||||
needed, a developer can store granted device permissions (eg when handling
|
||||
the `select-hid-device` event) and then read from that storage with
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
can be used to disable HID access for specific origins.
|
||||
|
||||
### Blocklist
|
||||
@@ -101,7 +101,7 @@ There are several additional APIs for working with the Web Serial API:
|
||||
needed, a developer can store granted device permissions (eg when handling
|
||||
the `select-serial-port` event) and then read from that storage with
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
can be used to disable serial access for specific origins.
|
||||
|
||||
### Example
|
||||
@@ -140,7 +140,7 @@ Electron provides several APIs for working with the WebUSB API:
|
||||
needed, a developer can store granted device permissions (eg when handling
|
||||
the `select-usb-device` event) and then read from that storage with
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler-deprecated)
|
||||
can be used to disable USB access for specific origins.
|
||||
* [`ses.setUSBProtectedClassesHandler](../api/session.md#sessetusbprotectedclasseshandlerhandler)
|
||||
can be used to allow usage of [protected USB classes](https://wicg.github.io/webusb/#usbinterface-interface) that are not available by default.
|
||||
|
||||
@@ -9,10 +9,11 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | TBD | ✅ |
|
||||
| 33.0.0 | 2024-Aug-22 | 2024-Sep-18 | 2024-Oct-15 | 2025-Apr-29 | M130 | TBD | ✅ |
|
||||
| 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-07 | 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 | ✅ |
|
||||
| 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 | 🚫 |
|
||||
@@ -98,19 +99,12 @@ is as follows:
|
||||
|
||||
<img src="https://raw.githubusercontent.com/nodejs/Release/main/schedule.svg?sanitize=true" alt="Releases">
|
||||
|
||||
As a rule, stable branches of Electron do not receive Node.js upgrades after they have been cut.
|
||||
If Electron has recently updated its `main` branch to a new major version of Node.js, the next stable
|
||||
branch to be cut will be released with the new version.
|
||||
|
||||
Patch upgrades of Node that contain significant security or bug fixes, and are submitted
|
||||
more than 2 weeks prior to a stable release date, will be accepted into an Electron alpha
|
||||
or beta release branch.
|
||||
|
||||
Minor upgrades of Node that contain significant security or bug fixes, and are submitted
|
||||
more than 2 weeks prior to a stable release date may be accepted into an Electron alpha or
|
||||
beta release branch on a case-by-case basis. These requests will be reviewed and voted on
|
||||
by the [Releases Working Group](https://github.com/electron/governance/tree/main/wg-releases),
|
||||
to ensure minimal disruption for developers who may be consuming alpha or beta releases.
|
||||
Stable release lines of Electron will receive minor and patch bumps of Node.js after they are released.
|
||||
Patch bumps to Node.js will be released in patch releases of Electron, and minor bumps to Node.js will result in a minor release of Electron.
|
||||
Security-only release branches will receive security-related changes from Node.js releases, but not the full release.
|
||||
|
||||
### Breaking API changes
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ Fuses are the solution to this problem, at a high level they are "magic bits" in
|
||||
### `runAsNode`
|
||||
|
||||
**Default:** Enabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.RunAsNode`
|
||||
|
||||
The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function. Instead, we recommend that you use [Utility Processes](../api/utility-process.md), which work for many use cases where you need a standalone Node.js process (like a Sqlite server process or similar scenarios).
|
||||
@@ -20,6 +21,7 @@ The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variab
|
||||
### `cookieEncryption`
|
||||
|
||||
**Default:** Disabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.EnableCookieEncryption`
|
||||
|
||||
The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.
|
||||
@@ -27,6 +29,7 @@ The cookieEncryption fuse toggles whether the cookie store on disk is encrypted
|
||||
### `nodeOptions`
|
||||
|
||||
**Default:** Enabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable`
|
||||
|
||||
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
|
||||
@@ -34,6 +37,7 @@ The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api
|
||||
### `nodeCliInspect`
|
||||
|
||||
**Default:** Enabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.EnableNodeCliInspectArguments`
|
||||
|
||||
The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.
|
||||
@@ -41,6 +45,7 @@ The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. f
|
||||
### `embeddedAsarIntegrityValidation`
|
||||
|
||||
**Default:** Disabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.EnableEmbeddedAsarIntegrityValidation`
|
||||
|
||||
The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.
|
||||
@@ -50,6 +55,7 @@ For more information on how to use asar integrity validation please read the [As
|
||||
### `onlyLoadAppFromAsar`
|
||||
|
||||
**Default:** Disabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar`
|
||||
|
||||
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
|
||||
@@ -57,6 +63,7 @@ The onlyLoadAppFromAsar fuse changes the search system that Electron uses to loc
|
||||
### `loadBrowserProcessSpecificV8Snapshot`
|
||||
|
||||
**Default:** Disabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.LoadBrowserProcessSpecificV8Snapshot`
|
||||
|
||||
The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is used for the browser process. By default Electron's processes will all use the same V8 snapshot file. When this fuse is enabled the browser process uses the file called `browser_v8_context_snapshot.bin` for its V8 snapshot. The other processes will use the V8 snapshot file that they normally do.
|
||||
@@ -64,6 +71,7 @@ The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is
|
||||
### `grantFileProtocolExtraPrivileges`
|
||||
|
||||
**Default:** Enabled
|
||||
|
||||
**@electron/fuses:** `FuseV1Options.GrantFileProtocolExtraPrivileges`
|
||||
|
||||
The grantFileProtocolExtraPrivileges fuse changes whether pages loaded from the `file://` protocol are given privileges beyond what they would receive in a traditional web browser. This behavior was core to Electron apps in original versions of Electron but is no longer required as apps should be [serving local files from custom protocols](./security.md#18-avoid-usage-of-the-file-protocol-and-prefer-usage-of-custom-protocols) now instead. If you aren't serving pages from `file://` you should disable this fuse.
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
## Overview
|
||||
|
||||
Offscreen rendering lets you obtain the content of a `BrowserWindow` in a
|
||||
bitmap, so it can be rendered anywhere, for example, on texture in a 3D scene.
|
||||
bitmap or a shared GPU texture, so it can be rendered anywhere, for example,
|
||||
on texture in a 3D scene.
|
||||
The offscreen rendering in Electron uses a similar approach to that of the
|
||||
[Chromium Embedded Framework](https://bitbucket.org/chromiumembedded/cef)
|
||||
project.
|
||||
@@ -17,22 +18,39 @@ the dirty area is passed to the `paint` event to be more efficient.
|
||||
losses with no benefits.
|
||||
* When nothing is happening on a webpage, no frames are generated.
|
||||
* An offscreen window is always created as a
|
||||
[Frameless Window](../tutorial/window-customization.md)..
|
||||
[Frameless Window](../tutorial/window-customization.md).
|
||||
|
||||
### Rendering Modes
|
||||
|
||||
#### GPU accelerated
|
||||
|
||||
GPU accelerated rendering means that the GPU is used for composition. Because of
|
||||
that, the frame has to be copied from the GPU which requires more resources,
|
||||
thus this mode is slower than the Software output device. The benefit of this
|
||||
mode is that WebGL and 3D CSS animations are supported.
|
||||
GPU accelerated rendering means that the GPU is used for composition. The benefit
|
||||
of this mode is that WebGL and 3D CSS animations are supported. There are two
|
||||
different approaches depending on the `webPreferences.offscreen.useSharedTexture`
|
||||
setting.
|
||||
|
||||
1. Use GPU shared texture
|
||||
|
||||
Used when `webPreferences.offscreen.useSharedTexture` is set to `true`.
|
||||
|
||||
This is an advanced feature requiring a native node module to work with your own code.
|
||||
The frames are directly copied in GPU textures, thus this mode is very fast because
|
||||
there's no CPU-GPU memory copies overhead, and you can directly import the shared
|
||||
texture to your own rendering program.
|
||||
|
||||
2. Use CPU shared memory bitmap
|
||||
|
||||
Used when `webPreferences.offscreen.useSharedTexture` is set to `false` (default behavior).
|
||||
|
||||
The texture is accessible using the `NativeImage` API at the cost of performance.
|
||||
The frame has to be copied from the GPU to the CPU bitmap which requires more system
|
||||
resources, thus this mode is slower than the Software output device mode. But it supports
|
||||
GPU related functionalities.
|
||||
|
||||
#### Software output device
|
||||
|
||||
This mode uses a software output device for rendering in the CPU, so the frame
|
||||
generation is much faster. As a result, this mode is preferred over the GPU
|
||||
accelerated one.
|
||||
generation is faster than shared memory bitmap GPU accelerated mode.
|
||||
|
||||
To enable this mode, GPU acceleration has to be disabled by calling the
|
||||
[`app.disableHardwareAcceleration()`][disablehardwareacceleration] API.
|
||||
|
||||
@@ -222,8 +222,8 @@ rest of our docs and happy developing! If you have questions, please stop by our
|
||||
[code-signed]: ./code-signing.md
|
||||
[discord server]: https://discord.gg/electronjs
|
||||
[electron fiddle]: https://www.electronjs.org/fiddle
|
||||
[fiddle-build]: https://github.com/electron/fiddle/blob/main/.github/workflows/build.yaml
|
||||
[fiddle-forge-config]: https://github.com/electron/fiddle/blob/main/forge.config.js
|
||||
[fiddle-build]: https://github.com/electron/fiddle/blob/main/.circleci/config.yml
|
||||
[fiddle-forge-config]: https://github.com/electron/fiddle/blob/main/forge.config.ts
|
||||
[github actions]: https://github.com/features/actions
|
||||
[github publisher]: https://www.electronforge.io/config/publishers/github
|
||||
[github releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
|
||||
|
||||
@@ -97,7 +97,7 @@ The [Window Controls Overlay API][] is a web standard that gives web apps the ab
|
||||
customize their title bar region when installed on desktop. Electron exposes this API
|
||||
through the `BrowserWindow` constructor option `titleBarOverlay`.
|
||||
|
||||
This option only works whenever a custom `titlebarStyle` is applied on macOS or Windows.
|
||||
This option only works whenever a custom `titlebarStyle` is applied.
|
||||
When `titleBarOverlay` is enabled, the window controls become exposed in their default
|
||||
position, and DOM elements cannot use the area underneath this region.
|
||||
|
||||
@@ -107,7 +107,6 @@ Specifying `true` on either platform will result in an overlay region with defau
|
||||
system colors:
|
||||
|
||||
```js title='main.js'
|
||||
// on macOS or Windows
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow({
|
||||
titleBarStyle: 'hidden',
|
||||
|
||||
@@ -105,8 +105,10 @@ auto_filenames = {
|
||||
"docs/api/structures/mime-typed-buffer.md",
|
||||
"docs/api/structures/mouse-input-event.md",
|
||||
"docs/api/structures/mouse-wheel-input-event.md",
|
||||
"docs/api/structures/navigation-entry.md",
|
||||
"docs/api/structures/notification-action.md",
|
||||
"docs/api/structures/notification-response.md",
|
||||
"docs/api/structures/offscreen-shared-texture.md",
|
||||
"docs/api/structures/open-external-permission-request.md",
|
||||
"docs/api/structures/payment-discount.md",
|
||||
"docs/api/structures/permission-request.md",
|
||||
@@ -354,6 +356,7 @@ auto_filenames = {
|
||||
"lib/browser/message-port-main.ts",
|
||||
"lib/common/api/net-client-request.ts",
|
||||
"lib/common/define-properties.ts",
|
||||
"lib/common/deprecate.ts",
|
||||
"lib/common/init.ts",
|
||||
"lib/common/webpack-globals-provider.ts",
|
||||
"lib/utility/api/exports/electron.ts",
|
||||
|
||||
@@ -159,8 +159,12 @@ filenames = {
|
||||
"shell/browser/osr/osr_web_contents_view_mac.mm",
|
||||
"shell/browser/relauncher_mac.cc",
|
||||
"shell/browser/ui/certificate_trust_mac.mm",
|
||||
"shell/browser/ui/cocoa/delayed_native_view_host.h",
|
||||
"shell/browser/ui/cocoa/delayed_native_view_host.mm",
|
||||
"shell/browser/ui/cocoa/electron_bundle_mover.h",
|
||||
"shell/browser/ui/cocoa/electron_bundle_mover.mm",
|
||||
"shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h",
|
||||
"shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm",
|
||||
"shell/browser/ui/cocoa/electron_menu_controller.h",
|
||||
"shell/browser/ui/cocoa/electron_menu_controller.mm",
|
||||
"shell/browser/ui/cocoa/electron_native_widget_mac.h",
|
||||
@@ -187,6 +191,8 @@ filenames = {
|
||||
"shell/browser/ui/cocoa/window_buttons_proxy.mm",
|
||||
"shell/browser/ui/drag_util_mac.mm",
|
||||
"shell/browser/ui/file_dialog_mac.mm",
|
||||
"shell/browser/ui/inspectable_web_contents_view_mac.h",
|
||||
"shell/browser/ui/inspectable_web_contents_view_mac.mm",
|
||||
"shell/browser/ui/message_box_mac.mm",
|
||||
"shell/browser/ui/tray_icon_cocoa.h",
|
||||
"shell/browser/ui/tray_icon_cocoa.mm",
|
||||
@@ -202,7 +208,6 @@ filenames = {
|
||||
"shell/common/node_bindings_mac.cc",
|
||||
"shell/common/node_bindings_mac.h",
|
||||
"shell/common/platform_util_mac.mm",
|
||||
"shell/browser/ui/views/inspectable_web_contents_view_mac.mm",
|
||||
]
|
||||
|
||||
lib_sources_views = [
|
||||
@@ -217,6 +222,8 @@ filenames = {
|
||||
"shell/browser/ui/views/electron_views_delegate.h",
|
||||
"shell/browser/ui/views/frameless_view.cc",
|
||||
"shell/browser/ui/views/frameless_view.h",
|
||||
"shell/browser/ui/views/inspectable_web_contents_view_views.cc",
|
||||
"shell/browser/ui/views/inspectable_web_contents_view_views.h",
|
||||
"shell/browser/ui/views/menu_bar.cc",
|
||||
"shell/browser/ui/views/menu_bar.h",
|
||||
"shell/browser/ui/views/menu_delegate.cc",
|
||||
@@ -290,7 +297,6 @@ filenames = {
|
||||
"shell/browser/api/electron_api_push_notifications.cc",
|
||||
"shell/browser/api/electron_api_push_notifications.h",
|
||||
"shell/browser/api/electron_api_safe_storage.cc",
|
||||
"shell/browser/api/electron_api_safe_storage.h",
|
||||
"shell/browser/api/electron_api_screen.cc",
|
||||
"shell/browser/api/electron_api_screen.h",
|
||||
"shell/browser/api/electron_api_service_worker_context.cc",
|
||||
@@ -372,6 +378,8 @@ filenames = {
|
||||
"shell/browser/electron_navigation_throttle.h",
|
||||
"shell/browser/electron_permission_manager.cc",
|
||||
"shell/browser/electron_permission_manager.h",
|
||||
"shell/browser/electron_plugin_info_host_impl.cc",
|
||||
"shell/browser/electron_plugin_info_host_impl.h",
|
||||
"shell/browser/electron_speech_recognition_manager_delegate.cc",
|
||||
"shell/browser/electron_speech_recognition_manager_delegate.h",
|
||||
"shell/browser/electron_web_contents_utility_handler_impl.cc",
|
||||
@@ -390,6 +398,8 @@ filenames = {
|
||||
"shell/browser/file_system_access/file_system_access_permission_context.h",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context_factory.cc",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context_factory.h",
|
||||
"shell/browser/file_system_access/file_system_access_web_contents_helper.cc",
|
||||
"shell/browser/file_system_access/file_system_access_web_contents_helper.h",
|
||||
"shell/browser/font_defaults.cc",
|
||||
"shell/browser/font_defaults.h",
|
||||
"shell/browser/hid/electron_hid_delegate.cc",
|
||||
@@ -443,6 +453,8 @@ filenames = {
|
||||
"shell/browser/net/resolve_proxy_helper.h",
|
||||
"shell/browser/net/system_network_context_manager.cc",
|
||||
"shell/browser/net/system_network_context_manager.h",
|
||||
"shell/browser/net/url_loader_network_observer.cc",
|
||||
"shell/browser/net/url_loader_network_observer.h",
|
||||
"shell/browser/net/url_pipe_loader.cc",
|
||||
"shell/browser/net/url_pipe_loader.h",
|
||||
"shell/browser/net/web_request_api_interface.h",
|
||||
@@ -457,6 +469,8 @@ filenames = {
|
||||
"shell/browser/notifications/platform_notification_service.h",
|
||||
"shell/browser/osr/osr_host_display_client.cc",
|
||||
"shell/browser/osr/osr_host_display_client.h",
|
||||
"shell/browser/osr/osr_paint_event.cc",
|
||||
"shell/browser/osr/osr_paint_event.h",
|
||||
"shell/browser/osr/osr_render_widget_host_view.cc",
|
||||
"shell/browser/osr/osr_render_widget_host_view.h",
|
||||
"shell/browser/osr/osr_video_consumer.cc",
|
||||
@@ -542,7 +556,6 @@ filenames = {
|
||||
"shell/common/api/electron_api_clipboard.h",
|
||||
"shell/common/api/electron_api_command_line.cc",
|
||||
"shell/common/api/electron_api_environment.cc",
|
||||
"shell/common/api/electron_api_key_weak_map.h",
|
||||
"shell/common/api/electron_api_native_image.cc",
|
||||
"shell/common/api/electron_api_native_image.h",
|
||||
"shell/common/api/electron_api_net.cc",
|
||||
@@ -554,8 +567,6 @@ filenames = {
|
||||
"shell/common/api/electron_bindings.cc",
|
||||
"shell/common/api/electron_bindings.h",
|
||||
"shell/common/api/features.cc",
|
||||
"shell/common/api/object_life_monitor.cc",
|
||||
"shell/common/api/object_life_monitor.h",
|
||||
"shell/common/application_info.cc",
|
||||
"shell/common/application_info.h",
|
||||
"shell/common/asar/archive.cc",
|
||||
@@ -589,7 +600,7 @@ filenames = {
|
||||
"shell/common/gin_converters/gfx_converter.cc",
|
||||
"shell/common/gin_converters/gfx_converter.h",
|
||||
"shell/common/gin_converters/guid_converter.h",
|
||||
"shell/common/gin_converters/gurl_converter.h",
|
||||
"shell/common/gin_converters/url_converters.h",
|
||||
"shell/common/gin_converters/hid_device_info_converter.h",
|
||||
"shell/common/gin_converters/image_converter.cc",
|
||||
"shell/common/gin_converters/image_converter.h",
|
||||
@@ -603,6 +614,8 @@ filenames = {
|
||||
"shell/common/gin_converters/net_converter.cc",
|
||||
"shell/common/gin_converters/net_converter.h",
|
||||
"shell/common/gin_converters/optional_converter.h",
|
||||
"shell/common/gin_converters/osr_converter.cc",
|
||||
"shell/common/gin_converters/osr_converter.h",
|
||||
"shell/common/gin_converters/serial_port_info_converter.h",
|
||||
"shell/common/gin_converters/std_converter.h",
|
||||
"shell/common/gin_converters/time_converter.cc",
|
||||
|
||||
@@ -98,6 +98,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_find_first_of.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_find_if.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_find_if_not.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_find_last.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_for_each.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_for_each_n.h",
|
||||
"//third_party/libc++/src/include/__algorithm/ranges_generate.h",
|
||||
@@ -510,6 +511,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__math/remainder.h",
|
||||
"//third_party/libc++/src/include/__math/roots.h",
|
||||
"//third_party/libc++/src/include/__math/rounding_functions.h",
|
||||
"//third_party/libc++/src/include/__math/special_functions.h",
|
||||
"//third_party/libc++/src/include/__math/traits.h",
|
||||
"//third_party/libc++/src/include/__math/trigonometric_functions.h",
|
||||
"//third_party/libc++/src/include/__mbstate_t.h",
|
||||
@@ -535,6 +537,8 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__memory/concepts.h",
|
||||
"//third_party/libc++/src/include/__memory/construct_at.h",
|
||||
"//third_party/libc++/src/include/__memory/destruct_n.h",
|
||||
"//third_party/libc++/src/include/__memory/inout_ptr.h",
|
||||
"//third_party/libc++/src/include/__memory/out_ptr.h",
|
||||
"//third_party/libc++/src/include/__memory/pointer_traits.h",
|
||||
"//third_party/libc++/src/include/__memory/ranges_construct_at.h",
|
||||
"//third_party/libc++/src/include/__memory/ranges_uninitialized_algorithms.h",
|
||||
@@ -712,6 +716,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__thread/timed_backoff_policy.h",
|
||||
"//third_party/libc++/src/include/__tree",
|
||||
"//third_party/libc++/src/include/__tuple/find_index.h",
|
||||
"//third_party/libc++/src/include/__tuple/ignore.h",
|
||||
"//third_party/libc++/src/include/__tuple/make_tuple_types.h",
|
||||
"//third_party/libc++/src/include/__tuple/sfinae_helpers.h",
|
||||
"//third_party/libc++/src/include/__tuple/tuple_element.h",
|
||||
@@ -778,8 +783,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_implicitly_default_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_integral.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_literal_type.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_function_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_object_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h",
|
||||
@@ -796,7 +799,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_referenceable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_same.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_scalar.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_scoped_enum.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_signed.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_signed_integer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_specialization.h",
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import { EventEmitter } from 'events';
|
||||
import type { BaseWindow as TLWT } from 'electron/main';
|
||||
import { TouchBar } from 'electron/main';
|
||||
|
||||
const { BaseWindow } = process._linkedBinding('electron_browser_base_window') as { BaseWindow: typeof TLWT };
|
||||
|
||||
Object.setPrototypeOf(BaseWindow.prototype, EventEmitter.prototype);
|
||||
@@ -15,6 +17,10 @@ BaseWindow.prototype._init = function (this: TLWT) {
|
||||
}
|
||||
};
|
||||
|
||||
BaseWindow.prototype.setTouchBar = function (touchBar) {
|
||||
(TouchBar as any)._setOnWindow(touchBar, this);
|
||||
};
|
||||
|
||||
// Properties
|
||||
|
||||
Object.defineProperty(BaseWindow.prototype, 'autoHideMenuBar', {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BaseWindow, WebContents, TouchBar, BrowserView } from 'electron/main';
|
||||
import { BaseWindow, WebContents, BrowserView } from 'electron/main';
|
||||
import type { BrowserWindow as BWT } from 'electron/main';
|
||||
const { BrowserWindow } = process._linkedBinding('electron_browser_window') as { BrowserWindow: typeof BWT };
|
||||
|
||||
@@ -36,29 +36,6 @@ BrowserWindow.prototype._init = function (this: BWT) {
|
||||
app.emit('browser-window-focus', event, this);
|
||||
});
|
||||
|
||||
let unresponsiveEvent: NodeJS.Timeout | null = null;
|
||||
const emitUnresponsiveEvent = () => {
|
||||
unresponsiveEvent = null;
|
||||
if (!this.isDestroyed() && this.isEnabled()) { this.emit('unresponsive'); }
|
||||
};
|
||||
this.webContents.on('unresponsive', () => {
|
||||
if (!unresponsiveEvent) { unresponsiveEvent = setTimeout(emitUnresponsiveEvent, 50); }
|
||||
});
|
||||
this.webContents.on('responsive', () => {
|
||||
if (unresponsiveEvent) {
|
||||
clearTimeout(unresponsiveEvent);
|
||||
unresponsiveEvent = null;
|
||||
}
|
||||
this.emit('responsive');
|
||||
});
|
||||
this.on('close', () => {
|
||||
if (!unresponsiveEvent) { unresponsiveEvent = setTimeout(emitUnresponsiveEvent, 5000); }
|
||||
});
|
||||
this.webContents.on('destroyed', () => {
|
||||
if (unresponsiveEvent) clearTimeout(unresponsiveEvent);
|
||||
unresponsiveEvent = null;
|
||||
});
|
||||
|
||||
// Subscribe to visibilityState changes and pass to renderer process.
|
||||
let isVisible = this.isVisible() && !this.isMinimized();
|
||||
const visibilityChanged = () => {
|
||||
@@ -123,10 +100,6 @@ BrowserWindow.fromBrowserView = (browserView: BrowserView) => {
|
||||
return BrowserWindow.fromWebContents(browserView.webContents);
|
||||
};
|
||||
|
||||
BrowserWindow.prototype.setTouchBar = function (touchBar) {
|
||||
(TouchBar as any)._setOnWindow(touchBar, this);
|
||||
};
|
||||
|
||||
// Forwarded to webContents:
|
||||
|
||||
BrowserWindow.prototype.loadURL = function (...args) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { BrowserWindow } from 'electron/main';
|
||||
const { createDesktopCapturer } = process._linkedBinding('electron_browser_desktop_capturer');
|
||||
|
||||
const deepEqual = (a: ElectronInternal.GetSourcesOptions, b: ElectronInternal.GetSourcesOptions) => JSON.stringify(a) === JSON.stringify(b);
|
||||
@@ -15,6 +16,16 @@ function isValid (options: Electron.SourcesOptions) {
|
||||
export async function getSources (args: Electron.SourcesOptions) {
|
||||
if (!isValid(args)) throw new Error('Invalid options');
|
||||
|
||||
const resizableValues = new Map();
|
||||
if (process.platform === 'darwin') {
|
||||
// Fix for bug in ScreenCaptureKit that modifies a window's styleMask the first time
|
||||
// it captures a non-resizable window. We record each non-resizable window's styleMask,
|
||||
// and we restore modified styleMasks later, after the screen capture.
|
||||
for (const win of BrowserWindow.getAllWindows()) {
|
||||
resizableValues.set([win.id], win.resizable);
|
||||
}
|
||||
}
|
||||
|
||||
const captureWindow = args.types.includes('window');
|
||||
const captureScreen = args.types.includes('screen');
|
||||
|
||||
@@ -44,6 +55,14 @@ export async function getSources (args: Electron.SourcesOptions) {
|
||||
delete capturer._onerror;
|
||||
delete capturer._onfinished;
|
||||
capturer = null;
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
for (const win of BrowserWindow.getAllWindows()) {
|
||||
if (resizableValues.has(win.id)) {
|
||||
win.resizable = resizableValues.get(win.id);
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
// Remove from currentlyRunning once we resolve or reject
|
||||
currentlyRunning = currentlyRunning.filter(running => running.options !== options);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { app, BrowserWindow, session, webContents, WebContents, MenuItemConstructorOptions } from 'electron/main';
|
||||
import { app, BaseWindow, BrowserWindow, session, webContents, WebContents, MenuItemConstructorOptions } from 'electron/main';
|
||||
|
||||
const isMac = process.platform === 'darwin';
|
||||
const isWindows = process.platform === 'win32';
|
||||
@@ -13,7 +13,7 @@ interface Role {
|
||||
label: string;
|
||||
accelerator?: string;
|
||||
checked?: boolean;
|
||||
windowMethod?: ((window: BrowserWindow) => void);
|
||||
windowMethod?: ((window: BaseWindow) => void);
|
||||
webContentsMethod?: ((webContents: WebContents) => void);
|
||||
appMethod?: () => void;
|
||||
registerAccelerator?: boolean;
|
||||
@@ -53,8 +53,10 @@ export const roleList: Record<RoleId, Role> = {
|
||||
label: 'Force Reload',
|
||||
accelerator: 'Shift+CmdOrCtrl+R',
|
||||
nonNativeMacOSRole: true,
|
||||
windowMethod: (window: BrowserWindow) => {
|
||||
window.webContents.reloadIgnoringCache();
|
||||
windowMethod: (window: BaseWindow) => {
|
||||
if (window instanceof BrowserWindow) {
|
||||
window.webContents.reloadIgnoringCache();
|
||||
}
|
||||
}
|
||||
},
|
||||
front: {
|
||||
@@ -110,7 +112,11 @@ export const roleList: Record<RoleId, Role> = {
|
||||
label: 'Reload',
|
||||
accelerator: 'CmdOrCtrl+R',
|
||||
nonNativeMacOSRole: true,
|
||||
windowMethod: w => w.reload()
|
||||
windowMethod: (w: BaseWindow) => {
|
||||
if (w instanceof BrowserWindow) {
|
||||
w.reload();
|
||||
}
|
||||
}
|
||||
},
|
||||
resetzoom: {
|
||||
label: 'Actual Size',
|
||||
@@ -164,7 +170,7 @@ export const roleList: Record<RoleId, Role> = {
|
||||
togglefullscreen: {
|
||||
label: 'Toggle Full Screen',
|
||||
accelerator: isMac ? 'Control+Command+F' : 'F11',
|
||||
windowMethod: (window: BrowserWindow) => {
|
||||
windowMethod: (window: BaseWindow) => {
|
||||
window.setFullScreen(!window.isFullScreen());
|
||||
}
|
||||
},
|
||||
@@ -361,7 +367,7 @@ export function getDefaultSubmenu (role: RoleId) {
|
||||
return submenu;
|
||||
}
|
||||
|
||||
export function execute (role: RoleId, focusedWindow: BrowserWindow, focusedWebContents: WebContents) {
|
||||
export function execute (role: RoleId, focusedWindow: BaseWindow, focusedWebContents: WebContents) {
|
||||
if (!canExecuteRole(role)) return false;
|
||||
|
||||
const { appMethod, webContentsMethod, windowMethod } = roleList[role];
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import * as roles from '@electron/internal/browser/api/menu-item-roles';
|
||||
import { Menu, BrowserWindow, WebContents, KeyboardEvent } from 'electron/main';
|
||||
import { Menu, BaseWindow, WebContents, KeyboardEvent } from 'electron/main';
|
||||
|
||||
let nextCommandId = 0;
|
||||
|
||||
@@ -53,7 +53,7 @@ const MenuItem = function (this: any, options: any) {
|
||||
});
|
||||
|
||||
const click = options.click;
|
||||
this.click = (event: KeyboardEvent, focusedWindow: BrowserWindow, focusedWebContents: WebContents) => {
|
||||
this.click = (event: KeyboardEvent, focusedWindow: BaseWindow, focusedWebContents: WebContents) => {
|
||||
// Manually flip the checked flags when clicked.
|
||||
if (!roles.shouldOverrideCheckStatus(this.role) &&
|
||||
(this.type === 'checkbox' || this.type === 'radio')) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BaseWindow, MenuItem, webContents, Menu as MenuType, BrowserWindow, MenuItemConstructorOptions } from 'electron/main';
|
||||
import { BaseWindow, MenuItem, webContents, Menu as MenuType, MenuItemConstructorOptions } from 'electron/main';
|
||||
import { sortMenuItems } from '@electron/internal/browser/api/menu-utils';
|
||||
import { setApplicationMenuWasSet } from '@electron/internal/browser/default-menu';
|
||||
|
||||
@@ -54,7 +54,7 @@ Menu.prototype._executeCommand = function (event, id) {
|
||||
const command = this.commandsMap[id];
|
||||
if (!command) return;
|
||||
const focusedWindow = BaseWindow.getFocusedWindow();
|
||||
command.click(event, focusedWindow instanceof BrowserWindow ? focusedWindow : undefined, webContents.getFocusedWebContents());
|
||||
command.click(event, focusedWindow, webContents.getFocusedWebContents());
|
||||
};
|
||||
|
||||
Menu.prototype._menuWillShow = function () {
|
||||
|
||||
@@ -6,6 +6,44 @@ Session.prototype.fetch = function (input: RequestInfo, init?: RequestInit) {
|
||||
return fetchWithSession(input, init, this, net.request);
|
||||
};
|
||||
|
||||
Session.prototype.setPermissionCheckHandler = function (handler) {
|
||||
if (!handler) return this._setPermissionCheckHandler(handler);
|
||||
|
||||
return this._setPermissionCheckHandler((...args) => {
|
||||
if (handler(...args)) return 'granted';
|
||||
return 'denied';
|
||||
});
|
||||
};
|
||||
|
||||
Session.prototype.setPermissionRequestHandler = function (handler) {
|
||||
if (!handler) return this._setPermissionRequestHandler(handler);
|
||||
|
||||
return this._setPermissionRequestHandler((wc, perm, cb: any, d, eo) => {
|
||||
return handler(wc, perm, (granted) => cb(granted ? 'granted' : 'denied'), d, eo);
|
||||
});
|
||||
};
|
||||
|
||||
Session.prototype.setPermissionHandlers = function (handlers) {
|
||||
if (!handlers) {
|
||||
this._setPermissionCheckHandler(null);
|
||||
this._setPermissionRequestHandler(null);
|
||||
return;
|
||||
}
|
||||
|
||||
this._setPermissionCheckHandler((_, permission, effectiveOrigin, details) => {
|
||||
return handlers.isGranted(permission, effectiveOrigin, details).status;
|
||||
});
|
||||
|
||||
this._setPermissionRequestHandler((_, permission, callback, details, effectiveOrigin) => {
|
||||
Promise.resolve(handlers.onRequest(permission, effectiveOrigin, details))
|
||||
.then((result) => callback(result.status === 'granted'))
|
||||
.catch((err) => {
|
||||
this.emit('error', err);
|
||||
callback(false);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
export default {
|
||||
fromPartition,
|
||||
fromPath,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import * as deprecate from '@electron/internal/common/deprecate';
|
||||
const { systemPreferences } = process._linkedBinding('electron_browser_system_preferences');
|
||||
|
||||
if ('getEffectiveAppearance' in systemPreferences) {
|
||||
@@ -7,4 +8,15 @@ if ('getEffectiveAppearance' in systemPreferences) {
|
||||
});
|
||||
}
|
||||
|
||||
if ('accessibilityDisplayShouldReduceTransparency' in systemPreferences) {
|
||||
const reduceTransparencyDeprecated = deprecate.warnOnce('systemPreferences.accessibilityDisplayShouldReduceTransparency', 'nativeTheme.prefersReducedTransparency');
|
||||
const nativeReduceTransparency = systemPreferences.accessibilityDisplayShouldReduceTransparency;
|
||||
Object.defineProperty(systemPreferences, 'accessibilityDisplayShouldReduceTransparency', {
|
||||
get: () => {
|
||||
reduceTransparencyDeprecated();
|
||||
return nativeReduceTransparency;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
export default systemPreferences;
|
||||
|
||||
@@ -284,7 +284,7 @@ const escapeItemSymbol = Symbol('escape item');
|
||||
|
||||
class TouchBar extends EventEmitter implements Electron.TouchBar {
|
||||
// Bind a touch bar to a window
|
||||
static _setOnWindow (touchBar: TouchBar | Electron.TouchBarConstructorOptions['items'], window: Electron.BrowserWindow) {
|
||||
static _setOnWindow (touchBar: TouchBar | Electron.TouchBarConstructorOptions['items'], window: Electron.BaseWindow) {
|
||||
if (window._touchBar != null) {
|
||||
window._touchBar._removeFromWindow(window);
|
||||
}
|
||||
@@ -383,7 +383,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
|
||||
return this[escapeItemSymbol];
|
||||
}
|
||||
|
||||
_addToWindow (window: Electron.BrowserWindow) {
|
||||
_addToWindow (window: Electron.BaseWindow) {
|
||||
const { id } = window;
|
||||
|
||||
// Already added to window
|
||||
@@ -439,7 +439,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
|
||||
escapeItemListener(this.escapeItem);
|
||||
}
|
||||
|
||||
_removeFromWindow (window: Electron.BrowserWindow) {
|
||||
_removeFromWindow (window: Electron.BaseWindow) {
|
||||
const removeListeners = this.windowListeners.get(window.id);
|
||||
if (removeListeners != null) removeListeners();
|
||||
}
|
||||
|
||||
@@ -595,7 +595,9 @@ WebContents.prototype._init = function () {
|
||||
goToOffset: this._goToOffset.bind(this),
|
||||
getActiveIndex: this._getActiveIndex.bind(this),
|
||||
length: this._historyLength.bind(this),
|
||||
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this)
|
||||
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this),
|
||||
removeEntryAtIndex: this._removeNavigationEntryAtIndex.bind(this),
|
||||
getAllEntries: this._getHistory.bind(this)
|
||||
},
|
||||
writable: false,
|
||||
enumerable: true
|
||||
|
||||
@@ -2,7 +2,7 @@ import { webContents } from 'electron/main';
|
||||
import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
|
||||
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
|
||||
import { parseWebViewWebPreferences } from '@electron/internal/browser/parse-features-string';
|
||||
import { syncMethods, asyncMethods, properties } from '@electron/internal/common/web-view-methods';
|
||||
import { syncMethods, asyncMethods, properties, navigationHistorySyncMethods } from '@electron/internal/common/web-view-methods';
|
||||
import { webViewEvents } from '@electron/internal/browser/web-view-events';
|
||||
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
||||
|
||||
@@ -311,6 +311,14 @@ handleMessageSync(IPC_MESSAGES.GUEST_VIEW_MANAGER_CALL, function (event, guestIn
|
||||
if (!syncMethods.has(method)) {
|
||||
throw new Error(`Invalid method: ${method}`);
|
||||
}
|
||||
// Redirect history methods to updated navigationHistory property on webContents. See issue #42879.
|
||||
if (navigationHistorySyncMethods.has(method)) {
|
||||
let navigationMethod = method;
|
||||
if (method === 'clearHistory') {
|
||||
navigationMethod = 'clear';
|
||||
}
|
||||
return (guest as any).navigationHistory[navigationMethod](...args);
|
||||
}
|
||||
|
||||
return (guest as any)[method](...args);
|
||||
});
|
||||
|
||||
@@ -212,7 +212,7 @@ if (packagePath) {
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is syncronous
|
||||
// Call appCodeLoaded before just for safety, it doesn't matter here as _load is synchronous
|
||||
appCodeLoaded!();
|
||||
process._firstFileName = Module._resolveFilename(path.join(packagePath, mainStartupScript), null, false);
|
||||
Module._load(path.join(packagePath, mainStartupScript), Module, true);
|
||||
|
||||
@@ -1,3 +1,14 @@
|
||||
export const navigationHistorySyncMethods = new Set([
|
||||
'canGoBack',
|
||||
'canGoForward',
|
||||
'canGoToOffset',
|
||||
'clearHistory',
|
||||
'goBack',
|
||||
'goForward',
|
||||
'goToIndex',
|
||||
'goToOffset'
|
||||
]);
|
||||
|
||||
// Public-facing API methods.
|
||||
export const syncMethods = new Set([
|
||||
'getURL',
|
||||
@@ -8,14 +19,6 @@ export const syncMethods = new Set([
|
||||
'stop',
|
||||
'reload',
|
||||
'reloadIgnoringCache',
|
||||
'canGoBack',
|
||||
'canGoForward',
|
||||
'canGoToOffset',
|
||||
'clearHistory',
|
||||
'goBack',
|
||||
'goForward',
|
||||
'goToIndex',
|
||||
'goToOffset',
|
||||
'isCrashed',
|
||||
'setUserAgent',
|
||||
'getUserAgent',
|
||||
@@ -51,7 +54,8 @@ export const syncMethods = new Set([
|
||||
'getZoomFactor',
|
||||
'getZoomLevel',
|
||||
'setZoomFactor',
|
||||
'setZoomLevel'
|
||||
'setZoomLevel',
|
||||
...navigationHistorySyncMethods
|
||||
]);
|
||||
|
||||
export const properties = new Set([
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
"devDependencies": {
|
||||
"@azure/storage-blob": "^12.9.0",
|
||||
"@electron/asar": "^3.2.1",
|
||||
"@electron/docs-parser": "^1.2.0",
|
||||
"@electron/docs-parser": "^1.2.1",
|
||||
"@electron/fiddle-core": "^1.0.4",
|
||||
"@electron/github-app-auth": "^2.0.0",
|
||||
"@electron/lint-roller": "^2.2.0",
|
||||
"@electron/lint-roller": "^2.3.0",
|
||||
"@electron/typescript-definitions": "^8.15.2",
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
@@ -86,12 +86,13 @@
|
||||
"lint:objc": "node ./script/lint.js --objc",
|
||||
"lint:py": "node ./script/lint.js --py",
|
||||
"lint:gn": "node ./script/lint.js --gn",
|
||||
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown",
|
||||
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:ts-check-js-in-markdown && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdown && npm run lint:api-history",
|
||||
"lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
|
||||
"lint:docs-relative-links": "lint-roller-markdown-links --root docs \"**/*.md\"",
|
||||
"lint:markdown": "node ./script/lint.js --md",
|
||||
"lint:ts-check-js-in-markdown": "lint-roller-markdown-ts-check --root docs \"**/*.md\" --ignore \"breaking-changes.md\"",
|
||||
"lint:js-in-markdown": "lint-roller-markdown-standard --root docs \"**/*.md\"",
|
||||
"lint:api-history": "lint-roller-markdown-api-history --root \"./docs/api/\" --schema \"./docs/api-history.schema.json\" --breaking-changes-file \"./docs/breaking-changes.md\" --check-placement --check-strings \"*.md\"",
|
||||
"create-api-json": "node script/create-api-json.js",
|
||||
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
|
||||
"gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts",
|
||||
|
||||
@@ -8,10 +8,10 @@ This reverts commit ebd8b8965c74ab06bb91f7a00b23822e1f1f26ca.
|
||||
It is causing significant TLS failures in Node.js.
|
||||
|
||||
diff --git a/ssl/ssl_buffer.cc b/ssl/ssl_buffer.cc
|
||||
index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57c4a4d5d3 100644
|
||||
index 7de8923518dbfb69fef62d7781f906b30cf62155..7a4310d6d8e85f07f0ae6c97726d909c4503bce9 100644
|
||||
--- a/ssl/ssl_buffer.cc
|
||||
+++ b/ssl/ssl_buffer.cc
|
||||
@@ -232,7 +232,6 @@ int ssl_handle_open_record(SSL *ssl, bool *out_retry, ssl_open_record_t ret,
|
||||
@@ -235,7 +235,6 @@ int ssl_handle_open_record(SSL *ssl, bool *out_retry, ssl_open_record_t ret,
|
||||
return 1;
|
||||
|
||||
case ssl_open_record_close_notify:
|
||||
@@ -20,7 +20,7 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index 206a01640d31b61752795325b70bc5f1640cd3a1..0d6519f604cd363f4065fa52a87d29bca451f05c 100644
|
||||
index 2e7859994430054cbba3b8a0e452ee6027b419a2..7be28a2af48c71b63f9311ac7c9fd69b5a247317 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1336,7 +1336,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
|
||||
@@ -10,7 +10,6 @@ webview_cross_drag.patch
|
||||
gin_enable_disable_v8_platform.patch
|
||||
enable_reset_aspect_ratio.patch
|
||||
boringssl_build_gn.patch
|
||||
pepper_plugin_support.patch
|
||||
gtk_visibility.patch
|
||||
resource_file_conflict.patch
|
||||
scroll_bounce_flag.patch
|
||||
@@ -25,7 +24,6 @@ dump_syms.patch
|
||||
command-ismediakey.patch
|
||||
printing.patch
|
||||
support_mixed_sandbox_with_zygote.patch
|
||||
unsandboxed_ppapi_processes_skip_zygote.patch
|
||||
build_add_electron_tracing_category.patch
|
||||
worker_context_will_destroy.patch
|
||||
frame_host_manager.patch
|
||||
@@ -130,3 +128,5 @@ fix_font_face_resolution_when_renderer_is_blocked.patch
|
||||
feat_enable_passing_exit_code_on_service_process_crash.patch
|
||||
chore_remove_reference_to_chrome_browser_themes.patch
|
||||
feat_enable_customizing_symbol_color_in_framecaptionbutton.patch
|
||||
build_expose_webplugininfo_interface_to_electron.patch
|
||||
osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
|
||||
|
||||
@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
||||
3. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551eb7b5d56 100644
|
||||
index dc4bea32e76b41521240ad14e313aa2492539e30..32a3fc0843656eaa87b85dd63ac1ade6d83b6e5b 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -21,7 +21,7 @@ index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@@ -183,6 +184,11 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
@@ -184,6 +185,11 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
#endif
|
||||
|
||||
if (shortcut.empty()) {
|
||||
@@ -33,7 +33,7 @@ index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Our fallback is to try translate the key code to a regular character
|
||||
// unless it is one of digits (VK_0 to VK_9). Some keyboard
|
||||
@@ -206,6 +212,10 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
@@ -207,6 +213,10 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
shortcut +=
|
||||
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
|
||||
#endif
|
||||
@@ -44,7 +44,7 @@ index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
@@ -390,7 +400,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
@@ -391,7 +401,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
const std::u16string& shortcut) const {
|
||||
std::u16string result = shortcut;
|
||||
|
||||
@@ -53,7 +53,7 @@ index e260f801eaf3ab3c2e3bbf09c94ee8a055bc8378..226338e7cfbfd002212302ba9b067551
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
|
||||
|
||||
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
|
||||
@@ -398,7 +408,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
@@ -399,7 +409,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
// more information.
|
||||
if (IsCtrlDown())
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 3ef2255d2f9758a7ab497021ad4429aa6960504d..3de73ebf606d40cdd4d88b84d955923a8ebc7a0c 100644
|
||||
index d2be94d0d77ef798c888177cd4b882521335059b..8ed6f393da68f6d4ccb951f4d2c951e66e791b8f 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -256,6 +256,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -258,6 +258,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 3ef2255d2f9758a7ab497021ad4429aa6960504d..3de73ebf606d40cdd4d88b84d955923a
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -354,7 +358,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -358,7 +362,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
#endif
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index c313c0342f0e470db13a4c95473decbc8dbdcbd3..10c6596a8cd06aebf19b4302a60eb78eb09f29de 100644
|
||||
index ad0092ef2e13853e4bb8b923481559a043b00ab7..1c2dfd23f18733e21312992877ae1499634d3849 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -145,6 +145,8 @@ class CONTENT_EXPORT RenderFrameObserver
|
||||
@@ -150,6 +150,8 @@ class CONTENT_EXPORT RenderFrameObserver
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index c313c0342f0e470db13a4c95473decbc8dbdcbd3..10c6596a8cd06aebf19b4302a60eb78e
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index e5c8967a41c7cd645dfc5d6589a540e2027024df..7810c2e1b50f31b497c6a5eaf0a66b61d22f2760 100644
|
||||
index 6d7b1acf986b8cd83c10c43135a975e6a2c9db7f..55ef555fd10a08a5b903e2e86b363934c9d026b9 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4694,6 +4694,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4722,6 +4722,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index e5c8967a41c7cd645dfc5d6589a540e2027024df..7810c2e1b50f31b497c6a5eaf0a66b61
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 74f337007151e491c02ae23ba4ca6f34f17bc65d..ff860ad1fb68dc5c1c7831f74b330be0c57c727a 100644
|
||||
index b47f9d4e51e64888301061f081a0515ae4f254d0..3d45f8a9de9a726f011791f3f61d79af98fb740d 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -645,6 +645,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -643,6 +643,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index 74f337007151e491c02ae23ba4ca6f34f17bc65d..ff860ad1fb68dc5c1c7831f74b330be0
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index 7219fbabf0f7286af48dede7738a9dcd5125cc1a..9e962391ebd2cfc84837502c5babcbbff385408b 100644
|
||||
index 85cd5b277088c61a6bf83589a2698d279771ab18..f774939483b91875f012cb74d5a58d35fdfe3866 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -646,6 +646,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -647,6 +647,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -79,10 +79,10 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3
|
||||
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 1cf963689a08009fa137e49eacd909495d6517d1..4860e3b627160e544c3108b7dfdc4e03946ac865 100644
|
||||
index 5c5b1d8307b541081967d6554d3aa4045322b7df..5079c2b6fdbf9d26738fea82319020783cfc5779 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -295,6 +295,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,10 +92,10 @@ index 1cf963689a08009fa137e49eacd909495d6517d1..4860e3b627160e544c3108b7dfdc4e03
|
||||
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 b91c2be322f9c66a07bded75afebde935f28cbe0..acb8d1c364a8b077eca88af9c4bf0e8bb46f9ee5 100644
|
||||
index 1f99493c7e50fe44a58c9e4db34cb99780863c86..4a65887071650678efea4adb3d1e55c132d454d8 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
|
||||
@@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -294,6 +294,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ index b91c2be322f9c66a07bded75afebde935f28cbe0..acb8d1c364a8b077eca88af9c4bf0e8b
|
||||
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 7bbdf577711526a1bc60820d5737cdd28ebf60f5..4df922e030d17a852b8cc7862a4ce8ec57425bfa 100644
|
||||
index a3661daf705b0b161da88433b46d410dfa96227d..bbd905415520bb4507580817e78134b09ce01631 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
|
||||
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -83,6 +83,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
@@ -123,10 +123,10 @@ index 7bbdf577711526a1bc60820d5737cdd28ebf60f5..4df922e030d17a852b8cc7862a4ce8ec
|
||||
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 da8f597a8eb45a5e0135a5f04b074b3756dd4921..c0f1a83db3171891b115eeb533f5bf1dcbad2c63 100644
|
||||
index f3a081d7230c10d12f7e14311930efc3df1ad870..7e8b97c7e901a2ba5ca32037a938749806243dac 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -412,6 +412,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -408,6 +408,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index 79b1e0f5d43caea6a5fcd03e5c7aa7a9dca7e9fd..341a1800abb18a96380ecfd521b9d94de0bb89d5 100755
|
||||
index 07b33f9c3e909216d9282954ebaaef7c56c2dbac..916e6ed19c857c6ed549e98f1b989108e5748776 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -335,6 +335,31 @@ SPECIAL_CASES = {
|
||||
|
||||
@@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused
|
||||
by decoration shadows and rounded titlebars around the window while maximized.
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
|
||||
index 668c90b2102448a9fe215a70b727dc82d10c78fe..a6a41271bacf89e86ab64422ce0a77ae671c541c 100644
|
||||
index 3ad76e316d4dc2009f0637618b39f16c24c64809..853edba64e5c7473d32889425223cd07b7975a72 100644
|
||||
--- a/ui/gtk/gtk_ui.cc
|
||||
+++ b/ui/gtk/gtk_ui.cc
|
||||
@@ -567,11 +567,12 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
@@ -582,11 +582,12 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
}
|
||||
|
||||
ui::WindowFrameProvider* GtkUi::GetWindowFrameProvider(bool solid_frame,
|
||||
@@ -28,11 +28,11 @@ index 668c90b2102448a9fe215a70b727dc82d10c78fe..a6a41271bacf89e86ab64422ce0a77ae
|
||||
return provider.get();
|
||||
}
|
||||
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
|
||||
index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd2a05a4b6 100644
|
||||
index 32051374590fc1179e5cfa21ebc34474d2ce0190..09e9399a67d30d4686f4c141050538b8dde9f301 100644
|
||||
--- a/ui/gtk/gtk_ui.h
|
||||
+++ b/ui/gtk/gtk_ui.h
|
||||
@@ -107,7 +107,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
void SetDarkTheme(bool dark) override;
|
||||
@@ -110,7 +110,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
void SetAccentColor(std::optional<SkColor> accent_color) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
|
||||
- bool tiled) override;
|
||||
@@ -41,7 +41,7 @@ index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd
|
||||
|
||||
private:
|
||||
using TintMap = std::map<int, color_utils::HSL>;
|
||||
@@ -191,7 +192,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
@@ -199,7 +200,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
// while Chrome is running. This 2D array is indexed first by whether the
|
||||
// frame is translucent (0) or solid(1), then by whether the frame is normal
|
||||
// (0) or tiled (1).
|
||||
@@ -173,10 +173,10 @@ index 4faaae32a203bfa57f3e61c391dc6917c4a0bf59..94050a0136b78730f607f42991742e04
|
||||
// Scale-independent metric calculated based on the bitmaps.
|
||||
std::optional<gfx::Insets> frame_thickness_dip_;
|
||||
diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc
|
||||
index 8903f9ba950e7878fbd1bfa0cf2a42e0cc9daa21..7d13381eb1d16193bad0be1318e8ed199c6fb845 100644
|
||||
index e4a7f8eb0ef8bacd2d4e4231d0990b4a01021626..3477542587b08691c164941b2c2e3b22050231ca 100644
|
||||
--- a/ui/linux/fallback_linux_ui.cc
|
||||
+++ b/ui/linux/fallback_linux_ui.cc
|
||||
@@ -141,7 +141,8 @@ FallbackLinuxUi::CreateNavButtonProvider() {
|
||||
@@ -143,7 +143,8 @@ FallbackLinuxUi::CreateNavButtonProvider() {
|
||||
|
||||
ui::WindowFrameProvider* FallbackLinuxUi::GetWindowFrameProvider(
|
||||
bool solid_frame,
|
||||
@@ -187,11 +187,11 @@ index 8903f9ba950e7878fbd1bfa0cf2a42e0cc9daa21..7d13381eb1d16193bad0be1318e8ed19
|
||||
}
|
||||
|
||||
diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h
|
||||
index 2612cb68984a8435c84f0b0592eda8a5df6dd91e..282b48038f83d4a6dafe734f639d994c245c67ac 100644
|
||||
index 0800349bc18753e6a41a938c70213dd7dd123d0d..a1553e0cb1fac188fb2c74e10163c52dead02f29 100644
|
||||
--- a/ui/linux/fallback_linux_ui.h
|
||||
+++ b/ui/linux/fallback_linux_ui.h
|
||||
@@ -66,7 +66,8 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
|
||||
void SetDarkTheme(bool dark) override;
|
||||
@@ -67,7 +67,8 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
|
||||
void SetAccentColor(std::optional<SkColor> accent_color) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
|
||||
- bool tiled) override;
|
||||
@@ -201,10 +201,10 @@ index 2612cb68984a8435c84f0b0592eda8a5df6dd91e..282b48038f83d4a6dafe734f639d994c
|
||||
private:
|
||||
std::optional<gfx::FontRenderParams> default_font_render_params_;
|
||||
diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
|
||||
index b940382678ba70debaf7f33698c0b8bd02c42c4e..4477a1012fef5ad6dd365d70d28eadd3db136ceb 100644
|
||||
index 0a4c394b07a682d55639f37414331d68f175841c..45db96c165d61f551b344c7c852c083546508325 100644
|
||||
--- a/ui/linux/linux_ui.h
|
||||
+++ b/ui/linux/linux_ui.h
|
||||
@@ -304,7 +304,8 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
|
||||
@@ -307,7 +307,8 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
|
||||
// The returned object is not owned by the caller and will remain alive until
|
||||
// the process ends.
|
||||
virtual WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
|
||||
|
||||
@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
|
||||
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index 6022a0af4241fe65bd03d7cbf95785e8879dc78e..ec9e4c6ece9014b66e7d65e99cda2b956a9a5d80 100644
|
||||
index 2edb0b7c59bbe65d543c65738db0dd5a5b487c23..76d74f86ebdb2b7498cceba0d52728c05e0d9385 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -229,6 +229,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
@@ -234,6 +234,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ usage of BrowserList and Browser as we subclass related methods and use our
|
||||
WindowList.
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c77cb428b 100644
|
||||
index 12066e1449141a1d498d6f17d3a18feda94f56b8..0af673fb8c2fcaa37876d1e2c658233e08007056 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/browser/web_ui_data_source.h"
|
||||
@@ -21,7 +21,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/ax_updates_and_events.h"
|
||||
#include "ui/accessibility/platform/ax_platform_node.h"
|
||||
@@ -169,7 +170,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
@@ -174,7 +175,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
accessibility_mode);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
|
||||
base::Value::Dict target_data;
|
||||
target_data.Set(kSessionIdField, browser->session_id().id());
|
||||
@@ -203,7 +204,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -208,7 +209,7 @@ void HandleAccessibilityRequestCallback(
|
||||
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
|
||||
|
||||
base::Value::Dict data;
|
||||
@@ -39,7 +39,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
ui::AXMode mode =
|
||||
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
|
||||
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
|
||||
@@ -236,7 +237,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -241,7 +242,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled());
|
||||
|
||||
std::string pref_api_type =
|
||||
@@ -48,7 +48,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
bool pref_api_type_supported = false;
|
||||
|
||||
std::vector<ui::AXApiType::Type> supported_api_types =
|
||||
@@ -303,11 +304,11 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -308,11 +309,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(page_list));
|
||||
|
||||
base::Value::List browser_list;
|
||||
@@ -62,7 +62,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
base::Value::List widgets_list;
|
||||
@@ -647,7 +648,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
@@ -646,7 +647,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
const std::string value = CheckJSValue(data.FindString(kValueField));
|
||||
|
||||
if (string_name == kApiTypeField) {
|
||||
@@ -72,7 +72,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
pref->SetString(prefs::kShownAccessibilityApiType, value);
|
||||
}
|
||||
}
|
||||
@@ -700,7 +702,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
@@ -699,7 +701,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -82,7 +82,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
std::string accessibility_contents =
|
||||
@@ -727,6 +730,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -726,6 +729,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -90,7 +90,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
base::Value::Dict result = BuildTargetDescriptor(browser);
|
||||
@@ -739,6 +743,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -738,6 +742,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
base::Value::Dict result;
|
||||
@@ -807,11 +812,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
@@ -806,11 +811,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
}
|
||||
|
||||
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
|
||||
@@ -115,7 +115,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
// Check to see if it is in the supported types list.
|
||||
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
|
||||
supported_types.end()) {
|
||||
@@ -881,8 +888,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
@@ -880,8 +887,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -128,7 +128,7 @@ index 8bf96dc519e1479d8986ff81c3c81641e5e7c58b..a2b70a26febcebedc125c4c83b662b3c
|
||||
+#endif
|
||||
}
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
index 45dead36d71f1c91e1be607180e548854083304c..79a2742e6b95e9ab8257c0f1af75eeebce8566e9 100644
|
||||
index d9ae654c8405621925e39f0b28b9288c0ea151f6..ab5b4249b4f5c01be04ed27cf53e8c286548f6db 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
@@ -30,6 +30,8 @@ class ScopedAccessibilityMode;
|
||||
@@ -140,7 +140,7 @@ index 45dead36d71f1c91e1be607180e548854083304c..79a2742e6b95e9ab8257c0f1af75eeeb
|
||||
namespace user_prefs {
|
||||
class PrefRegistrySyncable;
|
||||
} // namespace user_prefs
|
||||
@@ -82,6 +84,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
@@ -80,6 +82,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
||||
|
||||
private:
|
||||
|
||||
@@ -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 b5934f99861b11afe1b695ac25886ee0d059d0ab..419f823a094c1b163d7a5b441f1b034c0dada66b 100644
|
||||
index 68ef2666b57f95f0a4f463c34ca4b074b9e38d87..d399155b4221f4ea49cc57b14d2cd08493d040e7 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -23,10 +23,10 @@ index b5934f99861b11afe1b695ac25886ee0d059d0ab..419f823a094c1b163d7a5b441f1b034c
|
||||
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 56f1f9234bee383ac4e8643e009ced56f2b12bb0..4f52bb9f87c1e3b86ddd0bfd920ac5d8812e11c7 100644
|
||||
index 6876e6cc484741d23b0b13f6b44a1327b63a470d..8cc8441e1343ac420ad0f35374b9060e9a3f35b7 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -732,6 +732,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -753,6 +753,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index 779e90581cdfb2d1bdd904da038f7537d0477f5a..c85620ac2f30998d1b67f159e50ee722
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 0e969b8580ba6fa9116d5b3d2acfe77b7a8fed14..a36f033231c012db6b81b33efe4e42ef8b1464ce 100644
|
||||
index 88d3d0e598abfc2a0fa935fb90046c0b420deec1..94e4faa943981c0fbcbbb527b1338e452bb978eb 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -570,8 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -580,8 +580,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
|
||||
// which updates `visibility_`, unless the host is hidden. Make sure no update
|
||||
// is needed.
|
||||
@@ -92,7 +92,7 @@ index 603798ae0d45836f1bf3e6608761ce1467303310..2d8caa06e418f123d7565b96d40c66fb
|
||||
mojo::AssociatedReceiver<blink::mojom::PageBroadcast> receiver_;
|
||||
};
|
||||
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
|
||||
index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9d3bbd8f6 100644
|
||||
index c980f3f76a37a4207bb54f18fbcdb8d0950c8856..91a9dfe56fbbcd1cc873add438947dd29c7e6646 100644
|
||||
--- a/third_party/blink/public/mojom/page/page.mojom
|
||||
+++ b/third_party/blink/public/mojom/page/page.mojom
|
||||
@@ -173,4 +173,7 @@ interface PageBroadcast {
|
||||
@@ -104,10 +104,10 @@ index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be6589f3c8 100644
|
||||
index 746af7113a66d26de389237ebd90ec9e6a569cc3..f2f14184eafc919a303da6679a516bdd3a825a51 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -364,6 +364,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -368,6 +368,7 @@ class BLINK_EXPORT WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -116,10 +116,10 @@ index a1197832494afac5207b682f187929844b0ebfd7..1c2c61d09d505eef575107201302c7be
|
||||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06feb98312 100644
|
||||
index 8f3603538170a4e66a3f832b1882ed587383cfcc..3f3945f8aa35513050060df8d65059b89f9b3933 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2460,6 +2460,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2449,6 +2449,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06
|
||||
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
|
||||
!old_state->is_in_back_forward_cache;
|
||||
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
|
||||
@@ -3974,10 +3978,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3971,10 +3975,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,10 +155,10 @@ index 567629babc9ff43995f56f62fa4fa7cae01651f3..e2f3e1171327eafb62d824c1241b0a06
|
||||
// Do not throttle if the page should be painting.
|
||||
bool is_visible =
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index e36a3b35fd3cbfc9439b15b32cf1bf432b8e1122..b8f0b7830e6d14c40d2371378556000d347e78fb 100644
|
||||
index 69318d9676ed633de315c8b2167679439a3874c1..8b9593d8bcaeed498257bd11eb1027fc78ba14bd 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -450,6 +450,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -166,7 +166,7 @@ index e36a3b35fd3cbfc9439b15b32cf1bf432b8e1122..b8f0b7830e6d14c40d2371378556000d
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -932,6 +933,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -929,6 +930,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on
|
||||
process-level command line switches, as before.
|
||||
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79f817e682 100644
|
||||
index 5b6208ca0f024410ca9b86444675abdd0a342bae..11d722a381ce5e8a1de8178be7ded89e8a235b91 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -147,6 +147,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -32,7 +32,7 @@ index 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79
|
||||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b762453429378 100644
|
||||
index 27cc511b84dfe970fd9eff520b81446ce3ba497a..e021e693bb56704e208a3bb46e523a62b01b62c3 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -43,7 +43,7 @@ index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b7624
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
|
||||
@@ -433,6 +434,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -437,6 +438,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// blocking user's access to the background web content.
|
||||
bool modal_context_menu = true;
|
||||
|
||||
@@ -65,7 +65,7 @@ index 5bebc1a29c78b5e668b8e7dcf4f19c210e064eb0..5285f9dbb650b98bd8f0c6bd1a2b7624
|
||||
// chrome, except for the cases where it would require lots of extra work for
|
||||
// the embedder to use the same default value.
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a84667250691c 100644
|
||||
index cc2d2e176476332546b76d33adedbbf760c6e9f6..27b936b9512c4cbd15085a6792b03af970c9f9f7 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -130,7 +130,7 @@ index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a8466
|
||||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index 2dc2c857784ce482c7437a39e3e12f9a1d15bc55..fd6cf5ca4fbb22450da2c9677dfa806ab3f2aeb9 100644
|
||||
index 9cfafc5d0f2bfdef2baaa0bb5c559427636e994b..b5727e31336980ea3a6003d2be78632c55ef5c75 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: Allow setting secondary label via SimpleMenuModel
|
||||
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
|
||||
|
||||
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
|
||||
index 88e27362452e5e3563d45fbf445bead98f49cb26..dff17f273e8767f85a73c3a5eeb27f46a1540e06 100644
|
||||
index fbf6043fc4322561438de7d09dfd9a4ec541af8a..e85a4a16e9090435e742fb127c0bc607c644b51b 100644
|
||||
--- a/ui/base/models/simple_menu_model.cc
|
||||
+++ b/ui/base/models/simple_menu_model.cc
|
||||
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
@@ -33,7 +33,7 @@ index 88e27362452e5e3563d45fbf445bead98f49cb26..dff17f273e8767f85a73c3a5eeb27f46
|
||||
void SimpleMenuModel::SetMinorText(size_t index,
|
||||
const std::u16string& minor_text) {
|
||||
items_[ValidateItemIndex(index)].minor_text = minor_text;
|
||||
@@ -429,6 +439,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
|
||||
@@ -433,6 +443,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
|
||||
return items_[ValidateItemIndex(index)].label;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index 88e27362452e5e3563d45fbf445bead98f49cb26..dff17f273e8767f85a73c3a5eeb27f46
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index 80980d910ab77656351368944b6c4f5bb6aeded2..76a4bb7441faa46a672589985429a2ad635d12a6 100644
|
||||
index e7d5811973ab8e81c0a4c8e93ef8653e0aebded8..d43bcbc19564c49c87e10951f7d6a2ed4a027586 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -99,6 +99,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -68,7 +68,7 @@ index 80980d910ab77656351368944b6c4f5bb6aeded2..76a4bb7441faa46a672589985429a2ad
|
||||
// Sets the minor text for the item at |index|.
|
||||
void SetMinorText(size_t index, const std::u16string& minor_text);
|
||||
|
||||
@@ -260,6 +264,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -261,6 +265,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
ui::MenuSeparatorType GetSeparatorTypeAt(size_t index) const override;
|
||||
int GetCommandIdAt(size_t index) const override;
|
||||
std::u16string GetLabelAt(size_t index) const override;
|
||||
@@ -76,7 +76,7 @@ index 80980d910ab77656351368944b6c4f5bb6aeded2..76a4bb7441faa46a672589985429a2ad
|
||||
std::u16string GetMinorTextAt(size_t index) const override;
|
||||
ImageModel GetMinorIconAt(size_t index) const override;
|
||||
bool IsItemDynamicAt(size_t index) const override;
|
||||
@@ -299,6 +304,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -300,6 +305,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
int command_id = 0;
|
||||
ItemType type = TYPE_COMMAND;
|
||||
std::u16string label;
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 55343df3901f295f6570dfbcf74d326b6d0e1c4a..3ba0f8e60848147d61958f97d3ac0a8955f91441 100644
|
||||
index 95710baaa85888ae2762352b7e794feedde7b37c..f5fc309b50dd351d554d6f07797b968d43cba4c1 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -130,14 +130,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index 55343df3901f295f6570dfbcf74d326b6d0e1c4a..3ba0f8e60848147d61958f97d3ac0a89
|
||||
// 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 dd58f6c3f8347a1981bbe97ddc9a6dce143bd6e6..80eac4a812056c663d86f01b98ebcdf7b4b0537a 100644
|
||||
index 042a057a01fa553ba9f65873ba7c28bc1dd5a720..ab71d6d99bfefc8d16ad6f94c3ef4e81e9b4f730 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -730,10 +730,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -740,10 +740,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index dd58f6c3f8347a1981bbe97ddc9a6dce143bd6e6..80eac4a812056c663d86f01b98ebcdf7
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -786,6 +782,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -795,6 +791,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index a3da4353d4ea519670b4a993893851f4788cd617..6c17f541837cc8e2c18d4ecec1f463da8f7661e6 100644
|
||||
index 5bbe83c8948a2db7b3ce558e010ff38632da25cb..2431cf4f9b34172758442d4c946e36883f414269 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -88,6 +88,7 @@
|
||||
|
||||
@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index a1dbb6af74046225e9dc46f72eca9feb164bf453..091357f99a23806a2ddb7bc62df9d671fb4f16de 100644
|
||||
index 78923a81c64fb7738f4e457e3166a88f3c150564..ee348433544550f99622b52252fd1064c46da35a 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -192,11 +192,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
@@ -33,24 +33,24 @@ index a1dbb6af74046225e9dc46f72eca9feb164bf453..091357f99a23806a2ddb7bc62df9d671
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 50c5d88f6adc99d4365a1540897c8ac1b7ea4763..969b0d5e82eaf716f8ad31f9bb57184d6d8f3297 100644
|
||||
index 7a23e63b800f87b6189ca04ce33c2c9b971e1152..50c51fad27925adf4a1e5fc9e03f7bca2153daa5 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4831,7 +4831,7 @@ static_library("browser") {
|
||||
@@ -4482,7 +4482,7 @@ static_library("browser") {
|
||||
]
|
||||
}
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
- if (!is_win) {
|
||||
+ if (!is_win && !is_electron_build) {
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c497a7be822 100644
|
||||
index 633854df22c94cb2b7e02c1eda2663ca8091e11e..79ed45cf2b14ac3f504317305f4ae10e5413ff63 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7430,9 +7430,12 @@ test("unit_tests") {
|
||||
"//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
|
||||
@@ -7050,9 +7050,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
+ if (!is_electron_build) {
|
||||
@@ -63,7 +63,7 @@ index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c49
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8445,6 +8448,10 @@ test("unit_tests") {
|
||||
@@ -8079,6 +8082,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,10 +74,10 @@ index 75211f756cda030e03f6944c02dc045eb8386500..4830f67586401dda1d732fbda62f6c49
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8525,7 +8532,6 @@ test("unit_tests") {
|
||||
|
||||
@@ -8146,7 +8153,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
- "//chrome:packed_resources_integrity_header",
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Fri, 9 Aug 2024 22:39:47 +0900
|
||||
Subject: build: expose webplugininfo interface to electron
|
||||
|
||||
Allows implementing electron::mojom::ElectronPluginInfoHost interface
|
||||
which provides plugin details between browser<->renderer.
|
||||
|
||||
diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
|
||||
index 0b7e43edf99ce901141ca9271f7130658525fd23..88dbc54c6b7d857cc0c572eb831d457348af236c 100644
|
||||
--- a/content/public/common/BUILD.gn
|
||||
+++ b/content/public/common/BUILD.gn
|
||||
@@ -370,6 +370,7 @@ mojom("interfaces") {
|
||||
"//content/common/*",
|
||||
"//extensions/common:mojom",
|
||||
"//extensions/common:mojom_blink",
|
||||
+ "//electron/shell/common:plugin",
|
||||
]
|
||||
|
||||
sources = [
|
||||
@@ -7,7 +7,7 @@ These are variables we add to the root BUILDCONFIG so that they're available
|
||||
everywhere, without having to import("//electron/.../flags.gni").
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 29625fa7af1c8840bc530c4e4547e19a3bd5f8ce..83e32e23a7bc7ae098182033f065285858293cd1 100644
|
||||
index d1a665482c989dfd92ce7fb2a2444bd9311f5513..42ad98845d84496e197d8b6e2f09a45a2608e585 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
|
||||
nan tests
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
|
||||
index 30fad21ed77fc063cb14ec109885b9533999c69a..e7060d599f4c84b135a824454f5d260907e5427a 100644
|
||||
index 7ed6671c98d81022672c394bdb92b93cc6b9e119..149814a9e75c38d1c1736e7a0f9481c31e220997 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -45,7 +45,11 @@ config("winver") {
|
||||
@@ -32,7 +32,7 @@ index 30fad21ed77fc063cb14ec109885b9533999c69a..e7060d599f4c84b135a824454f5d2609
|
||||
]
|
||||
if (is_linux) {
|
||||
diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn
|
||||
index bf3db7adc340d82ade8514a19d1bb033ec38538f..c8bcc73d8b1eefbd7851552c1e8431746c1f4b62 100644
|
||||
index 331ea447ea15e9f439396d4c7d41832de60adf4a..b96a994c43ac2ed0b0d5ec599f907ea0b501156e 100644
|
||||
--- a/buildtools/third_party/libc++abi/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++abi/BUILD.gn
|
||||
@@ -6,7 +6,7 @@ import("//build/config/android/config.gni")
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: build: make libcxx_abi_unstable false for electron
|
||||
https://nornagon.medium.com/a-libc-odyssey-973e51649063
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
|
||||
index 6bb31f334ab590fe5de47214785270a1ff05f885..780e5a3d43ac06d2543fde0024f3df8a94a1146c 100644
|
||||
index 39cc404dda7ba408438deeaa5b65a01cdd696dcb..355a774a08fb6eb6fa435c4704e8ff9cb5a9f5bd 100644
|
||||
--- a/buildtools/third_party/libc++/__config_site
|
||||
+++ b/buildtools/third_party/libc++/__config_site
|
||||
@@ -13,7 +13,9 @@
|
||||
@@ -18,7 +18,9 @@
|
||||
// _LIBCPP_ABI_NAMESPACE to a shorter value.
|
||||
#define _LIBCPP_ABI_NAMESPACE __Cr
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user