mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
70 Commits
v40.0.0-al
...
v37.0.0-al
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
65b9accc80 | ||
|
|
584fa31adc | ||
|
|
c0149676fb | ||
|
|
b39305af61 | ||
|
|
6e7271ff7e | ||
|
|
3e07a0e9a3 | ||
|
|
6a16fc3144 | ||
|
|
e53a7c7c00 | ||
|
|
63052c45a1 | ||
|
|
28c5f7026f | ||
|
|
c78be76176 | ||
|
|
73dd132202 | ||
|
|
f6e7cdb8b6 | ||
|
|
54f2c93fec | ||
|
|
ecc00f149f | ||
|
|
791235b15b | ||
|
|
692d648edb | ||
|
|
bbb6aabe41 | ||
|
|
cc302c2f07 | ||
|
|
b6779056f2 | ||
|
|
d7990ca180 | ||
|
|
7cb5a46b66 | ||
|
|
917e95433a | ||
|
|
7db9671420 | ||
|
|
a3d19d7a99 | ||
|
|
f1562543a3 | ||
|
|
bf54b8d709 | ||
|
|
ec83c1303c | ||
|
|
ec1b0f4923 | ||
|
|
be5b02386d | ||
|
|
df8ed0acc3 | ||
|
|
8de0bb5bc3 | ||
|
|
25c7f0017a | ||
|
|
546d9f4ba6 | ||
|
|
434f77e6c1 | ||
|
|
ace7ef4316 | ||
|
|
0e9c0d8c04 | ||
|
|
8f37d42241 | ||
|
|
3d836267ed | ||
|
|
440cdec061 | ||
|
|
4eea6e4974 | ||
|
|
2c6f713d72 | ||
|
|
057437f739 | ||
|
|
b59a7ef2c3 | ||
|
|
069c9a9e1f | ||
|
|
5602efb2b6 | ||
|
|
839590eb90 | ||
|
|
c9d1615b19 | ||
|
|
4597f4ba9e | ||
|
|
2cf774b2b8 | ||
|
|
3029cdb4dd | ||
|
|
6bd6180703 | ||
|
|
cd023b54f5 | ||
|
|
7dfa2b92fb | ||
|
|
8189b01987 | ||
|
|
0c683552ec | ||
|
|
018e2f6a31 | ||
|
|
3c8d971c53 | ||
|
|
258762929f | ||
|
|
01994637e8 | ||
|
|
0810fe54d4 | ||
|
|
d783f134d9 | ||
|
|
bf94f88569 | ||
|
|
47e25dfd57 | ||
|
|
03d83c293f | ||
|
|
46e3ab6353 | ||
|
|
620f3a57dd | ||
|
|
534ad05cf2 | ||
|
|
7c77018b19 | ||
|
|
6696b98ecc |
6
.github/actions/build-electron/action.yml
vendored
6
.github/actions/build-electron/action.yml
vendored
@@ -38,6 +38,9 @@ runs:
|
||||
run: |
|
||||
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: Add Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
||||
- name: Build Electron ${{ inputs.step-suffix }}
|
||||
shell: bash
|
||||
run: |
|
||||
@@ -199,6 +202,9 @@ runs:
|
||||
e build --target electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
- name: Remove Clang problem matcher
|
||||
shell: bash
|
||||
run: echo "::remove-matcher owner=clang::"
|
||||
- name: Generate TypeScript Definitions ${{ inputs.step-suffix }}
|
||||
if: ${{ inputs.is-release == 'true' }}
|
||||
shell: bash
|
||||
|
||||
13
.github/actions/checkout/action.yml
vendored
13
.github/actions/checkout/action.yml
vendored
@@ -20,8 +20,8 @@ runs:
|
||||
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Generate DEPS Hash
|
||||
@@ -80,6 +80,9 @@ runs:
|
||||
else
|
||||
echo "The cross mount cache has $freespace_human free space - continuing"
|
||||
fi
|
||||
- name: Add patch conflict problem matcher
|
||||
shell: bash
|
||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/patch-conflict.json"
|
||||
- name: Gclient Sync
|
||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||
shell: bash
|
||||
@@ -128,7 +131,11 @@ runs:
|
||||
echo "No changes to patches detected"
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Remove patch conflict problem matcher
|
||||
shell: bash
|
||||
run: |
|
||||
echo "::remove-matcher owner=merge-conflict::"
|
||||
echo "::remove-matcher owner=patch-conflict::"
|
||||
# delete all .git directories under src/ except for
|
||||
# third_party/angle/ and third_party/dawn/ because of build time generation of files
|
||||
# gen/angle/commit.h depends on third_party/angle/.git/HEAD
|
||||
|
||||
11
.github/actions/install-build-tools/action.yml
vendored
11
.github/actions/install-build-tools/action.yml
vendored
@@ -15,11 +15,16 @@ runs:
|
||||
fi
|
||||
export BUILD_TOOLS_SHA=6e8526315ea3b4828882497e532b8340e64e053c
|
||||
npm i -g @electron/build-tools
|
||||
# Update depot_tools to ensure python
|
||||
e d update_depot_tools
|
||||
e auto-update disable
|
||||
# Disable further updates of depot_tools
|
||||
e d auto-update disable
|
||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||
e d cipd.bat --version
|
||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
||||
fi
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools/python-bin" >> $GITHUB_PATH
|
||||
echo "C:\Users\ContainerAdministrator\.electron_build_tools\third_party\depot_tools" >> $GITHUB_PATH
|
||||
else
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
|
||||
echo "$HOME/.electron_build_tools/third_party/depot_tools/python-bin" >> $GITHUB_PATH
|
||||
fi
|
||||
58
.github/actions/set-chromium-cookie/action.yml
vendored
58
.github/actions/set-chromium-cookie/action.yml
vendored
@@ -1,58 +0,0 @@
|
||||
name: 'Set Chromium Git Cookie'
|
||||
description: 'Sets an authenticated cookie from Chromium to allow for a higher request limit'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Set the git cookie from chromium.googlesource.com (Unix)
|
||||
if: ${{ runner.os != 'Windows' }}
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -z "${{ env.CHROMIUM_GIT_COOKIE }}" ]]; then
|
||||
echo "CHROMIUM_GIT_COOKIE is not set - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
touch ~/.gitcookies
|
||||
chmod 0600 ~/.gitcookies
|
||||
|
||||
git config --global http.cookiefile ~/.gitcookies
|
||||
|
||||
tr , \\t <<\__END__ >>~/.gitcookies
|
||||
${{ env.CHROMIUM_GIT_COOKIE }}
|
||||
__END__
|
||||
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
|
||||
|
||||
RESPONSE=$(curl -s -b ~/.gitcookies https://chromium-review.googlesource.com/a/accounts/self)
|
||||
if [[ $RESPONSE == ")]}'"* ]]; then
|
||||
# Extract account email for verification
|
||||
EMAIL=$(echo "$RESPONSE" | tail -c +5 | jq -r '.email // "No email found"')
|
||||
echo "Cookie authentication successful - authenticated as: $EMAIL"
|
||||
else
|
||||
echo "Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE is set correctly"
|
||||
echo $RESPONSE
|
||||
fi
|
||||
- name: Set the git cookie from chromium.googlesource.com (Windows)
|
||||
if: ${{ runner.os == 'Windows' }}
|
||||
shell: cmd
|
||||
run: |
|
||||
if "%CHROMIUM_GIT_COOKIE_WINDOWS_STRING%"=="" (
|
||||
echo CHROMIUM_GIT_COOKIE_WINDOWS_STRING is not set - cannot authenticate.
|
||||
exit /b 0
|
||||
)
|
||||
|
||||
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
|
||||
powershell -noprofile -nologo -command Write-Output "${{ env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}" >>"%USERPROFILE%\.gitcookies"
|
||||
|
||||
curl -s -b "%USERPROFILE%\.gitcookies" https://chromium-review.googlesource.com/a/accounts/self > response.txt
|
||||
|
||||
findstr /B /C:")]}'" response.txt > nul
|
||||
if %ERRORLEVEL% EQU 0 (
|
||||
echo Cookie authentication successful
|
||||
powershell -NoProfile -Command "& {$content = Get-Content -Raw response.txt; $content = $content.Substring(4); try { $json = ConvertFrom-Json $content; if($json.email) { Write-Host 'Authenticated as:' $json.email } else { Write-Host 'No email found in response' } } catch { Write-Host 'Error parsing JSON:' $_ }}"
|
||||
) else (
|
||||
echo Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE_WINDOWS_STRING is set correctly
|
||||
type response.txt
|
||||
)
|
||||
|
||||
del response.txt
|
||||
41
.github/actions/set-chromium-git-helper/action.yml
vendored
Normal file
41
.github/actions/set-chromium-git-helper/action.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
||||
name: 'Set Chromium Git Helper'
|
||||
description: 'Sets Chromium Git Helper to allow for a higher request limit'
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Save the chromium git credentials to a file
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ -z "${{ env.CHROMIUM_GIT_AUTH }}" ]]; then
|
||||
echo "CHROMIUM_GIT_AUTH is not set - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
if [[ "${{ runner.os }}" != "Windows" ]]; then
|
||||
cd $HOME
|
||||
fi
|
||||
echo "${{ env.CHROMIUM_GIT_AUTH }}" > .chromium_git_auth
|
||||
|
||||
- name: Set the chromium git helper to use auth from a file
|
||||
shell: bash
|
||||
run: |
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
if [[ ! -f "/c/actions-runner/_work/electron/electron/.chromium_git_auth" ]]; then
|
||||
echo "File /c/actions-runner/_work/electron/electron/.chromium_git_auth does not exist - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
else
|
||||
if [[ ! -f "$HOME/.chromium_git_auth" ]]; then
|
||||
echo "File $HOME/.chromium_git_auth does not exist - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
if [[ -z "${{ env.CHROMIUM_GIT_USER }}" ]]; then
|
||||
echo "CHROMIUM_GIT_USER is not set - cannot authenticate."
|
||||
exit 0
|
||||
fi
|
||||
git config --global credential.https://chromium.googlesource.com.username "${{ env.CHROMIUM_GIT_USER }}"
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
git config --global credential.https://chromium.googlesource.com.helper '!f() { test "$1" = get && echo "password=$(cat /c/actions-runner/_work/electron/electron/.chromium_git_auth)"; }; f'
|
||||
else
|
||||
git config --global credential.https://chromium.googlesource.com.helper '!f() { test "$1" = get && echo "password=$(cat $HOME/.chromium_git_auth)"; }; f'
|
||||
fi
|
||||
18
.github/problem-matchers/clang.json
vendored
Normal file
18
.github/problem-matchers/clang.json
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "clang",
|
||||
"fromPath": "src/out/Default/args.gn",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^(.+)[(:](\\d+)[:,](\\d+)\\)?:\\s+(warning|error):\\s+(.*)$",
|
||||
"file": 1,
|
||||
"line": 2,
|
||||
"column": 3,
|
||||
"severity": 4,
|
||||
"message": 5
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
24
.github/problem-matchers/patch-conflict.json
vendored
Normal file
24
.github/problem-matchers/patch-conflict.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"problemMatcher": [
|
||||
{
|
||||
"owner": "merge-conflict",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^CONFLICT\\s\\(\\S+\\): (Merge conflict in \\S+)$",
|
||||
"message": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"owner": "patch-conflict",
|
||||
"pattern": [
|
||||
{
|
||||
"regexp": "^error: (patch failed: (\\S+):(\\d+))$",
|
||||
"message": 1,
|
||||
"file": 2,
|
||||
"line": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
2
.github/workflows/archaeologist-dig.yml
vendored
2
.github/workflows/archaeologist-dig.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
- name: Setup Node.js/npm
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
node-version: 20.19.x
|
||||
- name: Setting Up Dig Site
|
||||
run: |
|
||||
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
|
||||
|
||||
10
.github/workflows/build.yml
vendored
10
.github/workflows/build.yml
vendored
@@ -100,7 +100,8 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
outputs:
|
||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
||||
@@ -128,7 +129,8 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
||||
outputs:
|
||||
@@ -154,8 +156,8 @@ jobs:
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||
TARGET_OS: 'win'
|
||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||
|
||||
3
.github/workflows/linux-publish.yml
vendored
3
.github/workflows/linux-publish.yml
vendored
@@ -27,7 +27,8 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
|
||||
3
.github/workflows/macos-publish.yml
vendored
3
.github/workflows/macos-publish.yml
vendored
@@ -28,7 +28,8 @@ jobs:
|
||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- name: Checkout Electron
|
||||
|
||||
7
.github/workflows/pipeline-electron-lint.yml
vendored
7
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -13,7 +13,8 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
@@ -30,8 +31,8 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Setup third_party Depot Tools
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
@@ -65,8 +65,8 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
||||
@@ -104,7 +104,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
node-version: 20.19.x
|
||||
cache: yarn
|
||||
cache-dependency-path: src/electron/yarn.lock
|
||||
- name: Install Dependencies
|
||||
@@ -127,8 +127,8 @@ jobs:
|
||||
GN_EXTRA_ARGS='is_asan=true'
|
||||
fi
|
||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Generate DEPS Hash
|
||||
|
||||
@@ -66,8 +66,8 @@ jobs:
|
||||
- name: Check disk space after freeing up space
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: df -h
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Enable windows toolchain
|
||||
|
||||
@@ -36,8 +36,8 @@ permissions:
|
||||
pull-requests: read
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
|
||||
@@ -81,7 +81,7 @@ jobs:
|
||||
if: ${{ inputs.target-platform == 'win' }}
|
||||
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020
|
||||
with:
|
||||
node-version: 20.11.x
|
||||
node-version: 20.19.x
|
||||
- name: Add TCC permissions on macOS
|
||||
if: ${{ inputs.target-platform == 'macos' }}
|
||||
run: |
|
||||
@@ -126,8 +126,8 @@ jobs:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Install Dependencies
|
||||
uses: ./src/electron/.github/actions/install-dependencies
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Get Depot Tools
|
||||
timeout-minutes: 5
|
||||
run: |
|
||||
|
||||
@@ -31,7 +31,8 @@ concurrency:
|
||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
||||
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
ELECTRON_OUT_DIR: Default
|
||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||
|
||||
@@ -51,8 +52,8 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
@@ -105,8 +106,8 @@ jobs:
|
||||
path: src/electron
|
||||
fetch-depth: 0
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
- name: Set Chromium Git Cookie
|
||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
||||
- name: Set Chromium Git Helper
|
||||
uses: ./src/electron/.github/actions/set-chromium-git-helper
|
||||
- name: Install Build Tools
|
||||
uses: ./src/electron/.github/actions/install-build-tools
|
||||
- name: Init Build Tools
|
||||
|
||||
3
.github/workflows/windows-publish.yml
vendored
3
.github/workflows/windows-publish.yml
vendored
@@ -28,7 +28,8 @@ jobs:
|
||||
- /mnt/win-cache:/mnt/win-cache
|
||||
- /var/run/sas:/var/run/sas
|
||||
env:
|
||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
||||
CHROMIUM_GIT_AUTH: ${{ secrets.CHROMIUM_GIT_AUTH }}
|
||||
CHROMIUM_GIT_USER: ${{ secrets.CHROMIUM_GIT_USER }}
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||
TARGET_OS: 'win'
|
||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
{
|
||||
"config": {
|
||||
"extends": "@electron/lint-roller/configs/markdownlint.json",
|
||||
"descriptive-link-text": false,
|
||||
"link-image-style": {
|
||||
"autolink": false,
|
||||
"shortcut": false
|
||||
@@ -26,6 +27,6 @@
|
||||
"no-newline-in-links": true
|
||||
},
|
||||
"customRules": [
|
||||
"@electron/lint-roller/markdownlint-rules/"
|
||||
"./node_modules/@electron/lint-roller/markdownlint-rules/index.mjs"
|
||||
]
|
||||
}
|
||||
|
||||
2
BUILD.gn
2
BUILD.gn
@@ -670,6 +670,8 @@ source_set("electron_lib") {
|
||||
sources += [
|
||||
"shell/browser/certificate_manager_model.cc",
|
||||
"shell/browser/certificate_manager_model.h",
|
||||
"shell/browser/linux/x11_util.cc",
|
||||
"shell/browser/linux/x11_util.h",
|
||||
"shell/browser/ui/gtk_util.cc",
|
||||
"shell/browser/ui/gtk_util.h",
|
||||
]
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'137.0.7151.0',
|
||||
'138.0.7178.0',
|
||||
'node_version':
|
||||
'v22.14.0',
|
||||
'v22.15.1',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
|
||||
167
docs/api/app.md
167
docs/api/app.md
@@ -41,9 +41,10 @@ that was used to open the application, if it was launched from Notification Cent
|
||||
You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()`
|
||||
to get a Promise that is fulfilled when Electron is initialized.
|
||||
|
||||
**Note**: The `ready` event is only fired after the main process has finished running the first
|
||||
tick of the event loop. If an Electron API needs to be called before the `ready` event, ensure
|
||||
that it is called synchronously in the top-level context of the main process.
|
||||
> [!NOTE]
|
||||
> The `ready` event is only fired after the main process has finished running the first
|
||||
> tick of the event loop. If an Electron API needs to be called before the `ready` event, ensure
|
||||
> that it is called synchronously in the top-level context of the main process.
|
||||
|
||||
### Event: 'window-all-closed'
|
||||
|
||||
@@ -66,12 +67,14 @@ Emitted before the application starts closing its windows.
|
||||
Calling `event.preventDefault()` will prevent the default behavior, which is
|
||||
terminating the application.
|
||||
|
||||
**Note:** If application quit was initiated by `autoUpdater.quitAndInstall()`,
|
||||
then `before-quit` is emitted _after_ emitting `close` event on all windows and
|
||||
closing them.
|
||||
> [!NOTE]
|
||||
> If application quit was initiated by `autoUpdater.quitAndInstall()`,
|
||||
> then `before-quit` is emitted _after_ emitting `close` event on all windows and
|
||||
> closing them.
|
||||
|
||||
**Note:** On Windows, this event will not be emitted if the app is closed due
|
||||
to a shutdown/restart of the system or a user logout.
|
||||
> [!NOTE]
|
||||
> On Windows, this event will not be emitted if the app is closed due
|
||||
> to a shutdown/restart of the system or a user logout.
|
||||
|
||||
### Event: 'will-quit'
|
||||
|
||||
@@ -86,8 +89,9 @@ terminating the application.
|
||||
See the description of the `window-all-closed` event for the differences between
|
||||
the `will-quit` and `window-all-closed` events.
|
||||
|
||||
**Note:** On Windows, this event will not be emitted if the app is closed due
|
||||
to a shutdown/restart of the system or a user logout.
|
||||
> [!NOTE]
|
||||
> On Windows, this event will not be emitted if the app is closed due
|
||||
> to a shutdown/restart of the system or a user logout.
|
||||
|
||||
### Event: 'quit'
|
||||
|
||||
@@ -98,8 +102,9 @@ Returns:
|
||||
|
||||
Emitted when the application is quitting.
|
||||
|
||||
**Note:** On Windows, this event will not be emitted if the app is closed due
|
||||
to a shutdown/restart of the system or a user logout.
|
||||
> [!NOTE]
|
||||
> On Windows, this event will not be emitted if the app is closed due
|
||||
> to a shutdown/restart of the system or a user logout.
|
||||
|
||||
### Event: 'open-file' _macOS_
|
||||
|
||||
@@ -470,24 +475,28 @@ and `workingDirectory` is its current working directory. Usually
|
||||
applications respond to this by making their primary window focused and
|
||||
non-minimized.
|
||||
|
||||
**Note:** `argv` will not be exactly the same list of arguments as those passed
|
||||
to the second instance. The order might change and additional arguments might be appended.
|
||||
If you need to maintain the exact same arguments, it's advised to use `additionalData` instead.
|
||||
> [!NOTE]
|
||||
> `argv` will not be exactly the same list of arguments as those passed
|
||||
> to the second instance. The order might change and additional arguments might be appended.
|
||||
> If you need to maintain the exact same arguments, it's advised to use `additionalData` instead.
|
||||
|
||||
**Note:** If the second instance is started by a different user than the first, the `argv` array will not include the arguments.
|
||||
> [!NOTE]
|
||||
> If the second instance is started by a different user than the first, the `argv` array will not include the arguments.
|
||||
|
||||
This event is guaranteed to be emitted after the `ready` event of `app`
|
||||
gets emitted.
|
||||
|
||||
**Note:** Extra command line arguments might be added by Chromium,
|
||||
such as `--original-process-start-time`.
|
||||
> [!NOTE]
|
||||
> Extra command line arguments might be added by Chromium,
|
||||
> such as `--original-process-start-time`.
|
||||
|
||||
## Methods
|
||||
|
||||
The `app` object has the following methods:
|
||||
|
||||
**Note:** Some methods are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
> [!NOTE]
|
||||
> Some methods are only available on specific operating systems and are
|
||||
> labeled as such.
|
||||
|
||||
### `app.quit()`
|
||||
|
||||
@@ -679,7 +688,8 @@ preferred over `name` by Electron.
|
||||
|
||||
Overrides the current application's name.
|
||||
|
||||
**Note:** This function overrides the name used internally by Electron; it does not affect the name that the OS uses.
|
||||
> [!NOTE]
|
||||
> This function overrides the name used internally by Electron; it does not affect the name that the OS uses.
|
||||
|
||||
### `app.getLocale()`
|
||||
|
||||
@@ -688,18 +698,22 @@ Possible return values are documented [here](https://source.chromium.org/chromiu
|
||||
|
||||
To set the locale, you'll want to use a command line switch at app startup, which may be found [here](command-line-switches.md).
|
||||
|
||||
**Note:** When distributing your packaged app, you have to also ship the
|
||||
`locales` folder.
|
||||
> [!NOTE]
|
||||
> When distributing your packaged app, you have to also ship the
|
||||
> `locales` folder.
|
||||
|
||||
**Note:** This API must be called after the `ready` event is emitted.
|
||||
> [!NOTE]
|
||||
> This API must be called after the `ready` event is emitted.
|
||||
|
||||
**Note:** To see example return values of this API compared to other locale and language APIs, see [`app.getPreferredSystemLanguages()`](#appgetpreferredsystemlanguages).
|
||||
> [!NOTE]
|
||||
> To see example return values of this API compared to other locale and language APIs, see [`app.getPreferredSystemLanguages()`](#appgetpreferredsystemlanguages).
|
||||
|
||||
### `app.getLocaleCountryCode()`
|
||||
|
||||
Returns `string` - User operating system's locale two-letter [ISO 3166](https://www.iso.org/iso-3166-country-codes.html) country code. The value is taken from native OS APIs.
|
||||
|
||||
**Note:** When unable to detect locale country code, it returns empty string.
|
||||
> [!NOTE]
|
||||
> When unable to detect locale country code, it returns empty string.
|
||||
|
||||
### `app.getSystemLocale()`
|
||||
|
||||
@@ -712,9 +726,11 @@ Different operating systems also use the regional data differently:
|
||||
|
||||
Therefore, this API can be used for purposes such as choosing a format for rendering dates and times in a calendar app, especially when the developer wants the format to be consistent with the OS.
|
||||
|
||||
**Note:** This API must be called after the `ready` event is emitted.
|
||||
> [!NOTE]
|
||||
> This API must be called after the `ready` event is emitted.
|
||||
|
||||
**Note:** To see example return values of this API compared to other locale and language APIs, see [`app.getPreferredSystemLanguages()`](#appgetpreferredsystemlanguages).
|
||||
> [!NOTE]
|
||||
> To see example return values of this API compared to other locale and language APIs, see [`app.getPreferredSystemLanguages()`](#appgetpreferredsystemlanguages).
|
||||
|
||||
### `app.getPreferredSystemLanguages()`
|
||||
|
||||
@@ -777,16 +793,18 @@ Once registered, all links with `your-protocol://` will be opened with the
|
||||
current executable. The whole link, including protocol, will be passed to your
|
||||
application as a parameter.
|
||||
|
||||
**Note:** On macOS, you can only register protocols that have been added to
|
||||
your app's `info.plist`, which cannot be modified at runtime. However, you can
|
||||
change the file during build time via [Electron Forge][electron-forge],
|
||||
[Electron Packager][electron-packager], or by editing `info.plist` with a text
|
||||
editor. Please refer to [Apple's documentation][CFBundleURLTypes] for details.
|
||||
> [!NOTE]
|
||||
> On macOS, you can only register protocols that have been added to
|
||||
> your app's `info.plist`, which cannot be modified at runtime. However, you can
|
||||
> change the file during build time via [Electron Forge][electron-forge],
|
||||
> [Electron Packager][electron-packager], or by editing `info.plist` with a text
|
||||
> editor. Please refer to [Apple's documentation][CFBundleURLTypes] for details.
|
||||
|
||||
**Note:** In a Windows Store environment (when packaged as an `appx`) this API
|
||||
will return `true` for all calls but the registry key it sets won't be accessible
|
||||
by other applications. In order to register your Windows Store application
|
||||
as a default protocol handler you must [declare the protocol in your manifest](https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-protocol).
|
||||
> [!NOTE]
|
||||
> In a Windows Store environment (when packaged as an `appx`) this API
|
||||
> will return `true` for all calls but the registry key it sets won't be accessible
|
||||
> by other applications. In order to register your Windows Store application
|
||||
> as a default protocol handler you must [declare the protocol in your manifest](https://learn.microsoft.com/en-us/uwp/schemas/appxpackage/uapmanifestschema/element-uap-protocol).
|
||||
|
||||
The API uses the Windows Registry and `LSSetDefaultHandlerForURLScheme` internally.
|
||||
|
||||
@@ -810,11 +828,12 @@ protocol (aka URI scheme). If so, it will remove the app as the default handler.
|
||||
Returns `boolean` - Whether the current executable is the default handler for a
|
||||
protocol (aka URI scheme).
|
||||
|
||||
**Note:** On macOS, you can use this method to check if the app has been
|
||||
registered as the default protocol handler for a protocol. You can also verify
|
||||
this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the
|
||||
macOS machine. Please refer to
|
||||
[Apple's documentation][LSCopyDefaultHandlerForURLScheme] for details.
|
||||
> [!NOTE]
|
||||
> On macOS, you can use this method to check if the app has been
|
||||
> registered as the default protocol handler for a protocol. You can also verify
|
||||
> this by checking `~/Library/Preferences/com.apple.LaunchServices.plist` on the
|
||||
> macOS machine. Please refer to
|
||||
> [Apple's documentation][LSCopyDefaultHandlerForURLScheme] for details.
|
||||
|
||||
The API uses the Windows Registry and `LSCopyDefaultHandlerForURLScheme` internally.
|
||||
|
||||
@@ -858,8 +877,9 @@ Adds `tasks` to the [Tasks][tasks] category of the Jump List on Windows.
|
||||
|
||||
Returns `boolean` - Whether the call succeeded.
|
||||
|
||||
**Note:** If you'd like to customize the Jump List even more use
|
||||
`app.setJumpList(categories)` instead.
|
||||
> [!NOTE]
|
||||
> If you'd like to customize the Jump List even more use
|
||||
> `app.setJumpList(categories)` instead.
|
||||
|
||||
### `app.getJumpListSettings()` _Windows_
|
||||
|
||||
@@ -897,21 +917,24 @@ following strings:
|
||||
If `categories` is `null` the previously set custom Jump List (if any) will be
|
||||
replaced by the standard Jump List for the app (managed by Windows).
|
||||
|
||||
**Note:** If a `JumpListCategory` object has neither the `type` nor the `name`
|
||||
property set then its `type` is assumed to be `tasks`. If the `name` property
|
||||
> [!NOTE]
|
||||
> If a `JumpListCategory` object has neither the `type` nor the `name`
|
||||
> property set then its `type` is assumed to be `tasks`. If the `name` property
|
||||
is set but the `type` property is omitted then the `type` is assumed to be
|
||||
`custom`.
|
||||
|
||||
**Note:** Users can remove items from custom categories, and Windows will not
|
||||
allow a removed item to be added back into a custom category until **after**
|
||||
the next successful call to `app.setJumpList(categories)`. Any attempt to
|
||||
re-add a removed item to a custom category earlier than that will result in the
|
||||
entire custom category being omitted from the Jump List. The list of removed
|
||||
items can be obtained using `app.getJumpListSettings()`.
|
||||
> [!NOTE]
|
||||
> Users can remove items from custom categories, and Windows will not
|
||||
> allow a removed item to be added back into a custom category until **after**
|
||||
> the next successful call to `app.setJumpList(categories)`. Any attempt to
|
||||
> re-add a removed item to a custom category earlier than that will result in the
|
||||
> entire custom category being omitted from the Jump List. The list of removed
|
||||
> items can be obtained using `app.getJumpListSettings()`.
|
||||
|
||||
**Note:** The maximum length of a Jump List item's `description` property is
|
||||
260 characters. Beyond this limit, the item will not be added to the Jump
|
||||
List, nor will it be displayed.
|
||||
> [!NOTE]
|
||||
> The maximum length of a Jump List item's `description` property is
|
||||
> 260 characters. Beyond this limit, the item will not be added to the Jump
|
||||
> List, nor will it be displayed.
|
||||
|
||||
Here's a very simple example of creating a custom Jump List:
|
||||
|
||||
@@ -1188,7 +1211,8 @@ Returns [`ProcessMetric[]`](structures/process-metric.md): Array of `ProcessMetr
|
||||
|
||||
Returns [`GPUFeatureStatus`](structures/gpu-feature-status.md) - The Graphics Feature Status from `chrome://gpu/`.
|
||||
|
||||
**Note:** This information is only usable after the `gpu-info-update` event is emitted.
|
||||
> [!NOTE]
|
||||
> This information is only usable after the `gpu-info-update` event is emitted.
|
||||
|
||||
### `app.getGPUInfo(infoType)`
|
||||
|
||||
@@ -1242,11 +1266,13 @@ badge.
|
||||
|
||||
On macOS, it shows on the dock icon. On Linux, it only works for Unity launcher.
|
||||
|
||||
**Note:** Unity launcher requires a `.desktop` file to work. For more information,
|
||||
please read the [Unity integration documentation][unity-requirement].
|
||||
> [!NOTE]
|
||||
> Unity launcher requires a `.desktop` file to work. For more information,
|
||||
> please read the [Unity integration documentation][unity-requirement].
|
||||
|
||||
**Note:** On macOS, you need to ensure that your application has the permission
|
||||
to display notifications for this method to work.
|
||||
> [!NOTE]
|
||||
> On macOS, you need to ensure that your application has the permission
|
||||
> to display notifications for this method to work.
|
||||
|
||||
### `app.getBadgeCount()` _Linux_ _macOS_
|
||||
|
||||
@@ -1348,7 +1374,8 @@ details. Disabled by default.
|
||||
|
||||
This API must be called after the `ready` event is emitted.
|
||||
|
||||
**Note:** Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
|
||||
> [!NOTE]
|
||||
> Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
|
||||
|
||||
### `app.showAboutPanel()`
|
||||
|
||||
@@ -1476,7 +1503,8 @@ By using this API, important information such as password and other sensitive in
|
||||
See [Apple's documentation](https://developer.apple.com/library/archive/technotes/tn2150/_index.html) for more
|
||||
details.
|
||||
|
||||
**Note:** Enable `Secure Keyboard Entry` only when it is needed and disable it when it is no longer needed.
|
||||
> [!NOTE]
|
||||
> Enable `Secure Keyboard Entry` only when it is needed and disable it when it is no longer needed.
|
||||
|
||||
### `app.setProxy(config)`
|
||||
|
||||
@@ -1490,7 +1518,7 @@ and internal requests made by the runtime (ex: geolocation queries).
|
||||
|
||||
This method can only be called after app is ready.
|
||||
|
||||
#### `app.resolveProxy(url)`
|
||||
### `app.resolveProxy(url)`
|
||||
|
||||
* `url` URL
|
||||
|
||||
@@ -1538,7 +1566,8 @@ See [Chromium's accessibility docs](https://www.chromium.org/developers/design-d
|
||||
|
||||
This API must be called after the `ready` event is emitted.
|
||||
|
||||
**Note:** Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
|
||||
> [!NOTE]
|
||||
> Rendering accessibility tree can significantly affect the performance of your app. It should not be enabled by default.
|
||||
|
||||
### `app.applicationMenu`
|
||||
|
||||
@@ -1551,11 +1580,13 @@ An `Integer` property that returns the badge count for current app. Setting the
|
||||
|
||||
On macOS, setting this with any nonzero integer shows on the dock icon. On Linux, this property only works for Unity launcher.
|
||||
|
||||
**Note:** Unity launcher requires a `.desktop` file to work. For more information,
|
||||
please read the [Unity integration documentation][unity-requirement].
|
||||
> [!NOTE]
|
||||
> Unity launcher requires a `.desktop` file to work. For more information,
|
||||
> please read the [Unity integration documentation][unity-requirement].
|
||||
|
||||
**Note:** On macOS, you need to ensure that your application has the permission
|
||||
to display notifications for this property to take effect.
|
||||
> [!NOTE]
|
||||
> On macOS, you need to ensure that your application has the permission
|
||||
> to display notifications for this property to take effect.
|
||||
|
||||
### `app.commandLine` _Readonly_
|
||||
|
||||
|
||||
@@ -26,8 +26,9 @@ requirements, you can read [Server Support][server-support]. Note that
|
||||
update process. Apps that need to disable ATS can add the
|
||||
`NSAllowsArbitraryLoads` key to their app's plist.
|
||||
|
||||
**Note:** Your application must be signed for automatic updates on macOS.
|
||||
This is a requirement of `Squirrel.Mac`.
|
||||
> [!IMPORTANT]
|
||||
> Your application must be signed for automatic updates on macOS.
|
||||
> This is a requirement of `Squirrel.Mac`.
|
||||
|
||||
### Windows
|
||||
|
||||
@@ -93,8 +94,9 @@ Emitted when an update has been downloaded.
|
||||
|
||||
On Windows only `releaseName` is available.
|
||||
|
||||
**Note:** It is not strictly necessary to handle this event. A successfully
|
||||
downloaded update will still be applied the next time the application starts.
|
||||
> [!NOTE]
|
||||
> It is not strictly necessary to handle this event. A successfully
|
||||
> downloaded update will still be applied the next time the application starts.
|
||||
|
||||
### Event: 'before-quit-for-update'
|
||||
|
||||
@@ -125,8 +127,9 @@ Returns `string` - The current update feed URL.
|
||||
Asks the server whether there is an update. You must call `setFeedURL` before
|
||||
using this API.
|
||||
|
||||
**Note:** If an update is available it will be downloaded automatically.
|
||||
Calling `autoUpdater.checkForUpdates()` twice will download the update two times.
|
||||
> [!NOTE]
|
||||
> If an update is available it will be downloaded automatically.
|
||||
> Calling `autoUpdater.checkForUpdates()` twice will download the update two times.
|
||||
|
||||
### `autoUpdater.quitAndInstall()`
|
||||
|
||||
@@ -137,9 +140,10 @@ Under the hood calling `autoUpdater.quitAndInstall()` will close all application
|
||||
windows first, and automatically call `app.quit()` after all windows have been
|
||||
closed.
|
||||
|
||||
**Note:** It is not strictly necessary to call this function to apply an update,
|
||||
as a successfully downloaded update will always be applied the next time the
|
||||
application starts.
|
||||
> [!NOTE]
|
||||
> It is not strictly necessary to call this function to apply an update,
|
||||
> as a successfully downloaded update will always be applied the next time the
|
||||
> application starts.
|
||||
|
||||
[squirrel-mac]: https://github.com/Squirrel/Squirrel.Mac
|
||||
[server-support]: https://github.com/Squirrel/Squirrel.Mac#server-support
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> `BaseWindow` provides a flexible way to compose multiple web views in a
|
||||
> single window. For windows with only a single, full-size web view, the
|
||||
> [`BrowserWindow`](browser-window.md) class may be a simpler option.
|
||||
@@ -107,8 +107,9 @@ It creates a new `BaseWindow` with native properties as set by the `options`.
|
||||
|
||||
Objects created with `new BaseWindow` emit the following events:
|
||||
|
||||
**Note:** Some events are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
> [!NOTE]
|
||||
> Some events are only available on specific operating systems and are
|
||||
> labeled as such.
|
||||
|
||||
#### Event: 'close'
|
||||
|
||||
@@ -137,7 +138,11 @@ window.onbeforeunload = (e) => {
|
||||
}
|
||||
```
|
||||
|
||||
_**Note**: There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', handler)`. It is recommended to always set the `event.returnValue` explicitly, instead of only returning a value, as the former works more consistently within Electron._
|
||||
> [!NOTE]
|
||||
> There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and
|
||||
> `window.addEventListener('beforeunload', handler)`. It is recommended to always set the
|
||||
> `event.returnValue` explicitly, instead of only returning a value, as the former works more
|
||||
> consistently within Electron.
|
||||
|
||||
#### Event: 'closed'
|
||||
|
||||
@@ -252,7 +257,8 @@ Emitted when the window is being moved to a new position.
|
||||
|
||||
Emitted once when the window is moved to a new position.
|
||||
|
||||
**Note**: On macOS this event is an alias of `move`.
|
||||
> [!NOTE]
|
||||
> On macOS, this event is an alias of `move`.
|
||||
|
||||
#### Event: 'enter-full-screen'
|
||||
|
||||
@@ -356,7 +362,7 @@ as `-webkit-app-region: drag` in a frameless window.
|
||||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows-linux).
|
||||
|
||||
### Static Methods
|
||||
|
||||
@@ -421,7 +427,8 @@ A `boolean` property that determines whether the window is focusable.
|
||||
|
||||
A `boolean` property that determines whether the window is visible on all workspaces.
|
||||
|
||||
**Note:** Always returns false on Windows.
|
||||
> [!NOTE]
|
||||
> Always returns false on Windows.
|
||||
|
||||
#### `win.shadow`
|
||||
|
||||
@@ -431,7 +438,8 @@ A `boolean` property that determines whether the window has a shadow.
|
||||
|
||||
A `boolean` property that determines whether the menu bar should be visible.
|
||||
|
||||
**Note:** If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key.
|
||||
> [!NOTE]
|
||||
> If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key.
|
||||
|
||||
#### `win.kiosk`
|
||||
|
||||
@@ -452,7 +460,8 @@ and the icon of the file will show in window's title bar.
|
||||
|
||||
A `string` property that determines the title of the native window.
|
||||
|
||||
**Note:** The title of the web page can be different from the title of the native window.
|
||||
> [!NOTE]
|
||||
> The title of the web page can be different from the title of the native window.
|
||||
|
||||
#### `win.minimizable` _macOS_ _Windows_
|
||||
|
||||
@@ -521,8 +530,9 @@ A `boolean` property that indicates whether the window is arranged via [Snap.](h
|
||||
|
||||
Objects created with `new BaseWindow` have the following instance methods:
|
||||
|
||||
**Note:** Some methods are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
> [!NOTE]
|
||||
> Some methods are only available on specific operating systems and are
|
||||
> labeled as such.
|
||||
|
||||
#### `win.setContentView(view)`
|
||||
|
||||
@@ -614,7 +624,8 @@ Returns `boolean` - Whether the window is minimized.
|
||||
|
||||
Sets whether the window should be in fullscreen mode.
|
||||
|
||||
**Note:** On macOS, fullscreen transitions take place asynchronously. If further actions depend on the fullscreen state, use the ['enter-full-screen'](base-window.md#event-enter-full-screen) or ['leave-full-screen'](base-window.md#event-leave-full-screen) events.
|
||||
> [!NOTE]
|
||||
> On macOS, fullscreen transitions take place asynchronously. If further actions depend on the fullscreen state, use the ['enter-full-screen'](base-window.md#event-enter-full-screen) or > ['leave-full-screen'](base-window.md#event-leave-full-screen) events.
|
||||
|
||||
#### `win.isFullScreen()`
|
||||
|
||||
@@ -728,13 +739,15 @@ win.setBounds({ width: 100 })
|
||||
console.log(win.getBounds())
|
||||
```
|
||||
|
||||
**Note:** On macOS, the y-coordinate value cannot be smaller than the [Tray](tray.md) height. The tray height has changed over time and depends on the operating system, but is between 20-40px. Passing a value lower than the tray height will result in a window that is flush to the tray.
|
||||
> [!NOTE]
|
||||
> On macOS, the y-coordinate value cannot be smaller than the [Tray](tray.md) height. The tray height has changed over time and depends on the operating system, but is between 20-40px. Passing a value lower than the tray height will result in a window that is flush to the tray.
|
||||
|
||||
#### `win.getBounds()`
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `Object`.
|
||||
|
||||
**Note:** On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
|
||||
> [!NOTE]
|
||||
> On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
|
||||
|
||||
#### `win.getBackgroundColor()`
|
||||
|
||||
@@ -742,7 +755,8 @@ Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) fo
|
||||
|
||||
See [Setting `backgroundColor`](browser-window.md#setting-the-backgroundcolor-property).
|
||||
|
||||
**Note:** The alpha value is _not_ returned alongside the red, green, and blue values.
|
||||
> [!NOTE]
|
||||
> The alpha value is _not_ returned alongside the red, green, and blue values.
|
||||
|
||||
#### `win.setContentBounds(bounds[, animate])`
|
||||
|
||||
@@ -760,7 +774,8 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window's cl
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md) - Contains the window bounds of the normal state
|
||||
|
||||
**Note:** whatever the current state of the window : maximized, minimized or in fullscreen, this function always returns the position and size of the window in normal state. In normal state, getBounds and getNormalBounds returns the same [`Rectangle`](structures/rectangle.md).
|
||||
> [!NOTE]
|
||||
> Whatever the current state of the window : maximized, minimized or in fullscreen, this function always returns the position and size of the window in normal state. In normal state, getBounds and getNormalBounds returns the same [`Rectangle`](structures/rectangle.md).
|
||||
|
||||
#### `win.setEnabled(enable)`
|
||||
|
||||
@@ -957,8 +972,9 @@ Changes the title of native window to `title`.
|
||||
|
||||
Returns `string` - The title of the native window.
|
||||
|
||||
**Note:** The title of the web page can be different from the title of the native
|
||||
window.
|
||||
> [!NOTE]
|
||||
> The title of the web page can be different from the title of the native
|
||||
> window.
|
||||
|
||||
#### `win.setSheetOffset(offsetY[, offsetX])` _macOS_
|
||||
|
||||
@@ -1232,8 +1248,9 @@ in the taskbar.
|
||||
|
||||
Sets the properties for the window's taskbar button.
|
||||
|
||||
**Note:** `relaunchCommand` and `relaunchDisplayName` must always be set
|
||||
together. If one of those properties is not set, then neither will be used.
|
||||
> [!NOTE]
|
||||
> `relaunchCommand` and `relaunchDisplayName` must always be set
|
||||
> together. If one of those properties is not set, then neither will be used.
|
||||
|
||||
#### `win.setIcon(icon)` _Windows_ _Linux_
|
||||
|
||||
@@ -1293,13 +1310,15 @@ maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
Sets whether the window should be visible on all workspaces.
|
||||
|
||||
**Note:** This API does nothing on Windows.
|
||||
> [!NOTE]
|
||||
> This API does nothing on Windows.
|
||||
|
||||
#### `win.isVisibleOnAllWorkspaces()` _macOS_ _Linux_
|
||||
|
||||
Returns `boolean` - Whether the window is visible on all workspaces.
|
||||
|
||||
**Note:** This API always returns false on Windows.
|
||||
> [!NOTE]
|
||||
> This API always returns false on Windows.
|
||||
|
||||
#### `win.setIgnoreMouseEvents(ignore[, options])`
|
||||
|
||||
@@ -1416,7 +1435,8 @@ This method sets the browser window's system-drawn background material, includin
|
||||
|
||||
See the [Windows documentation](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_systembackdrop_type) for more details.
|
||||
|
||||
**Note:** This method is only supported on Windows 11 22H2 and up.
|
||||
> [!NOTE]
|
||||
> This method is only supported on Windows 11 22H2 and up.
|
||||
|
||||
#### `win.setWindowButtonPosition(position)` _macOS_
|
||||
|
||||
@@ -1438,8 +1458,9 @@ Sets the touchBar layout for the current window. Specifying `null` or
|
||||
`undefined` clears the touch bar. This method only has an effect if the
|
||||
machine has a touch bar.
|
||||
|
||||
**Note:** The TouchBar API is currently experimental and may change or be
|
||||
removed in future Electron releases.
|
||||
> [!NOTE]
|
||||
> The TouchBar API is currently experimental and may change or be
|
||||
> removed in future Electron releases.
|
||||
|
||||
#### `win.setTitleBarOverlay(options)` _Windows_ _Linux_
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ deprecated:
|
||||
```
|
||||
-->
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -29,7 +29,7 @@ deprecated:
|
||||
|
||||
> Create and control views.
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -176,4 +176,5 @@ Examples of valid `color` values:
|
||||
* Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
||||
* e.g. `blueviolet` or `red`
|
||||
|
||||
**Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or `RGB`.
|
||||
> [!NOTE]
|
||||
> Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or `RGB`.
|
||||
|
||||
@@ -158,7 +158,8 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
|
||||
Objects created with `new BrowserWindow` emit the following events:
|
||||
|
||||
**Note:** Some events are only available on specific operating systems and are
|
||||
> [!NOTE]
|
||||
> Some events are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
|
||||
#### Event: 'page-title-updated'
|
||||
@@ -200,7 +201,11 @@ window.onbeforeunload = (e) => {
|
||||
}
|
||||
```
|
||||
|
||||
_**Note**: There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and `window.addEventListener('beforeunload', handler)`. It is recommended to always set the `event.returnValue` explicitly, instead of only returning a value, as the former works more consistently within Electron._
|
||||
> [!NOTE]
|
||||
> There is a subtle difference between the behaviors of `window.onbeforeunload = handler` and
|
||||
> `window.addEventListener('beforeunload', handler)`. It is recommended to always set the
|
||||
> `event.returnValue` explicitly, instead of only returning a value, as the former works more
|
||||
> consistently within Electron.
|
||||
|
||||
#### Event: 'closed'
|
||||
|
||||
@@ -323,7 +328,8 @@ Emitted when the window is being moved to a new position.
|
||||
|
||||
Emitted once when the window is moved to a new position.
|
||||
|
||||
**Note**: On macOS this event is an alias of `move`.
|
||||
> [!NOTE]
|
||||
> On macOS, this event is an alias of `move`.
|
||||
|
||||
#### Event: 'enter-full-screen'
|
||||
|
||||
@@ -435,7 +441,7 @@ as `-webkit-app-region: drag` in a frameless window.
|
||||
|
||||
Calling `event.preventDefault()` will prevent the menu from being displayed.
|
||||
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows).
|
||||
To convert `point` to DIP, use [`screen.screenToDipPoint(point)`](./screen.md#screenscreentodippointpoint-windows-linux).
|
||||
|
||||
### Static Methods
|
||||
|
||||
@@ -460,7 +466,7 @@ or `null` if the contents are not owned by a window.
|
||||
|
||||
* `browserView` [BrowserView](browser-view.md)
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -522,7 +528,8 @@ A `boolean` property that determines whether the window is focusable.
|
||||
|
||||
A `boolean` property that determines whether the window is visible on all workspaces.
|
||||
|
||||
**Note:** Always returns false on Windows.
|
||||
> [!NOTE]
|
||||
> Always returns false on Windows.
|
||||
|
||||
#### `win.shadow`
|
||||
|
||||
@@ -532,7 +539,8 @@ A `boolean` property that determines whether the window has a shadow.
|
||||
|
||||
A `boolean` property that determines whether the menu bar should be visible.
|
||||
|
||||
**Note:** If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key.
|
||||
> [!NOTE]
|
||||
> If the menu bar is auto-hide, users can still bring up the menu bar by pressing the single `Alt` key.
|
||||
|
||||
#### `win.kiosk`
|
||||
|
||||
@@ -553,7 +561,8 @@ and the icon of the file will show in window's title bar.
|
||||
|
||||
A `string` property that determines the title of the native window.
|
||||
|
||||
**Note:** The title of the web page can be different from the title of the native window.
|
||||
> [!NOTE]
|
||||
> The title of the web page can be different from the title of the native window.
|
||||
|
||||
#### `win.minimizable` _macOS_ _Windows_
|
||||
|
||||
@@ -621,8 +630,9 @@ A `boolean` property that indicates whether the window is arranged via [Snap.](h
|
||||
|
||||
Objects created with `new BrowserWindow` have the following instance methods:
|
||||
|
||||
**Note:** Some methods are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
> [!NOTE]
|
||||
> Some methods are only available on specific operating systems and are
|
||||
> labeled as such.
|
||||
|
||||
#### `win.destroy()`
|
||||
|
||||
@@ -704,13 +714,15 @@ Returns `boolean` - Whether the window is minimized.
|
||||
|
||||
Sets whether the window should be in fullscreen mode.
|
||||
|
||||
**Note:** On macOS, fullscreen transitions take place asynchronously. If further actions depend on the fullscreen state, use the ['enter-full-screen'](browser-window.md#event-enter-full-screen) or ['leave-full-screen'](browser-window.md#event-leave-full-screen) events.
|
||||
> [!NOTE]
|
||||
> On macOS, fullscreen transitions take place asynchronously. If further actions depend on the fullscreen state, use the ['enter-full-screen'](browser-window.md#event-enter-full-screen) or ['leave-full-screen'](browser-window.md#event-leave-full-screen) events.
|
||||
|
||||
#### `win.isFullScreen()`
|
||||
|
||||
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.
|
||||
> [!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_
|
||||
|
||||
@@ -820,13 +832,15 @@ win.setBounds({ width: 100 })
|
||||
console.log(win.getBounds())
|
||||
```
|
||||
|
||||
**Note:** On macOS, the y-coordinate value cannot be smaller than the [Tray](tray.md) height. The tray height has changed over time and depends on the operating system, but is between 20-40px. Passing a value lower than the tray height will result in a window that is flush to the tray.
|
||||
> [!NOTE]
|
||||
> On macOS, the y-coordinate value cannot be smaller than the [Tray](tray.md) height. The tray height has changed over time and depends on the operating system, but is between 20-40px. Passing a value lower than the tray height will result in a window that is flush to the tray.
|
||||
|
||||
#### `win.getBounds()`
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `Object`.
|
||||
|
||||
**Note:** On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
|
||||
> [!NOTE]
|
||||
> On macOS, the y-coordinate value returned will be at minimum the [Tray](tray.md) height. For example, calling `win.setBounds({ x: 25, y: 20, width: 800, height: 600 })` with a tray height of 38 means that `win.getBounds()` will return `{ x: 25, y: 38, width: 800, height: 600 }`.
|
||||
|
||||
#### `win.getBackgroundColor()`
|
||||
|
||||
@@ -834,7 +848,8 @@ Returns `string` - Gets the background color of the window in Hex (`#RRGGBB`) fo
|
||||
|
||||
See [Setting `backgroundColor`](#setting-the-backgroundcolor-property).
|
||||
|
||||
**Note:** The alpha value is _not_ returned alongside the red, green, and blue values.
|
||||
> [!NOTE]
|
||||
> The alpha value is _not_ returned alongside the red, green, and blue values.
|
||||
|
||||
#### `win.setContentBounds(bounds[, animate])`
|
||||
|
||||
@@ -852,7 +867,8 @@ Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window's cl
|
||||
|
||||
Returns [`Rectangle`](structures/rectangle.md) - Contains the window bounds of the normal state
|
||||
|
||||
**Note:** whatever the current state of the window : maximized, minimized or in fullscreen, this function always returns the position and size of the window in normal state. In normal state, getBounds and getNormalBounds returns the same [`Rectangle`](structures/rectangle.md).
|
||||
> [!NOTE]
|
||||
> Whatever the current state of the window (maximized, minimized or in fullscreen), this function always returns the position and size of the window in normal state. In normal state, `getBounds` and `getNormalBounds` return the same [`Rectangle`](structures/rectangle.md).
|
||||
|
||||
#### `win.setEnabled(enable)`
|
||||
|
||||
@@ -1049,8 +1065,9 @@ Changes the title of native window to `title`.
|
||||
|
||||
Returns `string` - The title of the native window.
|
||||
|
||||
**Note:** The title of the web page can be different from the title of the native
|
||||
window.
|
||||
> [!NOTE]
|
||||
> The title of the web page can be different from the title of the native
|
||||
> window.
|
||||
|
||||
#### `win.setSheetOffset(offsetY[, offsetX])` _macOS_
|
||||
|
||||
@@ -1409,8 +1426,9 @@ in the taskbar.
|
||||
|
||||
Sets the properties for the window's taskbar button.
|
||||
|
||||
**Note:** `relaunchCommand` and `relaunchDisplayName` must always be set
|
||||
together. If one of those properties is not set, then neither will be used.
|
||||
> [!NOTE]
|
||||
> `relaunchCommand` and `relaunchDisplayName` must always be set
|
||||
> together. If one of those properties is not set, then neither will be used.
|
||||
|
||||
#### `win.showDefinitionForSelection()` _macOS_
|
||||
|
||||
@@ -1474,13 +1492,15 @@ maximize button, or by dragging it to the edges of the screen.
|
||||
|
||||
Sets whether the window should be visible on all workspaces.
|
||||
|
||||
**Note:** This API does nothing on Windows.
|
||||
> [!NOTE]
|
||||
> This API does nothing on Windows.
|
||||
|
||||
#### `win.isVisibleOnAllWorkspaces()` _macOS_ _Linux_
|
||||
|
||||
Returns `boolean` - Whether the window is visible on all workspaces.
|
||||
|
||||
**Note:** This API always returns false on Windows.
|
||||
> [!NOTE]
|
||||
> This API always returns false on Windows.
|
||||
|
||||
#### `win.setIgnoreMouseEvents(ignore[, options])`
|
||||
|
||||
@@ -1601,7 +1621,8 @@ This method sets the browser window's system-drawn background material, includin
|
||||
|
||||
See the [Windows documentation](https://learn.microsoft.com/en-us/windows/win32/api/dwmapi/ne-dwmapi-dwm_systembackdrop_type) for more details.
|
||||
|
||||
**Note:** This method is only supported on Windows 11 22H2 and up.
|
||||
> [!NOTE]
|
||||
> This method is only supported on Windows 11 22H2 and up.
|
||||
|
||||
#### `win.setWindowButtonPosition(position)` _macOS_
|
||||
|
||||
@@ -1623,8 +1644,9 @@ Sets the touchBar layout for the current window. Specifying `null` or
|
||||
`undefined` clears the touch bar. This method only has an effect if the
|
||||
machine has a touch bar.
|
||||
|
||||
**Note:** The TouchBar API is currently experimental and may change or be
|
||||
removed in future Electron releases.
|
||||
> [!NOTE]
|
||||
> The TouchBar API is currently experimental and may change or be
|
||||
> removed in future Electron releases.
|
||||
|
||||
#### `win.setBrowserView(browserView)` _Experimental_ _Deprecated_
|
||||
|
||||
@@ -1632,7 +1654,7 @@ removed in future Electron releases.
|
||||
If there are other `BrowserView`s attached, they will be removed from
|
||||
this window.
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -1641,7 +1663,7 @@ this window.
|
||||
Returns `BrowserView | null` - The `BrowserView` attached to `win`. Returns `null`
|
||||
if one is not attached. Throws an error if multiple `BrowserView`s are attached.
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -1651,7 +1673,7 @@ if one is not attached. Throws an error if multiple `BrowserView`s are attached.
|
||||
|
||||
Replacement API for setBrowserView supporting work with multi browser views.
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -1659,7 +1681,7 @@ Replacement API for setBrowserView supporting work with multi browser views.
|
||||
|
||||
* `browserView` [BrowserView](browser-view.md)
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -1670,7 +1692,7 @@ Replacement API for setBrowserView supporting work with multi browser views.
|
||||
Raises `browserView` above other `BrowserView`s attached to `win`.
|
||||
Throws an error if `browserView` is not attached to `win`.
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
@@ -1679,7 +1701,7 @@ Throws an error if `browserView` is not attached to `win`.
|
||||
Returns `BrowserView[]` - a sorted by z-index array of all BrowserViews that have been attached
|
||||
with `addBrowserView` or `setBrowserView`. The top-most BrowserView is the last element of the array.
|
||||
|
||||
> **Note**
|
||||
> [!WARNING]
|
||||
> The `BrowserView` class is deprecated, and replaced by the new
|
||||
> [`WebContentsView`](web-contents-view.md) class.
|
||||
|
||||
|
||||
@@ -18,7 +18,8 @@ console.log(clipboard.readText('selection'))
|
||||
|
||||
The `clipboard` module has the following methods:
|
||||
|
||||
**Note:** Experimental APIs are marked as such and could be removed in future.
|
||||
> [!NOTE]
|
||||
> Experimental APIs are marked as such and could be removed in future.
|
||||
|
||||
### `clipboard.readText([type])`
|
||||
|
||||
@@ -141,9 +142,10 @@ bookmark is unavailable. The `title` value will always be empty on Windows.
|
||||
|
||||
Writes the `title` (macOS only) and `url` into the clipboard as a bookmark.
|
||||
|
||||
**Note:** Most apps on Windows don't support pasting bookmarks into them so
|
||||
you can use `clipboard.write` to write both a bookmark and fallback text to the
|
||||
clipboard.
|
||||
> [!NOTE]
|
||||
> Most apps on Windows don't support pasting bookmarks into them so
|
||||
> you can use `clipboard.write` to write both a bookmark and fallback text to the
|
||||
> clipboard.
|
||||
|
||||
```js
|
||||
const { clipboard } = require('electron')
|
||||
|
||||
@@ -73,7 +73,8 @@ Passing `--enable-logging=file` will result in logs being saved to the file
|
||||
specified by `--log-file=...`, or to `electron_debug.log` in the user-data
|
||||
directory if `--log-file` is not specified.
|
||||
|
||||
> **Note:** On Windows, logs from child processes cannot be sent to stderr.
|
||||
> [!NOTE]
|
||||
> On Windows, logs from child processes cannot be sent to stderr.
|
||||
> Logging to a file is the most reliable way to collect logs on Windows.
|
||||
|
||||
See also `--log-file`, `--log-level`, `--v`, and `--vmodule`.
|
||||
@@ -252,9 +253,10 @@ the required version is unavailable. Current default is set to `3`.
|
||||
|
||||
Electron supports some of the [CLI flags][node-cli] supported by Node.js.
|
||||
|
||||
**Note:** Passing unsupported command line switches to Electron when it is not running in `ELECTRON_RUN_AS_NODE` will have no effect.
|
||||
> [!NOTE]
|
||||
> Passing unsupported command line switches to Electron when it is not running in `ELECTRON_RUN_AS_NODE` will have no effect.
|
||||
|
||||
### `--inspect-brk\[=\[host:]port]`
|
||||
### `--inspect-brk[=[host:]port]`
|
||||
|
||||
Activate inspector on host:port and break at start of user script. Default host:port is 127.0.0.1:9229.
|
||||
|
||||
@@ -266,13 +268,13 @@ Activate inspector on `host:port` and break at start of the first internal
|
||||
JavaScript script executed when the inspector is available.
|
||||
Default `host:port` is `127.0.0.1:9229`.
|
||||
|
||||
### `--inspect-port=\[host:]port`
|
||||
### `--inspect-port=[host:]port`
|
||||
|
||||
Set the `host:port` to be used when the inspector is activated. Useful when activating the inspector by sending the SIGUSR1 signal. Default host is `127.0.0.1`.
|
||||
|
||||
Aliased to `--debug-port=[host:]port`.
|
||||
|
||||
### `--inspect\[=\[host:]port]`
|
||||
### `--inspect[=[host:]port]`
|
||||
|
||||
Activate inspector on `host:port`. Default is `127.0.0.1:9229`.
|
||||
|
||||
@@ -288,6 +290,10 @@ Specify ways of the inspector web socket url exposure.
|
||||
|
||||
By default inspector websocket url is available in stderr and under /json/list endpoint on `http://host:port/json/list`.
|
||||
|
||||
### `--experimental-network-inspector`
|
||||
|
||||
Enable support for devtools network inspector events, for visibility into requests made by the nodejs `http` and `https` modules.
|
||||
|
||||
### `--no-deprecation`
|
||||
|
||||
Silence deprecation warnings.
|
||||
|
||||
@@ -25,8 +25,9 @@ document.
|
||||
|
||||
Append a switch (with optional `value`) to Chromium's command line.
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
> [!NOTE]
|
||||
> This will not affect `process.argv`. The intended usage of this function is to
|
||||
> control Chromium's behavior.
|
||||
|
||||
```js
|
||||
const { app } = require('electron')
|
||||
@@ -49,8 +50,9 @@ const { app } = require('electron')
|
||||
app.commandLine.appendArgument('--enable-experimental-web-platform-features')
|
||||
```
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
> [!NOTE]
|
||||
> This will not affect `process.argv`. The intended usage of this function is to
|
||||
> control Chromium's behavior.
|
||||
|
||||
#### `commandLine.hasSwitch(switch)`
|
||||
|
||||
@@ -84,7 +86,8 @@ const portValue = app.commandLine.getSwitchValue('remote-debugging-port')
|
||||
console.log(portValue) // '8315'
|
||||
```
|
||||
|
||||
**Note:** When the switch is not present or has no value, it returns empty string.
|
||||
> [!NOTE]
|
||||
> When the switch is not present or has no value, it returns empty string.
|
||||
|
||||
#### `commandLine.removeSwitch(switch)`
|
||||
|
||||
@@ -102,5 +105,6 @@ app.commandLine.removeSwitch('remote-debugging-port')
|
||||
console.log(app.commandLine.hasSwitch('remote-debugging-port')) // false
|
||||
```
|
||||
|
||||
**Note:** This will not affect `process.argv`. The intended usage of this function is to
|
||||
control Chromium's behavior.
|
||||
> [!NOTE]
|
||||
> This will not affect `process.argv`. The intended usage of this function is to
|
||||
> control Chromium's behavior.
|
||||
|
||||
@@ -7,8 +7,9 @@ Process: [Main](../glossary.md#main-process)
|
||||
This module does not include a web interface. To view recorded traces, use
|
||||
[trace viewer][], available at `chrome://tracing` in Chrome.
|
||||
|
||||
**Note:** You should not use this module until the `ready` event of the app
|
||||
module is emitted.
|
||||
> [!NOTE]
|
||||
> You should not use this module until the `ready` event of the app
|
||||
> module is emitted.
|
||||
|
||||
```js
|
||||
const { app, contentTracing } = require('electron')
|
||||
|
||||
@@ -19,7 +19,8 @@ following projects:
|
||||
* [socorro](https://github.com/mozilla-services/socorro)
|
||||
* [mini-breakpad-server](https://github.com/electron/mini-breakpad-server)
|
||||
|
||||
> **Note:** Electron uses Crashpad, not Breakpad, to collect and upload
|
||||
> [!NOTE]
|
||||
> Electron uses Crashpad, not Breakpad, to collect and upload
|
||||
> crashes, but for the time being, the [upload protocol is the same](https://chromium.googlesource.com/crashpad/crashpad/+/HEAD/doc/overview_design.md#Upload-to-collection-server).
|
||||
|
||||
Or use a 3rd party hosted solution:
|
||||
@@ -84,19 +85,23 @@ before `app.on('ready')`. If the crash reporter is not initialized at the time
|
||||
a renderer process is created, then that renderer process will not be monitored
|
||||
by the crash reporter.
|
||||
|
||||
**Note:** You can test out the crash reporter by generating a crash using
|
||||
`process.crash()`.
|
||||
> [!NOTE]
|
||||
> You can test out the crash reporter by generating a crash using
|
||||
> `process.crash()`.
|
||||
|
||||
**Note:** If you need to send additional/updated `extra` parameters after your
|
||||
first call `start` you can call `addExtraParameter`.
|
||||
> [!NOTE]
|
||||
> If you need to send additional/updated `extra` parameters after your
|
||||
> first call `start` you can call `addExtraParameter`.
|
||||
|
||||
**Note:** Parameters passed in `extra`, `globalExtra` or set with
|
||||
`addExtraParameter` have limits on the length of the keys and values. Key names
|
||||
must be at most 39 bytes long, and values must be no longer than 127 bytes.
|
||||
Keys with names longer than the maximum will be silently ignored. Key values
|
||||
longer than the maximum length will be truncated.
|
||||
> [!NOTE]
|
||||
> Parameters passed in `extra`, `globalExtra` or set with
|
||||
> `addExtraParameter` have limits on the length of the keys and values. Key names
|
||||
> must be at most 39 bytes long, and values must be no longer than 127 bytes.
|
||||
> Keys with names longer than the maximum will be silently ignored. Key values
|
||||
> longer than the maximum length will be truncated.
|
||||
|
||||
**Note:** This method is only available in the main process.
|
||||
> [!NOTE]
|
||||
> This method is only available in the main process.
|
||||
|
||||
### `crashReporter.getLastCrashReport()`
|
||||
|
||||
@@ -105,7 +110,8 @@ last crash report. Only crash reports that have been uploaded will be returned;
|
||||
even if a crash report is present on disk it will not be returned until it is
|
||||
uploaded. In the case that there are no uploaded reports, `null` is returned.
|
||||
|
||||
**Note:** This method is only available in the main process.
|
||||
> [!NOTE]
|
||||
> This method is only available in the main process.
|
||||
|
||||
### `crashReporter.getUploadedReports()`
|
||||
|
||||
@@ -114,14 +120,16 @@ Returns [`CrashReport[]`](structures/crash-report.md):
|
||||
Returns all uploaded crash reports. Each report contains the date and uploaded
|
||||
ID.
|
||||
|
||||
**Note:** This method is only available in the main process.
|
||||
> [!NOTE]
|
||||
> This method is only available in the main process.
|
||||
|
||||
### `crashReporter.getUploadToServer()`
|
||||
|
||||
Returns `boolean` - Whether reports should be submitted to the server. Set through
|
||||
the `start` method or `setUploadToServer`.
|
||||
|
||||
**Note:** This method is only available in the main process.
|
||||
> [!NOTE]
|
||||
> This method is only available in the main process.
|
||||
|
||||
### `crashReporter.setUploadToServer(uploadToServer)`
|
||||
|
||||
@@ -130,7 +138,8 @@ the `start` method or `setUploadToServer`.
|
||||
This would normally be controlled by user preferences. This has no effect if
|
||||
called before `start` is called.
|
||||
|
||||
**Note:** This method is only available in the main process.
|
||||
> [!NOTE]
|
||||
> This method is only available in the main process.
|
||||
|
||||
### `crashReporter.addExtraParameter(key, value)`
|
||||
|
||||
@@ -148,10 +157,11 @@ with crashes from renderer or other child processes. Similarly, adding extra
|
||||
parameters in a renderer process will not result in those parameters being sent
|
||||
with crashes that occur in other renderer processes or in the main process.
|
||||
|
||||
**Note:** Parameters have limits on the length of the keys and values. Key
|
||||
names must be no longer than 39 bytes, and values must be no longer than 20320
|
||||
bytes. Keys with names longer than the maximum will be silently ignored. Key
|
||||
values longer than the maximum length will be truncated.
|
||||
> [!NOTE]
|
||||
> Parameters have limits on the length of the keys and values. Key
|
||||
> names must be no longer than 39 bytes, and values must be no longer than 20320
|
||||
> bytes. Keys with names longer than the maximum will be silently ignored. Key
|
||||
> values longer than the maximum length will be truncated.
|
||||
|
||||
### `crashReporter.removeExtraParameter(key)`
|
||||
|
||||
|
||||
@@ -70,8 +70,9 @@ stopButton.addEventListener('click', () => {
|
||||
|
||||
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).
|
||||
> [!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
|
||||
|
||||
@@ -92,8 +93,9 @@ The `desktopCapturer` module has the following methods:
|
||||
|
||||
Returns `Promise<DesktopCapturerSource[]>` - Resolves with an array of [`DesktopCapturerSource`](structures/desktop-capturer-source.md) objects, each `DesktopCapturerSource` represents a screen or an individual window that can be captured.
|
||||
|
||||
**Note** Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher,
|
||||
which can detected by [`systemPreferences.getMediaAccessStatus`][].
|
||||
> [!NOTE]
|
||||
> Capturing the screen contents requires user consent on macOS 10.15 Catalina or higher,
|
||||
> which can detected by [`systemPreferences.getMediaAccessStatus`][].
|
||||
|
||||
[`navigator.mediaDevices.getUserMedia`]: https://developer.mozilla.org/en/docs/Web/API/MediaDevices/getUserMedia
|
||||
[`systemPreferences.getMediaAccessStatus`]: system-preferences.md#systempreferencesgetmediaaccessstatusmediatype-windows-macos
|
||||
|
||||
@@ -67,10 +67,11 @@ The `extensions` array should contain extensions without wildcards or dots (e.g.
|
||||
`'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the
|
||||
`'*'` wildcard (no other wildcard is supported).
|
||||
|
||||
**Note:** On Windows and Linux an open dialog can not be both a file selector
|
||||
and a directory selector, so if you set `properties` to
|
||||
`['openFile', 'openDirectory']` on these platforms, a directory selector will be
|
||||
shown.
|
||||
> [!NOTE]
|
||||
> On Windows and Linux an open dialog can not be both a file selector
|
||||
> 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.BaseWindow}
|
||||
dialog.showOpenDialogSync(mainWindow, {
|
||||
@@ -78,10 +79,11 @@ dialog.showOpenDialogSync(mainWindow, {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** On Linux `defaultPath` is not supported when using portal file chooser
|
||||
dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
|
||||
[command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
to force gtk or kde dialogs.
|
||||
> [!NOTE]
|
||||
> On Linux `defaultPath` is not supported when using portal file chooser
|
||||
> dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
|
||||
> [command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
> to force gtk or kde dialogs.
|
||||
|
||||
### `dialog.showOpenDialog([window, ]options)`
|
||||
|
||||
@@ -139,10 +141,11 @@ The `extensions` array should contain extensions without wildcards or dots (e.g.
|
||||
`'png'` is good but `'.png'` and `'*.png'` are bad). To show all files, use the
|
||||
`'*'` wildcard (no other wildcard is supported).
|
||||
|
||||
**Note:** On Windows and Linux an open dialog can not be both a file selector
|
||||
and a directory selector, so if you set `properties` to
|
||||
`['openFile', 'openDirectory']` on these platforms, a directory selector will be
|
||||
shown.
|
||||
> [!NOTE]
|
||||
> On Windows and Linux an open dialog can not be both a file selector
|
||||
> 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.BaseWindow}
|
||||
dialog.showOpenDialog(mainWindow, {
|
||||
@@ -155,10 +158,11 @@ dialog.showOpenDialog(mainWindow, {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** On Linux `defaultPath` is not supported when using portal file chooser
|
||||
dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
|
||||
[command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
to force gtk or kde dialogs.
|
||||
> [!NOTE]
|
||||
> On Linux `defaultPath` is not supported when using portal file chooser
|
||||
> dialogs unless the portal backend is version 4 or higher. You can use `--xdg-portal-required-version`
|
||||
> [command-line switch](./command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
> to force gtk or kde dialogs.
|
||||
|
||||
### `dialog.showSaveDialogSync([window, ]options)`
|
||||
|
||||
@@ -225,8 +229,9 @@ The `window` argument allows the dialog to attach itself to a parent window, mak
|
||||
The `filters` specifies an array of file types that can be displayed, see
|
||||
`dialog.showOpenDialog` for an example.
|
||||
|
||||
**Note:** On macOS, using the asynchronous version is recommended to avoid issues when
|
||||
expanding and collapsing the dialog.
|
||||
> [!NOTE]
|
||||
> On macOS, using the asynchronous version is recommended to avoid issues when
|
||||
> expanding and collapsing the dialog.
|
||||
|
||||
### `dialog.showMessageBoxSync([window, ]options)`
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ When `informational` is passed, the dock icon will bounce for one second.
|
||||
However, the request remains active until either the application becomes active
|
||||
or the request is canceled.
|
||||
|
||||
**Note:** This method can only be used while the app is not focused; when the app is focused it will return -1.
|
||||
> [!NOTE]
|
||||
> This method can only be used while the app is not focused; when the app is focused it will return -1.
|
||||
|
||||
#### `dock.cancelBounce(id)` _macOS_
|
||||
|
||||
|
||||
@@ -115,7 +115,8 @@ Returns `boolean` - Whether the download is paused.
|
||||
|
||||
Resumes the download that has been paused.
|
||||
|
||||
**Note:** To enable resumable downloads the server you are downloading from must support range requests and provide both `Last-Modified` and `ETag` header values. Otherwise `resume()` will dismiss previously received bytes and restart the download from the beginning.
|
||||
> [!NOTE]
|
||||
> To enable resumable downloads the server you are downloading from must support range requests and provide both `Last-Modified` and `ETag` header values. Otherwise `resume()` will dismiss previously received bytes and restart the download from the beginning.
|
||||
|
||||
#### `downloadItem.canResume()`
|
||||
|
||||
@@ -141,9 +142,10 @@ Returns `boolean` - Whether the download has user gesture.
|
||||
|
||||
Returns `string` - The file name of the download item.
|
||||
|
||||
**Note:** The file name is not always the same as the actual one saved in local
|
||||
disk. If user changes the file name in a prompted download saving dialog, the
|
||||
actual name of saved file will be different.
|
||||
> [!NOTE]
|
||||
> The file name is not always the same as the actual one saved in local
|
||||
> disk. If user changes the file name in a prompted download saving dialog, the
|
||||
> actual name of saved file will be different.
|
||||
|
||||
#### `downloadItem.getCurrentBytesPerSecond()`
|
||||
|
||||
@@ -172,8 +174,9 @@ header.
|
||||
|
||||
Returns `string` - The current state. Can be `progressing`, `completed`, `cancelled` or `interrupted`.
|
||||
|
||||
**Note:** The following methods are useful specifically to resume a
|
||||
`cancelled` item when session is restarted.
|
||||
> [!NOTE]
|
||||
> The following methods are useful specifically to resume a
|
||||
> `cancelled` item when session is restarted.
|
||||
|
||||
#### `downloadItem.getURLChain()`
|
||||
|
||||
|
||||
@@ -92,11 +92,13 @@ app.whenReady().then(async () => {
|
||||
|
||||
This API does not support loading packed (.crx) extensions.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
**Note:** Loading extensions into in-memory (non-persistent) sessions is not
|
||||
supported and will throw an error.
|
||||
> [!NOTE]
|
||||
> Loading extensions into in-memory (non-persistent) sessions is not
|
||||
> supported and will throw an error.
|
||||
|
||||
#### `extensions.removeExtension(extensionId)`
|
||||
|
||||
@@ -104,8 +106,9 @@ supported and will throw an error.
|
||||
|
||||
Unloads an extension.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
#### `extensions.getExtension(extensionId)`
|
||||
|
||||
@@ -113,12 +116,14 @@ is emitted.
|
||||
|
||||
Returns `Extension | null` - The loaded extension with the given ID.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
#### `extensions.getAllExtensions()`
|
||||
|
||||
Returns `Extension[]` - A list of all loaded extensions.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
@@ -6,7 +6,8 @@ but it also happens to support some other extension capabilities.
|
||||
|
||||
[chrome-extensions-api-index]: https://developer.chrome.com/extensions/api_index
|
||||
|
||||
> **Note:** Electron does not support arbitrary Chrome extensions from the
|
||||
> [!NOTE]
|
||||
> Electron does not support arbitrary Chrome extensions from the
|
||||
> store, and it is a **non-goal** of the Electron project to be perfectly
|
||||
> compatible with Chrome's implementation of Extensions.
|
||||
|
||||
@@ -160,7 +161,8 @@ The following methods of `chrome.tabs` are supported:
|
||||
- `chrome.tabs.update` (partial support)
|
||||
- supported properties: `url`, `muted`.
|
||||
|
||||
> **Note:** In Chrome, passing `-1` as a tab ID signifies the "currently active
|
||||
> [!NOTE]
|
||||
> In Chrome, passing `-1` as a tab ID signifies the "currently active
|
||||
> tab". Since Electron has no such concept, passing `-1` as a tab ID is not
|
||||
> supported and will raise an error.
|
||||
|
||||
@@ -170,6 +172,7 @@ See [official documentation](https://developer.chrome.com/docs/extensions/refere
|
||||
|
||||
All features of this API are supported.
|
||||
|
||||
> **NOTE:** Electron's [`webRequest`](web-request.md) module takes precedence over `chrome.webRequest` if there are conflicting handlers.
|
||||
> [!NOTE]
|
||||
> Electron's [`webRequest`](web-request.md) module takes precedence over `chrome.webRequest` if there are conflicting handlers.
|
||||
|
||||
See [official documentation](https://developer.chrome.com/docs/extensions/reference/webRequest) for more information.
|
||||
|
||||
@@ -8,13 +8,13 @@ The `globalShortcut` module can register/unregister a global keyboard shortcut
|
||||
with the operating system so that you can customize the operations for various
|
||||
shortcuts.
|
||||
|
||||
**Note:** The shortcut is global; it will work even if the app does
|
||||
not have the keyboard focus. This module cannot be used before the `ready`
|
||||
event of the app module is emitted.
|
||||
|
||||
Please also note that it is also possible to use Chromium's
|
||||
`GlobalShortcutsPortal` implementation, which allows apps to bind global
|
||||
shortcuts when running within a Wayland session.
|
||||
> [!NOTE]
|
||||
> The shortcut is global; it will work even if the app does
|
||||
> not have the keyboard focus. This module cannot be used before the `ready`
|
||||
> event of the app module is emitted.
|
||||
> Please also note that it is also possible to use Chromium's
|
||||
> `GlobalShortcutsPortal` implementation, which allows apps to bind global
|
||||
> shortcuts when running within a Wayland session.
|
||||
|
||||
```js
|
||||
const { app, globalShortcut } = require('electron')
|
||||
|
||||
@@ -156,7 +156,7 @@ If you need to transfer a [`MessagePort`][] to the main process, use [`ipcRender
|
||||
|
||||
If you do not need a response to the message, consider using [`ipcRenderer.send`](#ipcrenderersendchannel-args).
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects will throw an exception.
|
||||
>
|
||||
@@ -165,7 +165,7 @@ If you do not need a response to the message, consider using [`ipcRenderer.send`
|
||||
> Electron's IPC to the main process, as the main process would have no way to decode
|
||||
> them. Attempting to send such objects over IPC will result in an error.
|
||||
|
||||
> **Note**
|
||||
> [!NOTE]
|
||||
> If the handler in the main process throws an error,
|
||||
> the promise returned by `invoke` will reject.
|
||||
> However, the `Error` object in the renderer process
|
||||
@@ -195,7 +195,8 @@ throw an exception.
|
||||
The main process handles it by listening for `channel` with [`ipcMain`](./ipc-main.md) module,
|
||||
and replies by setting `event.returnValue`.
|
||||
|
||||
> :warning: **WARNING**: Sending a synchronous message will block the whole
|
||||
> [!WARNING]
|
||||
> Sending a synchronous message will block the whole
|
||||
> renderer process until the reply is received, so use this method only as a
|
||||
> last resort. It's much better to use the asynchronous version,
|
||||
> [`invoke()`](./ipc-renderer.md#ipcrendererinvokechannel-args).
|
||||
|
||||
@@ -19,7 +19,7 @@ See [`Menu`](menu.md) for examples.
|
||||
* `type` string (optional) - Can be `normal`, `separator`, `submenu`, `checkbox` or
|
||||
`radio`.
|
||||
* `label` string (optional)
|
||||
* `sublabel` string (optional)
|
||||
* `sublabel` string (optional) _macOS_ - Available in macOS >= 14.4
|
||||
* `toolTip` string (optional) _macOS_ - Hover text for this menu item.
|
||||
* `accelerator` [Accelerator](accelerator.md) (optional)
|
||||
* `icon` ([NativeImage](native-image.md) | string) (optional)
|
||||
@@ -51,7 +51,8 @@ See [`Menu`](menu.md) for examples.
|
||||
the placement of their containing group after the containing group of the item
|
||||
with the specified id.
|
||||
|
||||
**Note:** `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development.
|
||||
> [!NOTE]
|
||||
> `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development.
|
||||
|
||||
### Roles
|
||||
|
||||
@@ -125,7 +126,8 @@ When specifying a `role` on macOS, `label` and `accelerator` are the only
|
||||
options that will affect the menu item. All other options will be ignored.
|
||||
Lowercase `role`, e.g. `toggledevtools`, is still supported.
|
||||
|
||||
**Note:** The `enabled` and `visibility` properties are not available for top-level menu items in the tray on macOS.
|
||||
> [!NOTE]
|
||||
> The `enabled` and `visibility` properties are not available for top-level menu items in the tray on macOS.
|
||||
|
||||
### Instance Properties
|
||||
|
||||
@@ -170,7 +172,8 @@ An `Accelerator` (optional) indicating the item's accelerator, if set.
|
||||
|
||||
An `Accelerator | null` indicating the item's [user-assigned accelerator](https://developer.apple.com/documentation/appkit/nsmenuitem/1514850-userkeyequivalent?language=objc) for the menu item.
|
||||
|
||||
**Note:** This property is only initialized after the `MenuItem` has been added to a `Menu`. Either via `Menu.buildFromTemplate` or via `Menu.append()/insert()`. Accessing before initialization will just return `null`.
|
||||
> [!NOTE]
|
||||
> This property is only initialized after the `MenuItem` has been added to a `Menu`. Either via `Menu.buildFromTemplate` or via `Menu.append()/insert()`. Accessing before initialization will just return `null`.
|
||||
|
||||
#### `menuItem.icon`
|
||||
|
||||
|
||||
@@ -32,16 +32,18 @@ In order to escape the `&` character in an item name, add a proceeding `&`. For
|
||||
Passing `null` will suppress the default menu. On Windows and Linux,
|
||||
this has the additional effect of removing the menu bar from the window.
|
||||
|
||||
**Note:** The default menu will be created automatically if the app does not set one.
|
||||
It contains standard items such as `File`, `Edit`, `View`, `Window` and `Help`.
|
||||
> [!NOTE]
|
||||
> The default menu will be created automatically if the app does not set one.
|
||||
> It contains standard items such as `File`, `Edit`, `View`, `Window` and `Help`.
|
||||
|
||||
#### `Menu.getApplicationMenu()`
|
||||
|
||||
Returns `Menu | null` - The application menu, if set, or `null`, if not set.
|
||||
|
||||
**Note:** The returned `Menu` instance doesn't support dynamic addition or
|
||||
removal of menu items. [Instance properties](#instance-properties) can still
|
||||
be dynamically modified.
|
||||
> [!NOTE]
|
||||
> The returned `Menu` instance doesn't support dynamic addition or
|
||||
> removal of menu items. [Instance properties](#instance-properties) can still
|
||||
> be dynamically modified.
|
||||
|
||||
#### `Menu.sendActionToFirstResponder(action)` _macOS_
|
||||
|
||||
@@ -119,8 +121,9 @@ Inserts the `menuItem` to the `pos` position of the menu.
|
||||
|
||||
Objects created with `new Menu` or returned by `Menu.buildFromTemplate` emit the following events:
|
||||
|
||||
**Note:** Some events are only available on specific operating systems and are
|
||||
labeled as such.
|
||||
> [!NOTE]
|
||||
> Some events are only available on specific operating systems and are
|
||||
> labeled as such.
|
||||
|
||||
#### Event: 'menu-will-show'
|
||||
|
||||
@@ -329,6 +332,27 @@ name, no matter what label you set. To change it, modify your app bundle's
|
||||
[About Information Property List Files][AboutInformationPropertyListFiles]
|
||||
for more information.
|
||||
|
||||
### Menu Sublabels
|
||||
|
||||
Menu sublabels, or [subtitles](https://developer.apple.com/documentation/appkit/nsmenuitem/subtitle?language=objc), can be added to menu items using the `sublabel` option. Below is an example based on the renderer example above:
|
||||
|
||||
```js @ts-expect-error=[12]
|
||||
// main
|
||||
ipcMain.on('show-context-menu', (event) => {
|
||||
const template = [
|
||||
{
|
||||
label: 'Menu Item 1',
|
||||
sublabel: 'Subtitle 1',
|
||||
click: () => { event.sender.send('context-menu-command', 'menu-item-1') }
|
||||
},
|
||||
{ type: 'separator' },
|
||||
{ label: 'Menu Item 2', sublabel: 'Subtitle 2', type: 'checkbox', checked: true }
|
||||
]
|
||||
const menu = Menu.buildFromTemplate(template)
|
||||
menu.popup({ window: BrowserWindow.fromWebContents(event.sender) })
|
||||
})
|
||||
```
|
||||
|
||||
## Setting Menu for Specific Browser Window (_Linux_ _Windows_)
|
||||
|
||||
The [`setMenu` method][setMenu] of browser windows can set the menu of certain
|
||||
|
||||
@@ -134,7 +134,8 @@ Creates an empty `NativeImage` instance.
|
||||
|
||||
Returns `Promise<NativeImage>` - fulfilled with the file's thumbnail preview image, which is a [NativeImage](native-image.md).
|
||||
|
||||
Note: The Windows implementation will ignore `size.height` and scale the height according to `size.width`.
|
||||
> [!NOTE]
|
||||
> Windows implementation will ignore `size.height` and scale the height according to `size.width`.
|
||||
|
||||
### `nativeImage.createFromPath(path)`
|
||||
|
||||
@@ -142,8 +143,8 @@ Note: The Windows implementation will ignore `size.height` and scale the height
|
||||
|
||||
Returns `NativeImage`
|
||||
|
||||
Creates a new `NativeImage` instance from a file located at `path`. This method
|
||||
returns an empty image if the `path` does not exist, cannot be read, or is not
|
||||
Creates a new `NativeImage` instance from an image file (e.g., PNG or JPEG) located at `path`.
|
||||
This method returns an empty image if the `path` does not exist, cannot be read, or is not
|
||||
a valid image.
|
||||
|
||||
```js
|
||||
|
||||
@@ -17,8 +17,9 @@ app.whenReady().then(async () => {
|
||||
|
||||
See [`--log-net-log`](command-line-switches.md#--log-net-logpath) to log network events throughout the app's lifecycle.
|
||||
|
||||
**Note:** All methods unless specified can only be used after the `ready` event
|
||||
of the `app` module gets emitted.
|
||||
> [!NOTE]
|
||||
> All methods unless specified can only be used after the `ready` event
|
||||
> of the `app` module gets emitted.
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -117,8 +117,9 @@ protocol.handle('https', (req) => {
|
||||
})
|
||||
```
|
||||
|
||||
Note: in the [utility process](../glossary.md#utility-process) custom protocols
|
||||
are not supported.
|
||||
> [!NOTE]
|
||||
> In the [utility process](../glossary.md#utility-process), custom protocols
|
||||
> are not supported.
|
||||
|
||||
### `net.isOnline()`
|
||||
|
||||
|
||||
@@ -33,10 +33,11 @@ Returns `Integer` - The blocker ID that is assigned to this power blocker.
|
||||
Starts preventing the system from entering lower-power mode. Returns an integer
|
||||
identifying the power save blocker.
|
||||
|
||||
**Note:** `prevent-display-sleep` has higher precedence over
|
||||
`prevent-app-suspension`. Only the highest precedence type takes effect. In
|
||||
other words, `prevent-display-sleep` always takes precedence over
|
||||
`prevent-app-suspension`.
|
||||
> [!NOTE]
|
||||
> `prevent-display-sleep` has higher precedence over
|
||||
> `prevent-app-suspension`. Only the highest precedence type takes effect. In
|
||||
> other words, `prevent-display-sleep` always takes precedence over
|
||||
> `prevent-app-suspension`.
|
||||
|
||||
For example, an API calling A requests for `prevent-app-suspension`, and
|
||||
another calling B requests for `prevent-display-sleep`. `prevent-display-sleep`
|
||||
|
||||
@@ -233,7 +233,8 @@ console.log(version)
|
||||
// On Linux -> '4.15.0-45-generic'
|
||||
```
|
||||
|
||||
**Note:** It returns the actual operating system version instead of kernel version on macOS unlike `os.release()`.
|
||||
> [!NOTE]
|
||||
> It returns the actual operating system version instead of kernel version on macOS unlike `os.release()`.
|
||||
|
||||
### `process.takeHeapSnapshot(filePath)`
|
||||
|
||||
|
||||
@@ -20,8 +20,9 @@ app.whenReady().then(() => {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** All methods unless specified can only be used after the `ready` event
|
||||
of the `app` module gets emitted.
|
||||
> [!NOTE]
|
||||
> All methods unless specified can only be used after the `ready` event
|
||||
> of the `app` module gets emitted.
|
||||
|
||||
## Using `protocol` with a custom `partition` or `session`
|
||||
|
||||
@@ -61,8 +62,9 @@ The `protocol` module has the following methods:
|
||||
|
||||
* `customSchemes` [CustomScheme[]](structures/custom-scheme.md)
|
||||
|
||||
**Note:** This method can only be used before the `ready` event of the `app`
|
||||
module gets emitted and can be called only once.
|
||||
> [!NOTE]
|
||||
> This method can only be used before the `ready` event of the `app`
|
||||
> module gets emitted and can be called only once.
|
||||
|
||||
Registers the `scheme` as standard, secure, bypasses content security policy for
|
||||
resources, allows registering ServiceWorker, supports fetch API, streaming
|
||||
|
||||
@@ -9,8 +9,9 @@ module is emitted.
|
||||
|
||||
`screen` is an [EventEmitter][event-emitter].
|
||||
|
||||
**Note:** In the renderer / DevTools, `window.screen` is a reserved DOM
|
||||
property, so writing `let { screen } = require('electron')` will not work.
|
||||
> [!NOTE]
|
||||
> In the renderer / DevTools, `window.screen` is a reserved DOM
|
||||
> property, so writing `let { screen } = require('electron')` will not work.
|
||||
|
||||
An example of creating a window that fills the whole screen:
|
||||
|
||||
@@ -57,6 +58,14 @@ app.whenReady().then(() => {
|
||||
})
|
||||
```
|
||||
|
||||
> [!NOTE]
|
||||
> Screen coordinates used by this module are [`Point`](structures/point.md) structures.
|
||||
> There are two kinds of coordinates available to the process:
|
||||
>
|
||||
> * **Physical screen points** are raw hardware pixels on a display.
|
||||
> * **Device-independent pixel (DIP) points** are virtualized screen points scaled based on the DPI
|
||||
> (dots per inch) of the display.
|
||||
|
||||
## Events
|
||||
|
||||
The `screen` module emits the following events:
|
||||
@@ -101,7 +110,8 @@ Returns [`Point`](structures/point.md)
|
||||
|
||||
The current absolute position of the mouse pointer.
|
||||
|
||||
**Note:** The return value is a DIP point, not a screen physical point.
|
||||
> [!NOTE]
|
||||
> The return value is a DIP point, not a screen physical point.
|
||||
|
||||
### `screen.getPrimaryDisplay()`
|
||||
|
||||
@@ -124,7 +134,7 @@ Returns [`Display`](structures/display.md) - The display nearest the specified p
|
||||
Returns [`Display`](structures/display.md) - The display that most closely
|
||||
intersects the provided bounds.
|
||||
|
||||
### `screen.screenToDipPoint(point)` _Windows_
|
||||
### `screen.screenToDipPoint(point)` _Windows_ _Linux_
|
||||
|
||||
* `point` [Point](structures/point.md)
|
||||
|
||||
@@ -133,7 +143,10 @@ Returns [`Point`](structures/point.md)
|
||||
Converts a screen physical point to a screen DIP point.
|
||||
The DPI scale is performed relative to the display containing the physical point.
|
||||
|
||||
### `screen.dipToScreenPoint(point)` _Windows_
|
||||
Not currently supported on Wayland - if used there it will return the point passed
|
||||
in with no changes.
|
||||
|
||||
### `screen.dipToScreenPoint(point)` _Windows_ _Linux_
|
||||
|
||||
* `point` [Point](structures/point.md)
|
||||
|
||||
@@ -142,6 +155,8 @@ Returns [`Point`](structures/point.md)
|
||||
Converts a screen DIP point to a screen physical point.
|
||||
The DPI scale is performed relative to the display containing the DIP point.
|
||||
|
||||
Not currently supported on Wayland.
|
||||
|
||||
### `screen.screenToDipRect(window, rect)` _Windows_
|
||||
|
||||
* `window` [BrowserWindow](browser-window.md) | null
|
||||
|
||||
@@ -762,7 +762,8 @@ Preconnects the given number of sockets to an origin.
|
||||
|
||||
Returns `Promise<void>` - Resolves when all connections are closed.
|
||||
|
||||
**Note:** It will terminate / fail all requests currently in flight.
|
||||
> [!NOTE]
|
||||
> It will terminate / fail all requests currently in flight.
|
||||
|
||||
#### `ses.fetch(input[, init])`
|
||||
|
||||
@@ -1305,8 +1306,9 @@ Initiates a download of the resource at `url`.
|
||||
The API will generate a [DownloadItem](download-item.md) that can be accessed
|
||||
with the [will-download](#event-will-download) event.
|
||||
|
||||
**Note:** This does not perform any security checks that relate to a page's origin,
|
||||
unlike [`webContents.downloadURL`](web-contents.md#contentsdownloadurlurl-options).
|
||||
> [!NOTE]
|
||||
> This does not perform any security checks that relate to a page's origin,
|
||||
> unlike [`webContents.downloadURL`](web-contents.md#contentsdownloadurlurl-options).
|
||||
|
||||
#### `ses.createInterruptedDownload(options)`
|
||||
|
||||
@@ -1434,7 +1436,8 @@ The built in spellchecker does not automatically detect what language a user is
|
||||
spell checker to correctly check their words you must call this API with an array of language codes. You can
|
||||
get the list of supported language codes with the `ses.availableSpellCheckerLanguages` property.
|
||||
|
||||
**Note:** On macOS the OS spellchecker is used and will detect your language automatically. This API is a no-op on macOS.
|
||||
> [!NOTE]
|
||||
> On macOS, the OS spellchecker is used and will detect your language automatically. This API is a no-op on macOS.
|
||||
|
||||
#### `ses.getSpellCheckerLanguages()`
|
||||
|
||||
@@ -1442,7 +1445,8 @@ Returns `string[]` - An array of language codes the spellchecker is enabled for.
|
||||
will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this
|
||||
setting with the current OS locale. This setting is persisted across restarts.
|
||||
|
||||
**Note:** On macOS the OS spellchecker is used and has its own list of languages. On macOS, this API will return whichever languages have been configured by the OS.
|
||||
> [!NOTE]
|
||||
> On macOS, the OS spellchecker is used and has its own list of languages. On macOS, this API will return whichever languages have been configured by the OS.
|
||||
|
||||
#### `ses.setSpellCheckerDictionaryDownloadURL(url)`
|
||||
|
||||
@@ -1460,7 +1464,8 @@ If the files present in `hunspell_dictionaries.zip` are available at `https://ex
|
||||
then you should call this api with `ses.setSpellCheckerDictionaryDownloadURL('https://example.com/dictionaries/')`. Please
|
||||
note the trailing slash. The URL to the dictionaries is formed as `${url}${filename}`.
|
||||
|
||||
**Note:** On macOS the OS spellchecker is used and therefore we do not download any dictionary files. This API is a no-op on macOS.
|
||||
> [!NOTE]
|
||||
> On macOS, the OS spellchecker is used and therefore we do not download any dictionary files. This API is a no-op on macOS.
|
||||
|
||||
#### `ses.listWordsInSpellCheckerDictionary()`
|
||||
|
||||
@@ -1474,7 +1479,8 @@ Resolves when the full dictionary is loaded from disk.
|
||||
Returns `boolean` - Whether the word was successfully written to the custom dictionary. This API
|
||||
will not work on non-persistent (in-memory) sessions.
|
||||
|
||||
**Note:** On macOS and Windows 10 this word will be written to the OS custom dictionary as well
|
||||
> [!NOTE]
|
||||
> On macOS and Windows, this word will be written to the OS custom dictionary as well.
|
||||
|
||||
#### `ses.removeWordFromSpellCheckerDictionary(word)`
|
||||
|
||||
@@ -1483,7 +1489,8 @@ will not work on non-persistent (in-memory) sessions.
|
||||
Returns `boolean` - Whether the word was successfully removed from the custom dictionary. This API
|
||||
will not work on non-persistent (in-memory) sessions.
|
||||
|
||||
**Note:** On macOS and Windows 10 this word will be removed from the OS custom dictionary as well
|
||||
> [!NOTE]
|
||||
> On macOS and Windows, this word will be removed from the OS custom dictionary as well.
|
||||
|
||||
#### `ses.loadExtension(path[, options])` _Deprecated_
|
||||
|
||||
@@ -1526,11 +1533,13 @@ app.whenReady().then(async () => {
|
||||
|
||||
This API does not support loading packed (.crx) extensions.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
**Note:** Loading extensions into in-memory (non-persistent) sessions is not
|
||||
supported and will throw an error.
|
||||
> [!NOTE]
|
||||
> Loading extensions into in-memory (non-persistent) sessions is not
|
||||
> supported and will throw an error.
|
||||
|
||||
**Deprecated:** Use the new `ses.extensions.loadExtension` API.
|
||||
|
||||
@@ -1540,8 +1549,9 @@ supported and will throw an error.
|
||||
|
||||
Unloads an extension.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
**Deprecated:** Use the new `ses.extensions.removeExtension` API.
|
||||
|
||||
@@ -1551,8 +1561,9 @@ is emitted.
|
||||
|
||||
Returns `Extension | null` - The loaded extension with the given ID.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
**Deprecated:** Use the new `ses.extensions.getExtension` API.
|
||||
|
||||
@@ -1560,8 +1571,9 @@ is emitted.
|
||||
|
||||
Returns `Extension[]` - A list of all loaded extensions.
|
||||
|
||||
**Note:** This API cannot be called before the `ready` event of the `app` module
|
||||
is emitted.
|
||||
> [!NOTE]
|
||||
> This API cannot be called before the `ready` event of the `app` module
|
||||
> is emitted.
|
||||
|
||||
**Deprecated:** Use the new `ses.extensions.getAllExtensions` API.
|
||||
|
||||
@@ -1599,9 +1611,11 @@ Clears various different types of data.
|
||||
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`.
|
||||
> [!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`.
|
||||
|
||||
**Note:** Clearing cache data will also clear the shared dictionary cache. This means that any dictionaries used for compression may be reloaded after clearing the cache. If you wish to clear the shared dictionary cache but leave other cached data intact, you may want to use the `clearSharedDictionaryCache` method.
|
||||
> [!NOTE]
|
||||
> Clearing cache data will also clear the shared dictionary cache. This means that any dictionaries used for compression may be reloaded after clearing the cache. If you wish to clear the shared dictionary cache but leave other cached data intact, you may want to use the `clearSharedDictionaryCache` method.
|
||||
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface][browsing-data-remover].
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ const { shell } = require('electron')
|
||||
shell.openExternal('https://github.com')
|
||||
```
|
||||
|
||||
**Note:** While the `shell` module can be used in the renderer process, it will not function in a sandboxed renderer.
|
||||
> [!WARNING]
|
||||
> While the `shell` module can be used in the renderer process, it will not function in a sandboxed renderer.
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -15,11 +15,13 @@
|
||||
* `items` JumpListItem[] (optional) - Array of [`JumpListItem`](jump-list-item.md) objects if `type` is `tasks` or
|
||||
`custom`, otherwise it should be omitted.
|
||||
|
||||
**Note:** If a `JumpListCategory` object has neither the `type` nor the `name`
|
||||
property set then its `type` is assumed to be `tasks`. If the `name` property
|
||||
is set but the `type` property is omitted then the `type` is assumed to be
|
||||
`custom`.
|
||||
> [!NOTE]
|
||||
> If a `JumpListCategory` object has neither the `type` nor the `name`
|
||||
> property set then its `type` is assumed to be `tasks`. If the `name` property
|
||||
> is set but the `type` property is omitted then the `type` is assumed to be
|
||||
> `custom`.
|
||||
|
||||
**Note:** The maximum length of a Jump List item's `description` property is
|
||||
260 characters. Beyond this limit, the item will not be added to the Jump
|
||||
List, nor will it be displayed.
|
||||
> [!NOTE]
|
||||
> The maximum length of a Jump List item's `description` property is
|
||||
> 260 characters. Beyond this limit, the item will not be added to the Jump
|
||||
> List, nor will it be displayed.
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* `x` number
|
||||
* `y` number
|
||||
|
||||
**Note:** Both `x` and `y` must be whole integers, when providing a point object
|
||||
as input to an Electron API we will automatically round your `x` and `y` values
|
||||
to the nearest whole integer.
|
||||
> [!NOTE]
|
||||
> Both `x` and `y` must be whole integers, when providing a point object
|
||||
> as input to an Electron API we will automatically round your `x` and `y` values
|
||||
> to the nearest whole integer.
|
||||
|
||||
@@ -4,8 +4,9 @@
|
||||
> from Chromium at the space indicated by the proxy. By default, this proxy is added
|
||||
> to each TouchBar at the end of the input. For more information, see the AppKit docs on
|
||||
> [NSTouchBarItemIdentifierOtherItemsProxy](https://developer.apple.com/documentation/appkit/nstouchbaritemidentifierotheritemsproxy)
|
||||
>
|
||||
> Note: Only one instance of this class can be added per TouchBar.
|
||||
|
||||
> [!NOTE]
|
||||
> Only one instance of this class can be added per TouchBar.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)<br />
|
||||
_This class is not exported from the `'electron'` module. It is only available as a return value of other methods in the Electron API._
|
||||
|
||||
@@ -15,12 +15,14 @@ Process: [Main](../glossary.md#main-process)
|
||||
Creates a new touch bar with the specified items. Use
|
||||
`BrowserWindow.setTouchBar` to add the `TouchBar` to a window.
|
||||
|
||||
**Note:** The TouchBar API is currently experimental and may change or be
|
||||
removed in future Electron releases.
|
||||
> [!NOTE]
|
||||
> The TouchBar API is currently experimental and may change or be
|
||||
> removed in future Electron releases.
|
||||
|
||||
**Tip:** If you don't have a MacBook with Touch Bar, you can use
|
||||
[Touch Bar Simulator](https://github.com/sindresorhus/touch-bar-simulator)
|
||||
to test Touch Bar usage in your app.
|
||||
> [!TIP]
|
||||
> If you don't have a MacBook with Touch Bar, you can use
|
||||
> [Touch Bar Simulator](https://github.com/sindresorhus/touch-bar-simulator)
|
||||
> to test Touch Bar usage in your app.
|
||||
|
||||
### Static Properties
|
||||
|
||||
|
||||
@@ -176,7 +176,8 @@ Returns:
|
||||
|
||||
Emitted when the mouse is released from clicking the tray icon.
|
||||
|
||||
Note: This will not be emitted if you have set a context menu for your Tray using `tray.setContextMenu`, as a result of macOS-level constraints.
|
||||
> [!NOTE]
|
||||
> This will not be emitted if you have set a context menu for your Tray using `tray.setContextMenu`, as a result of macOS-level constraints.
|
||||
|
||||
#### Event: 'mouse-down' _macOS_
|
||||
|
||||
|
||||
@@ -44,7 +44,8 @@ Process: [Main](../glossary.md#main-process)<br />
|
||||
|
||||
Returns [`UtilityProcess`](utility-process.md#class-utilityprocess)
|
||||
|
||||
**Note:** `utilityProcess.fork` can only be called after the `ready` event has been emitted on `App`.
|
||||
> [!NOTE]
|
||||
> `utilityProcess.fork` can only be called after the `ready` event has been emitted on `App`.
|
||||
|
||||
## Class: UtilityProcess
|
||||
|
||||
@@ -108,7 +109,8 @@ child.on('exit', () => {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** You can use the `pid` to determine if the process is currently running.
|
||||
> [!NOTE]
|
||||
> You can use the `pid` to determine if the process is currently running.
|
||||
|
||||
#### `child.stdout`
|
||||
|
||||
|
||||
@@ -94,13 +94,15 @@ Examples of valid `color` values:
|
||||
* Similar to CSS Color Module Level 3 keywords, but case-sensitive.
|
||||
* e.g. `blueviolet` or `red`
|
||||
|
||||
**Note:** Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or `RGB`.
|
||||
> [!NOTE]
|
||||
> Hex format with alpha takes `AARRGGBB` or `ARGB`, _not_ `RRGGBBAA` or `RGB`.
|
||||
|
||||
#### `view.setBorderRadius(radius)`
|
||||
|
||||
* `radius` Integer - Border radius size in pixels.
|
||||
|
||||
**Note:** The area cutout of the view's border still captures clicks.
|
||||
> [!NOTE]
|
||||
> The area cutout of the view's border still captures clicks.
|
||||
|
||||
#### `view.setVisible(visible)`
|
||||
|
||||
|
||||
@@ -463,7 +463,8 @@ win.webContents.on('will-prevent-unload', (event) => {
|
||||
})
|
||||
```
|
||||
|
||||
**Note:** This will be emitted for `BrowserViews` but will _not_ be respected - this is because we have chosen not to tie the `BrowserView` lifecycle to its owning BrowserWindow should one exist per the [specification](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).
|
||||
> [!NOTE]
|
||||
> This will be emitted for `BrowserViews` but will _not_ be respected - this is because we have chosen not to tie the `BrowserView` lifecycle to its owning BrowserWindow should one exist per the [specification](https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event).
|
||||
|
||||
#### Event: 'render-process-gone'
|
||||
|
||||
@@ -1491,7 +1492,8 @@ increment above or below represents zooming 20% larger or smaller to default
|
||||
limits of 300% and 50% of original size, respectively. The formula for this is
|
||||
`scale := 1.2 ^ level`.
|
||||
|
||||
> **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> [!NOTE]
|
||||
> The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> zoom level for a specific domain propagates across all instances of windows with
|
||||
> the same domain. Differentiating the window URLs will make zoom work per-window.
|
||||
|
||||
@@ -1508,7 +1510,8 @@ Returns `Promise<void>`
|
||||
|
||||
Sets the maximum and minimum pinch-to-zoom level.
|
||||
|
||||
> **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, call:
|
||||
> [!NOTE]
|
||||
> Visual zoom is disabled by default in Electron. To re-enable it, call:
|
||||
>
|
||||
> ```js
|
||||
> const win = new BrowserWindow()
|
||||
@@ -2076,7 +2079,9 @@ Disable device emulation enabled by `webContents.enableDeviceEmulation`.
|
||||
* `inputEvent` [MouseInputEvent](structures/mouse-input-event.md) | [MouseWheelInputEvent](structures/mouse-wheel-input-event.md) | [KeyboardInputEvent](structures/keyboard-input-event.md)
|
||||
|
||||
Sends an input `event` to the page.
|
||||
**Note:** The [`BrowserWindow`](browser-window.md) containing the contents needs to be focused for
|
||||
|
||||
> [!NOTE]
|
||||
> The [`BrowserWindow`](browser-window.md) containing the contents needs to be focused for
|
||||
`sendInputEvent()` to work.
|
||||
|
||||
#### `contents.beginFrameSubscription([onlyDirty ,]callback)`
|
||||
@@ -2218,7 +2223,9 @@ By default this value is `{ min: 0, max: 0 }` , which would apply no restriction
|
||||
* `max` Integer - The maximum UDP port number that WebRTC should use.
|
||||
|
||||
Setting the WebRTC UDP Port Range allows you to restrict the udp port range used by WebRTC. By default the port range is unrestricted.
|
||||
**Note:** To reset to an unrestricted port range this value should be set to `{ min: 0, max: 0 }`.
|
||||
|
||||
> [!NOTE]
|
||||
> To reset to an unrestricted port range this value should be set to `{ min: 0, max: 0 }`.
|
||||
|
||||
#### `contents.getMediaSourceId(requestWebContents)`
|
||||
|
||||
@@ -2364,8 +2371,9 @@ A [`WebContents`](web-contents.md) instance that might own this `WebContents`.
|
||||
|
||||
A `WebContents | null` property that represents the of DevTools `WebContents` associated with a given `WebContents`.
|
||||
|
||||
**Note:** Users should never store this object because it may become `null`
|
||||
when the DevTools has been closed.
|
||||
> [!NOTE]
|
||||
> Users should never store this object because it may become `null`
|
||||
> when the DevTools has been closed.
|
||||
|
||||
#### `contents.debugger` _Readonly_
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ Changes the zoom level to the specified level. The original size is 0 and each
|
||||
increment above or below represents zooming 20% larger or smaller to default
|
||||
limits of 300% and 50% of original size, respectively.
|
||||
|
||||
> **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> [!NOTE]
|
||||
> The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> zoom level for a specific domain propagates across all instances of windows with
|
||||
> the same domain. Differentiating the window URLs will make zoom work per-window.
|
||||
|
||||
@@ -56,13 +57,15 @@ Returns `number` - The current zoom level.
|
||||
|
||||
Sets the maximum and minimum pinch-to-zoom level.
|
||||
|
||||
> **NOTE**: Visual zoom is disabled by default in Electron. To re-enable it, call:
|
||||
> [!NOTE]
|
||||
> Visual zoom is disabled by default in Electron. To re-enable it, call:
|
||||
>
|
||||
> ```js
|
||||
> webFrame.setVisualZoomLevelLimits(1, 3)
|
||||
> ```
|
||||
|
||||
> **NOTE**: Visual zoom only applies to pinch-to-zoom behavior. Cmd+/-/0 zoom shortcuts are
|
||||
> [!NOTE]
|
||||
> Visual zoom only applies to pinch-to-zoom behavior. Cmd+/-/0 zoom shortcuts are
|
||||
> controlled by the 'zoomIn', 'zoomOut', and 'resetZoom' MenuItem roles in the application
|
||||
> Menu. To disable shortcuts, manually [define the Menu](./menu.md#examples) and omit zoom roles
|
||||
> from the definition.
|
||||
@@ -189,7 +192,9 @@ dispatch errors of isolated worlds to foreign worlds.
|
||||
* `name` string (optional) - Name for isolated world. Useful in devtools.
|
||||
|
||||
Set the security origin, content security policy and name of the isolated world.
|
||||
Note: If the `csp` is specified, then the `securityOrigin` also has to be specified.
|
||||
|
||||
> [!NOTE]
|
||||
> If the `csp` is specified, then the `securityOrigin` also has to be specified.
|
||||
|
||||
### `webFrame.getResourceUsage()`
|
||||
|
||||
|
||||
@@ -30,8 +30,10 @@ rendered.
|
||||
Unlike an `iframe`, the `webview` runs in a separate process than your
|
||||
app. It doesn't have the same permissions as your web page and all interactions
|
||||
between your app and embedded content will be asynchronous. This keeps your app
|
||||
safe from the embedded content. **Note:** Most methods called on the
|
||||
webview from the host page require a synchronous call to the main process.
|
||||
safe from the embedded content.
|
||||
|
||||
> [!NOTE]
|
||||
> Most methods called on the webview from the host page require a synchronous call to the main process.
|
||||
|
||||
## Example
|
||||
|
||||
@@ -252,7 +254,8 @@ The full list of supported feature strings can be found in the
|
||||
|
||||
The `webview` tag has the following methods:
|
||||
|
||||
**Note:** The webview element must be loaded before using the methods.
|
||||
> [!NOTE]
|
||||
> The webview element must be loaded before using the methods.
|
||||
|
||||
**Example**
|
||||
|
||||
@@ -679,7 +682,8 @@ increment above or below represents zooming 20% larger or smaller to default
|
||||
limits of 300% and 50% of original size, respectively. The formula for this is
|
||||
`scale := 1.2 ^ level`.
|
||||
|
||||
> **NOTE**: The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> [!NOTE]
|
||||
> The zoom policy at the Chromium level is same-origin, meaning that the
|
||||
> zoom level for a specific domain propagates across all instances of windows with
|
||||
> the same domain. Differentiating the window URLs will make zoom work per-window.
|
||||
|
||||
|
||||
@@ -141,7 +141,7 @@ On Linux, the required portal version for file dialogs has been reverted
|
||||
to 3 from 4. Using the `defaultPath` option of the Dialog API is not
|
||||
supported when using portal file chooser dialogs unless the portal
|
||||
backend is version 4 or higher. The `--xdg-portal-required-version`
|
||||
[command-line switch](/api/command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
[command-line switch](api/command-line-switches.md#--xdg-portal-required-versionversion)
|
||||
can be used to force a required version for your application.
|
||||
See [#44426](https://github.com/electron/electron/pull/44426) for more details.
|
||||
|
||||
|
||||
@@ -155,7 +155,8 @@ $ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"
|
||||
$ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")"
|
||||
```
|
||||
|
||||
**Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
|
||||
> [!NOTE]
|
||||
> This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
|
||||
|
||||
Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`.
|
||||
|
||||
|
||||
@@ -39,8 +39,9 @@ Building Electron is done entirely with command-line scripts and cannot be done
|
||||
with Visual Studio. You can develop Electron with any editor but support for
|
||||
building with Visual Studio will come in the future.
|
||||
|
||||
**Note:** Even though Visual Studio is not used for building, it's still
|
||||
**required** because we need the build toolchains it provides.
|
||||
> [!NOTE]
|
||||
> Even though Visual Studio is not used for building, it's still
|
||||
> **required** because we need the build toolchains it provides.
|
||||
|
||||
## Exclude source tree from Windows Security
|
||||
|
||||
|
||||
@@ -148,7 +148,8 @@ In your [`shell/common/node_bindings.cc`](https://github.com/electron/electron/b
|
||||
V(electron_browser_{api_name})
|
||||
```
|
||||
|
||||
> Note: More technical details on how Node links with Electron can be found on [our blog](https://www.electronjs.org/blog/electron-internals-using-node-as-a-library#link-node-with-electron).
|
||||
> [!NOTE]
|
||||
> More technical details on how Node links with Electron can be found on [our blog](https://www.electronjs.org/blog/electron-internals-using-node-as-a-library#link-node-with-electron).
|
||||
|
||||
## Expose your API to TypeScript
|
||||
|
||||
|
||||
@@ -49,7 +49,8 @@ $ git commit
|
||||
$ ../../electron/script/git-export-patches -o ../../electron/patches/node
|
||||
```
|
||||
|
||||
> **NOTE**: `git-export-patches` ignores any uncommitted files, so you must create a commit if you want your changes to be exported. The subject line of the commit message will be used to derive the patch file name, and the body of the commit message should include the reason for the patch's existence.
|
||||
> [!NOTE]
|
||||
> `git-export-patches` ignores any uncommitted files, so you must create a commit if you want your changes to be exported. The subject line of the commit message will be used to derive the patch file name, and the body of the commit message should include the reason for the patch's existence.
|
||||
|
||||
Re-exporting patches will sometimes cause shasums in unrelated patches to change. This is generally harmless and can be ignored (but go ahead and add those changes to your PR, it'll stop them from showing up for other people).
|
||||
|
||||
|
||||
@@ -133,9 +133,10 @@ function handleKeyPress (event) {
|
||||
window.addEventListener('keyup', handleKeyPress, true)
|
||||
```
|
||||
|
||||
> Note: the third parameter `true` indicates that the listener will always receive
|
||||
key presses before other listeners so they can't have `stopPropagation()`
|
||||
called on them.
|
||||
> [!NOTE]
|
||||
> The third parameter `true` indicates that the listener will always receive
|
||||
> key presses before other listeners so they can't have `stopPropagation()`
|
||||
> called on them.
|
||||
|
||||
#### Intercepting events in the main process
|
||||
|
||||
|
||||
@@ -20,7 +20,8 @@ const win = new BrowserWindow({
|
||||
The `nodeIntegrationInWorker` can be used independent of `nodeIntegration`, but
|
||||
`sandbox` must not be set to `true`.
|
||||
|
||||
**Note:** This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
|
||||
> [!NOTE]
|
||||
> This option is not available in [`SharedWorker`s](https://developer.mozilla.org/en-US/docs/Web/API/SharedWorker) or [`Service Worker`s](https://developer.mozilla.org/en-US/docs/Web/API/ServiceWorker) owing to incompatibilities in sandboxing policies.
|
||||
|
||||
## Available APIs
|
||||
|
||||
|
||||
@@ -83,4 +83,5 @@ After launching the Electron application, you should see the notification:
|
||||
|
||||

|
||||
|
||||
> Note: If you need to communicate the connection status to the main process, use the [IPC renderer](../api/ipc-renderer.md) API.
|
||||
> [!NOTE]
|
||||
> If you need to communicate the connection status to the main process, use the [IPC renderer](../api/ipc-renderer.md) API.
|
||||
|
||||
@@ -64,7 +64,8 @@ const contents = win.webContents
|
||||
console.log(contents)
|
||||
```
|
||||
|
||||
> Note: A renderer process is also created for [web embeds][web-embed] such as the
|
||||
> [!NOTE]
|
||||
> A renderer process is also created for [web embeds][web-embed] such as the
|
||||
> `BrowserView` module. The `webContents` object is also accessible for embedded
|
||||
> web content.
|
||||
|
||||
|
||||
@@ -14,8 +14,9 @@ dependency, you should be able to access the REPL with the following command:
|
||||
./node_modules/.bin/electron --interactive
|
||||
```
|
||||
|
||||
**Note:** `electron --interactive` is not available on Windows
|
||||
(see [electron/electron#5776](https://github.com/electron/electron/pull/5776) for more details).
|
||||
> [!NOTE]
|
||||
> `electron --interactive` is not available on Windows
|
||||
> (see [electron/electron#5776](https://github.com/electron/electron/pull/5776) for more details).
|
||||
|
||||
## Renderer process
|
||||
|
||||
|
||||
@@ -19,12 +19,12 @@ and only allow the capabilities you want to support.
|
||||
|
||||
### WebViews
|
||||
|
||||
> Important Note:
|
||||
[we do not recommend you to use WebViews](../api/webview-tag.md#warning),
|
||||
as this tag undergoes dramatic architectural changes that may affect stability
|
||||
of your application. Consider switching to alternatives, like `iframe` and
|
||||
Electron's [`WebContentsView`](../api/web-contents-view.md), or an architecture
|
||||
that avoids embedded content by design.
|
||||
> [!IMPORTANT]
|
||||
> [We do not recommend you to use WebViews](../api/webview-tag.md#warning),
|
||||
> as this tag undergoes dramatic architectural changes that may affect stability
|
||||
> of your application. Consider switching to alternatives, like `iframe` and
|
||||
> Electron's [`WebContentsView`](../api/web-contents-view.md), or an architecture
|
||||
> that avoids embedded content by design.
|
||||
|
||||
[WebViews](../api/webview-tag.md) are based on Chromium's WebViews and are not
|
||||
explicitly supported by Electron. We do not guarantee that the WebView API will
|
||||
|
||||
@@ -35,6 +35,7 @@ filenames = {
|
||||
"shell/browser/relauncher_linux.cc",
|
||||
"shell/browser/ui/electron_desktop_window_tree_host_linux.cc",
|
||||
"shell/browser/ui/file_dialog_linux.cc",
|
||||
"shell/browser/ui/file_dialog_linux_portal.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.h",
|
||||
"shell/browser/ui/gtk/menu_util.cc",
|
||||
|
||||
@@ -1421,7 +1421,6 @@ libcxx_headers = [
|
||||
"//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",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_convertible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_destructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_null_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_object.h",
|
||||
|
||||
@@ -26,7 +26,12 @@ const keysOfTypeNumberCompileTimeCheck: { [K in IntegerBrowserWindowOptionKeys]
|
||||
};
|
||||
// Note `top` / `left` are special cases from the browser which we later convert
|
||||
// to y / x.
|
||||
const keysOfTypeNumber = new Set(['top', 'left', ...Object.keys(keysOfTypeNumberCompileTimeCheck)]);
|
||||
// NOTE(@mlaurencin) `innerWidth` / `innerHeight` are also special cases. The spec
|
||||
// states that `width` and `height` represent the window content size and are equivalent
|
||||
// to `innerWidth` / `innerHeight`. However, our implementation currently incorrectly maps
|
||||
// `width` and `height` to `outerWidth` and `outerHeight`, or the size of the window
|
||||
// with all border and related window chrome.
|
||||
const keysOfTypeNumber = new Set(['top', 'left', 'innerWidth', 'innerHeight', ...Object.keys(keysOfTypeNumberCompileTimeCheck)]);
|
||||
|
||||
/**
|
||||
* Note that we only allow "0" and "1" boolean conversion when the type is known
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"@electron/docs-parser": "^2.0.0",
|
||||
"@electron/fiddle-core": "^1.3.4",
|
||||
"@electron/github-app-auth": "^2.2.1",
|
||||
"@electron/lint-roller": "^2.4.0",
|
||||
"@electron/lint-roller": "^3.1.1",
|
||||
"@electron/typescript-definitions": "^9.1.2",
|
||||
"@octokit/rest": "^20.0.2",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
@@ -40,7 +40,7 @@
|
||||
"got": "^11.8.5",
|
||||
"husky": "^8.0.1",
|
||||
"lint-staged": "^10.2.11",
|
||||
"markdownlint-cli2": "^0.13.0",
|
||||
"markdownlint-cli2": "^0.18.0",
|
||||
"minimist": "^1.2.8",
|
||||
"null-loader": "^4.0.1",
|
||||
"pre-flight": "^2.0.0",
|
||||
|
||||
@@ -4,7 +4,6 @@ blink_local_frame.patch
|
||||
can_create_window.patch
|
||||
disable_hidden.patch
|
||||
dom_storage_limits.patch
|
||||
render_widget_host_view_base.patch
|
||||
render_widget_host_view_mac.patch
|
||||
webview_cross_drag.patch
|
||||
gin_enable_disable_v8_platform.patch
|
||||
@@ -120,7 +119,6 @@ build_run_reclient_cfg_generator_after_chrome.patch
|
||||
fix_getcursorscreenpoint_wrongly_returns_0_0.patch
|
||||
fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch
|
||||
refactor_expose_file_system_access_blocklist.patch
|
||||
partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
|
||||
feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
|
||||
fix_font_face_resolution_when_renderer_is_blocked.patch
|
||||
feat_enable_passing_exit_code_on_service_process_crash.patch
|
||||
@@ -130,7 +128,6 @@ build_allow_electron_mojom_interfaces_to_depend_on_blink.patch
|
||||
osr_shared_texture_remove_keyed_mutex_on_win_dxgi.patch
|
||||
feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
|
||||
chore_partial_revert_of.patch
|
||||
fix_software_compositing_infinite_loop.patch
|
||||
fix_adjust_headless_mode_handling_in_native_widget.patch
|
||||
refactor_unfilter_unresponsive_events.patch
|
||||
build_disable_thin_lto_mac.patch
|
||||
@@ -144,6 +141,5 @@ feat_separate_content_settings_callback_for_sync_and_async_clipboard.patch
|
||||
fix_win32_synchronous_spellcheck.patch
|
||||
fix_enable_wrap_iter_in_string_view_and_array.patch
|
||||
fix_linter_error.patch
|
||||
revert_enable_crel_for_arm32_targets.patch
|
||||
chore_grandfather_in_electron_views_and_delegates.patch
|
||||
refactor_patch_electron_permissiontypes_into_blink.patch
|
||||
|
||||
@@ -9,7 +9,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
||||
2. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f1d1c8d61 100644
|
||||
index 5ad9332dd27ceda7d67cd3f571b12218a4415a40..ffe083836c39fb60b4bff1f9fbdd6cebb7fa9d1d 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -20,7 +20,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/types/cxx23_to_underlying.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -160,6 +161,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
|
||||
@@ -164,6 +165,11 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
|
||||
#endif
|
||||
|
||||
if (key_string.empty()) {
|
||||
@@ -32,7 +32,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
|
||||
#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
|
||||
@@ -186,6 +192,10 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
|
||||
@@ -190,6 +196,10 @@ std::u16string Accelerator::GetKeyCodeStringForShortcut() const {
|
||||
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
|
||||
}
|
||||
#endif
|
||||
@@ -43,7 +43,7 @@ index 7eb75d87dd3ed03fc6da738a8b397d4d52f5b5ce..8db9f17c2bdcf5378f9a3f3165956c8f
|
||||
}
|
||||
|
||||
return key_string;
|
||||
@@ -346,7 +356,7 @@ std::vector<std::u16string> Accelerator::GetLongFormModifiers() const {
|
||||
@@ -350,7 +360,7 @@ std::vector<std::u16string> Accelerator::GetLongFormModifiers() const {
|
||||
modifiers.push_back(l10n_util::GetStringUTF16(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 f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd4465860f 100644
|
||||
index 73be6273b320574c22fd12e07b93dc3cffaa1be9..58a34cc5b583a7111decf14b755afbb82ba94765 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -254,6 +254,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -268,6 +268,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index f78e6732f4a154b6a479bcfcdb237f0679a7fde3..c95b699fe2d37421ae589a14d51c5ffd
|
||||
// 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
|
||||
@@ -364,7 +368,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -377,7 +381,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
#endif
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ 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 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb354ea028 100644
|
||||
index db655a7b52eacb74f2a8637db36abd87f6b86792..8014cb08e2090a12ea8b9e92cb8f93c96921d400 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -149,6 +149,8 @@ class CONTENT_EXPORT RenderFrameObserver
|
||||
@@ -23,10 +23,10 @@ index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index e3f9f9406f51d4d4cb48fd35d33ee3d694933038..6bcbbd6f746e00344e78447ebdaf59edc80a2b79 100644
|
||||
index 3fa43adedd6ff0258edd195bde1e68977cff3a7c..7fe443aad2ad6207aa46daddea46baa3eb998bc3 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4810,6 +4810,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4808,6 +4808,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index e3f9f9406f51d4d4cb48fd35d33ee3d694933038..6bcbbd6f746e00344e78447ebdaf59ed
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index a7383e4a5ccb8ca1de10bc3efb3043f1dbbf2f6f..41075015aa2dd347c9847072dd76f9cea9ad2d94 100644
|
||||
index 6a9e696762cc0276f10971933363257591d12bfe..3cd045ed24c47465788c40cc68b050be11ed6f97 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -652,6 +652,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -653,6 +653,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;
|
||||
@@ -92,7 +92,7 @@ index e52a535450964b0938b66f7506225fda0cde04a2..841e9b36df4c32040d2b3c71514266fc
|
||||
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 479dd8a7294ca6f0abb72350cc1a6c61e09c7c27..45226050aea1036f2c3a2fc15cabee893d12b1a7 100644
|
||||
index 96fc9e0646f943e86e927de2686a8da94625ae6c..30e9721cccd285a347f35e2d7a539547ac41247c 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
|
||||
@@ -295,6 +295,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
|
||||
@@ -10,7 +10,7 @@ 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 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4590c16b0 100644
|
||||
index 476b993aa130a1e7d2bc61993b27044d674425bc..3c5dfca61be10f2fd4126a8ba5bcfa49c4515aa4 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -48,6 +48,7 @@
|
||||
@@ -21,7 +21,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/ax_updates_and_events.h"
|
||||
#include "ui/accessibility/platform/ax_platform_node.h"
|
||||
@@ -167,7 +168,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
@@ -169,7 +170,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
rvh->GetRoutingID(), accessibility_mode);
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
|
||||
base::Value::Dict target_data;
|
||||
target_data.Set(kSessionIdField, browser->session_id().id());
|
||||
@@ -190,7 +191,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -193,7 +194,7 @@ void HandleAccessibilityRequestCallback(
|
||||
auto& browser_accessibility_state =
|
||||
*content::BrowserAccessibilityState::GetInstance();
|
||||
base::Value::Dict data;
|
||||
@@ -39,8 +39,8 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
ui::AXMode mode = browser_accessibility_state.GetAccessibilityMode();
|
||||
bool native = mode.has_mode(ui::AXMode::kNativeAPIs);
|
||||
bool web = mode.has_mode(ui::AXMode::kWebContents);
|
||||
@@ -214,7 +215,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPDFPrinting, pdf_printing);
|
||||
@@ -246,7 +247,7 @@ void HandleAccessibilityRequestCallback(
|
||||
initial_process_mode.has_mode(ui::AXMode::kHTML)));
|
||||
|
||||
std::string pref_api_type =
|
||||
- pref->GetString(prefs::kShownAccessibilityApiType);
|
||||
@@ -48,7 +48,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
bool pref_api_type_supported = false;
|
||||
|
||||
std::vector<ui::AXApiType::Type> supported_api_types =
|
||||
@@ -282,11 +283,11 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -314,11 +315,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(page_list));
|
||||
|
||||
base::Value::List browser_list;
|
||||
@@ -62,7 +62,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
std::string json_string;
|
||||
@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
@@ -792,7 +793,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
const std::string value = CheckJSValue(data.FindString(kValueField));
|
||||
|
||||
if (string_name == kApiTypeField) {
|
||||
@@ -72,7 +72,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
pref->SetString(prefs::kShownAccessibilityApiType, value);
|
||||
}
|
||||
}
|
||||
@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
@@ -846,7 +848,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -82,7 +82,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
std::string accessibility_contents =
|
||||
@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -873,6 +876,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -90,7 +90,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
base::Value::Dict result = BuildTargetDescriptor(browser);
|
||||
@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -885,6 +889,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +98,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
base::Value::Dict result;
|
||||
@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
@@ -928,11 +933,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
}
|
||||
|
||||
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
|
||||
@@ -115,7 +115,7 @@ index 09027b5c273a209519a1c9268c604b3cf1ca0d3c..00511a4558dbc907f752b4c602cc97b4
|
||||
// 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()) {
|
||||
@@ -972,8 +979,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
@@ -1002,8 +1009,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
|
||||
@@ -6,10 +6,10 @@ 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 f9b27264f7e3e1f8de6f088ccb78e4a4693c5e93..85aebec5028fd6b324a1f1d9416fbf99c150e09a 100644
|
||||
index b9e7ef002a8d7842b4e97dbcaa59aa289ba652a1..81bd39f47d8411da53824d47e053b39f8fa24721 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -167,6 +167,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
(network::mojom::AttributionSupport support),
|
||||
(override));
|
||||
|
||||
@@ -23,10 +23,10 @@ index f9b27264f7e3e1f8de6f088ccb78e4a4693c5e93..85aebec5028fd6b324a1f1d9416fbf99
|
||||
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 00b1dc2ab7661d9ab76d0c6787bfe406327039ad..22c2a68428ed881b63e4458d17d5ff542cefe559 100644
|
||||
index 1654ffbb2184cc1db6c0b862cc745ba2e467b740..567f5279d943a58e451a78fb506606cf17a0ef79 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -763,6 +763,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -761,6 +761,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ index 00b1dc2ab7661d9ab76d0c6787bfe406327039ad..22c2a68428ed881b63e4458d17d5ff54
|
||||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index 56e52f079d1ad7c7a22764b976f0c8b2cc48dff2..1231fe522ad103e94d3c30ad7d5e5d23df9b3554 100644
|
||||
index 6eade0d29bc266a6a8928e768c923687bd12e656..53465bc76a22ae97ba4602d02a41f52e194af68b 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -51,7 +51,7 @@ index 56e52f079d1ad7c7a22764b976f0c8b2cc48dff2..1231fe522ad103e94d3c30ad7d5e5d23
|
||||
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 d719b546b8c3c59003698b26dead065da7d76341..95a52f1cc2024e4a9cd694429d5304a5860a1c1e 100644
|
||||
index a13dd521b7263c66c94dac3d3caf6ebbed92d229..ce9295ee37ad58aab9f18f80daa72f91d5e0c27e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -80,10 +80,10 @@ index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb1938
|
||||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/test/test_page_broadcast.h b/content/test/test_page_broadcast.h
|
||||
index 913e465918750df6852c3ede34a75ecebab8b1fa..c81d6ad098cf977cbd8933721e539c52056c258b 100644
|
||||
index 3f4fdfcdf2f701a394e182bd61baf226338ef7f8..f2faa1225e8ca6abb190e6f7a0775545fa3f785d 100644
|
||||
--- a/content/test/test_page_broadcast.h
|
||||
+++ b/content/test/test_page_broadcast.h
|
||||
@@ -50,6 +50,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -51,6 +51,7 @@ class TestPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
network::mojom::AttributionSupport support) override;
|
||||
void UpdateColorProviders(
|
||||
const blink::ColorProviderColorMaps& color_provider_colors) override;
|
||||
@@ -92,10 +92,10 @@ index 913e465918750df6852c3ede34a75ecebab8b1fa..c81d6ad098cf977cbd8933721e539c52
|
||||
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 f868a3cc56b49b7fdac9fa1415386bd3a59a3dd7..ac7e92740bf7a61f3d8dcf8feff0fee978ffbfee 100644
|
||||
index b6a4e3609af1f090f1f845d77fa0589e5b178d8a..989b2cf76ce88614b57e75ce2fcace101225f43e 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 {
|
||||
@@ -175,4 +175,7 @@ interface PageBroadcast {
|
||||
// 2. The ColorProvider associated with the WebContents changes as a result
|
||||
// of theme changes.
|
||||
UpdateColorProviders(ColorProviderColorMaps color_provider_colors);
|
||||
@@ -104,10 +104,10 @@ index f868a3cc56b49b7fdac9fa1415386bd3a59a3dd7..ac7e92740bf7a61f3d8dcf8feff0fee9
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b47141fb7 100644
|
||||
index 7c1eb9baabfb9e0f3645421b5cbe467862252638..00d2cd41d795cb550e16fb80944b238252e4e53c 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -371,6 +371,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -370,6 +370,7 @@ class BLINK_EXPORT WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -116,10 +116,10 @@ index b1689844282d6917b9750fbc6a875848ddf84b70..f1cc159b7c3448a33a6d9e213f8fbd3b
|
||||
// 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 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56aaeebc1f 100644
|
||||
index feba9635b40664b1db83ab727798a34b98e5e0b8..f6a248b1de8b313658453dd380529ec7c2e40033 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2466,6 +2466,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2467,6 +2467,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56
|
||||
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 &&
|
||||
@@ -3989,10 +3993,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3990,10 +3994,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index 1af1fa035b3da8967526d704e362ddbc5c3194ac..f470ada1bf84938427fb89f4508e5f56
|
||||
// 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 06f7cf79b4526ca3ec7670c234a6bb8faec32f04..b8fe2a9b7b6b4de2a689f3857c7ce44909e6f2dc 100644
|
||||
index eaa593b41ec2e9a12fca53eb9925e6b868a4d9f1..8ce3ea0e5d6e5bdff982b956de305047347b4385 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -448,6 +448,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
|
||||
@@ -8,10 +8,10 @@ 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 009f3563df63bc2ba2eadeecaea4f328d6a409ec..769ff8faaddf543fba1a41aff939f23741127247 100644
|
||||
index 9fe216ae76191985751c5aff735cb38ba747a5cb..274dbe4fe45f5ca03e4f93fa1ef94f22ca3559ed 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
|
||||
@@ -150,6 +150,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
|
||||
@@ -32,7 +32,7 @@ index 009f3563df63bc2ba2eadeecaea4f328d6a409ec..769ff8faaddf543fba1a41aff939f237
|
||||
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 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86d4e16f6e 100644
|
||||
index 2d9ef567d7aba3d78ecb0637fc7a31cbaaba564b..9c6c5e3b2668bdfa3ec1f5f0482bc1294bfed9b0 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -43,7 +43,7 @@ index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86
|
||||
#include "build/build_config.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -451,6 +452,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -450,6 +451,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// WebView and by `kWebPayments` feature flag everywhere.
|
||||
bool payment_request_enabled = false;
|
||||
|
||||
@@ -65,7 +65,7 @@ index 85f312a9ea1eca0ff7ba4c679fabb3156aabbc0b..a9dc007a93003610d68e3118b4a47a86
|
||||
// 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 1173ace39b6256edc188a4c6649e7cd4c4484899..c1d53122af52f7785a016f6fc62d9aa684a4be8c 100644
|
||||
index 86e4152b85d85ed3c620458567509e0eaa2ad5d8..6f39bf14c42278dc8ada95902868608bd6a6f171 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
|
||||
@@ -8,6 +8,7 @@
|
||||
@@ -76,7 +76,7 @@ index 1173ace39b6256edc188a4c6649e7cd4c4484899..c1d53122af52f7785a016f6fc62d9aa6
|
||||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -442,6 +443,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -438,6 +439,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.stylus_handwriting_enabled;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 1173ace39b6256edc188a4c6649e7cd4c4484899..c1d53122af52f7785a016f6fc62d9aa6
|
||||
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 ffd46eb579c7c6bf9263b02e9bbe0dee013ac76d..be40f76fae9653e8d3fdcfa74979089d3d317533 100644
|
||||
index 41d33c9ecebf615162dc8a9fa1653d32bdaa8d66..6891f25242b83c113a26c2919663a33da8a9b2d7 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -8,9 +8,11 @@ import "third_party/blink/public/mojom/css/preferred_color_scheme.mojom";
|
||||
@@ -145,7 +145,7 @@ index ffd46eb579c7c6bf9263b02e9bbe0dee013ac76d..be40f76fae9653e8d3fdcfa74979089d
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
kPointerFirstType = kPointerNone,
|
||||
@@ -219,6 +221,19 @@ struct WebPreferences {
|
||||
@@ -218,6 +220,19 @@ struct WebPreferences {
|
||||
// If true, stylus handwriting recognition to text input will be available in
|
||||
// editable input fields which are non-password type.
|
||||
bool stylus_handwriting_enabled;
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes
|
||||
This allows unsandboxed child process to launch setuid processes on Linux.
|
||||
|
||||
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
|
||||
index add20a2f81d66e51e1be5a3f3b35ef6b340b4cc3..31a2a14a95540477297943df9b09b1e4659a884d 100644
|
||||
index 75cafbe0dbd7d4b3dca4c8fe56e17cd836123588..8f551374e1ffc729081f7d50e73671313c641bb6 100644
|
||||
--- a/content/browser/child_process_launcher_helper_linux.cc
|
||||
+++ b/content/browser/child_process_launcher_helper_linux.cc
|
||||
@@ -64,6 +64,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
|
||||
@@ -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 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d0482bf20664 100644
|
||||
index c9f34fa47702504ccdefb8d61c55f5eaae501085..26df03d777c9ea487cae37f3df91d1df233b75e2 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -134,14 +134,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -33,7 +33,7 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
|
||||
if (type == FrameDetachType::kRemove) {
|
||||
if (provisional_frame_) {
|
||||
provisional_frame_->Detach(FrameDetachType::kRemove);
|
||||
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -166,6 +158,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
GetWindowProxyManager()->ClearForSwap();
|
||||
}
|
||||
|
||||
@@ -49,10 +49,10 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
|
||||
// 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 ecaae5e1a2911b122678b2f4f77b5796323ad0bf..fbfd4d96e8082df8c5db5d354ac7c39bc329d4ee 100644
|
||||
index 6a80292d0c9d7130c762a0a84ca77f62c4c75168..574f947602f8cf9d5abebf6180dc3fb67dc85496 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -753,10 +753,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -727,10 +727,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index ecaae5e1a2911b122678b2f4f77b5796323ad0bf..fbfd4d96e8082df8c5db5d354ac7c39b
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -810,6 +806,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -784,6 +780,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,14 +8,14 @@ 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 5e0f05804e8142c735fa2f5afb27485caae895f9..48ac9a600b6a007e2e974b657c3d8048be97b3ce 100644
|
||||
index d4c70f285fa6798798558974d7d79604dd388909..31f396bb437b7089930c05e6b1067bc156155be1 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
@@ -102,6 +102,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
|
||||
perfetto::Category("drm"),
|
||||
perfetto::Category("drmcursor"),
|
||||
perfetto::Category("dwrite"),
|
||||
+ perfetto::Category("electron"),
|
||||
perfetto::Category("evdev"),
|
||||
perfetto::Category("evdev").SetTags("input"),
|
||||
perfetto::Category("event"),
|
||||
perfetto::Category("exo"),
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
|
||||
This is similar to the //build usecase so we're OK adding ourselves here
|
||||
|
||||
diff --git a/.gn b/.gn
|
||||
index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..7a1373c1cb78133375071cf5479561b64376b4dc 100644
|
||||
index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..0ed56526002b12deb6d29f3dd23a0d74d8e7473c 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -167,4 +167,26 @@ exec_script_allowlist =
|
||||
@@ -167,4 +167,27 @@ exec_script_allowlist =
|
||||
|
||||
"//tools/grit/grit_rule.gni",
|
||||
"//tools/gritsettings/BUILD.gn",
|
||||
@@ -34,5 +34,6 @@ index ae58a0b0a64ae1fdb3f9cd8587041d71a121c6b9..7a1373c1cb78133375071cf5479561b6
|
||||
+ "//third_party/electron_node/deps/sqlite/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/uv/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/uvwasi/unofficial.gni",
|
||||
+ "//third_party/electron_node/deps/zstd/unofficial.gni",
|
||||
+ "//third_party/electron_node/src/inspector/unofficial.gni",
|
||||
]
|
||||
|
||||
@@ -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 4b3f01018a9dea91b46b5917e099f272582991b2..8250f2e447ff19829cfae3f00b3df70b47749874 100644
|
||||
index 84fab7fcdb1a7ded880c0ff4867e09c740e7a5d2..f03f0e67c083880dc13f8f90d9375ff62717ba00 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -197,11 +197,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
@@ -33,10 +33,10 @@ index 4b3f01018a9dea91b46b5917e099f272582991b2..8250f2e447ff19829cfae3f00b3df70b
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d1f0778f2 100644
|
||||
index 186cbeb02aa7b4e5b22800ece7cbc4791777356a..7137860ba1423a5ff36b85952790c5b25d6adf9d 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4627,7 +4627,7 @@ static_library("browser") {
|
||||
@@ -4674,7 +4674,7 @@ static_library("browser") {
|
||||
[ "//chrome/browser/ui/webui/signin:profile_impl" ]
|
||||
}
|
||||
|
||||
@@ -46,10 +46,10 @@ index ad39862fdd9a5a4f827f36e6a9778223a638d831..518ab769287525b1977387df56d1f50d
|
||||
# than here in :chrome_dll.
|
||||
deps += [ "//chrome:packed_resources_integrity_header" ]
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf9ffcb616 100644
|
||||
index 4a299a91dccd83f5e9595bdab2317c6ed9b26920..16f2e321030d61ee2cbab91c15fc93da3cf735b5 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7187,9 +7187,12 @@ test("unit_tests") {
|
||||
@@ -7209,9 +7209,12 @@ test("unit_tests") {
|
||||
"//chrome/notification_helper",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8155,6 +8158,10 @@ test("unit_tests") {
|
||||
@@ -8180,6 +8183,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index 1b52a0d1a249c5d8beb205358c2003202c9253a0..4fbf2f66adfccb3580176be8d25598cf
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8210,7 +8217,6 @@ test("unit_tests") {
|
||||
@@ -8235,7 +8242,6 @@ test("unit_tests") {
|
||||
# Non-android deps for "unit_tests" target.
|
||||
deps += [
|
||||
"../browser/screen_ai:screen_ai_install_state",
|
||||
|
||||
@@ -7,23 +7,10 @@ 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 f411f2d51a397db52ba28eb7ed430f6f16c5396d..219e99e56cbf35aac8e18cff96601143f9f44ebf 100644
|
||||
index 2b4c153a67fda5effaac8d2932a985d87539fe69..c0c310ecbf74b8c1649bcd23ebe1c142c088fc9f 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -295,7 +295,11 @@ libcxx_modules("std_wctype_h") {
|
||||
if (libcxx_is_shared) {
|
||||
_libcxx_target_type = "shared_library"
|
||||
} else {
|
||||
- _libcxx_target_type = "source_set"
|
||||
+ if (is_win) {
|
||||
+ _libcxx_target_type = "source_set"
|
||||
+ } else {
|
||||
+ _libcxx_target_type = "static_library"
|
||||
+ }
|
||||
}
|
||||
|
||||
target(_libcxx_target_type, "libc++") {
|
||||
@@ -304,6 +308,7 @@ target(_libcxx_target_type, "libc++") {
|
||||
@@ -298,6 +298,7 @@ target(libcxx_target_type, "libc++") {
|
||||
# need to explicitly depend on libc++.
|
||||
visibility = [
|
||||
"//build/config:common_deps",
|
||||
@@ -31,16 +18,3 @@ index f411f2d51a397db52ba28eb7ed430f6f16c5396d..219e99e56cbf35aac8e18cff96601143
|
||||
"//third_party/catapult/devil:devil",
|
||||
]
|
||||
if (is_linux) {
|
||||
diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn
|
||||
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")
|
||||
import("//build/config/c++/c++.gni")
|
||||
import("//build/config/unwind.gni")
|
||||
|
||||
-source_set("libc++abi") {
|
||||
+static_library("libc++abi") {
|
||||
if (export_libcxxabi_from_executables) {
|
||||
visibility = [ "//build/config:executable_deps" ]
|
||||
} else {
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971cb5cf393e 100644
|
||||
index db20a849f0e093a940587f94d777b7941882443d..e87536a31d03d8030b26781b9345fa7478d24afd 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -9778,6 +9778,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -9711,6 +9711,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,12 +21,12 @@ index ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971c
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8aec4d158 100644
|
||||
index af97a08179fd92e71daff17ca75cf4c6c06be1cc..65a3b57c38419c15b071e67852789b48533fe53a 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5126,6 +5126,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
|
||||
opener);
|
||||
@@ -5155,6 +5155,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// Sets the newly created WebContents WindowOpenDisposition.
|
||||
new_contents_impl->original_window_open_disposition_ = params.disposition;
|
||||
|
||||
+ if (delegate_) {
|
||||
+ delegate_->WebContentsCreatedWithFullParams(this, render_process_id,
|
||||
@@ -37,7 +37,7 @@ index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -5167,12 +5173,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5196,12 +5202,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -51,10 +51,10 @@ index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8
|
||||
new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(), params.disposition,
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2de7c4e0fc 100644
|
||||
index 09f1899c9b044a05b2e40c291f17fdf1f9f2fcac..89643bf7059d4fc0d6de6116ffe0fdac883b3fc9 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -646,6 +646,10 @@ struct CreateNewWindowParams {
|
||||
@@ -653,6 +653,10 @@ struct CreateNewWindowParams {
|
||||
pending_associated_remote<blink.mojom.Widget> widget;
|
||||
pending_associated_receiver<blink.mojom.FrameWidgetHost> frame_widget_host;
|
||||
pending_associated_remote<blink.mojom.FrameWidget> frame_widget;
|
||||
@@ -66,10 +66,10 @@ index 55bb4ae3bab4cdf20b3e1dde9450a5c0e4e62b37..fe444c7fa140166a1b65c7a8a2676e2d
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f67dc100de 100644
|
||||
index e8a1b16cbe8aeb9c185de622250b73c402d56228..38a9b7ae1548f86ae700acc41565f340ed4dbff5 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -821,6 +821,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -842,6 +842,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +79,10 @@ index 9c36ad70531bd8c31158c741ab23763ea00bc068..6909f75fb4cbd0e7b4f3067cda52a5f6
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439a808f1a9 100644
|
||||
index 9061895e64ce94700692b0b990f22a32b5e0e353..bd3cccc408c61f4c4e408fd5d093d6aa1ef0e201 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -199,6 +199,7 @@ class NetworkService;
|
||||
@@ -200,6 +200,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +90,7 @@ index f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1377,6 +1378,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1404,6 +1405,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -100,7 +100,7 @@ index f1fee091b84aec20f1e15dcc90917e50bb47d1c6..3a7a6dc0a4e75c151379f8488d371439
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index b390356721fa226c348923f33601c4a1a2d9702d..97a3ea6f292563a41fd41f812ac72526a96d8471 100644
|
||||
index f42be2a1cc5ba3ccb52e48985e0532a34675e826..f6ab6ab2b036c7621b429181c3ff89d9f1ff77f9 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -32,6 +32,17 @@ namespace content {
|
||||
@@ -122,7 +122,7 @@ index b390356721fa226c348923f33601c4a1a2d9702d..97a3ea6f292563a41fd41f812ac72526
|
||||
WebContents* source,
|
||||
const OpenURLParams& params,
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f7727570c4ba 100644
|
||||
index d33274984bf6523beeb3ab5ee586499d224bff3c..83bdd195339eb7d61ac88e2994fd8dabe93f6ecc 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -133,7 +133,7 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772
|
||||
#include "content/public/browser/eye_dropper.h"
|
||||
#include "content/public/browser/fullscreen_types.h"
|
||||
#include "content/public/browser/invalidate_type.h"
|
||||
@@ -376,6 +377,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -380,6 +381,13 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
const StoragePartitionConfig& partition_config,
|
||||
SessionStorageNamespace* session_storage_namespace);
|
||||
|
||||
@@ -148,10 +148,10 @@ index da319cb20733150366d85bee95609f0f2d9def7f..8a18958035cc1dd26be558349f64f772
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d694933038 100644
|
||||
index b6da726a70555c2074077a2105b078e1850824d9..3fa43adedd6ff0258edd195bde1e68977cff3a7c 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6936,6 +6936,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6937,6 +6937,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
|
||||
GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -163,10 +163,10 @@ index 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d6
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index 75bd6c082dbda49bd5ee177105d78b670d147034..bceb8a8acf9a23d0d1df2d6749b94f4c98ee72ec 100644
|
||||
index 7f265db63f3fa34ab568e30e356db3cb259e7067..b55188e4b75913a531c2def09343b9ed3d589940 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -535,6 +535,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -531,6 +531,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -176,7 +176,7 @@ index 75bd6c082dbda49bd5ee177105d78b670d147034..bceb8a8acf9a23d0d1df2d6749b94f4c
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
|
||||
index 78eafab336717b7ec8adab23b3bd8baace7b3e09..16cfe915177d812bce5738acf2b1991b7eb1aeb1 100644
|
||||
index b50d5628cfe6dc3009d889b6a8c4a0925d19592b..43d67de5ef7552bec5ced1496318724c01a806ce 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -94,6 +94,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -210,7 +210,7 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index de39a688207f81143c59ad54385642389b0fcc4e..93c5b79727674ff1c5344d39fd7bcd07c3101424 100644
|
||||
index 6de4ad918b8c1d2a3dfb977ed80ea232dbbee9c1..f983903112efd76c8bd73656a0de5e54026e6d1b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2280,6 +2280,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
|
||||
@@ -49,24 +49,23 @@ index ae7eab37f12ba80ec423d229cf048021e9ba6765..507a75dc7947295db221b01356fa57ba
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop class.
|
||||
diff --git a/ui/views/widget/widget_delegate.h b/ui/views/widget/widget_delegate.h
|
||||
index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..0d5c63e7efbe42d5352abdeb594175904af30c41 100644
|
||||
index 89de188e6a0139a236a824b189f1048613d6f457..c438376c34cac4ec7ac7a03d852685c18b10068e 100644
|
||||
--- a/ui/views/widget/widget_delegate.h
|
||||
+++ b/ui/views/widget/widget_delegate.h
|
||||
@@ -169,6 +169,13 @@ namespace data_controls {
|
||||
class DesktopDataControlsDialog;
|
||||
@@ -165,6 +165,12 @@ namespace crostini {
|
||||
class AppRestartDialog;
|
||||
}
|
||||
|
||||
+namespace electron {
|
||||
+class AutofillPopupView;
|
||||
+class DevToolsWindowDelegate;
|
||||
+class NativeWindowMac;
|
||||
+class NativeWindowViews;
|
||||
+}
|
||||
+
|
||||
namespace enterprise_connectors {
|
||||
class ContentAnalysisDialog;
|
||||
class ContentAnalysisDialogBehaviorBrowserTest;
|
||||
@@ -371,6 +378,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
@@ -367,6 +373,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
|
||||
class OwnedByWidgetPassKey {
|
||||
private:
|
||||
@@ -74,16 +73,15 @@ index 7c2463cb91d00de2b0fa4f10221ea960be860d9a..0d5c63e7efbe42d5352abdeb59417590
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `SetOwnedByWidget()`.
|
||||
@@ -468,6 +476,8 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
@@ -463,6 +470,7 @@ class VIEWS_EXPORT WidgetDelegate {
|
||||
};
|
||||
class RegisterDeleteCallbackPassKey {
|
||||
private:
|
||||
+ friend class electron::NativeWindowMac;
|
||||
+ friend class electron::NativeWindowViews;
|
||||
// DO NOT ADD TO THIS LIST!
|
||||
// These existing cases are "grandfathered in", but there shouldn't be more.
|
||||
// See comments atop `RegisterDeleteDelegateCallback()`.
|
||||
@@ -918,6 +928,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
@@ -913,6 +921,7 @@ class VIEWS_EXPORT WidgetDelegateView : public WidgetDelegate, public View {
|
||||
View* GetContentsView() override;
|
||||
|
||||
private:
|
||||
|
||||
@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
|
||||
of explicitly adding ScopedAllowBlocking calls as friends.
|
||||
|
||||
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
|
||||
index 59d6e6e4d899f10d1adeb4f23c32f0dd565cf963..674954816b6c241c1923668f8da7ad5c79a04256 100644
|
||||
index b1abcfaab58df4555d3a26481915d64ef5458e17..f2f43454c1c124da9983998564837ebf3589aefd 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -132,6 +132,7 @@ class KeyStorageLinux;
|
||||
@@ -28,7 +28,7 @@ index 59d6e6e4d899f10d1adeb4f23c32f0dd565cf963..674954816b6c241c1923668f8da7ad5c
|
||||
namespace enterprise_connectors {
|
||||
class LinuxKeyRotationCommand;
|
||||
} // namespace enterprise_connectors
|
||||
@@ -572,6 +576,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -577,6 +581,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class ::DesktopNotificationBalloon;
|
||||
friend class ::FirefoxProfileLock;
|
||||
friend class ::GaiaConfig;
|
||||
@@ -36,7 +36,7 @@ index 59d6e6e4d899f10d1adeb4f23c32f0dd565cf963..674954816b6c241c1923668f8da7ad5c
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -610,6 +615,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
@@ -615,6 +620,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class cronet::CronetPrefsManager;
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
|
||||
@@ -34,7 +34,7 @@ index 39b5a8fdd165efd74b00256552b51b5413107958..bfc4ef4f50efff4a77f2aef64335bb7e
|
||||
|
||||
class ScrollEvent;
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index 61509e2eb982797845098abf5f36e031be63686b..24283be8d1660acce0a5ae89386b8eef9989fc12 100644
|
||||
index 5f9612ff000c1544f572bab0cbc9982dc4e647ce..2ce65548dd1283adb4c095e37198e08a8a13635c 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1415,6 +1415,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
@@ -61,10 +61,10 @@ index dab595aacaeca4f6f735fd04004c27a4949278d2..177134d439866db9dbbde657ff358a76
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 5919efa661c3b1ed210f7a67f85fdd3882011bae..5b17d5bf0b32405ae9515b941a17b68a04a3b317 100644
|
||||
index 9747e945b2ebfc113ffd12839c28a98fcccf2872..6f2e2702d3b982fe7e8d258f303c8055d3d37df8 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3178,15 +3178,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3167,15 +3167,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
}
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
@@ -86,7 +86,7 @@ index 5919efa661c3b1ed210f7a67f85fdd3882011bae..5b17d5bf0b32405ae9515b941a17b68a
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -3209,6 +3213,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3198,6 +3202,7 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
// handle alt-space, or in the frame itself.
|
||||
is_right_mouse_pressed_on_caption_ = false;
|
||||
ReleaseCapture();
|
||||
@@ -94,7 +94,7 @@ index 5919efa661c3b1ed210f7a67f85fdd3882011bae..5b17d5bf0b32405ae9515b941a17b68a
|
||||
// |point| is in window coordinates, but WM_NCHITTEST and TrackPopupMenu()
|
||||
// expect screen coordinates.
|
||||
POINT screen_point = CR_POINT_INITIALIZER_FROM_LPARAM(l_param);
|
||||
@@ -3216,7 +3221,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3205,7 +3210,17 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
w_param = static_cast<WPARAM>(SendMessage(
|
||||
hwnd(), WM_NCHITTEST, 0, MAKELPARAM(screen_point.x, screen_point.y)));
|
||||
if (w_param == HTCAPTION || w_param == HTSYSMENU) {
|
||||
|
||||
@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
|
||||
by changing something in Electron.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 4c30f71ced0da645637c989c08ccc93e463e755f..56b2fb93d5d85f520081de9e42e26ef3f8f6090e 100644
|
||||
index acb6b6257ccb13aae284d9b02baada14fe9ee0cc..9269ef00d1c0ce0606a39533b839e061ba448d7e 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5045,7 +5045,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -5071,7 +5071,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
: IsGuest();
|
||||
// While some guest types do not have a guest SiteInstance, the ones that
|
||||
// don't all override WebContents creation above.
|
||||
|
||||
@@ -14,10 +14,10 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index adaa1cd426c138972b088d0d0093b0e1653af231..be4684c94ba2214255c5dbe9cdcf1ea316c60c06 100644
|
||||
index 8db7e1a1ac6947a630cdf6993bf9cef772252cd9..4a4f5bb2fa0e26b921b2e40fade705e83c0bc573 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -229,7 +229,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
@@ -226,7 +226,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
BrowserContext* browser_context,
|
||||
const StoragePartitionConfig& partition_config) {
|
||||
DCHECK(browser_context);
|
||||
|
||||
@@ -7,10 +7,10 @@ Pending upstream patch, this gives us fuller access to the window.open params
|
||||
so that we will be able to decide whether to cancel it or not.
|
||||
|
||||
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
||||
index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b346d3d69 100644
|
||||
index 7a9effeec99682ef063ebe71f209e6ed9fc4cad4..71ef44be47a8665ee36449a38333ddf9cff33ad4 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.cc
|
||||
+++ b/chrome/browser/media/offscreen_tab.cc
|
||||
@@ -286,8 +286,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
@@ -287,8 +287,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -21,10 +21,10 @@ index bfcdf050e603b953d15a0898200c8f031a1f84c6..b1f163b6da4d2197d404a5a0fbd31a5b
|
||||
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||
// offscreen tabs.
|
||||
diff --git a/chrome/browser/media/offscreen_tab.h b/chrome/browser/media/offscreen_tab.h
|
||||
index 2fa0d6e1be27cc429e4a0237b5bfafa7aaa06c56..3decb327b10e3cd3edc1765491a7eb6056be7a51 100644
|
||||
index 231e3595f218aeebe28d0b13ce6182e7a4d6f4e1..609bd205d1cd0404cab3471765bef8b0e053d061 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.h
|
||||
+++ b/chrome/browser/media/offscreen_tab.h
|
||||
@@ -107,8 +107,7 @@ class OffscreenTab final : public ProfileObserver,
|
||||
@@ -108,8 +108,7 @@ class OffscreenTab final : public ProfileObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -35,10 +35,10 @@ index 2fa0d6e1be27cc429e4a0237b5bfafa7aaa06c56..3decb327b10e3cd3edc1765491a7eb60
|
||||
content::RenderFrameHost* requesting_frame,
|
||||
const blink::mojom::FullscreenOptions& options) final;
|
||||
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
index a0c24e09a5dffa8be119309738abe57e82ef76b3..3e362f622b72d7cb97a838e71014b035c47728c0 100644
|
||||
index a17c406b59530a8f57f6cb48905a697dd208a41f..0e22e90c1d570eb4c86ac1f24c5a6e9159be8ea1 100644
|
||||
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
@@ -79,8 +79,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
@@ -80,8 +80,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -49,10 +49,10 @@ index a0c24e09a5dffa8be119309738abe57e82ef76b3..3e362f622b72d7cb97a838e71014b035
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
|
||||
index 44be6359d6a7acf88072569d8d4f85c688f5ed81..ee377313b25e13c011b1ed4aa31ea059f020a5b7 100644
|
||||
index 08c84ca91f7e477e4e8d6370513d90d2fb9801f1..41e04444274f40fdedbf8d97bfd149f2ac682e53 100644
|
||||
--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
|
||||
+++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.cc
|
||||
@@ -120,10 +120,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
|
||||
@@ -121,10 +121,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -66,10 +66,10 @@ index 44be6359d6a7acf88072569d8d4f85c688f5ed81..ee377313b25e13c011b1ed4aa31ea059
|
||||
/*from_user_gesture=*/true);
|
||||
return true;
|
||||
diff --git a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
|
||||
index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d1b618c68 100644
|
||||
index b6582b4013d9682d32bd524b4053b443a4df00f8..afcbce72e0f247b4d5a637b27c9f25d913cfa14b 100644
|
||||
--- a/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
|
||||
+++ b/chrome/browser/ui/ash/web_view/ash_web_view_impl.h
|
||||
@@ -59,8 +59,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
||||
@@ -60,8 +60,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -80,29 +80,33 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params,
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 435235c067f70f7f3d219dfc0bf91c9be40d1389..cc6c860ec51075fc047a77c26c5b42296bb6ab19 100644
|
||||
index 1bea3ad5b3c9960a7b1193e232b0c1f5c847e79d..0f416f0eeadca6bc7cc559d8879c694b7ccf62e6 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -2323,12 +2323,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -2406,8 +2406,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
- const std::string& frame_name,
|
||||
- const GURL& target_url) {
|
||||
+ const content::mojom::CreateNewWindowParams& params) {
|
||||
return window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
- frame_name);
|
||||
+ params.frame_name);
|
||||
if (IsActorCoordinatorActingOnTab(
|
||||
profile(), content::WebContents::FromRenderFrameHost(opener))) {
|
||||
// If an ActorCoordinator is acting on the opener, prevent it from creating
|
||||
@@ -2419,7 +2418,7 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
return (window_container_type ==
|
||||
content::mojom::WindowContainerType::BACKGROUND &&
|
||||
ShouldCreateBackgroundContents(source_site_instance, opener_url,
|
||||
- frame_name));
|
||||
+ params.frame));
|
||||
}
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index c4cea0b6e8c4c95ebcddf5497d731d1d63934f22..7686b75c5504d093dcd9dd8a7ffd28e0c2fd036c 100644
|
||||
index 5d3ab970d01b20bef2c715ab8bc65187814b0008..6efef3f3e9c7005fae59a404929d80bebe965f02 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -1026,8 +1026,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -1041,8 +1041,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -113,10 +117,10 @@ index c4cea0b6e8c4c95ebcddf5497d731d1d63934f22..7686b75c5504d093dcd9dd8a7ffd28e0
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
||||
index 0d2a68ea6b9f08b5c1f1113181b08d55a3265192..0dfa27fa14d1308c059534953e190922ddb3bc0a 100644
|
||||
index a05510eadf5c9ff24bb7999aa76229946319280f..a80ecc46f8a6b84de83d608257d45ae61ccc2170 100644
|
||||
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
||||
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
||||
@@ -205,8 +205,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
|
||||
@@ -206,8 +206,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -127,10 +131,10 @@ index 0d2a68ea6b9f08b5c1f1113181b08d55a3265192..0dfa27fa14d1308c059534953e190922
|
||||
// uses this to spawn new windows/tabs, which is also not allowed for
|
||||
// local presentations.
|
||||
diff --git a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67cfa05c6f7 100644
|
||||
index 3fc06be01f20e8cd314d95d73a3f58c2f0742fe9..c07910ae59a185442f37ea6e7b96fdf3a33aba82 100644
|
||||
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.h
|
||||
@@ -105,8 +105,7 @@ class PresentationReceiverWindowController final
|
||||
@@ -106,8 +106,7 @@ class PresentationReceiverWindowController final
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -141,10 +145,10 @@ index ca72b324bf7c3b81ac94b53f0ff454d2df177950..d60ef3075d126e2bbd50c8469f2bf67c
|
||||
// The profile used for the presentation.
|
||||
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
|
||||
diff --git a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
index 1085003ab18d471d5c018ac68041924d458fcec7..4aac70febec9f0abadd1ecb96d9066e6c270efca 100644
|
||||
index 1c30afe192809d85ced6af595347353ec3cb5364..af48bb2755c33f6c372be6b51048b3cf3fd0be0b 100644
|
||||
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
@@ -100,8 +100,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
@@ -101,8 +101,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -155,10 +159,10 @@ index 1085003ab18d471d5c018ac68041924d458fcec7..4aac70febec9f0abadd1ecb96d9066e6
|
||||
}
|
||||
content::WebContents* CreateCustomWebContents(
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
index e0264aff5b60bb5e76ac7687222403dfba516e66..915abd2475f6be95d973f827522f7ef12052a81c 100644
|
||||
index 37260552fcc42edcac08422bdf6cb9f0f4b09c39..461fb20c1093cf2de06f9bb6f41f80ab0017b6a1 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -189,14 +189,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -190,14 +190,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -176,10 +180,10 @@ index e0264aff5b60bb5e76ac7687222403dfba516e66..915abd2475f6be95d973f827522f7ef1
|
||||
java_gurl);
|
||||
}
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
index 67a01b48ae88c7e25aeb5c5103b26afa037f4f97..0ceb539c9c3051b5521236cf866ccb107727c8a9 100644
|
||||
index 996b3d453b375fec2a823a0dd0d3122ba626b5f2..5a5c6ed67f698fdd914e79df528e2ca391e056b7 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -82,8 +82,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -83,8 +83,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -190,10 +194,10 @@ index 67a01b48ae88c7e25aeb5c5103b26afa037f4f97..0ceb539c9c3051b5521236cf866ccb10
|
||||
bool DidAddMessageToConsole(content::WebContents* source,
|
||||
blink::mojom::ConsoleMessageLevel log_level,
|
||||
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.cc b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
index e0e9a5a8c1d8c242d39935e2456052619af33cc6..80518793447c70e8fc1dae9b42a59d40427ae52b 100644
|
||||
index 14f2758f2d71d4d4ba77e4fcb9be40bb878526e0..536db4f8fe9771b60f0359df5c680b298c89cad4 100644
|
||||
--- a/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
+++ b/components/offline_pages/content/background_loader/background_loader_contents.cc
|
||||
@@ -89,8 +89,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
|
||||
@@ -86,8 +86,7 @@ bool BackgroundLoaderContents::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -204,7 +208,7 @@ index e0e9a5a8c1d8c242d39935e2456052619af33cc6..80518793447c70e8fc1dae9b42a59d40
|
||||
return true;
|
||||
}
|
||||
diff --git a/components/offline_pages/content/background_loader/background_loader_contents.h b/components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17250c5eca 100644
|
||||
index b969f1d97b7e3396119b579cfbe61e19ff7d2dd4..b8d6169652da28266a514938b45b39c58df53573 100644
|
||||
--- a/components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
+++ b/components/offline_pages/content/background_loader/background_loader_contents.h
|
||||
@@ -66,8 +66,7 @@ class BackgroundLoaderContents : public content::WebContentsDelegate {
|
||||
@@ -218,24 +222,24 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
|
||||
content::WebContents* AddNewContents(
|
||||
content::WebContents* source,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 7a8d7ce6f628123f5288d693046ca7602eeccac1..f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c 100644
|
||||
index fcb7a38577a7b597be09b73cea9308b7112fee2a..3435a1d0ce5c8025b5a2005ebb4066e306579a69 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -5008,8 +5008,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
- opener->GetLastCommittedURL(), params.frame_name,
|
||||
- params.target_url)) {
|
||||
+ opener->GetLastCommittedURL(), params)) {
|
||||
@@ -5034,8 +5034,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
if (delegate_ &&
|
||||
delegate_->IsWebContentsCreationOverridden(
|
||||
opener, source_site_instance, params.window_container_type,
|
||||
- opener->GetLastCommittedURL(), params.frame_name,
|
||||
- params.target_url)) {
|
||||
+ opener->GetLastCommittedURL(), params)) {
|
||||
auto* web_contents_impl =
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 97a3ea6f292563a41fd41f812ac72526a96d8471..b299dd5659100d317a3574e902bf2c29c5defd2c 100644
|
||||
index f6ab6ab2b036c7621b429181c3ff89d9f1ff77f9..d151ba757ae81c6f023ee08328ab155405b0fb95 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -159,8 +159,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -160,8 +160,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -246,10 +250,10 @@ index 97a3ea6f292563a41fd41f812ac72526a96d8471..b299dd5659100d317a3574e902bf2c29
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 8a18958035cc1dd26be558349f64f7727570c4ba..7d9c9b06bcc57ef5eb0a2ca74ee20632a1393f9e 100644
|
||||
index 83bdd195339eb7d61ac88e2994fd8dabe93f6ecc..682e5eecb7ce514094f76253447aa7ac4b6f29b1 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -355,8 +355,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -359,8 +359,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
SiteInstance* source_site_instance,
|
||||
mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -260,10 +264,10 @@ index 8a18958035cc1dd26be558349f64f7727570c4ba..7d9c9b06bcc57ef5eb0a2ca74ee20632
|
||||
// Allow delegate to creates a custom WebContents when
|
||||
// WebContents::CreateNewWindow() is called. This function is only called
|
||||
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.cc b/extensions/browser/guest_view/app_view/app_view_guest.cc
|
||||
index 8d6fc67cb9b1d653bce64d1ba22aa7ec2d79257c..d5ce746373a1a4310e1eb530aee011a785e1d68c 100644
|
||||
index 0f2c21513e07e8ddb387c165754d7ec67942a719..c381abf67c261b92f1c65c485b69321f44080343 100644
|
||||
--- a/extensions/browser/guest_view/app_view/app_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/app_view/app_view_guest.cc
|
||||
@@ -153,8 +153,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -154,8 +154,7 @@ bool AppViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -274,7 +278,7 @@ index 8d6fc67cb9b1d653bce64d1ba22aa7ec2d79257c..d5ce746373a1a4310e1eb530aee011a7
|
||||
|
||||
return true;
|
||||
diff --git a/extensions/browser/guest_view/app_view/app_view_guest.h b/extensions/browser/guest_view/app_view/app_view_guest.h
|
||||
index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2ce9f6cd53 100644
|
||||
index 7695578f626f2a0c7fefae2bc1d5c35e5ac154f2..78958bff12ce41ae5ad77f43279a4b35b9408a12 100644
|
||||
--- a/extensions/browser/guest_view/app_view/app_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/app_view/app_view_guest.h
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -285,7 +289,7 @@ index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2c
|
||||
#include "extensions/browser/guest_view/app_view/app_view_guest_delegate.h"
|
||||
#include "extensions/browser/lazy_context_task_queue.h"
|
||||
|
||||
@@ -79,8 +80,7 @@ class AppViewGuest : public guest_view::GuestView<AppViewGuest> {
|
||||
@@ -80,8 +81,7 @@ class AppViewGuest : public guest_view::GuestView<AppViewGuest> {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -296,10 +300,10 @@ index 136448c9df06b9704e95d2797a60907d7ec5170a..21cc7b08dd8f9e4a32d29dd35c42ec2c
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
index 2fca443b4bebf29c2835440a9db8a56f7373032f..6b704b57c08714b0a314e98d49e58676987d2995 100644
|
||||
index 5bd9d59a961a03f3cd3a806bc1af58c3eaee2b58..40d7ae8d6248163524a8c1350b625e107a8ae64a 100644
|
||||
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
@@ -262,8 +262,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
@@ -263,8 +263,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -310,10 +314,10 @@ index 2fca443b4bebf29c2835440a9db8a56f7373032f..6b704b57c08714b0a314e98d49e58676
|
||||
|
||||
// This method handles opening links from within the guest. Since this guest
|
||||
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a11cae738 100644
|
||||
index 56d86e3d1179df2d5f34eb6216989aef2687f49f..236f3ccf8354b156737e03929ee538f99f1f4adf 100644
|
||||
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
|
||||
@@ -73,8 +73,7 @@ class ExtensionOptionsGuest
|
||||
@@ -74,8 +74,7 @@ class ExtensionOptionsGuest
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -324,10 +328,10 @@ index e39031afd8fff7cb6e278555cc58a48d86407d65..f67f6a5603c1fa9e66ccdde9b601df9a
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 60de0d74ee40fedcbae96e5049e21dc238bf33bf..c568d4d08f772e1d381820bed826a0b64a631449 100644
|
||||
index 0bba5f4b0abdaa55b7e406d39ccf3de33bf53194..ed4b8e0215a12adf95273109f7e4968d7b0cbf2a 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -452,8 +452,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -453,8 +453,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -338,10 +342,10 @@ index 60de0d74ee40fedcbae96e5049e21dc238bf33bf..c568d4d08f772e1d381820bed826a0b6
|
||||
|
||||
return true;
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc1559b74740 100644
|
||||
index 7eeffdfbda9611806c6f260f0c68f6d84689cb7e..5d8f6d132068d7fabaa52bc61354c71a8ac8cd20 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
|
||||
@@ -186,8 +186,7 @@ class MimeHandlerViewGuest
|
||||
@@ -187,8 +187,7 @@ class MimeHandlerViewGuest
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -352,10 +356,10 @@ index 2dcf51f335f5dac39f431c3e0f56f8789f33d40b..2b433624d0604e0b9da5117b9e83cc15
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
index 45c7aa83272dfa0d55ac3582a109b376184b389b..2841f550ac1724de4631aae0dd614e2ce3f522f5 100644
|
||||
index c61784e1d0717063e5aefd05d7c09358bae5b8c5..b987c5660942e94f89ff19cc55e032e4cb693863 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
@@ -576,8 +576,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -579,8 +579,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -366,10 +370,10 @@ index 45c7aa83272dfa0d55ac3582a109b376184b389b..2841f550ac1724de4631aae0dd614e2c
|
||||
// can catch bad client behavior while not interfering with normal operation.
|
||||
constexpr size_t kMaxPendingWebContentsCount = 10;
|
||||
diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h
|
||||
index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f541d9adb 100644
|
||||
index 756d4192271d6a65cfe8e1511737c565b543cb1f..5688f6f745056565c3c01947f741c4d13e27b6ae 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.h
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.h
|
||||
@@ -307,8 +307,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
|
||||
@@ -308,8 +308,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -380,10 +384,10 @@ index 1012a909ef1fcae51c218ae519fe7e0db65ab087..127b1ae940bc9313aecb635e2b01bb6f
|
||||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028db8406742 100644
|
||||
index b8f48c883d7adfd765b1561fd00e563ab54d20f5..0b3d8eef0ed0021d3546ff963e721eae277dcb1b 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -206,8 +206,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
@@ -207,8 +207,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -394,10 +398,10 @@ index 7ca1e83ba1fd2dc5ea7c7ce644c3b7c54b9999f9..c1639653714d6973bcb5a0b37cb7028d
|
||||
->options()
|
||||
->block_new_web_contents();
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
||||
index 250e7f524a9ab1cc6fda2bfefb3c78a8e971b625..55a0db02885a85e538d267402cfd0ac8ce52b921 100644
|
||||
index 42e0654da5659ba647529c4b0b97ec5df61d59a1..406e2ca73c182005014b56824e89ddfb25fd28f5 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -489,8 +489,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
@@ -490,8 +490,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -408,10 +412,10 @@ index 250e7f524a9ab1cc6fda2bfefb3c78a8e971b625..55a0db02885a85e538d267402cfd0ac8
|
||||
return delegate_->HandleShouldOverrideWebContentsCreation();
|
||||
}
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
|
||||
index c96aeb2571961fa2ad033ca38600006e0e657699..2c733734103bf2cc0af9bcfb32d753053a287775 100644
|
||||
index 0fa7e807d22f6f04b84f2d949fbdf892b94996bf..b0490ae36c9999a766bbf346e35807740f4f9af6 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.h
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.h
|
||||
@@ -167,8 +167,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
||||
@@ -168,8 +168,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -11,7 +11,7 @@ not need this dependency.
|
||||
refs https://chromium-review.googlesource.com/c/chromium/src/+/5573603
|
||||
|
||||
diff --git a/chrome/browser/ui/color/BUILD.gn b/chrome/browser/ui/color/BUILD.gn
|
||||
index 77c7485b0fa885ddff38f336d1c7a52f2e969c73..045c0751a0c43f3360e334dd227b6cff7ddfd681 100644
|
||||
index 29c3dafa96df631e36aa1ced6798990c768adeaa..0281a50f04fecfc4ded3805a8f9637e184288581 100644
|
||||
--- a/chrome/browser/ui/color/BUILD.gn
|
||||
+++ b/chrome/browser/ui/color/BUILD.gn
|
||||
@@ -84,9 +84,6 @@ source_set("mixers") {
|
||||
|
||||
@@ -39,10 +39,10 @@ index e87c180342b967756efeb701c73207fcee8754f1..42e37564e585987d367921568f0f1d2b
|
||||
NOTREACHED();
|
||||
}
|
||||
diff --git a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f759359066f 100644
|
||||
index b6985bd63a34c55154fcfae601add6ce6c451704..fb44cc65b1a15c8b69410a2a2cb925a0326bb438 100644
|
||||
--- a/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
+++ b/ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_ozone.cc
|
||||
@@ -111,7 +111,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
@@ -147,7 +147,8 @@ bool GlobalAcceleratorListenerOzone::StartListeningForAccelerator(
|
||||
const bool registered =
|
||||
platform_global_shortcut_listener_->RegisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(),
|
||||
@@ -52,7 +52,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
|
||||
if (registered) {
|
||||
registered_hot_keys_.insert(accelerator);
|
||||
}
|
||||
@@ -126,14 +127,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
@@ -162,14 +163,15 @@ void GlobalAcceleratorListenerOzone::StopListeningForAccelerator(
|
||||
|
||||
platform_global_shortcut_listener_->UnregisterAccelerator(
|
||||
accelerator.key_code(), accelerator.IsAltDown(), accelerator.IsCtrlDown(),
|
||||
@@ -70,7 +70,7 @@ index c98ecc36007185052481b6479b2ba4608e326021..dd0e4553b78997beea0f11242eeb9f75
|
||||
int modifiers = 0;
|
||||
if (is_alt_down) {
|
||||
modifiers |= ui::EF_ALT_DOWN;
|
||||
@@ -144,6 +146,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
@@ -180,6 +182,9 @@ void GlobalAcceleratorListenerOzone::OnKeyPressed(ui::KeyboardCode key_code,
|
||||
if (is_shift_down) {
|
||||
modifiers |= ui::EF_SHIFT_DOWN;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
|
||||
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c75c8ea1f1 100644
|
||||
index d55c408557e15650897c9ed6d5b6bd83178a551f..f1c54919990af204004380b0d84ee750de5e3c35 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -275,8 +275,13 @@ void AsanProcessInfoCB(const char*, bool*) {
|
||||
@@ -40,7 +40,7 @@ index a23d9b8fc451078708fd1a39f3d74357de7c244f..f619f8a360b43b43174647cd596ab9c7
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
}
|
||||
|
||||
@@ -982,7 +988,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
@@ -1005,7 +1011,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
return TerminateForFatalInitializationError();
|
||||
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
|
||||
|
||||
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3abf1e637e 100644
|
||||
index b4c984e0dd22f148a426ce0ea04988798ed95aaa..5fd099b6396fc51d29fce2843531d5fc89642d35 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1971,6 +1971,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1961,6 +1961,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -38,7 +38,7 @@ index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3a
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1990,9 +2010,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1980,9 +2000,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme_piece() == kChromeUIScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
@@ -49,7 +49,7 @@ index aa342545b9e629c4194b8da90380e612ede423d6..3ef48ead14bde84dac0207c1b9ceaf3a
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -2000,9 +2018,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1990,9 +2008,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
@@ -41,7 +41,7 @@ index a82e0b1a7e999817c8ee420ceddeb7ca9ee78caf..e07f4ded61a7a64983da1b6d07315aee
|
||||
|
||||
int DesktopMediaListBase::GetSourceCount() const {
|
||||
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
index 9368d56f2b434b1a7101f28908f070ad9908be7e..804eb2c7ede137b8c9d0cf43042ff7f20dad5b91 100644
|
||||
index de56c9b94f92e9abf69b1d4894e5d386cad6d3cd..f8955ef7cc43b1854b29841ed65260a1966a4b19 100644
|
||||
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
|
||||
@@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 88a6090a49da6071fded348a901c7c62b647b503..cf6f80bd3c9af0be5065e75e09a1b4150aeab0c8 100644
|
||||
index dc1dc1c15db217c4b8640b9c6ec6c051c0abb12b..52d8e830a68a6dfa3e3065548df3b69a5756ede2 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -560,7 +560,11 @@
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user