mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
114 Commits
timeout-ne
...
v22.0.2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
887595e861 | ||
|
|
8f5a8c684d | ||
|
|
1245e23a74 | ||
|
|
5e7ae98bec | ||
|
|
d6e58ec020 | ||
|
|
147c24208f | ||
|
|
470a365743 | ||
|
|
a07c34e420 | ||
|
|
effff34416 | ||
|
|
e65fc9116a | ||
|
|
a35de7e89f | ||
|
|
d225809cc4 | ||
|
|
763daa8707 | ||
|
|
0bd4cea3a0 | ||
|
|
02949a7e6f | ||
|
|
f05b54bdd3 | ||
|
|
f49f0d4cd7 | ||
|
|
a63ea46ab2 | ||
|
|
0b9206213c | ||
|
|
14fade2915 | ||
|
|
a7f80017cf | ||
|
|
64b514472d | ||
|
|
09430e27a9 | ||
|
|
896aa1adb9 | ||
|
|
32f71c118f | ||
|
|
dcce07dcd8 | ||
|
|
7949645606 | ||
|
|
38eb414298 | ||
|
|
27ce311a20 | ||
|
|
99c0e1cde2 | ||
|
|
5f030bdd2c | ||
|
|
38fa55d54e | ||
|
|
71941e720e | ||
|
|
8d9a9641cd | ||
|
|
e879e2f853 | ||
|
|
4989994ad9 | ||
|
|
ccc5a7abee | ||
|
|
6338350620 | ||
|
|
1601265cec | ||
|
|
02eef17791 | ||
|
|
17d712e9b4 | ||
|
|
5085ac7dae | ||
|
|
895f991816 | ||
|
|
d843ae327d | ||
|
|
5d418c5dab | ||
|
|
39f23b057e | ||
|
|
d8ddf31aa7 | ||
|
|
7a5d49bb8d | ||
|
|
44d72e39f7 | ||
|
|
ede27b75b0 | ||
|
|
96e82dc368 | ||
|
|
6908088d38 | ||
|
|
548a91a24b | ||
|
|
04b3fb30ea | ||
|
|
3395a813fb | ||
|
|
d299d267b3 | ||
|
|
71701978b8 | ||
|
|
7a8346cc11 | ||
|
|
ddcc9b20f2 | ||
|
|
4a13d2708c | ||
|
|
53ebcb0110 | ||
|
|
3a179fb2b7 | ||
|
|
820b80b320 | ||
|
|
60889443f7 | ||
|
|
15e0366c35 | ||
|
|
65c4cd7f19 | ||
|
|
286b533ec1 | ||
|
|
d0d7dfab67 | ||
|
|
3d619ac79f | ||
|
|
163518b80f | ||
|
|
b930387036 | ||
|
|
ba08f4c157 | ||
|
|
51f6a644e9 | ||
|
|
2b13ba9231 | ||
|
|
dc73409683 | ||
|
|
b637d0312c | ||
|
|
fa39ee4bb7 | ||
|
|
b0a5ada661 | ||
|
|
abf7a48605 | ||
|
|
0525247b38 | ||
|
|
6ee24c97ac | ||
|
|
72075edca5 | ||
|
|
f486172114 | ||
|
|
b938b30128 | ||
|
|
0b9212859b | ||
|
|
abd8c8367f | ||
|
|
9ab5b08466 | ||
|
|
8e7c81052d | ||
|
|
b403ccc73c | ||
|
|
583b24f0b2 | ||
|
|
b8a6fcd6c7 | ||
|
|
ec7e24da56 | ||
|
|
f232a31891 | ||
|
|
cc7822f950 | ||
|
|
71cbdb01b2 | ||
|
|
323803263f | ||
|
|
5b6b7e85ff | ||
|
|
0c8be31d1a | ||
|
|
b74a04cce5 | ||
|
|
a4afb0ab86 | ||
|
|
ba0ebeecdb | ||
|
|
1bcca22149 | ||
|
|
c87b479a05 | ||
|
|
07d4fc3288 | ||
|
|
bf8dec7b63 | ||
|
|
059f8cd353 | ||
|
|
8ca56d0ff8 | ||
|
|
1432649617 | ||
|
|
fb330fba9e | ||
|
|
09475f87f0 | ||
|
|
a9d1ccd6a0 | ||
|
|
1995972467 | ||
|
|
60ae79e418 | ||
|
|
71bc0395c5 |
@@ -137,7 +137,6 @@ env-mas-apple-silicon: &env-mas-apple-silicon
|
||||
MAS_BUILD: 'true'
|
||||
TARGET_ARCH: arm64
|
||||
USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1
|
||||
npm_config_arch: arm64
|
||||
|
||||
env-send-slack-notifications: &env-send-slack-notifications
|
||||
NOTIFY_SLACK: true
|
||||
@@ -551,6 +550,50 @@ step-gn-check: &step-gn-check
|
||||
node electron/script/gen-hunspell-filenames.js --check
|
||||
node electron/script/gen-libc++-filenames.js --check
|
||||
|
||||
step-electron-build: &step-electron-build
|
||||
run:
|
||||
name: Electron build
|
||||
no_output_timeout: 60m
|
||||
command: |
|
||||
# On arm platforms we generate a cross-arch ffmpeg that ninja does not seem
|
||||
# to realize is not correct / should be rebuilt. We delete it here so it is
|
||||
# rebuilt
|
||||
if [ "$TRIGGER_ARM_TEST" == "true" ]; then
|
||||
rm -f src/out/Default/libffmpeg.so
|
||||
fi
|
||||
cd src
|
||||
# Enable if things get really bad
|
||||
# if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
|
||||
# diskutil erasevolume HFS+ "xcode_disk" `hdiutil attach -nomount ram://12582912`
|
||||
# mv /Applications/Xcode-12.beta.5.app /Volumes/xcode_disk/
|
||||
# ln -s /Volumes/xcode_disk/Xcode-12.beta.5.app /Applications/Xcode-12.beta.5.app
|
||||
# fi
|
||||
|
||||
# Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space
|
||||
if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then
|
||||
ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
# Remove unused args from mksnapshot_args
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
SEDOPTION="-i ''"
|
||||
fi
|
||||
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
||||
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S)
|
||||
rm -rf out/Default/clang_x64_v8_arm64/gen
|
||||
rm -rf out/Default/clang_x64_v8_arm64/obj
|
||||
rm -rf out/Default/clang_x64_v8_arm64/thinlto-cache
|
||||
rm -rf out/Default/clang_x64/obj
|
||||
|
||||
# Regenerate because we just deleted some ninja files
|
||||
gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
|
||||
fi
|
||||
NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES
|
||||
cp out/Default/.ninja_log out/electron_ninja_log
|
||||
node electron/script/check-symlinks.js
|
||||
|
||||
step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip
|
||||
run:
|
||||
name: Strip electron binaries
|
||||
@@ -611,6 +654,28 @@ step-electron-publish: &step-electron-publish
|
||||
script/release/uploaders/upload.py --verbose
|
||||
fi
|
||||
|
||||
step-persist-data-for-tests: &step-persist-data-for-tests
|
||||
persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
# Build artifacts
|
||||
- src/out/Default/dist.zip
|
||||
- src/out/Default/mksnapshot.zip
|
||||
- src/out/Default/chromedriver.zip
|
||||
- src/out/Default/gen/node_headers
|
||||
- src/out/Default/overlapped-checker
|
||||
- src/out/ffmpeg/ffmpeg.zip
|
||||
- src/electron
|
||||
- src/third_party/electron_node
|
||||
- src/third_party/nan
|
||||
- src/cross-arch-snapshots
|
||||
- src/third_party/llvm-build
|
||||
- src/build/linux
|
||||
- src/buildtools/third_party/libc++
|
||||
- src/buildtools/third_party/libc++abi
|
||||
- src/out/Default/obj/buildtools/third_party
|
||||
- src/v8/tools/builtins-pgo
|
||||
|
||||
step-electron-dist-unzip: &step-electron-dist-unzip
|
||||
run:
|
||||
name: Unzip dist.zip
|
||||
@@ -762,16 +827,6 @@ step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols
|
||||
fi
|
||||
|
||||
step-maybe-zip-symbols: &step-maybe-zip-symbols
|
||||
run:
|
||||
name: Zip symbols
|
||||
command: |
|
||||
cd src
|
||||
export BUILD_PATH="$PWD/out/Default"
|
||||
ninja -C out/Default electron:licenses
|
||||
ninja -C out/Default electron:electron_version_file
|
||||
electron/script/zip-symbols.py -b $BUILD_PATH
|
||||
|
||||
step-maybe-zip-symbols-and-clean: &step-maybe-zip-symbols-and-clean
|
||||
run:
|
||||
name: Zip symbols
|
||||
command: |
|
||||
@@ -802,12 +857,6 @@ step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot
|
||||
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --create-snapshot-only
|
||||
mkdir cross-arch-snapshots
|
||||
cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots
|
||||
# Clean up so that ninja does not get confused
|
||||
if [ "`uname`" == "Linux" ]; then
|
||||
rm -f out/Default/libffmpeg.so
|
||||
elif [ "`uname`" == "Darwin" ]; then
|
||||
rm -f out/Default/libffmpeg.dylib
|
||||
fi
|
||||
fi
|
||||
|
||||
step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs
|
||||
@@ -906,6 +955,7 @@ step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-c
|
||||
rm -rf src/ios/chrome
|
||||
rm -rf src/third_party/blink/web_tests
|
||||
rm -rf src/third_party/blink/perf_tests
|
||||
rm -rf src/third_party/WebKit/LayoutTests
|
||||
rm -rf third_party/electron_node/deps/openssl
|
||||
rm -rf third_party/electron_node/deps/v8
|
||||
rm -rf chrome/test/data/xr/webvr_info
|
||||
@@ -986,6 +1036,99 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha
|
||||
#Compile ts/js to verify doc change didn't break anything
|
||||
- *step-ts-compile
|
||||
|
||||
steps-tests: &steps-tests
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-mksnapshot-unzip
|
||||
- *step-chromedriver-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-restore-brew-cache
|
||||
- *step-fix-known-hosts-linux
|
||||
- install-python2-mac
|
||||
- *step-install-signing-cert-on-mac
|
||||
|
||||
- run:
|
||||
name: Run Electron tests
|
||||
environment:
|
||||
MOCHA_REPORTER: mocha-multi-reporters
|
||||
ELECTRON_TEST_RESULTS_DIR: junit
|
||||
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
|
||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||
command: |
|
||||
cd src
|
||||
if [ "$IS_ASAN" == "1" ]; then
|
||||
ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron"
|
||||
export ASAN_OPTIONS="symbolize=0 handle_abort=1"
|
||||
export G_SLICE=always-malloc
|
||||
export NSS_DISABLE_ARENA_FREE_LIST=1
|
||||
export NSS_DISABLE_UNLOAD=1
|
||||
export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
|
||||
export MOCHA_TIMEOUT=180000
|
||||
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||
else
|
||||
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
||||
else
|
||||
if [ "$TARGET_ARCH" == "ia32" ]; then
|
||||
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
|
||||
fi
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.ts | circleci tests split --split-by=timings))
|
||||
fi
|
||||
fi
|
||||
- run:
|
||||
name: Check test results existence
|
||||
command: |
|
||||
cd src
|
||||
|
||||
# Check if test results exist and are not empty.
|
||||
if [ ! -s "junit/test-results-main.xml" ]; then
|
||||
exit 1
|
||||
fi
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
|
||||
- *step-verify-mksnapshot
|
||||
- *step-verify-chromedriver
|
||||
|
||||
- *step-maybe-notify-slack-failure
|
||||
|
||||
- *step-maybe-cleanup-arm64-mac
|
||||
|
||||
steps-test-nan: &steps-test-nan
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-fix-known-hosts-linux
|
||||
- run:
|
||||
name: Run Nan Tests
|
||||
command: |
|
||||
cd src
|
||||
node electron/script/nan-spec-runner.js
|
||||
|
||||
steps-test-node: &steps-test-node
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-fix-known-hosts-linux
|
||||
- run:
|
||||
name: Run Node Tests
|
||||
command: |
|
||||
cd src
|
||||
node electron/script/node-spec-runner.js --default --jUnitDir=junit
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
|
||||
# Command Aliases
|
||||
commands:
|
||||
install-python2-mac:
|
||||
@@ -1044,65 +1187,17 @@ commands:
|
||||
mv /var/portal/src ./
|
||||
fi
|
||||
|
||||
build_and_save_artifacts:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
build-nonproprietary-ffmpeg:
|
||||
type: boolean
|
||||
default: true
|
||||
steps:
|
||||
- *step-gn-gen-default
|
||||
- ninja_build_electron:
|
||||
clean-prebuilt-snapshot: false
|
||||
- *step-maybe-electron-dist-strip
|
||||
- step-electron-dist-build:
|
||||
additional-targets: shell_browser_ui_unittests third_party/electron_node:headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip
|
||||
|
||||
- *step-show-goma-stats
|
||||
|
||||
# mksnapshot
|
||||
- *step-mksnapshot-build
|
||||
- *step-maybe-cross-arch-snapshot
|
||||
|
||||
# chromedriver
|
||||
- *step-electron-chromedriver-build
|
||||
|
||||
- when:
|
||||
condition: << parameters.build-nonproprietary-ffmpeg >>
|
||||
steps:
|
||||
# ffmpeg
|
||||
- *step-ffmpeg-gn-gen
|
||||
- *step-ffmpeg-build
|
||||
|
||||
- *step-maybe-generate-breakpad-symbols
|
||||
- *step-maybe-zip-symbols
|
||||
|
||||
- move_and_store_all_artifacts:
|
||||
artifact-key: << parameters.artifact-key >>
|
||||
|
||||
move_and_store_all_artifacts:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
steps:
|
||||
- run:
|
||||
name: Move all generated artifacts to upload folder
|
||||
command: |
|
||||
rm -rf generated_artifacts_<< parameters.artifact-key >>
|
||||
mkdir generated_artifacts_<< parameters.artifact-key >>
|
||||
rm -rf generated_artifacts
|
||||
mkdir generated_artifacts
|
||||
mv_if_exist() {
|
||||
if [ -f "$1" ] || [ -d "$1" ]; then
|
||||
echo Storing $1
|
||||
mv $1 generated_artifacts_<< parameters.artifact-key >>
|
||||
else
|
||||
echo Skipping $1 - It is not present on disk
|
||||
fi
|
||||
}
|
||||
cp_if_exist() {
|
||||
if [ -f "$1" ] || [ -d "$1" ]; then
|
||||
echo Storing $1
|
||||
cp $1 generated_artifacts_<< parameters.artifact-key >>
|
||||
mv $1 generated_artifacts
|
||||
else
|
||||
echo Skipping $1 - It is not present on disk
|
||||
fi
|
||||
@@ -1115,43 +1210,15 @@ commands:
|
||||
mv_if_exist src/out/ffmpeg/ffmpeg.zip
|
||||
mv_if_exist src/out/Default/hunspell_dictionaries.zip
|
||||
mv_if_exist src/cross-arch-snapshots
|
||||
cp_if_exist src/out/electron_ninja_log
|
||||
cp_if_exist src/out/Default/.ninja_log
|
||||
mv_if_exist src/out/electron_ninja_log
|
||||
mv_if_exist src/out/Default/.ninja_log
|
||||
when: always
|
||||
- store_artifacts:
|
||||
path: generated_artifacts_<< parameters.artifact-key >>
|
||||
destination: ./<< parameters.artifact-key >>
|
||||
path: generated_artifacts
|
||||
destination: ./
|
||||
- store_artifacts:
|
||||
path: generated_artifacts_<< parameters.artifact-key >>/cross-arch-snapshots
|
||||
destination: << parameters.artifact-key >>/cross-arch-snapshots
|
||||
|
||||
restore_build_artifacts:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Restore key specific artifacts
|
||||
command: |
|
||||
mv_if_exist() {
|
||||
if [ -f "generated_artifacts_<< parameters.artifact-key >>/$1" ] || [ -d "generated_artifacts_<< parameters.artifact-key >>/$1" ]; then
|
||||
echo Restoring $1 to $2
|
||||
mkdir -p $2
|
||||
mv generated_artifacts_<< parameters.artifact-key >>/$1 $2
|
||||
else
|
||||
echo Skipping $1 - It is not present on disk
|
||||
fi
|
||||
}
|
||||
mv_if_exist dist.zip src/out/Default
|
||||
mv_if_exist node_headers.tar.gz src/out/Default/gen
|
||||
mv_if_exist symbols.zip src/out/Default
|
||||
mv_if_exist mksnapshot.zip src/out/Default
|
||||
mv_if_exist chromedriver.zip src/out/Default
|
||||
mv_if_exist ffmpeg.zip src/out/ffmpeg
|
||||
mv_if_exist hunspell_dictionaries.zip src/out/Default
|
||||
mv_if_exist cross-arch-snapshots src
|
||||
path: generated_artifacts/cross-arch-snapshots
|
||||
destination: cross-arch-snapshots
|
||||
|
||||
checkout-from-cache:
|
||||
steps:
|
||||
@@ -1185,7 +1252,7 @@ commands:
|
||||
command: |
|
||||
cd src
|
||||
if [ "$SKIP_DIST_ZIP" != "1" ]; then
|
||||
ninja -C out/Default electron:electron_dist_zip << parameters.additional-targets >> -j $NUMBER_OF_NINJA_PROCESSES
|
||||
ninja -C out/Default electron:electron_dist_zip << parameters.additional-targets >>
|
||||
if [ "$CHECK_DIST_MANIFEST" == "1" ]; then
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
target_os=mac
|
||||
@@ -1211,47 +1278,6 @@ commands:
|
||||
fi
|
||||
fi
|
||||
|
||||
ninja_build_electron:
|
||||
parameters:
|
||||
clean-prebuilt-snapshot:
|
||||
type: boolean
|
||||
default: true
|
||||
steps:
|
||||
- run:
|
||||
name: Electron build
|
||||
no_output_timeout: 60m
|
||||
command: |
|
||||
cd src
|
||||
|
||||
# Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space
|
||||
if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then
|
||||
ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||
# Remove unused args from mksnapshot_args
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
SEDOPTION="-i ''"
|
||||
fi
|
||||
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
||||
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S)
|
||||
if [ "<< parameters.clean-prebuilt-snapshot >>" == "true" ]; then
|
||||
rm -rf out/Default/clang_x64_v8_arm64/gen
|
||||
rm -rf out/Default/clang_x64_v8_arm64/obj
|
||||
rm -rf out/Default/clang_x64_v8_arm64/thinlto-cache
|
||||
rm -rf out/Default/clang_x64/obj
|
||||
# Regenerate because we just deleted some ninja files
|
||||
gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
|
||||
fi
|
||||
# For x-compiles this will be built to the wrong arch after the context snapshot build
|
||||
# so we wipe it before re-linking it below
|
||||
rm -rf out/Default/libffmpeg.dylib
|
||||
fi
|
||||
NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES
|
||||
cp out/Default/.ninja_log out/electron_ninja_log
|
||||
node electron/script/check-symlinks.js
|
||||
|
||||
electron-build:
|
||||
parameters:
|
||||
attach:
|
||||
@@ -1284,14 +1310,6 @@ commands:
|
||||
build-nonproprietary-ffmpeg:
|
||||
type: boolean
|
||||
default: true
|
||||
artifact-key:
|
||||
type: string
|
||||
after-build-and-save:
|
||||
type: steps
|
||||
default: []
|
||||
after-persist:
|
||||
type: steps
|
||||
default: []
|
||||
steps:
|
||||
- when:
|
||||
condition: << parameters.attach >>
|
||||
@@ -1407,148 +1425,52 @@ commands:
|
||||
- *step-fix-sync
|
||||
- *step-delete-git-directories
|
||||
|
||||
- when:
|
||||
condition: << parameters.build >>
|
||||
steps:
|
||||
- build_and_save_artifacts:
|
||||
artifact-key: << parameters.artifact-key >>
|
||||
build-nonproprietary-ffmpeg: << parameters.build-nonproprietary-ffmpeg >>
|
||||
- steps: << parameters.after-build-and-save >>
|
||||
|
||||
# Save all data needed for a further tests run.
|
||||
# Electron app
|
||||
- *step-gn-gen-default
|
||||
- *step-electron-build
|
||||
- *step-maybe-electron-dist-strip
|
||||
- step-electron-dist-build:
|
||||
additional-targets: shell_browser_ui_unittests third_party/electron_node:headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip
|
||||
|
||||
- *step-show-goma-stats
|
||||
|
||||
# mksnapshot
|
||||
- *step-mksnapshot-build
|
||||
- *step-maybe-cross-arch-snapshot
|
||||
|
||||
# chromedriver
|
||||
- *step-electron-chromedriver-build
|
||||
|
||||
- when:
|
||||
condition: << parameters.persist >>
|
||||
condition: << parameters.build-nonproprietary-ffmpeg >>
|
||||
steps:
|
||||
- *step-minimize-workspace-size-from-checkout
|
||||
- run: |
|
||||
rm -rf src/third_party/electron_node/deps/openssl
|
||||
rm -rf src/third_party/electron_node/deps/v8
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
# Build artifacts
|
||||
- generated_artifacts_<< parameters.artifact-key >>
|
||||
- src/out/Default/gen/node_headers
|
||||
- src/out/Default/overlapped-checker
|
||||
- src/electron
|
||||
- src/third_party/electron_node
|
||||
- src/third_party/nan
|
||||
- src/cross-arch-snapshots
|
||||
- src/third_party/llvm-build
|
||||
- src/build/linux
|
||||
- src/buildtools/third_party/libc++
|
||||
- src/buildtools/third_party/libc++abi
|
||||
- src/out/Default/obj/buildtools/third_party
|
||||
- src/v8/tools/builtins-pgo
|
||||
- steps: << parameters.after-persist >>
|
||||
# ffmpeg
|
||||
- *step-ffmpeg-gn-gen
|
||||
- *step-ffmpeg-build
|
||||
|
||||
# Save all data needed for a further tests run.
|
||||
- when:
|
||||
condition: << parameters.persist >>
|
||||
steps:
|
||||
- *step-minimize-workspace-size-from-checkout
|
||||
- run: |
|
||||
rm -rf src/third_party/electron_node/deps/openssl
|
||||
rm -rf src/third_party/electron_node/deps/v8
|
||||
- *step-persist-data-for-tests
|
||||
|
||||
- when:
|
||||
condition: << parameters.build >>
|
||||
steps:
|
||||
- *step-maybe-generate-breakpad-symbols
|
||||
- *step-maybe-zip-symbols
|
||||
|
||||
- when:
|
||||
condition: << parameters.build >>
|
||||
steps:
|
||||
- move_and_store_all_artifacts
|
||||
|
||||
- *step-maybe-notify-slack-failure
|
||||
|
||||
electron-tests:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
steps:
|
||||
- restore_build_artifacts:
|
||||
artifact-key: << parameters.artifact-key >>
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-mksnapshot-unzip
|
||||
- *step-chromedriver-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-restore-brew-cache
|
||||
- *step-fix-known-hosts-linux
|
||||
- install-python2-mac
|
||||
- *step-install-signing-cert-on-mac
|
||||
|
||||
- run:
|
||||
name: Run Electron tests
|
||||
environment:
|
||||
MOCHA_REPORTER: mocha-multi-reporters
|
||||
ELECTRON_TEST_RESULTS_DIR: junit
|
||||
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
|
||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||
command: |
|
||||
cd src
|
||||
if [ "$IS_ASAN" == "1" ]; then
|
||||
ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron"
|
||||
export ASAN_OPTIONS="symbolize=0 handle_abort=1"
|
||||
export G_SLICE=always-malloc
|
||||
export NSS_DISABLE_ARENA_FREE_LIST=1
|
||||
export NSS_DISABLE_UNLOAD=1
|
||||
export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
|
||||
export MOCHA_TIMEOUT=180000
|
||||
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||
else
|
||||
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
||||
else
|
||||
if [ "$TARGET_ARCH" == "ia32" ]; then
|
||||
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
|
||||
fi
|
||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.ts | circleci tests split --split-by=timings))
|
||||
fi
|
||||
fi
|
||||
- run:
|
||||
name: Check test results existence
|
||||
command: |
|
||||
cd src
|
||||
|
||||
# Check if test results exist and are not empty.
|
||||
if [ ! -s "junit/test-results-main.xml" ]; then
|
||||
exit 1
|
||||
fi
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
|
||||
- *step-verify-mksnapshot
|
||||
- *step-verify-chromedriver
|
||||
|
||||
- *step-maybe-notify-slack-failure
|
||||
|
||||
- *step-maybe-cleanup-arm64-mac
|
||||
|
||||
nan-tests:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
steps:
|
||||
- restore_build_artifacts:
|
||||
artifact-key: << parameters.artifact-key >>
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-fix-known-hosts-linux
|
||||
- run:
|
||||
name: Run Nan Tests
|
||||
command: |
|
||||
cd src
|
||||
node electron/script/nan-spec-runner.js
|
||||
|
||||
node-tests:
|
||||
parameters:
|
||||
artifact-key:
|
||||
type: string
|
||||
steps:
|
||||
- restore_build_artifacts:
|
||||
artifact-key: << parameters.artifact-key >>
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- *step-fix-known-hosts-linux
|
||||
- run:
|
||||
name: Run Node Tests
|
||||
command: |
|
||||
cd src
|
||||
node electron/script/node-spec-runner.js --default --jUnitDir=junit
|
||||
- store_test_results:
|
||||
path: src/junit
|
||||
|
||||
electron-publish:
|
||||
parameters:
|
||||
attach:
|
||||
@@ -1588,12 +1510,12 @@ commands:
|
||||
- *step-gn-gen-default
|
||||
|
||||
# Electron app
|
||||
- ninja_build_electron
|
||||
- *step-electron-build
|
||||
- *step-show-goma-stats
|
||||
- *step-maybe-generate-breakpad-symbols
|
||||
- *step-maybe-electron-dist-strip
|
||||
- step-electron-dist-build
|
||||
- *step-maybe-zip-symbols-and-clean
|
||||
- *step-maybe-zip-symbols
|
||||
|
||||
# mksnapshot
|
||||
- *step-mksnapshot-build
|
||||
@@ -1619,8 +1541,7 @@ commands:
|
||||
|
||||
# Publish
|
||||
- *step-electron-publish
|
||||
- move_and_store_all_artifacts:
|
||||
artifact-key: 'publish'
|
||||
- move_and_store_all_artifacts
|
||||
|
||||
# List of all jobs.
|
||||
jobs:
|
||||
@@ -1650,7 +1571,6 @@ jobs:
|
||||
checkout: true
|
||||
save-git-cache: true
|
||||
checkout-to-create-src-cache: true
|
||||
artifact-key: 'nil'
|
||||
|
||||
mac-checkout:
|
||||
executor:
|
||||
@@ -1668,7 +1588,6 @@ jobs:
|
||||
checkout: true
|
||||
persist-checkout: true
|
||||
restore-src-cache: false
|
||||
artifact-key: 'nil'
|
||||
|
||||
mac-make-src-cache:
|
||||
executor:
|
||||
@@ -1686,7 +1605,6 @@ jobs:
|
||||
checkout: true
|
||||
save-git-cache: true
|
||||
checkout-to-create-src-cache: true
|
||||
artifact-key: 'nil'
|
||||
|
||||
# Layer 2: Builds.
|
||||
linux-x64-testing:
|
||||
@@ -1703,7 +1621,6 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
artifact-key: 'linux-x64'
|
||||
|
||||
linux-x64-testing-asan:
|
||||
executor:
|
||||
@@ -1721,7 +1638,6 @@ jobs:
|
||||
persist: true
|
||||
checkout: true
|
||||
build-nonproprietary-ffmpeg: false
|
||||
artifact-key: 'linux-x64-asan'
|
||||
|
||||
linux-x64-testing-no-run-as-node:
|
||||
executor:
|
||||
@@ -1737,7 +1653,6 @@ jobs:
|
||||
- electron-build:
|
||||
persist: false
|
||||
checkout: true
|
||||
artifact-key: 'linux-x64-no-run-as-node'
|
||||
|
||||
linux-x64-testing-gn-check:
|
||||
executor:
|
||||
@@ -1788,7 +1703,6 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
artifact-key: 'linux-arm'
|
||||
|
||||
linux-arm-publish:
|
||||
executor:
|
||||
@@ -1831,7 +1745,6 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
artifact-key: 'linux-arm64'
|
||||
|
||||
linux-arm64-testing-gn-check:
|
||||
executor:
|
||||
@@ -1883,22 +1796,6 @@ jobs:
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: true
|
||||
artifact-key: 'darwin-x64'
|
||||
after-build-and-save:
|
||||
- run:
|
||||
name: Configuring MAS build
|
||||
command: |
|
||||
echo 'export GN_EXTRA_ARGS="is_mas_build = true $GN_EXTRA_ARGS"' >> $BASH_ENV
|
||||
echo 'export MAS_BUILD="true"' >> $BASH_ENV
|
||||
rm -rf "src/out/Default/Electron Framework.framework"
|
||||
rm -rf src/out/Default/Electron*.app
|
||||
- build_and_save_artifacts:
|
||||
artifact-key: 'mas-x64'
|
||||
after-persist:
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- generated_artifacts_mas-x64
|
||||
|
||||
osx-testing-x64-gn-check:
|
||||
executor:
|
||||
@@ -1971,22 +1868,35 @@ jobs:
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: true
|
||||
artifact-key: 'darwin-arm64'
|
||||
after-build-and-save:
|
||||
- run:
|
||||
name: Configuring MAS build
|
||||
command: |
|
||||
echo 'export GN_EXTRA_ARGS="is_mas_build = true $GN_EXTRA_ARGS"' >> $BASH_ENV
|
||||
echo 'export MAS_BUILD="true"' >> $BASH_ENV
|
||||
rm -rf "src/out/Default/Electron Framework.framework"
|
||||
rm -rf src/out/Default/Electron*.app
|
||||
- build_and_save_artifacts:
|
||||
artifact-key: 'mas-arm64'
|
||||
after-persist:
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
paths:
|
||||
- generated_artifacts_mas-arm64
|
||||
|
||||
mas-testing-x64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-mas
|
||||
<<: *env-testing-build
|
||||
<<: *env-ninja-status
|
||||
<<: *env-macos-build
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
steps:
|
||||
- electron-build:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: true
|
||||
|
||||
mas-testing-x64-gn-check:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
environment:
|
||||
<<: *env-machine-mac
|
||||
<<: *env-mas
|
||||
<<: *env-testing-build
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
mas-publish-x64:
|
||||
executor:
|
||||
@@ -2031,6 +1941,25 @@ jobs:
|
||||
attach: true
|
||||
checkout: false
|
||||
|
||||
mas-testing-arm64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-testing-build
|
||||
<<: *env-ninja-status
|
||||
<<: *env-macos-build
|
||||
<<: *env-mas-apple-silicon
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
GENERATE_CROSS_ARCH_SNAPSHOT: true
|
||||
steps:
|
||||
- electron-build:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: true
|
||||
|
||||
# Layer 3: Tests.
|
||||
linux-x64-testing-tests:
|
||||
executor:
|
||||
@@ -2041,9 +1970,7 @@ jobs:
|
||||
<<: *env-headless-testing
|
||||
<<: *env-stack-dumping
|
||||
parallelism: 3
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: linux-x64
|
||||
<<: *steps-tests
|
||||
|
||||
linux-x64-testing-asan-tests:
|
||||
executor:
|
||||
@@ -2056,9 +1983,7 @@ jobs:
|
||||
IS_ASAN: '1'
|
||||
DISABLE_CRASH_REPORTER_TESTS: '1'
|
||||
parallelism: 3
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: linux-x64-asan
|
||||
<<: *steps-tests
|
||||
|
||||
linux-x64-testing-nan:
|
||||
executor:
|
||||
@@ -2068,9 +1993,7 @@ jobs:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-headless-testing
|
||||
<<: *env-stack-dumping
|
||||
steps:
|
||||
- nan-tests:
|
||||
artifact-key: linux-x64
|
||||
<<: *steps-test-nan
|
||||
|
||||
linux-x64-testing-node:
|
||||
executor:
|
||||
@@ -2080,9 +2003,7 @@ jobs:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-headless-testing
|
||||
<<: *env-stack-dumping
|
||||
steps:
|
||||
- node-tests:
|
||||
artifact-key: linux-x64
|
||||
<<: *steps-test-node
|
||||
|
||||
linux-arm-testing-tests:
|
||||
executor: linux-arm
|
||||
@@ -2091,9 +2012,7 @@ jobs:
|
||||
<<: *env-global
|
||||
<<: *env-headless-testing
|
||||
<<: *env-stack-dumping
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: linux-arm
|
||||
<<: *steps-tests
|
||||
|
||||
linux-arm64-testing-tests:
|
||||
executor: linux-arm64
|
||||
@@ -2102,11 +2021,9 @@ jobs:
|
||||
<<: *env-global
|
||||
<<: *env-headless-testing
|
||||
<<: *env-stack-dumping
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: linux-arm64
|
||||
<<: *steps-tests
|
||||
|
||||
darwin-testing-x64-tests:
|
||||
osx-testing-x64-tests:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
@@ -2114,20 +2031,16 @@ jobs:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
parallelism: 2
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: darwin-x64
|
||||
<<: *steps-tests
|
||||
|
||||
darwin-testing-arm64-tests:
|
||||
osx-testing-arm64-tests:
|
||||
executor: apple-silicon
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
<<: *env-apple-silicon
|
||||
<<: *env-runner
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: darwin-arm64
|
||||
<<: *steps-tests
|
||||
|
||||
mas-testing-x64-tests:
|
||||
executor:
|
||||
@@ -2137,9 +2050,7 @@ jobs:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
parallelism: 2
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: mas-x64
|
||||
<<: *steps-tests
|
||||
|
||||
mas-testing-arm64-tests:
|
||||
executor: apple-silicon
|
||||
@@ -2148,9 +2059,7 @@ jobs:
|
||||
<<: *env-stack-dumping
|
||||
<<: *env-apple-silicon
|
||||
<<: *env-runner
|
||||
steps:
|
||||
- electron-tests:
|
||||
artifact-key: mas-arm64
|
||||
<<: *steps-tests
|
||||
|
||||
# List all workflows
|
||||
workflows:
|
||||
@@ -2264,29 +2173,40 @@ workflows:
|
||||
- osx-testing-x64-gn-check:
|
||||
requires:
|
||||
- mac-make-src-cache
|
||||
- darwin-testing-x64-tests:
|
||||
- osx-testing-x64-tests:
|
||||
requires:
|
||||
- osx-testing-x64
|
||||
- osx-testing-arm64:
|
||||
requires:
|
||||
- mac-make-src-cache
|
||||
- darwin-testing-arm64-tests:
|
||||
- osx-testing-arm64-tests:
|
||||
filters:
|
||||
branches:
|
||||
# Do not run this on forked pull requests
|
||||
ignore: /pull\/[0-9]+/
|
||||
requires:
|
||||
- osx-testing-arm64
|
||||
- mas-testing-x64:
|
||||
requires:
|
||||
- mac-make-src-cache
|
||||
- mas-testing-x64-gn-check:
|
||||
requires:
|
||||
- mac-make-src-cache
|
||||
- mas-testing-x64-tests:
|
||||
requires:
|
||||
- osx-testing-x64
|
||||
- mas-testing-x64
|
||||
- mas-testing-arm64:
|
||||
requires:
|
||||
- mac-make-src-cache
|
||||
- mas-testing-arm64-tests:
|
||||
filters:
|
||||
branches:
|
||||
# Do not run this on forked pull requests
|
||||
ignore: /pull\/[0-9]+/
|
||||
requires:
|
||||
- osx-testing-arm64
|
||||
- mas-testing-arm64
|
||||
lint:
|
||||
jobs:
|
||||
- lint
|
||||
|
||||
# VS Code Extension Version: 1.4.0
|
||||
@@ -4,13 +4,14 @@ Welcome to the Codespaces Electron Developer Environment.
|
||||
|
||||
## Quick Start
|
||||
|
||||
Upon creation of your codespace you should have [build tools](https://github.com/electron/build-tools) installed and an initialized gclient checkout of Electron. In order to build electron you'll need to run the following command.
|
||||
Upon creation of your codespace you should have [build tools](https://github.com/electron/build-tools) installed and an initialized gclient checkout of Electron. In order to build electron you'll need to run the following commands.
|
||||
|
||||
```bash
|
||||
e sync -vv
|
||||
e build
|
||||
```
|
||||
|
||||
The initial build will take ~8 minutes. Incremental builds are substantially quicker. If you pull changes from upstream that touch either the `patches` folder or the `DEPS` folder you will have to run `e sync` in order to keep your checkout up to date.
|
||||
The initial sync will take approximately ~30 minutes and the build will take ~8 minutes. Incremental syncs and incremental builds are substantially quicker.
|
||||
|
||||
## Directory Structure
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"dockerComposeFile": "docker-compose.yml",
|
||||
"service": "buildtools",
|
||||
"onCreateCommand": ".devcontainer/on-create-command.sh",
|
||||
"updateContentCommand": ".devcontainer/update-content-command.sh",
|
||||
"workspaceFolder": "/workspaces/gclient/src/electron",
|
||||
"extensions": [
|
||||
"joeleinbinder.mojom-language",
|
||||
@@ -12,28 +11,14 @@
|
||||
"mutantdino.resourcemonitor",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"shakram02.bash-beautify",
|
||||
"marshallofsound.gnls-electron",
|
||||
"CircleCI.circleci"
|
||||
"marshallofsound.gnls-electron"
|
||||
],
|
||||
"settings": {
|
||||
"editor.tabSize": 2,
|
||||
"bashBeautify.tabSize": 2,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"[gn]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"typescript.preferences.quoteStyle": "single"
|
||||
"editor.tabSize": 2,
|
||||
"bashBeautify.tabSize": 2
|
||||
},
|
||||
"forwardPorts": [8088, 6080, 5901],
|
||||
"portsAttributes": {
|
||||
@@ -51,15 +36,8 @@
|
||||
}
|
||||
},
|
||||
"hostRequirements": {
|
||||
"storage": "128gb",
|
||||
"cpus": 16
|
||||
"storage": "32gb",
|
||||
"cpus": 8
|
||||
},
|
||||
"remoteUser": "builduser",
|
||||
"customizations": {
|
||||
"codespaces": {
|
||||
"openFiles": [
|
||||
".devcontainer/README.md"
|
||||
]
|
||||
}
|
||||
}
|
||||
"remoteUser": "builduser"
|
||||
}
|
||||
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
buildtools:
|
||||
image: ghcr.io/electron/devcontainer:3d8d44d0f15b05bef6149e448f9cc522111847e9
|
||||
image: ghcr.io/electron/devcontainer:27db4a3e3512bfd2e47f58cea69922da0835f1d9
|
||||
|
||||
volumes:
|
||||
- ..:/workspaces/gclient/src/electron:cached
|
||||
|
||||
@@ -10,7 +10,6 @@ export PATH="$PATH:$buildtools/src"
|
||||
|
||||
# Create the persisted buildtools config folder
|
||||
mkdir -p $buildtools_configs
|
||||
mkdir -p $gclient_root/.git-cache
|
||||
rm -f $buildtools/configs
|
||||
ln -s $buildtools_configs $buildtools/configs
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eo pipefail
|
||||
|
||||
buildtools=$HOME/.electron_build_tools
|
||||
|
||||
export PATH="$PATH:$buildtools/src"
|
||||
|
||||
# Sync latest
|
||||
e d gclient sync --with_branch_heads --with_tags
|
||||
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
3
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -1,5 +1,4 @@
|
||||
#### Description of Change
|
||||
|
||||
<!--
|
||||
Thank you for your Pull Request. Please provide a description above and review
|
||||
the requirements below.
|
||||
@@ -13,7 +12,7 @@ Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.
|
||||
- [ ] PR description included and stakeholders cc'd
|
||||
- [ ] `npm test` passes
|
||||
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
|
||||
- [ ] relevant documentation, tutorials, templates and examples are changed or added
|
||||
- [ ] relevant documentation is changed or added
|
||||
- [ ] [PR release notes](https://github.com/electron/clerk/blob/master/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/master/README.md#examples).
|
||||
|
||||
#### Release Notes
|
||||
|
||||
14
.github/stale.yml
vendored
Normal file
14
.github/stale.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
daysUntilStale: 90
|
||||
daysUntilClose: 30
|
||||
exemptLabels:
|
||||
- discussion
|
||||
- security 🔒
|
||||
- "enhancement :sparkles:"
|
||||
staleLabel: stale
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the [latest version of Electron](https://www.electronjs.org/releases/stable) or in the [beta](https://www.electronjs.org/releases/beta)—please include it with your comment!
|
||||
closeComment: >
|
||||
This issue has been closed as it was considered stale, this issue will not be
|
||||
monitored. If this is a bug and you can reproduce this issue on a [supported
|
||||
version of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline) please open a new issue and ensure a repro is provided.
|
||||
|
||||
15
.github/workflows/electron_woa_testing.yml
vendored
15
.github/workflows/electron_woa_testing.yml
vendored
@@ -10,9 +10,6 @@ on:
|
||||
type: text
|
||||
required: true
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
electron-woa-init:
|
||||
if: ${{ github.event_name == 'push' && github.repository == 'electron/electron' }}
|
||||
@@ -29,7 +26,7 @@ jobs:
|
||||
checks: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: LouisBrunner/checks-action@442ad2296fb110373e3fe01c2a3717b546583631 # tag: v1.1.1
|
||||
- uses: LouisBrunner/checks-action@v1.1.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
name: electron-woa-testing
|
||||
@@ -42,7 +39,7 @@ jobs:
|
||||
Remove-Item * -Recurse -Force
|
||||
shell: powershell
|
||||
- name: Checkout
|
||||
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag: v3
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: src\electron
|
||||
fetch-depth: 0
|
||||
@@ -137,7 +134,7 @@ jobs:
|
||||
run: |
|
||||
Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
|
||||
shell: powershell
|
||||
- uses: LouisBrunner/checks-action@442ad2296fb110373e3fe01c2a3717b546583631 # tag: v1.1.1
|
||||
- uses: LouisBrunner/checks-action@v1.1.1
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -146,7 +143,7 @@ jobs:
|
||||
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
output: |
|
||||
{"summary":"${{ job.status }}","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
|
||||
- uses: LouisBrunner/checks-action@442ad2296fb110373e3fe01c2a3717b546583631 # tag: v1.1.1
|
||||
- uses: LouisBrunner/checks-action@v1.1.1
|
||||
if: ${{ success() }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -155,7 +152,7 @@ jobs:
|
||||
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
output: |
|
||||
{"summary":"Job Succeeded","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
|
||||
- uses: LouisBrunner/checks-action@442ad2296fb110373e3fe01c2a3717b546583631 # tag: v1.1.1
|
||||
- uses: LouisBrunner/checks-action@v1.1.1
|
||||
if: ${{ ! success() }}
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -163,4 +160,4 @@ jobs:
|
||||
conclusion: "${{ job.status }}"
|
||||
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||
output: |
|
||||
{"summary":"Job Failed","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
|
||||
{"summary":"Job Failed","text_description":"See job details here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}
|
||||
8
.github/workflows/issue-labeled.yml
vendored
8
.github/workflows/issue-labeled.yml
vendored
@@ -4,16 +4,11 @@ on:
|
||||
issues:
|
||||
types: [labeled]
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
issue-labeled:
|
||||
permissions:
|
||||
issues: write # for actions-cool/issues-helper to update issues
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: blocked/need-repro label added
|
||||
- name: blocked/need-repro
|
||||
if: github.event.label.name == 'blocked/need-repro'
|
||||
uses: actions-cool/issues-helper@dad28fdb88da5f082c04659b7373d85790f9b135 # v3.3.0
|
||||
with:
|
||||
@@ -26,3 +21,4 @@ jobs:
|
||||
Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.
|
||||
|
||||
Now adding the `blocked/need-repro` label for this reason. After you make a test case, please link to it in a followup comment. This issue will be closed in 10 days if the above is not addressed.
|
||||
|
||||
|
||||
@@ -7,14 +7,11 @@ on:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check_tag:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag: v3
|
||||
- uses: actions/checkout@v3
|
||||
- name: Check Tag
|
||||
run: |
|
||||
if [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.0\.0$ ]]; then
|
||||
@@ -25,7 +22,7 @@ jobs:
|
||||
needs: check_tag
|
||||
if: needs.check_tag.outputs.should_release == 'true'
|
||||
steps:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag: v3
|
||||
- uses: actions/checkout@v3
|
||||
- name: Trigger New chromedriver Release
|
||||
run: |
|
||||
gh api /repos/:owner/chromedriver/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
|
||||
|
||||
54
.github/workflows/scorecards.yml
vendored
54
.github/workflows/scorecards.yml
vendored
@@ -1,54 +0,0 @@
|
||||
name: Scorecards supply-chain security
|
||||
on:
|
||||
# Only the default branch is supported.
|
||||
branch_protection_rule:
|
||||
schedule:
|
||||
- cron: '44 17 * * 0'
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
|
||||
# Declare default permissions as read only.
|
||||
permissions: read-all
|
||||
|
||||
jobs:
|
||||
analysis:
|
||||
name: Scorecards analysis
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
# Needed to upload the results to code-scanning dashboard.
|
||||
security-events: write
|
||||
# Used to receive a badge.
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 # tag=v3.0.0
|
||||
with:
|
||||
persist-credentials: false
|
||||
|
||||
- name: "Run analysis"
|
||||
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # tag=v2.0.6
|
||||
with:
|
||||
results_file: results.sarif
|
||||
results_format: sarif
|
||||
|
||||
# Publish the results for public repositories to enable scorecard badges. For more details, see
|
||||
# https://github.com/ossf/scorecard-action#publishing-results.
|
||||
# For private repositories, `publish_results` will automatically be set to `false`, regardless
|
||||
# of the value entered here.
|
||||
publish_results: true
|
||||
|
||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||
# format to the repository Actions tab.
|
||||
- name: "Upload artifact"
|
||||
uses: actions/upload-artifact@6673cd052c4cd6fcf4b4e6e60ea986c889389535 # tag=v3.0.0
|
||||
with:
|
||||
name: SARIF file
|
||||
path: results.sarif
|
||||
retention-days: 5
|
||||
|
||||
# Upload the results to GitHub's code scanning dashboard.
|
||||
- name: "Upload to code-scanning"
|
||||
uses: github/codeql-action/upload-sarif@5f532563584d71fdef14ee64d17bafb34f751ce5 # tag=v1.0.26
|
||||
with:
|
||||
sarif_file: results.sarif
|
||||
2
.github/workflows/semantic.yml
vendored
2
.github/workflows/semantic.yml
vendored
@@ -19,7 +19,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: semantic-pull-request
|
||||
uses: amannn/action-semantic-pull-request@505e44b4f33b4c801f063838b3f053990ee46ea7 # tag: v4
|
||||
uses: amannn/action-semantic-pull-request@v4
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
|
||||
36
.github/workflows/stale.yml
vendored
36
.github/workflows/stale.yml
vendored
@@ -1,36 +0,0 @@
|
||||
name: 'Close stale issues'
|
||||
on:
|
||||
schedule:
|
||||
# 1:30am every day
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/stale@3de2653986ebd134983c79fe2be5d45cc3d9f4e1
|
||||
with:
|
||||
days-before-stale: 90
|
||||
days-before-close: 30
|
||||
stale-issue-label: stale
|
||||
operations-per-run: 1750
|
||||
stale-issue-message: >
|
||||
This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the [latest version of Electron](https://www.electronjs.org/releases/stable) or in the [beta](https://www.electronjs.org/releases/beta)—please include it with your comment!
|
||||
close-issue-message: >
|
||||
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a [supported version of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline) please open a new issue and include instructions for reproducing the issue.
|
||||
exempt-issue-labels: "discussion,security \U0001F512,enhancement :sparkles:"
|
||||
only-pr-labels: not-a-real-label
|
||||
pending-repro:
|
||||
steps:
|
||||
- uses: actions/stale@3de2653986ebd134983c79fe2be5d45cc3d9f4e1
|
||||
with:
|
||||
days-before-stale: -1
|
||||
days-before-close: 10
|
||||
stale-issue-label: blocked/need-repro
|
||||
stale-pr-label: not-a-real-label
|
||||
operations-per-run: 1750
|
||||
close-issue-message: >
|
||||
Unfortunately, without a way to reproduce this issue, we're unable to continue investigation. This issue has been closed and will not be monitored further. If you're able to provide a minimal test case that reproduces this issue on a [supported version of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline) please open a new issue and include instructions for reproducing the issue.
|
||||
11
BUILD.gn
11
BUILD.gn
@@ -512,8 +512,6 @@ source_set("electron_lib") {
|
||||
]
|
||||
}
|
||||
|
||||
configs += [ "//electron/build/config:mas_build" ]
|
||||
|
||||
sources = filenames.lib_sources
|
||||
if (is_win) {
|
||||
sources += filenames.lib_sources_win
|
||||
@@ -575,6 +573,7 @@ source_set("electron_lib") {
|
||||
if (is_mas_build) {
|
||||
sources += [ "shell/browser/api/electron_api_app_mas.mm" ]
|
||||
sources -= [ "shell/browser/auto_updater_mac.mm" ]
|
||||
defines += [ "MAS_BUILD" ]
|
||||
sources -= [
|
||||
"shell/app/electron_crash_reporter_client.cc",
|
||||
"shell/app/electron_crash_reporter_client.h",
|
||||
@@ -720,7 +719,7 @@ source_set("electron_lib") {
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_printing) {
|
||||
if (enable_basic_printing) {
|
||||
sources += [
|
||||
"shell/browser/printing/print_view_manager_electron.cc",
|
||||
"shell/browser/printing/print_view_manager_electron.h",
|
||||
@@ -746,7 +745,7 @@ source_set("electron_lib") {
|
||||
"//components/update_client:update_client",
|
||||
"//components/zoom",
|
||||
"//extensions/browser",
|
||||
"//extensions/browser/api:api_provider",
|
||||
"//extensions/browser:core_api_provider",
|
||||
"//extensions/browser/updater",
|
||||
"//extensions/common",
|
||||
"//extensions/common:core_api_provider",
|
||||
@@ -970,7 +969,6 @@ if (is_mac) {
|
||||
deps += [ "//sandbox/mac:seatbelt" ]
|
||||
}
|
||||
defines = [ "HELPER_EXECUTABLE" ]
|
||||
extra_configs = [ "//electron/build/config:mas_build" ]
|
||||
sources = [
|
||||
"shell/app/electron_main_mac.cc",
|
||||
"shell/app/uv_stdio_fix.cc",
|
||||
@@ -1141,7 +1139,6 @@ if (is_mac) {
|
||||
"-rpath",
|
||||
"@executable_path/../Frameworks",
|
||||
]
|
||||
extra_configs = [ "//electron/build/config:mas_build" ]
|
||||
}
|
||||
|
||||
if (enable_dsyms) {
|
||||
@@ -1477,7 +1474,7 @@ dist_zip("electron_ffmpeg_zip") {
|
||||
|
||||
electron_chromedriver_deps = [
|
||||
":licenses",
|
||||
"//chrome/test/chromedriver:chromedriver_server",
|
||||
"//chrome/test/chromedriver",
|
||||
"//electron/buildflags",
|
||||
]
|
||||
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'110.0.5451.0',
|
||||
'108.0.5359.179',
|
||||
'node_version':
|
||||
'v18.12.1',
|
||||
'v16.17.1',
|
||||
'nan_version':
|
||||
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -39,7 +39,7 @@ For more installation options and troubleshooting tips, see
|
||||
Each Electron release provides binaries for macOS, Windows, and Linux.
|
||||
|
||||
* macOS (High Sierra and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
|
||||
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7 and 8 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
||||
* Windows (Windows 7 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8.
|
||||
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
|
||||
* Ubuntu 14.04 and newer
|
||||
* Fedora 24 and newer
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
The Electron team and community take security bugs in Electron seriously. We appreciate your efforts to responsibly disclose your findings, and will make every effort to acknowledge your contributions.
|
||||
|
||||
To report a security issue, please use the GitHub Security Advisory ["Report a Vulnerability"](https://github.com/electron/electron/security/advisories/new) tab.
|
||||
To report a security issue, email [security@electronjs.org](mailto:security@electronjs.org) and include the word "SECURITY" in the subject line.
|
||||
|
||||
The Electron team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-110.0.5415.0-fix
|
||||
image: e-108.0.5359.125
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
|
||||
node_module_version = 114
|
||||
node_module_version = 110
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -20,7 +20,7 @@ enable_cdm_host_verification = false
|
||||
proprietary_codecs = true
|
||||
ffmpeg_branding = "Chrome"
|
||||
|
||||
enable_printing = true
|
||||
enable_basic_printing = true
|
||||
|
||||
# Removes DLLs from the build, which are only meant to be used for Chromium development.
|
||||
# See https://github.com/electron/electron/pull/17985
|
||||
@@ -48,3 +48,5 @@ is_cfi = false
|
||||
|
||||
# TODO: fix this once sysroots have been updated.
|
||||
use_qt = false
|
||||
|
||||
v8_builtins_profiling_log_file = ""
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
# For MAS build, we force defining "MAS_BUILD".
|
||||
config("mas_build") {
|
||||
if (is_mas_build) {
|
||||
defines = [ "IS_MAS_BUILD()=1" ]
|
||||
} else {
|
||||
defines = [ "IS_MAS_BUILD()=0" ]
|
||||
defines = [ "MAS_BUILD" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -212,7 +212,7 @@ static_library("chrome") {
|
||||
deps += [ "//components/cdm/renderer" ]
|
||||
}
|
||||
|
||||
if (enable_printing) {
|
||||
if (enable_basic_printing) {
|
||||
sources += [
|
||||
"//chrome/browser/bad_message.cc",
|
||||
"//chrome/browser/bad_message.h",
|
||||
@@ -264,10 +264,7 @@ static_library("chrome") {
|
||||
sources += [
|
||||
"//chrome/browser/printing/pdf_to_emf_converter.cc",
|
||||
"//chrome/browser/printing/pdf_to_emf_converter.h",
|
||||
"//chrome/browser/printing/printer_xml_parser_impl.cc",
|
||||
"//chrome/browser/printing/printer_xml_parser_impl.h",
|
||||
]
|
||||
deps += [ "//printing:printing_base" ]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,14 +272,20 @@ static_library("chrome") {
|
||||
sources += [
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc",
|
||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.h",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_image_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_image_button.h",
|
||||
"//chrome/browser/ui/views/overlay/back_to_tab_label_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/close_image_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/close_image_button.h",
|
||||
"//chrome/browser/ui/views/overlay/constants.h",
|
||||
"//chrome/browser/ui/views/overlay/document_overlay_window_views.cc",
|
||||
"//chrome/browser/ui/views/overlay/document_overlay_window_views.h",
|
||||
"//chrome/browser/ui/views/overlay/hang_up_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/hang_up_button.h",
|
||||
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
|
||||
"//chrome/browser/ui/views/overlay/overlay_window_views.cc",
|
||||
"//chrome/browser/ui/views/overlay/overlay_window_views.h",
|
||||
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
|
||||
"//chrome/browser/ui/views/overlay/playback_image_button.h",
|
||||
"//chrome/browser/ui/views/overlay/resize_handle_button.cc",
|
||||
@@ -312,10 +315,10 @@ static_library("chrome") {
|
||||
"//chrome/browser/extensions/chrome_url_request_util.h",
|
||||
"//chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc",
|
||||
"//chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.h",
|
||||
"//chrome/renderer/extensions/api/extension_hooks_delegate.cc",
|
||||
"//chrome/renderer/extensions/api/extension_hooks_delegate.h",
|
||||
"//chrome/renderer/extensions/api/tabs_hooks_delegate.cc",
|
||||
"//chrome/renderer/extensions/api/tabs_hooks_delegate.h",
|
||||
"//chrome/renderer/extensions/extension_hooks_delegate.cc",
|
||||
"//chrome/renderer/extensions/extension_hooks_delegate.h",
|
||||
"//chrome/renderer/extensions/tabs_hooks_delegate.cc",
|
||||
"//chrome/renderer/extensions/tabs_hooks_delegate.h",
|
||||
]
|
||||
|
||||
if (enable_pdf_viewer) {
|
||||
|
||||
@@ -42,7 +42,7 @@ an issue:
|
||||
* [Web embeds in Electron](tutorial/web-embeds.md)
|
||||
* [Boilerplates and CLIs](tutorial/boilerplates-and-clis.md)
|
||||
* [Boilerplate vs CLI](tutorial/boilerplates-and-clis.md#boilerplate-vs-cli)
|
||||
* [electron-forge](tutorial/boilerplates-and-clis.md#electron-forge)
|
||||
* [Electron Forge](tutorial/boilerplates-and-clis.md#electron-forge)
|
||||
* [electron-builder](tutorial/boilerplates-and-clis.md#electron-builder)
|
||||
* [electron-react-boilerplate](tutorial/boilerplates-and-clis.md#electron-react-boilerplate)
|
||||
* [Other Tools and Boilerplates](tutorial/boilerplates-and-clis.md#other-tools-and-boilerplates)
|
||||
|
||||
@@ -32,9 +32,9 @@ This is a requirement of `Squirrel.Mac`.
|
||||
|
||||
On Windows, you have to install your app into a user's machine before you can
|
||||
use the `autoUpdater`, so it is recommended that you use the
|
||||
[electron-winstaller][installer-lib], [electron-forge][electron-forge-lib] or the [grunt-electron-installer][installer] package to generate a Windows installer.
|
||||
[electron-winstaller][installer-lib], [Electron Forge][electron-forge-lib] or the [grunt-electron-installer][installer] package to generate a Windows installer.
|
||||
|
||||
When using [electron-winstaller][installer-lib] or [electron-forge][electron-forge-lib] make sure you do not try to update your app [the first time it runs](https://github.com/electron/windows-installer#handling-squirrel-events) (Also see [this issue for more info](https://github.com/electron/electron/issues/7155)). It's also recommended to use [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup) to get desktop shortcuts for your app.
|
||||
When using [electron-winstaller][installer-lib] or [Electron Forge][electron-forge-lib] make sure you do not try to update your app [the first time it runs](https://github.com/electron/windows-installer#handling-squirrel-events) (Also see [this issue for more info](https://github.com/electron/electron/issues/7155)). It's also recommended to use [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup) to get desktop shortcuts for your app.
|
||||
|
||||
The installer generated with Squirrel will create a shortcut icon with an
|
||||
[Application User Model ID][app-user-model-id] in the format of
|
||||
@@ -139,6 +139,6 @@ application starts.
|
||||
[squirrel-windows]: https://github.com/Squirrel/Squirrel.Windows
|
||||
[installer]: https://github.com/electron/grunt-electron-installer
|
||||
[installer-lib]: https://github.com/electron/windows-installer
|
||||
[electron-forge-lib]: https://github.com/electron-userland/electron-forge
|
||||
[electron-forge-lib]: https://github.com/electron/forge
|
||||
[app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
|
||||
@@ -192,7 +192,6 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
macOS. Default is `false`.
|
||||
* `skipTaskbar` boolean (optional) _macOS_ _Windows_ - Whether to show the window in taskbar.
|
||||
Default is `false`.
|
||||
* `hiddenInMissionControl` boolean (optional) _macOS_ - Whether window should be hidden when the user toggles into mission control.
|
||||
* `kiosk` boolean (optional) - Whether the window is in kiosk mode. Default is `false`.
|
||||
* `title` string (optional) - Default window title. Default is `"Electron"`. If the HTML tag `<title>` is defined in the HTML file loaded by `loadURL()`, this property will be ignored.
|
||||
* `icon` ([NativeImage](native-image.md) | string) (optional) - The window icon. On Windows it is
|
||||
@@ -1256,16 +1255,6 @@ Returns `boolean` - Whether the window can be manually closed by user.
|
||||
|
||||
On Linux always returns `true`.
|
||||
|
||||
#### `win.setHiddenInMissionControl(hidden)` _macOS_
|
||||
|
||||
* `hidden` boolean
|
||||
|
||||
Sets whether the window will be hidden when the user toggles into mission control.
|
||||
|
||||
#### `win.isHiddenInMissionControl()` _macOS_
|
||||
|
||||
Returns `boolean` - Whether the window will be hidden when the user toggles into mission control.
|
||||
|
||||
#### `win.setAlwaysOnTop(flag[, level][, relativeLevel])`
|
||||
|
||||
* `flag` boolean
|
||||
@@ -1448,16 +1437,13 @@ Returns `boolean` - Whether the window's document has been edited.
|
||||
|
||||
#### `win.blurWebView()`
|
||||
|
||||
#### `win.capturePage([rect, opts])`
|
||||
#### `win.capturePage([rect])`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The bounds to capture
|
||||
* `opts` Object (optional)
|
||||
* `stayHidden` boolean (optional) - Keep the page hidden instead of visible. Default is `false`.
|
||||
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep. Default is `false`.
|
||||
|
||||
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
|
||||
|
||||
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty. The page is considered visible when its browser window is hidden and the capturer count is non-zero. If you would like the page to stay hidden, you should ensure that `stayHidden` is set to true.
|
||||
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty.
|
||||
|
||||
#### `win.loadURL(url[, options])`
|
||||
|
||||
@@ -1565,13 +1551,6 @@ screen readers
|
||||
Sets a 16 x 16 pixel overlay onto the current taskbar icon, usually used to
|
||||
convey some sort of application status or to passively notify the user.
|
||||
|
||||
#### `win.invalidateShadow()` _macOS_
|
||||
|
||||
Invalidates the window shadow so that it is recomputed based on the current window shape.
|
||||
|
||||
`BrowserWindows` that are transparent can sometimes leave behind visual artifacts on macOS.
|
||||
This method can be used to clear these artifacts when, for example, performing an animation.
|
||||
|
||||
#### `win.setHasShadow(hasShadow)`
|
||||
|
||||
* `hasShadow` boolean
|
||||
|
||||
@@ -21,12 +21,10 @@ Returns:
|
||||
|
||||
The `inAppPurchase` module has the following methods:
|
||||
|
||||
### `inAppPurchase.purchaseProduct(productID[, opts])`
|
||||
### `inAppPurchase.purchaseProduct(productID[, quantity])`
|
||||
|
||||
* `productID` string
|
||||
* `opts` Integer | Object (optional) - If specified as an integer, defines the quantity.
|
||||
* `quantity` Integer (optional) - The number of items the user wants to purchase.
|
||||
* `username` string (optional) - The string that associates the transaction with a user account on your service (applicationUsername).
|
||||
* `productID` string - The identifiers of the product to purchase. (The identifier of `com.example.app.product1` is `product1`).
|
||||
* `quantity` Integer (optional) - The number of items the user wants to purchase.
|
||||
|
||||
Returns `Promise<boolean>` - Returns `true` if the product is valid and added to the payment queue.
|
||||
|
||||
|
||||
@@ -239,7 +239,7 @@ app.whenReady().then(() => {
|
||||
const selectedDevice = details.deviceList.find((device) => {
|
||||
return device.vendorId === '9025' && device.productId === '67'
|
||||
})
|
||||
callback(selectedDevice?.deviceId)
|
||||
callback(selectedPort?.deviceId)
|
||||
})
|
||||
})
|
||||
```
|
||||
@@ -429,118 +429,6 @@ const portConnect = async () => {
|
||||
}
|
||||
```
|
||||
|
||||
#### Event: 'select-usb-device'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Object
|
||||
* `deviceList` [USBDevice[]](structures/usb-device.md)
|
||||
* `frame` [WebFrameMain](web-frame-main.md)
|
||||
* `callback` Function
|
||||
* `deviceId` string (optional)
|
||||
|
||||
Emitted when a USB device needs to be selected when a call to
|
||||
`navigator.usb.requestDevice` is made. `callback` should be called with
|
||||
`deviceId` to be selected; passing no arguments to `callback` will
|
||||
cancel the request. Additionally, permissioning on `navigator.usb` can
|
||||
be further managed by using [ses.setPermissionCheckHandler(handler)](#sessetpermissioncheckhandlerhandler)
|
||||
and [ses.setDevicePermissionHandler(handler)`](#sessetdevicepermissionhandlerhandler).
|
||||
|
||||
```javascript
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
let win = null
|
||||
|
||||
app.whenReady().then(() => {
|
||||
win = new BrowserWindow()
|
||||
|
||||
win.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||
if (permission === 'usb') {
|
||||
// Add logic here to determine if permission should be given to allow USB selection
|
||||
return true
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
// Optionally, retrieve previously persisted devices from a persistent store (fetchGrantedDevices needs to be implemented by developer to fetch persisted permissions)
|
||||
const grantedDevices = fetchGrantedDevices()
|
||||
|
||||
win.webContents.session.setDevicePermissionHandler((details) => {
|
||||
if (new URL(details.origin).hostname === 'some-host' && details.deviceType === 'usb') {
|
||||
if (details.device.vendorId === 123 && details.device.productId === 345) {
|
||||
// Always allow this type of device (this allows skipping the call to `navigator.usb.requestDevice` first)
|
||||
return true
|
||||
}
|
||||
|
||||
// Search through the list of devices that have previously been granted permission
|
||||
return grantedDevices.some((grantedDevice) => {
|
||||
return grantedDevice.vendorId === details.device.vendorId &&
|
||||
grantedDevice.productId === details.device.productId &&
|
||||
grantedDevice.serialNumber && grantedDevice.serialNumber === details.device.serialNumber
|
||||
})
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
win.webContents.session.on('select-usb-device', (event, details, callback) => {
|
||||
event.preventDefault()
|
||||
const selectedDevice = details.deviceList.find((device) => {
|
||||
return device.vendorId === '9025' && device.productId === '67'
|
||||
})
|
||||
if (selectedDevice) {
|
||||
// Optionally, add this to the persisted devices (updateGrantedDevices needs to be implemented by developer to persist permissions)
|
||||
grantedDevices.push(selectedDevice)
|
||||
updateGrantedDevices(grantedDevices)
|
||||
}
|
||||
callback(selectedDevice?.deviceId)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
#### Event: 'usb-device-added'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Object
|
||||
* `device` [USBDevice](structures/usb-device.md)
|
||||
* `frame` [WebFrameMain](web-frame-main.md)
|
||||
|
||||
Emitted after `navigator.usb.requestDevice` has been called and
|
||||
`select-usb-device` has fired if a new device becomes available before
|
||||
the callback from `select-usb-device` is called. This event is intended for
|
||||
use when using a UI to ask users to pick a device so that the UI can be updated
|
||||
with the newly added device.
|
||||
|
||||
#### Event: 'usb-device-removed'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Object
|
||||
* `device` [USBDevice](structures/usb-device.md)
|
||||
* `frame` [WebFrameMain](web-frame-main.md)
|
||||
|
||||
Emitted after `navigator.usb.requestDevice` has been called and
|
||||
`select-usb-device` has fired if a device has been removed before the callback
|
||||
from `select-usb-device` is called. This event is intended for use when using
|
||||
a UI to ask users to pick a device so that the UI can be updated to remove the
|
||||
specified device.
|
||||
|
||||
#### Event: 'usb-device-revoked'
|
||||
|
||||
Returns:
|
||||
|
||||
* `event` Event
|
||||
* `details` Object
|
||||
* `device` [USBDevice[]](structures/usb-device.md)
|
||||
* `origin` string (optional) - The origin that the device has been revoked from.
|
||||
|
||||
Emitted after `USBDevice.forget()` has been called. This event can be used
|
||||
to help maintain persistent storage of permissions when
|
||||
`setDevicePermissionHandler` is used.
|
||||
|
||||
### Instance Methods
|
||||
|
||||
The following methods are available on instances of `Session`:
|
||||
@@ -565,7 +453,7 @@ Clears the session’s HTTP cache.
|
||||
`shadercache`, `websql`, `serviceworkers`, `cachestorage`. If not
|
||||
specified, clear all storage types.
|
||||
* `quotas` string[] (optional) - The types of quotas to clear, can contain:
|
||||
`temporary`, `syncable`. If not specified, clear all quotas.
|
||||
`temporary`, `persistent`, `syncable`. If not specified, clear all quotas.
|
||||
|
||||
Returns `Promise<void>` - resolves when the storage data has been cleared.
|
||||
|
||||
@@ -826,7 +714,7 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
|
||||
* `handler` Function\<boolean> | null
|
||||
* `webContents` ([WebContents](web-contents.md) | null) - WebContents checking the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin. All cross origin sub frames making permission checks will pass a `null` webContents to this handler, while certain other permission checks such as `notifications` checks will always pass `null`. You should use `embeddingOrigin` and `requestingOrigin` to determine what origin the owning frame and the requesting frame are on respectively.
|
||||
* `permission` string - Type of permission check. Valid values are `midiSysex`, `notifications`, `geolocation`, `media`,`mediaKeySystem`,`midi`, `pointerLock`, `fullscreen`, `openExternal`, `hid`, `serial`, or `usb`.
|
||||
* `permission` string - Type of permission check. Valid values are `midiSysex`, `notifications`, `geolocation`, `media`,`mediaKeySystem`,`midi`, `pointerLock`, `fullscreen`, `openExternal`, `hid`, or `serial`.
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
@@ -912,7 +800,7 @@ Passing `null` instead of a function resets the handler to its default state.
|
||||
|
||||
* `handler` Function\<boolean> | null
|
||||
* `details` Object
|
||||
* `deviceType` string - The type of device that permission is being requested on, can be `hid`, `serial`, or `usb`.
|
||||
* `deviceType` string - The type of device that permission is being requested on, can be `hid` or `serial`.
|
||||
* `origin` string - The origin URL of the device permission check.
|
||||
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
|
||||
|
||||
@@ -940,8 +828,6 @@ app.whenReady().then(() => {
|
||||
return true
|
||||
} else if (permission === 'serial') {
|
||||
// Add logic here to determine if permission should be given to allow serial port selection
|
||||
} else if (permission === 'usb') {
|
||||
// Add logic here to determine if permission should be given to allow USB device selection
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
# USBDevice Object
|
||||
|
||||
* `deviceId` string - Unique identifier for the device.
|
||||
* `vendorId` Integer - The USB vendor ID.
|
||||
* `productId` Integer - The USB product ID.
|
||||
* `productName` string (optional) - Name of the device.
|
||||
* `serialNumber` string (optional) - The USB device serial number.
|
||||
* `manufacturerName` string (optional) - The manufacturer name of the device.
|
||||
* `usbVersionMajor` Integer - The USB protocol major version supported by the device
|
||||
* `usbVersionMinor` Integer - The USB protocol minor version supported by the device
|
||||
* `usbVersionSubminor` Integer - The USB protocol subminor version supported by the device
|
||||
* `deviceClass` Integer - The device class for the communication interface supported by the device
|
||||
* `deviceSubclass` Integer - The device subclass for the communication interface supported by the device
|
||||
* `deviceProtocol` Integer - The device protocol for the communication interface supported by the device
|
||||
* `deviceVersionMajor` Integer - The major version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionMinor` Integer - The minor version number of the device as defined by the device manufacturer.
|
||||
* `deviceVersionSubminor` Integer - The subminor version number of the device as defined by the device manufacturer.
|
||||
@@ -132,7 +132,7 @@ Returns:
|
||||
Emitted when the child process sends a message using [`process.parentPort.postMessage()`](process.md#processparentport).
|
||||
|
||||
[`child_process.fork`]: https://nodejs.org/dist/latest-v16.x/docs/api/child_process.html#child_processforkmodulepath-args-options
|
||||
[Services API]: https://chromium.googlesource.com/chromium/src/+/master/docs/mojo_and_services.md
|
||||
[Services API]: https://chromium.googlesource.com/chromium/src/+/main/docs/mojo_and_services.md
|
||||
[stdio]: https://nodejs.org/dist/latest/docs/api/child_process.html#optionsstdio
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[`MessagePortMain`]: message-port-main.md
|
||||
|
||||
@@ -1341,25 +1341,20 @@ const requestId = webContents.findInPage('api')
|
||||
console.log(requestId)
|
||||
```
|
||||
|
||||
#### `contents.capturePage([rect, opts])`
|
||||
#### `contents.capturePage([rect])`
|
||||
|
||||
* `rect` [Rectangle](structures/rectangle.md) (optional) - The area of the page to be captured.
|
||||
* `opts` Object (optional)
|
||||
* `stayHidden` boolean (optional) - Keep the page hidden instead of visible. Default is `false`.
|
||||
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep. Default is `false`.
|
||||
|
||||
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
|
||||
|
||||
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page.
|
||||
The page is considered visible when its browser window is hidden and the capturer count is non-zero.
|
||||
If you would like the page to stay hidden, you should ensure that `stayHidden` is set to true.
|
||||
|
||||
#### `contents.isBeingCaptured()`
|
||||
|
||||
Returns `boolean` - Whether this page is being captured. It returns true when the capturer count
|
||||
is large then 0.
|
||||
|
||||
#### `contents.incrementCapturerCount([size, stayHidden, stayAwake])` _Deprecated_
|
||||
#### `contents.incrementCapturerCount([size, stayHidden, stayAwake])`
|
||||
|
||||
* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer.
|
||||
* `stayHidden` boolean (optional) - Keep the page hidden instead of visible.
|
||||
@@ -1370,9 +1365,7 @@ hidden and the capturer count is non-zero. If you would like the page to stay hi
|
||||
|
||||
This also affects the Page Visibility API.
|
||||
|
||||
**Deprecated:** This API's functionality is now handled automatically within `contents.capturePage()`. See [breaking changes](../breaking-changes.md).
|
||||
|
||||
#### `contents.decrementCapturerCount([stayHidden, stayAwake])` _Deprecated_
|
||||
#### `contents.decrementCapturerCount([stayHidden, stayAwake])`
|
||||
|
||||
* `stayHidden` boolean (optional) - Keep the page in hidden state instead of visible.
|
||||
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep.
|
||||
@@ -1381,9 +1374,6 @@ Decrease the capturer count by one. The page will be set to hidden or occluded s
|
||||
browser window is hidden or occluded and the capturer count reaches zero. If you want to
|
||||
decrease the hidden capturer count instead you should set `stayHidden` to true.
|
||||
|
||||
**Deprecated:** This API's functionality is now handled automatically within `contents.capturePage()`.
|
||||
See [breaking changes](../breaking-changes.md).
|
||||
|
||||
#### `contents.getPrinters()` _Deprecated_
|
||||
|
||||
Get the system printer list.
|
||||
|
||||
@@ -14,12 +14,6 @@ This document uses the following convention to categorize breaking changes:
|
||||
|
||||
## Planned Breaking API Changes (23.0)
|
||||
|
||||
### Removed: Windows 7 / 8 / 8.1 support
|
||||
|
||||
[Windows 7, Windows 8, and Windows 8.1 are no longer supported](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice). Electron follows the planned Chromium deprecation policy, which will [deprecate Windows 7 support beginning in Chromium 109](https://support.google.com/chrome/thread/185534985/sunsetting-support-for-windows-7-8-8-1-in-early-2023?hl=en).
|
||||
|
||||
Older versions of Electron will continue to run on these operating systems, but Windows 10 or later will be required to run Electron v23.0.0 and higher.
|
||||
|
||||
### Removed: BrowserWindow `scroll-touch-*` events
|
||||
|
||||
The deprecated `scroll-touch-begin`, `scroll-touch-end` and `scroll-touch-edge`
|
||||
@@ -44,98 +38,14 @@ win.webContents.on('input-event', (_, event) => {
|
||||
})
|
||||
```
|
||||
|
||||
### Removed: `webContents.incrementCapturerCount(stayHidden, stayAwake)`
|
||||
|
||||
The `webContents.incrementCapturerCount(stayHidden, stayAwake)` function has been removed.
|
||||
It is now automatically handled by `webContents.capturePage` when a page capture completes.
|
||||
|
||||
```js
|
||||
const w = new BrowserWindow({ show: false })
|
||||
|
||||
// Removed in Electron 23
|
||||
w.webContents.incrementCapturerCount()
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
w.webContents.decrementCapturerCount()
|
||||
})
|
||||
|
||||
// Replace with
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
})
|
||||
```
|
||||
|
||||
### Removed: `webContents.decrementCapturerCount(stayHidden, stayAwake)`
|
||||
|
||||
The `webContents.decrementCapturerCount(stayHidden, stayAwake)` function has been removed.
|
||||
It is now automatically handled by `webContents.capturePage` when a page capture completes.
|
||||
|
||||
```js
|
||||
const w = new BrowserWindow({ show: false })
|
||||
|
||||
// Removed in Electron 23
|
||||
w.webContents.incrementCapturerCount()
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
w.webContents.decrementCapturerCount()
|
||||
})
|
||||
|
||||
// Replace with
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
})
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (22.0)
|
||||
|
||||
### Deprecated: `webContents.incrementCapturerCount(stayHidden, stayAwake)`
|
||||
|
||||
`webContents.incrementCapturerCount(stayHidden, stayAwake)` has been deprecated.
|
||||
It is now automatically handled by `webContents.capturePage` when a page capture completes.
|
||||
|
||||
```js
|
||||
const w = new BrowserWindow({ show: false })
|
||||
|
||||
// Removed in Electron 23
|
||||
w.webContents.incrementCapturerCount()
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
w.webContents.decrementCapturerCount()
|
||||
})
|
||||
|
||||
// Replace with
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
})
|
||||
```
|
||||
|
||||
### Deprecated: `webContents.decrementCapturerCount(stayHidden, stayAwake)`
|
||||
|
||||
`webContents.decrementCapturerCount(stayHidden, stayAwake)` has been deprecated.
|
||||
It is now automatically handled by `webContents.capturePage` when a page capture completes.
|
||||
|
||||
```js
|
||||
const w = new BrowserWindow({ show: false })
|
||||
|
||||
// Removed in Electron 23
|
||||
w.webContents.incrementCapturerCount()
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
w.webContents.decrementCapturerCount()
|
||||
})
|
||||
|
||||
// Replace with
|
||||
w.capturePage().then(image => {
|
||||
console.log(image.toDataURL())
|
||||
})
|
||||
```
|
||||
|
||||
### Removed: WebContents `new-window` event
|
||||
|
||||
The `new-window` event of WebContents has been removed. It is replaced by [`webContents.setWindowOpenHandler()`](api/web-contents.md#contentssetwindowopenhandlerhandler).
|
||||
|
||||
```js
|
||||
// Removed in Electron 22
|
||||
// Removed in Electron 21
|
||||
webContents.on('new-window', (event) => {
|
||||
event.preventDefault()
|
||||
})
|
||||
@@ -260,7 +170,7 @@ requires unsafe mode), so Electron is unable to support this feature on Linux.
|
||||
|
||||
The handler invoked when `session.setDevicePermissionHandler(handler)` is used
|
||||
has a change to its arguments. This handler no longer is passed a frame
|
||||
`[WebFrameMain](api/web-frame-main.md)`, but instead is passed the `origin`, which
|
||||
[`WebFrameMain`](api/web-frame-main.md), but instead is passed the `origin`, which
|
||||
is the origin that is checking for device permission.
|
||||
|
||||
## Planned Breaking API Changes (19.0)
|
||||
|
||||
@@ -146,7 +146,7 @@ $ ninja -C out/Release electron
|
||||
```
|
||||
|
||||
This will build all of what was previously 'libchromiumcontent' (i.e. the
|
||||
`content/` directory of `chromium` and its dependencies, incl. Blink and V8),
|
||||
`content/` directory of `chromium` and its dependencies, incl. WebKit and V8),
|
||||
so it will take a while.
|
||||
|
||||
The built executable will be under `./out/Testing`:
|
||||
|
||||
@@ -7,13 +7,12 @@ Follow the guidelines below for building **Electron itself** on Windows, for the
|
||||
## Prerequisites
|
||||
|
||||
* Windows 10 / Server 2012 R2 or higher
|
||||
* Visual Studio 2017 15.7.2 or higher - [download VS 2019 Community Edition for
|
||||
free](https://www.visualstudio.com/vs/)
|
||||
* Visual Studio 2019 (>=16.0.0) to build, but Visual Studio 2022 (>=17.0.0) is preferred - [download VS 2022 Community Edition for free](https://www.visualstudio.com/vs/)
|
||||
* See [the Chromium build documentation](https://chromium.googlesource.com/chromium/src/+/main/docs/windows_build_instructions.md#visual-studio) for more details on which Visual Studio
|
||||
components are required.
|
||||
* If your Visual Studio is installed in a directory other than the default, you'll need to
|
||||
set a few environment variables to point the toolchains to your installation path.
|
||||
* `vs2019_install = DRIVE:\path\to\Microsoft Visual Studio\2019\Community`, replacing `2019` and `Community` with your installed versions and replacing `DRIVE:` with the drive that Visual Studio is on. Often, this will be `C:`.
|
||||
* `vs2022_install = DRIVE:\path\to\Microsoft Visual Studio\2022\Community`, replacing `2022` and `Community` with your installed versions and replacing `DRIVE:` with the drive that Visual Studio is on. Often, this will be `C:`.
|
||||
* `WINDOWSSDKDIR = DRIVE:\path\to\Windows Kits\10`, replacing `DRIVE:` with the drive that Windows Kits is on. Often, this will be `C:`.
|
||||
* [Node.js](https://nodejs.org/download/)
|
||||
* [Git](https://git-scm.com)
|
||||
@@ -116,6 +115,10 @@ $ git config --system core.longpaths true
|
||||
|
||||
This can happen during build, when Debugging Tools for Windows has been installed with Windows Driver Kit. Uninstall Windows Driver Kit and install Debugging Tools with steps described above.
|
||||
|
||||
### ImportError: No module named win32file
|
||||
|
||||
Make sure you have installed `pywin32` with `pip install pywin32`.
|
||||
|
||||
### Build Scripts Hang Until Keypress
|
||||
|
||||
This bug is a "feature" of Windows' command prompt. It happens when clicking inside the prompt window with
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'">
|
||||
<title>WebUSB API</title>
|
||||
</head>
|
||||
<body>
|
||||
<h1>WebUSB API</h1>
|
||||
|
||||
<button id="clickme">Test WebUSB</button>
|
||||
|
||||
<h3>USB devices automatically granted access via <i>setDevicePermissionHandler</i></h3>
|
||||
<div id="granted-devices"></div>
|
||||
|
||||
<h3>USB devices automatically granted access via <i>select-usb-device</i></h3>
|
||||
<div id="granted-devices2"></div>
|
||||
|
||||
<script src="./renderer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,72 +0,0 @@
|
||||
const {app, BrowserWindow} = require('electron')
|
||||
const e = require('express')
|
||||
const path = require('path')
|
||||
|
||||
function createWindow () {
|
||||
const mainWindow = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
|
||||
let grantedDeviceThroughPermHandler
|
||||
|
||||
mainWindow.webContents.session.on('select-usb-device', (event, details, callback) => {
|
||||
//Add events to handle devices being added or removed before the callback on
|
||||
//`select-usb-device` is called.
|
||||
mainWindow.webContents.session.on('usb-device-added', (event, device) => {
|
||||
console.log('usb-device-added FIRED WITH', device)
|
||||
//Optionally update details.deviceList
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('usb-device-removed', (event, device) => {
|
||||
console.log('usb-device-removed FIRED WITH', device)
|
||||
//Optionally update details.deviceList
|
||||
})
|
||||
|
||||
event.preventDefault()
|
||||
if (details.deviceList && details.deviceList.length > 0) {
|
||||
const deviceToReturn = details.deviceList.find((device) => {
|
||||
if (!grantedDeviceThroughPermHandler || (device.deviceId != grantedDeviceThroughPermHandler.deviceId)) {
|
||||
return true
|
||||
}
|
||||
})
|
||||
if (deviceToReturn) {
|
||||
callback(deviceToReturn.deviceId)
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||
if (permission === 'usb' && details.securityOrigin === 'file:///') {
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
||||
if (details.deviceType === 'usb' && details.origin === 'file://') {
|
||||
if (!grantedDeviceThroughPermHandler) {
|
||||
grantedDeviceThroughPermHandler = details.device
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.loadFile('index.html')
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
createWindow()
|
||||
|
||||
app.on('activate', function () {
|
||||
if (BrowserWindow.getAllWindows().length === 0) createWindow()
|
||||
})
|
||||
})
|
||||
|
||||
app.on('window-all-closed', function () {
|
||||
if (process.platform !== 'darwin') app.quit()
|
||||
})
|
||||
@@ -1,33 +0,0 @@
|
||||
function getDeviceDetails(device) {
|
||||
return grantedDevice.productName || `Unknown device ${grantedDevice.deviceId}`
|
||||
}
|
||||
|
||||
async function testIt() {
|
||||
const noDevicesFoundMsg = 'No devices found'
|
||||
const grantedDevices = await navigator.usb.getDevices()
|
||||
let grantedDeviceList = ''
|
||||
if (grantedDevices.length > 0) {
|
||||
grantedDevices.forEach(device => {
|
||||
grantedDeviceList += `<hr>${getDeviceDetails(device)}</hr>`
|
||||
})
|
||||
} else {
|
||||
grantedDeviceList = noDevicesFoundMsg
|
||||
}
|
||||
document.getElementById('granted-devices').innerHTML = grantedDeviceList
|
||||
|
||||
grantedDeviceList = ''
|
||||
try {
|
||||
const grantedDevice = await navigator.usb.requestDevice({
|
||||
filters: []
|
||||
})
|
||||
grantedDeviceList += `<hr>${getDeviceDetails(device)}</hr>`
|
||||
|
||||
} catch (ex) {
|
||||
if (ex.name === 'NotFoundError') {
|
||||
grantedDeviceList = noDevicesFoundMsg
|
||||
}
|
||||
}
|
||||
document.getElementById('granted-devices2').innerHTML = grantedDeviceList
|
||||
}
|
||||
|
||||
document.getElementById('clickme').addEventListener('click',testIt)
|
||||
@@ -24,7 +24,7 @@ development and release. They are more helpful and supportive but enforce
|
||||
guidelines on how your code should be structured and built. *Especially for
|
||||
beginners, using a command line tool is likely to be helpful*.
|
||||
|
||||
## electron-forge
|
||||
## Electron Forge
|
||||
|
||||
Electron Forge is a tool for packaging and publishing Electron applications. It unifies Electron's tooling ecosystem
|
||||
into a single extensible interface so that anyone can jump right into making Electron apps.
|
||||
|
||||
@@ -115,41 +115,3 @@ when the `Test Web Serial` button is clicked.
|
||||
```javascript fiddle='docs/fiddles/features/web-serial'
|
||||
|
||||
```
|
||||
|
||||
## WebUSB API
|
||||
|
||||
The [WebUSB API](https://web.dev/usb/) can be used to access USB devices.
|
||||
Electron provides several APIs for working with the WebUSB API:
|
||||
|
||||
* The [`select-usb-device` event on the Session](../api/session.md#event-select-usb-device)
|
||||
can be used to select a USB device when a call to
|
||||
`navigator.usb.requestDevice` is made. Additionally the [`usb-device-added`](../api/session.md#event-usb-device-added)
|
||||
and [`usb-device-removed`](../api/session.md#event-usb-device-removed) events
|
||||
on the Session can be used to handle devices being plugged in or unplugged
|
||||
when handling the `select-usb-device` event.
|
||||
**Note:** These two events only fire until the callback from `select-usb-device`
|
||||
is called. They are not intended to be used as a generic usb device listener.
|
||||
* The [`usb-device-revoked' event on the Session](../api/session.md#event-usb-device-revoked) can
|
||||
be used to respond when [device.forget()](https://developer.chrome.com/articles/usb/#revoke-access)
|
||||
is called on a USB device.
|
||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
can be used to provide default permissioning to devices without first calling
|
||||
for permission to devices via `navigator.usb.requestDevice`. Additionally,
|
||||
the default behavior of Electron is to store granted device permission through
|
||||
the lifetime of the corresponding WebContents. If longer term storage is
|
||||
needed, a developer can store granted device permissions (eg when handling
|
||||
the `select-usb-device` event) and then read from that storage with
|
||||
`setDevicePermissionHandler`.
|
||||
* [`ses.setPermissionCheckHandler(handler)`](../api/session.md#sessetpermissioncheckhandlerhandler)
|
||||
can be used to disable USB access for specific origins.
|
||||
|
||||
### Example
|
||||
|
||||
This example demonstrates an Electron application that automatically selects
|
||||
USB devices (if they are attached) through [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
and through [`select-usb-device` event on the Session](../api/session.md#event-select-usb-device)
|
||||
when the `Test WebUSB` button is clicked.
|
||||
|
||||
```javascript fiddle='docs/fiddles/features/web-usb'
|
||||
|
||||
```
|
||||
|
||||
@@ -31,6 +31,6 @@ template and submit a new issue.
|
||||
[(package)]: https://www.electronforge.io/cli#package
|
||||
[(make)]: https://www.electronforge.io/cli#make
|
||||
[(publish)]: https://www.electronforge.io/cli#publish
|
||||
[GitHub issue tracker]: https://github.com/electron-userland/electron-forge/issues
|
||||
[GitHub issue tracker]: https://github.com/electron/forge/issues
|
||||
[discord]: https://discord.gg/APGC3k5yaH
|
||||
[tutorial]: https://www.electronjs.org/docs/latest/tutorial/tutorial-prerequisites
|
||||
|
||||
@@ -180,16 +180,19 @@ app.whenReady().then(async () => {
|
||||
|
||||
// We can't use ipcMain.handle() here, because the reply needs to transfer a
|
||||
// MessagePort.
|
||||
// Listen for message sent from the top-level frame
|
||||
mainWindow.webContents.mainFrame.on('request-worker-channel', (event) => {
|
||||
// Create a new channel ...
|
||||
const { port1, port2 } = new MessageChannelMain()
|
||||
// ... send one end to the worker ...
|
||||
worker.webContents.postMessage('new-client', null, [port1])
|
||||
// ... and the other end to the main window.
|
||||
event.senderFrame.postMessage('provide-worker-channel', null, [port2])
|
||||
// Now the main window and the worker can communicate with each other
|
||||
// without going through the main process!
|
||||
ipcMain.on('request-worker-channel', (event) => {
|
||||
// For security reasons, let's make sure only the frames we expect can
|
||||
// access the worker.
|
||||
if (event.senderFrame === mainWindow.webContents.mainFrame) {
|
||||
// Create a new channel ...
|
||||
const { port1, port2 } = new MessageChannelMain()
|
||||
// ... send one end to the worker ...
|
||||
worker.webContents.postMessage('new-client', null, [port1])
|
||||
// ... and the other end to the main window.
|
||||
event.senderFrame.postMessage('provide-worker-channel', null, [port2])
|
||||
// Now the main window and the worker can communicate with each other
|
||||
// without going through the main process!
|
||||
}
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
@@ -79,6 +79,11 @@ Start Menu. This can be overkill during development, so adding
|
||||
trick. Navigate to the file in Explorer, right-click and 'Pin to Start Menu'.
|
||||
You will then need to add the line `app.setAppUserModelId(process.execPath)` to
|
||||
your main process to see notifications.
|
||||
* On Windows 8.1 and Windows 8, a shortcut to your app with an [Application User
|
||||
Model ID][app-user-model-id] must be installed to the Start screen. Note,
|
||||
however, that it does not need to be pinned to the Start screen.
|
||||
* On Windows 7, notifications work via a custom implementation which visually
|
||||
resembles the native one on newer systems.
|
||||
|
||||
Electron attempts to automate the work around the Application User Model ID. When
|
||||
Electron is used together with the installation and update framework Squirrel,
|
||||
@@ -87,6 +92,12 @@ Electron will detect that Squirrel was used and will automatically call
|
||||
`app.setAppUserModelId()` with the correct value. During development, you may have
|
||||
to call [`app.setAppUserModelId()`][set-app-user-model-id] yourself.
|
||||
|
||||
Furthermore, in Windows 8, the maximum length for the notification body is 250
|
||||
characters, with the Windows team recommending that notifications should be kept
|
||||
to 200 characters. That said, that limitation has been removed in Windows 10, with
|
||||
the Windows team asking developers to be reasonable. Attempting to send gigantic
|
||||
amounts of text to the API (thousands of characters) might result in instability.
|
||||
|
||||
#### Advanced Notifications
|
||||
|
||||
Later versions of Windows allow for advanced notifications, with custom templates,
|
||||
@@ -138,4 +149,4 @@ GNOME, KDE.
|
||||
[notification-spec]: https://developer-old.gnome.org/notification-spec/
|
||||
[app-user-model-id]: https://msdn.microsoft.com/en-us/library/windows/desktop/dd378459(v=vs.85).aspx
|
||||
[set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows
|
||||
[squirrel-events]: https://github.com/electron/windows-installer/blob/master/README.md#handling-squirrel-events
|
||||
[squirrel-events]: https://github.com/electron/windows-installer/blob/main/README.md#handling-squirrel-events
|
||||
|
||||
@@ -438,7 +438,7 @@ Call `Menu.setApplicationMenu(null)` before `app.on("ready")`. This will prevent
|
||||
[request-idle-callback]: https://developer.mozilla.org/en-US/docs/Web/API/Window/requestIdleCallback
|
||||
[multithreading]: ./multithreading.md
|
||||
[caniuse]: https://caniuse.com/
|
||||
[jquery-need]: http://youmightnotneedjquery.com/
|
||||
[jquery-need]: https://youmightnotneedjquery.com/
|
||||
[service-workers]: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API
|
||||
[webpack]: https://webpack.js.org/
|
||||
[parcel]: https://parceljs.org/
|
||||
|
||||
@@ -13,7 +13,7 @@ system modification.
|
||||
|
||||
There are three ways to create a `.snap` file:
|
||||
|
||||
1) Using [`electron-forge`][electron-forge] or
|
||||
1) Using [Electron Forge][electron-forge] or
|
||||
[`electron-builder`][electron-builder], both tools that come with `snap`
|
||||
support out of the box. This is the easiest option.
|
||||
2) Using `electron-installer-snap`, which takes `electron-packager`'s output.
|
||||
@@ -162,7 +162,7 @@ building blocks.
|
||||
|
||||
If you do not already have a `.deb` package, using `electron-installer-snap`
|
||||
might be an easier path to create snap packages. However, multiple solutions
|
||||
for creating Debian packages exist, including [`electron-forge`][electron-forge],
|
||||
for creating Debian packages exist, including [Electron Forge][electron-forge],
|
||||
[`electron-builder`][electron-builder] or
|
||||
[`electron-installer-debian`][electron-installer-debian].
|
||||
|
||||
@@ -239,7 +239,7 @@ apps:
|
||||
|
||||
[snapcraft-syntax]: https://docs.snapcraft.io/build-snaps/syntax
|
||||
[electron-packager]: https://github.com/electron/electron-packager
|
||||
[electron-forge]: https://github.com/electron-userland/electron-forge
|
||||
[electron-forge]: https://github.com/electron/forge
|
||||
[electron-builder]: https://github.com/electron-userland/electron-builder
|
||||
[electron-installer-debian]: https://github.com/unindented/electron-installer-debian
|
||||
[electron-winstaller]: https://github.com/electron/windows-installer
|
||||
|
||||
@@ -81,7 +81,7 @@ contextBridge.exposeInMainWorld('versions', {
|
||||
To attach this script to your renderer process, pass its path to the
|
||||
`webPreferences.preload` option in the BrowserWindow constructor:
|
||||
|
||||
```js {8-10} title="main.js"
|
||||
```js {2,8-10} title="main.js"
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@ into end users' hands.
|
||||
<!-- Link labels -->
|
||||
|
||||
[discord]: https://discord.gg/electronjs
|
||||
[github]: https://github.com/electron/electronjs.org-new/issues/new
|
||||
[github]: https://github.com/electron/website/issues/new
|
||||
[how-to]: ./examples.md
|
||||
[node-platform]: https://nodejs.org/api/process.html#process_process_platform
|
||||
|
||||
|
||||
@@ -222,8 +222,8 @@ rest of our docs and happy developing! If you have questions, please stop by our
|
||||
[code-signed]: ./code-signing.md
|
||||
[discord server]: https://discord.gg/electronjs
|
||||
[electron fiddle]: https://electronjs.org/fiddle
|
||||
[fiddle-build]: https://github.com/electron/fiddle/blob/master/.github/workflows/build.yaml
|
||||
[fiddle-forge-config]: https://github.com/electron/fiddle/blob/master/forge.config.js
|
||||
[fiddle-build]: https://github.com/electron/fiddle/blob/main/.github/workflows/build.yaml
|
||||
[fiddle-forge-config]: https://github.com/electron/fiddle/blob/main/forge.config.js
|
||||
[github actions]: https://github.com/features/actions
|
||||
[github publisher]: https://www.electronforge.io/config/publishers/github
|
||||
[github releases]: https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository
|
||||
|
||||
@@ -132,7 +132,6 @@ auto_filenames = {
|
||||
"docs/api/structures/upload-data.md",
|
||||
"docs/api/structures/upload-file.md",
|
||||
"docs/api/structures/upload-raw-data.md",
|
||||
"docs/api/structures/usb-device.md",
|
||||
"docs/api/structures/user-default-types.md",
|
||||
"docs/api/structures/web-request-filter.md",
|
||||
"docs/api/structures/web-source.md",
|
||||
|
||||
@@ -67,6 +67,17 @@ filenames = {
|
||||
"shell/browser/native_window_views_win.cc",
|
||||
"shell/browser/notifications/win/notification_presenter_win.cc",
|
||||
"shell/browser/notifications/win/notification_presenter_win.h",
|
||||
"shell/browser/notifications/win/notification_presenter_win7.cc",
|
||||
"shell/browser/notifications/win/notification_presenter_win7.h",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/common.h",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/toast.cc",
|
||||
"shell/browser/notifications/win/win32_desktop_notifications/toast.h",
|
||||
"shell/browser/notifications/win/win32_notification.cc",
|
||||
"shell/browser/notifications/win/win32_notification.h",
|
||||
"shell/browser/notifications/win/windows_toast_notification.cc",
|
||||
"shell/browser/notifications/win/windows_toast_notification.h",
|
||||
"shell/browser/relauncher_win.cc",
|
||||
@@ -113,6 +124,7 @@ filenames = {
|
||||
"shell/app/electron_main_delegate_mac.h",
|
||||
"shell/app/electron_main_delegate_mac.mm",
|
||||
"shell/browser/api/electron_api_app_mac.mm",
|
||||
"shell/browser/api/electron_api_browser_window_mac.mm",
|
||||
"shell/browser/api/electron_api_menu_mac.h",
|
||||
"shell/browser/api/electron_api_menu_mac.mm",
|
||||
"shell/browser/api/electron_api_native_theme_mac.mm",
|
||||
@@ -199,6 +211,7 @@ filenames = {
|
||||
]
|
||||
|
||||
lib_sources_views = [
|
||||
"shell/browser/api/electron_api_browser_window_views.cc",
|
||||
"shell/browser/api/electron_api_menu_views.cc",
|
||||
"shell/browser/api/electron_api_menu_views.h",
|
||||
"shell/browser/native_browser_view_views.cc",
|
||||
@@ -347,7 +360,6 @@ filenames = {
|
||||
"shell/browser/child_web_contents_tracker.h",
|
||||
"shell/browser/cookie_change_notifier.cc",
|
||||
"shell/browser/cookie_change_notifier.h",
|
||||
"shell/browser/draggable_region_provider.h",
|
||||
"shell/browser/electron_api_ipc_handler_impl.cc",
|
||||
"shell/browser/electron_api_ipc_handler_impl.h",
|
||||
"shell/browser/electron_autofill_driver.cc",
|
||||
@@ -370,6 +382,8 @@ filenames = {
|
||||
"shell/browser/electron_navigation_throttle.h",
|
||||
"shell/browser/electron_permission_manager.cc",
|
||||
"shell/browser/electron_permission_manager.h",
|
||||
"shell/browser/electron_quota_permission_context.cc",
|
||||
"shell/browser/electron_quota_permission_context.h",
|
||||
"shell/browser/electron_speech_recognition_manager_delegate.cc",
|
||||
"shell/browser/electron_speech_recognition_manager_delegate.h",
|
||||
"shell/browser/electron_web_contents_utility_handler_impl.cc",
|
||||
@@ -484,7 +498,6 @@ filenames = {
|
||||
"shell/browser/ui/inspectable_web_contents.cc",
|
||||
"shell/browser/ui/inspectable_web_contents.h",
|
||||
"shell/browser/ui/inspectable_web_contents_delegate.h",
|
||||
"shell/browser/ui/inspectable_web_contents_view.cc",
|
||||
"shell/browser/ui/inspectable_web_contents_view.h",
|
||||
"shell/browser/ui/inspectable_web_contents_view_delegate.cc",
|
||||
"shell/browser/ui/inspectable_web_contents_view_delegate.h",
|
||||
@@ -494,14 +507,6 @@ filenames = {
|
||||
"shell/browser/ui/tray_icon_observer.h",
|
||||
"shell/browser/ui/webui/accessibility_ui.cc",
|
||||
"shell/browser/ui/webui/accessibility_ui.h",
|
||||
"shell/browser/usb/electron_usb_delegate.cc",
|
||||
"shell/browser/usb/electron_usb_delegate.h",
|
||||
"shell/browser/usb/usb_chooser_context.cc",
|
||||
"shell/browser/usb/usb_chooser_context.h",
|
||||
"shell/browser/usb/usb_chooser_context_factory.cc",
|
||||
"shell/browser/usb/usb_chooser_context_factory.h",
|
||||
"shell/browser/usb/usb_chooser_controller.cc",
|
||||
"shell/browser/usb/usb_chooser_controller.h",
|
||||
"shell/browser/web_contents_permission_helper.cc",
|
||||
"shell/browser/web_contents_permission_helper.h",
|
||||
"shell/browser/web_contents_preferences.cc",
|
||||
@@ -584,7 +589,6 @@ filenames = {
|
||||
"shell/common/gin_converters/std_converter.h",
|
||||
"shell/common/gin_converters/time_converter.cc",
|
||||
"shell/common/gin_converters/time_converter.h",
|
||||
"shell/common/gin_converters/usb_device_info_converter.h",
|
||||
"shell/common/gin_converters/value_converter.cc",
|
||||
"shell/common/gin_converters/value_converter.h",
|
||||
"shell/common/gin_helper/arguments.cc",
|
||||
@@ -647,7 +651,6 @@ filenames = {
|
||||
"shell/common/process_util.h",
|
||||
"shell/common/skia_util.cc",
|
||||
"shell/common/skia_util.h",
|
||||
"shell/common/thread_restrictions.h",
|
||||
"shell/common/v8_value_serializer.cc",
|
||||
"shell/common/v8_value_serializer.h",
|
||||
"shell/common/world_ids.h",
|
||||
@@ -687,6 +690,8 @@ filenames = {
|
||||
]
|
||||
|
||||
lib_sources_extensions = [
|
||||
"shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.cc",
|
||||
"shell/browser/extensions/api/cryptotoken_private/cryptotoken_private_api.h",
|
||||
"shell/browser/extensions/api/management/electron_management_api_delegate.cc",
|
||||
"shell/browser/extensions/api/management/electron_management_api_delegate.h",
|
||||
"shell/browser/extensions/api/resources_private/resources_private_api.cc",
|
||||
|
||||
@@ -414,7 +414,14 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory/unique_ptr.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator_construction.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory/voidify.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/memory_resource.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/monotonic_buffer_resource.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/polymorphic_allocator.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/pool_options.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/synchronized_pool_resource.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__memory_resource/unsynchronized_pool_resource.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__mutex_base",
|
||||
"//buildtools/third_party/libc++/trunk/include/__node_handle",
|
||||
"//buildtools/third_party/libc++/trunk/include/__numeric/accumulate.h",
|
||||
@@ -482,6 +489,7 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/filter_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/iota_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/istream_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/join_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/lazy_split_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/non_propagating_cache.h",
|
||||
@@ -495,6 +503,7 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/size.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/subrange.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/take_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/take_while_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/transform_view.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/view_interface.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/__ranges/views.h",
|
||||
@@ -775,6 +784,7 @@ libcxx_headers = [
|
||||
"//buildtools/third_party/libc++/trunk/include/map",
|
||||
"//buildtools/third_party/libc++/trunk/include/math.h",
|
||||
"//buildtools/third_party/libc++/trunk/include/memory",
|
||||
"//buildtools/third_party/libc++/trunk/include/memory_resource",
|
||||
"//buildtools/third_party/libc++/trunk/include/module.modulemap.in",
|
||||
"//buildtools/third_party/libc++/trunk/include/mutex",
|
||||
"//buildtools/third_party/libc++/trunk/include/new",
|
||||
|
||||
@@ -623,11 +623,11 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
};
|
||||
|
||||
const { readdir } = fs;
|
||||
fs.readdir = function (pathArgument: string, options: { encoding?: string | null; withFileTypes?: boolean } = {}, callback?: Function) {
|
||||
fs.readdir = function (pathArgument: string, options?: { encoding?: string | null; withFileTypes?: boolean } | null, callback?: Function) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = {};
|
||||
options = undefined;
|
||||
}
|
||||
if (!pathInfo.isAsar) return readdir.apply(this, arguments);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
@@ -646,7 +646,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
return;
|
||||
}
|
||||
|
||||
if (options.withFileTypes) {
|
||||
if (options?.withFileTypes) {
|
||||
const dirents = [];
|
||||
for (const file of files) {
|
||||
const childPath = path.join(filePath, file);
|
||||
|
||||
@@ -4,12 +4,7 @@ let _inAppPurchase;
|
||||
|
||||
if (process.platform === 'darwin') {
|
||||
const { inAppPurchase } = process._linkedBinding('electron_browser_in_app_purchase');
|
||||
const _purchase = inAppPurchase.purchaseProduct as (productID: string, quantity?: number, username?: string) => Promise<boolean>;
|
||||
inAppPurchase.purchaseProduct = (productID: string, opts?: number | { quantity?: number, username?: string }) => {
|
||||
const quantity = typeof opts === 'object' ? opts.quantity : opts;
|
||||
const username = typeof opts === 'object' ? opts.username : undefined;
|
||||
return _purchase.apply(inAppPurchase, [productID, quantity, username]);
|
||||
};
|
||||
|
||||
_inAppPurchase = inAppPurchase;
|
||||
} else {
|
||||
_inAppPurchase = new EventEmitter();
|
||||
|
||||
@@ -272,7 +272,7 @@ WebContents.prototype.printToPDF = async function (options) {
|
||||
|
||||
if (options.pageRanges !== undefined) {
|
||||
if (typeof options.pageRanges !== 'string') {
|
||||
return Promise.reject(new Error('printBackground must be a String'));
|
||||
return Promise.reject(new Error('pageRanges must be a String'));
|
||||
}
|
||||
printSettings.pageRanges = options.pageRanges;
|
||||
}
|
||||
|
||||
@@ -52,16 +52,8 @@ if (process.type === 'renderer') {
|
||||
}
|
||||
|
||||
const originalResolveFilename = Module._resolveFilename;
|
||||
|
||||
// 'electron/main', 'electron/renderer' and 'electron/common' are module aliases
|
||||
// of the 'electron' module for TypeScript purposes, i.e., the types for
|
||||
// 'electron/main' consist of only main process modules, etc. It is intentional
|
||||
// that these can be `require()`-ed from both the main process as well as the
|
||||
// renderer process regardless of the names, they're superficial for TypeScript
|
||||
// only.
|
||||
const electronModuleNames = new Set(['electron', 'electron/main', 'electron/renderer', 'electron/common']);
|
||||
Module._resolveFilename = function (request: string, parent: NodeModule, isMain: boolean, options?: { paths: Array<string>}) {
|
||||
if (electronModuleNames.has(request)) {
|
||||
if (request === 'electron' || request.startsWith('electron/')) {
|
||||
return 'electron';
|
||||
} else {
|
||||
return originalResolveFilename(request, parent, isMain, options);
|
||||
|
||||
@@ -24,6 +24,7 @@ export class WebViewImpl {
|
||||
public guestInstanceId?: number
|
||||
public hasFocus = false
|
||||
public internalInstanceId?: number;
|
||||
public resizeObserver?: ResizeObserver;
|
||||
public viewInstanceId: number
|
||||
|
||||
// on* Event handlers.
|
||||
@@ -102,6 +103,14 @@ export class WebViewImpl {
|
||||
this.attributes.get(attributeName)!.handleMutation(oldValue, newValue);
|
||||
}
|
||||
|
||||
onElementResize () {
|
||||
const props = {
|
||||
newWidth: this.webviewNode.clientWidth,
|
||||
newHeight: this.webviewNode.clientHeight
|
||||
};
|
||||
this.dispatchEvent('resize', props);
|
||||
}
|
||||
|
||||
createGuest () {
|
||||
this.internalInstanceId = getNextId();
|
||||
this.hooks.guestViewInternal.createGuest(this.internalElement, this.internalInstanceId, this.buildParams())
|
||||
@@ -194,6 +203,10 @@ export class WebViewImpl {
|
||||
}
|
||||
|
||||
this.guestInstanceId = guestInstanceId;
|
||||
// TODO(zcbenz): Should we deprecate the "resize" event? Wait, it is not
|
||||
// even documented.
|
||||
this.resizeObserver = new ResizeObserver(this.onElementResize.bind(this));
|
||||
this.resizeObserver.observe(this.internalElement);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
"@azure/storage-blob": "^12.9.0",
|
||||
"@electron/asar": "^3.2.1",
|
||||
"@electron/docs-parser": "^1.0.0",
|
||||
"@electron/typescript-definitions": "^8.10.0",
|
||||
"@octokit/auth-app": "^2.10.0",
|
||||
@@ -32,6 +31,7 @@
|
||||
"@types/webpack-env": "^1.17.0",
|
||||
"@typescript-eslint/eslint-plugin": "^4.4.1",
|
||||
"@typescript-eslint/parser": "^4.4.1",
|
||||
"asar": "^3.1.0",
|
||||
"aws-sdk": "^2.814.0",
|
||||
"buffer": "^6.0.3",
|
||||
"check-for-leaks": "^1.2.1",
|
||||
@@ -143,7 +143,8 @@
|
||||
"ts-node script/check-patch-diff.ts"
|
||||
],
|
||||
"DEPS": [
|
||||
"node script/gen-hunspell-filenames.js"
|
||||
"node script/gen-hunspell-filenames.js",
|
||||
"node script/gen-libc++-filenames.js"
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
|
||||
1
patches/angle/.patches
Normal file
1
patches/angle/.patches
Normal file
@@ -0,0 +1 @@
|
||||
fix_rename_webswapcgllayer_to_webswapcgllayerchromium.patch
|
||||
@@ -0,0 +1,66 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Milan Burda <milan.burda@gmail.com>
|
||||
Date: Mon, 10 Oct 2022 15:11:08 +0400
|
||||
Subject: fix: rename WebSwapCGLLayer to WebSwapCGLLayerChromium
|
||||
|
||||
Class WebSwapCGLLayer is implemented in both /System/Library/Frameworks/WebKit.framework/Versions/A/Frameworks/WebCore.framework/Versions/A/Frameworks/libANGLE-shared.dylib (0x23c589b50)
|
||||
and src/out/testing/Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib (0x1123f8488).
|
||||
One of the two will be used. Which one is undefined.
|
||||
|
||||
diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h
|
||||
index 7101cd271c07e604c6f5241d1a22f59f446c0033..98a89976f87e32a66bd504951698204fad938d57 100644
|
||||
--- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h
|
||||
+++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.h
|
||||
@@ -18,7 +18,7 @@ struct __IOSurface;
|
||||
typedef __IOSurface *IOSurfaceRef;
|
||||
|
||||
// WebKit's build process requires that every Objective-C class name has the prefix "Web".
|
||||
-@class WebSwapCGLLayer;
|
||||
+@class WebSwapCGLLayerChromium;
|
||||
|
||||
namespace rx
|
||||
{
|
||||
@@ -89,7 +89,7 @@ class WindowSurfaceCGL : public SurfaceGL
|
||||
gl::Framebuffer *framebuffer) override;
|
||||
|
||||
private:
|
||||
- WebSwapCGLLayer *mSwapLayer;
|
||||
+ WebSwapCGLLayerChromium *mSwapLayer;
|
||||
SharedSwapState mSwapState;
|
||||
uint64_t mCurrentSwapId;
|
||||
|
||||
diff --git a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
|
||||
index 27990e9c2facbbe0e30f4b275e0778a6474fb9ce..84f9fa9b6d31fb0e85a4c4270dff4d935f855c26 100644
|
||||
--- a/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
|
||||
+++ b/src/libANGLE/renderer/gl/cgl/WindowSurfaceCGL.mm
|
||||
@@ -24,7 +24,7 @@
|
||||
# include "libANGLE/renderer/gl/StateManagerGL.h"
|
||||
# include "libANGLE/renderer/gl/cgl/DisplayCGL.h"
|
||||
|
||||
-@interface WebSwapCGLLayer : CAOpenGLLayer {
|
||||
+@interface WebSwapCGLLayerChromium : CAOpenGLLayer {
|
||||
CGLContextObj mDisplayContext;
|
||||
|
||||
bool initialized;
|
||||
@@ -38,7 +38,7 @@ - (id)initWithSharedState:(rx::SharedSwapState *)swapState
|
||||
withFunctions:(const rx::FunctionsGL *)functions;
|
||||
@end
|
||||
|
||||
-@implementation WebSwapCGLLayer
|
||||
+@implementation WebSwapCGLLayerChromium
|
||||
- (id)initWithSharedState:(rx::SharedSwapState *)swapState
|
||||
withContext:(CGLContextObj)displayContext
|
||||
withFunctions:(const rx::FunctionsGL *)functions
|
||||
@@ -220,9 +220,9 @@ - (void)drawInCGLContext:(CGLContextObj)glContext
|
||||
mSwapState.lastRendered = &mSwapState.textures[1];
|
||||
mSwapState.beingPresented = &mSwapState.textures[2];
|
||||
|
||||
- mSwapLayer = [[WebSwapCGLLayer alloc] initWithSharedState:&mSwapState
|
||||
- withContext:mContext
|
||||
- withFunctions:mFunctions];
|
||||
+ mSwapLayer = [[WebSwapCGLLayerChromium alloc] initWithSharedState:&mSwapState
|
||||
+ withContext:mContext
|
||||
+ withFunctions:mFunctions];
|
||||
[mLayer addSublayer:mSwapLayer];
|
||||
[mSwapLayer setContentsScale:[mLayer contentsScale]];
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index cfd1862d4bd031dffb4e7d0cfd0aadcb61200c47..d14c8cd02171daf26ed9460b890b82475d3537c0 100644
|
||||
index a6ca0ab96266475384429e73970de18d4ba09912..c7e7bd02f2484f91bf55df1400e94804e61ea914 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1320,7 +1320,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1319,7 +1319,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index cfd1862d4bd031dffb4e7d0cfd0aadcb61200c47..d14c8cd02171daf26ed9460b890b8247
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2598,13 +2598,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2592,13 +2592,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ index cfd1862d4bd031dffb4e7d0cfd0aadcb61200c47..d14c8cd02171daf26ed9460b890b8247
|
||||
void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
|
||||
RSA *(*cb)(SSL *ssl, int is_export,
|
||||
diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc
|
||||
index 51366a4fdf73041abd69184fef6bbc99ee5554db..c61bc3c979f9339014d63419034b0897e4f1c3ba 100644
|
||||
index 3515f602f192369bfc25b1df0bb8a71d3320afb7..5179b12f63740771312563391a1c348d611a8ba9 100644
|
||||
--- a/ssl/ssl_test.cc
|
||||
+++ b/ssl/ssl_test.cc
|
||||
@@ -8433,11 +8433,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
@@ -8360,11 +8360,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN);
|
||||
|
||||
@@ -63,7 +63,7 @@ index 51366a4fdf73041abd69184fef6bbc99ee5554db..c61bc3c979f9339014d63419034b0897
|
||||
// Although the client has seen close_notify, it should continue to report
|
||||
// |SSL_ERROR_SYSCALL| when its writes fail.
|
||||
ret = SSL_write(client.get(), data, sizeof(data));
|
||||
@@ -8445,22 +8440,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
@@ -8372,22 +8367,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL);
|
||||
EXPECT_TRUE(write_failed);
|
||||
write_failed = false;
|
||||
|
||||
@@ -10,6 +10,7 @@ render_widget_host_view_base.patch
|
||||
render_widget_host_view_mac.patch
|
||||
webview_cross_drag.patch
|
||||
gin_enable_disable_v8_platform.patch
|
||||
disable-redraw-lock.patch
|
||||
enable_reset_aspect_ratio.patch
|
||||
boringssl_build_gn.patch
|
||||
pepper_plugin_support.patch
|
||||
@@ -84,6 +85,7 @@ hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
|
||||
logging_win32_only_create_a_console_if_logging_to_stderr.patch
|
||||
fix_media_key_usage_with_globalshortcuts.patch
|
||||
feat_expose_raw_response_headers_from_urlloader.patch
|
||||
chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch
|
||||
process_singleton.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
add_ui_scopedcliboardwriter_writeunsaferawdata.patch
|
||||
@@ -114,13 +116,13 @@ fix_crash_loading_non-standard_schemes_in_iframes.patch
|
||||
fix_return_v8_value_from_localframe_requestexecutescript.patch
|
||||
create_browser_v8_snapshot_file_name_fuse.patch
|
||||
feat_configure_launch_options_for_service_process.patch
|
||||
feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch
|
||||
fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
|
||||
preconnect_manager.patch
|
||||
fix_remove_caption-removing_style_call.patch
|
||||
build_allow_electron_to_use_exec_script.patch
|
||||
build_only_use_the_mas_build_config_in_the_required_components.patch
|
||||
cherry-pick-7196a42b42ce.patch
|
||||
fix_tray_icon_gone_on_lock_screen.patch
|
||||
chore_introduce_blocking_api_for_electron.patch
|
||||
chore_patch_out_partition_attribute_dcheck_for_webviews.patch
|
||||
chore_patch_out_profile_methods_in_profile_selections_cc.patch
|
||||
cherry-pick-2611772cf0a0.patch
|
||||
cherry-pick-3235c1d1955b.patch
|
||||
expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
|
||||
cherry-pick-43637378b14e.patch
|
||||
|
||||
@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
||||
3. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index 6626e248a43486cc6e4ad59e7952f17e9fb7a45c..dcbe8bc83d57caff748be246722060b8c290f99c 100644
|
||||
index 2b38e56d26ae7738d82e14094c2d63357a9eb1ef..23e73566e444ab9ff3e409b0b87024be327e2dc4 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
@@ -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 a044de5f13ef0f07f3aca582d706a4ffa9bc35a8..9543b18f3e7c524a8a56ffcfc02bb9b19f863035 100644
|
||||
index 5c3bcea34087025ecab1959fd2d55fe5c5369142..7b019632914eb1bd4ebef9468d20c7c7f2560a94 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -242,6 +242,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -241,6 +241,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index a044de5f13ef0f07f3aca582d706a4ffa9bc35a8..9543b18f3e7c524a8a56ffcfc02bb9b1
|
||||
// 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
|
||||
@@ -326,7 +330,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -325,7 +329,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
|
||||
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 7308301ceac36e7bc39cb82181e21f010caa7584..72c9d7960aaf7d98352ef41630fc2398a7d73cc4 100644
|
||||
index 0af40eb8f556aa29c8b7e1bdd0d62b1fb7b38791..b3ae64cf8836fdd3634bfd24fc2f8a25e1735da5 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -136,6 +136,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -23,10 +23,10 @@ index 7308301ceac36e7bc39cb82181e21f010caa7584..72c9d7960aaf7d98352ef41630fc2398
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 08bd2ab693d381ae422fe57757cff59875be019d..87abf860121fda9473be1c97b75c766bd1f30a30 100644
|
||||
index fb0483af59b0e289bd716a3417a545233f17be1f..6a7e5ab92e6fa23762794efc3031ce982836c20e 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4392,6 +4392,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4365,6 +4365,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 08bd2ab693d381ae422fe57757cff59875be019d..87abf860121fda9473be1c97b75c766b
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index f5bddeb5119cc8771a34c49a31db79862ca86b2f..a4cf7d0d45457ba973cad1a0111da3d268d9af6f 100644
|
||||
index 0e1296d023867bf1e4f12757d482cffcfe8a1942..0e4b144aeb54af86bc663d8b20fba4d0483ec28c 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -605,6 +605,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -591,6 +591,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
uint32_t ng_call_count) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index f5bddeb5119cc8771a34c49a31db79862ca86b2f..a4cf7d0d45457ba973cad1a0111da3d2
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index dc4f1e9a0805abb37c980910991b58c1fe0ea4f6..687d8e33151d6b1192a4c391c4509fcfcaa3d5bb 100644
|
||||
index 149ca596036a4a4c123b6982014001953cf06800..dd069baf01929b75f42093ecf09ecf8eb20376c0 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -593,6 +593,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -580,6 +580,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -67,10 +67,10 @@ index dc4f1e9a0805abb37c980910991b58c1fe0ea4f6..687d8e33151d6b1192a4c391c4509fcf
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 9736b31c03a32635fb8fde581321cc10ec11b11a..c9fd2170a25a7970648b8210ebe94e225f4ee3aa 100644
|
||||
index d0b5233ad45995bd6128a03fe9267618d723d683..e5e93be8f2433196a13aa104241b1ddd63985e81 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -197,6 +197,7 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -210,6 +210,7 @@ void LocalWindowProxy::Initialize() {
|
||||
}
|
||||
|
||||
InstallConditionalFeatures();
|
||||
@@ -79,10 +79,10 @@ index 9736b31c03a32635fb8fde581321cc10ec11b11a..c9fd2170a25a7970648b8210ebe94e22
|
||||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 68ddcc6249fb85983069ce37bca2a3e71dcb7d44..110a7772999563563bdd5e52e2de027e46097bc9 100644
|
||||
index 83a62e23b1d395b0aa545de5b828c24196cccc6d..0ca8163eb9ab87aead27bc8b2ee9e614d7e1d8c7 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -315,6 +315,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -301,6 +301,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,10 +92,10 @@ index 68ddcc6249fb85983069ce37bca2a3e71dcb7d44..110a7772999563563bdd5e52e2de027e
|
||||
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 b2f8a26a4f9be27dd3b8d317efc8739ca08a2ca0..5ae8971055bc3b2ee6644fb869d9d6772ba01053 100644
|
||||
index 7b726508f926eb9e694230c3801a4324aac1e989..c688eb24441e2921de1fc85d69deb4a965fdd2b7 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
|
||||
@@ -282,6 +282,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -110,10 +110,10 @@ index b2f8a26a4f9be27dd3b8d317efc8739ca08a2ca0..5ae8971055bc3b2ee6644fb869d9d677
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index c1d35e9ec55a543f5b9287a5af5e6260f42e9c2d..2271a4ca5190eff0aa89fa3969048d19470405e5 100644
|
||||
index c974fa2f7c7f9c2aa5f075ec4aeb887d0b104453..b4ed9b2fadcfad7676387045b8581eb8d33e89e8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override;
|
||||
@@ -123,10 +123,10 @@ index c1d35e9ec55a543f5b9287a5af5e6260f42e9c2d..2271a4ca5190eff0aa89fa3969048d19
|
||||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index ae991172dc7eaf83f48158deb1c08f85358350ba..c31d38b890864f6ea3eb6fb82f5b4a06f95d29cb 100644
|
||||
index ba841a41c1387c2cac3578bc01524b0a1868f74d..d2ce9ae524025cc06028b4ca80d04c580dc29b44 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -373,6 +373,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -366,6 +366,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -6,14 +6,15 @@ Subject: add electron deps to license credits file
|
||||
Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index a33adb4901c76895f1dba6cb06ab4f866480a397..e2702d4c6920f0c635a8543533c8d5261454abbf 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -384,6 +384,31 @@ SPECIAL_CASES = {
|
||||
"License": "Apache 2.0",
|
||||
"License File": "/third_party/selenium-atoms/LICENSE.closure",
|
||||
diff --git a/tools/licenses.py b/tools/licenses.py
|
||||
index c4ffc17fb5b372d56f68bc69e9d4fc93ae40d45f..253618104ea7bb4c97085da9df1496efaee32a46 100755
|
||||
--- a/tools/licenses.py
|
||||
+++ b/tools/licenses.py
|
||||
@@ -347,6 +347,32 @@ SPECIAL_CASES = {
|
||||
"License File":
|
||||
"/third_party/swiftshader/third_party/SPIRV-Headers/LICENSE",
|
||||
},
|
||||
+
|
||||
+ os.path.join('third_party', 'electron_node'): {
|
||||
+ "Name": "Node.js",
|
||||
+ "URL": "https://github.com/nodejs/node",
|
||||
|
||||
@@ -8,10 +8,10 @@ decorations in maximized mode where needed, preventing empty space caused
|
||||
by decoration shadows and rounded titlebars around the window while maximized.
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
|
||||
index c61bac00076822ae729882c64f3ad89e0d849e91..28cd9fb14783651ee651917f135c68faa0f2059a 100644
|
||||
index c847ccaad26a147b18abb95dd4a9898b9024c296..d32bd13fd25e8cbf577252813fd93827e0aa8db3 100644
|
||||
--- a/ui/gtk/gtk_ui.cc
|
||||
+++ b/ui/gtk/gtk_ui.cc
|
||||
@@ -507,13 +507,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
@@ -504,13 +504,15 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -31,11 +31,11 @@ index c61bac00076822ae729882c64f3ad89e0d849e91..28cd9fb14783651ee651917f135c68fa
|
||||
}
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
|
||||
index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045be76f6761 100644
|
||||
index 18c34ce9965912caa58457fc28be2b4f6edffb78..d1fc002ff98ea25ff4fec7bacd44140c7d7ec4fd 100644
|
||||
--- a/ui/gtk/gtk_ui.h
|
||||
+++ b/ui/gtk/gtk_ui.h
|
||||
@@ -106,7 +106,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
SkColor GetInactiveSelectionFgColor() const override;
|
||||
@@ -102,7 +102,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
WindowFrameActionSource source) override;
|
||||
bool PreferDarkTheme() const override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
- ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override;
|
||||
@@ -43,17 +43,12 @@ index ebc31db3dad9ba7904fbd345c6a1ba31ed6fd813..1d2ffc82bb67ed80f508631c8c7d045b
|
||||
|
||||
private:
|
||||
using TintMap = std::map<int, color_utils::HSL>;
|
||||
@@ -195,10 +195,13 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
@@ -191,6 +191,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
// while Chrome is running.
|
||||
std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
|
||||
std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;
|
||||
+ std::unique_ptr<ui::WindowFrameProvider> solid_maximized_frame_provider_;
|
||||
+ std::unique_ptr<ui::WindowFrameProvider> transparent_maximized_frame_provider_;
|
||||
|
||||
// Objects to notify when the window frame button order changes.
|
||||
base::ObserverList<ui::WindowButtonOrderObserver>::Unchecked
|
||||
window_button_order_observer_list_;
|
||||
+
|
||||
};
|
||||
|
||||
} // namespace gtk
|
||||
@@ -167,15 +162,15 @@ index d8cb2c6aab333cc55ad1daa70ac91b0569d33a7c..558aa3979301f79df789a29ba3ad1cf1
|
||||
|
||||
} // namespace gtk
|
||||
diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
|
||||
index b5fd57741d2f47bda9499cf10e73cc9b3dd1b4dc..35e5bedb719af699485b575ece4bdb4f90df07df 100644
|
||||
index 4c5e4e19fc94c62717d4983c0dc056628c59bd4d..fa9be339b2004df224d46431e3fcced3b79e9a2a 100644
|
||||
--- a/ui/linux/linux_ui.h
|
||||
+++ b/ui/linux/linux_ui.h
|
||||
@@ -273,7 +273,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
|
||||
@@ -270,7 +270,7 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
|
||||
// if transparency is unsupported and the frame should be rendered opaque.
|
||||
// The returned object is not owned by the caller and will remain alive until
|
||||
// the process ends.
|
||||
- virtual WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) = 0;
|
||||
+ virtual WindowFrameProvider* GetWindowFrameProvider(bool solid_frame, bool maximized) = 0;
|
||||
|
||||
protected:
|
||||
LinuxUiTheme();
|
||||
const base::ObserverList<WindowButtonOrderObserver>::Unchecked&
|
||||
window_button_order_observer_list() const {
|
||||
|
||||
@@ -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/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 989e7686f61acc18244801b0f8e52e779c8ac856..60182bd144295be0a7f4f05525246dd203d81ad4 100644
|
||||
index 564822b722580aa20adf728ca4706a853c285c8b..175a803839efd10226476285bfc506d01ef2626d 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -690,6 +690,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -675,6 +675,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ index 989e7686f61acc18244801b0f8e52e779c8ac856..60182bd144295be0a7f4f05525246dd2
|
||||
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 4e40347feef5c7dde979407c4d85867fb5dd1c61..a72c2f97c1b28f847a145585dcd6ad6578de7ef6 100644
|
||||
index 84b4727e8e8f7eb84c6654854606dc1d4f3c5fb9..827cf26d2a1e5c2869524c4709a613896a94dbb4 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -138,6 +138,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -60,10 +60,10 @@ index 0cfe109e1ee4ac59dc8ddc68dff3ab929fcf480b..398be46c71fb9ea42ea655b204aaff31
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index c8655d9270b812df04f27025ff29a2fb6d2a4066..2f83e5ce40f8217ff5d53f7205299ad7ac4d2013 100644
|
||||
index f3b681ec44c57f69c57390f31bd951cef8de3f0c..2fbe866ddf50d7eb324b0e2e4d120f4c4bcf2875 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -367,6 +367,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -365,6 +365,7 @@ class BLINK_EXPORT WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -72,10 +72,10 @@ index c8655d9270b812df04f27025ff29a2fb6d2a4066..2f83e5ce40f8217ff5d53f7205299ad7
|
||||
// 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 5953f73697187280dacc4a77aec646a670983f5d..db53f78f371f5d7e76ce0844d7b3cb3c912af4e8 100644
|
||||
index 33cd38a8e24a2db922987a957a115a5892382a59..b07f239296667e0d3809ccee255d608e7b0d0c9b 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3827,13 +3827,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3811,13 +3811,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -99,10 +99,10 @@ index 5953f73697187280dacc4a77aec646a670983f5d..db53f78f371f5d7e76ce0844d7b3cb3c
|
||||
if (!is_initial_state) {
|
||||
for (auto& observer : observers_)
|
||||
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 f283bfde9e43dd38a8cf769d8ac7cec643fe5222..fef7875a7eb323c37730bb80227c40c31edae44e 100644
|
||||
index ac38111515f40630f2d16c8425e39775e4118818..0a4890ed17305e215eb8963d27767d77471eebb7 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -439,6 +439,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -426,6 +426,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -110,7 +110,7 @@ index f283bfde9e43dd38a8cf769d8ac7cec643fe5222..fef7875a7eb323c37730bb80227c40c3
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -895,6 +896,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -879,6 +880,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ index 86791679979e715308090c5868cac9d54169d812..92d1c191249a2922a9a1196fabfc6146
|
||||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(
|
||||
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 22220de13b6d7b88cfe0b02367836f7bd5e139b5..4aad04688926066c75d07aea9a6d2a5932e37979 100644
|
||||
index f8792c52abc09a8fadbd4f3a478ce29c7f49c1a7..6e41b0be6aa017521efe73dc6c80cf76d3059e0c 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
|
||||
@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -56,7 +56,7 @@ index 22220de13b6d7b88cfe0b02367836f7bd5e139b5..4aad04688926066c75d07aea9a6d2a59
|
||||
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 418233a0c46fa0837c9bd11e360d5279c1b1ff6d..b47ba60ec901460db3b1a8a2f81f5b7a9006c647 100644
|
||||
index cac389c5ebd303945d958336e0c3601fdc2d7152..0c56b1d9e3c94559abd77325e3e5791e46d72867 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -88,7 +88,7 @@ index 418233a0c46fa0837c9bd11e360d5279c1b1ff6d..b47ba60ec901460db3b1a8a2f81f5b7a
|
||||
// This flags corresponds to a Page's Settings' setCookieEnabled state. It
|
||||
// only controls whether or not the "document.cookie" field is properly
|
||||
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 625db31846992c54083b30b2990fb359e6a3b3cd..1ccf341ecce1cf2ca17e3d4f7d5c42b8309caf96 100644
|
||||
index e3290deda800c0807f5c9dd0d8360c15f9b56554..eff323e0c2a660b965f2c834ac4d0ae795528268 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -153,7 +153,7 @@ index 625db31846992c54083b30b2990fb359e6a3b3cd..1ccf341ecce1cf2ca17e3d4f7d5c42b8
|
||||
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 5d764552d3f8bc30b6d6efa83ca3ff120dba4b54..cbd2f58730c107eafba6358b12517e7d55bbdf0c 100644
|
||||
index b370a37da63b26937cf07a7be121e56887ef99a5..4577bfba785f052ebb05be0ef15455c8a1d10aee 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: Allow setting secondary label via SimpleMenuModel
|
||||
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
|
||||
|
||||
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
|
||||
index ad157214c1d98b241f081db47f4ecffcf028f501..c9966e3d1eb5701ed12eb77d630f287d2720c913 100644
|
||||
index 185b8281232401a76844987b4b949954e62f93b6..ac58d5bc1f2ced7784621a46bb339a96fc20ed71 100644
|
||||
--- a/ui/base/models/simple_menu_model.cc
|
||||
+++ b/ui/base/models/simple_menu_model.cc
|
||||
@@ -52,6 +52,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
|
||||
return std::u16string();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ index ad157214c1d98b241f081db47f4ecffcf028f501..c9966e3d1eb5701ed12eb77d630f287d
|
||||
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
|
||||
int command_id) const {
|
||||
return ImageModel();
|
||||
@@ -310,6 +315,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
|
||||
@@ -311,6 +316,11 @@ void SimpleMenuModel::SetLabel(size_t index, const std::u16string& label) {
|
||||
MenuItemsChanged();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ index ad157214c1d98b241f081db47f4ecffcf028f501..c9966e3d1eb5701ed12eb77d630f287d
|
||||
void SimpleMenuModel::SetMinorText(size_t index,
|
||||
const std::u16string& minor_text) {
|
||||
items_[ValidateItemIndex(index)].minor_text = minor_text;
|
||||
@@ -403,6 +413,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
|
||||
@@ -404,6 +414,12 @@ std::u16string SimpleMenuModel::GetLabelAt(size_t index) const {
|
||||
return items_[ValidateItemIndex(index)].label;
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ index ad157214c1d98b241f081db47f4ecffcf028f501..c9966e3d1eb5701ed12eb77d630f287d
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index 3f2ae4cb1347a8bac7df6d993d5b70b4212fdc66..72d70e3f94f990f8f9f5e4268f6186762e409d15 100644
|
||||
index 7c24e00caa235d0434377c1f4225efbe462f5525..cb2d82d806c679b780f83373d2bdffc9b1f1e12d 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
|
||||
@@ -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 d6d1494f91ff6287eaf168700a7f9db246da43b3..7d1bc01d77f9e08d04030ef218639ed84cf5d514 100644
|
||||
index 8b6abb315d33ce752884510beca325833b893bce..b197d38944c0560c7f9cb25b706eb8a5876c59d3 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -124,14 +124,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index d6d1494f91ff6287eaf168700a7f9db246da43b3..7d1bc01d77f9e08d04030ef218639ed8
|
||||
// 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 299ff3e0c4ccc2ecc55ac6096c8c8ebba5d449db..7dab874043eeef7c352c48d576f124d8a5269da9 100644
|
||||
index 79bb5259e80c4708e1b93876b6aa8cd3e8dca66c..175b2a77d696a60fa8209809edc758912a11e83a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -552,10 +552,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -548,10 +548,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index 299ff3e0c4ccc2ecc55ac6096c8c8ebba5d449db..7dab874043eeef7c352c48d576f124d8
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -603,6 +599,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -599,6 +595,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 1c33c3345fd7dcc106576b239946be79eee45cb1..2af0e9b265ff00e70ec131c60cd4306796bc1e30 100644
|
||||
index cfa800eb9fc7707b6b881d6504371fe7c56c4642..1a0cc1e6cd7fb90f84699ae18b00d68428a28e8d 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -81,6 +81,7 @@
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 53c9e4ec12aeffacf88b9aac2d20d095246ca9db..b8185b1c737f6e7459e58a676e02b26c65dd4a5c 100644
|
||||
index 55f5ee19f13e49dfd0aa2300d980d813474c95ef..483e0f0598bfed76b4a4283be3cfa1fdb9eafe5a 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -169,4 +169,6 @@ exec_script_whitelist =
|
||||
|
||||
@@ -9,15 +9,15 @@ and can be removed when the crash in fork is resolved.
|
||||
Related issue: https://github.com/electron/electron/issues/32718
|
||||
|
||||
diff --git a/build_overrides/partition_alloc.gni b/build_overrides/partition_alloc.gni
|
||||
index f621d80f9ce1909519a4a158b779117f3906383e..d190ac74157e69dd8bc9851a9b1ede9fe59c575e 100644
|
||||
index 44ace8017bdf9ce2ddb996e30ee03dbdc6274fb9..e2ce9f6c57e55f6a9257bb2e58e99895ca52f8c6 100644
|
||||
--- a/build_overrides/partition_alloc.gni
|
||||
+++ b/build_overrides/partition_alloc.gni
|
||||
@@ -41,7 +41,7 @@ _disable_partition_alloc_everywhere = is_component_build || (is_win && is_debug)
|
||||
@@ -40,7 +40,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug)
|
||||
|
||||
# - NaCl: No plans to support it.
|
||||
# - iOS: not done yet.
|
||||
-_is_partition_alloc_everywhere_platform = !is_nacl && !is_ios
|
||||
+_is_partition_alloc_everywhere_platform = !is_nacl && !is_ios && !is_mac
|
||||
-_is_partition_alloc_platform = !is_nacl && !is_ios
|
||||
+_is_partition_alloc_platform = !is_nacl && !is_ios && !is_mac
|
||||
|
||||
# Under Windows debug build, the allocator shim is not compatible with CRT.
|
||||
# NaCl in particular does seem to link some binaries statically
|
||||
|
||||
@@ -13,10 +13,10 @@ This patch can be removed when enable_print_content_analysis can be more
|
||||
easily enabled or disabled by default with buildflags.
|
||||
|
||||
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
|
||||
index 6c7cc4a41fed63a68d19caee424f3b102d2e09fc..1ef6b397de1a641ec19e4306389cc3f6d362c254 100644
|
||||
index 4c7f9e2a074229f002dba786123423066b49d3bc..f2cd0d435fda91a74970c51d120687d27fa2e0e1 100644
|
||||
--- a/printing/buildflags/buildflags.gni
|
||||
+++ b/printing/buildflags/buildflags.gni
|
||||
@@ -44,7 +44,7 @@ declare_args() {
|
||||
@@ -36,7 +36,7 @@ declare_args() {
|
||||
|
||||
# Enable snapshotting a page when printing for its content to be analyzed for
|
||||
# sensitive content by enterprise users.
|
||||
|
||||
@@ -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 58be09545e68ebdea72cccf5d3de8006af6b9375..1cbd939074eed59fa7227eeced4b8f396de7d3bc 100644
|
||||
index b12b4e65be8ad29054f5fdd98600888726b1d068..d67683efeabed3209eac553ff050ec2e5974f496 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -180,11 +180,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -181,11 +181,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
@@ -33,10 +33,10 @@ index 58be09545e68ebdea72cccf5d3de8006af6b9375..1cbd939074eed59fa7227eeced4b8f39
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index a90a57bbcd39e14dbd9ac485a7df92ee1d74fd7c..c4d024176f1f17f39d8c3a36b06b3299831c982c 100644
|
||||
index 6af6b725815f67cee31bf03382ea69c53c2897d8..63807e436ef7011a284357e237ada68508870d87 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4611,7 +4611,7 @@ static_library("browser") {
|
||||
@@ -4687,7 +4687,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
@@ -46,10 +46,10 @@ index a90a57bbcd39e14dbd9ac485a7df92ee1d74fd7c..c4d024176f1f17f39d8c3a36b06b3299
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 698a62277215423b51a946d3a25523f844dce3ac..8174066a5bf7a470c11d6ac3f804363e3f28b8e4 100644
|
||||
index 1c660e23fbfbe97d489bb7b0e463ef40197851be..60a43d97d47924e4d95ab27feb0a365e52878bfc 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6222,7 +6222,6 @@ test("unit_tests") {
|
||||
@@ -6157,7 +6157,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index 698a62277215423b51a946d3a25523f844dce3ac..8174066a5bf7a470c11d6ac3f804363e
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:crash_reporter_client_win_unit_tests",
|
||||
@@ -6247,6 +6246,10 @@ test("unit_tests") {
|
||||
@@ -6182,6 +6181,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,16 +68,16 @@ index 698a62277215423b51a946d3a25523f844dce3ac..8174066a5bf7a470c11d6ac3f804363e
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -7175,7 +7178,7 @@ test("unit_tests") {
|
||||
@@ -7109,7 +7112,7 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
- "//chrome:packed_resources_integrity_hash",
|
||||
+ # "//chrome:packed_resources_integrity_hash",
|
||||
"//chrome/browser/apps/app_service:test_support",
|
||||
"//chrome/browser/autofill_assistant/password_change/vector_icons:vector_icons",
|
||||
"//chrome/browser/enterprise/connectors/analysis:features",
|
||||
@@ -7302,6 +7305,10 @@ test("unit_tests") {
|
||||
"//chrome/browser/media/router:test_support",
|
||||
@@ -7232,6 +7235,10 @@ test("unit_tests") {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
||||
rebuild the entire tree.
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index efba84719e620954fd093dcac4ce2c60b6b97def..54ef20a4a8983eb176428d4074882582166a41f6 100644
|
||||
index 21b4055dc151bd1868fee580866109db8f69bd01..b852a33b41608ef2f157c8bf428158a012045454 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
@@ -27,7 +27,7 @@ index efba84719e620954fd093dcac4ce2c60b6b97def..54ef20a4a8983eb176428d4074882582
|
||||
# Set to enable the official build level of optimization. This has nothing
|
||||
# to do with branding, but enables an additional level of optimization above
|
||||
# release (!is_debug). This might be better expressed as a tri-state
|
||||
@@ -352,6 +355,7 @@ default_compiler_configs = [
|
||||
@@ -348,6 +351,7 @@ default_compiler_configs = [
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
"//build/config/coverage:default_coverage",
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
|
||||
@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
|
||||
nan tests
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
|
||||
index 21421aa32047dc1479693c5a5f7aa209aafa05d3..ed1972a765574bdc380ea0670b45906ad66aca69 100644
|
||||
index 3956cb73cdde75a2778fba1a9fae456e890a7b5e..deb7ceab1d8fffb4300d3a168d86f5d1236caa9d 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -44,7 +44,11 @@ config("winver") {
|
||||
@@ -32,7 +32,7 @@ index 21421aa32047dc1479693c5a5f7aa209aafa05d3..ed1972a765574bdc380ea0670b45906a
|
||||
]
|
||||
if (is_linux) {
|
||||
diff --git a/buildtools/third_party/libc++abi/BUILD.gn b/buildtools/third_party/libc++abi/BUILD.gn
|
||||
index 4e1e3346dc4a4463ac99a47ea7f2914945fee9e7..84c1a696dfa45a23505aa681c8ab2a684b3c12c2 100644
|
||||
index 8316e2754db29d96121d72bc4ef43313ec5760ba..225f05272d435bea47c02b0cc166291c0ba39244 100644
|
||||
--- a/buildtools/third_party/libc++abi/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++abi/BUILD.gn
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: build: make libcxx_abi_unstable false for electron
|
||||
https://nornagon.medium.com/a-libc-odyssey-973e51649063
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/__config_site b/buildtools/third_party/libc++/__config_site
|
||||
index 2df8632ec45777b387988fea1f2932661ed5ff3c..8b9995a6144f77d2772debf0e772b5e6d4063929 100644
|
||||
index c9230033a1250c50c863487bfea3547a3e821707..866c6f5c5f672b797be9456045405ac906a61b98 100644
|
||||
--- a/buildtools/third_party/libc++/__config_site
|
||||
+++ b/buildtools/third_party/libc++/__config_site
|
||||
@@ -12,7 +12,6 @@
|
||||
|
||||
@@ -1,282 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Mon, 14 Nov 2022 01:05:20 -0800
|
||||
Subject: build: only use the mas build config in the required components
|
||||
|
||||
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index c16491d621308b916780999af993a6752aca6ed9..241e84fd717eccc740f018c59ddd16c922a6c369 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1484,6 +1484,7 @@ component("base") {
|
||||
"//build/config/compiler:prevent_unsafe_narrowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config/compiler:wglobal_constructors",
|
||||
+ "//electron/build/config:mas_build",
|
||||
]
|
||||
|
||||
deps = [
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 54ef20a4a8983eb176428d4074882582166a41f6..b511b46d4c263e216d1a4d0ed158785511e867ec 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -355,7 +355,6 @@ default_compiler_configs = [
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
"//build/config/coverage:default_coverage",
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
- "//electron/build/config:mas_build",
|
||||
]
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/os_crypt/BUILD.gn b/components/os_crypt/BUILD.gn
|
||||
index 8448ff2d912ed8664ba1117397a2407c08e9a578..5f6bb1a87615c474e06209fc8034ff36ee6a5b75 100644
|
||||
--- a/components/os_crypt/BUILD.gn
|
||||
+++ b/components/os_crypt/BUILD.gn
|
||||
@@ -65,6 +65,8 @@ component("os_crypt") {
|
||||
"keychain_password_mac.mm",
|
||||
"os_crypt_mac.mm",
|
||||
]
|
||||
+
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
index 43713a7eef20efc7bdf2a78f8d126d43ff09ffff..44e7ec5c621ab17851dffe6ad42f7b561576731c 100644
|
||||
--- a/components/remote_cocoa/app_shim/BUILD.gn
|
||||
+++ b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
@@ -16,6 +16,7 @@ component("app_shim") {
|
||||
assert(is_mac)
|
||||
|
||||
configs += [ ":app_shim_warnings" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
sources = [
|
||||
"alert.h",
|
||||
"alert.mm",
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 97a4fa63593ca119501dcf76468052b33041cf27..be10275cdcd7bacae4ab24608ad840c5f238ecec 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -306,6 +306,8 @@ viz_component("service") {
|
||||
|
||||
deps += [ "//ui/accelerated_widget_mac" ]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
+
|
||||
+ configs = ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index ec8da4b89278e4f53ae302fb6ae860383966a2bc..75ee79708723f165d91fbc06a877fd047d2542bb 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -53,6 +53,7 @@ source_set("browser") {
|
||||
"//content:content_implementation",
|
||||
"//v8:external_startup_data",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
defines = []
|
||||
libs = []
|
||||
frameworks = []
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index ff6b2e9248d7a03923ac57e44e31b5fb8320e456..33396b3fa3258b97d5baef4ef064887f81c43503 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -180,6 +180,7 @@ source_set("common") {
|
||||
"//content:content_implementation",
|
||||
"//build/config:precompiled_headers",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
|
||||
public_deps = [
|
||||
":mojo_bindings",
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index 4dca38c0284b5e4689a53c0dbf44ada35a3a89ca..7f1d207f6bc8ec5ca578bf4f3a298d8b8bbaf862 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -214,6 +214,7 @@ target(link_target_type, "renderer") {
|
||||
}
|
||||
|
||||
configs += [ "//content:content_implementation" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
defines = []
|
||||
|
||||
public_deps = [
|
||||
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
|
||||
index 0b526044dcc7cbc21cc25cfdd7be8e4cdd8f06eb..c5c61601a684ea08e2279b4fc6b77d81ff2f03e1 100644
|
||||
--- a/device/bluetooth/BUILD.gn
|
||||
+++ b/device/bluetooth/BUILD.gn
|
||||
@@ -249,6 +249,7 @@ component("bluetooth") {
|
||||
"IOKit.framework",
|
||||
"Foundation.framework",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
|
||||
index c342a9c95b1787c49b88ba62457c6f27151cbb87..6181018d4940569e1feb323587fcbc96bd597ae9 100644
|
||||
--- a/gpu/ipc/service/BUILD.gn
|
||||
+++ b/gpu/ipc/service/BUILD.gn
|
||||
@@ -118,6 +118,7 @@ component("service") {
|
||||
"OpenGL.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
if (is_android) {
|
||||
sources += [
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index 8ed81a36306f6dfae965ee90781e5bb79067fa92..33205cecb58d05ef8d7628b170a09137a463dcf8 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -190,6 +190,7 @@ source_set("audio") {
|
||||
"CoreAudio.framework",
|
||||
"CoreFoundation.framework",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/net/dns/BUILD.gn b/net/dns/BUILD.gn
|
||||
index 3ed16c02a2053a8ce81a98a7e14dea16f2d6c31b..5b903ddf11ebe0886a101c75bc1c084d4c6fc506 100644
|
||||
--- a/net/dns/BUILD.gn
|
||||
+++ b/net/dns/BUILD.gn
|
||||
@@ -171,6 +171,8 @@ source_set("dns") {
|
||||
":host_resolver_manager",
|
||||
":mdns_client",
|
||||
]
|
||||
+
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
# The standard API of net/dns.
|
||||
diff --git a/sandbox/mac/BUILD.gn b/sandbox/mac/BUILD.gn
|
||||
index 06b7f0310f1bca118cc2c89a9c21d3ebd661ec1e..b5b7432e1d998db003dd33622c750e817c79d7bc 100644
|
||||
--- a/sandbox/mac/BUILD.gn
|
||||
+++ b/sandbox/mac/BUILD.gn
|
||||
@@ -33,6 +33,7 @@ component("seatbelt") {
|
||||
]
|
||||
public_deps = [ "//third_party/protobuf:protobuf_lite" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
component("seatbelt_extension") {
|
||||
@@ -46,6 +47,7 @@ component("seatbelt_extension") {
|
||||
libs = [ "sandbox" ]
|
||||
public_deps = [ "//base" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
component("system_services") {
|
||||
@@ -60,6 +62,7 @@ component("system_services") {
|
||||
deps = [ ":seatbelt_export" ]
|
||||
public_deps = [ "//base" ]
|
||||
defines = [ "SEATBELT_IMPLEMENTATION" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
source_set("sandbox_unittests") {
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index 5de6278bb601be48690f4832c9d8379e74be13d5..2142d584e2910c0294c8d42e277e9e7931f00760 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -280,6 +280,7 @@ component("core") {
|
||||
configs -= core_config_remove
|
||||
configs += core_config_add
|
||||
configs += [ "//v8:external_startup_data" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
|
||||
public_deps = [
|
||||
":core_generated",
|
||||
diff --git a/ui/accelerated_widget_mac/BUILD.gn b/ui/accelerated_widget_mac/BUILD.gn
|
||||
index 79b5a50e197897ab36253761fddffda25e5e98a4..0bcb5d1ff7b0e97922406a6f758421d9c4b24c75 100644
|
||||
--- a/ui/accelerated_widget_mac/BUILD.gn
|
||||
+++ b/ui/accelerated_widget_mac/BUILD.gn
|
||||
@@ -50,6 +50,8 @@ component("accelerated_widget_mac") {
|
||||
"OpenGL.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
+
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
test("accelerated_widget_mac_unittests") {
|
||||
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
|
||||
index 4db17696494ad967f40ea1644d2acaca906e7f6b..1114db3e483767624d34f8897ea84747bec15480 100644
|
||||
--- a/ui/accessibility/platform/BUILD.gn
|
||||
+++ b/ui/accessibility/platform/BUILD.gn
|
||||
@@ -239,6 +239,7 @@ source_set("platform") {
|
||||
"AppKit.framework",
|
||||
"Foundation.framework",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (use_atk) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index e8b06c7fa14405902abc84dc738efdbb327a3677..4e2160b8377b348b6cf654ff01307a524be2e1ac 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -347,6 +347,7 @@ component("base") {
|
||||
"l10n/l10n_util_mac.mm",
|
||||
"resource/resource_bundle_mac.mm",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_chromeos_lacros) {
|
||||
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
|
||||
index b379aa35ddfba8a43881a3b936f382dfdb92c9b5..fa965b8f1e7e05b4153f6e5d9ae0ac787dc808d3 100644
|
||||
--- a/ui/display/BUILD.gn
|
||||
+++ b/ui/display/BUILD.gn
|
||||
@@ -56,6 +56,10 @@ component("display") {
|
||||
"mac/display_link_mac.h",
|
||||
"mac/screen_mac.mm",
|
||||
]
|
||||
+
|
||||
+ configs += [
|
||||
+ "//electron/build/config:mas_build"
|
||||
+ ]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index 0f1747b8b5f562c22fad4d4a8bef20cf823f8bac..731af13b2e4a35d728372b9937aceba068684df7 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -187,6 +187,7 @@ component("gfx") {
|
||||
"scoped_ns_graphics_context_save_gstate_mac.h",
|
||||
"scoped_ns_graphics_context_save_gstate_mac.mm",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
if (is_win) {
|
||||
sources += [
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 99aefe2bad07504abcfb069b2be87d7c3ad512b7..f23b2efff2b710558ae22ad0d4c95cdbd0a5b2a2 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -659,6 +659,7 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
|
||||
index f37a5a881ac6ac432a4672c5738b7f49b75b5523..1764117f539c2423ebe8bb4c3fe70afcdd0883e8 100644
|
||||
--- a/ui/views/controls/webview/BUILD.gn
|
||||
+++ b/ui/views/controls/webview/BUILD.gn
|
||||
@@ -19,6 +19,7 @@ component("webview") {
|
||||
|
||||
if (is_mac) {
|
||||
sources += [ "unhandled_keyboard_event_handler_mac.mm" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -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 51a472c855bbcc55c7ac9e71152db10db5a338ed..68436bab8c7bcd15a151b3d3e8856d2dfcb0b82c 100644
|
||||
index 81ee9846e14c148be31170f0439b59b046c77244..a93ba154cd435c4a00f625c7cb887116df5b7c64 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7288,6 +7288,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -7443,6 +7443,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,23 +21,25 @@ index 51a472c855bbcc55c7ac9e71152db10db5a338ed..68436bab8c7bcd15a151b3d3e8856d2d
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 92a6ef2bae58718d51e7e9cfeeef24313762d6ab..5d33c006e858757ffd1d6754e90cec96ac6dcad1 100644
|
||||
index 15b6cdaf470c14300c66d46ad0fe4138f545f4d7..43a816bfe1259144792484ad90c79bffc266b82f 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4057,6 +4057,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
@@ -4006,6 +4006,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
+ // Call this earlier than Chrome to associate the web preferences with the
|
||||
+ // WebContents before the view gets created.
|
||||
+ if (delegate_) {
|
||||
+ delegate_->WebContentsCreatedWithFullParams(this, render_process_id,
|
||||
+ opener->GetRoutingID(),
|
||||
+ params, new_contents_impl);
|
||||
+ }
|
||||
+
|
||||
// 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
|
||||
@@ -4098,12 +4104,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_config, session_storage_namespace);
|
||||
|
||||
@@ -4050,12 +4058,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -51,10 +53,10 @@ index 92a6ef2bae58718d51e7e9cfeeef24313762d6ab..5d33c006e858757ffd1d6754e90cec96
|
||||
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 8d9b71b8dd507f835a07ef56e86489ed7cfe4255..73266701ec802a4aed782658e60665f9e3e81263 100644
|
||||
index 683ea0bc548ed4978873d44c0ce7db6933585eda..e6241d0b14660a8aec09aab2271162c296c4ca1b 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -591,6 +591,10 @@ struct CreateNewWindowParams {
|
||||
@@ -590,6 +590,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// Additional parameters for creating picture-in-picture windows.
|
||||
blink.mojom.PictureInPictureWindowOptions? pip_options;
|
||||
@@ -66,10 +68,10 @@ index 8d9b71b8dd507f835a07ef56e86489ed7cfe4255..73266701ec802a4aed782658e60665f9
|
||||
|
||||
// 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 2a4a2183db5c6b2f981f757c248cabb7e9e007f8..33755467c637974f3c0a16eb2a8fe5c6b83b14b5 100644
|
||||
index f31156ba6ea6d6229198d129c5b56cfa1847c5fc..41f3dac6323bda9d1a10bcb8678fe3da3e195160 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -620,6 +620,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -622,6 +622,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +81,10 @@ index 2a4a2183db5c6b2f981f757c248cabb7e9e007f8..33755467c637974f3c0a16eb2a8fe5c6
|
||||
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 39eadbcc3fe914c154f5b655a09675427a24d0ed..c8a5bdeb03e085f607cfdc79f14879c8c1379257 100644
|
||||
index 9b6c2b8b249af92bc38c2c72f420e851c138d6f6..3f5f0449b7c70b7d48438d4c4c908c897cad3727 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -164,6 +164,7 @@ class NetworkService;
|
||||
@@ -163,6 +163,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +92,7 @@ index 39eadbcc3fe914c154f5b655a09675427a24d0ed..c8a5bdeb03e085f607cfdc79f14879c8
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1013,6 +1014,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1010,6 +1011,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -100,7 +102,7 @@ index 39eadbcc3fe914c154f5b655a09675427a24d0ed..c8a5bdeb03e085f607cfdc79f14879c8
|
||||
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 7122abf89f48a931a5abd38de03d3aebb6d0fb09..eec7f60003267f91f856dc347b31ab8d637fc674 100644
|
||||
index 4f4ce7c49df42d32e9a2dfb770671bb038d31f36..bd4bdeda3403325ac5c3b83bc575b46844b5077a 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -27,6 +27,17 @@ namespace content {
|
||||
@@ -122,7 +124,7 @@ index 7122abf89f48a931a5abd38de03d3aebb6d0fb09..eec7f60003267f91f856dc347b31ab8d
|
||||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index e2ce097fb78d853bb7098b1ce7dacfadd6d188d9..a082d41de24f963fe170108e80601946a25fa5f9 100644
|
||||
index 7119f2fe8397a1bd3472af5b00346672ed90f2b1..f33bc7ec4bce4b6a4c38462110b68aae5b6280d6 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -148,10 +150,10 @@ index e2ce097fb78d853bb7098b1ce7dacfadd6d188d9..a082d41de24f963fe170108e80601946
|
||||
// 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 a274c4ba456b0fe7fce935866768aaa336347581..08bd2ab693d381ae422fe57757cff59875be019d 100644
|
||||
index d7f19a4efc3540d8bac48d00c37436362043f074..fb0483af59b0e289bd716a3417a545233f17be1f 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6253,6 +6253,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6210,6 +6210,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
/*openee_can_access_opener_origin=*/true,
|
||||
!GetWebFrame()->IsAllowedToDownload(), GetWebFrame()->IsAdFrame());
|
||||
|
||||
@@ -163,10 +165,10 @@ index a274c4ba456b0fe7fce935866768aaa336347581..08bd2ab693d381ae422fe57757cff598
|
||||
// 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 52896a36295d53088cf95b16c4f2af9f85d54b49..527db3d4afb90c58e0a473ecf14e3678d8b466fa 100644
|
||||
index 815df247101f8a2824daf5a6c37b7835c581bf30..09f6af8ef73afe2e3f864fc5b30b6a83146d8a80 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -499,6 +499,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -482,6 +482,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -176,10 +178,10 @@ index 52896a36295d53088cf95b16c4f2af9f85d54b49..527db3d4afb90c58e0a473ecf14e3678
|
||||
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 55f3b2ce596f18fdffde7f23f01da98778816395..07496fded98e6ac926b219f56f769e2aab41b021 100644
|
||||
index 0b77223b1fa7a24599c89621423ad9d66f36c114..848029e3f293d11421598c0e5ecf3593b1720bb3 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -84,6 +84,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -81,6 +81,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -210,10 +212,10 @@ index 34570168ccb123f5102dcf8fa6bbf98e7c373ec6..192701e56d258da41b3724292853885e
|
||||
|
||||
} // 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 c7a66bc0e034b77baf476374de66986cd47983e8..4e6f466a64565580aa81f6242f517470a9f85b38 100644
|
||||
index fe5e2a61ec5a794b05bfc6a8eb1f69e105b69ed6..9f18da7c62951ecaf767ab9ead773c6e005c1dd8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2204,6 +2204,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2145,6 +2145,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window, completed_url);
|
||||
|
||||
|
||||
44
patches/chromium/cherry-pick-2611772cf0a0.patch
Normal file
44
patches/chromium/cherry-pick-2611772cf0a0.patch
Normal file
@@ -0,0 +1,44 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kron <kron@chromium.org>
|
||||
Date: Mon, 28 Nov 2022 10:17:22 +0000
|
||||
Subject: Add feature for window capturing with ScreenCaptureKit
|
||||
|
||||
Makes it possible to launch window capturing with
|
||||
ScreenCaptureKit individually.
|
||||
|
||||
Bug: chromium:1352405
|
||||
Change-Id: Ie58d15007667db887ebf5f6f3092ef323f925461
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4047186
|
||||
Reviewed-by: Elad Alon <eladalon@chromium.org>
|
||||
Commit-Queue: Johannes Kron <kron@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1076120}
|
||||
|
||||
diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
index 4e510e5199a62e536542088e79c9b825225664fa..21d8f08c5d7abf414f0ecc7a909a87d9d5ce0513 100644
|
||||
--- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
+++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
|
||||
@@ -98,6 +98,13 @@ BASE_FEATURE(kDesktopCaptureMacV2,
|
||||
BASE_FEATURE(kScreenCaptureKitMac,
|
||||
"ScreenCaptureKitMac",
|
||||
base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+
|
||||
+// If this feature is enabled, ScreenCaptureKit will be used for window
|
||||
+// capturing even if kScreenCaptureKitMac is disabled. Please note that this
|
||||
+// feature has no effect if kScreenCaptureKitMac is enabled.
|
||||
+BASE_FEATURE(kScreenCaptureKitMacWindow,
|
||||
+ "ScreenCaptureKitMacWindow",
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#endif
|
||||
|
||||
void IncrementDesktopCaptureCounters(const DesktopMediaID& device_id) {
|
||||
@@ -491,7 +498,9 @@ void InProcessVideoCaptureDeviceLauncher::DoStartDesktopCaptureOnDeviceThread(
|
||||
// Prefer using ScreenCaptureKit. After that try DesktopCaptureDeviceMac, and
|
||||
// if both fail, use the generic DesktopCaptureDevice.
|
||||
if (!video_capture_device &&
|
||||
- base::FeatureList::IsEnabled(kScreenCaptureKitMac)) {
|
||||
+ (base::FeatureList::IsEnabled(kScreenCaptureKitMac) ||
|
||||
+ (desktop_id.type == DesktopMediaID::TYPE_WINDOW &&
|
||||
+ base::FeatureList::IsEnabled(kScreenCaptureKitMacWindow)))) {
|
||||
if ((video_capture_device = CreateScreenCaptureKitDeviceMac(desktop_id)))
|
||||
implementation = kScreenCaptureKitDeviceMac;
|
||||
}
|
||||
376
patches/chromium/cherry-pick-3235c1d1955b.patch
Normal file
376
patches/chromium/cherry-pick-3235c1d1955b.patch
Normal file
@@ -0,0 +1,376 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kron <kron@chromium.org>
|
||||
Date: Thu, 1 Dec 2022 01:52:27 +0000
|
||||
Subject: Set visible_rect for streams captured with ScreenCaptureKit
|
||||
|
||||
This is needed to make the window capturing code on macOS
|
||||
using the new ScreenCaptureKit API work, because the IOSurface
|
||||
may be larger than the actual content resulting in garbage
|
||||
unless the frame is cropped to |visible_rect|.
|
||||
|
||||
Bug: chromium:1352405
|
||||
Change-Id: I1ce3c13947b9b4f9b75a071800a84a27a7c2ee4a
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4046582
|
||||
Reviewed-by: Mark Foltz <mfoltz@chromium.org>
|
||||
Commit-Queue: Johannes Kron <kron@chromium.org>
|
||||
Reviewed-by: ccameron chromium <ccameron@chromium.org>
|
||||
Reviewed-by: Ilya Nikolaevskiy <ilnik@chromium.org>
|
||||
Reviewed-by: Will Cassella <cassew@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1077752}
|
||||
|
||||
diff --git a/content/browser/media/capture/desktop_capture_device_mac.cc b/content/browser/media/capture/desktop_capture_device_mac.cc
|
||||
index 77eec733bed5cc6ba42ea77994b3a276279b0603..1807356bfad1d37ff09486db2e7cbe31b79ad6a8 100644
|
||||
--- a/content/browser/media/capture/desktop_capture_device_mac.cc
|
||||
+++ b/content/browser/media/capture/desktop_capture_device_mac.cc
|
||||
@@ -127,7 +127,8 @@ class DesktopCaptureDeviceMac : public IOSurfaceCaptureDeviceBase {
|
||||
|
||||
private:
|
||||
void OnFrame(gfx::ScopedInUseIOSurface io_surface) {
|
||||
- OnReceivedIOSurfaceFromStream(io_surface, requested_format_);
|
||||
+ OnReceivedIOSurfaceFromStream(io_surface, requested_format_,
|
||||
+ gfx::Rect(requested_format_.frame_size));
|
||||
}
|
||||
|
||||
const CGDirectDisplayID display_id_;
|
||||
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.cc b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
index ae076bdd6fb9c1ebc72baa2f78a8568d859564ce..0bf2c58b6840c15d827a7b4a5888d1f56ff50943 100644
|
||||
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.cc
|
||||
@@ -39,10 +39,12 @@ void IOSurfaceCaptureDeviceBase::RequestRefreshFrame() {
|
||||
|
||||
void IOSurfaceCaptureDeviceBase::OnReceivedIOSurfaceFromStream(
|
||||
gfx::ScopedInUseIOSurface io_surface,
|
||||
- const media::VideoCaptureFormat& capture_format) {
|
||||
+ const media::VideoCaptureFormat& capture_format,
|
||||
+ const gfx::Rect& visible_rect) {
|
||||
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
|
||||
last_received_io_surface_ = std::move(io_surface);
|
||||
last_received_capture_format_ = capture_format;
|
||||
+ last_visible_rect_ = visible_rect;
|
||||
|
||||
// Immediately send the new frame to the client.
|
||||
SendLastReceivedIOSurfaceToClient();
|
||||
@@ -66,7 +68,7 @@ void IOSurfaceCaptureDeviceBase::SendLastReceivedIOSurfaceToClient() {
|
||||
media::CapturedExternalVideoBuffer(std::move(handle),
|
||||
last_received_capture_format_,
|
||||
gfx::ColorSpace::CreateREC709()),
|
||||
- {}, now, now - first_frame_time_);
|
||||
+ {}, now, now - first_frame_time_, last_visible_rect_);
|
||||
}
|
||||
|
||||
void IOSurfaceCaptureDeviceBase::ComputeFrameSizeAndDestRect(
|
||||
diff --git a/content/browser/media/capture/io_surface_capture_device_base_mac.h b/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
index 2781f212d77c9361ff2e28d5e13bbaab14ab0750..8ac12480f663a74dfbdcf7128a582a81b4474d25 100644
|
||||
--- a/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
+++ b/content/browser/media/capture/io_surface_capture_device_base_mac.h
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "content/common/content_export.h"
|
||||
#include "media/capture/video/video_capture_device.h"
|
||||
+#include "ui/gfx/geometry/rect.h"
|
||||
#include "ui/gfx/mac/io_surface.h"
|
||||
|
||||
namespace content {
|
||||
@@ -35,7 +36,8 @@ class CONTENT_EXPORT IOSurfaceCaptureDeviceBase
|
||||
protected:
|
||||
void OnReceivedIOSurfaceFromStream(
|
||||
gfx::ScopedInUseIOSurface io_surface,
|
||||
- const media::VideoCaptureFormat& capture_format);
|
||||
+ const media::VideoCaptureFormat& capture_format,
|
||||
+ const gfx::Rect& visible_rect);
|
||||
void SendLastReceivedIOSurfaceToClient();
|
||||
|
||||
// Given a source frame size `source_size`, and `capture_params_`, compute the
|
||||
@@ -71,6 +73,7 @@ class CONTENT_EXPORT IOSurfaceCaptureDeviceBase
|
||||
// frames come in, then this will be repeatedly sent at `min_frame_rate_`.
|
||||
gfx::ScopedInUseIOSurface last_received_io_surface_;
|
||||
media::VideoCaptureFormat last_received_capture_format_;
|
||||
+ gfx::Rect last_visible_rect_;
|
||||
|
||||
base::WeakPtrFactory<IOSurfaceCaptureDeviceBase> weak_factory_base_{this};
|
||||
};
|
||||
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
index 5d640a372f1649e0e2cb7e1828dbb3c66eb1e4d7..cda6a78ca4c87b459252066189394817ea0c0890 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -17,7 +17,8 @@
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
||||
using SampleCallback = base::RepeatingCallback<void(gfx::ScopedInUseIOSurface,
|
||||
- absl::optional<gfx::Size>)>;
|
||||
+ absl::optional<gfx::Size>,
|
||||
+ absl::optional<gfx::Rect>)>;
|
||||
using ErrorCallback = base::RepeatingClosure;
|
||||
|
||||
API_AVAILABLE(macos(12.3))
|
||||
@@ -49,9 +50,14 @@ - (void)stream:(SCStream*)stream
|
||||
if (!pixelBuffer)
|
||||
return;
|
||||
|
||||
- // Read out width, height and scaling from metadata to determine the captured
|
||||
- // content size.
|
||||
+ // Read out width, height and scaling from metadata to determine
|
||||
+ // |contentSize|, which is the size of the content on screen, and
|
||||
+ // |visibleRect|, which is the region of the IOSurface that contains the
|
||||
+ // captured content. |contentSize| is used to detect when a captured window is
|
||||
+ // resized so that the stream configuration can be updated and |visibleRect|
|
||||
+ // is needed because the IOSurface may be larger than the captured content.
|
||||
absl::optional<gfx::Size> contentSize;
|
||||
+ absl::optional<gfx::Rect> visibleRect;
|
||||
CFArrayRef attachmentsArray =
|
||||
CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, false);
|
||||
if (attachmentsArray && CFArrayGetCount(attachmentsArray) > 0) {
|
||||
@@ -70,6 +76,7 @@ - (void)stream:(SCStream*)stream
|
||||
succeed &= CFNumberGetValue(contentScaleValue, kCFNumberFloatType,
|
||||
&contentScale);
|
||||
if (succeed) {
|
||||
+ visibleRect.emplace(contentRect);
|
||||
contentSize.emplace(round(contentRect.size.width / contentScale),
|
||||
round(contentRect.size.height / contentScale));
|
||||
}
|
||||
@@ -81,7 +88,7 @@ - (void)stream:(SCStream*)stream
|
||||
return;
|
||||
_sampleCallback.Run(
|
||||
gfx::ScopedInUseIOSurface(ioSurface, base::scoped_policy::RETAIN),
|
||||
- contentSize);
|
||||
+ contentSize, visibleRect);
|
||||
}
|
||||
|
||||
- (void)stream:(SCStream*)stream didStopWithError:(NSError*)error {
|
||||
@@ -248,7 +255,8 @@ void OnStreamStopped(bool error) {
|
||||
}
|
||||
}
|
||||
void OnStreamSample(gfx::ScopedInUseIOSurface io_surface,
|
||||
- absl::optional<gfx::Size> content_size) {
|
||||
+ absl::optional<gfx::Size> content_size,
|
||||
+ absl::optional<gfx::Rect> visible_rect) {
|
||||
if (requested_capture_format_) {
|
||||
// Does the size of io_surface match the requested format?
|
||||
size_t io_surface_width = IOSurfaceGetWidth(io_surface);
|
||||
@@ -310,9 +318,11 @@ void OnStreamSample(gfx::ScopedInUseIOSurface io_surface,
|
||||
}
|
||||
}
|
||||
}
|
||||
- // TODO(https://crbug.com/1352405): Set visible rect to make it possible to
|
||||
- // crop the frame when it's rendered/encoded.
|
||||
- OnReceivedIOSurfaceFromStream(io_surface, actual_capture_format_);
|
||||
+ // The IO surface may be larger than the actual content size. Pass on
|
||||
+ // visible rect to be able to render/encode the frame correctly.
|
||||
+ OnReceivedIOSurfaceFromStream(
|
||||
+ io_surface, actual_capture_format_,
|
||||
+ visible_rect.value_or(gfx::Rect(actual_capture_format_.frame_size)));
|
||||
}
|
||||
void OnStreamError() {
|
||||
client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
|
||||
diff --git a/content/browser/renderer_host/media/video_capture_controller_unittest.cc b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
||||
index 048eea2a9edc5e9ea0817d4ae43187e49188f087..44505aabec3d17c87702a946b4e59d371308b83c 100644
|
||||
--- a/content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
||||
+++ b/content/browser/renderer_host/media/video_capture_controller_unittest.cc
|
||||
@@ -701,7 +701,8 @@ TEST_P(VideoCaptureControllerTest, CaptureWithScaledFrames) {
|
||||
|
||||
device_client_->OnIncomingCapturedExternalBuffer(
|
||||
std::move(external_buffer), std::move(scaled_external_buffers),
|
||||
- arbitrary_reference_time_, arbitrary_timestamp_);
|
||||
+ arbitrary_reference_time_, arbitrary_timestamp_,
|
||||
+ gfx::Rect(capture_format.frame_size));
|
||||
}
|
||||
|
||||
#endif
|
||||
diff --git a/media/capture/video/chromeos/mock_video_capture_client.cc b/media/capture/video/chromeos/mock_video_capture_client.cc
|
||||
index 7c295fa4daaeb837a82685aee7d1f8d0512a2b4d..fd38373927c3864806b60e564389d83ada585cb6 100644
|
||||
--- a/media/capture/video/chromeos/mock_video_capture_client.cc
|
||||
+++ b/media/capture/video/chromeos/mock_video_capture_client.cc
|
||||
@@ -71,7 +71,8 @@ void MockVideoCaptureClient::OnIncomingCapturedExternalBuffer(
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) {
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) {
|
||||
if (frame_cb_)
|
||||
std::move(frame_cb_).Run();
|
||||
}
|
||||
diff --git a/media/capture/video/chromeos/mock_video_capture_client.h b/media/capture/video/chromeos/mock_video_capture_client.h
|
||||
index c4a3fba38054374927b342455d467f9fd555b79d..d4f6fa931b05bd50a4129301e18abf76617e2e93 100644
|
||||
--- a/media/capture/video/chromeos/mock_video_capture_client.h
|
||||
+++ b/media/capture/video/chromeos/mock_video_capture_client.h
|
||||
@@ -58,7 +58,8 @@ class MockVideoCaptureClient : public VideoCaptureDevice::Client {
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) override;
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) override;
|
||||
// Trampoline methods to workaround GMOCK problems with std::unique_ptr<>.
|
||||
ReserveResult ReserveOutputBuffer(const gfx::Size& dimensions,
|
||||
VideoPixelFormat format,
|
||||
diff --git a/media/capture/video/fuchsia/video_capture_device_fuchsia_test.cc b/media/capture/video/fuchsia/video_capture_device_fuchsia_test.cc
|
||||
index 3039594560a2de51557b32b336ca2673b0decd4c..0518b3c4cf6bcdc90031c0857d653cd5a0accfdb 100644
|
||||
--- a/media/capture/video/fuchsia/video_capture_device_fuchsia_test.cc
|
||||
+++ b/media/capture/video/fuchsia/video_capture_device_fuchsia_test.cc
|
||||
@@ -162,7 +162,8 @@ class TestVideoCaptureClient final : public VideoCaptureDevice::Client {
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) override {
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) override {
|
||||
NOTREACHED();
|
||||
}
|
||||
void OnIncomingCapturedBuffer(Buffer buffer,
|
||||
diff --git a/media/capture/video/mac/video_capture_device_mac.mm b/media/capture/video/mac/video_capture_device_mac.mm
|
||||
index 3fd0e0794c7fa1708b15fa5bd76502a000bcac91..1b6fa23748024058c0b2ccce6d211bd3978d5f3b 100644
|
||||
--- a/media/capture/video/mac/video_capture_device_mac.mm
|
||||
+++ b/media/capture/video/mac/video_capture_device_mac.mm
|
||||
@@ -827,9 +827,9 @@ ScopedIOUSBInterfaceInterface control_interface(
|
||||
", and expected " + capture_format_.frame_size.ToString());
|
||||
return;
|
||||
}
|
||||
- client_->OnIncomingCapturedExternalBuffer(std::move(frame),
|
||||
- std::move(scaled_frames),
|
||||
- base::TimeTicks::Now(), timestamp);
|
||||
+ client_->OnIncomingCapturedExternalBuffer(
|
||||
+ std::move(frame), std::move(scaled_frames), base::TimeTicks::Now(),
|
||||
+ timestamp, gfx::Rect(capture_format_.frame_size));
|
||||
}
|
||||
|
||||
void VideoCaptureDeviceMac::OnPhotoTaken(const uint8_t* image_data,
|
||||
diff --git a/media/capture/video/mock_video_capture_device_client.h b/media/capture/video/mock_video_capture_device_client.h
|
||||
index 49c2399f6d429e78032792134781f576c61ae15f..c65dcc3fa475090d9ca8e6890d523247c398780f 100644
|
||||
--- a/media/capture/video/mock_video_capture_device_client.h
|
||||
+++ b/media/capture/video/mock_video_capture_device_client.h
|
||||
@@ -35,11 +35,12 @@ class MockVideoCaptureDeviceClient : public VideoCaptureDevice::Client {
|
||||
base::TimeTicks reference_time,
|
||||
base::TimeDelta timestamp,
|
||||
int frame_feedback_id));
|
||||
- MOCK_METHOD4(OnIncomingCapturedExternalBuffer,
|
||||
+ MOCK_METHOD5(OnIncomingCapturedExternalBuffer,
|
||||
void(CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp));
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_size));
|
||||
MOCK_METHOD4(ReserveOutputBuffer,
|
||||
ReserveResult(const gfx::Size&, VideoPixelFormat, int, Buffer*));
|
||||
MOCK_METHOD3(OnError,
|
||||
diff --git a/media/capture/video/video_capture_device.h b/media/capture/video/video_capture_device.h
|
||||
index 76c0a61b372dafbba62c2ec7c84bbd6854f2fa02..5ef13cc639d148023147f0be812c1b09b2cbc815 100644
|
||||
--- a/media/capture/video/video_capture_device.h
|
||||
+++ b/media/capture/video/video_capture_device.h
|
||||
@@ -191,18 +191,21 @@ class CAPTURE_EXPORT VideoCaptureDevice
|
||||
base::TimeDelta timestamp,
|
||||
int frame_feedback_id = 0) = 0;
|
||||
|
||||
- // Captured a new video frame. The data for this frame is in |handle|,
|
||||
- // which is owned by the platform-specific capture device. It is the
|
||||
- // responsibilty of the implementation to prevent the buffer in |handle|
|
||||
- // from being reused by the external capturer. In practice, this is used
|
||||
- // only on macOS, the external capturer maintains a CVPixelBufferPool, and
|
||||
- // gfx::ScopedInUseIOSurface is used to prevent reuse of buffers until all
|
||||
- // consumers have consumed them.
|
||||
+ // Captured a new video frame. The data for this frame is in
|
||||
+ // |buffer.handle|, which is owned by the platform-specific capture device.
|
||||
+ // It is the responsibility of the implementation to prevent the buffer in
|
||||
+ // |buffer.handle| from being reused by the external capturer. In practice,
|
||||
+ // this is used only on macOS, the external capturer maintains a
|
||||
+ // CVPixelBufferPool, and gfx::ScopedInUseIOSurface is used to prevent reuse
|
||||
+ // of buffers until all consumers have consumed them. |visible_rect|
|
||||
+ // specifies the region in the memory pointed to by |buffer.handle| that
|
||||
+ // contains the captured content.
|
||||
virtual void OnIncomingCapturedExternalBuffer(
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) = 0;
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) = 0;
|
||||
|
||||
// Reserve an output buffer into which contents can be captured directly.
|
||||
// The returned |buffer| will always be allocated with a memory size
|
||||
diff --git a/media/capture/video/video_capture_device_client.cc b/media/capture/video/video_capture_device_client.cc
|
||||
index efa175865f53d5c187cbb65cb4c1b9b40be63614..6229529c8a5878aaec253d5acf1797ae3dcc139f 100644
|
||||
--- a/media/capture/video/video_capture_device_client.cc
|
||||
+++ b/media/capture/video/video_capture_device_client.cc
|
||||
@@ -468,14 +468,21 @@ void VideoCaptureDeviceClient::OnIncomingCapturedExternalBuffer(
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) {
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) {
|
||||
auto ready_frame = CreateReadyFrameFromExternalBuffer(
|
||||
- std::move(buffer), reference_time, timestamp);
|
||||
+ std::move(buffer), reference_time, timestamp, visible_rect);
|
||||
std::vector<ReadyFrameInBuffer> scaled_ready_frames;
|
||||
scaled_ready_frames.reserve(scaled_buffers.size());
|
||||
for (auto& scaled_buffer : scaled_buffers) {
|
||||
+ // TODO(https://crbug.com/1191986): |visible_rect| is not set correctly for
|
||||
+ // |scaled_buffers|, but scaled buffers is deprecated and not used. It will
|
||||
+ // be removed in another CL.
|
||||
+ gfx::Rect scaled_buffer_visible_rect =
|
||||
+ gfx::Rect{scaled_buffer.format.frame_size};
|
||||
scaled_ready_frames.push_back(CreateReadyFrameFromExternalBuffer(
|
||||
- std::move(scaled_buffer), reference_time, timestamp));
|
||||
+ std::move(scaled_buffer), reference_time, timestamp,
|
||||
+ scaled_buffer_visible_rect));
|
||||
}
|
||||
receiver_->OnFrameReadyInBuffer(std::move(ready_frame),
|
||||
std::move(scaled_ready_frames));
|
||||
@@ -484,7 +491,8 @@ void VideoCaptureDeviceClient::OnIncomingCapturedExternalBuffer(
|
||||
ReadyFrameInBuffer VideoCaptureDeviceClient::CreateReadyFrameFromExternalBuffer(
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) {
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) {
|
||||
// Reserve an ID for this buffer that will not conflict with any of the IDs
|
||||
// used by |buffer_pool_|.
|
||||
int buffer_id_to_drop = VideoCaptureBufferPool::kInvalidId;
|
||||
@@ -517,7 +525,7 @@ ReadyFrameInBuffer VideoCaptureDeviceClient::CreateReadyFrameFromExternalBuffer(
|
||||
info->pixel_format = buffer.format.pixel_format;
|
||||
info->color_space = buffer.color_space;
|
||||
info->coded_size = buffer.format.frame_size;
|
||||
- info->visible_rect = gfx::Rect(buffer.format.frame_size);
|
||||
+ info->visible_rect = visible_rect;
|
||||
info->metadata.frame_rate = buffer.format.frame_rate;
|
||||
info->metadata.reference_time = reference_time;
|
||||
|
||||
diff --git a/media/capture/video/video_capture_device_client.h b/media/capture/video/video_capture_device_client.h
|
||||
index d1c5b3db855d98f10cabcc71a09d40bbb2601296..56d432c99bcd16b221f574d312731f4c87706caf 100644
|
||||
--- a/media/capture/video/video_capture_device_client.h
|
||||
+++ b/media/capture/video/video_capture_device_client.h
|
||||
@@ -87,7 +87,8 @@ class CAPTURE_EXPORT VideoCaptureDeviceClient
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) override;
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) override;
|
||||
ReserveResult ReserveOutputBuffer(const gfx::Size& dimensions,
|
||||
VideoPixelFormat format,
|
||||
int frame_feedback_id,
|
||||
@@ -116,7 +117,8 @@ class CAPTURE_EXPORT VideoCaptureDeviceClient
|
||||
ReadyFrameInBuffer CreateReadyFrameFromExternalBuffer(
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp);
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect);
|
||||
|
||||
// A branch of OnIncomingCapturedData for Y16 frame_format.pixel_format.
|
||||
void OnIncomingCapturedY16Data(const uint8_t* data,
|
||||
diff --git a/media/capture/video/win/video_capture_device_mf_win_unittest.cc b/media/capture/video/win/video_capture_device_mf_win_unittest.cc
|
||||
index 1cffb468c33f6185bc656d19760854908e89aa65..293672feabe4172c2946a06ec54b2e67e5533afb 100644
|
||||
--- a/media/capture/video/win/video_capture_device_mf_win_unittest.cc
|
||||
+++ b/media/capture/video/win/video_capture_device_mf_win_unittest.cc
|
||||
@@ -83,7 +83,8 @@ class MockClient : public VideoCaptureDevice::Client {
|
||||
CapturedExternalVideoBuffer buffer,
|
||||
std::vector<CapturedExternalVideoBuffer> scaled_buffers,
|
||||
base::TimeTicks reference_time,
|
||||
- base::TimeDelta timestamp) override {}
|
||||
+ base::TimeDelta timestamp,
|
||||
+ gfx::Rect visible_rect) override {}
|
||||
|
||||
MOCK_METHOD4(ReserveOutputBuffer,
|
||||
ReserveResult(const gfx::Size&, VideoPixelFormat, int, Buffer*));
|
||||
104
patches/chromium/cherry-pick-43637378b14e.patch
Normal file
104
patches/chromium/cherry-pick-43637378b14e.patch
Normal file
@@ -0,0 +1,104 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Maks Orlovich <morlovich@chromium.org>
|
||||
Date: Tue, 22 Nov 2022 22:18:55 +0000
|
||||
Subject: Align NetworkContext::SetNetworkConditions better with devtools
|
||||
emulateNetworkConditions
|
||||
|
||||
The former used values of 0 to disable particular throttles, while the
|
||||
later documents -1, and looks to be pretty much a direct client, and the
|
||||
only one. So make NetworkService handle everything <= 0 as a disable,
|
||||
clamping at intake of config.
|
||||
|
||||
Bug: 1382033
|
||||
|
||||
(cherry picked from commit ce463c2c939818a12bbcec5e2c91c35f2a0a1f0e)
|
||||
|
||||
Change-Id: I2fd3f075d5071cb0cf647838782115b5c00405bf
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4035891
|
||||
Reviewed-by: Ken Buchanan <kenrb@chromium.org>
|
||||
Reviewed-by: Eric Orth <ericorth@chromium.org>
|
||||
Commit-Queue: Maks Orlovich <morlovich@chromium.org>
|
||||
Cr-Original-Commit-Position: refs/heads/main@{#1073566}
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4048289
|
||||
Cr-Commit-Position: refs/branch-heads/5414@{#188}
|
||||
Cr-Branched-From: 4417ee59d7bf6df7a9c9ea28f7722d2ee6203413-refs/heads/main@{#1070088}
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 8dd936e47c8c528ee2ca777788da5df98342dc7c..97063b8165027c1d9a5e09821f2b3056efc283dd 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -563,11 +563,11 @@ struct NetworkConditions {
|
||||
// response received.
|
||||
mojo_base.mojom.TimeDelta latency;
|
||||
|
||||
- // Maximal aggregated download throughput (bytes/sec). 0 disables download
|
||||
+ // Maximal aggregated download throughput (bytes/sec). <=0 disables download
|
||||
// throttling.
|
||||
double download_throughput;
|
||||
|
||||
- // Maximal aggregated upload throughput (bytes/sec). 0 disables upload
|
||||
+ // Maximal aggregated upload throughput (bytes/sec). <=0 disables upload
|
||||
// throttling.
|
||||
double upload_throughput;
|
||||
};
|
||||
diff --git a/services/network/throttling/network_conditions.cc b/services/network/throttling/network_conditions.cc
|
||||
index f620629af5ae78f22f893bc6edf0e6932c771b36..322c72a76f738b0b56674339701010d16a0d4fc5 100644
|
||||
--- a/services/network/throttling/network_conditions.cc
|
||||
+++ b/services/network/throttling/network_conditions.cc
|
||||
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "services/network/throttling/network_conditions.h"
|
||||
|
||||
+#include <algorithm>
|
||||
+
|
||||
namespace network {
|
||||
|
||||
NetworkConditions::NetworkConditions() : NetworkConditions(false) {}
|
||||
@@ -16,9 +18,9 @@ NetworkConditions::NetworkConditions(bool offline,
|
||||
double download_throughput,
|
||||
double upload_throughput)
|
||||
: offline_(offline),
|
||||
- latency_(latency),
|
||||
- download_throughput_(download_throughput),
|
||||
- upload_throughput_(upload_throughput) {}
|
||||
+ latency_(std::max(latency, 0.0)),
|
||||
+ download_throughput_(std::max(download_throughput, 0.0)),
|
||||
+ upload_throughput_(std::max(upload_throughput, 0.0)) {}
|
||||
|
||||
NetworkConditions::~NetworkConditions() {}
|
||||
|
||||
diff --git a/services/network/throttling/network_conditions.h b/services/network/throttling/network_conditions.h
|
||||
index 9980dca6e06a02979d217ced4bb3a72ab2b7fce7..8390700f7c38780cdb038073a2645039adc12c99 100644
|
||||
--- a/services/network/throttling/network_conditions.h
|
||||
+++ b/services/network/throttling/network_conditions.h
|
||||
@@ -28,6 +28,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkConditions {
|
||||
bool IsThrottling() const;
|
||||
|
||||
bool offline() const { return offline_; }
|
||||
+
|
||||
+ // These are 0 if the corresponding throttle is disabled, >0 otherwise.
|
||||
double latency() const { return latency_; }
|
||||
double download_throughput() const { return download_throughput_; }
|
||||
double upload_throughput() const { return upload_throughput_; }
|
||||
diff --git a/services/network/throttling/throttling_controller_unittest.cc b/services/network/throttling/throttling_controller_unittest.cc
|
||||
index a30a5c588c87c5810036d43e24ec67bdf51cfde4..abcd0c55b70c8de5ad3ad8377512ad42105a219c 100644
|
||||
--- a/services/network/throttling/throttling_controller_unittest.cc
|
||||
+++ b/services/network/throttling/throttling_controller_unittest.cc
|
||||
@@ -297,7 +297,7 @@ TEST(ThrottlingControllerTest, DownloadOnly) {
|
||||
ThrottlingControllerTestHelper helper;
|
||||
TestCallback* callback = helper.callback();
|
||||
|
||||
- helper.SetNetworkState(false, 10000000, 0);
|
||||
+ helper.SetNetworkState(false, 10000000, -1);
|
||||
int rv = helper.Start(false);
|
||||
EXPECT_EQ(rv, net::ERR_IO_PENDING);
|
||||
helper.FastForwardUntilNoTasksRemain();
|
||||
@@ -316,7 +316,7 @@ TEST(ThrottlingControllerTest, UploadOnly) {
|
||||
ThrottlingControllerTestHelper helper;
|
||||
TestCallback* callback = helper.callback();
|
||||
|
||||
- helper.SetNetworkState(false, 0, 1000000);
|
||||
+ helper.SetNetworkState(false, -2, 1000000);
|
||||
int rv = helper.Start(true);
|
||||
EXPECT_EQ(rv, net::OK);
|
||||
helper.FastForwardUntilNoTasksRemain();
|
||||
251
patches/chromium/cherry-pick-7196a42b42ce.patch
Normal file
251
patches/chromium/cherry-pick-7196a42b42ce.patch
Normal file
@@ -0,0 +1,251 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Johannes Kron <kron@chromium.org>
|
||||
Date: Thu, 17 Nov 2022 19:54:33 +0000
|
||||
Subject: Reconfigure stream on window resize when using ScreenCaptureKit
|
||||
|
||||
Bug: chromium:1352405
|
||||
Change-Id: I315104eb4ee985a2d04ea90f01341129c6307501
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4027202
|
||||
Reviewed-by: ccameron chromium <ccameron@chromium.org>
|
||||
Reviewed-by: Robert Sesek <rsesek@chromium.org>
|
||||
Commit-Queue: Johannes Kron <kron@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1072984}
|
||||
|
||||
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
index c17f6f076fc852df85d5deb919434458b886db37..5d640a372f1649e0e2cb7e1828dbb3c66eb1e4d7 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -6,15 +6,18 @@
|
||||
|
||||
#import <ScreenCaptureKit/ScreenCaptureKit.h>
|
||||
|
||||
+#include "base/mac/foundation_util.h"
|
||||
#include "base/mac/scoped_nsobject.h"
|
||||
#include "base/task/bind_post_task.h"
|
||||
#include "base/threading/thread_checker.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "content/browser/media/capture/io_surface_capture_device_base_mac.h"
|
||||
+#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "third_party/webrtc/modules/desktop_capture/desktop_capture_types.h"
|
||||
#include "ui/gfx/native_widget_types.h"
|
||||
|
||||
-using SampleCallback = base::RepeatingCallback<void(gfx::ScopedInUseIOSurface)>;
|
||||
+using SampleCallback = base::RepeatingCallback<void(gfx::ScopedInUseIOSurface,
|
||||
+ absl::optional<gfx::Size>)>;
|
||||
using ErrorCallback = base::RepeatingClosure;
|
||||
|
||||
API_AVAILABLE(macos(12.3))
|
||||
@@ -45,17 +48,64 @@ - (void)stream:(SCStream*)stream
|
||||
CVPixelBufferRef pixelBuffer = CMSampleBufferGetImageBuffer(sampleBuffer);
|
||||
if (!pixelBuffer)
|
||||
return;
|
||||
+
|
||||
+ // Read out width, height and scaling from metadata to determine the captured
|
||||
+ // content size.
|
||||
+ absl::optional<gfx::Size> contentSize;
|
||||
+ CFArrayRef attachmentsArray =
|
||||
+ CMSampleBufferGetSampleAttachmentsArray(sampleBuffer, false);
|
||||
+ if (attachmentsArray && CFArrayGetCount(attachmentsArray) > 0) {
|
||||
+ CFDictionaryRef attachment = base::mac::CFCast<CFDictionaryRef>(
|
||||
+ CFArrayGetValueAtIndex(attachmentsArray, 0));
|
||||
+ if (attachment) {
|
||||
+ CFDictionaryRef contentRectValue = base::mac::CFCast<CFDictionaryRef>(
|
||||
+ CFDictionaryGetValue(attachment, SCStreamFrameInfoContentRect));
|
||||
+ CFNumberRef contentScaleValue = base::mac::CFCast<CFNumberRef>(
|
||||
+ CFDictionaryGetValue(attachment, SCStreamFrameInfoContentScale));
|
||||
+ if (contentRectValue && contentScaleValue) {
|
||||
+ CGRect contentRect = {};
|
||||
+ bool succeed = CGRectMakeWithDictionaryRepresentation(contentRectValue,
|
||||
+ &contentRect);
|
||||
+ float contentScale = 1.0f;
|
||||
+ succeed &= CFNumberGetValue(contentScaleValue, kCFNumberFloatType,
|
||||
+ &contentScale);
|
||||
+ if (succeed) {
|
||||
+ contentSize.emplace(round(contentRect.size.width / contentScale),
|
||||
+ round(contentRect.size.height / contentScale));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
IOSurfaceRef ioSurface = CVPixelBufferGetIOSurface(pixelBuffer);
|
||||
if (!ioSurface)
|
||||
return;
|
||||
_sampleCallback.Run(
|
||||
- gfx::ScopedInUseIOSurface(ioSurface, base::scoped_policy::RETAIN));
|
||||
+ gfx::ScopedInUseIOSurface(ioSurface, base::scoped_policy::RETAIN),
|
||||
+ contentSize);
|
||||
}
|
||||
|
||||
- (void)stream:(SCStream*)stream didStopWithError:(NSError*)error {
|
||||
_errorCallback.Run();
|
||||
}
|
||||
|
||||
++ (base::scoped_nsobject<SCStreamConfiguration>)
|
||||
+ createStreamConfigurationWithFrameSize:(gfx::Size)frameSize
|
||||
+ destRectInFrame:(gfx::RectF)destRectInFrame
|
||||
+ frameRate:(float)frameRate {
|
||||
+ base::scoped_nsobject<SCStreamConfiguration> config(
|
||||
+ [[SCStreamConfiguration alloc] init]);
|
||||
+ [config setWidth:frameSize.width()];
|
||||
+ [config setHeight:frameSize.height()];
|
||||
+ [config setPixelFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange];
|
||||
+ [config setDestinationRect:destRectInFrame.ToCGRect()];
|
||||
+ [config setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
|
||||
+ [config setScalesToFit:YES];
|
||||
+ [config setShowsCursor:YES];
|
||||
+ [config setColorSpaceName:kCGColorSpaceSRGB];
|
||||
+ [config setMinimumFrameInterval:CMTimeMakeWithSeconds(1 / frameRate, 1)];
|
||||
+ return config;
|
||||
+}
|
||||
+
|
||||
@end
|
||||
|
||||
namespace content {
|
||||
@@ -95,7 +145,6 @@ void OnShareableContentCreated(
|
||||
}
|
||||
|
||||
base::scoped_nsobject<SCContentFilter> filter;
|
||||
- gfx::Size content_size;
|
||||
switch (source_.type) {
|
||||
case DesktopMediaID::TYPE_SCREEN:
|
||||
for (SCDisplay* display : [content displays]) {
|
||||
@@ -112,7 +161,8 @@ void OnShareableContentCreated(
|
||||
filter.reset([[SCContentFilter alloc]
|
||||
initWithDisplay:display
|
||||
excludingWindows:exclude_windows]);
|
||||
- content_size = gfx::Size([display width], [display height]);
|
||||
+ stream_config_content_size_ =
|
||||
+ gfx::Size([display width], [display height]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -123,7 +173,7 @@ void OnShareableContentCreated(
|
||||
filter.reset([[SCContentFilter alloc]
|
||||
initWithDesktopIndependentWindow:window]);
|
||||
CGRect frame = [window frame];
|
||||
- content_size = gfx::Size(frame.size);
|
||||
+ stream_config_content_size_ = gfx::Size(frame.size);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -142,22 +192,16 @@ void OnShareableContentCreated(
|
||||
gfx::RectF dest_rect_in_frame;
|
||||
actual_capture_format_ = capture_params().requested_format;
|
||||
actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
|
||||
- ComputeFrameSizeAndDestRect(content_size, actual_capture_format_.frame_size,
|
||||
+ ComputeFrameSizeAndDestRect(stream_config_content_size_,
|
||||
+ actual_capture_format_.frame_size,
|
||||
dest_rect_in_frame);
|
||||
-
|
||||
- base::scoped_nsobject<SCStreamConfiguration> config(
|
||||
- [[SCStreamConfiguration alloc] init]);
|
||||
- [config setWidth:actual_capture_format_.frame_size.width()];
|
||||
- [config setHeight:actual_capture_format_.frame_size.height()];
|
||||
- [config setPixelFormat:kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange];
|
||||
- [config setDestinationRect:dest_rect_in_frame.ToCGRect()];
|
||||
- [config setBackgroundColor:CGColorGetConstantColor(kCGColorBlack)];
|
||||
- [config setScalesToFit:YES];
|
||||
- [config setShowsCursor:YES];
|
||||
- [config setColorSpaceName:kCGColorSpaceSRGB];
|
||||
- [config
|
||||
- setMinimumFrameInterval:CMTimeMakeWithSeconds(
|
||||
- 1 / actual_capture_format_.frame_rate, 1)];
|
||||
+ base::scoped_nsobject<SCStreamConfiguration> config =
|
||||
+ [ScreenCaptureKitDeviceHelper
|
||||
+ createStreamConfigurationWithFrameSize:actual_capture_format_
|
||||
+ .frame_size
|
||||
+ destRectInFrame:dest_rect_in_frame
|
||||
+ frameRate:actual_capture_format_
|
||||
+ .frame_rate];
|
||||
stream_.reset([[SCStream alloc] initWithFilter:filter
|
||||
configuration:config
|
||||
delegate:helper_]);
|
||||
@@ -203,9 +247,71 @@ void OnStreamStopped(bool error) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
- void OnStreamSample(gfx::ScopedInUseIOSurface io_surface) {
|
||||
- // TODO(https://crbug.com/1309653): Reconfigure the stream if the IOSurface
|
||||
- // should be resized.
|
||||
+ void OnStreamSample(gfx::ScopedInUseIOSurface io_surface,
|
||||
+ absl::optional<gfx::Size> content_size) {
|
||||
+ if (requested_capture_format_) {
|
||||
+ // Does the size of io_surface match the requested format?
|
||||
+ size_t io_surface_width = IOSurfaceGetWidth(io_surface);
|
||||
+ size_t io_surface_height = IOSurfaceGetHeight(io_surface);
|
||||
+ DVLOG(3) << "Waiting for new capture format, "
|
||||
+ << requested_capture_format_->frame_size.width() << " x "
|
||||
+ << requested_capture_format_->frame_size.height()
|
||||
+ << ". IO surface size " << io_surface_width << " x "
|
||||
+ << io_surface_height;
|
||||
+ if (static_cast<size_t>(requested_capture_format_->frame_size.width()) ==
|
||||
+ io_surface_width &&
|
||||
+ static_cast<size_t>(requested_capture_format_->frame_size.height()) ==
|
||||
+ io_surface_height) {
|
||||
+ actual_capture_format_ = requested_capture_format_.value();
|
||||
+ requested_capture_format_.reset();
|
||||
+ }
|
||||
+ } else {
|
||||
+ // No current request for new capture format. Check to see if content_size
|
||||
+ // has changed and requires an updated configuration.
|
||||
+ if (content_size &&
|
||||
+ (stream_config_content_size_.width() != content_size->width() ||
|
||||
+ stream_config_content_size_.height() != content_size->height())) {
|
||||
+ DVLOG(3) << "Content size changed to " << content_size->width() << " x "
|
||||
+ << content_size->height() << ". It was "
|
||||
+ << stream_config_content_size_.width() << " x "
|
||||
+ << stream_config_content_size_.height();
|
||||
+ stream_config_content_size_ = content_size.value();
|
||||
+ gfx::RectF dest_rect_in_frame;
|
||||
+ gfx::Size new_frame_size;
|
||||
+ ComputeFrameSizeAndDestRect(stream_config_content_size_, new_frame_size,
|
||||
+ dest_rect_in_frame);
|
||||
+ if (new_frame_size.width() !=
|
||||
+ actual_capture_format_.frame_size.width() ||
|
||||
+ new_frame_size.height() !=
|
||||
+ actual_capture_format_.frame_size.height()) {
|
||||
+ DVLOG(3) << "Calling updateConfiguration with new frame size: "
|
||||
+ << new_frame_size.width() << " x "
|
||||
+ << new_frame_size.height();
|
||||
+ requested_capture_format_ = actual_capture_format_;
|
||||
+ requested_capture_format_->frame_size = new_frame_size;
|
||||
+ // Update stream configuration.
|
||||
+ base::scoped_nsobject<SCStreamConfiguration> config =
|
||||
+ [ScreenCaptureKitDeviceHelper
|
||||
+ createStreamConfigurationWithFrameSize:
|
||||
+ requested_capture_format_->frame_size
|
||||
+ destRectInFrame:dest_rect_in_frame
|
||||
+ frameRate:
|
||||
+ requested_capture_format_->
|
||||
+ frame_rate];
|
||||
+ [stream_
|
||||
+ updateConfiguration:config
|
||||
+ completionHandler:^(NSError* _Nullable error) {
|
||||
+ if (error) {
|
||||
+ client()->OnError(
|
||||
+ media::VideoCaptureError::kScreenCaptureKitStreamError,
|
||||
+ FROM_HERE, "Error on updateConfiguration");
|
||||
+ }
|
||||
+ }];
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ // TODO(https://crbug.com/1352405): Set visible rect to make it possible to
|
||||
+ // crop the frame when it's rendered/encoded.
|
||||
OnReceivedIOSurfaceFromStream(io_surface, actual_capture_format_);
|
||||
}
|
||||
void OnStreamError() {
|
||||
@@ -257,6 +363,13 @@ void OnStop() override {
|
||||
// The actual format of the video frames that are sent to `client`.
|
||||
media::VideoCaptureFormat actual_capture_format_;
|
||||
|
||||
+ // The requested format if a request to update the configuration has been
|
||||
+ // sent.
|
||||
+ absl::optional<media::VideoCaptureFormat> requested_capture_format_;
|
||||
+
|
||||
+ // The size of the content at the time that we configured the stream.
|
||||
+ gfx::Size stream_config_content_size_;
|
||||
+
|
||||
// Helper class that acts as output and delegate for `stream_`.
|
||||
base::scoped_nsobject<ScreenCaptureKitDeviceHelper> helper_;
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index 3424f7d348a38abacff0bad5db8f744c042f5ca1..880e1483a3412c0737725ff5b76766c42856dc42 100644
|
||||
index 109e9f4361ef7682f5223f7aacb33940e206fa3c..c9d27e1e522adef49b3dd268224ecefaffdf6cc2 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -234,6 +234,7 @@ vs-chromium-project.txt
|
||||
@@ -231,6 +231,7 @@ vs-chromium-project.txt
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
/docs/website
|
||||
|
||||
@@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
|
||||
actions in the non-client caption area.
|
||||
|
||||
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 061c7ea5dbf60c3303b214ac3781bbef254d2da5..cdf07764b5bebe989bef163779f52414ce02ff6c 100644
|
||||
index 9ca8ea82afdc9660384dd7224d810990f96bf5a5..65d4e0b5f99c398814f1746a8ab66528e766f373 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
|
||||
@@ -1220,6 +1220,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged(
|
||||
@@ -1213,6 +1213,10 @@ void DesktopWindowTreeHostWin::HandleWindowScaleFactorChanged(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ index 061c7ea5dbf60c3303b214ac3781bbef254d2da5..cdf07764b5bebe989bef163779f52414
|
||||
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
|
||||
return new DesktopNativeCursorManagerWin();
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
index 58c13ba42464553427584a98492fe11a4228e3ff..034134fea43ae7c88232e3969e2efcf815d9e4ab 100644
|
||||
index cec35ceb254777e447047e48fba11dd8d38af97d..17cf2b79963079e66050e29411baa5a398c8d68a 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -265,6 +265,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -34,10 +34,10 @@ index 58c13ba42464553427584a98492fe11a4228e3ff..034134fea43ae7c88232e3969e2efcf8
|
||||
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 84a21d19b60c0d159f09a945a6ce3c06ba6ef07c..a682ee8e5c44d6b37957c92b72cd959b959f6745 100644
|
||||
index aacb580a7506f2c86769251ad00d8679870a454a..400278ab26a4e095fd837fcf84c952a1297b173d 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3136,15 +3136,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3140,15 +3140,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
SetMsgHandled(FALSE);
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
@@ -60,10 +60,10 @@ index 84a21d19b60c0d159f09a945a6ce3c06ba6ef07c..a682ee8e5c44d6b37957c92b72cd959b
|
||||
}
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index 08e46c7b92f6cbe95c9cb524d09a6ed9e89ecf00..9de0b0d61f1ef2d0f02a53fa07a6e8f66cfad755 100644
|
||||
index 233dd12f86c20a7f5169caab998993f614e8bc7e..3bf6fc95a653f1783510378ffeef5b18da42e559 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -256,6 +256,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
@@ -258,6 +258,10 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
// Called when the window scale factor has changed.
|
||||
virtual void HandleWindowScaleFactorChanged(float window_scale_factor) = 0;
|
||||
|
||||
|
||||
@@ -0,0 +1,48 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Fri, 6 Aug 2021 03:36:57 -0700
|
||||
Subject: chore: do not use chrome.windows in cryptotoken webrequestsender
|
||||
|
||||
Electron does not support chrome.windows which this method depends on. It also does not need to, the method's goal is to determine if the webContents that triggered the cryptotoken request is still "active". In Chrome this means active tab in the tab strip === this tab + the window owning that tab strip is focused.
|
||||
|
||||
In Electron that can be simplified to webContents.isFocused() which maps to "is the webContents view focused and is the owning window the key window". We map tab.active to that IsFocused() value and we can remove the chrome.windows logic here.
|
||||
|
||||
This can't be upstreamed but the patch is minimal.
|
||||
|
||||
diff --git a/chrome/browser/resources/cryptotoken/webrequestsender.js b/chrome/browser/resources/cryptotoken/webrequestsender.js
|
||||
index a0ad8622ad90e2d730c053b749e299274ab7cbde..a27fe6ff44d9f15329fb86b9a588ac7c8cdeb0bc 100644
|
||||
--- a/chrome/browser/resources/cryptotoken/webrequestsender.js
|
||||
+++ b/chrome/browser/resources/cryptotoken/webrequestsender.js
|
||||
@@ -142,10 +142,11 @@ function tabInForeground(tabId) {
|
||||
reject();
|
||||
return;
|
||||
}
|
||||
- if (!chrome.windows || !chrome.windows.get) {
|
||||
- reject();
|
||||
- return;
|
||||
- }
|
||||
+ // Electron does not support chrome.windows
|
||||
+ // if (!chrome.windows || !chrome.windows.get) {
|
||||
+ // reject();
|
||||
+ // return;
|
||||
+ // }
|
||||
chrome.tabs.get(tabId, function(tab) {
|
||||
if (chrome.runtime.lastError) {
|
||||
resolve(false);
|
||||
@@ -155,9 +156,13 @@ function tabInForeground(tabId) {
|
||||
resolve(false);
|
||||
return;
|
||||
}
|
||||
- chrome.windows.get(tab.windowId, function(aWindow) {
|
||||
- resolve(aWindow && aWindow.focused);
|
||||
- });
|
||||
+ // tab.active in Electron maps to the "focused" state of the view
|
||||
+ // which is only true when both the webContents and the window are
|
||||
+ // focused.
|
||||
+ resolve(true);
|
||||
+ // chrome.windows.get(tab.windowId, function(aWindow) {
|
||||
+ // resolve(aWindow && aWindow.focused);
|
||||
+ // });
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: deepak1556 <hop2deep@gmail.com>
|
||||
Date: Tue, 15 Nov 2022 21:45:28 +0900
|
||||
Subject: chore: introduce blocking api for //electron
|
||||
|
||||
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 f3295a465997b04e2345b31ea1bad42f66ab7400..9d77fa98b4247092c1c1df920f6a6285c22d2708 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -129,6 +129,7 @@ class FirefoxProfileLock;
|
||||
class KeyStorageLinux;
|
||||
class NativeBackendKWallet;
|
||||
class NativeDesktopMediaList;
|
||||
+class ProcessSingleton;
|
||||
class Profile;
|
||||
class ProfileImpl;
|
||||
class StartupTabProviderImpl;
|
||||
@@ -261,6 +262,9 @@ class BackendImpl;
|
||||
class InFlightIO;
|
||||
bool CleanupDirectorySync(const base::FilePath&);
|
||||
} // namespace disk_cache
|
||||
+namespace electron {
|
||||
+class ScopedAllowBlockingForElectron;
|
||||
+} // namespace electron
|
||||
namespace enterprise_connectors {
|
||||
class LinuxKeyRotationCommand;
|
||||
} // namespace enterprise_connectors
|
||||
@@ -543,6 +547,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class ::DesktopNotificationBalloon;
|
||||
friend class ::FirefoxProfileLock;
|
||||
friend class ::GaiaConfig;
|
||||
+ friend class ::ProcessSingleton;
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -583,6 +588,7 @@ class BASE_EXPORT ScopedAllowBlocking {
|
||||
friend class crosapi::LacrosThreadTypeDelegate;
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
+ friend class electron::ScopedAllowBlockingForElectron;
|
||||
friend class extensions::InstalledLoader;
|
||||
friend class extensions::UnpackedInstaller;
|
||||
friend class font_service::internal::MappedFontFile;
|
||||
@@ -1,28 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Wed, 16 Nov 2022 10:07:02 +0100
|
||||
Subject: chore: patch out partition attribute DCHECK for webviews
|
||||
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/4014994
|
||||
made it such that <webview>s in Chromium each have their own
|
||||
StoragePartitionConfig. This is in part because webviews are only
|
||||
ever instantiated by extensions in Chromium, which is not the case
|
||||
in Electron.
|
||||
|
||||
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 3c57b5c22e7d489cd3812218b7c3d8478ddd36d3..3227038eb346df8d636b75a03b3378d1e7b3e96c 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -209,7 +209,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
BrowserContext* browser_context,
|
||||
const StoragePartitionConfig& partition_config) {
|
||||
DCHECK(browser_context);
|
||||
- DCHECK(!partition_config.is_default());
|
||||
+ // DCHECK(!partition_config.is_default());
|
||||
|
||||
auto guest_site_info =
|
||||
SiteInfo::CreateForGuest(browser_context, partition_config);
|
||||
@@ -1,30 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Thu, 24 Nov 2022 12:29:41 +0100
|
||||
Subject: chore: patch out Profile methods in profile_selections.cc
|
||||
|
||||
We do not support the concept of Profiles and profile->IsSystemProfile()
|
||||
is therefore not a method that will compile given we don't include
|
||||
relevant files.
|
||||
|
||||
diff --git a/chrome/browser/profiles/profile_selections.cc b/chrome/browser/profiles/profile_selections.cc
|
||||
index 35c60a617a3d092b4ffbcc8652b7a80cc0d1f958..cd71486d98d5ade773f1d99bcec2215ac76e9c1d 100644
|
||||
--- a/chrome/browser/profiles/profile_selections.cc
|
||||
+++ b/chrome/browser/profiles/profile_selections.cc
|
||||
@@ -23,6 +23,7 @@ BASE_FEATURE(kGuestProfileSelectionDefaultNone,
|
||||
base::FeatureState::FEATURE_DISABLED_BY_DEFAULT);
|
||||
|
||||
bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) {
|
||||
+#if 0
|
||||
if (profile && profile->IsSystemProfile()) {
|
||||
// The default behavior of the system profile selection depends on the value
|
||||
// of `kSystemProfileSelectionDefaultNone` feature flag.
|
||||
@@ -33,7 +34,7 @@ bool AreKeyedServicesDisabledForProfileByDefault(const Profile* profile) {
|
||||
|
||||
return system_profile_default == ProfileSelection::kNone;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -6,8 +6,36 @@ Subject: chore: provide IsWebContentsCreationOverridden with full params
|
||||
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/android/document/document_web_contents_delegate.cc b/chrome/browser/android/document/document_web_contents_delegate.cc
|
||||
index 72644e1404e025bcfa5fa07a817721cdf2aecca5..5d1dae43ae3f79ed3e84f570c120a44ffdacf8ae 100644
|
||||
--- a/chrome/browser/android/document/document_web_contents_delegate.cc
|
||||
+++ b/chrome/browser/android/document/document_web_contents_delegate.cc
|
||||
@@ -46,8 +46,7 @@ bool DocumentWebContentsDelegate::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) {
|
||||
NOTREACHED();
|
||||
return true;
|
||||
}
|
||||
diff --git a/chrome/browser/android/document/document_web_contents_delegate.h b/chrome/browser/android/document/document_web_contents_delegate.h
|
||||
index bcf9aa806ef31af1fe88e7b7aa661135f2d4d6bc..350dcd90d5961b17af8cd5748460e04d930b269d 100644
|
||||
--- a/chrome/browser/android/document/document_web_contents_delegate.h
|
||||
+++ b/chrome/browser/android/document/document_web_contents_delegate.h
|
||||
@@ -41,8 +41,7 @@ class DocumentWebContentsDelegate
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
- const std::string& frame_name,
|
||||
- const GURL& target_url) override;
|
||||
+ const content::mojom::CreateNewWindowParams& params) override;
|
||||
};
|
||||
|
||||
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
|
||||
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
||||
index 5d7675b25b9180405e1ca7c3fe88e34af8806591..a0edfe2efc4e5f4f3a21fb4e8d8e06ab66a99be7 100644
|
||||
index 32a1c3ace3b9e1624f3637e9773c72b8088f296b..cdc4053b02e6f5ef38707b2353adb5057e8048eb 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.cc
|
||||
+++ b/chrome/browser/media/offscreen_tab.cc
|
||||
@@ -285,8 +285,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
@@ -35,10 +63,10 @@ index 155296ba7ee5495be62045bc620bb1cd31d3ceb3..954efde9e7a58f8b556c6ceabb81643f
|
||||
content::RenderFrameHost* requesting_frame,
|
||||
const blink::mojom::FullscreenOptions& options) final;
|
||||
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.cc b/chrome/browser/ui/ash/ash_web_view_impl.cc
|
||||
index 7d14473e1c042767de834f6734a7667d9c8bdb81..b9c1e56e8f6d528aaf92e27c7fc7e0bd6a174e81 100644
|
||||
index cd480419c84969837d8322f1860d62042f116b00..b521b8f84b6ac1c4a7902151a630de386063a589 100644
|
||||
--- a/chrome/browser/ui/ash/ash_web_view_impl.cc
|
||||
+++ b/chrome/browser/ui/ash/ash_web_view_impl.cc
|
||||
@@ -95,10 +95,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
|
||||
@@ -96,10 +96,9 @@ bool AshWebViewImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -52,7 +80,7 @@ index 7d14473e1c042767de834f6734a7667d9c8bdb81..b9c1e56e8f6d528aaf92e27c7fc7e0bd
|
||||
/*from_user_gesture=*/true);
|
||||
return true;
|
||||
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
index e30587e0fd1c42342a767ac281916e960c5a220d..4b9a924748d2ba89a5418818fad85cc4e0491976 100644
|
||||
index b857041f9be1ee941a40b50ab8cad9c1079028bc..131faece2645aa104da440f09cd7d8bd5e3e324e 100644
|
||||
--- a/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
+++ b/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
@@ -47,8 +47,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
||||
@@ -66,10 +94,10 @@ index e30587e0fd1c42342a767ac281916e960c5a220d..4b9a924748d2ba89a5418818fad85cc4
|
||||
content::WebContents* source,
|
||||
const content::OpenURLParams& params) override;
|
||||
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 0e9e41382300d6bb5fc6fa47cd5ed2ed4181ce46..e65a9bb5b9909e16f5a7dd2e73defa850795c9c4 100644
|
||||
index 1d49ec9a62ebc062ac825bebf471e2da99f4b65d..f19a6d112fe006b9a1eaa5dff375f6d2b40ae4da 100644
|
||||
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
|
||||
@@ -74,8 +74,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
@@ -71,8 +71,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -80,10 +108,10 @@ index 0e9e41382300d6bb5fc6fa47cd5ed2ed4181ce46..e65a9bb5b9909e16f5a7dd2e73defa85
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 924ab1bc6dd5fd26e18e7b713d69a100c1693fed..17241f757380285f14869f56afa512e5a250e5bd 100644
|
||||
index a3853924c98fae1ecb32bbf5e3dfe98108a82b66..cd8f9f7f75a950860c52bf825413a53a23bd7cb3 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1809,12 +1809,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1814,12 +1814,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -99,10 +127,10 @@ index 924ab1bc6dd5fd26e18e7b713d69a100c1693fed..17241f757380285f14869f56afa512e5
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index b50337f317a66e6d182cfb39fbb7182660872837..df62f66ce6a89579998e1f6a11876be48433cefb 100644
|
||||
index e80e3d192f615140cad4f804cf08f8dbc8590834..d5980c0c190c03fef24561d1a224b52b1e900ffa 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -843,8 +843,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -842,8 +842,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -113,7 +141,7 @@ index b50337f317a66e6d182cfb39fbb7182660872837..df62f66ce6a89579998e1f6a11876be4
|
||||
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 c76254dab42cb4761401dacc0587d74393eedf67..2ae0911e8ead5fae1c34f8981a97c1d829fb6e12 100644
|
||||
index 45a27e0b458d5ad30619727aa54e9136aab13546..1e1c67b5c9eec3ce050d9702276a02b24e6f9f21 100644
|
||||
--- a/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
||||
+++ b/chrome/browser/ui/media_router/presentation_receiver_window_controller.cc
|
||||
@@ -202,8 +202,7 @@ bool PresentationReceiverWindowController::IsWebContentsCreationOverridden(
|
||||
@@ -127,7 +155,7 @@ index c76254dab42cb4761401dacc0587d74393eedf67..2ae0911e8ead5fae1c34f8981a97c1d8
|
||||
// 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 9f36b1721b154ebd31a593800d5eb1f5930314cc..5c0f9cb89b675b58d7334c71c6546afb58498c03 100644
|
||||
index c5ac95f3f5de7a71a52dc3ad6ec7cdd6da8a7f75..cd5b29a7df6bad940dbe9dbf972a58c6deef1fb8 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
|
||||
@@ -139,12 +167,12 @@ index 9f36b1721b154ebd31a593800d5eb1f5930314cc..5c0f9cb89b675b58d7334c71c6546afb
|
||||
+ const content::mojom::CreateNewWindowParams& params) override;
|
||||
|
||||
// The profile used for the presentation.
|
||||
raw_ptr<Profile, DanglingUntriaged> otr_profile_;
|
||||
raw_ptr<Profile> 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 69d39ab12f7a1895e1ca50914a4f8dc37e10e6cd..eaa9156721de98d19f6110e7b2ab55afa30a8f81 100644
|
||||
index f1561f1759be766d00543a868c9cd931dc17a72a..e2502b1f9219841857da4a27d5723052b3915757 100644
|
||||
--- a/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
+++ b/chrome/browser/ui/views/hats/hats_next_web_dialog.cc
|
||||
@@ -71,8 +71,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
@@ -70,8 +70,7 @@ class HatsNextWebDialog::HatsWebView : public views::WebView {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -155,7 +183,7 @@ index 69d39ab12f7a1895e1ca50914a4f8dc37e10e6cd..eaa9156721de98d19f6110e7b2ab55af
|
||||
}
|
||||
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 eb2d28e7df5e4430f24799d051ba864b25a4da38..4af0e5792e875d9fcf55293707d2cdcdae5b5007 100644
|
||||
index 5361b1d57e3277b76463e7c67d32b0c378192609..f22776c45911026b637bd854cff7b5b09b96486b 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -176,7 +204,7 @@ index eb2d28e7df5e4430f24799d051ba864b25a4da38..4af0e5792e875d9fcf55293707d2cdcd
|
||||
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 d42e4b793677188c090593ad6aa612e48058dfbb..25aebc2aaffd1f43274ffc52a20b5979afc5aaec 100644
|
||||
index 2b328613e7ccd65bb5fad0e2264aab74484fb9bc..726548375430e9d4f6a720f80d4376765c319723 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -218,10 +246,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 01fc65db762e2ee2e8bac8ab03f6bfa32068cfd7..9d742125434674f832daf7abd0c19fadcf8fcf24 100644
|
||||
index 387fe3214e73f0ea4cd9a39d7f74c2e1fb2e8b9c..9e3a045ee09748f74712ee9fa8134661c01b2df7 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3957,8 +3957,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3933,8 +3933,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -232,7 +260,7 @@ index 01fc65db762e2ee2e8bac8ab03f6bfa32068cfd7..9d742125434674f832daf7abd0c19fad
|
||||
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 eec7f60003267f91f856dc347b31ab8d637fc674..68e739a2b6dfb58593c29cde177c27c7aa793976 100644
|
||||
index bd4bdeda3403325ac5c3b83bc575b46844b5077a..224d70abab0fdcd08fd09cff4a3deba5a5387ba4 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -246,7 +274,7 @@ index eec7f60003267f91f856dc347b31ab8d637fc674..68e739a2b6dfb58593c29cde177c27c7
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index a082d41de24f963fe170108e80601946a25fa5f9..6236ff3116fc7064cfcf8d35e41eaa3a43a8a2cf 100644
|
||||
index f33bc7ec4bce4b6a4c38462110b68aae5b6280d6..53cf3913f59bc4d2fc883462a1b854ed18d7681f 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -321,8 +321,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -260,10 +288,10 @@ index a082d41de24f963fe170108e80601946a25fa5f9..6236ff3116fc7064cfcf8d35e41eaa3a
|
||||
// Allow delegate to creates a custom WebContents when
|
||||
// WebContents::CreateNewWindow() is called. This function is only called
|
||||
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 111f4b46265628ef23c4e08f6fc0ad5ed6f793c3..d300d7276c8217c60f4b39802577b8bace6be7c3 100644
|
||||
index a4a3713b484d706d18466b0d3e6efef4a16e584b..84fe3304a2967de36efb6595689fee33454a73b5 100644
|
||||
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
|
||||
@@ -197,8 +197,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
@@ -198,8 +198,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -316,10 +344,10 @@ index 06d3ed32b65708d91b220cdd4991fd377d84217c..bc942580c1bfb16bc5a8e9168f55626d
|
||||
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 4e0a30932581feebd8877eca025961704fa10267..299a64bd0f7a493d1698c71641bf94197d016269 100644
|
||||
index 3d75b8de4e87fb365ca3472387b74dcdc1acf221..235be638fc445d7b2fcd907cbfeddbd44c624383 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.cc
|
||||
@@ -527,8 +527,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -525,8 +525,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -330,10 +358,10 @@ index 4e0a30932581feebd8877eca025961704fa10267..299a64bd0f7a493d1698c71641bf9419
|
||||
// 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 957eef3cbc48c820680b929423bf70a1001c9dc6..6891a43dd610e8f719b5efa2200dafb3d1ffffa7 100644
|
||||
index ac903eeed4d888b1128c9d96aec755d519aee590..cdfccea0e758c35e772b554ba0f3c987b58124d7 100644
|
||||
--- a/fuchsia_web/webengine/browser/frame_impl.h
|
||||
+++ b/fuchsia_web/webengine/browser/frame_impl.h
|
||||
@@ -302,8 +302,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
|
||||
@@ -310,8 +310,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,
|
||||
@@ -344,7 +372,7 @@ index 957eef3cbc48c820680b929423bf70a1001c9dc6..6891a43dd610e8f719b5efa2200dafb3
|
||||
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 b97e92ed1eedca8a4d76f39e2e948508dc94a17e..106b6d744468c0f28dcc6ba987a93e22835729bd 100644
|
||||
index 22f46f2515e62c84edd5540ba783843fef93b211..eb4d36792888278759d9a822b8d0518905245f0a 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -182,8 +182,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
@@ -372,7 +400,7 @@ index a4e4703e5c2a3e668806e61ca5437a6a571e73d2..f1198ac26f34c68efd70e77453b0705c
|
||||
return delegate_->HandleShouldOverrideWebContentsCreation();
|
||||
return false;
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
|
||||
index 63a3eb7b4a73e8d28662ca1175008b7e4225ed36..df1fd8f901507854bc6fbed5ba8b94c15b58b56d 100644
|
||||
index 105c29d75c54fe5ff2909af38f52bb00fdee3d05..3fbb4beca0e0b727858d4966a509851700baa167 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.h
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.h
|
||||
@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
||||
|
||||
@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
|
||||
as its not supported in the current version of chrome.
|
||||
|
||||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
|
||||
index 56533ee562300302d27e3bde27148d36612f2f65..dcb9816d632dd3198377de3f87252fda5bc90133 100644
|
||||
index 13fea00df7ea693ff10576be264f17eafe8f80bf..ee5966ee7e0503d9dd43b407e605952a73aff309 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
@@ -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 1ad4ef06d2b4bd14f87faa7c1837c3af8bc343f8..b907a05096e7620bd354a7f11406c6fa097c7956 100644
|
||||
index 8d82dc3e54180da12dc55134945e291fafaa020e..5b07db2879bea5ec60c2ca19a120c07579a87346 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -18,7 +18,7 @@ index 1ad4ef06d2b4bd14f87faa7c1837c3af8bc343f8..b907a05096e7620bd354a7f11406c6fa
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/task/thread_pool/thread_pool_instance.h"
|
||||
@@ -243,8 +244,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
|
||||
@@ -242,8 +243,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ index 1ad4ef06d2b4bd14f87faa7c1837c3af8bc343f8..b907a05096e7620bd354a7f11406c6fa
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
base::FileDescriptorStore& file_descriptor_store =
|
||||
base::FileDescriptorStore::GetInstance();
|
||||
@@ -273,11 +279,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
@@ -272,11 +278,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
|
||||
@@ -48,7 +48,7 @@ index 1ad4ef06d2b4bd14f87faa7c1837c3af8bc343f8..b907a05096e7620bd354a7f11406c6fa
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
}
|
||||
|
||||
@@ -939,7 +946,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
@@ -960,7 +967,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
return TerminateForFatalInitializationError();
|
||||
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
@@ -102,10 +102,10 @@ index 8420d43b88bc7187d8e0701dd58a5de07366a5c6..5572fad8219ae2c72f7c636b8b86c0b6
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 70ae158b8f8ffbcbd559dffb025e6fb1e76f8ff0..248777fa1944ee7432dda9535595e48cdb421429 100644
|
||||
index 67d3be89ac776ebc39c245641f9fbb4e9dd5e03d..1e88f4034ef2b72b2373e17c607b9e38bf24863b 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -501,8 +501,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -495,8 +495,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -115,7 +115,7 @@ index 70ae158b8f8ffbcbd559dffb025e6fb1e76f8ff0..248777fa1944ee7432dda9535595e48c
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/802962): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -511,10 +510,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -505,10 +504,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
|
||||
|
||||
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
index 7822d61c2c8249d5ddfca93abcecf7499b30d3be..fafec85a7825d2f851605af9d3aa278d5f68c790 100644
|
||||
index 15cf2ff03d50c10ab2423e326f8ac26585c67077..15542659edd07eaee42629ac9011524908835733 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1711,6 +1711,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
@@ -1676,6 +1676,28 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
loader_factory_bundle_info =
|
||||
context()->loader_factory_bundle_for_update_check()->Clone();
|
||||
|
||||
@@ -21,42 +21,33 @@ index 7822d61c2c8249d5ddfca93abcecf7499b30d3be..fafec85a7825d2f851605af9d3aa278d
|
||||
+ // ServiceWorkerContextWrapper::CreateNonNetworkPendingURLLoaderFactoryBundleForUpdateCheck
|
||||
+ // happens early on browser startup before the JS in the main process
|
||||
+ // is run by the embedder.
|
||||
+ auto& pending_scheme_specific_factories =
|
||||
+ static_cast<blink::PendingURLLoaderFactoryBundle*>(
|
||||
+ loader_factory_bundle_info.get())
|
||||
+ ->pending_scheme_specific_factories();
|
||||
+ auto* factory_bundle = static_cast<blink::PendingURLLoaderFactoryBundle*>(
|
||||
+ loader_factory_bundle_info.get());
|
||||
+ ContentBrowserClient::NonNetworkURLLoaderFactoryMap non_network_factories;
|
||||
+ GetContentClient()
|
||||
+ ->browser()
|
||||
+ ->RegisterNonNetworkServiceWorkerUpdateURLLoaderFactories(
|
||||
+ storage_partition_->browser_context(), &non_network_factories);
|
||||
+ for (auto& [scheme, factory_remote] : non_network_factories) {
|
||||
+ pending_scheme_specific_factories.emplace(
|
||||
+ for (auto& pair : non_network_factories) {
|
||||
+ const std::string& scheme = pair.first;
|
||||
+ mojo::PendingRemote<network::mojom::URLLoaderFactory>& factory_remote =
|
||||
+ pair.second;
|
||||
+
|
||||
+ factory_bundle->pending_scheme_specific_factories().emplace(
|
||||
+ scheme, std::move(factory_remote));
|
||||
+ }
|
||||
+
|
||||
if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
|
||||
browser_context(), scope_origin)) {
|
||||
// If this is a Service Worker for a WebUI, the WebUI's URLDataSource
|
||||
@@ -1730,9 +1750,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeScheme) &&
|
||||
scope.scheme_piece() == kChromeUIScheme) {
|
||||
if (base::FeatureList::IsEnabled(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
@@ -1696,9 +1718,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
browser_context(), scope_origin)) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
|
||||
- static_cast<blink::PendingURLLoaderFactoryBundle*>(
|
||||
- loader_factory_bundle_info.get())
|
||||
- ->pending_scheme_specific_factories()
|
||||
+ pending_scheme_specific_factories
|
||||
.emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIScheme,
|
||||
base::flat_set<std::string>()));
|
||||
@@ -1740,9 +1758,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
features::kEnableServiceWorkersForChromeUntrusted) &&
|
||||
scope.scheme_piece() == kChromeUIUntrustedScheme) {
|
||||
config->RegisterURLDataSource(browser_context());
|
||||
- static_cast<blink::PendingURLLoaderFactoryBundle*>(
|
||||
- loader_factory_bundle_info.get())
|
||||
- ->pending_scheme_specific_factories()
|
||||
+ pending_scheme_specific_factories
|
||||
+ factory_bundle->pending_scheme_specific_factories()
|
||||
.emplace(kChromeUIUntrustedScheme,
|
||||
CreateWebUIServiceWorkerLoaderFactory(
|
||||
browser_context(), kChromeUIUntrustedScheme,
|
||||
|
||||
@@ -82,10 +82,10 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 836f7683b77b3b28f33984f27649d675ddddd5b7..84135d3cf983c88fc165a0fc012200e5132a52ff 100644
|
||||
index 4da983eee1abad065dd8a76a7efd308ef5897a09..5c34fda5db161ad1e563a953995bfe06f902b53f 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -141,7 +141,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
||||
@@ -142,7 +142,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
BASE_FEATURE(kWindowCaptureMacV2,
|
||||
"WindowCaptureMacV2",
|
||||
@@ -94,7 +94,7 @@ index 836f7683b77b3b28f33984f27649d675ddddd5b7..84135d3cf983c88fc165a0fc012200e5
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
@@ -451,6 +451,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
@@ -452,6 +452,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
FROM_HERE,
|
||||
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
||||
media_list_));
|
||||
@@ -104,7 +104,7 @@ index 836f7683b77b3b28f33984f27649d675ddddd5b7..84135d3cf983c88fc165a0fc012200e5
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
@@ -823,6 +826,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -824,6 +827,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
78
patches/chromium/disable-redraw-lock.patch
Normal file
78
patches/chromium/disable-redraw-lock.patch
Normal file
@@ -0,0 +1,78 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Heilig Benedek <benecene@gmail.com>
|
||||
Date: Thu, 20 Sep 2018 17:47:54 -0700
|
||||
Subject: disable-redraw-lock.patch
|
||||
|
||||
Chromium uses a custom window titlebar implementation on Windows when DWM
|
||||
is disabled (Windows 7 and earlier, non Aero theme). The native titlebar
|
||||
sometimes painted over this custom titlebar, so a workaround was put in
|
||||
place to lock redraws in reaction to certain events if DWM is disabled,
|
||||
since the code assumes that in that case, the custom titlebar is painted.
|
||||
Electron forces the use of the native titlebar, which the workaround doesn't
|
||||
take into account, and still locks redraws, causing weird repainting issues
|
||||
in electron (and other applications). This patch provides a way to disable
|
||||
the redraw locking mechanism, which fixes these issues. The electron issue
|
||||
can be found at https://github.com/electron/electron/issues/1821
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index ec39cb0d15c80f051e89bf4d0f05368dff897fa7..472090adb19411366c50ed8e5a2f1276bc0a47eb 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -311,6 +311,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
} // namespace
|
||||
|
||||
+bool HWNDMessageHandlerDelegate::HasNativeFrame() const {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
// A scoping class that prevents a window from being able to redraw in response
|
||||
// to invalidations that may occur within it for the lifetime of the object.
|
||||
//
|
||||
@@ -361,7 +365,8 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
hwnd_(owner_->hwnd()),
|
||||
cancel_unlock_(false),
|
||||
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
||||
- ::IsWindow(hwnd_) && !owner_->IsHeadless() &&
|
||||
+ ::IsWindow(hwnd_) && !owner_->HasNativeFrame() &&
|
||||
+ !owner_->IsHeadless() &&
|
||||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -1057,6 +1062,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
return scoped_enable;
|
||||
}
|
||||
|
||||
+bool HWNDMessageHandler::HasNativeFrame() {
|
||||
+ return delegate_->HasNativeFrame();
|
||||
+}
|
||||
+
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index e93d1727cbd8263d3b68e539856a577585a6092c..6d0adb7b5febc5625073312e7f1d557f89927ac8 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -210,6 +210,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
using TouchIDs = std::set<DWORD>;
|
||||
enum class DwmFrameState { kOff, kOn };
|
||||
|
||||
+ bool HasNativeFrame();
|
||||
+
|
||||
// Overridden from WindowImpl:
|
||||
HICON GetDefaultWindowIcon() const override;
|
||||
HICON GetSmallWindowIcon() const override;
|
||||
diff --git a/ui/views/win/hwnd_message_handler_delegate.h b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
index 08e46c7b92f6cbe95c9cb524d09a6ed9e89ecf00..233dd12f86c20a7f5169caab998993f614e8bc7e 100644
|
||||
--- a/ui/views/win/hwnd_message_handler_delegate.h
|
||||
+++ b/ui/views/win/hwnd_message_handler_delegate.h
|
||||
@@ -46,6 +46,8 @@ class VIEWS_EXPORT HWNDMessageHandlerDelegate {
|
||||
// True if the widget associated with this window has a non-client view.
|
||||
virtual bool HasNonClientView() const = 0;
|
||||
|
||||
+ virtual bool HasNativeFrame() const;
|
||||
+
|
||||
// Returns who we want to be drawing the frame. Either the system (Windows)
|
||||
// will handle it or Chrome will custom draw it.
|
||||
virtual FrameMode GetFrameMode() const = 0;
|
||||
@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
||||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index a236d3c2bbd60778a443e461c6f9bbf813871404..720d34764c0f38a85c1c8e6ad72625abe3b3ed7f 100644
|
||||
index d129d26e2ee18a30aa44c7f9c2ba3af2d12dca6a..06867e89b6a0a73dc7d8f4060b366a8b43dd5525 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1929,6 +1929,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1890,6 +1890,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
TargetColorParams params;
|
||||
@@ -35,7 +35,7 @@ index a236d3c2bbd60778a443e461c6f9bbf813871404..720d34764c0f38a85c1c8e6ad72625ab
|
||||
// If we are likely to software composite the resource, we use sRGB because
|
||||
// software compositing is unable to perform color conversion.
|
||||
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
|
||||
index 0df77c20339a87dd881e89eda88d16adca9f5067..2242d58ac828affc1361b9a5745b4695e2643140 100644
|
||||
index d9b3e3cbeb7fcf2dc410245167ccffa4828ae5b8..540ec189f33ad35aaae612e11cf5fc18a746f4b6 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
@@ -48,7 +48,7 @@ index 0df77c20339a87dd881e89eda88d16adca9f5067..2242d58ac828affc1361b9a5745b4695
|
||||
// Image Decode Service and raster tiles without images until the decode is
|
||||
// ready.
|
||||
diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
|
||||
index 97996a8a897e0ac7d6ba2eb9d1f47da6da573b6b..d84292521466d7bb2d7794269a332b0f2fa2d6e7 100644
|
||||
index 893291f2c79dd921d03785bbef2eb4b1de1f3638..217f3efc64f55506d8dc6548c10830b38d5f5940 100644
|
||||
--- a/components/viz/common/display/renderer_settings.h
|
||||
+++ b/components/viz/common/display/renderer_settings.h
|
||||
@@ -24,6 +24,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
|
||||
@@ -60,7 +60,7 @@ index 97996a8a897e0ac7d6ba2eb9d1f47da6da573b6b..d84292521466d7bb2d7794269a332b0f
|
||||
bool force_antialiasing = false;
|
||||
bool force_blending_with_shaders = false;
|
||||
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
|
||||
index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ced31730d3 100644
|
||||
index 5ca2e3b7999fb0c8da4953c6a20352a4b9de675d..86b4f9d2d1882e5706fd559e01442b02f629bda9 100644
|
||||
--- a/components/viz/host/renderer_settings_creation.cc
|
||||
+++ b/components/viz/host/renderer_settings_creation.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -69,7 +69,7 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
+#include "ui/gfx/switches.h"
|
||||
|
||||
#if BUILDFLAG(IS_OZONE)
|
||||
#if defined(USE_OZONE)
|
||||
#include "ui/ozone/public/ozone_platform.h"
|
||||
@@ -49,6 +50,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line,
|
||||
RendererSettings CreateRendererSettings() {
|
||||
@@ -81,10 +81,10 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce
|
||||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 3ce52a7866c1ce6fe92fa8a9e080f5d49ac5bd9c..dc1ab6a8f6f2bf181c2f3ba4610354543171a57b 100644
|
||||
index f52718f68a21d257fd51fcad6b8fef94cd339673..e4e8885b53ec990729e2ca38cdab5757af4cd1dc 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -230,6 +230,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -93,10 +93,10 @@ index 3ce52a7866c1ce6fe92fa8a9e080f5d49ac5bd9c..dc1ab6a8f6f2bf181c2f3ba461035454
|
||||
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
|
||||
sandbox::policy::switches::kGpuSandboxFailuresFatal,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 3a01f5af5f1a821f9c62a3a57adbc24a1f1b9946..9ed728f88f66e9e453afde7af1c157e580d2b829 100644
|
||||
index d0b9284fcd1120722b751a462f7018353e7b07c3..6c6a50e6f5f78a5e1caaf539bde4893b4a8bd0a8 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -201,6 +201,7 @@
|
||||
@@ -200,6 +200,7 @@
|
||||
#include "ui/accessibility/accessibility_switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "ui/display/display_switches.h"
|
||||
@@ -104,7 +104,7 @@ index 3a01f5af5f1a821f9c62a3a57adbc24a1f1b9946..9ed728f88f66e9e453afde7af1c157e5
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3292,6 +3293,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3231,6 +3232,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
// Propagate the following switches to the renderer command line (along
|
||||
// with any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -156,10 +156,10 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
index 047a135027e0df7949285ed9b9b44a41321cdb8c..8a43082138acc82f97c293a195fae3a770e4063a 100644
|
||||
index 191a45bd3844d3b1ea652e7df164d7b7c11767da..754998229bb1fb92ac8cbf783839a60b92db0320 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
#include "ui/base/ui_base_features.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
@@ -167,7 +167,7 @@ index 047a135027e0df7949285ed9b9b44a41321cdb8c..8a43082138acc82f97c293a195fae3a7
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
||||
|
||||
@@ -218,6 +219,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
@@ -184,6 +185,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
@@ -178,7 +178,7 @@ index 047a135027e0df7949285ed9b9b44a41321cdb8c..8a43082138acc82f97c293a195fae3a7
|
||||
// is what the renderer uses if its not threaded.
|
||||
settings.enable_checker_imaging =
|
||||
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
|
||||
index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a824336910468ba73 100644
|
||||
index d346af4fa91adfc2f031484252e4ae05435f94d7..88315bdf562451a2371e53d994bbb3821f357d0e 100644
|
||||
--- a/ui/gfx/mac/io_surface.cc
|
||||
+++ b/ui/gfx/mac/io_surface.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
@@ -189,7 +189,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691
|
||||
|
||||
namespace gfx {
|
||||
|
||||
@@ -150,6 +151,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
|
||||
@@ -143,6 +144,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
|
||||
// Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace.
|
||||
bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
|
||||
const ColorSpace& color_space) {
|
||||
@@ -204,7 +204,7 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691
|
||||
// Allow but ignore invalid color spaces.
|
||||
if (!color_space.IsValid())
|
||||
return true;
|
||||
@@ -320,6 +329,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
|
||||
@@ -313,6 +322,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
|
||||
DCHECK_EQ(kIOReturnSuccess, r);
|
||||
}
|
||||
|
||||
@@ -221,10 +221,10 @@ index c119ef410f437b27ae4d0ff76627af55a2679171..997558e36dc1aec86005d05a82433691
|
||||
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
|
||||
|
||||
diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
|
||||
index d497b6e3b8615d683589b2b9d43e810ed57e8eb8..873a084eeac8f50a1ce0be53bbdb47b4856e0bce 100644
|
||||
index 3efe109c57d7cdf2979bfd97d26ff351b48158f6..d549cb67409425238cf7cae57a34339650584fb7 100644
|
||||
--- a/ui/gfx/switches.cc
|
||||
+++ b/ui/gfx/switches.cc
|
||||
@@ -13,6 +13,8 @@ namespace switches {
|
||||
@@ -11,6 +11,8 @@ namespace switches {
|
||||
// only apply to LinearAnimation and its subclasses.
|
||||
const char kAnimationDurationScale[] = "animation-duration-scale";
|
||||
|
||||
@@ -234,7 +234,7 @@ index d497b6e3b8615d683589b2b9d43e810ed57e8eb8..873a084eeac8f50a1ce0be53bbdb47b4
|
||||
// sharpness, kerning, hinting and layout.
|
||||
const char kDisableFontSubpixelPositioning[] =
|
||||
diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
|
||||
index 8bb46cc8a5d521452ac0ef9cac975987e203404c..03ee7b511c6b8fcd0b7154365cf533778ff4d234 100644
|
||||
index 96563c15f0849dfced900435e8eb20db4d50bc0d..01e6a4954866cdcdc9e8a2e05c092e059b05426b 100644
|
||||
--- a/ui/gfx/switches.h
|
||||
+++ b/ui/gfx/switches.h
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -243,5 +243,5 @@ index 8bb46cc8a5d521452ac0ef9cac975987e203404c..03ee7b511c6b8fcd0b7154365cf53377
|
||||
GFX_SWITCHES_EXPORT extern const char kAnimationDurationScale[];
|
||||
+GFX_SWITCHES_EXPORT extern const char kDisableColorCorrectRendering[];
|
||||
GFX_SWITCHES_EXPORT extern const char kDisableFontSubpixelPositioning[];
|
||||
GFX_SWITCHES_EXPORT extern const char kDisablePPAPISharedImagesSwapChain[];
|
||||
GFX_SWITCHES_EXPORT extern const char kEnableNativeGpuMemoryBuffers[];
|
||||
GFX_SWITCHES_EXPORT extern const char kForcePrefersReducedMotion[];
|
||||
|
||||
@@ -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 07dcac920740a029dfc69c123506bafd142eb4ef..1e17393b6477e39a25e5973b19393ba2e7e9a4f6 100644
|
||||
index a420b3cf9b1c325967318db322d61c4ebc4cf7c6..c5bc07973bba93aff7837cea92895e2ef7dff897 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -525,7 +525,11 @@
|
||||
|
||||
@@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
|
||||
node initialization to not update flags after V8 initialization.
|
||||
|
||||
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
|
||||
index bc75e10508b881341df7a90adf2be55274803780..d23a1bce999d7fbbc89001bb03186e5dfbb7f409 100644
|
||||
index f2bdea351833b9c49b2f6fb1a9badfc83c07dbb1..ed7b55da2ba31391d2840ef704159f59c26b92e3 100644
|
||||
--- a/content/renderer/render_process_impl.cc
|
||||
+++ b/content/renderer/render_process_impl.cc
|
||||
@@ -229,6 +229,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
@@ -228,6 +228,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
SetV8FlagIfNotFeature(features::kWebAssemblyDynamicTiering,
|
||||
"--no-wasm-dynamic-tiering");
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 0e38398b3e3edda46d4300881ca4e14065b4afe7..6ae9753ee4fb1422cf9ba1866b40bcd5e6a7daad 100644
|
||||
index ff4e181fae1849772b699bf83e0f7e9556dbd71e..84b3bcbfb4f52098efad6f2b8ab8e8445d8fe13a 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -822,6 +822,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -824,6 +824,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
@@ -20,20 +20,21 @@ index 0e38398b3e3edda46d4300881ca4e14065b4afe7..6ae9753ee4fb1422cf9ba1866b40bcd5
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index e89b0941d0bf137a84c568799f9bdc6f28bb5e83..3ef64d8db071ea55db79af8c3d1c8b3c011e1a66 100644
|
||||
index 6ea55a22496a5186513963d06fa700cb82758177..bbcff3ff49234e2f6b9fcdaa1409678189d91b67 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -895,6 +895,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
|
||||
@@ -894,6 +894,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
cc::BrowserControlsState current,
|
||||
bool animate);
|
||||
|
||||
+ // Electron: Prevents the widget from getting hidden.
|
||||
+ bool disable_hidden_ = false;
|
||||
|
||||
+
|
||||
protected:
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
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 e4b6563f2bcdf3c42c6ec8d21b9e261082f7de8e..709c22e15dba95ff07907d86fa7439179e5134eb 100644
|
||||
index 8b712a21e7ee1d2375c28af6a2f8d7279220138c..96c24edf6e4044a3ced0a87ecbd7a56f36f5d3d3 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -604,7 +604,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index 327cec20d1930ce3a5b02bcac01bb8c406c3c5ba..70ea281002426c5436b76c867f2295d97f3d5cdd 100644
|
||||
index 30ea1ea16adeef33ed6831de1b92cece90a370d2..1dd9657c567380e895a1decf8e549ebc6dbc4e95 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1255,6 +1255,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1240,6 +1240,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index 327cec20d1930ce3a5b02bcac01bb8c406c3c5ba..70ea281002426c5436b76c867f2295d9
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1305,6 +1306,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1290,6 +1291,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index ceee9102cf0213163eff1528d846d87eace30f20..061c7ea5dbf60c3303b214ac3781bbef254d2da5 100644
|
||||
index 0d5595767664eaaefb650fe372b4d686403f3fc5..9ca8ea82afdc9660384dd7224d810990f96bf5a5 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
|
||||
@@ -574,7 +574,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
@@ -19,10 +19,10 @@ index ceee9102cf0213163eff1528d846d87eace30f20..061c7ea5dbf60c3303b214ac3781bbef
|
||||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 8fd2d52e93d4c106f768da03bc1cb482768786d2..2a60a66682224b5eee4f4c9f57d6a27ca11ed59d 100644
|
||||
index 472090adb19411366c50ed8e5a2f1276bc0a47eb..9f2b240b0c053a10d4543f0ffb9809fd735d7b6d 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1001,8 +1001,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
@@ -1007,8 +1007,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
}
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user