mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
281 Commits
display_id
...
v19.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4817e82e89 | ||
|
|
7d84b3bc87 | ||
|
|
13445df1fb | ||
|
|
e75e4420eb | ||
|
|
9947b55cc2 | ||
|
|
a79258f77e | ||
|
|
09cf05df5c | ||
|
|
2dfd69ea90 | ||
|
|
51d097662e | ||
|
|
08c02d2013 | ||
|
|
58f7ab8a5c | ||
|
|
770a38e21c | ||
|
|
1289823c67 | ||
|
|
3ade6e1b08 | ||
|
|
c2d73ae79c | ||
|
|
14c64ed2e0 | ||
|
|
0e0b638e5f | ||
|
|
0e6da36264 | ||
|
|
3160e0d7fd | ||
|
|
d0293c81c0 | ||
|
|
178db41204 | ||
|
|
d3976e68c8 | ||
|
|
9e3039775e | ||
|
|
820e0ca3b5 | ||
|
|
397a5c6194 | ||
|
|
4d62f9648f | ||
|
|
778fa44a0f | ||
|
|
d97604f8f9 | ||
|
|
efc6f0fd0a | ||
|
|
cfcab30cf4 | ||
|
|
d9c36bfb1d | ||
|
|
a7c47eb695 | ||
|
|
09a01ccc52 | ||
|
|
2fc4a87d56 | ||
|
|
73b2b750e5 | ||
|
|
07f54a4474 | ||
|
|
7fc35f0de2 | ||
|
|
6be66eaf9b | ||
|
|
0d207d2ecf | ||
|
|
53f115849b | ||
|
|
676eef4b87 | ||
|
|
2bbec7481f | ||
|
|
6b97beb489 | ||
|
|
81854a488b | ||
|
|
22ad2d33bf | ||
|
|
eb824db537 | ||
|
|
9769dc1a5c | ||
|
|
e8fa8fd834 | ||
|
|
987d7858da | ||
|
|
0a3ba9b87a | ||
|
|
4f214d5319 | ||
|
|
9ffebd1c53 | ||
|
|
e9d3e9995d | ||
|
|
b05ccd812e | ||
|
|
1bce5860e8 | ||
|
|
f93dc38e84 | ||
|
|
bf7741ab53 | ||
|
|
a0ea6795ca | ||
|
|
c48905aee6 | ||
|
|
4edf23f86d | ||
|
|
eeb3f505e6 | ||
|
|
3b683c1181 | ||
|
|
db6c2274d9 | ||
|
|
fb6de2d52b | ||
|
|
4b483799cb | ||
|
|
a5cafd174d | ||
|
|
d52ce309dc | ||
|
|
e5bf0d3c11 | ||
|
|
67a40dd5c6 | ||
|
|
0068195d56 | ||
|
|
fe5b3d2b80 | ||
|
|
eee147b483 | ||
|
|
21fcf51000 | ||
|
|
a07f56bf84 | ||
|
|
a90abbddbb | ||
|
|
4fa6f61f8c | ||
|
|
57a03c4d2a | ||
|
|
205cf24802 | ||
|
|
7e1099a8e4 | ||
|
|
438347d891 | ||
|
|
c005d4ff56 | ||
|
|
729b0f5508 | ||
|
|
ea21d940ec | ||
|
|
9df18f3fcf | ||
|
|
f724a9ca2f | ||
|
|
f3f1171a09 | ||
|
|
b7f68027a7 | ||
|
|
a72b6fb7a9 | ||
|
|
64443a7487 | ||
|
|
40fad5221b | ||
|
|
3c89c28e5c | ||
|
|
ef88af2703 | ||
|
|
586f84f957 | ||
|
|
98ccd203bc | ||
|
|
b1e5af755c | ||
|
|
a388f977a3 | ||
|
|
97ca81b1b5 | ||
|
|
d95d88d25d | ||
|
|
b1b44e0469 | ||
|
|
f56cb78c89 | ||
|
|
c67ca40ed6 | ||
|
|
e702a8ef3b | ||
|
|
54fa16a3df | ||
|
|
af4f598e81 | ||
|
|
b9da235ec6 | ||
|
|
2f4e7679f8 | ||
|
|
50d45d07ac | ||
|
|
39df0bdb74 | ||
|
|
8fa0cbe27a | ||
|
|
addf23c579 | ||
|
|
6b67219dbf | ||
|
|
2298908a1f | ||
|
|
b8af801f82 | ||
|
|
c38f15eb03 | ||
|
|
6d65180819 | ||
|
|
6ba162de48 | ||
|
|
e9e2b6dfda | ||
|
|
88632cbdc7 | ||
|
|
d6b2e757f8 | ||
|
|
b91ab0ebf8 | ||
|
|
c0588770ea | ||
|
|
2a9a71af29 | ||
|
|
7073603150 | ||
|
|
82bb684765 | ||
|
|
36169d15da | ||
|
|
5174419819 | ||
|
|
64fc21fec9 | ||
|
|
74df9ad42f | ||
|
|
12f4be7fba | ||
|
|
9b8cd7cc53 | ||
|
|
59a3898ba8 | ||
|
|
6cb2b75fbb | ||
|
|
0764bb1560 | ||
|
|
5dd4b6aaed | ||
|
|
4e97448f70 | ||
|
|
92528220db | ||
|
|
108d1f9a29 | ||
|
|
4dedbadcb5 | ||
|
|
ea2bea7382 | ||
|
|
3cf901e45b | ||
|
|
e87d17b728 | ||
|
|
def1ec7f99 | ||
|
|
85f6bffee0 | ||
|
|
94632e9703 | ||
|
|
7acd622750 | ||
|
|
c050839202 | ||
|
|
c0555c1668 | ||
|
|
07344857d6 | ||
|
|
f57ca1174c | ||
|
|
a189d3dde6 | ||
|
|
a49f0f7318 | ||
|
|
ba32b32ec3 | ||
|
|
3ad5a45173 | ||
|
|
b9d16ab3eb | ||
|
|
7e2606df02 | ||
|
|
8692a5b921 | ||
|
|
abf438bddc | ||
|
|
56515ad544 | ||
|
|
a9ff8f1359 | ||
|
|
f84cafe4fd | ||
|
|
42266d2bf0 | ||
|
|
44b5c72f67 | ||
|
|
96e1c7ec92 | ||
|
|
0206a9b7ed | ||
|
|
10ad6f8295 | ||
|
|
23c18be06f | ||
|
|
cc4565bb41 | ||
|
|
9d1c53a7e4 | ||
|
|
c7cd23c069 | ||
|
|
f9dc5b52d0 | ||
|
|
aca4b543d5 | ||
|
|
c2a11cef63 | ||
|
|
85a7498bd6 | ||
|
|
b0c255b72c | ||
|
|
2d91a03b36 | ||
|
|
424fd85b1a | ||
|
|
ad48ccbb9b | ||
|
|
2ea9be3ade | ||
|
|
52a9566f28 | ||
|
|
4ecaae9555 | ||
|
|
21b8200170 | ||
|
|
2b6cd3458f | ||
|
|
00e747ac24 | ||
|
|
082b06cf4e | ||
|
|
b07e17a3bb | ||
|
|
49ee456797 | ||
|
|
85063322e9 | ||
|
|
633d2961eb | ||
|
|
4f0592101b | ||
|
|
8797485564 | ||
|
|
c3746dc439 | ||
|
|
d5dadd0d4a | ||
|
|
da62dd2721 | ||
|
|
c945629872 | ||
|
|
536a17f5ed | ||
|
|
433765cd73 | ||
|
|
870110fd52 | ||
|
|
8ce14231fb | ||
|
|
de09ba2c51 | ||
|
|
290b548b15 | ||
|
|
3df4dcc591 | ||
|
|
c33d65c1d9 | ||
|
|
ddb0b1b4c4 | ||
|
|
14d3e369ae | ||
|
|
9f66268fab | ||
|
|
577b2ba44b | ||
|
|
7e35b91f4d | ||
|
|
04f2b2e2e3 | ||
|
|
7f88b507d9 | ||
|
|
855f36903e | ||
|
|
9ef6a77a72 | ||
|
|
853693bc87 | ||
|
|
f6a2c296d8 | ||
|
|
eb3abf4c98 | ||
|
|
6f853ef616 | ||
|
|
002ea74027 | ||
|
|
f30714e85d | ||
|
|
1f1a0b5461 | ||
|
|
dce5680271 | ||
|
|
fdd268b31e | ||
|
|
005eeafe95 | ||
|
|
6944863de8 | ||
|
|
e69ca30e61 | ||
|
|
40f6d434a9 | ||
|
|
39ab6525b3 | ||
|
|
693b9ec77e | ||
|
|
b4b2262c1b | ||
|
|
04510c6870 | ||
|
|
f2b27f8bb1 | ||
|
|
8bd1bbc5ae | ||
|
|
3ed7b54608 | ||
|
|
b0ab8e49a9 | ||
|
|
cb6acecfbe | ||
|
|
97c99731df | ||
|
|
6adcd6d4ec | ||
|
|
a9e20abc6b | ||
|
|
7c0ed9e837 | ||
|
|
9e35bddc32 | ||
|
|
6c0d8e3989 | ||
|
|
94d13db50d | ||
|
|
cfd9825bc2 | ||
|
|
5ede2aefe7 | ||
|
|
a4308f6ca5 | ||
|
|
ddd550a95d | ||
|
|
fd3a49ef81 | ||
|
|
1f99f5b902 | ||
|
|
542b10da26 | ||
|
|
ceb1cd9002 | ||
|
|
9e61ef9d2f | ||
|
|
20353c29e5 | ||
|
|
2217dffbfa | ||
|
|
1dc407a349 | ||
|
|
f76354b8a5 | ||
|
|
6b9509d2c9 | ||
|
|
dfb6608b98 | ||
|
|
7ce1018581 | ||
|
|
f70bc4de62 | ||
|
|
3232650535 | ||
|
|
d37b2671e4 | ||
|
|
60b91ddcfb | ||
|
|
d1037e45b3 | ||
|
|
11e14081cf | ||
|
|
fb8d290f0e | ||
|
|
f149686bb9 | ||
|
|
43b982e0fa | ||
|
|
c98e4d85ef | ||
|
|
96903856a8 | ||
|
|
9018c76e37 | ||
|
|
ac3dd718bf | ||
|
|
ae9be599e7 | ||
|
|
d0fde072d4 | ||
|
|
5b9647d3ff | ||
|
|
05f58d824c | ||
|
|
5f6d02a4e7 | ||
|
|
01b429edf2 | ||
|
|
1b8181af14 | ||
|
|
bdff8837a7 | ||
|
|
85b8861a7f | ||
|
|
74e57fa3e7 | ||
|
|
6442e87276 | ||
|
|
9a8985f7a2 |
@@ -635,9 +635,9 @@ step-electron-publish: &step-electron-publish
|
|||||||
cd src/electron
|
cd src/electron
|
||||||
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
|
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
|
||||||
echo 'Uploading Electron release distribution to Azure'
|
echo 'Uploading Electron release distribution to Azure'
|
||||||
script/release/uploaders/upload.py --verbose --upload_to_storage
|
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
|
||||||
else
|
else
|
||||||
echo 'Uploading Electron release distribution to GitHub releases'
|
echo 'Uploading Electron release distribution to Github releases'
|
||||||
script/release/uploaders/upload.py --verbose
|
script/release/uploaders/upload.py --verbose
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -650,7 +650,6 @@ step-persist-data-for-tests: &step-persist-data-for-tests
|
|||||||
- src/out/Default/mksnapshot.zip
|
- src/out/Default/mksnapshot.zip
|
||||||
- src/out/Default/chromedriver.zip
|
- src/out/Default/chromedriver.zip
|
||||||
- src/out/Default/gen/node_headers
|
- src/out/Default/gen/node_headers
|
||||||
- src/out/Default/overlapped-checker
|
|
||||||
- src/out/ffmpeg/ffmpeg.zip
|
- src/out/ffmpeg/ffmpeg.zip
|
||||||
- src/electron
|
- src/electron
|
||||||
- src/third_party/electron_node
|
- src/third_party/electron_node
|
||||||
@@ -661,7 +660,6 @@ step-persist-data-for-tests: &step-persist-data-for-tests
|
|||||||
- src/buildtools/third_party/libc++
|
- src/buildtools/third_party/libc++
|
||||||
- src/buildtools/third_party/libc++abi
|
- src/buildtools/third_party/libc++abi
|
||||||
- src/out/Default/obj/buildtools/third_party
|
- src/out/Default/obj/buildtools/third_party
|
||||||
- src/v8/tools/builtins-pgo
|
|
||||||
|
|
||||||
step-electron-dist-unzip: &step-electron-dist-unzip
|
step-electron-dist-unzip: &step-electron-dist-unzip
|
||||||
run:
|
run:
|
||||||
@@ -678,6 +676,13 @@ step-electron-dist-unzip: &step-electron-dist-unzip
|
|||||||
# passed.
|
# passed.
|
||||||
unzip -:o dist.zip
|
unzip -:o dist.zip
|
||||||
|
|
||||||
|
step-ffmpeg-unzip: &step-ffmpeg-unzip
|
||||||
|
run:
|
||||||
|
name: Unzip ffmpeg.zip
|
||||||
|
command: |
|
||||||
|
cd src/out/ffmpeg
|
||||||
|
unzip -:o ffmpeg.zip
|
||||||
|
|
||||||
step-mksnapshot-unzip: &step-mksnapshot-unzip
|
step-mksnapshot-unzip: &step-mksnapshot-unzip
|
||||||
run:
|
run:
|
||||||
name: Unzip mksnapshot.zip
|
name: Unzip mksnapshot.zip
|
||||||
@@ -706,6 +711,13 @@ step-ffmpeg-build: &step-ffmpeg-build
|
|||||||
cd src
|
cd src
|
||||||
ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES
|
ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
|
|
||||||
|
step-verify-ffmpeg: &step-verify-ffmpeg
|
||||||
|
run:
|
||||||
|
name: Verify ffmpeg
|
||||||
|
command: |
|
||||||
|
cd src
|
||||||
|
python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
|
||||||
|
|
||||||
step-verify-mksnapshot: &step-verify-mksnapshot
|
step-verify-mksnapshot: &step-verify-mksnapshot
|
||||||
run:
|
run:
|
||||||
name: Verify mksnapshot
|
name: Verify mksnapshot
|
||||||
@@ -991,7 +1003,7 @@ step-ts-compile: &step-ts-compile
|
|||||||
do
|
do
|
||||||
out="${f:29}"
|
out="${f:29}"
|
||||||
if [ "$out" != "base.js" ]; then
|
if [ "$out" != "base.js" ]; then
|
||||||
node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development
|
node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env.mode=development
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
@@ -1007,17 +1019,9 @@ steps-electron-gn-check: &steps-electron-gn-check
|
|||||||
- *step-generate-deps-hash
|
- *step-generate-deps-hash
|
||||||
- *step-touch-sync-done
|
- *step-touch-sync-done
|
||||||
- maybe-restore-portaled-src-cache
|
- maybe-restore-portaled-src-cache
|
||||||
- run:
|
- *step-wait-for-goma
|
||||||
name: Ensure src checkout worked
|
- *step-gn-gen-default
|
||||||
command: |
|
- *step-gn-check
|
||||||
if [ ! -d "src/third_party/blink" ]; then
|
|
||||||
echo src cache was not restored for an unknown reason
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
- run:
|
|
||||||
name: Wipe Electron
|
|
||||||
command: rm -rf src/electron
|
|
||||||
- *step-checkout-electron
|
|
||||||
|
|
||||||
steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change
|
steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change
|
||||||
steps:
|
steps:
|
||||||
@@ -1028,6 +1032,53 @@ 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
|
#Compile ts/js to verify doc change didn't break anything
|
||||||
- *step-ts-compile
|
- *step-ts-compile
|
||||||
|
|
||||||
|
steps-native-tests: &steps-native-tests
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- *step-depot-tools-add-to-path
|
||||||
|
- install-python2-mac
|
||||||
|
- *step-setup-env-for-build
|
||||||
|
- *step-setup-goma-for-build
|
||||||
|
- *step-wait-for-goma
|
||||||
|
- *step-gn-gen-default
|
||||||
|
|
||||||
|
- run:
|
||||||
|
name: Build tests
|
||||||
|
command: |
|
||||||
|
cd src
|
||||||
|
ninja -C out/Default $BUILD_TARGET
|
||||||
|
- *step-show-goma-stats
|
||||||
|
|
||||||
|
- *step-setup-linux-for-headless-testing
|
||||||
|
- run:
|
||||||
|
name: Run tests
|
||||||
|
command: |
|
||||||
|
mkdir test_results
|
||||||
|
python src/electron/script/native-tests.py run \
|
||||||
|
--config $TESTS_CONFIG \
|
||||||
|
--tests-dir src/out/Default \
|
||||||
|
--output-dir test_results \
|
||||||
|
$TESTS_ARGS
|
||||||
|
|
||||||
|
- store_artifacts:
|
||||||
|
path: test_results
|
||||||
|
destination: test_results # Put it in the root folder.
|
||||||
|
- store_test_results:
|
||||||
|
path: test_results
|
||||||
|
|
||||||
|
steps-verify-ffmpeg: &steps-verify-ffmpeg
|
||||||
|
steps:
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- *step-depot-tools-add-to-path
|
||||||
|
- *step-electron-dist-unzip
|
||||||
|
- *step-ffmpeg-unzip
|
||||||
|
- *step-setup-linux-for-headless-testing
|
||||||
|
|
||||||
|
- *step-verify-ffmpeg
|
||||||
|
- *step-maybe-notify-slack-failure
|
||||||
|
|
||||||
steps-tests: &steps-tests
|
steps-tests: &steps-tests
|
||||||
steps:
|
steps:
|
||||||
- attach_workspace:
|
- attach_workspace:
|
||||||
@@ -1060,16 +1111,19 @@ steps-tests: &steps-tests
|
|||||||
export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
|
export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
|
||||||
export MOCHA_TIMEOUT=180000
|
export MOCHA_TIMEOUT=180000
|
||||||
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
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
|
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||||
|
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||||
else
|
else
|
||||||
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||||
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
||||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
||||||
|
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging)
|
||||||
else
|
else
|
||||||
if [ "$TARGET_ARCH" == "ia32" ]; then
|
if [ "$TARGET_ARCH" == "ia32" ]; then
|
||||||
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
|
npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
|
||||||
fi
|
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))
|
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings))
|
||||||
|
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
- run:
|
- run:
|
||||||
@@ -1078,6 +1132,9 @@ steps-tests: &steps-tests
|
|||||||
cd src
|
cd src
|
||||||
|
|
||||||
# Check if test results exist and are not empty.
|
# Check if test results exist and are not empty.
|
||||||
|
if [ ! -s "junit/test-results-remote.xml" ]; then
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
if [ ! -s "junit/test-results-main.xml" ]; then
|
if [ ! -s "junit/test-results-main.xml" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@@ -1429,7 +1486,7 @@ commands:
|
|||||||
- *step-electron-build
|
- *step-electron-build
|
||||||
- *step-maybe-electron-dist-strip
|
- *step-maybe-electron-dist-strip
|
||||||
- step-electron-dist-build:
|
- 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
|
additional-targets: shell_browser_ui_unittests third_party/electron_node:headers electron:hunspell_dictionaries_zip
|
||||||
|
|
||||||
- *step-show-goma-stats
|
- *step-show-goma-stats
|
||||||
|
|
||||||
@@ -1827,7 +1884,7 @@ jobs:
|
|||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||||
<<: *steps-electron-gn-check
|
<<: *steps-electron-gn-check
|
||||||
|
|
||||||
osx-publish-x64:
|
osx-publish-x64-skip-checkout:
|
||||||
executor:
|
executor:
|
||||||
name: macos
|
name: macos
|
||||||
size: macos.x86.medium.gen2
|
size: macos.x86.medium.gen2
|
||||||
@@ -1848,7 +1905,7 @@ jobs:
|
|||||||
attach: true
|
attach: true
|
||||||
checkout: false
|
checkout: false
|
||||||
|
|
||||||
osx-publish-arm64:
|
osx-publish-arm64-skip-checkout:
|
||||||
executor:
|
executor:
|
||||||
name: macos
|
name: macos
|
||||||
size: macos.x86.medium.gen2
|
size: macos.x86.medium.gen2
|
||||||
@@ -1918,7 +1975,7 @@ jobs:
|
|||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||||
<<: *steps-electron-gn-check
|
<<: *steps-electron-gn-check
|
||||||
|
|
||||||
mas-publish-x64:
|
mas-publish-x64-skip-checkout:
|
||||||
executor:
|
executor:
|
||||||
name: macos
|
name: macos
|
||||||
size: macos.x86.medium.gen2
|
size: macos.x86.medium.gen2
|
||||||
@@ -1939,7 +1996,7 @@ jobs:
|
|||||||
attach: true
|
attach: true
|
||||||
checkout: false
|
checkout: false
|
||||||
|
|
||||||
mas-publish-arm64:
|
mas-publish-arm64-skip-checkout:
|
||||||
executor:
|
executor:
|
||||||
name: macos
|
name: macos
|
||||||
size: macos.x86.medium.gen2
|
size: macos.x86.medium.gen2
|
||||||
@@ -2025,6 +2082,16 @@ jobs:
|
|||||||
<<: *env-stack-dumping
|
<<: *env-stack-dumping
|
||||||
<<: *steps-test-node
|
<<: *steps-test-node
|
||||||
|
|
||||||
|
linux-x64-verify-ffmpeg:
|
||||||
|
executor:
|
||||||
|
name: linux-docker
|
||||||
|
size: medium
|
||||||
|
environment:
|
||||||
|
<<: *env-linux-medium
|
||||||
|
<<: *env-headless-testing
|
||||||
|
<<: *env-send-slack-notifications
|
||||||
|
<<: *steps-verify-ffmpeg
|
||||||
|
|
||||||
linux-arm-testing-tests:
|
linux-arm-testing-tests:
|
||||||
executor: linux-arm
|
executor: linux-arm
|
||||||
environment:
|
environment:
|
||||||
@@ -2081,6 +2148,17 @@ jobs:
|
|||||||
<<: *env-runner
|
<<: *env-runner
|
||||||
<<: *steps-tests
|
<<: *steps-tests
|
||||||
|
|
||||||
|
# Layer 4: Summary.
|
||||||
|
linux-release-summary:
|
||||||
|
executor:
|
||||||
|
name: linux-docker
|
||||||
|
size: medium
|
||||||
|
environment:
|
||||||
|
<<: *env-linux-medium
|
||||||
|
<<: *env-send-slack-notifications
|
||||||
|
steps:
|
||||||
|
- *step-maybe-notify-slack-success
|
||||||
|
|
||||||
# List all workflows
|
# List all workflows
|
||||||
workflows:
|
workflows:
|
||||||
docs-only:
|
docs-only:
|
||||||
@@ -2106,19 +2184,19 @@ workflows:
|
|||||||
when: << pipeline.parameters.run-macos-publish >>
|
when: << pipeline.parameters.run-macos-publish >>
|
||||||
jobs:
|
jobs:
|
||||||
- mac-checkout
|
- mac-checkout
|
||||||
- osx-publish-x64:
|
- osx-publish-x64-skip-checkout:
|
||||||
requires:
|
requires:
|
||||||
- mac-checkout
|
- mac-checkout
|
||||||
context: release-env
|
context: release-env
|
||||||
- mas-publish-x64:
|
- mas-publish-x64-skip-checkout:
|
||||||
requires:
|
requires:
|
||||||
- mac-checkout
|
- mac-checkout
|
||||||
context: release-env
|
context: release-env
|
||||||
- osx-publish-arm64:
|
- osx-publish-arm64-skip-checkout:
|
||||||
requires:
|
requires:
|
||||||
- mac-checkout
|
- mac-checkout
|
||||||
context: release-env
|
context: release-env
|
||||||
- mas-publish-arm64:
|
- mas-publish-arm64-skip-checkout:
|
||||||
requires:
|
requires:
|
||||||
- mac-checkout
|
- mac-checkout
|
||||||
context: release-env
|
context: release-env
|
||||||
|
|||||||
15
.github/workflows/electron_woa_testing.yml
vendored
15
.github/workflows/electron_woa_testing.yml
vendored
@@ -117,6 +117,21 @@ jobs:
|
|||||||
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
|
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
|
||||||
MOCHA_REPORTER: mocha-multi-reporters
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||||
|
- name: Run Electron Remote based tests
|
||||||
|
if: ${{ success() || failure() }}
|
||||||
|
run: |
|
||||||
|
cd src
|
||||||
|
set npm_config_nodedir=%cd%\out\Default\gen\node_headers
|
||||||
|
set npm_config_arch=arm64
|
||||||
|
cd electron
|
||||||
|
node script/yarn test --runners=remote --enable-logging --disable-features=CalculateNativeWinOcclusion
|
||||||
|
env:
|
||||||
|
ELECTRON_OUT_DIR: Default
|
||||||
|
IGNORE_YARN_INSTALL_ERROR: 1
|
||||||
|
ELECTRON_TEST_RESULTS_DIR: junit
|
||||||
|
MOCHA_MULTI_REPORTERS: 'mocha-junit-reporter, tap'
|
||||||
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
|
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||||
- name: Verify ffmpeg
|
- name: Verify ffmpeg
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
name: Trigger Major Release Dependency Updates
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
check_tag:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: Check Tag
|
|
||||||
run: |
|
|
||||||
if [[ ${{ github.event.ref }} =~ ^refs/tags/v[0-9]+\.0\.0$ ]]; then
|
|
||||||
echo ::set-output name=should_release::true
|
|
||||||
fi
|
|
||||||
trigger:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: check_tag
|
|
||||||
if: jobs.check_tag.outputs.should_release == 'true'
|
|
||||||
steps:
|
|
||||||
- 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 }}"}}'
|
|
||||||
- name: Trigger New mksnapshot Release
|
|
||||||
run: |
|
|
||||||
gh api /repos/:owner/mksnapshot/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
|
|
||||||
6
.github/workflows/semantic.yml
vendored
6
.github/workflows/semantic.yml
vendored
@@ -7,14 +7,8 @@ on:
|
|||||||
- edited
|
- edited
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
permissions:
|
|
||||||
pull-requests: read # for amannn/action-semantic-pull-request to analyze PRs
|
|
||||||
statuses: write # for amannn/action-semantic-pull-request to mark status of analyzed PR
|
|
||||||
name: Validate PR Title
|
name: Validate PR Title
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -41,7 +41,7 @@ spec/.hash
|
|||||||
.eslintcache*
|
.eslintcache*
|
||||||
|
|
||||||
# Generated native addon files
|
# Generated native addon files
|
||||||
/spec/fixtures/native-addon/echo/build/
|
/spec-main/fixtures/native-addon/echo/build/
|
||||||
|
|
||||||
# If someone runs tsc this is where stuff will end up
|
# If someone runs tsc this is where stuff will end up
|
||||||
ts-gen
|
ts-gen
|
||||||
@@ -53,4 +53,4 @@ ts-gen
|
|||||||
# Used to accelerate builds after sync
|
# Used to accelerate builds after sync
|
||||||
patches/mtime-cache.json
|
patches/mtime-cache.json
|
||||||
|
|
||||||
spec/fixtures/logo.png
|
spec/fixtures/logo.png
|
||||||
1
.husky/.gitignore
vendored
Normal file
1
.husky/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
_
|
||||||
40
BUILD.gn
40
BUILD.gn
@@ -37,7 +37,7 @@ if (is_mac) {
|
|||||||
import("build/rules.gni")
|
import("build/rules.gni")
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
mac_deployment_target == "10.13",
|
mac_deployment_target == "10.11.0",
|
||||||
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
|
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,13 +79,6 @@ if (is_linux) {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# Generates electron_gtk_stubs.h header which contains
|
|
||||||
# stubs for extracting function ptrs from the gtk library.
|
|
||||||
# Function signatures for which stubs are required should be
|
|
||||||
# declared in electron_gtk.sigs, currently this file contains
|
|
||||||
# signatures for the functions used with native file chooser
|
|
||||||
# implementation. In future, this file can be extended to contain
|
|
||||||
# gtk4 stubs to switch gtk version in runtime.
|
|
||||||
generate_stubs("electron_gtk_stubs") {
|
generate_stubs("electron_gtk_stubs") {
|
||||||
sigs = [
|
sigs = [
|
||||||
"shell/browser/ui/electron_gdk_pixbuf.sigs",
|
"shell/browser/ui/electron_gdk_pixbuf.sigs",
|
||||||
@@ -135,7 +128,7 @@ config("electron_lib_config") {
|
|||||||
include_dirs = [ "." ]
|
include_dirs = [ "." ]
|
||||||
}
|
}
|
||||||
|
|
||||||
# We generate the definitions twice here, once in //electron/electron.d.ts
|
# We geneate the definitions twice here, once in //electron/electron.d.ts
|
||||||
# and once in $target_gen_dir
|
# and once in $target_gen_dir
|
||||||
# The one in $target_gen_dir is used for the actual TSC build later one
|
# The one in $target_gen_dir is used for the actual TSC build later one
|
||||||
# and the one in //electron/electron.d.ts is used by your IDE (vscode)
|
# and the one in //electron/electron.d.ts is used by your IDE (vscode)
|
||||||
@@ -233,7 +226,6 @@ action("electron_js2c") {
|
|||||||
action("generate_config_gypi") {
|
action("generate_config_gypi") {
|
||||||
outputs = [ "$root_gen_dir/config.gypi" ]
|
outputs = [ "$root_gen_dir/config.gypi" ]
|
||||||
script = "script/generate-config-gypi.py"
|
script = "script/generate-config-gypi.py"
|
||||||
inputs = [ "//third_party/electron_node/configure.py" ]
|
|
||||||
args = rebase_path(outputs) + [ target_cpu ]
|
args = rebase_path(outputs) + [ target_cpu ]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -370,7 +362,6 @@ source_set("electron_lib") {
|
|||||||
"shell/common/api:mojo",
|
"shell/common/api:mojo",
|
||||||
"//base:base_static",
|
"//base:base_static",
|
||||||
"//base/allocator:buildflags",
|
"//base/allocator:buildflags",
|
||||||
"//chrome:strings",
|
|
||||||
"//chrome/app:command_ids",
|
"//chrome/app:command_ids",
|
||||||
"//chrome/app/resources:platform_locale_settings",
|
"//chrome/app/resources:platform_locale_settings",
|
||||||
"//components/autofill/core/common:features",
|
"//components/autofill/core/common:features",
|
||||||
@@ -391,7 +382,6 @@ source_set("electron_lib") {
|
|||||||
"//components/user_prefs",
|
"//components/user_prefs",
|
||||||
"//components/viz/host",
|
"//components/viz/host",
|
||||||
"//components/viz/service",
|
"//components/viz/service",
|
||||||
"//components/webrtc",
|
|
||||||
"//content/public/browser",
|
"//content/public/browser",
|
||||||
"//content/public/child",
|
"//content/public/child",
|
||||||
"//content/public/gpu",
|
"//content/public/gpu",
|
||||||
@@ -567,8 +557,7 @@ source_set("electron_lib") {
|
|||||||
"//ui/base/ime/linux",
|
"//ui/base/ime/linux",
|
||||||
"//ui/events/devices/x11",
|
"//ui/events/devices/x11",
|
||||||
"//ui/events/platform/x11",
|
"//ui/events/platform/x11",
|
||||||
"//ui/linux:linux_ui",
|
"//ui/gtk",
|
||||||
"//ui/linux:linux_ui_factory",
|
|
||||||
"//ui/views/controls/webview",
|
"//ui/views/controls/webview",
|
||||||
"//ui/wm",
|
"//ui/wm",
|
||||||
]
|
]
|
||||||
@@ -674,6 +663,8 @@ source_set("electron_lib") {
|
|||||||
|
|
||||||
if (enable_basic_printing) {
|
if (enable_basic_printing) {
|
||||||
sources += [
|
sources += [
|
||||||
|
"shell/browser/printing/print_preview_message_handler.cc",
|
||||||
|
"shell/browser/printing/print_preview_message_handler.h",
|
||||||
"shell/browser/printing/print_view_manager_electron.cc",
|
"shell/browser/printing/print_view_manager_electron.cc",
|
||||||
"shell/browser/printing/print_view_manager_electron.h",
|
"shell/browser/printing/print_view_manager_electron.h",
|
||||||
"shell/renderer/printing/print_render_frame_helper_delegate.cc",
|
"shell/renderer/printing/print_render_frame_helper_delegate.cc",
|
||||||
@@ -731,6 +722,14 @@ source_set("electron_lib") {
|
|||||||
|
|
||||||
sources += get_target_outputs(":electron_fuses")
|
sources += get_target_outputs(":electron_fuses")
|
||||||
|
|
||||||
|
if (is_win && enable_win_dark_mode_window_ui) {
|
||||||
|
sources += [
|
||||||
|
"shell/browser/win/dark_mode.cc",
|
||||||
|
"shell/browser/win/dark_mode.h",
|
||||||
|
]
|
||||||
|
libs += [ "uxtheme.lib" ]
|
||||||
|
}
|
||||||
|
|
||||||
if (allow_runtime_configurable_key_storage) {
|
if (allow_runtime_configurable_key_storage) {
|
||||||
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
|
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
|
||||||
}
|
}
|
||||||
@@ -901,13 +900,6 @@ if (is_mac) {
|
|||||||
"@executable_path/../../../../../..",
|
"@executable_path/../../../../../..",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
# For component ffmpeg under non-component build, it is linked from
|
|
||||||
# @loader_path. However the ffmpeg.dylib is moved to a different place
|
|
||||||
# when generating app bundle, and we should change to link from @rpath.
|
|
||||||
if (is_component_ffmpeg && !is_component_build) {
|
|
||||||
ldflags += [ "-Wcrl,installnametool,-change,@loader_path/libffmpeg.dylib,@rpath/libffmpeg.dylib" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
template("electron_helper_app") {
|
template("electron_helper_app") {
|
||||||
@@ -915,10 +907,7 @@ if (is_mac) {
|
|||||||
assert(defined(invoker.helper_name_suffix))
|
assert(defined(invoker.helper_name_suffix))
|
||||||
|
|
||||||
output_name = electron_helper_name + invoker.helper_name_suffix
|
output_name = electron_helper_name + invoker.helper_name_suffix
|
||||||
deps = [
|
deps = [ ":electron_framework+link" ]
|
||||||
":electron_framework+link",
|
|
||||||
"//base/allocator:early_zone_registration_mac",
|
|
||||||
]
|
|
||||||
if (!is_mas_build) {
|
if (!is_mas_build) {
|
||||||
deps += [ "//sandbox/mac:seatbelt" ]
|
deps += [ "//sandbox/mac:seatbelt" ]
|
||||||
}
|
}
|
||||||
@@ -1078,7 +1067,6 @@ if (is_mac) {
|
|||||||
":electron_app_plist",
|
":electron_app_plist",
|
||||||
":electron_app_resources",
|
":electron_app_resources",
|
||||||
":electron_fuses",
|
":electron_fuses",
|
||||||
"//base/allocator:early_zone_registration_mac",
|
|
||||||
"//electron/buildflags",
|
"//electron/buildflags",
|
||||||
]
|
]
|
||||||
if (is_mas_build) {
|
if (is_mas_build) {
|
||||||
|
|||||||
9
DEPS
9
DEPS
@@ -2,11 +2,14 @@ gclient_gn_args_from = 'src'
|
|||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
'chromium_version':
|
'chromium_version':
|
||||||
'107.0.5286.0',
|
'102.0.5005.167',
|
||||||
'node_version':
|
'node_version':
|
||||||
'v16.17.0',
|
'v16.14.2',
|
||||||
'nan_version':
|
'nan_version':
|
||||||
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
|
# The following commit hash of NAN is v2.14.2 with *only* changes to the
|
||||||
|
# test suite. This should be updated to a specific tag when one becomes
|
||||||
|
# available.
|
||||||
|
'65b32af46e9d7fab2e4ff657751205b3865f4920',
|
||||||
'squirrel.mac_version':
|
'squirrel.mac_version':
|
||||||
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
|
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
22.0.0-nightly.20220913
|
19.1.0
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
[](https://circleci.com/gh/electron/electron/tree/main)
|
[](https://circleci.com/gh/electron/electron/tree/main)
|
||||||
[](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
|
[](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
|
||||||
[](https://discord.gg/electronjs)
|
[](https://discord.com/invite/APGC3k5yaH)
|
||||||
|
|
||||||
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
|
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
|
||||||
View these docs in other languages on our [Crowdin](https://crowdin.com/project/electron) project.
|
View these docs in other languages at [electron/i18n](https://github.com/electron/i18n/tree/master/content/).
|
||||||
|
|
||||||
The Electron framework lets you write cross-platform desktop applications
|
The Electron framework lets you write cross-platform desktop applications
|
||||||
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
|
using JavaScript, HTML and CSS. It is based on [Node.js](https://nodejs.org/) and
|
||||||
|
|||||||
466
appveyor.yml
466
appveyor.yml
@@ -3,7 +3,7 @@
|
|||||||
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
|
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
|
||||||
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
|
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
|
||||||
# https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu
|
# https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu
|
||||||
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly
|
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordningly
|
||||||
# if you pass a custom value for 'target_cpu'.
|
# if you pass a custom value for 'target_cpu'.
|
||||||
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
|
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
|
||||||
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
|
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
||||||
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
||||||
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
||||||
# Otherwise the release will be uploaded to the GitHub Releases.
|
# Otherwise the release will be uploaded to the Github Releases.
|
||||||
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
||||||
#
|
#
|
||||||
# The publishing scripts expect access tokens to be defined as env vars,
|
# The publishing scripts expect access tokens to be defined as env vars,
|
||||||
@@ -23,6 +23,10 @@
|
|||||||
# https://www.appveyor.com/docs/build-configuration/#secure-variables
|
# https://www.appveyor.com/docs/build-configuration/#secure-variables
|
||||||
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
|
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
|
||||||
|
|
||||||
|
# Uncomment these lines to enable RDP
|
||||||
|
#on_finish:
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
|
||||||
version: 1.0.{build}
|
version: 1.0.{build}
|
||||||
build_cloud: electron-16-core
|
build_cloud: electron-16-core
|
||||||
image: vs2019bt-16.16.11
|
image: vs2019bt-16.16.11
|
||||||
@@ -34,281 +38,211 @@ environment:
|
|||||||
MOCHA_REPORTER: mocha-multi-reporters
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
|
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
|
||||||
GOMA_FALLBACK_ON_AUTH_FAILURE: true
|
GOMA_FALLBACK_ON_AUTH_FAILURE: true
|
||||||
|
build_script:
|
||||||
matrix:
|
- ps: >-
|
||||||
|
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
|
||||||
- job_name: Build
|
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
|
||||||
|
} else {
|
||||||
- job_name: Test
|
|
||||||
job_depends_on: Build
|
|
||||||
|
|
||||||
clone_folder: C:\projects\src\electron
|
|
||||||
|
|
||||||
# the first failed job cancels other jobs and fails entire build
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
|
|
||||||
for:
|
|
||||||
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- job_name: Build
|
|
||||||
|
|
||||||
init:
|
|
||||||
- ps: >-
|
|
||||||
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
|
|
||||||
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
|
|
||||||
}
|
|
||||||
|
|
||||||
build_script:
|
|
||||||
- ps: |
|
|
||||||
node script/yarn.js install --frozen-lockfile
|
node script/yarn.js install --frozen-lockfile
|
||||||
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
$result = node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
|
||||||
Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild
|
Write-Output $result
|
||||||
|
if ($result.ExitCode -eq 0) {
|
||||||
|
Write-warning "Skipping build for doc only change"; Exit-AppveyorBuild
|
||||||
}
|
}
|
||||||
$global:LASTEXITCODE = 0
|
}
|
||||||
- cd ..
|
- echo "Building $env:GN_CONFIG build"
|
||||||
- ps: Write-Host "Building $env:GN_CONFIG build"
|
- git config --global core.longpaths true
|
||||||
- git config --global core.longpaths true
|
- cd ..
|
||||||
- update_depot_tools.bat
|
- mkdir src
|
||||||
- ps: >-
|
- update_depot_tools.bat
|
||||||
if (Test-Path 'env:RAW_GOMA_AUTH') {
|
- ps: Move-Item $env:APPVEYOR_BUILD_FOLDER -Destination src\electron
|
||||||
$env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
|
- ps: >-
|
||||||
$env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
|
if (Test-Path 'env:RAW_GOMA_AUTH') {
|
||||||
}
|
$env:GOMA_OAUTH2_CONFIG_FILE = "$pwd\.goma_oauth2_config"
|
||||||
- git clone https://github.com/electron/build-tools.git
|
$env:RAW_GOMA_AUTH | Set-Content $env:GOMA_OAUTH2_CONFIG_FILE
|
||||||
- cd build-tools
|
}
|
||||||
- npm install
|
- git clone https://github.com/electron/build-tools.git
|
||||||
- mkdir third_party
|
- cd build-tools
|
||||||
- ps: >-
|
- npm install
|
||||||
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
|
- mkdir third_party
|
||||||
- ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
|
- ps: >-
|
||||||
- ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
|
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
|
||||||
- cd ..\..
|
- ps: $env:GN_GOMA_FILE = node -e "console.log(require('./src/utils/goma.js').gnFilePath)"
|
||||||
- ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
|
- ps: $env:LOCAL_GOMA_DIR = node -e "console.log(require('./src/utils/goma.js').dir)"
|
||||||
- ps: >-
|
- cd ..
|
||||||
if (Test-Path 'env:RAW_GOMA_AUTH') {
|
- ps: .\src\electron\script\start-goma.ps1 -gomaDir $env:LOCAL_GOMA_DIR
|
||||||
$goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info
|
- ps: >-
|
||||||
if ($goma_login -eq 'Login as Fermi Planck') {
|
if (Test-Path 'env:RAW_GOMA_AUTH') {
|
||||||
Write-warning "Goma authentication is correct";
|
$goma_login = python $env:LOCAL_GOMA_DIR\goma_auth.py info
|
||||||
} else {
|
if ($goma_login -eq 'Login as Fermi Planck') {
|
||||||
Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token.";
|
Write-warning "Goma authentication is correct";
|
||||||
$host.SetShouldExit(1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
|
|
||||||
- ps: >-
|
|
||||||
if ($env:GN_CONFIG -ne 'release') {
|
|
||||||
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
|
|
||||||
}
|
|
||||||
- >-
|
|
||||||
gclient config
|
|
||||||
--name "src\electron"
|
|
||||||
--unmanaged
|
|
||||||
%GCLIENT_EXTRA_ARGS%
|
|
||||||
"https://github.com/electron/electron"
|
|
||||||
- ps: >-
|
|
||||||
if ($env:GN_CONFIG -eq 'release') {
|
|
||||||
$env:RUN_GCLIENT_SYNC="true"
|
|
||||||
} else {
|
} else {
|
||||||
cd src\electron
|
Write-warning "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token.";
|
||||||
node script\generate-deps-hash.js
|
$host.SetShouldExit(1)
|
||||||
$depshash = Get-Content .\.depshash -Raw
|
}
|
||||||
$zipfile = "Z:\$depshash.7z"
|
}
|
||||||
cd ..\..
|
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
|
||||||
if (Test-Path -Path $zipfile) {
|
- ps: >-
|
||||||
# file exists, unzip and then gclient sync
|
if ($env:GN_CONFIG -ne 'release') {
|
||||||
7z x -y $zipfile -mmt=14 -aoa
|
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
|
||||||
if (-not (Test-Path -Path "src\buildtools")) {
|
}
|
||||||
# the zip file must be corrupt - resync
|
- >-
|
||||||
$env:RUN_GCLIENT_SYNC="true"
|
gclient config
|
||||||
if ($env:TARGET_ARCH -ne 'ia32') {
|
--name "src\electron"
|
||||||
# only save on x64/woa to avoid contention saving
|
--unmanaged
|
||||||
$env:SAVE_GCLIENT_SRC="true"
|
%GCLIENT_EXTRA_ARGS%
|
||||||
}
|
"https://github.com/electron/electron"
|
||||||
} else {
|
- ps: >-
|
||||||
# update angle
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
cd src\third_party\angle
|
$env:RUN_GCLIENT_SYNC="true"
|
||||||
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
} else {
|
||||||
git fetch
|
cd src\electron
|
||||||
cd ..\..\..
|
node script\generate-deps-hash.js
|
||||||
}
|
$depshash = Get-Content .\.depshash -Raw
|
||||||
} else {
|
$zipfile = "Z:\$depshash.7z"
|
||||||
# file does not exist, gclient sync, then zip
|
cd ..\..
|
||||||
|
if (Test-Path -Path $zipfile) {
|
||||||
|
# file exists, unzip and then gclient sync
|
||||||
|
7z x -y $zipfile -mmt=30 -aoa
|
||||||
|
if (-not (Test-Path -Path "src\buildtools")) {
|
||||||
|
# the zip file must be corrupt - resync
|
||||||
$env:RUN_GCLIENT_SYNC="true"
|
$env:RUN_GCLIENT_SYNC="true"
|
||||||
if ($env:TARGET_ARCH -ne 'ia32') {
|
if ($env:TARGET_ARCH -ne 'ia32') {
|
||||||
# only save on x64/woa to avoid contention saving
|
# only save on x64/woa to avoid contention saving
|
||||||
$env:SAVE_GCLIENT_SRC="true"
|
$env:SAVE_GCLIENT_SRC="true"
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
# update angle
|
||||||
|
cd src\third_party\angle
|
||||||
|
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
||||||
|
git fetch
|
||||||
|
cd ..\..\..
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
# file does not exist, gclient sync, then zip
|
||||||
|
$env:RUN_GCLIENT_SYNC="true"
|
||||||
|
if ($env:TARGET_ARCH -ne 'ia32') {
|
||||||
|
# only save on x64/woa to avoid contention saving
|
||||||
|
$env:SAVE_GCLIENT_SRC="true"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync )
|
}
|
||||||
- ps: >-
|
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync )
|
||||||
if ($env:SAVE_GCLIENT_SRC -eq 'true') {
|
- ps: >-
|
||||||
# archive current source for future use
|
if ($env:SAVE_GCLIENT_SRC -eq 'true') {
|
||||||
# only run on x64/woa to avoid contention saving
|
# archive current source for future use
|
||||||
$(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30)
|
# only run on x64/woa to avoid contention saving
|
||||||
if ($LASTEXITCODE -ne 0) {
|
$(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30)
|
||||||
Write-warning "Could not save source to shared drive; continuing anyway"
|
if ($LASTEXITCODE -ne 0) {
|
||||||
}
|
Write-warning "Could not save source to shared drive; continuing anyway"
|
||||||
# build time generation of file gen/angle/angle_commit.h depends on
|
|
||||||
# third_party/angle/.git
|
|
||||||
# https://chromium-review.googlesource.com/c/angle/angle/+/2074924
|
|
||||||
$(7z a $zipfile src\third_party\angle\.git)
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-warning "Failed to add third_party\angle\.git; continuing anyway"
|
|
||||||
}
|
|
||||||
# build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD
|
|
||||||
# https://dawn-review.googlesource.com/c/dawn/+/83901
|
|
||||||
$(7z a $zipfile src\third_party\dawn\.git)
|
|
||||||
if ($LASTEXITCODE -ne 0) {
|
|
||||||
Write-warning "Failed to add third_party\dawn\.git; continuing anyway"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
- cd src
|
# build time generation of file gen/angle/angle_commit.h depends on
|
||||||
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
# third_party/angle/.git
|
||||||
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
|
# https://chromium-review.googlesource.com/c/angle/angle/+/2074924
|
||||||
- gn check out/Default //electron:electron_lib
|
$(7z a $zipfile src\third_party\angle\.git)
|
||||||
- gn check out/Default //electron:electron_app
|
if ($LASTEXITCODE -ne 0) {
|
||||||
- gn check out/Default //electron/shell/common/api:mojo
|
Write-warning "Failed to add third_party\angle\.git; continuing anyway"
|
||||||
- if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app)
|
|
||||||
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
|
||||||
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
|
|
||||||
- ninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
|
||||||
- ninja -C out/Default electron:electron_dist_zip
|
|
||||||
- ninja -C out/Default shell_browser_ui_unittests
|
|
||||||
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
|
||||||
- ninja -C out/Default electron:electron_mksnapshot_zip
|
|
||||||
- cd out\Default
|
|
||||||
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
|
|
||||||
- cd ..\..
|
|
||||||
- ninja -C out/Default electron:hunspell_dictionaries_zip
|
|
||||||
- ninja -C out/Default electron:electron_chromedriver_zip
|
|
||||||
- ninja -C out/Default third_party/electron_node:headers
|
|
||||||
- python %LOCAL_GOMA_DIR%\goma_ctl.py stat
|
|
||||||
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
|
||||||
- 7z a node_headers.zip out\Default\gen\node_headers
|
|
||||||
- 7z a builtins-pgo.zip v8\tools\builtins-pgo
|
|
||||||
- ps: >-
|
|
||||||
if ($env:GN_CONFIG -eq 'release') {
|
|
||||||
# Needed for msdia140.dll on 64-bit windows
|
|
||||||
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
|
|
||||||
ninja -C out/Default electron:electron_symbols
|
|
||||||
}
|
}
|
||||||
- ps: >-
|
# build time generation of file dawn/common/Version_autogen.h depends on third_party/dawn/.git/HEAD
|
||||||
if ($env:GN_CONFIG -eq 'release') {
|
# https://dawn-review.googlesource.com/c/dawn/+/83901
|
||||||
python electron\script\zip-symbols.py
|
$(7z a $zipfile src\third_party\dawn\.git)
|
||||||
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
Write-warning "Failed to add third_party\dawn\.git; continuing anyway"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- cd src
|
||||||
|
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
||||||
|
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
|
||||||
|
- gn check out/Default //electron:electron_lib
|
||||||
|
- gn check out/Default //electron:electron_app
|
||||||
|
- gn check out/Default //electron/shell/common/api:mojo
|
||||||
|
- if DEFINED GN_GOMA_FILE (ninja -j 300 -C out/Default electron:electron_app) else (ninja -C out/Default electron:electron_app)
|
||||||
|
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
||||||
|
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") %GN_EXTRA_ARGS%"
|
||||||
|
- ninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
||||||
|
- ninja -C out/Default electron:electron_dist_zip
|
||||||
|
- ninja -C out/Default shell_browser_ui_unittests
|
||||||
|
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
||||||
|
- ninja -C out/Default electron:electron_mksnapshot_zip
|
||||||
|
- cd out\Default
|
||||||
|
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
|
||||||
|
- cd ..\..
|
||||||
|
- ninja -C out/Default electron:hunspell_dictionaries_zip
|
||||||
|
- ninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
- ninja -C out/Default third_party/electron_node:headers
|
||||||
|
- python %LOCAL_GOMA_DIR%\goma_ctl.py stat
|
||||||
|
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
||||||
|
- 7z a node_headers.zip out\Default\gen\node_headers
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
# Needed for msdia140.dll on 64-bit windows
|
||||||
|
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
|
||||||
|
ninja -C out/Default electron:electron_symbols
|
||||||
|
}
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
python electron\script\zip-symbols.py
|
||||||
|
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
||||||
|
} else {
|
||||||
|
# It's useful to have pdb files when debugging testing builds that are
|
||||||
|
# built on CI.
|
||||||
|
7z a pdb.zip out\Default\*.pdb
|
||||||
|
}
|
||||||
|
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
|
||||||
|
test_script:
|
||||||
|
# Workaround for https://github.com/appveyor/ci/issues/2420
|
||||||
|
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
|
||||||
|
- ps: >-
|
||||||
|
if ((-Not (Test-Path Env:\TEST_WOA)) -And (-Not (Test-Path Env:\ELECTRON_RELEASE)) -And ($env:GN_CONFIG -in "testing", "release")) {
|
||||||
|
$env:RUN_TESTS="true"
|
||||||
|
}
|
||||||
|
- ps: >-
|
||||||
|
if ($env:RUN_TESTS -eq 'true') {
|
||||||
|
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
||||||
|
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
||||||
|
} else {
|
||||||
|
echo "Skipping tests for $env:GN_CONFIG build"
|
||||||
|
}
|
||||||
|
- cd electron
|
||||||
|
# CalculateNativeWinOcclusion is disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=1139022
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion )
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeperately --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion )
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log --disable-features=CalculateNativeWinOcclusion )
|
||||||
|
- cd ..
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg )
|
||||||
|
- echo "About to verify mksnapshot"
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd% )
|
||||||
|
- echo "Done verifying mksnapshot"
|
||||||
|
- if "%RUN_TESTS%"=="true" ( echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% )
|
||||||
|
- echo "Done verifying chromedriver"
|
||||||
|
deploy_script:
|
||||||
|
- cd electron
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||||
|
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
||||||
|
Write-Output "Uploading Electron release distribution to azure"
|
||||||
|
& python script\release\uploaders\upload.py --verbose --upload_to_storage
|
||||||
} else {
|
} else {
|
||||||
# It's useful to have pdb files when debugging testing builds that are
|
Write-Output "Uploading Electron release distribution to github releases"
|
||||||
# built on CI.
|
& python script\release\uploaders\upload.py --verbose
|
||||||
7z a pdb.zip out\Default\*.pdb
|
|
||||||
}
|
}
|
||||||
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
|
} elseif (Test-Path Env:\TEST_WOA) {
|
||||||
|
node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH
|
||||||
deploy_script:
|
}
|
||||||
- cd electron
|
on_finish:
|
||||||
- ps: >-
|
- cd ..
|
||||||
if (Test-Path Env:\ELECTRON_RELEASE) {
|
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||||
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||||
Write-Output "Uploading Electron release distribution to azure"
|
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
|
||||||
& python script\release\uploaders\upload.py --verbose --upload_to_storage
|
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||||
} else {
|
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||||
Write-Output "Uploading Electron release distribution to github releases"
|
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||||
& python script\release\uploaders\upload.py --verbose
|
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||||
}
|
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||||
} elseif (Test-Path Env:\TEST_WOA) {
|
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||||
node script/release/ci-release-build.js --job=electron-woa-testing --ci=GHA --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH
|
- ps: >-
|
||||||
}
|
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||||
on_finish:
|
appveyor-retry appveyor PushArtifact pdb.zip
|
||||||
# Uncomment this lines to enable RDP
|
}
|
||||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
- if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )
|
||||||
- cd C:\projects\src
|
|
||||||
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
|
||||||
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
|
||||||
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
|
|
||||||
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
|
||||||
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
|
||||||
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
|
||||||
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
|
||||||
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
|
||||||
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
|
||||||
- if exist builtins-pgo.zip (appveyor-retry appveyor PushArtifact builtins-pgo.zip)
|
|
||||||
- ps: >-
|
|
||||||
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
|
||||||
appveyor-retry appveyor PushArtifact pdb.zip
|
|
||||||
}
|
|
||||||
|
|
||||||
-
|
|
||||||
matrix:
|
|
||||||
only:
|
|
||||||
- job_name: Test
|
|
||||||
|
|
||||||
init:
|
|
||||||
- ps: |
|
|
||||||
if ($env:RUN_TESTS -ne 'true') {
|
|
||||||
Write-warning "Skipping tests for $env:APPVEYOR_PROJECT_NAME"; Exit-AppveyorBuild
|
|
||||||
}
|
|
||||||
if(($env:APPVEYOR_PULL_REQUEST_HEAD_REPO_NAME -split "/")[0] -eq ($env:APPVEYOR_REPO_NAME -split "/")[0]) {
|
|
||||||
Write-warning "Skipping PR build for branch"; Exit-AppveyorBuild
|
|
||||||
}
|
|
||||||
build_script:
|
|
||||||
- ps: |
|
|
||||||
node script/yarn.js install --frozen-lockfile
|
|
||||||
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER --prBranch=$env:APPVEYOR_REPO_BRANCH
|
|
||||||
if ($LASTEXITCODE -eq 0) {
|
|
||||||
Write-warning "Skipping tests for doc only change"; Exit-AppveyorBuild
|
|
||||||
}
|
|
||||||
$global:LASTEXITCODE = 0
|
|
||||||
- ps: |
|
|
||||||
cd ..
|
|
||||||
mkdir out\Default
|
|
||||||
cd ..
|
|
||||||
# Download build artifacts
|
|
||||||
$apiUrl = 'https://ci.appveyor.com/api'
|
|
||||||
$build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
|
|
||||||
$artifacts_to_download = @('dist.zip','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','builtins-pgo.zip')
|
|
||||||
foreach ($job in $build_info.build.jobs) {
|
|
||||||
if ($job.name -eq "Build") {
|
|
||||||
$jobId = $job.jobId
|
|
||||||
foreach($artifact_name in $artifacts_to_download) {
|
|
||||||
if ($artifact_name -eq 'shell_browser_ui_unittests.exe' -Or $artifact_name -eq 'electron.lib') {
|
|
||||||
$outfile = "src\out\Default\$artifact_name"
|
|
||||||
} else {
|
|
||||||
$outfile = $artifact_name
|
|
||||||
}
|
|
||||||
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
- ps: |
|
|
||||||
$out_default_zips = @('dist.zip','chromedriver.zip','mksnapshot.zip')
|
|
||||||
foreach($zip_name in $out_default_zips) {
|
|
||||||
7z x -y -osrc\out\Default $zip_name
|
|
||||||
}
|
|
||||||
- ps: 7z x -y -osrc\out\ffmpeg ffmpeg.zip
|
|
||||||
- ps: 7z x -y -osrc node_headers.zip
|
|
||||||
- ps: 7z x -y -osrc builtins-pgo.zip
|
|
||||||
|
|
||||||
test_script:
|
|
||||||
# Workaround for https://github.com/appveyor/ci/issues/2420
|
|
||||||
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
|
|
||||||
- ps: |
|
|
||||||
cd src
|
|
||||||
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
|
||||||
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
|
||||||
- cd electron
|
|
||||||
- echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log
|
|
||||||
- echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log
|
|
||||||
- cd ..
|
|
||||||
- echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
|
|
||||||
- echo "About to verify mksnapshot"
|
|
||||||
- echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd%
|
|
||||||
- echo "Done verifying mksnapshot"
|
|
||||||
- echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd%
|
|
||||||
- echo "Done verifying chromedriver"
|
|
||||||
|
|
||||||
on_finish:
|
|
||||||
- if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
|||||||
root_extra_deps = [ "//electron" ]
|
root_extra_deps = [ "//electron" ]
|
||||||
|
|
||||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
|
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
|
||||||
node_module_version = 109
|
node_module_version = 106
|
||||||
|
|
||||||
v8_promise_internal_field_count = 1
|
v8_promise_internal_field_count = 1
|
||||||
v8_embedder_string = "-electron.0"
|
v8_embedder_string = "-electron.0"
|
||||||
@@ -32,16 +32,9 @@ dawn_enable_vulkan_validation_layers = false
|
|||||||
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
|
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
|
||||||
enable_pseudolocales = false
|
enable_pseudolocales = false
|
||||||
|
|
||||||
|
is_cfi = false
|
||||||
|
|
||||||
# Make application name configurable at runtime for cookie crypto
|
# Make application name configurable at runtime for cookie crypto
|
||||||
allow_runtime_configurable_key_storage = true
|
allow_runtime_configurable_key_storage = true
|
||||||
|
|
||||||
# CET shadow stack is incompatible with v8, until v8 is CET compliant
|
|
||||||
# enabling this flag causes main process crashes where CET is enabled
|
|
||||||
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=357
|
|
||||||
enable_cet_shadow_stack = false
|
enable_cet_shadow_stack = false
|
||||||
|
|
||||||
# For similar reasons, disable CFI, which is not well supported in V8.
|
|
||||||
# Chromium doesn't have any problems with this because they do not run
|
|
||||||
# V8 in the browser process.
|
|
||||||
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281
|
|
||||||
is_cfi = false
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
root_extra_deps = [ "//electron/spec-chromium:spec" ]
|
root_extra_deps = [ "//electron/spec" ]
|
||||||
|
|
||||||
dcheck_always_on = true
|
dcheck_always_on = true
|
||||||
is_debug = false
|
is_debug = false
|
||||||
|
|||||||
@@ -1,22 +1,33 @@
|
|||||||
template("node_action") {
|
import("node.gni")
|
||||||
assert(defined(invoker.script), "Need script path to run")
|
|
||||||
assert(defined(invoker.args), "Need script arguments")
|
|
||||||
|
|
||||||
|
# TODO(MarshallOfSound): Move to electron/node, this is the only place it is used now
|
||||||
|
# Run an action with a given working directory. Behaves identically to the
|
||||||
|
# action() target type, with the exception that it changes directory before
|
||||||
|
# running the script.
|
||||||
|
#
|
||||||
|
# Parameters:
|
||||||
|
# cwd [required]: Directory to change to before running the script.
|
||||||
|
template("chdir_action") {
|
||||||
action(target_name) {
|
action(target_name) {
|
||||||
forward_variables_from(invoker,
|
forward_variables_from(invoker,
|
||||||
|
"*",
|
||||||
[
|
[
|
||||||
"deps",
|
"script",
|
||||||
"public_deps",
|
"args",
|
||||||
"sources",
|
|
||||||
"inputs",
|
|
||||||
"outputs",
|
|
||||||
])
|
])
|
||||||
if (!defined(inputs)) {
|
assert(defined(cwd), "Need cwd in $target_name")
|
||||||
inputs = []
|
script = "//electron/build/run-in-dir.py"
|
||||||
|
if (defined(sources)) {
|
||||||
|
sources += [ invoker.script ]
|
||||||
|
} else {
|
||||||
|
assert(defined(inputs))
|
||||||
|
inputs += [ invoker.script ]
|
||||||
}
|
}
|
||||||
inputs += [ invoker.script ]
|
args = [
|
||||||
script = "//electron/build/run-node.py"
|
rebase_path(cwd),
|
||||||
args = [ rebase_path(invoker.script) ] + invoker.args
|
rebase_path(invoker.script),
|
||||||
|
]
|
||||||
|
args += invoker.args
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,23 @@
|
|||||||
|
config("build_time_executable") {
|
||||||
|
configs = []
|
||||||
|
|
||||||
|
if (is_electron_build && !is_component_build) {
|
||||||
|
# The executables which have this config applied are dependent on ffmpeg,
|
||||||
|
# which is always a shared library in an Electron build. However, in the
|
||||||
|
# non-component build, executables don't have rpath set to search for
|
||||||
|
# libraries in the executable's directory, so ffmpeg cannot be found. So
|
||||||
|
# let's make sure rpath is set here.
|
||||||
|
# See '//build/config/gcc/BUILD.gn' for details on the rpath setting.
|
||||||
|
if (is_linux) {
|
||||||
|
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_mac) {
|
||||||
|
ldflags = [ "-Wl,-rpath,@loader_path/." ]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# For MAS build, we force defining "MAS_BUILD".
|
# For MAS build, we force defining "MAS_BUILD".
|
||||||
config("mas_build") {
|
config("mas_build") {
|
||||||
if (is_mas_build) {
|
if (is_mas_build) {
|
||||||
|
|||||||
@@ -19,13 +19,17 @@ TEMPLATE_H = """
|
|||||||
#define FUSE_EXPORT __attribute__((visibility("default")))
|
#define FUSE_EXPORT __attribute__((visibility("default")))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
namespace electron::fuses {
|
namespace electron {
|
||||||
|
|
||||||
|
namespace fuses {
|
||||||
|
|
||||||
extern const volatile char kFuseWire[];
|
extern const volatile char kFuseWire[];
|
||||||
|
|
||||||
{getters}
|
{getters}
|
||||||
|
|
||||||
} // namespace electron::fuses
|
} // namespace fuses
|
||||||
|
|
||||||
|
} // namespace electron
|
||||||
|
|
||||||
#endif // ELECTRON_FUSES_H_
|
#endif // ELECTRON_FUSES_H_
|
||||||
"""
|
"""
|
||||||
@@ -33,13 +37,17 @@ extern const volatile char kFuseWire[];
|
|||||||
TEMPLATE_CC = """
|
TEMPLATE_CC = """
|
||||||
#include "electron/fuses.h"
|
#include "electron/fuses.h"
|
||||||
|
|
||||||
namespace electron::fuses {
|
namespace electron {
|
||||||
|
|
||||||
|
namespace fuses {
|
||||||
|
|
||||||
const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version */ {fuse_version}, /* fuse_wire_length */ {fuse_wire_length}, /* fuse_wire */ {initial_config}};
|
const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version */ {fuse_version}, /* fuse_wire_length */ {fuse_wire_length}, /* fuse_wire */ {initial_config}};
|
||||||
|
|
||||||
{getters}
|
{getters}
|
||||||
|
|
||||||
} // namespace electron:fuses
|
}
|
||||||
|
|
||||||
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
|
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
|
||||||
|
|||||||
@@ -8,7 +8,9 @@ TEMPLATE = """
|
|||||||
#include "node_native_module.h"
|
#include "node_native_module.h"
|
||||||
#include "node_internals.h"
|
#include "node_internals.h"
|
||||||
|
|
||||||
namespace node::native_module {{
|
namespace node {{
|
||||||
|
|
||||||
|
namespace native_module {{
|
||||||
|
|
||||||
{definitions}
|
{definitions}
|
||||||
|
|
||||||
@@ -16,7 +18,9 @@ void NativeModuleLoader::LoadEmbedderJavaScriptSource() {{
|
|||||||
{initializers}
|
{initializers}
|
||||||
}}
|
}}
|
||||||
|
|
||||||
}} // namespace node::native_module
|
}} // namespace native_module
|
||||||
|
|
||||||
|
}} // namespace node
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# Cocoa .app bundle. The presence of these empty directories is sufficient to
|
# Cocoa .app bundle. The presence of these empty directories is sufficient to
|
||||||
# convince Cocoa that the application supports the named localization, even if
|
# convince Cocoa that the application supports the named localization, even if
|
||||||
# an InfoPlist.strings file is not provided. Chrome uses these empty locale
|
# an InfoPlist.strings file is not provided. Chrome uses these empty locale
|
||||||
# directories for its helper executable bundles, which do not otherwise
|
# directoires for its helper executable bundles, which do not otherwise
|
||||||
# require any direct Cocoa locale support.
|
# require any direct Cocoa locale support.
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|||||||
21
build/node.gni
Normal file
21
build/node.gni
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
template("node_action") {
|
||||||
|
assert(defined(invoker.script), "Need script path to run")
|
||||||
|
assert(defined(invoker.args), "Need script argumets")
|
||||||
|
|
||||||
|
action(target_name) {
|
||||||
|
forward_variables_from(invoker,
|
||||||
|
[
|
||||||
|
"deps",
|
||||||
|
"public_deps",
|
||||||
|
"sources",
|
||||||
|
"inputs",
|
||||||
|
"outputs",
|
||||||
|
])
|
||||||
|
if (!defined(inputs)) {
|
||||||
|
inputs = []
|
||||||
|
}
|
||||||
|
inputs += [ invoker.script ]
|
||||||
|
script = "//electron/build/run-node.py"
|
||||||
|
args = [ rebase_path(invoker.script) ] + invoker.args
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
template("npm_action") {
|
template("npm_action") {
|
||||||
assert(defined(invoker.script),
|
assert(defined(invoker.script),
|
||||||
"Need script name to run (must be defined in package.json)")
|
"Need script name to run (must be defined in package.json)")
|
||||||
assert(defined(invoker.args), "Need script arguments")
|
assert(defined(invoker.args), "Need script argumets")
|
||||||
|
|
||||||
action("npm_pre_flight_" + target_name) {
|
action("npm_pre_flight_" + target_name) {
|
||||||
inputs = [
|
inputs = [
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ template("compile_ib_files") {
|
|||||||
# Template to compile and package Mac XIB files as bundle data.
|
# Template to compile and package Mac XIB files as bundle data.
|
||||||
# Arguments
|
# Arguments
|
||||||
# sources:
|
# sources:
|
||||||
# list of string, sources to compile
|
# list of string, sources to comiple
|
||||||
# output_path:
|
# output_path:
|
||||||
# (optional) string, the path to use for the outputs list in the
|
# (optional) string, the path to use for the outputs list in the
|
||||||
# bundle_data step. If unspecified, defaults to bundle_resources_dir.
|
# bundle_data step. If unspecified, defaults to bundle_resources_dir.
|
||||||
|
|||||||
@@ -75,17 +75,9 @@ module.exports = ({
|
|||||||
|
|
||||||
if (targetDeletesNodeGlobals) {
|
if (targetDeletesNodeGlobals) {
|
||||||
plugins.push(new webpack.ProvidePlugin({
|
plugins.push(new webpack.ProvidePlugin({
|
||||||
Buffer: ['@electron/internal/common/webpack-provider', 'Buffer'],
|
process: ['@electron/internal/common/webpack-provider', 'process'],
|
||||||
global: ['@electron/internal/common/webpack-provider', '_global'],
|
global: ['@electron/internal/common/webpack-provider', '_global'],
|
||||||
process: ['@electron/internal/common/webpack-provider', 'process']
|
Buffer: ['@electron/internal/common/webpack-provider', 'Buffer']
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Webpack 5 no longer polyfills process or Buffer.
|
|
||||||
if (!alwaysHasNode) {
|
|
||||||
plugins.push(new webpack.ProvidePlugin({
|
|
||||||
Buffer: ['buffer', 'Buffer'],
|
|
||||||
process: 'process/browser'
|
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -137,12 +129,7 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
|
|||||||
// Force timers to resolve to our dependency that doesn't use window.postMessage
|
// Force timers to resolve to our dependency that doesn't use window.postMessage
|
||||||
timers: path.resolve(electronRoot, 'node_modules', 'timers-browserify', 'main.js')
|
timers: path.resolve(electronRoot, 'node_modules', 'timers-browserify', 'main.js')
|
||||||
},
|
},
|
||||||
extensions: ['.ts', '.js'],
|
extensions: ['.ts', '.js']
|
||||||
fallback: {
|
|
||||||
// We provide our own "timers" import above, any usage of setImmediate inside
|
|
||||||
// one of our renderer bundles should import it from the 'timers' package
|
|
||||||
setImmediate: false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
module: {
|
module: {
|
||||||
rules: [{
|
rules: [{
|
||||||
@@ -163,7 +150,10 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
|
|||||||
},
|
},
|
||||||
node: {
|
node: {
|
||||||
__dirname: false,
|
__dirname: false,
|
||||||
__filename: false
|
__filename: false,
|
||||||
|
// We provide our own "timers" import above, any usage of setImmediate inside
|
||||||
|
// one of our renderer bundles should import it from the 'timers' package
|
||||||
|
setImmediate: false
|
||||||
},
|
},
|
||||||
optimization: {
|
optimization: {
|
||||||
minimize: env.mode === 'production',
|
minimize: env.mode === 'production',
|
||||||
|
|||||||
@@ -30,14 +30,11 @@ template("webpack_build") {
|
|||||||
args = [
|
args = [
|
||||||
"--config",
|
"--config",
|
||||||
rebase_path(invoker.config_file),
|
rebase_path(invoker.config_file),
|
||||||
"--output-filename",
|
"--output-filename=" + get_path_info(invoker.out_file, "file"),
|
||||||
get_path_info(invoker.out_file, "file"),
|
"--output-path=" + rebase_path(get_path_info(invoker.out_file, "dir")),
|
||||||
"--output-path",
|
"--env.buildflags=" +
|
||||||
rebase_path(get_path_info(invoker.out_file, "dir")),
|
rebase_path("$target_gen_dir/buildflags/buildflags.h"),
|
||||||
"--env",
|
"--env.mode=" + mode,
|
||||||
"buildflags=" + rebase_path("$target_gen_dir/buildflags/buildflags.h"),
|
|
||||||
"--env",
|
|
||||||
"mode=" + mode,
|
|
||||||
]
|
]
|
||||||
deps += [ "//electron/buildflags" ]
|
deps += [ "//electron/buildflags" ]
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ buildflag_header("buildflags") {
|
|||||||
"ENABLE_ELECTRON_EXTENSIONS=$enable_electron_extensions",
|
"ENABLE_ELECTRON_EXTENSIONS=$enable_electron_extensions",
|
||||||
"ENABLE_BUILTIN_SPELLCHECKER=$enable_builtin_spellchecker",
|
"ENABLE_BUILTIN_SPELLCHECKER=$enable_builtin_spellchecker",
|
||||||
"ENABLE_PICTURE_IN_PICTURE=$enable_picture_in_picture",
|
"ENABLE_PICTURE_IN_PICTURE=$enable_picture_in_picture",
|
||||||
|
"ENABLE_WIN_DARK_MODE_WINDOW_UI=$enable_win_dark_mode_window_ui",
|
||||||
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
|
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,4 +31,7 @@ declare_args() {
|
|||||||
|
|
||||||
# Enable Spellchecker support
|
# Enable Spellchecker support
|
||||||
enable_builtin_spellchecker = true
|
enable_builtin_spellchecker = true
|
||||||
|
|
||||||
|
# Undocumented Windows dark mode API
|
||||||
|
enable_win_dark_mode_window_ui = false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -101,10 +101,7 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/icon_loader_mac.mm",
|
"//chrome/browser/icon_loader_mac.mm",
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
|
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h",
|
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm",
|
|
||||||
"//chrome/browser/media/webrtc/window_icon_util_mac.mm",
|
"//chrome/browser/media/webrtc/window_icon_util_mac.mm",
|
||||||
"//chrome/browser/platform_util_mac.mm",
|
|
||||||
"//chrome/browser/process_singleton_mac.mm",
|
"//chrome/browser/process_singleton_mac.mm",
|
||||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
||||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
|
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
|
||||||
@@ -156,7 +153,10 @@ static_library("chrome") {
|
|||||||
"//services/strings",
|
"//services/strings",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [ "//chrome/browser:resource_prefetch_predictor_proto" ]
|
deps = [
|
||||||
|
"//chrome/browser:resource_prefetch_predictor_proto",
|
||||||
|
"//components/optimization_guide/proto:optimization_guide_proto",
|
||||||
|
]
|
||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
|
sources += [ "//chrome/browser/icon_loader_auralinux.cc" ]
|
||||||
@@ -229,10 +229,6 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/printing/printer_query.h",
|
"//chrome/browser/printing/printer_query.h",
|
||||||
"//chrome/browser/printing/printing_service.cc",
|
"//chrome/browser/printing/printing_service.cc",
|
||||||
"//chrome/browser/printing/printing_service.h",
|
"//chrome/browser/printing/printing_service.h",
|
||||||
"//components/printing/browser/print_to_pdf/pdf_print_job.cc",
|
|
||||||
"//components/printing/browser/print_to_pdf/pdf_print_job.h",
|
|
||||||
"//components/printing/browser/print_to_pdf/pdf_print_utils.cc",
|
|
||||||
"//components/printing/browser/print_to_pdf/pdf_print_utils.h",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
if (enable_oop_printing) {
|
if (enable_oop_printing) {
|
||||||
@@ -394,10 +390,6 @@ source_set("chrome_spellchecker") {
|
|||||||
|
|
||||||
if (enable_builtin_spellchecker) {
|
if (enable_builtin_spellchecker) {
|
||||||
sources += [
|
sources += [
|
||||||
"//chrome/browser/profiles/profile_keyed_service_factory.cc",
|
|
||||||
"//chrome/browser/profiles/profile_keyed_service_factory.h",
|
|
||||||
"//chrome/browser/profiles/profile_selections.cc",
|
|
||||||
"//chrome/browser/profiles/profile_selections.h",
|
|
||||||
"//chrome/browser/spellchecker/spell_check_host_chrome_impl.cc",
|
"//chrome/browser/spellchecker/spell_check_host_chrome_impl.cc",
|
||||||
"//chrome/browser/spellchecker/spell_check_host_chrome_impl.h",
|
"//chrome/browser/spellchecker/spell_check_host_chrome_impl.h",
|
||||||
"//chrome/browser/spellchecker/spellcheck_custom_dictionary.cc",
|
"//chrome/browser/spellchecker/spellcheck_custom_dictionary.cc",
|
||||||
@@ -406,19 +398,14 @@ source_set("chrome_spellchecker") {
|
|||||||
"//chrome/browser/spellchecker/spellcheck_factory.h",
|
"//chrome/browser/spellchecker/spellcheck_factory.h",
|
||||||
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc",
|
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.cc",
|
||||||
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h",
|
"//chrome/browser/spellchecker/spellcheck_hunspell_dictionary.h",
|
||||||
|
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc",
|
||||||
|
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h",
|
||||||
|
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc",
|
||||||
|
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.h",
|
||||||
"//chrome/browser/spellchecker/spellcheck_service.cc",
|
"//chrome/browser/spellchecker/spellcheck_service.cc",
|
||||||
"//chrome/browser/spellchecker/spellcheck_service.h",
|
"//chrome/browser/spellchecker/spellcheck_service.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (!is_mac) {
|
|
||||||
sources += [
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_language_blocklist_policy_handler.h",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.cc",
|
|
||||||
"//chrome/browser/spellchecker/spellcheck_language_policy_handler.h",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
if (has_spellcheck_panel) {
|
if (has_spellcheck_panel) {
|
||||||
sources += [
|
sources += [
|
||||||
"//chrome/browser/spellchecker/spell_check_panel_host_impl.cc",
|
"//chrome/browser/spellchecker/spell_check_panel_host_impl.cc",
|
||||||
|
|||||||
@@ -66,9 +66,9 @@ async function createWindow (backgroundColor?: string) {
|
|||||||
mainWindow = new BrowserWindow(options);
|
mainWindow = new BrowserWindow(options);
|
||||||
mainWindow.on('ready-to-show', () => mainWindow!.show());
|
mainWindow.on('ready-to-show', () => mainWindow!.show());
|
||||||
|
|
||||||
mainWindow.webContents.setWindowOpenHandler(details => {
|
mainWindow.webContents.on('new-window', (event, url) => {
|
||||||
shell.openExternal(decorateURL(details.url));
|
event.preventDefault();
|
||||||
return { action: 'deny' };
|
shell.openExternal(decorateURL(url));
|
||||||
});
|
});
|
||||||
|
|
||||||
mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, done) => {
|
mainWindow.webContents.session.setPermissionRequestHandler((webContents, permission, done) => {
|
||||||
|
|||||||
@@ -130,11 +130,6 @@ set `NSPrincipalClass` to `AtomApplication`.
|
|||||||
|
|
||||||
You should call `event.preventDefault()` if you want to handle this event.
|
You should call `event.preventDefault()` if you want to handle this event.
|
||||||
|
|
||||||
As with the `open-file` event, be sure to register a listener for the `open-url`
|
|
||||||
event early in your application startup to detect if the the application being
|
|
||||||
is being opened to handle a URL. If you register the listener in response to a
|
|
||||||
`ready` event, you'll miss URLs that trigger the launch of your application.
|
|
||||||
|
|
||||||
### Event: 'activate' _macOS_
|
### Event: 'activate' _macOS_
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -587,10 +582,6 @@ You should seek to use the `steal` option as sparingly as possible.
|
|||||||
|
|
||||||
Hides all application windows without minimizing them.
|
Hides all application windows without minimizing them.
|
||||||
|
|
||||||
### `app.isHidden()` _macOS_
|
|
||||||
|
|
||||||
Returns `boolean` - `true` if the application—including all of its windows—is hidden (e.g. with `Command-H`), `false` otherwise.
|
|
||||||
|
|
||||||
### `app.show()` _macOS_
|
### `app.show()` _macOS_
|
||||||
|
|
||||||
Shows application windows after they were hidden. Does not automatically focus
|
Shows application windows after they were hidden. Does not automatically focus
|
||||||
@@ -616,18 +607,9 @@ Returns `string` - The current application directory.
|
|||||||
* `%APPDATA%` on Windows
|
* `%APPDATA%` on Windows
|
||||||
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
|
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
|
||||||
* `~/Library/Application Support` on macOS
|
* `~/Library/Application Support` on macOS
|
||||||
* `userData` The directory for storing your app's configuration files, which
|
* `userData` The directory for storing your app's configuration files, which by
|
||||||
by default is the `appData` directory appended with your app's name. By
|
default it is the `appData` directory appended with your app's name.
|
||||||
convention files storing user data should be written to this directory, and
|
* `cache`
|
||||||
it is not recommended to write large files here because some environments
|
|
||||||
may backup this directory to cloud storage.
|
|
||||||
* `sessionData` The directory for storing data generated by `Session`, such
|
|
||||||
as localStorage, cookies, disk cache, downloaded dictionaries, network
|
|
||||||
state, devtools files. By default this points to `userData`. Chromium may
|
|
||||||
write very large disk cache here, so if your app does not rely on browser
|
|
||||||
storage like localStorage or cookies to save user data, it is recommended
|
|
||||||
to set this directory to other locations to avoid polluting the `userData`
|
|
||||||
directory.
|
|
||||||
* `temp` Temporary directory.
|
* `temp` Temporary directory.
|
||||||
* `exe` The current executable file.
|
* `exe` The current executable file.
|
||||||
* `module` The `libchromiumcontent` library.
|
* `module` The `libchromiumcontent` library.
|
||||||
@@ -677,9 +659,9 @@ In that case, the directory should be created with `fs.mkdirSync` or similar.
|
|||||||
|
|
||||||
You can only override paths of a `name` defined in `app.getPath`.
|
You can only override paths of a `name` defined in `app.getPath`.
|
||||||
|
|
||||||
By default, web pages' cookies and caches will be stored under the `sessionData`
|
By default, web pages' cookies and caches will be stored under the `userData`
|
||||||
directory. If you want to change this location, you have to override the
|
directory. If you want to change this location, you have to override the
|
||||||
`sessionData` path before the `ready` event of the `app` module is emitted.
|
`userData` path before the `ready` event of the `app` module is emitted.
|
||||||
|
|
||||||
### `app.getVersion()`
|
### `app.getVersion()`
|
||||||
|
|
||||||
@@ -1386,7 +1368,7 @@ method returns false. If we fail to perform the copy, then this method will
|
|||||||
throw an error. The message in the error should be informative and tell
|
throw an error. The message in the error should be informative and tell
|
||||||
you exactly what went wrong.
|
you exactly what went wrong.
|
||||||
|
|
||||||
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the preexisting running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
|
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
|
|||||||
@@ -11,9 +11,6 @@ relative to its owning window. It is meant to be an alternative to the
|
|||||||
|
|
||||||
Process: [Main](../glossary.md#main-process)
|
Process: [Main](../glossary.md#main-process)
|
||||||
|
|
||||||
This module cannot be used until the `ready` event of the `app`
|
|
||||||
module is emitted.
|
|
||||||
|
|
||||||
### Example
|
### Example
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
@@ -4,9 +4,6 @@
|
|||||||
|
|
||||||
Process: [Main](../glossary.md#main-process)
|
Process: [Main](../glossary.md#main-process)
|
||||||
|
|
||||||
This module cannot be used until the `ready` event of the `app`
|
|
||||||
module is emitted.
|
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
// In the main process.
|
// In the main process.
|
||||||
const { BrowserWindow } = require('electron')
|
const { BrowserWindow } = require('electron')
|
||||||
@@ -426,17 +423,13 @@ Possible values are:
|
|||||||
|
|
||||||
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
|
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
|
||||||
`notification`.
|
`notification`.
|
||||||
* On macOS, possible types are `desktop`, `textured`, `panel`.
|
* On macOS, possible types are `desktop`, `textured`.
|
||||||
* The `textured` type adds metal gradient appearance
|
* The `textured` type adds metal gradient appearance
|
||||||
(`NSWindowStyleMaskTexturedBackground`).
|
(`NSTexturedBackgroundWindowMask`).
|
||||||
* The `desktop` type places the window at the desktop background window level
|
* The `desktop` type places the window at the desktop background window level
|
||||||
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
|
(`kCGDesktopWindowLevel - 1`). Note that desktop window will not receive
|
||||||
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
|
focus, keyboard or mouse events, but you can use `globalShortcut` to receive
|
||||||
input sparingly.
|
input sparingly.
|
||||||
* The `panel` type enables the window to float on top of full-screened apps
|
|
||||||
by adding the `NSWindowStyleMaskNonactivatingPanel` style mask,normally
|
|
||||||
reserved for NSPanel, at runtime. Also, the window will appear on all
|
|
||||||
spaces (desktops).
|
|
||||||
* On Windows, possible type is `toolbar`.
|
* On Windows, possible type is `toolbar`.
|
||||||
|
|
||||||
### Instance Events
|
### Instance Events
|
||||||
@@ -1324,7 +1317,7 @@ win.setSheetOffset(toolbarRect.height)
|
|||||||
|
|
||||||
Starts or stops flashing the window to attract user's attention.
|
Starts or stops flashing the window to attract user's attention.
|
||||||
|
|
||||||
#### `win.setSkipTaskbar(skip)` _macOS_ _Windows_
|
#### `win.setSkipTaskbar(skip)`
|
||||||
|
|
||||||
* `skip` boolean
|
* `skip` boolean
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ page you load in your renderer executes code in this world.
|
|||||||
|
|
||||||
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
|
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
|
||||||
"Isolated World". You can read more about context isolation and what it affects in the
|
"Isolated World". You can read more about context isolation and what it affects in the
|
||||||
[security](../tutorial/security.md#3-enable-context-isolation) docs.
|
[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs.
|
||||||
|
|
||||||
## Methods
|
## Methods
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,8 @@ green and non-draggable regions will be colored red to aid debugging.
|
|||||||
|
|
||||||
### `ELECTRON_DEBUG_NOTIFICATIONS`
|
### `ELECTRON_DEBUG_NOTIFICATIONS`
|
||||||
|
|
||||||
Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common actions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to.
|
Adds extra logs to [`Notification`](./notification.md) lifecycles on macOS to aid in debugging. Extra logging will be displayed when new Notifications are created or activated. They will also be displayed when common a
|
||||||
|
tions are taken: a notification is shown, dismissed, its button is clicked, or it is replied to.
|
||||||
|
|
||||||
Sample output:
|
Sample output:
|
||||||
|
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ console.log(image)
|
|||||||
* `options` Object
|
* `options` Object
|
||||||
* `width` Integer
|
* `width` Integer
|
||||||
* `height` Integer
|
* `height` Integer
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `NativeImage`
|
Returns `NativeImage`
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ pixel data returned by `toBitmap()`. The specific format is platform-dependent.
|
|||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `width` Integer (optional) - Required for bitmap buffers.
|
* `width` Integer (optional) - Required for bitmap buffers.
|
||||||
* `height` Integer (optional) - Required for bitmap buffers.
|
* `height` Integer (optional) - Required for bitmap buffers.
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `NativeImage`
|
Returns `NativeImage`
|
||||||
|
|
||||||
@@ -225,7 +225,7 @@ The following methods are available on instances of the `NativeImage` class:
|
|||||||
#### `image.toPNG([options])`
|
#### `image.toPNG([options])`
|
||||||
|
|
||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded data.
|
Returns `Buffer` - A [Buffer][buffer] that contains the image's `PNG` encoded data.
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ Returns `Buffer` - A [Buffer][buffer] that contains the image's `JPEG` encoded d
|
|||||||
#### `image.toBitmap([options])`
|
#### `image.toBitmap([options])`
|
||||||
|
|
||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `Buffer` - A [Buffer][buffer] that contains a copy of the image's raw bitmap pixel
|
Returns `Buffer` - A [Buffer][buffer] that contains a copy of the image's raw bitmap pixel
|
||||||
data.
|
data.
|
||||||
@@ -246,14 +246,14 @@ data.
|
|||||||
#### `image.toDataURL([options])`
|
#### `image.toDataURL([options])`
|
||||||
|
|
||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `string` - The data URL of the image.
|
Returns `string` - The data URL of the image.
|
||||||
|
|
||||||
#### `image.getBitmap([options])`
|
#### `image.getBitmap([options])`
|
||||||
|
|
||||||
* `options` Object (optional)
|
* `options` Object (optional)
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `Buffer` - A [Buffer][buffer] that contains the image's raw bitmap pixel data.
|
Returns `Buffer` - A [Buffer][buffer] that contains the image's raw bitmap pixel data.
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ Returns `boolean` - Whether the image is empty.
|
|||||||
|
|
||||||
#### `image.getSize([scaleFactor])`
|
#### `image.getSize([scaleFactor])`
|
||||||
|
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns [`Size`](structures/size.md).
|
Returns [`Size`](structures/size.md).
|
||||||
|
|
||||||
@@ -317,20 +317,20 @@ will be preserved in the resized image.
|
|||||||
|
|
||||||
#### `image.getAspectRatio([scaleFactor])`
|
#### `image.getAspectRatio([scaleFactor])`
|
||||||
|
|
||||||
* `scaleFactor` Number (optional) - Defaults to 1.0.
|
* `scaleFactor` Double (optional) - Defaults to 1.0.
|
||||||
|
|
||||||
Returns `Number` - The image's aspect ratio.
|
Returns `Float` - The image's aspect ratio.
|
||||||
|
|
||||||
If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value.
|
If `scaleFactor` is passed, this will return the aspect ratio corresponding to the image representation most closely matching the passed value.
|
||||||
|
|
||||||
#### `image.getScaleFactors()`
|
#### `image.getScaleFactors()`
|
||||||
|
|
||||||
Returns `Number[]` - An array of all scale factors corresponding to representations for a given nativeImage.
|
Returns `Float[]` - An array of all scale factors corresponding to representations for a given nativeImage.
|
||||||
|
|
||||||
#### `image.addRepresentation(options)`
|
#### `image.addRepresentation(options)`
|
||||||
|
|
||||||
* `options` Object
|
* `options` Object
|
||||||
* `scaleFactor` Number (optional) - The scale factor to add the image representation for.
|
* `scaleFactor` Double - The scale factor to add the image representation for.
|
||||||
* `width` Integer (optional) - Defaults to 0. Required if a bitmap buffer
|
* `width` Integer (optional) - Defaults to 0. Required if a bitmap buffer
|
||||||
is specified as `buffer`.
|
is specified as `buffer`.
|
||||||
* `height` Integer (optional) - Defaults to 0. Required if a bitmap buffer
|
* `height` Integer (optional) - Defaults to 0. Required if a bitmap buffer
|
||||||
|
|||||||
@@ -10,12 +10,11 @@ An example of implementing a protocol that has the same effect as the
|
|||||||
```javascript
|
```javascript
|
||||||
const { app, protocol } = require('electron')
|
const { app, protocol } = require('electron')
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const url = require('url')
|
|
||||||
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
protocol.registerFileProtocol('atom', (request, callback) => {
|
protocol.registerFileProtocol('atom', (request, callback) => {
|
||||||
const filePath = url.fileURLToPath('file://' + request.url.slice('atom://'.length))
|
const url = request.url.substr(7)
|
||||||
callback(filePath)
|
callback({ path: path.normalize(`${__dirname}/${url}`) })
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
@@ -176,7 +175,7 @@ property.
|
|||||||
* `handler` Function
|
* `handler` Function
|
||||||
* `request` [ProtocolRequest](structures/protocol-request.md)
|
* `request` [ProtocolRequest](structures/protocol-request.md)
|
||||||
* `callback` Function
|
* `callback` Function
|
||||||
* `response` [ProtocolResponse](structures/protocol-response.md)
|
* `response` ProtocolResponse
|
||||||
|
|
||||||
Returns `boolean` - Whether the protocol was successfully registered
|
Returns `boolean` - Whether the protocol was successfully registered
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
# pushNotifications
|
|
||||||
|
|
||||||
Process: [Main](../glossary.md#main-process)
|
|
||||||
|
|
||||||
> Register for and receive notifications from remote push notification services
|
|
||||||
|
|
||||||
For example, when registering for push notifications via Apple push notification services (APNS):
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const { pushNotifications, Notification } = require('electron')
|
|
||||||
|
|
||||||
pushNotifications.registerForAPNSNotifications().then((token) => {
|
|
||||||
// forward token to your remote notification server
|
|
||||||
})
|
|
||||||
|
|
||||||
pushNotifications.on('received-apns-notification', (event, userInfo) => {
|
|
||||||
// generate a new Notification object with the relevant userInfo fields
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Events
|
|
||||||
|
|
||||||
The `pushNotification` module emits the following events:
|
|
||||||
|
|
||||||
#### Event: 'received-apns-notification' _macOS_
|
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
* `userInfo` Record<String, any>
|
|
||||||
|
|
||||||
Emitted when the app receives a remote notification while running.
|
|
||||||
See: https://developer.apple.com/documentation/appkit/nsapplicationdelegate/1428430-application?language=objc
|
|
||||||
|
|
||||||
## Methods
|
|
||||||
|
|
||||||
The `pushNotification` module has the following methods:
|
|
||||||
|
|
||||||
### `pushNotifications.registerForAPNSNotifications()` _macOS_
|
|
||||||
|
|
||||||
Returns `Promise<string>`
|
|
||||||
|
|
||||||
Registers the app with Apple Push Notification service (APNS) to receive [Badge, Sound, and Alert](https://developer.apple.com/documentation/appkit/sremotenotificationtype?language=objc) notifications. If registration is successful, the promise will be resolved with the APNS device token. Otherwise, the promise will be rejected with an error message.
|
|
||||||
See: https://developer.apple.com/documentation/appkit/nsapplication/1428476-registerforremotenotificationtyp?language=objc
|
|
||||||
|
|
||||||
### `pushNotifications.unregisterForAPNSNotifications()` _macOS_
|
|
||||||
|
|
||||||
Unregisters the app from notifications received from APNS.
|
|
||||||
See: https://developer.apple.com/documentation/appkit/nsapplication/1428747-unregisterforremotenotifications?language=objc
|
|
||||||
@@ -253,11 +253,9 @@ Returns:
|
|||||||
* `device` [HIDDevice[]](structures/hid-device.md)
|
* `device` [HIDDevice[]](structures/hid-device.md)
|
||||||
* `frame` [WebFrameMain](web-frame-main.md)
|
* `frame` [WebFrameMain](web-frame-main.md)
|
||||||
|
|
||||||
Emitted after `navigator.hid.requestDevice` has been called and
|
Emitted when a new HID device becomes available. For example, when a new USB device is plugged in.
|
||||||
`select-hid-device` has fired if a new device becomes available before
|
|
||||||
the callback from `select-hid-device` is called. This event is intended for
|
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
|
||||||
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: 'hid-device-removed'
|
#### Event: 'hid-device-removed'
|
||||||
|
|
||||||
@@ -268,24 +266,9 @@ Returns:
|
|||||||
* `device` [HIDDevice[]](structures/hid-device.md)
|
* `device` [HIDDevice[]](structures/hid-device.md)
|
||||||
* `frame` [WebFrameMain](web-frame-main.md)
|
* `frame` [WebFrameMain](web-frame-main.md)
|
||||||
|
|
||||||
Emitted after `navigator.hid.requestDevice` has been called and
|
Emitted when a HID device has been removed. For example, this event will fire when a USB device is unplugged.
|
||||||
`select-hid-device` has fired if a device has been removed before the callback
|
|
||||||
from `select-hid-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: 'hid-device-revoked'
|
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
|
||||||
|
|
||||||
Returns:
|
|
||||||
|
|
||||||
* `event` Event
|
|
||||||
* `details` Object
|
|
||||||
* `device` [HIDDevice[]](structures/hid-device.md)
|
|
||||||
* `origin` string (optional) - The origin that the device has been revoked from.
|
|
||||||
|
|
||||||
Emitted after `HIDDevice.forget()` has been called. This event can be used
|
|
||||||
to help maintain persistent storage of permissions when
|
|
||||||
`setDevicePermissionHandler` is used.
|
|
||||||
|
|
||||||
#### Event: 'select-serial-port'
|
#### Event: 'select-serial-port'
|
||||||
|
|
||||||
@@ -365,11 +348,7 @@ Returns:
|
|||||||
* `port` [SerialPort](structures/serial-port.md)
|
* `port` [SerialPort](structures/serial-port.md)
|
||||||
* `webContents` [WebContents](web-contents.md)
|
* `webContents` [WebContents](web-contents.md)
|
||||||
|
|
||||||
Emitted after `navigator.serial.requestPort` has been called and
|
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a new serial port becomes available. For example, this event will fire when a new USB device is plugged in.
|
||||||
`select-serial-port` has fired if a new serial port becomes available before
|
|
||||||
the callback from `select-serial-port` is called. This event is intended for
|
|
||||||
use when using a UI to ask users to pick a port so that the UI can be updated
|
|
||||||
with the newly added port.
|
|
||||||
|
|
||||||
#### Event: 'serial-port-removed'
|
#### Event: 'serial-port-removed'
|
||||||
|
|
||||||
@@ -379,11 +358,7 @@ Returns:
|
|||||||
* `port` [SerialPort](structures/serial-port.md)
|
* `port` [SerialPort](structures/serial-port.md)
|
||||||
* `webContents` [WebContents](web-contents.md)
|
* `webContents` [WebContents](web-contents.md)
|
||||||
|
|
||||||
Emitted after `navigator.serial.requestPort` has been called and
|
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a serial port has been removed. For example, this event will fire when a USB device is unplugged.
|
||||||
`select-serial-port` has fired if a serial port has been removed before the
|
|
||||||
callback from `select-serial-port` is called. This event is intended for use
|
|
||||||
when using a UI to ask users to pick a port so that the UI can be updated
|
|
||||||
to remove the specified port.
|
|
||||||
|
|
||||||
### Instance Methods
|
### Instance Methods
|
||||||
|
|
||||||
@@ -635,7 +610,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
|||||||
* `notifications` - Request notification creation and the ability to display them in the user's system tray.
|
* `notifications` - Request notification creation and the ability to display them in the user's system tray.
|
||||||
* `midi` - Request MIDI access in the `webmidi` API.
|
* `midi` - Request MIDI access in the `webmidi` API.
|
||||||
* `midiSysex` - Request the use of system exclusive messages in the `webmidi` API.
|
* `midiSysex` - Request the use of system exclusive messages in the `webmidi` API.
|
||||||
* `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. These requests always appear to originate from the main frame.
|
* `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more.
|
||||||
* `fullscreen` - Request for the app to enter fullscreen mode.
|
* `fullscreen` - Request for the app to enter fullscreen mode.
|
||||||
* `openExternal` - Request to open links in external applications.
|
* `openExternal` - Request to open links in external applications.
|
||||||
* `unknown` - An unrecognized permission request
|
* `unknown` - An unrecognized permission request
|
||||||
@@ -698,60 +673,6 @@ session.fromPartition('some-partition').setPermissionCheckHandler((webContents,
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
#### `ses.setDisplayMediaRequestHandler(handler)`
|
|
||||||
|
|
||||||
* `handler` Function | null
|
|
||||||
* `request` Object
|
|
||||||
* `frame` [WebFrameMain](web-frame-main.md) - Frame that is requesting access to media.
|
|
||||||
* `securityOrigin` String - Origin of the page making the request.
|
|
||||||
* `videoRequested` Boolean - true if the web content requested a video stream.
|
|
||||||
* `audioRequested` Boolean - true if the web content requested an audio stream.
|
|
||||||
* `userGesture` Boolean - Whether a user gesture was active when this request was triggered.
|
|
||||||
* `callback` Function
|
|
||||||
* `streams` Object
|
|
||||||
* `video` Object | [WebFrameMain](web-frame-main.md) (optional)
|
|
||||||
* `id` String - The id of the stream being granted. This will usually
|
|
||||||
come from a [DesktopCapturerSource](structures/desktop-capturer-source.md)
|
|
||||||
object.
|
|
||||||
* `name` String - The name of the stream being granted. This will
|
|
||||||
usually come from a [DesktopCapturerSource](structures/desktop-capturer-source.md)
|
|
||||||
object.
|
|
||||||
* `audio` String | [WebFrameMain](web-frame-main.md) (optional) - If
|
|
||||||
a string is specified, can be `loopback` or `loopbackWithMute`.
|
|
||||||
Specifying a loopback device will capture system audio, and is
|
|
||||||
currently only supported on Windows. If a WebFrameMain is specified,
|
|
||||||
will capture audio from that frame.
|
|
||||||
|
|
||||||
This handler will be called when web content requests access to display media
|
|
||||||
via the `navigator.mediaDevices.getDisplayMedia` API. Use the
|
|
||||||
[desktopCapturer](desktop-capturer.md) API to choose which stream(s) to grant
|
|
||||||
access to.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const { session, desktopCapturer } = require('electron')
|
|
||||||
|
|
||||||
session.defaultSession.setDisplayMediaRequestHandler((request, callback) => {
|
|
||||||
desktopCapturer.getSources({ types: ['screen'] }).then((sources) => {
|
|
||||||
// Grant access to the first screen found.
|
|
||||||
callback({ video: sources[0] })
|
|
||||||
})
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
Passing a [WebFrameMain](web-frame-main.md) object as a video or audio stream
|
|
||||||
will capture the video or audio stream from that frame.
|
|
||||||
|
|
||||||
```javascript
|
|
||||||
const { session } = require('electron')
|
|
||||||
|
|
||||||
session.defaultSession.setDisplayMediaRequestHandler((request, callback) => {
|
|
||||||
// Allow the tab to capture itself.
|
|
||||||
callback({ video: request.frame })
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
Passing `null` instead of a function resets the handler to its default state.
|
|
||||||
|
|
||||||
#### `ses.setDevicePermissionHandler(handler)`
|
#### `ses.setDevicePermissionHandler(handler)`
|
||||||
|
|
||||||
* `handler` Function\<boolean> | null
|
* `handler` Function\<boolean> | null
|
||||||
@@ -759,6 +680,7 @@ Passing `null` instead of a function resets the handler to its default state.
|
|||||||
* `deviceType` string - The type of device that permission is being requested on, can be `hid` or `serial`.
|
* `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.
|
* `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.
|
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
|
||||||
|
* `frame` [WebFrameMain](web-frame-main.md) - WebFrameMain checking the device permission.
|
||||||
|
|
||||||
Sets the handler which can be used to respond to device permission checks for the `session`.
|
Sets the handler which can be used to respond to device permission checks for the `session`.
|
||||||
Returning `true` will allow the device to be permitted and `false` will reject it.
|
Returning `true` will allow the device to be permitted and `false` will reject it.
|
||||||
@@ -766,8 +688,8 @@ To clear the handler, call `setDevicePermissionHandler(null)`.
|
|||||||
This handler can be used to provide default permissioning to devices without first calling for permission
|
This handler can be used to provide default permissioning to devices without first calling for permission
|
||||||
to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device
|
to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device
|
||||||
permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used.
|
permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used.
|
||||||
Additionally, the default behavior of Electron is to store granted device permision in memory.
|
Additionally, the default behavior of Electron is to store granted device permision through the lifetime
|
||||||
If longer term storage is needed, a developer can store granted device
|
of the corresponding WebContents. If longer term storage is needed, a developer can store granted device
|
||||||
permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`.
|
permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`.
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
|
|||||||
@@ -15,12 +15,11 @@
|
|||||||
`thumbnailSize` specified in the `options` passed to
|
`thumbnailSize` specified in the `options` passed to
|
||||||
`desktopCapturer.getSources`. The actual size depends on the scale of the
|
`desktopCapturer.getSources`. The actual size depends on the scale of the
|
||||||
screen or window.
|
screen or window.
|
||||||
* `displayId` string - A unique identifier that will correspond to the `id` of
|
* `display_id` string - A unique identifier that will correspond to the `id` of
|
||||||
the matching [Display](display.md) returned by the [Screen API](../screen.md).
|
the matching [Display](display.md) returned by the [Screen API](../screen.md).
|
||||||
On some platforms, this is equivalent to the `XX` portion of the `id` field
|
On some platforms, this is equivalent to the `XX` portion of the `id` field
|
||||||
above and on others it will differ. It will be an empty string if not
|
above and on others it will differ. It will be an empty string if not
|
||||||
available.
|
available.
|
||||||
* `display_id` string _Deprecated_ - Deprecated accessor for `displayId`.
|
|
||||||
* `appIcon` [NativeImage](../native-image.md) - An icon image of the
|
* `appIcon` [NativeImage](../native-image.md) - An icon image of the
|
||||||
application that owns the window or null if the source has a type screen.
|
application that owns the window or null if the source has a type screen.
|
||||||
The size of the icon is not known in advance and depends on what
|
The size of the icon is not known in advance and depends on what
|
||||||
|
|||||||
3
docs/api/structures/new-window-web-contents-event.md
Normal file
3
docs/api/structures/new-window-web-contents-event.md
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# NewWindowWebContentsEvent Object extends `Event`
|
||||||
|
|
||||||
|
* `newGuest` BrowserWindow (optional)
|
||||||
@@ -156,6 +156,64 @@ Returns:
|
|||||||
|
|
||||||
Emitted when page receives favicon urls.
|
Emitted when page receives favicon urls.
|
||||||
|
|
||||||
|
#### Event: 'new-window' _Deprecated_
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
* `event` NewWindowWebContentsEvent
|
||||||
|
* `url` string
|
||||||
|
* `frameName` string
|
||||||
|
* `disposition` string - Can be `default`, `foreground-tab`, `background-tab`,
|
||||||
|
`new-window`, `save-to-disk` and `other`.
|
||||||
|
* `options` BrowserWindowConstructorOptions - The options which will be used for creating the new
|
||||||
|
[`BrowserWindow`](browser-window.md).
|
||||||
|
* `additionalFeatures` string[] - The non-standard features (features not handled
|
||||||
|
by Chromium or Electron) given to `window.open()`. Deprecated, and will now
|
||||||
|
always be the empty array `[]`.
|
||||||
|
* `referrer` [Referrer](structures/referrer.md) - The referrer that will be
|
||||||
|
passed to the new window. May or may not result in the `Referer` header being
|
||||||
|
sent, depending on the referrer policy.
|
||||||
|
* `postBody` [PostBody](structures/post-body.md) (optional) - The post data that
|
||||||
|
will be sent to the new window, along with the appropriate headers that will
|
||||||
|
be set. If no post data is to be sent, the value will be `null`. Only defined
|
||||||
|
when the window is being created by a form that set `target=_blank`.
|
||||||
|
|
||||||
|
Deprecated in favor of [`webContents.setWindowOpenHandler`](web-contents.md#contentssetwindowopenhandlerhandler).
|
||||||
|
|
||||||
|
Emitted when the page requests to open a new window for a `url`. It could be
|
||||||
|
requested by `window.open` or an external link like `<a target='_blank'>`.
|
||||||
|
|
||||||
|
By default a new `BrowserWindow` will be created for the `url`.
|
||||||
|
|
||||||
|
Calling `event.preventDefault()` will prevent Electron from automatically creating a
|
||||||
|
new [`BrowserWindow`](browser-window.md). If you call `event.preventDefault()` and manually create a new
|
||||||
|
[`BrowserWindow`](browser-window.md) then you must set `event.newGuest` to reference the new [`BrowserWindow`](browser-window.md)
|
||||||
|
instance, failing to do so may result in unexpected behavior. For example:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
myBrowserWindow.webContents.on('new-window', (event, url, frameName, disposition, options, additionalFeatures, referrer, postBody) => {
|
||||||
|
event.preventDefault()
|
||||||
|
const win = new BrowserWindow({
|
||||||
|
webContents: options.webContents, // use existing webContents if provided
|
||||||
|
show: false
|
||||||
|
})
|
||||||
|
win.once('ready-to-show', () => win.show())
|
||||||
|
if (!options.webContents) {
|
||||||
|
const loadOptions = {
|
||||||
|
httpReferrer: referrer
|
||||||
|
}
|
||||||
|
if (postBody != null) {
|
||||||
|
const { data, contentType, boundary } = postBody
|
||||||
|
loadOptions.postData = postBody.data
|
||||||
|
loadOptions.extraHeaders = `content-type: ${contentType}; boundary=${boundary}`
|
||||||
|
}
|
||||||
|
|
||||||
|
win.loadURL(url, loadOptions) // existing webContents will be navigated automatically
|
||||||
|
}
|
||||||
|
event.newGuest = win
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
#### Event: 'did-create-window'
|
#### Event: 'did-create-window'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -804,8 +862,6 @@ Returns:
|
|||||||
|
|
||||||
Emitted when the renderer process sends an asynchronous message via `ipcRenderer.send()`.
|
Emitted when the renderer process sends an asynchronous message via `ipcRenderer.send()`.
|
||||||
|
|
||||||
See also [`webContents.ipc`](#contentsipc-readonly), which provides an [`IpcMain`](ipc-main.md)-like interface for responding to IPC messages specifically from this WebContents.
|
|
||||||
|
|
||||||
#### Event: 'ipc-message-sync'
|
#### Event: 'ipc-message-sync'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -816,8 +872,6 @@ Returns:
|
|||||||
|
|
||||||
Emitted when the renderer process sends a synchronous message via `ipcRenderer.sendSync()`.
|
Emitted when the renderer process sends a synchronous message via `ipcRenderer.sendSync()`.
|
||||||
|
|
||||||
See also [`webContents.ipc`](#contentsipc-readonly), which provides an [`IpcMain`](ipc-main.md)-like interface for responding to IPC messages specifically from this WebContents.
|
|
||||||
|
|
||||||
#### Event: 'preferred-size-changed'
|
#### Event: 'preferred-size-changed'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@@ -1374,7 +1428,7 @@ Returns `Promise<PrinterInfo[]>` - Resolves with a [`PrinterInfo[]`](structures/
|
|||||||
* `header` string (optional) - string to be printed as page header.
|
* `header` string (optional) - string to be printed as page header.
|
||||||
* `footer` string (optional) - string to be printed as page footer.
|
* `footer` string (optional) - string to be printed as page footer.
|
||||||
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
|
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
|
||||||
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width`.
|
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`.
|
||||||
* `callback` Function (optional)
|
* `callback` Function (optional)
|
||||||
* `success` boolean - Indicates success of the print call.
|
* `success` boolean - Indicates success of the print call.
|
||||||
* `failureReason` string - Error description called back if the print fails.
|
* `failureReason` string - Error description called back if the print fails.
|
||||||
@@ -1405,28 +1459,43 @@ win.webContents.print(options, (success, errorType) => {
|
|||||||
#### `contents.printToPDF(options)`
|
#### `contents.printToPDF(options)`
|
||||||
|
|
||||||
* `options` Object
|
* `options` Object
|
||||||
* `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false.
|
* `headerFooter` Record<string, string> (optional) - the header and footer for the PDF.
|
||||||
* `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false.
|
* `title` string - The title for the PDF header.
|
||||||
* `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false.
|
* `url` string - the url for the PDF footer.
|
||||||
* `scale` number(optional) - Scale of the webpage rendering. Defaults to 1.
|
* `landscape` boolean (optional) - `true` for landscape, `false` for portrait.
|
||||||
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`,
|
* `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for
|
||||||
`A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`.
|
default margin, 1 for no margin, and 2 for minimum margin.
|
||||||
* `margins` Object (optional)
|
* `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100.
|
||||||
* `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches).
|
* `pageRanges` Record<string, number> (optional) - The page range to print.
|
||||||
* `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches).
|
* `from` number - Index of the first page to print (0-based).
|
||||||
* `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches).
|
* `to` number - Index of the last page to print (inclusive) (0-based).
|
||||||
* `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches).
|
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
|
||||||
* `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
|
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` and `width` in microns.
|
||||||
* `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `<span class=title></span>` would generate span containing the title.
|
* `printBackground` boolean (optional) - Whether to print CSS backgrounds.
|
||||||
* `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`.
|
* `printSelectionOnly` boolean (optional) - Whether to print selection only.
|
||||||
* `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
|
|
||||||
|
|
||||||
Returns `Promise<Buffer>` - Resolves with the generated PDF data.
|
Returns `Promise<Buffer>` - Resolves with the generated PDF data.
|
||||||
|
|
||||||
Prints the window's web page as PDF.
|
Prints window's web page as PDF with Chromium's preview printing custom
|
||||||
|
settings.
|
||||||
|
|
||||||
The `landscape` will be ignored if `@page` CSS at-rule is used in the web page.
|
The `landscape` will be ignored if `@page` CSS at-rule is used in the web page.
|
||||||
|
|
||||||
|
By default, an empty `options` will be regarded as:
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
{
|
||||||
|
marginsType: 0,
|
||||||
|
printBackground: false,
|
||||||
|
printSelectionOnly: false,
|
||||||
|
landscape: false,
|
||||||
|
pageSize: 'A4',
|
||||||
|
scaleFactor: 100
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Use `page-break-before: always;` CSS style to force to print to a new page.
|
||||||
|
|
||||||
An example of `webContents.printToPDF`:
|
An example of `webContents.printToPDF`:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
@@ -1435,7 +1504,7 @@ const fs = require('fs')
|
|||||||
const path = require('path')
|
const path = require('path')
|
||||||
const os = require('os')
|
const os = require('os')
|
||||||
|
|
||||||
const win = new BrowserWindow()
|
const win = new BrowserWindow({ width: 800, height: 600 })
|
||||||
win.loadURL('http://github.com')
|
win.loadURL('http://github.com')
|
||||||
|
|
||||||
win.webContents.on('did-finish-load', () => {
|
win.webContents.on('did-finish-load', () => {
|
||||||
@@ -1452,8 +1521,6 @@ win.webContents.on('did-finish-load', () => {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
See [Page.printToPdf](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) for more information.
|
|
||||||
|
|
||||||
#### `contents.addWorkSpace(path)`
|
#### `contents.addWorkSpace(path)`
|
||||||
|
|
||||||
* `path` string
|
* `path` string
|
||||||
@@ -1933,35 +2000,6 @@ This corresponds to the [animationPolicy][] accessibility feature in Chromium.
|
|||||||
|
|
||||||
### Instance Properties
|
### Instance Properties
|
||||||
|
|
||||||
#### `contents.ipc` _Readonly_
|
|
||||||
|
|
||||||
An [`IpcMain`](ipc-main.md) scoped to just IPC messages sent from this
|
|
||||||
WebContents.
|
|
||||||
|
|
||||||
IPC messages sent with `ipcRenderer.send`, `ipcRenderer.sendSync` or
|
|
||||||
`ipcRenderer.postMessage` will be delivered in the following order:
|
|
||||||
|
|
||||||
1. `contents.on('ipc-message')`
|
|
||||||
2. `contents.mainFrame.on(channel)`
|
|
||||||
3. `contents.ipc.on(channel)`
|
|
||||||
4. `ipcMain.on(channel)`
|
|
||||||
|
|
||||||
Handlers registered with `invoke` will be checked in the following order. The
|
|
||||||
first one that is defined will be called, the rest will be ignored.
|
|
||||||
|
|
||||||
1. `contents.mainFrame.handle(channel)`
|
|
||||||
2. `contents.handle(channel)`
|
|
||||||
3. `ipcMain.handle(channel)`
|
|
||||||
|
|
||||||
A handler or event listener registered on the WebContents will receive IPC
|
|
||||||
messages sent from any frame, including child frames. In most cases, only the
|
|
||||||
main frame can send IPC messages. However, if the `nodeIntegrationInSubFrames`
|
|
||||||
option is enabled, it is possible for child frames to send IPC messages also.
|
|
||||||
In that case, handlers should check the `senderFrame` property of the IPC event
|
|
||||||
to ensure that the message is coming from the expected frame. Alternatively,
|
|
||||||
register handlers on the appropriate frame directly using the
|
|
||||||
[`WebFrameMain.ipc`](web-frame-main.md#frameipc-readonly) interface.
|
|
||||||
|
|
||||||
#### `contents.audioMuted`
|
#### `contents.audioMuted`
|
||||||
|
|
||||||
A `boolean` property that determines whether this page is muted.
|
A `boolean` property that determines whether this page is muted.
|
||||||
|
|||||||
@@ -140,31 +140,6 @@ ipcRenderer.on('port', (e, msg) => {
|
|||||||
|
|
||||||
### Instance Properties
|
### Instance Properties
|
||||||
|
|
||||||
#### `frame.ipc` _Readonly_
|
|
||||||
|
|
||||||
An [`IpcMain`](ipc-main.md) instance scoped to the frame.
|
|
||||||
|
|
||||||
IPC messages sent with `ipcRenderer.send`, `ipcRenderer.sendSync` or
|
|
||||||
`ipcRenderer.postMessage` will be delivered in the following order:
|
|
||||||
|
|
||||||
1. `contents.on('ipc-message')`
|
|
||||||
2. `contents.mainFrame.on(channel)`
|
|
||||||
3. `contents.ipc.on(channel)`
|
|
||||||
4. `ipcMain.on(channel)`
|
|
||||||
|
|
||||||
Handlers registered with `invoke` will be checked in the following order. The
|
|
||||||
first one that is defined will be called, the rest will be ignored.
|
|
||||||
|
|
||||||
1. `contents.mainFrame.handle(channel)`
|
|
||||||
2. `contents.handle(channel)`
|
|
||||||
3. `ipcMain.handle(channel)`
|
|
||||||
|
|
||||||
In most cases, only the main frame of a WebContents can send or receive IPC
|
|
||||||
messages. However, if the `nodeIntegrationInSubFrames` option is enabled, it is
|
|
||||||
possible for child frames to send and receive IPC messages also. The
|
|
||||||
[`WebContents.ipc`](web-contents.md#contentsipc-readonly) interface may be more
|
|
||||||
convenient when `nodeIntegrationInSubFrames` is not enabled.
|
|
||||||
|
|
||||||
#### `frame.url` _Readonly_
|
#### `frame.url` _Readonly_
|
||||||
|
|
||||||
A `string` representing the current URL of the frame.
|
A `string` representing the current URL of the frame.
|
||||||
|
|||||||
@@ -556,7 +556,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
|
|||||||
* `header` string (optional) - string to be printed as page header.
|
* `header` string (optional) - string to be printed as page header.
|
||||||
* `footer` string (optional) - string to be printed as page footer.
|
* `footer` string (optional) - string to be printed as page footer.
|
||||||
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
|
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
|
||||||
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns.
|
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`.
|
||||||
|
|
||||||
Returns `Promise<void>`
|
Returns `Promise<void>`
|
||||||
|
|
||||||
@@ -565,21 +565,21 @@ Prints `webview`'s web page. Same as `webContents.print([options])`.
|
|||||||
### `<webview>.printToPDF(options)`
|
### `<webview>.printToPDF(options)`
|
||||||
|
|
||||||
* `options` Object
|
* `options` Object
|
||||||
* `landscape` boolean (optional) - Paper orientation.`true` for landscape, `false` for portrait. Defaults to false.
|
* `headerFooter` Record<string, string> (optional) - the header and footer for the PDF.
|
||||||
* `displayHeaderFooter` boolean (optional) - Whether to display header and footer. Defaults to false.
|
* `title` string - The title for the PDF header.
|
||||||
* `printBackground` boolean (optional) - Whether to print background graphics. Defaults to false.
|
* `url` string - the url for the PDF footer.
|
||||||
* `scale` number(optional) - Scale of the webpage rendering. Defaults to 1.
|
* `landscape` boolean (optional) - `true` for landscape, `false` for portrait.
|
||||||
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A0`, `A1`, `A2`, `A3`,
|
* `marginsType` Integer (optional) - Specifies the type of margins to use. Uses 0 for
|
||||||
`A4`, `A5`, `A6`, `Legal`, `Letter`, `Tabloid`, `Ledger`, or an Object containing `height` and `width` in inches. Defaults to `Letter`.
|
default margin, 1 for no margin, and 2 for minimum margin.
|
||||||
* `margins` Object (optional)
|
and `width` in microns.
|
||||||
* `top` number (optional) - Top margin in inches. Defaults to 1cm (~0.4 inches).
|
* `scaleFactor` number (optional) - The scale factor of the web page. Can range from 0 to 100.
|
||||||
* `bottom` number (optional) - Bottom margin in inches. Defaults to 1cm (~0.4 inches).
|
* `pageRanges` Record<string, number> (optional) - The page range to print. On macOS, only the first range is honored.
|
||||||
* `left` number (optional) - Left margin in inches. Defaults to 1cm (~0.4 inches).
|
* `from` number - Index of the first page to print (0-based).
|
||||||
* `right` number (optional) - Right margin in inches. Defaults to 1cm (~0.4 inches).
|
* `to` number - Index of the last page to print (inclusive) (0-based).
|
||||||
* `pageRanges` string (optional) - Paper ranges to print, e.g., '1-5, 8, 11-13'. Defaults to the empty string, which means print all pages.
|
* `pageSize` string | Size (optional) - Specify page size of the generated PDF. Can be `A3`,
|
||||||
* `headerTemplate` string (optional) - HTML template for the print header. Should be valid HTML markup with following classes used to inject printing values into them: `date` (formatted print date), `title` (document title), `url` (document location), `pageNumber` (current page number) and `totalPages` (total pages in the document). For example, `<span class=title></span>` would generate span containing the title.
|
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`
|
||||||
* `footerTemplate` string (optional) - HTML template for the print footer. Should use the same format as the `headerTemplate`.
|
* `printBackground` boolean (optional) - Whether to print CSS backgrounds.
|
||||||
* `preferCSSPageSize` boolean (optional) - Whether or not to prefer page size as defined by css. Defaults to false, in which case the content will be scaled to fit the paper size.
|
* `printSelectionOnly` boolean (optional) - Whether to print selection only.
|
||||||
|
|
||||||
Returns `Promise<Uint8Array>` - Resolves with the generated PDF data.
|
Returns `Promise<Uint8Array>` - Resolves with the generated PDF data.
|
||||||
|
|
||||||
@@ -805,6 +805,33 @@ const requestId = webview.findInPage('test')
|
|||||||
console.log(requestId)
|
console.log(requestId)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Event: 'new-window'
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
|
||||||
|
* `url` string
|
||||||
|
* `frameName` string
|
||||||
|
* `disposition` string - Can be `default`, `foreground-tab`, `background-tab`,
|
||||||
|
`new-window`, `save-to-disk` and `other`.
|
||||||
|
* `options` BrowserWindowConstructorOptions - The options which should be used for creating the new
|
||||||
|
[`BrowserWindow`](browser-window.md).
|
||||||
|
|
||||||
|
Fired when the guest page attempts to open a new browser window.
|
||||||
|
|
||||||
|
The following example code opens the new url in system's default browser.
|
||||||
|
|
||||||
|
```javascript
|
||||||
|
const { shell } = require('electron')
|
||||||
|
const webview = document.querySelector('webview')
|
||||||
|
|
||||||
|
webview.addEventListener('new-window', async (e) => {
|
||||||
|
const protocol = (new URL(e.url)).protocol
|
||||||
|
if (protocol === 'http:' || protocol === 'https:') {
|
||||||
|
await shell.openExternal(e.url)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
### Event: 'will-navigate'
|
### Event: 'will-navigate'
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
|
|||||||
@@ -12,88 +12,8 @@ This document uses the following convention to categorize breaking changes:
|
|||||||
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||||
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||||
|
|
||||||
## Planned Breaking API Changes (22.0)
|
|
||||||
|
|
||||||
### 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 21
|
|
||||||
webContents.on('new-window', (event) => {
|
|
||||||
event.preventDefault()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Replace with
|
|
||||||
webContents.setWindowOpenHandler((details) => {
|
|
||||||
return { action: 'deny' }
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
## Planned Breaking API Changes (20.0)
|
## Planned Breaking API Changes (20.0)
|
||||||
|
|
||||||
### Behavior Changed: V8 Memory Cage enabled
|
|
||||||
|
|
||||||
The V8 memory cage has been enabled, which has implications for native modules
|
|
||||||
which wrap non-V8 memory with `ArrayBuffer` or `Buffer`. See the [blog post
|
|
||||||
about the V8 memory cage](https://www.electronjs.org/blog/v8-memory-cage) for
|
|
||||||
more details.
|
|
||||||
|
|
||||||
### API Changed: `webContents.printToPDF()`
|
|
||||||
|
|
||||||
`webContents.printToPDF()` has been modified to conform to [`Page.printToPDF`](https://chromedevtools.github.io/devtools-protocol/tot/Page/#method-printToPDF) in the Chrome DevTools Protocol. This has been changes in order to
|
|
||||||
address changes upstream that made our previous implementation untenable and rife with bugs.
|
|
||||||
|
|
||||||
**Arguments Changed**
|
|
||||||
|
|
||||||
* `pageRanges`
|
|
||||||
|
|
||||||
**Arguments Removed**
|
|
||||||
|
|
||||||
* `printSelectionOnly`
|
|
||||||
* `marginsType`
|
|
||||||
* `headerFooter`
|
|
||||||
* `scaleFactor`
|
|
||||||
|
|
||||||
**Arguments Added**
|
|
||||||
|
|
||||||
* `headerTemplate`
|
|
||||||
* `footerTemplate`
|
|
||||||
* `displayHeaderFooter`
|
|
||||||
* `margins`
|
|
||||||
* `scale`
|
|
||||||
* `preferCSSPageSize`
|
|
||||||
|
|
||||||
```js
|
|
||||||
// Main process
|
|
||||||
const { webContents } = require('electron')
|
|
||||||
|
|
||||||
webContents.printToPDF({
|
|
||||||
landscape: true,
|
|
||||||
displayHeaderFooter: true,
|
|
||||||
printBackground: true,
|
|
||||||
scale: 2,
|
|
||||||
pageSize: 'Ledger',
|
|
||||||
margins: {
|
|
||||||
top: 2,
|
|
||||||
bottom: 2,
|
|
||||||
left: 2,
|
|
||||||
right: 2
|
|
||||||
},
|
|
||||||
pageRanges: '1-5, 8, 11-13',
|
|
||||||
headerTemplate: '<h1>Title</h1>',
|
|
||||||
footerTemplate: '<div><span class="pageNumber"></span></div>',
|
|
||||||
preferCSSPageSize: true
|
|
||||||
}).then(data => {
|
|
||||||
fs.writeFile(pdfPath, data, (error) => {
|
|
||||||
if (error) throw error
|
|
||||||
console.log(`Wrote PDF successfully to ${pdfPath}`)
|
|
||||||
})
|
|
||||||
}).catch(error => {
|
|
||||||
console.log(`Failed to write PDF to ${pdfPath}: `, error)
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
### Default Changed: renderers without `nodeIntegration: true` are sandboxed by default
|
### Default Changed: renderers without `nodeIntegration: true` are sandboxed by default
|
||||||
|
|
||||||
Previously, renderers that specified a preload script defaulted to being
|
Previously, renderers that specified a preload script defaulted to being
|
||||||
@@ -114,13 +34,6 @@ window manager. There is not a direct equivalent for Wayland, and the known
|
|||||||
workarounds have unacceptable tradeoffs (e.g. Window.is_skip_taskbar in GNOME
|
workarounds have unacceptable tradeoffs (e.g. Window.is_skip_taskbar in GNOME
|
||||||
requires unsafe mode), so Electron is unable to support this feature on Linux.
|
requires unsafe mode), so Electron is unable to support this feature on Linux.
|
||||||
|
|
||||||
### API Changed: `session.setDevicePermissionHandler(handler)`
|
|
||||||
|
|
||||||
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
|
|
||||||
is the origin that is checking for device permission.
|
|
||||||
|
|
||||||
## Planned Breaking API Changes (19.0)
|
## Planned Breaking API Changes (19.0)
|
||||||
|
|
||||||
### Removed: IA32 Linux binaries
|
### Removed: IA32 Linux binaries
|
||||||
@@ -462,7 +375,7 @@ value.
|
|||||||
In Electron 12, `contextIsolation` will be enabled by default. To restore
|
In Electron 12, `contextIsolation` will be enabled by default. To restore
|
||||||
the previous behavior, `contextIsolation: false` must be specified in WebPreferences.
|
the previous behavior, `contextIsolation: false` must be specified in WebPreferences.
|
||||||
|
|
||||||
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation) for the security of your application.
|
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application.
|
||||||
|
|
||||||
Another implication is that `require()` cannot be used in the renderer process unless
|
Another implication is that `require()` cannot be used in the renderer process unless
|
||||||
`nodeIntegration` is `true` and `contextIsolation` is `false`.
|
`nodeIntegration` is `true` and `contextIsolation` is `false`.
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ See [issues](issues.md) for more information.
|
|||||||
Most pull requests opened against the `electron/electron` repository include
|
Most pull requests opened against the `electron/electron` repository include
|
||||||
changes to either the C/C++ code in the `shell/` folder,
|
changes to either the C/C++ code in the `shell/` folder,
|
||||||
the TypeScript code in the `lib/` folder, the documentation in `docs/`,
|
the TypeScript code in the `lib/` folder, the documentation in `docs/`,
|
||||||
or tests in the `spec/` folder.
|
or tests in the `spec/` and `spec-main/` folders.
|
||||||
|
|
||||||
See [pull requests](pull-requests.md) for more information.
|
See [pull requests](pull-requests.md) for more information.
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ If you want to add a new API module to Electron, you'll want to look in [creatin
|
|||||||
|
|
||||||
Electron has a fully-fledged governance system that oversees activity in Electron and whose working groups are responsible for areas like APIs, releases, and upgrades to Electron's dependencies including Chromium and Node.js. Depending on how frequently and to what end you want to contribute, you may want to consider joining a working group.
|
Electron has a fully-fledged governance system that oversees activity in Electron and whose working groups are responsible for areas like APIs, releases, and upgrades to Electron's dependencies including Chromium and Node.js. Depending on how frequently and to what end you want to contribute, you may want to consider joining a working group.
|
||||||
|
|
||||||
Details about each group and their responsibilities can be found in the [governance repo](https://github.com/electron/governance).
|
Details about each group and their reponsibilities can be found in the [governance repo](https://github.com/electron/governance).
|
||||||
|
|
||||||
## Patches in Electron
|
## Patches in Electron
|
||||||
|
|
||||||
|
|||||||
@@ -281,22 +281,9 @@ $ cd electron
|
|||||||
$ gclient sync -f
|
$ gclient sync -f
|
||||||
```
|
```
|
||||||
|
|
||||||
This may also happen if you have checked out a branch (as opposed to having a detached head) in `electron/src/`
|
|
||||||
or some other dependency’s repository. If that is the case, a `git checkout --detach HEAD` in the appropriate repository should do the trick.
|
|
||||||
|
|
||||||
### I'm being asked for a username/password for chromium-internal.googlesource.com
|
### I'm being asked for a username/password for chromium-internal.googlesource.com
|
||||||
|
|
||||||
If you see a prompt for `Username for 'https://chrome-internal.googlesource.com':` when running `gclient sync` on Windows, it's probably because the `DEPOT_TOOLS_WIN_TOOLCHAIN` environment variable is not set to 0. Open `Control Panel` → `System and Security` → `System` → `Advanced system settings` and add a system variable
|
If you see a prompt for `Username for 'https://chrome-internal.googlesource.com':` when running `gclient sync` on Windows, it's probably because the `DEPOT_TOOLS_WIN_TOOLCHAIN` environment variable is not set to 0. Open `Control Panel` → `System and Security` → `System` → `Advanced system settings` and add a system variable
|
||||||
`DEPOT_TOOLS_WIN_TOOLCHAIN` with value `0`. This tells `depot_tools` to use
|
`DEPOT_TOOLS_WIN_TOOLCHAIN` with value `0`. This tells `depot_tools` to use
|
||||||
your locally installed version of Visual Studio (by default, `depot_tools` will
|
your locally installed version of Visual Studio (by default, `depot_tools` will
|
||||||
try to download a Google-internal version that only Googlers have access to).
|
try to download a Google-internal version that only Googlers have access to).
|
||||||
|
|
||||||
### `e` Module not found
|
|
||||||
|
|
||||||
If `e` is not recognized despite running `npm i -g @electron/build-tools`, ie:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
Error: Cannot find module '/Users/<user>/.electron_build_tools/src/e'
|
|
||||||
```
|
|
||||||
|
|
||||||
We recommend installing Node through [nvm](https://github.com/nvm-sh/nvm). This allows for easier Node version management, and is often a fix for missing `e` modules.
|
|
||||||
|
|||||||
@@ -47,10 +47,10 @@ $ sudo yum install clang dbus-devel gtk3-devel libnotify-devel \
|
|||||||
On Fedora, install the following libraries:
|
On Fedora, install the following libraries:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
$ sudo dnf install clang dbus-devel gperf gtk3-devel \
|
$ sudo dnf install clang dbus-devel gtk3-devel libnotify-devel \
|
||||||
libnotify-devel libgnome-keyring-devel libcap-devel \
|
libgnome-keyring-devel xorg-x11-server-utils libcap-devel \
|
||||||
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
|
cups-devel libXtst-devel alsa-lib-devel libXrandr-devel \
|
||||||
nss-devel python-dbusmock
|
nss-devel python-dbusmock openjdk-8-jre
|
||||||
```
|
```
|
||||||
|
|
||||||
On Arch Linux / Manjaro, install the following libraries:
|
On Arch Linux / Manjaro, install the following libraries:
|
||||||
|
|||||||
@@ -13,46 +13,6 @@ Follow the guidelines below for building **Electron itself** on macOS, for the p
|
|||||||
* [node.js](https://nodejs.org) (external)
|
* [node.js](https://nodejs.org) (external)
|
||||||
* Python >= 3.7
|
* Python >= 3.7
|
||||||
|
|
||||||
### Arm64-specific prerequisites
|
|
||||||
|
|
||||||
* Rosetta 2
|
|
||||||
* We recommend installing Rosetta if using dependencies that need to cross-compile on x64 and arm64 machines. Rosetta can be installed by using the softwareupdate command line tool.
|
|
||||||
* `$ softwareupdate --install-rosetta`
|
|
||||||
|
|
||||||
## Building Electron
|
## Building Electron
|
||||||
|
|
||||||
See [Build Instructions: GN](build-instructions-gn.md).
|
See [Build Instructions: GN](build-instructions-gn.md).
|
||||||
|
|
||||||
## Troubleshooting
|
|
||||||
|
|
||||||
### Xcode "incompatible architecture" errors (MacOS arm64-specific)
|
|
||||||
|
|
||||||
If both Xcode and Xcode command line tools are installed (`$ xcode -select --install`, or directly download the correct version [here](https://developer.apple.com/download/all/?q=command%20line%20tools)), but the stack trace says otherwise like so:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
xcrun: error: unable to load libxcrun
|
|
||||||
(dlopen(/Users/<user>/.electron_build_tools/third_party/Xcode/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib (http://xcode.app/Contents/Developer/usr/lib/libxcrun.dylib), 0x0005):
|
|
||||||
tried: '/Users/<user>/.electron_build_tools/third_party/Xcode/Xcode.app/Contents/Developer/usr/lib/libxcrun.dylib (http://xcode.app/Contents/Developer/usr/lib/libxcrun.dylib)'
|
|
||||||
(mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e))), '/Users/<user>/.electron_build_tools/third_party/Xcode/Xcode-11.1.0.app/Contents/Developer/usr/lib/libxcrun.dylib (http://xcode-11.1.0.app/Contents/Developer/usr/lib/libxcrun.dylib)' (mach-o file, but is an incompatible architecture (have (x86_64), need (arm64e)))).`
|
|
||||||
```
|
|
||||||
|
|
||||||
If you are on arm64 architecture, the build script may be pointing to the wrong Xcode version (11.x.y doesn't support arm64). Navigate to `/Users/<user>/.electron_build_tools/third_party/Xcode/` and rename `Xcode-13.3.0.app` to `Xcode.app` to ensure the right Xcode version is used.
|
|
||||||
|
|
||||||
### Certificates fail to verify
|
|
||||||
|
|
||||||
installing [`certifi`](https://pypi.org/project/certifi/) will fix the following error:
|
|
||||||
|
|
||||||
```sh
|
|
||||||
________ running 'python3 src/tools/clang/scripts/update.py' in '/Users/<user>/electron'
|
|
||||||
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac_arm64/clang-llvmorg-15-init-15652-g89a99ec9-1.tgz
|
|
||||||
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
|
|
||||||
Retrying in 5 s ...
|
|
||||||
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac_arm64/clang-llvmorg-15-init-15652-g89a99ec9-1.tgz
|
|
||||||
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
|
|
||||||
Retrying in 10 s ...
|
|
||||||
Downloading https://commondatastorage.googleapis.com/chromium-browser-clang/Mac_arm64/clang-llvmorg-15-init-15652-g89a99ec9-1.tgz
|
|
||||||
<urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>
|
|
||||||
Retrying in 20 s ...
|
|
||||||
```
|
|
||||||
|
|
||||||
This issue has to do with Python 3.6 using its [own](https://github.com/python/cpython/blob/560ea272b01acaa6c531cc7d94331b2ef0854be6/Mac/BuildScript/resources/ReadMe.rtf#L35) copy of OpenSSL in lieu of the deprecated Apple-supplied OpenSSL libraries. `certifi` adds a curated bundle of default root certificates. This issue is documented in the Electron repo [here](https://github.com/electron/build-tools/issues/55). Further information about this issue can be found [here](https://stackoverflow.com/questions/27835619/urllib-and-ssl-certificate-verify-failed-error) and [here](https://stackoverflow.com/questions/40684543/how-to-make-python-use-ca-certificates-from-mac-os-truststore).
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Some of the more common approaches are outlined below.
|
|||||||
|
|
||||||
Chromium contains logging macros which can aid debugging by printing information to console in C++ and Objective-C++.
|
Chromium contains logging macros which can aid debugging by printing information to console in C++ and Objective-C++.
|
||||||
|
|
||||||
You might use this to print out variable values, function names, and line numbers, amongst other things.
|
You might use this to print out variable values, function names, and line numbers, amonst other things.
|
||||||
|
|
||||||
Some examples:
|
Some examples:
|
||||||
|
|
||||||
@@ -25,7 +25,7 @@ See [logging.h](https://chromium.googlesource.com/chromium/src/base/+/refs/heads
|
|||||||
|
|
||||||
## Printing Stacktraces
|
## Printing Stacktraces
|
||||||
|
|
||||||
Chromium contains a helper to print stack traces to console without interrupting the program.
|
Chromium contains a helper to print stack traces to console without interrrupting the program.
|
||||||
|
|
||||||
```cpp
|
```cpp
|
||||||
#include "base/debug/stack_trace.h"
|
#include "base/debug/stack_trace.h"
|
||||||
|
|||||||
@@ -72,7 +72,8 @@ Electron
|
|||||||
| | message loop into Chromium's message loop.
|
| | message loop into Chromium's message loop.
|
||||||
| └── api/ - The implementation of common APIs, and foundations of
|
| └── api/ - The implementation of common APIs, and foundations of
|
||||||
| Electron's built-in modules.
|
| Electron's built-in modules.
|
||||||
├── spec/ - Components of Electron's test suite run in the main process.
|
├── spec/ - Components of Electron's test suite run in the renderer process.
|
||||||
|
├── spec-main/ - Components of Electron's test suite run in the main process.
|
||||||
└── BUILD.gn - Building rules of Electron.
|
└── BUILD.gn - Building rules of Electron.
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -32,6 +32,9 @@ app (surprise!) that can be found in the `spec` folder. Note that it has
|
|||||||
its own `package.json` and that its dependencies are therefore not defined
|
its own `package.json` and that its dependencies are therefore not defined
|
||||||
in the top-level `package.json`.
|
in the top-level `package.json`.
|
||||||
|
|
||||||
|
To run only tests in a specific process, run `npm run test --runners=PROCESS`
|
||||||
|
where `PROCESS` is one of `main` or `remote`.
|
||||||
|
|
||||||
To run only specific tests matching a pattern, run `npm run test --
|
To run only specific tests matching a pattern, run `npm run test --
|
||||||
-g=PATTERN`, replacing the `PATTERN` with a regex that matches the tests
|
-g=PATTERN`, replacing the `PATTERN` with a regex that matches the tests
|
||||||
you would like to run. As an example: If you want to run only IPC tests, you
|
you would like to run. As an example: If you want to run only IPC tests, you
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
const { contextBridge, ipcRenderer } = require('electron')
|
const { contextBridge, ipcRenderer } = require('electron')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
contextBridge.exposeInMainWorld('electron', {
|
contextBridge.exposeInMainWorld('electron', {
|
||||||
startDrag: (fileName) => {
|
startDrag: (fileName) => {
|
||||||
|
|||||||
@@ -8,24 +8,20 @@ function createWindow () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.on('select-hid-device', (event, details, callback) => {
|
mainWindow.webContents.session.on('select-hid-device', (event, details, callback) => {
|
||||||
//Add events to handle devices being added or removed before the callback on
|
|
||||||
//`select-hid-device` is called.
|
|
||||||
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
|
|
||||||
console.log('hid-device-added FIRED WITH', device)
|
|
||||||
//Optionally update details.deviceList
|
|
||||||
})
|
|
||||||
|
|
||||||
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
|
|
||||||
console.log('hid-device-removed FIRED WITH', device)
|
|
||||||
//Optionally update details.deviceList
|
|
||||||
})
|
|
||||||
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (details.deviceList && details.deviceList.length > 0) {
|
if (details.deviceList && details.deviceList.length > 0) {
|
||||||
callback(details.deviceList[0].deviceId)
|
callback(details.deviceList[0].deviceId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
|
||||||
|
console.log('hid-device-added FIRED WITH', device)
|
||||||
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
|
||||||
|
console.log('hid-device-removed FIRED WITH', device)
|
||||||
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||||
if (permission === 'hid' && details.securityOrigin === 'file:///') {
|
if (permission === 'hid' && details.securityOrigin === 'file:///') {
|
||||||
return true
|
return true
|
||||||
|
|||||||
@@ -8,19 +8,6 @@ function createWindow () {
|
|||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => {
|
mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => {
|
||||||
|
|
||||||
//Add listeners to handle ports being added or removed before the callback for `select-serial-port`
|
|
||||||
//is called.
|
|
||||||
mainWindow.webContents.session.on('serial-port-added', (event, port) => {
|
|
||||||
console.log('serial-port-added FIRED WITH', port)
|
|
||||||
//Optionally update portList to add the new port
|
|
||||||
})
|
|
||||||
|
|
||||||
mainWindow.webContents.session.on('serial-port-removed', (event, port) => {
|
|
||||||
console.log('serial-port-removed FIRED WITH', port)
|
|
||||||
//Optionally update portList to remove the port
|
|
||||||
})
|
|
||||||
|
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
if (portList && portList.length > 0) {
|
if (portList && portList.length > 0) {
|
||||||
callback(portList[0].portId)
|
callback(portList[0].portId)
|
||||||
@@ -29,16 +16,28 @@ function createWindow () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.session.on('serial-port-added', (event, port) => {
|
||||||
|
console.log('serial-port-added FIRED WITH', port)
|
||||||
|
})
|
||||||
|
|
||||||
|
mainWindow.webContents.session.on('serial-port-removed', (event, port) => {
|
||||||
|
console.log('serial-port-removed FIRED WITH', port)
|
||||||
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||||
if (permission === 'serial' && details.securityOrigin === 'file:///') {
|
if (permission === 'serial' && details.securityOrigin === 'file:///') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
mainWindow.webContents.session.setDevicePermissionHandler((details) => {
|
||||||
if (details.deviceType === 'serial' && details.origin === 'file://') {
|
if (details.deviceType === 'serial' && details.origin === 'file://') {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
})
|
})
|
||||||
|
|
||||||
mainWindow.loadFile('index.html')
|
mainWindow.loadFile('index.html')
|
||||||
|
|||||||
@@ -1,53 +0,0 @@
|
|||||||
---
|
|
||||||
title: 'ASAR Integrity'
|
|
||||||
description: 'An experimental feature that ensures the validity of ASAR contents at runtime.'
|
|
||||||
slug: asar-integrity
|
|
||||||
hide_title: false
|
|
||||||
---
|
|
||||||
|
|
||||||
## Platform Support
|
|
||||||
|
|
||||||
Currently ASAR integrity checking is only supported on macOS.
|
|
||||||
|
|
||||||
## Requirements
|
|
||||||
|
|
||||||
### Electron Forge / Electron Packager
|
|
||||||
|
|
||||||
If you are using `>= electron-packager@15.4.0` or `>= @electron-forge/core@6.0.0-beta.61` then all these requirements are met for you automatically and you can skip to [Toggling the Fuse](#toggling-the-fuse).
|
|
||||||
|
|
||||||
### Other build systems
|
|
||||||
|
|
||||||
In order to enable ASAR integrity checking you need to ensure that your `app.asar` file was generated by a version of the `asar` npm package that supports asar integrity. Support was introduced in version `3.1.0`.
|
|
||||||
|
|
||||||
Your must then populate a valid `ElectronAsarIntegrity` dictionary block in your packaged apps `Info.plist`. An example is included below.
|
|
||||||
|
|
||||||
```plist
|
|
||||||
<key>ElectronAsarIntegrity</key>
|
|
||||||
<dict>
|
|
||||||
<key>Resources/app.asar</key>
|
|
||||||
<dict>
|
|
||||||
<key>algorithm</key>
|
|
||||||
<string>SHA256</string>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac</string>
|
|
||||||
</dict>
|
|
||||||
</dict>
|
|
||||||
```
|
|
||||||
|
|
||||||
Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of the ASAR header using the given algorithm. The `asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value.
|
|
||||||
|
|
||||||
## Toggling the Fuse
|
|
||||||
|
|
||||||
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path.
|
|
||||||
|
|
||||||
```js
|
|
||||||
require('@electron/fuses').flipFuses(
|
|
||||||
// E.g. /a/b/Foo.app
|
|
||||||
pathToPackagedApp,
|
|
||||||
{
|
|
||||||
version: FuseVersion.V1,
|
|
||||||
[FuseV1Options.EnableEmbeddedAsarIntegrityValidation]: true,
|
|
||||||
[FuseV1Options.OnlyLoadAppFromAsar]: true
|
|
||||||
}
|
|
||||||
)
|
|
||||||
```
|
|
||||||
@@ -36,14 +36,12 @@ the WebHID API:
|
|||||||
can be used to select a HID device when a call to
|
can be used to select a HID device when a call to
|
||||||
`navigator.hid.requestDevice` is made. Additionally the [`hid-device-added`](../api/session.md#event-hid-device-added)
|
`navigator.hid.requestDevice` is made. Additionally the [`hid-device-added`](../api/session.md#event-hid-device-added)
|
||||||
and [`hid-device-removed`](../api/session.md#event-hid-device-removed) events
|
and [`hid-device-removed`](../api/session.md#event-hid-device-removed) events
|
||||||
on the Session can be used to handle devices being plugged in or unplugged
|
on the Session can be used to handle devices being plugged in or unplugged during the
|
||||||
when handling the `select-hid-device` event.
|
`navigator.hid.requestDevice` process.
|
||||||
**Note:** These events only fire until the callback from `select-hid-device`
|
|
||||||
is called. They are not intended to be used as a generic hid device listener.
|
|
||||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||||
can be used to provide default permissioning to devices without first calling
|
can be used to provide default permissioning to devices without first calling
|
||||||
for permission to devices via `navigator.hid.requestDevice`. Additionally,
|
for permission to devices via `navigator.hid.requestDevice`. Additionally,
|
||||||
the default behavior of Electron is to store granted device permission through
|
the default behavior of Electron is to store granted device permision through
|
||||||
the lifetime of the corresponding WebContents. If longer term storage is
|
the lifetime of the corresponding WebContents. If longer term storage is
|
||||||
needed, a developer can store granted device permissions (eg when handling
|
needed, a developer can store granted device permissions (eg when handling
|
||||||
the `select-hid-device` event) and then read from that storage with
|
the `select-hid-device` event) and then read from that storage with
|
||||||
@@ -84,15 +82,12 @@ There are several additional APIs for working with the Web Serial API:
|
|||||||
|
|
||||||
* The [`serial-port-added`](../api/session.md#event-serial-port-added)
|
* The [`serial-port-added`](../api/session.md#event-serial-port-added)
|
||||||
and [`serial-port-removed`](../api/session.md#event-serial-port-removed) events
|
and [`serial-port-removed`](../api/session.md#event-serial-port-removed) events
|
||||||
on the Session can be used to handle devices being plugged in or unplugged
|
on the Session can be used to handle devices being plugged in or unplugged during the
|
||||||
when handling the `select-serial-port` event.
|
`navigator.serial.requestPort` process.
|
||||||
**Note:** These events only fire until the callback from `select-serial-port`
|
|
||||||
is called. They are not intended to be used as a generic serial port
|
|
||||||
listener.
|
|
||||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||||
can be used to provide default permissioning to devices without first calling
|
can be used to provide default permissioning to devices without first calling
|
||||||
for permission to devices via `navigator.serial.requestPort`. Additionally,
|
for permission to devices via `navigator.serial.requestPort`. Additionally,
|
||||||
the default behavior of Electron is to store granted device permission through
|
the default behavior of Electron is to store granted device permision through
|
||||||
the lifetime of the corresponding WebContents. If longer term storage is
|
the lifetime of the corresponding WebContents. If longer term storage is
|
||||||
needed, a developer can store granted device permissions (eg when handling
|
needed, a developer can store granted device permissions (eg when handling
|
||||||
the `select-serial-port` event) and then read from that storage with
|
the `select-serial-port` event) and then read from that storage with
|
||||||
|
|||||||
@@ -24,11 +24,10 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
|||||||
| 14.0.0 | -- | 2021-May-27 | 2021-Aug-31 | M93 | v14.17 | 🚫 |
|
| 14.0.0 | -- | 2021-May-27 | 2021-Aug-31 | M93 | v14.17 | 🚫 |
|
||||||
| 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | M94 | v16.5 | 🚫 |
|
| 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | M94 | v16.5 | 🚫 |
|
||||||
| 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | M96 | v16.9 | 🚫 |
|
| 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | M96 | v16.9 | 🚫 |
|
||||||
| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | M98 | v16.13 | 🚫 |
|
| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | M98 | v16.13 | ✅ |
|
||||||
| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | v16.13 | ✅ |
|
| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | v16.13 | ✅ |
|
||||||
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | v16.14 | ✅ |
|
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | v16.14 | ✅ |
|
||||||
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | v16.15 | ✅ |
|
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | TBD | ✅ |
|
||||||
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | M106 | TBD | ✅ |
|
|
||||||
|
|
||||||
**Notes:**
|
**Notes:**
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ npm install --save-dev electron@latest
|
|||||||
|
|
||||||
There are several major changes from our 1.x strategy outlined below. Each change is intended to satisfy the needs and priorities of developers/maintainers and app developers.
|
There are several major changes from our 1.x strategy outlined below. Each change is intended to satisfy the needs and priorities of developers/maintainers and app developers.
|
||||||
|
|
||||||
1. Strict use of the [SemVer](#semver) spec
|
1. Strict use of the the [SemVer](#semver) spec
|
||||||
2. Introduction of semver-compliant `-beta` tags
|
2. Introduction of semver-compliant `-beta` tags
|
||||||
3. Introduction of [conventional commit messages](https://conventionalcommits.org/)
|
3. Introduction of [conventional commit messages](https://conventionalcommits.org/)
|
||||||
4. Well-defined stabilization branches
|
4. Well-defined stabilization branches
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ guide!).
|
|||||||
|
|
||||||
You can find the full list of "How to?" in the sidebar. If there is
|
You can find the full list of "How to?" in the sidebar. If there is
|
||||||
something that you would like to do that is not documented, please join
|
something that you would like to do that is not documented, please join
|
||||||
our [Discord server][discord] and let us know!
|
our [Discord server][] and let us know!
|
||||||
|
|
||||||
[discord]: https://discord.gg/electronjs
|
[discord server]: https://discord.com/invite/electron
|
||||||
[fiddle]: https://www.electronjs.org/fiddle
|
[fiddle]: https://www.electronjs.org/fiddle
|
||||||
|
|||||||
@@ -8,52 +8,6 @@ For a subset of Electron functionality it makes sense to disable certain feature
|
|||||||
|
|
||||||
Fuses are the solution to this problem, at a high level they are "magic bits" in the Electron binary that can be flipped when packaging your Electron app to enable / disable certain features / restrictions. Because they are flipped at package time before you code sign your app the OS becomes responsible for ensuring those bits aren't flipped back via OS level code signing validation (Gatekeeper / App Locker).
|
Fuses are the solution to this problem, at a high level they are "magic bits" in the Electron binary that can be flipped when packaging your Electron app to enable / disable certain features / restrictions. Because they are flipped at package time before you code sign your app the OS becomes responsible for ensuring those bits aren't flipped back via OS level code signing validation (Gatekeeper / App Locker).
|
||||||
|
|
||||||
## Current Fuses
|
|
||||||
|
|
||||||
### `runAsNode`
|
|
||||||
|
|
||||||
**Default:** Enabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.RunAsNode`
|
|
||||||
|
|
||||||
The runAsNode fuse toggles whether the `ELECTRON_RUN_AS_NODE` environment variable is respected or not. Please note that if this fuse is disabled then `process.fork` in the main process will not function as expected as it depends on this environment variable to function.
|
|
||||||
|
|
||||||
### `cookieEncryption`
|
|
||||||
|
|
||||||
**Default:** Disabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.EnableCookieEncryption`
|
|
||||||
|
|
||||||
The cookieEncryption fuse toggles whether the cookie store on disk is encrypted using OS level cryptography keys. By default the sqlite database that Chromium uses to store cookies stores the values in plaintext. If you wish to ensure your apps cookies are encrypted in the same way Chrome does then you should enable this fuse. Please note it is a one-way transition, if you enable this fuse existing unencrypted cookies will be encrypted-on-write but if you then disable the fuse again your cookie store will effectively be corrupt and useless. Most apps can safely enable this fuse.
|
|
||||||
|
|
||||||
### `nodeOptions`
|
|
||||||
|
|
||||||
**Default:** Enabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.EnableNodeOptionsEnvironmentVariable`
|
|
||||||
|
|
||||||
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) environment variable is respected or not. This environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
|
|
||||||
|
|
||||||
### `nodeCliInspect`
|
|
||||||
|
|
||||||
**Default:** Enabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.EnableNodeCliInspectArguments`
|
|
||||||
|
|
||||||
The nodeCliInspect fuse toggles whether the `--inspect`, `--inspect-brk`, etc. flags are respected or not. When disabled it also ensures that `SIGUSR1` signal does not initialize the main process inspector. Most apps can safely disable this fuse.
|
|
||||||
|
|
||||||
### `embeddedAsarIntegrityValidation`
|
|
||||||
|
|
||||||
**Default:** Disabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.EnableEmbeddedAsarIntegrityValidation`
|
|
||||||
|
|
||||||
The embeddedAsarIntegrityValidation fuse toggles an experimental feature on macOS that validates the content of the `app.asar` file when it is loaded. This feature is designed to have a minimal performance impact but may marginally slow down file reads from inside the `app.asar` archive.
|
|
||||||
|
|
||||||
For more information on how to use asar integrity validation please read the [Asar Integrity](asar-integrity.md) documentation.
|
|
||||||
|
|
||||||
### `onlyLoadAppFromAsar`
|
|
||||||
|
|
||||||
**Default:** Disabled
|
|
||||||
**@electron/fuses:** `FuseV1Options.OnlyLoadAppFromAsar`
|
|
||||||
|
|
||||||
The onlyLoadAppFromAsar fuse changes the search system that Electron uses to locate your app code. By default Electron will search in the following order `app.asar` -> `app` -> `default_app.asar`. When this fuse is enabled the search order becomes a single entry `app.asar` thus ensuring that when combined with the `embeddedAsarIntegrityValidation` fuse it is impossible to load non-validated code.
|
|
||||||
|
|
||||||
## How do I flip the fuses?
|
## How do I flip the fuses?
|
||||||
|
|
||||||
### The easy way
|
### The easy way
|
||||||
@@ -66,18 +20,11 @@ require('@electron/fuses').flipFuses(
|
|||||||
require('electron'),
|
require('electron'),
|
||||||
// Fuses to flip
|
// Fuses to flip
|
||||||
{
|
{
|
||||||
version: FuseVersion.V1,
|
runAsNode: false
|
||||||
[FuseV1Options.RunAsNode]: false
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
You can validate the fuses have been flipped or check the fuse status of an arbitrary Electron app using the fuses CLI.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npx @electron/fuses read --app /Applications/Foo.app
|
|
||||||
```
|
|
||||||
|
|
||||||
### The hard way
|
### The hard way
|
||||||
|
|
||||||
#### Quick Glossary
|
#### Quick Glossary
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ inAppPurchase.getProducts(PRODUCT_IDS).then(products => {
|
|||||||
console.log(`The price of ${product.localizedTitle} is ${product.formattedPrice}.`)
|
console.log(`The price of ${product.localizedTitle} is ${product.formattedPrice}.`)
|
||||||
})
|
})
|
||||||
|
|
||||||
// Ask the user which product they want to purchase.
|
// Ask the user which product he/she wants to purchase.
|
||||||
const selectedProduct = products[0]
|
const selectedProduct = products[0]
|
||||||
const selectedQuantity = 1
|
const selectedQuantity = 1
|
||||||
|
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ are the different categories and what you can expect on each one:
|
|||||||
- **Examples**: Quick references to add features to your Electron app.
|
- **Examples**: Quick references to add features to your Electron app.
|
||||||
- **Development**: Miscellaneous development guides.
|
- **Development**: Miscellaneous development guides.
|
||||||
- **Distribution**: Learn how to distribute your app to end users.
|
- **Distribution**: Learn how to distribute your app to end users.
|
||||||
- **Testing And Debugging**: How to debug JavaScript, write tests, and other tools used
|
- **Testing and debugging**: How to debug JavaScript, write tests, and other tools used
|
||||||
to create quality Electron applications.
|
to create quality Electron applications.
|
||||||
- **References**: Useful links to better understand how the Electron project works
|
- **References**: Useful links to better understand how the Electron project works
|
||||||
and is organized.
|
and is organized.
|
||||||
@@ -69,7 +69,7 @@ Are you getting stuck anywhere? Here are a few links to places to look:
|
|||||||
[tutorial]: tutorial-1-prerequisites.md
|
[tutorial]: tutorial-1-prerequisites.md
|
||||||
[api documentation]: ../api/app.md
|
[api documentation]: ../api/app.md
|
||||||
[chromium]: https://www.chromium.org/
|
[chromium]: https://www.chromium.org/
|
||||||
[discord]: https://discord.gg/electronjs
|
[discord]: https://discord.com/invite/APGC3k5yaH
|
||||||
[examples]: examples.md
|
[examples]: examples.md
|
||||||
[fiddle]: https://electronjs.org/fiddle
|
[fiddle]: https://electronjs.org/fiddle
|
||||||
[issue-tracker]: https://github.com/electron/electron/issues
|
[issue-tracker]: https://github.com/electron/electron/issues
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ In `preload.js` use the [`contextBridge`] to inject a method `window.electron.st
|
|||||||
|
|
||||||
```js
|
```js
|
||||||
const { contextBridge, ipcRenderer } = require('electron')
|
const { contextBridge, ipcRenderer } = require('electron')
|
||||||
|
const path = require('path')
|
||||||
|
|
||||||
contextBridge.exposeInMainWorld('electron', {
|
contextBridge.exposeInMainWorld('electron', {
|
||||||
startDrag: (fileName) => {
|
startDrag: (fileName) => {
|
||||||
|
|||||||
@@ -419,18 +419,6 @@ environment that needs to handle both Node.js and browser environments.
|
|||||||
As of writing this article, the popular choices include [Webpack][webpack],
|
As of writing this article, the popular choices include [Webpack][webpack],
|
||||||
[Parcel][parcel], and [rollup.js][rollup].
|
[Parcel][parcel], and [rollup.js][rollup].
|
||||||
|
|
||||||
### 8. Call `Menu.setApplicationMenu(null)` when you do not need a default menu
|
|
||||||
|
|
||||||
Electron will set a default menu on startup with some standard entries. But there are reasons your application might want to change that and it will benefit startup performance.
|
|
||||||
|
|
||||||
#### Why?
|
|
||||||
|
|
||||||
If you build your own menu or use a frameless window without native menu, you should tell Electron early enough to not setup the default menu.
|
|
||||||
|
|
||||||
#### How?
|
|
||||||
|
|
||||||
Call `Menu.setApplicationMenu(null)` before `app.on("ready")`. This will prevent Electron from setting a default menu. See also https://github.com/electron/electron/issues/35512 for a related discussion.
|
|
||||||
|
|
||||||
[security]: ./security.md
|
[security]: ./security.md
|
||||||
[chrome-devtools-tutorial]: https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/
|
[chrome-devtools-tutorial]: https://developers.google.com/web/tools/chrome-devtools/evaluate-performance/
|
||||||
[worker-threads]: https://nodejs.org/api/worker_threads.html
|
[worker-threads]: https://nodejs.org/api/worker_threads.html
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ terminated as well.
|
|||||||
|
|
||||||
The main process also controls your application's lifecycle through Electron's
|
The main process also controls your application's lifecycle through Electron's
|
||||||
[`app`][app] module. This module provides a large set of events and methods
|
[`app`][app] module. This module provides a large set of events and methods
|
||||||
that you can use to add custom application behaviour (for instance, programmatically
|
that you can use to add custom application behaviour (for instance, programatically
|
||||||
quitting your application, modifying the application dock, or showing an About panel).
|
quitting your application, modifying the application dock, or showing an About panel).
|
||||||
|
|
||||||
As a practical example, the app shown in the [quick start guide][quick-start-lifecycle]
|
As a practical example, the app shown in the [quick start guide][quick-start-lifecycle]
|
||||||
|
|||||||
@@ -403,7 +403,7 @@ app.on('window-all-closed', () => {
|
|||||||
```js
|
```js
|
||||||
// preload.js
|
// preload.js
|
||||||
|
|
||||||
// All the Node.js APIs are available in the preload process.
|
// All of the Node.js APIs are available in the preload process.
|
||||||
// It has the same sandbox as a Chrome extension.
|
// It has the same sandbox as a Chrome extension.
|
||||||
window.addEventListener('DOMContentLoaded', () => {
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
const replaceText = (selector, text) => {
|
const replaceText = (selector, text) => {
|
||||||
|
|||||||
@@ -12,10 +12,28 @@ the GPU service and the network service.
|
|||||||
|
|
||||||
See Chromium's [Sandbox design document][sandbox] for more information.
|
See Chromium's [Sandbox design document][sandbox] for more information.
|
||||||
|
|
||||||
Starting from Electron 20, the sandbox is enabled for renderer processes without any
|
## Electron's sandboxing policies
|
||||||
further configuration. If you want to disable the sandbox for a process, see the
|
|
||||||
[Disabling the sandbox for a single process](#disabling-the-sandbox-for-a-single-process)
|
Electron comes with a mixed sandbox environment, meaning sandboxed processes can run
|
||||||
section.
|
alongside privileged ones. By default, renderer processes are not sandboxed, but
|
||||||
|
utility processes are. Note that as in Chromium, the main (browser) process is
|
||||||
|
privileged and cannot be sandboxed.
|
||||||
|
|
||||||
|
Historically, this mixed sandbox approach was established because having Node.js available
|
||||||
|
in the renderer is an extremely powerful tool for app developers. Unfortunately, this
|
||||||
|
feature is also an equally massive security vulnerability.
|
||||||
|
|
||||||
|
Theoretically, unsandboxed renderers are not a problem for desktop applications that
|
||||||
|
only display trusted code, but they make Electron less secure than Chromium for
|
||||||
|
displaying untrusted web content. However, even purportedly trusted code may be
|
||||||
|
dangerous — there are countless attack vectors that malicious actors can use, from
|
||||||
|
cross-site scripting to content injection to man-in-the-middle attacks on remotely loaded
|
||||||
|
websites, just to name a few. For this reason, we recommend enabling renderer sandboxing
|
||||||
|
for the vast majority of cases under an abundance of caution.
|
||||||
|
|
||||||
|
<!--TODO: update this guide when #28466 is either solved or closed -->
|
||||||
|
Note that there is an active discussion in the issue tracker to enable renderer sandboxing
|
||||||
|
by default. See [#28466][issue-28466]) for details.
|
||||||
|
|
||||||
## Sandbox behaviour in Electron
|
## Sandbox behaviour in Electron
|
||||||
|
|
||||||
@@ -28,17 +46,12 @@ When renderer processes in Electron are sandboxed, they behave in the same way a
|
|||||||
regular Chrome renderer would. A sandboxed renderer won't have a Node.js
|
regular Chrome renderer would. A sandboxed renderer won't have a Node.js
|
||||||
environment initialized.
|
environment initialized.
|
||||||
|
|
||||||
|
<!-- TODO(erickzhao): when we have a solid guide for IPC, link it here -->
|
||||||
Therefore, when the sandbox is enabled, renderer processes can only perform privileged
|
Therefore, when the sandbox is enabled, renderer processes can only perform privileged
|
||||||
tasks (such as interacting with the filesystem, making changes to the system, or spawning
|
tasks (such as interacting with the filesystem, making changes to the system, or spawning
|
||||||
subprocesses) by delegating these tasks to the main process via inter-process
|
subprocesses) by delegating these tasks to the main process via inter-process
|
||||||
communication (IPC).
|
communication (IPC).
|
||||||
|
|
||||||
:::note
|
|
||||||
|
|
||||||
For more info on inter-process communication, check out our [IPC guide](./ipc.md).
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
### Preload scripts
|
### Preload scripts
|
||||||
|
|
||||||
In order to allow renderer processes to communicate with the main process, preload
|
In order to allow renderer processes to communicate with the main process, preload
|
||||||
@@ -53,7 +66,7 @@ but can only import a subset of Electron and Node's built-in modules:
|
|||||||
|
|
||||||
In addition, the preload script also polyfills certain Node.js primitives as globals:
|
In addition, the preload script also polyfills certain Node.js primitives as globals:
|
||||||
|
|
||||||
* [`Buffer`](https://nodejs.org/api/buffer.html)
|
* [`Buffer`](https://nodejs.org/api/Buffer.html)
|
||||||
* [`process`](../api/process.md)
|
* [`process`](../api/process.md)
|
||||||
* [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate)
|
* [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate)
|
||||||
* [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args)
|
* [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args)
|
||||||
@@ -70,17 +83,13 @@ privileged APIs to untrusted code running in the renderer process unless
|
|||||||
|
|
||||||
## Configuring the sandbox
|
## Configuring the sandbox
|
||||||
|
|
||||||
For most apps, sandboxing is the best choice. In certain use cases that are incompatible with
|
### Enabling the sandbox for a single process
|
||||||
the sandbox (for instance, when using native node modules in the renderer),
|
|
||||||
it is possible to disable the sandbox for specific processes. This comes with security
|
|
||||||
risks, especially if any untrusted code or content is present in the unsandboxed process.
|
|
||||||
|
|
||||||
### Disabling the sandbox for a single process
|
In Electron, renderer sandboxing can be enabled on a per-process basis with
|
||||||
|
the `sandbox: true` preference in the [`BrowserWindow`][browser-window] constructor.
|
||||||
|
|
||||||
In Electron, renderer sandboxing can be disabled on a per-process basis with
|
```js
|
||||||
the `sandbox: false` preference in the [`BrowserWindow`][browser-window] constructor.
|
// main.js
|
||||||
|
|
||||||
```js title='main.js'
|
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
@@ -91,30 +100,17 @@ app.whenReady().then(() => {
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
Sandboxing is also disabled whenever Node.js integration is enabled in the renderer.
|
|
||||||
This can be done through the BrowserWindow constructor with the `nodeIntegration: true` flag.
|
|
||||||
|
|
||||||
```js title='main.js'
|
|
||||||
app.whenReady().then(() => {
|
|
||||||
const win = new BrowserWindow({
|
|
||||||
webPreferences: {
|
|
||||||
nodeIntegration: true
|
|
||||||
}
|
|
||||||
})
|
|
||||||
win.loadURL('https://google.com')
|
|
||||||
})
|
|
||||||
```
|
|
||||||
|
|
||||||
### Enabling the sandbox globally
|
### Enabling the sandbox globally
|
||||||
|
|
||||||
If you want to force sandboxing for all renderers, you can also use the
|
If you want to force sandboxing for all renderers, you can also use the
|
||||||
[`app.enableSandbox`][enable-sandbox] API. Note that this API has to be called before the
|
[`app.enableSandbox`][enable-sandbox] API. Note that this API has to be called before the
|
||||||
app's `ready` event.
|
app's `ready` event.
|
||||||
|
|
||||||
```js title='main.js'
|
```js
|
||||||
|
// main.js
|
||||||
app.enableSandbox()
|
app.enableSandbox()
|
||||||
app.whenReady().then(() => {
|
app.whenReady().then(() => {
|
||||||
// any sandbox:false calls are overridden since `app.enableSandbox()` was called.
|
// no need to pass `sandbox: true` since `app.enableSandbox()` was called.
|
||||||
const win = new BrowserWindow()
|
const win = new BrowserWindow()
|
||||||
win.loadURL('https://google.com')
|
win.loadURL('https://google.com')
|
||||||
})
|
})
|
||||||
@@ -143,16 +139,16 @@ issues:
|
|||||||
have, to inherit everything we can from Chromium, and to respond quickly to
|
have, to inherit everything we can from Chromium, and to respond quickly to
|
||||||
security issues, but Electron cannot be as secure as Chromium without the
|
security issues, but Electron cannot be as secure as Chromium without the
|
||||||
resources that Chromium is able to dedicate.
|
resources that Chromium is able to dedicate.
|
||||||
1. Some security features in Chrome (such as Safe Browsing and Certificate
|
2. Some security features in Chrome (such as Safe Browsing and Certificate
|
||||||
Transparency) require a centralized authority and dedicated servers, both of
|
Transparency) require a centralized authority and dedicated servers, both of
|
||||||
which run counter to the goals of the Electron project. As such, we disable
|
which run counter to the goals of the Electron project. As such, we disable
|
||||||
those features in Electron, at the cost of the associated security they
|
those features in Electron, at the cost of the associated security they
|
||||||
would otherwise bring.
|
would otherwise bring.
|
||||||
1. There is only one Chromium, whereas there are many thousands of apps built
|
3. There is only one Chromium, whereas there are many thousands of apps built
|
||||||
on Electron, all of which behave slightly differently. Accounting for those
|
on Electron, all of which behave slightly differently. Accounting for those
|
||||||
differences can yield a huge possibility space, and make it challenging to
|
differences can yield a huge possibility space, and make it challenging to
|
||||||
ensure the security of the platform in unusual use cases.
|
ensure the security of the platform in unusual use cases.
|
||||||
1. We can't push security updates to users directly, so we rely on app vendors
|
4. We can't push security updates to users directly, so we rely on app vendors
|
||||||
to upgrade the version of Electron underlying their app in order for
|
to upgrade the version of Electron underlying their app in order for
|
||||||
security updates to reach users.
|
security updates to reach users.
|
||||||
|
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ You should at least follow these steps to improve the security of your applicati
|
|||||||
|
|
||||||
1. [Only load secure content](#1-only-load-secure-content)
|
1. [Only load secure content](#1-only-load-secure-content)
|
||||||
2. [Disable the Node.js integration in all renderers that display remote content](#2-do-not-enable-nodejs-integration-for-remote-content)
|
2. [Disable the Node.js integration in all renderers that display remote content](#2-do-not-enable-nodejs-integration-for-remote-content)
|
||||||
3. [Enable context isolation in all renderers](#3-enable-context-isolation)
|
3. [Enable context isolation in all renderers that display remote content](#3-enable-context-isolation-for-remote-content)
|
||||||
4. [Enable process sandboxing](#4-enable-process-sandboxing)
|
4. [Enable process sandboxing](#4-enable-process-sandboxing)
|
||||||
5. [Use `ses.setPermissionRequestHandler()` in all sessions that load remote content](#5-handle-session-permission-requests-from-remote-content)
|
5. [Use `ses.setPermissionRequestHandler()` in all sessions that load remote content](#5-handle-session-permission-requests-from-remote-content)
|
||||||
6. [Do not disable `webSecurity`](#6-do-not-disable-websecurity)
|
6. [Do not disable `webSecurity`](#6-do-not-disable-websecurity)
|
||||||
@@ -225,7 +225,7 @@ do consume Node.js modules or features. Preload scripts continue to have access
|
|||||||
to `require` and other Node.js features, allowing developers to expose a custom
|
to `require` and other Node.js features, allowing developers to expose a custom
|
||||||
API to remotely loaded content via the [contextBridge API](../api/context-bridge.md).
|
API to remotely loaded content via the [contextBridge API](../api/context-bridge.md).
|
||||||
|
|
||||||
### 3. Enable Context Isolation
|
### 3. Enable Context Isolation for remote content
|
||||||
|
|
||||||
:::info
|
:::info
|
||||||
This recommendation is the default behavior in Electron since 12.0.0.
|
This recommendation is the default behavior in Electron since 12.0.0.
|
||||||
|
|||||||
@@ -38,25 +38,7 @@ called a **preload**.
|
|||||||
## Augmenting the renderer with a preload script
|
## Augmenting the renderer with a preload script
|
||||||
|
|
||||||
A BrowserWindow's preload script runs in a context that has access to both the HTML DOM
|
A BrowserWindow's preload script runs in a context that has access to both the HTML DOM
|
||||||
and a limited subset of Node.js and Electron APIs.
|
and a Node.js environment. Preload scripts are injected before a web page loads in the renderer,
|
||||||
|
|
||||||
:::info Preload script sandboxing
|
|
||||||
|
|
||||||
From Electron 20 onwards, preload scripts are **sandboxed** by default and no longer have access
|
|
||||||
to a full Node.js environment. Practically, this means that you have a polyfilled `require`
|
|
||||||
function that only has access to a limited set of APIs.
|
|
||||||
|
|
||||||
| Available API | Details |
|
|
||||||
| ------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| Electron modules | Renderer process modules |
|
|
||||||
| Node.js modules | [`events`](https://nodejs.org/api/events.html), [`timers`](https://nodejs.org/api/timers.html), [`url`](https://nodejs.org/api/url.html) |
|
|
||||||
| Polyfilled globals | [`Buffer`](https://nodejs.org/api/buffer.html), [`process`](../api/process.md), [`clearImmediate`](https://nodejs.org/api/timers.html#timers_clearimmediate_immediate), [`setImmediate`](https://nodejs.org/api/timers.html#timers_setimmediate_callback_args) |
|
|
||||||
|
|
||||||
For more information, check out the [Process Sandboxing](./sandbox.md) guide.
|
|
||||||
|
|
||||||
:::
|
|
||||||
|
|
||||||
Preload scripts are injected before a web page loads in the renderer,
|
|
||||||
similar to a Chrome extension's [content scripts][content-script]. To add features to your renderer
|
similar to a Chrome extension's [content scripts][content-script]. To add features to your renderer
|
||||||
that require privileged access, you can define [global] objects through the
|
that require privileged access, you can define [global] objects through the
|
||||||
[contextBridge][contextbridge] API.
|
[contextBridge][contextbridge] API.
|
||||||
@@ -203,8 +185,7 @@ loading the HTML file so that the handler is guaranteed to be ready before
|
|||||||
you send out the `invoke` call from the renderer.
|
you send out the `invoke` call from the renderer.
|
||||||
|
|
||||||
```js {1,11} title="main.js"
|
```js {1,11} title="main.js"
|
||||||
const { app, BrowserWindow, ipcMain } = require('electron')
|
const { ipcMain } = require('electron')
|
||||||
const path = require('path')
|
|
||||||
|
|
||||||
const createWindow = () => {
|
const createWindow = () => {
|
||||||
const win = new BrowserWindow({
|
const win = new BrowserWindow({
|
||||||
@@ -217,7 +198,6 @@ const createWindow = () => {
|
|||||||
ipcMain.handle('ping', () => 'pong')
|
ipcMain.handle('ping', () => 'pong')
|
||||||
win.loadFile('index.html')
|
win.loadFile('index.html')
|
||||||
}
|
}
|
||||||
app.whenReady().then(createWindow)
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Once you have the sender and receiver set up, you can now send messages from the renderer
|
Once you have the sender and receiver set up, you can now send messages from the renderer
|
||||||
|
|||||||
@@ -62,9 +62,9 @@ into end users' hands.
|
|||||||
|
|
||||||
<!-- Link labels -->
|
<!-- Link labels -->
|
||||||
|
|
||||||
[discord]: https://discord.gg/electronjs
|
[discord]: https://discord.com/invite/APGC3k5yaH
|
||||||
[github]: https://github.com/electron/electronjs.org-new/issues/new
|
[github]: https://github.com/electron/electronjs.org-new/issues/new
|
||||||
[how-to]: ./examples.md
|
[how to]: ./examples.md
|
||||||
[node-platform]: https://nodejs.org/api/process.html#process_process_platform
|
[node-platform]: https://nodejs.org/api/process.html#process_process_platform
|
||||||
|
|
||||||
<!-- Tutorial links -->
|
<!-- Tutorial links -->
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ into your app code.
|
|||||||
## Using update.electronjs.org
|
## Using update.electronjs.org
|
||||||
|
|
||||||
The Electron maintainers provide a free auto-updating service for open-source apps
|
The Electron maintainers provide a free auto-updating service for open-source apps
|
||||||
at [https://update.electronjs.org](https://update.electronjs.org). Its requirements are:
|
at https://update.electronjs.org. Its requirements are:
|
||||||
|
|
||||||
- Your app runs on macOS or Windows
|
- Your app runs on macOS or Windows
|
||||||
- Your app has a public GitHub repository
|
- Your app has a public GitHub repository
|
||||||
@@ -226,7 +226,7 @@ rest of our docs and happy developing! If you have questions, please stop by our
|
|||||||
|
|
||||||
[autoupdater]: ../api/auto-updater.md
|
[autoupdater]: ../api/auto-updater.md
|
||||||
[code-signed]: ./code-signing.md
|
[code-signed]: ./code-signing.md
|
||||||
[discord server]: https://discord.gg/electronjs
|
[discord server]: https://discord.com/invite/APGC3k5yaH
|
||||||
[electron fiddle]: https://electronjs.org/fiddle
|
[electron fiddle]: https://electronjs.org/fiddle
|
||||||
[fiddle-build]: https://github.com/electron/fiddle/blob/master/.github/workflows/build.yaml
|
[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-forge-config]: https://github.com/electron/fiddle/blob/master/forge.config.js
|
||||||
|
|||||||
@@ -115,9 +115,9 @@ const win = new BrowserWindow({
|
|||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
On either platform `titleBarOverlay` can also be an object. On both macOS and Windows, the height of the overlay can be specified with the `height` property. On Windows, the color of the overlay and its symbols can be specified using the `color` and `symbolColor` properties respectively.
|
On Windows, you can also specify the color of the overlay and its symbols by setting
|
||||||
|
`titleBarOverlay` to an object with the `color` and `symbolColor` properties. If an option
|
||||||
If a color option is not specified, the color will default to its system color for the window control buttons. Similarly, if the height option is not specified it will default to the default height:
|
is not specified, the color will default to its system color for the window control buttons:
|
||||||
|
|
||||||
```javascript title='main.js'
|
```javascript title='main.js'
|
||||||
// on Windows
|
// on Windows
|
||||||
@@ -126,8 +126,7 @@ const win = new BrowserWindow({
|
|||||||
titleBarStyle: 'hidden',
|
titleBarStyle: 'hidden',
|
||||||
titleBarOverlay: {
|
titleBarOverlay: {
|
||||||
color: '#2f3241',
|
color: '#2f3241',
|
||||||
symbolColor: '#74b1be',
|
symbolColor: '#74b1be'
|
||||||
height: 60
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
@@ -136,10 +135,6 @@ const win = new BrowserWindow({
|
|||||||
> color and dimension values from a renderer using a set of readonly
|
> color and dimension values from a renderer using a set of readonly
|
||||||
> [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars].
|
> [JavaScript APIs][overlay-javascript-apis] and [CSS Environment Variables][overlay-css-env-vars].
|
||||||
|
|
||||||
### Limitations
|
|
||||||
|
|
||||||
* Transparent colors are currently not supported. Progress updates for this feature can be found in PR [#33567](https://github.com/electron/electron/issues/33567).
|
|
||||||
|
|
||||||
## Create transparent windows
|
## Create transparent windows
|
||||||
|
|
||||||
By setting the `transparent` option to `true`, you can make a fully transparent window.
|
By setting the `transparent` option to `true`, you can make a fully transparent window.
|
||||||
|
|||||||
@@ -19,12 +19,14 @@ template("electron_repack_percent") {
|
|||||||
# All sources should also have deps for completeness.
|
# All sources should also have deps for completeness.
|
||||||
sources = [
|
sources = [
|
||||||
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
|
"$root_gen_dir/components/components_resources_${percent}_percent.pak",
|
||||||
|
"$root_gen_dir/content/app/resources/content_resources_${percent}_percent.pak",
|
||||||
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
|
"$root_gen_dir/third_party/blink/public/resources/blink_scaled_resources_${percent}_percent.pak",
|
||||||
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
|
"$root_gen_dir/ui/resources/ui_resources_${percent}_percent.pak",
|
||||||
]
|
]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
"//components/resources",
|
"//components/resources",
|
||||||
|
"//content/app/resources",
|
||||||
"//third_party/blink/public:scaled_resources_${percent}_percent",
|
"//third_party/blink/public:scaled_resources_${percent}_percent",
|
||||||
"//ui/resources",
|
"//ui/resources",
|
||||||
]
|
]
|
||||||
@@ -52,8 +54,6 @@ template("electron_extra_paks") {
|
|||||||
])
|
])
|
||||||
output = "${invoker.output_dir}/resources.pak"
|
output = "${invoker.output_dir}/resources.pak"
|
||||||
sources = [
|
sources = [
|
||||||
"$root_gen_dir/chrome/browser_resources.pak",
|
|
||||||
"$root_gen_dir/chrome/common_resources.pak",
|
|
||||||
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
|
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
|
||||||
"$root_gen_dir/components/components_resources.pak",
|
"$root_gen_dir/components/components_resources.pak",
|
||||||
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
||||||
@@ -69,8 +69,6 @@ template("electron_extra_paks") {
|
|||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
"//chrome/browser:dev_ui_browser_resources",
|
"//chrome/browser:dev_ui_browser_resources",
|
||||||
"//chrome/browser:resources",
|
|
||||||
"//chrome/common:resources",
|
|
||||||
"//components/resources",
|
"//components/resources",
|
||||||
"//content:content_resources",
|
"//content:content_resources",
|
||||||
"//content:dev_ui_content_resources",
|
"//content:dev_ui_content_resources",
|
||||||
@@ -174,25 +172,19 @@ template("electron_paks") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
source_patterns = [
|
source_patterns = [
|
||||||
"${root_gen_dir}/chrome/locale_settings_",
|
|
||||||
"${root_gen_dir}/chrome/platform_locale_settings_",
|
"${root_gen_dir}/chrome/platform_locale_settings_",
|
||||||
"${root_gen_dir}/chrome/generated_resources_",
|
|
||||||
"${root_gen_dir}/components/strings/components_locale_settings_",
|
|
||||||
"${root_gen_dir}/components/strings/components_strings_",
|
"${root_gen_dir}/components/strings/components_strings_",
|
||||||
|
"${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_",
|
||||||
|
"${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
|
||||||
"${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
|
"${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
|
||||||
"${root_gen_dir}/extensions/strings/extensions_strings_",
|
"${root_gen_dir}/extensions/strings/extensions_strings_",
|
||||||
"${root_gen_dir}/services/strings/services_strings_",
|
"${root_gen_dir}/services/strings/services_strings_",
|
||||||
"${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_",
|
|
||||||
"${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
|
|
||||||
"${root_gen_dir}/ui/strings/app_locale_settings_",
|
"${root_gen_dir}/ui/strings/app_locale_settings_",
|
||||||
"${root_gen_dir}/ui/strings/ax_strings_",
|
"${root_gen_dir}/ui/strings/ax_strings_",
|
||||||
"${root_gen_dir}/ui/strings/ui_strings_",
|
"${root_gen_dir}/ui/strings/ui_strings_",
|
||||||
]
|
]
|
||||||
deps = [
|
deps = [
|
||||||
"//chrome/app:generated_resources",
|
|
||||||
"//chrome/app/resources:locale_settings",
|
|
||||||
"//chrome/app/resources:platform_locale_settings",
|
"//chrome/app/resources:platform_locale_settings",
|
||||||
"//components/strings:components_locale_settings",
|
|
||||||
"//components/strings:components_strings",
|
"//components/strings:components_strings",
|
||||||
"//device/bluetooth/strings",
|
"//device/bluetooth/strings",
|
||||||
"//extensions/strings",
|
"//extensions/strings",
|
||||||
|
|||||||
@@ -11,8 +11,15 @@
|
|||||||
<output filename="electron_resources.pak" type="data_package" />
|
<output filename="electron_resources.pak" type="data_package" />
|
||||||
</outputs>
|
</outputs>
|
||||||
<release seq="1" allow_pseudo="false">
|
<release seq="1" allow_pseudo="false">
|
||||||
|
<messages fallback_to_english="true">
|
||||||
|
<!-- TODO(deepak1556): Add translations,
|
||||||
|
check https://www.chromium.org/developers/design-documents/ui-localization -->
|
||||||
|
<part file="electron_strings.grdp" />
|
||||||
|
</messages>
|
||||||
<includes>
|
<includes>
|
||||||
<include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="${target_gen_dir}/shell_devtools_discovery_page.html" use_base_dir="false" type="BINDATA" />
|
<include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="${target_gen_dir}/shell_devtools_discovery_page.html" use_base_dir="false" type="BINDATA" />
|
||||||
|
<include name="IDR_PDF_MANIFEST" file="../chrome/browser/resources/pdf/manifest.json" type="BINDATA" />
|
||||||
|
<include name="IDR_CRYPTOTOKEN_MANIFEST" file="../chrome/browser/resources/cryptotoken/manifest.json" type="BINDATA" />
|
||||||
</includes>
|
</includes>
|
||||||
</release>
|
</release>
|
||||||
</grit>
|
</grit>
|
||||||
|
|||||||
163
electron_strings.grdp
Normal file
163
electron_strings.grdp
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<grit-part>
|
||||||
|
<!-- Windows Caption Buttons -->
|
||||||
|
<message name="IDS_APP_ACCNAME_CLOSE" desc="The accessible name for the Close button.">
|
||||||
|
Close
|
||||||
|
</message>
|
||||||
|
<message name="IDS_APP_ACCNAME_MINIMIZE" desc="The accessible name for the Minimize button.">
|
||||||
|
Minimize
|
||||||
|
</message>
|
||||||
|
<message name="IDS_APP_ACCNAME_MAXIMIZE" desc="The accessible name for the Maximize button.">
|
||||||
|
Maximize
|
||||||
|
</message>
|
||||||
|
<message name="IDS_APP_ACCNAME_RESTORE" desc="The accessible name for the Restore button.">
|
||||||
|
Restore
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<!-- Printing Service -->
|
||||||
|
<message name="IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME" desc="The name of the utility process used for printing conversions.">
|
||||||
|
Printing Service
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
|
||||||
|
The selected printer is not available or not installed correctly. <ph name="BR"><br></ph> Check your printer or try selecting another printer.
|
||||||
|
</message>
|
||||||
|
<message name="IDS_DEFAULT_PRINT_DOCUMENT_TITLE" desc="Default title for a print document">
|
||||||
|
Untitled Document
|
||||||
|
</message>
|
||||||
|
<message name="IDS_UTILITY_PROCESS_PRINT_BACKEND_SERVICE_NAME" desc="The name of the utility process used for backend interactions with printer drivers.">
|
||||||
|
Print Backend Service
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<!-- Desktop Capturer API -->
|
||||||
|
<message name="IDS_DESKTOP_MEDIA_PICKER_SINGLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there is only one monitor.">
|
||||||
|
Entire Screen
|
||||||
|
</message>
|
||||||
|
<message name="IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there are multiple monitors.">
|
||||||
|
{SCREEN_INDEX, plural, =1{Screen #} other{Screen #}}
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<!-- File Select Helper-->
|
||||||
|
<message name="IDS_IMAGE_FILES" desc="The description of the image file extensions in the select file dialog.">
|
||||||
|
Image Files
|
||||||
|
</message>
|
||||||
|
<message name="IDS_AUDIO_FILES" desc="The description of the audio file extensions in the select file dialog.">
|
||||||
|
Audio Files
|
||||||
|
</message>
|
||||||
|
<message name="IDS_VIDEO_FILES" desc="The description of the video file extensions in the select file dialog.">
|
||||||
|
Video Files
|
||||||
|
</message>
|
||||||
|
<message name="IDS_CUSTOM_FILES" desc="The description of the custom file extensions in the select file dialog.">
|
||||||
|
Custom Files
|
||||||
|
</message>
|
||||||
|
<message name="IDS_DEFAULT_DOWNLOAD_FILENAME" desc="Default name for downloaded files when we have no idea what they could be.">
|
||||||
|
download
|
||||||
|
</message>
|
||||||
|
|
||||||
|
<!-- Picture-in-Picture -->
|
||||||
|
<if expr="is_macosx">
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
|
||||||
|
Picture in Picture
|
||||||
|
</message>
|
||||||
|
</if>
|
||||||
|
<if expr="not is_macosx">
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
|
||||||
|
Picture in picture
|
||||||
|
</message>
|
||||||
|
</if>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_PAUSE_CONTROL_TEXT" desc="Text label of the pause control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently playing.">
|
||||||
|
Pause
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_PLAY_CONTROL_TEXT" desc="Text label of the play control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently paused.">
|
||||||
|
Play
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_REPLAY_CONTROL_TEXT" desc="Text label of the replay control button. The button appears when the user hovers over the Picture-in-Picture window and the video is ended.">
|
||||||
|
Play from the beginning
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_BACK_TO_TAB_CONTROL_TEXT" desc="Text label of the back to tab control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Back to video player
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently unmuted.">
|
||||||
|
Mute
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_UNMUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently muted.">
|
||||||
|
Unmute
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_SKIP_AD_CONTROL_TEXT" desc="Text label of the skip ad control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Skip Ad
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_MUTE_MICROPHONE_TEXT" desc="Text label of the mute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Mute microphone
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_UNMUTE_MICROPHONE_TEXT" desc="Text label of the unmute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Unmute microphone
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_TURN_ON_CAMERA_TEXT" desc="Text label of the turn on camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Turn on camera
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_TURN_OFF_CAMERA_TEXT" desc="Text label of the turn off camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Turn off camera
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_HANG_UP_TEXT" desc="Text label of the hang up control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Hang up
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_CLOSE_CONTROL_TEXT" desc="Text label of the close control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Close
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_RESIZE_HANDLE_TEXT" desc="Text label of the resize handle. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||||
|
Resize
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_PLAY_PAUSE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles between play and pause controls.">
|
||||||
|
Toggle video to play or pause
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles mute state.">
|
||||||
|
Toggle mute
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_NEXT_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes next track action.">
|
||||||
|
Next track
|
||||||
|
</message>
|
||||||
|
<message name="IDS_PICTURE_IN_PICTURE_PREVIOUS_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes previous track action.">
|
||||||
|
Previous track
|
||||||
|
</message>
|
||||||
|
<message name="IDS_SPELLCHECK_DICTIONARY" use_name_for_id="true">
|
||||||
|
en-US
|
||||||
|
</message>
|
||||||
|
<message name="IDS_ACCEPT_LANGUAGES" use_name_for_id="true">
|
||||||
|
en-US,en
|
||||||
|
</message>
|
||||||
|
<if expr="is_win">
|
||||||
|
<message name="IDS_UTILITY_PROCESS_UTILITY_WIN_NAME" desc="The name of the utility process used to handle Windows utility operations.">
|
||||||
|
Windows Utilities
|
||||||
|
</message>
|
||||||
|
</if>
|
||||||
|
<message name="IDS_DOWNLOAD_MORE_ACTIONS"
|
||||||
|
desc="Tooltip of a button on the downloads page that shows a menu with actions like 'Open downloads folder' or 'Clear all'">
|
||||||
|
More actions
|
||||||
|
</message>
|
||||||
|
<!-- Badging -->
|
||||||
|
<message name="IDS_SATURATED_BADGE_CONTENT" desc="The content to display when the application's badge is too large to display to indicate that the badge is more than a given maximum. This string should be as short as possible, preferably only one character beyond the content">
|
||||||
|
<ph name="MAXIMUM_VALUE">$1<ex>99</ex></ph>+
|
||||||
|
</message>
|
||||||
|
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS_SATURATED" desc="The accessibility text which will be read by a screen reader when the notification count is too large to display (e.g. greater than 99).">
|
||||||
|
{MAX_UNREAD_NOTIFICATIONS, plural, =1 {More than 1 unread notification} other {More than # unread notifications}}
|
||||||
|
</message>
|
||||||
|
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS_UNSPECIFIED" desc="The accessibility text which will be read by a screen reader when there are some unspecified number of notifications, or user attention is required">
|
||||||
|
Unread Notifications
|
||||||
|
</message>
|
||||||
|
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS" desc="The accessibility text which will be read by a screen reader when there are notifcatications">
|
||||||
|
{UNREAD_NOTIFICATIONS, plural, =1 {1 Unread Notification} other {# Unread Notifications}}
|
||||||
|
</message>
|
||||||
|
<message name="IDS_HID_CHOOSER_ITEM_WITHOUT_NAME" desc="User option displaying the device IDs for a Human Interface Device (HID) without a device name.">
|
||||||
|
Unknown Device (<ph name="DEVICE_ID">$1<ex>1234:abcd</ex></ph>) </message>
|
||||||
|
<if expr="is_win">
|
||||||
|
<then>
|
||||||
|
<message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for a graphic (image) on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
|
||||||
|
Unlabeled graphic
|
||||||
|
</message>
|
||||||
|
</then>
|
||||||
|
<else>
|
||||||
|
<message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for an image on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
|
||||||
|
Unlabeled image
|
||||||
|
</message>
|
||||||
|
</else>
|
||||||
|
</if>
|
||||||
|
</grit-part>
|
||||||
@@ -40,7 +40,6 @@ auto_filenames = {
|
|||||||
"docs/api/power-save-blocker.md",
|
"docs/api/power-save-blocker.md",
|
||||||
"docs/api/process.md",
|
"docs/api/process.md",
|
||||||
"docs/api/protocol.md",
|
"docs/api/protocol.md",
|
||||||
"docs/api/push-notifications.md",
|
|
||||||
"docs/api/safe-storage.md",
|
"docs/api/safe-storage.md",
|
||||||
"docs/api/screen.md",
|
"docs/api/screen.md",
|
||||||
"docs/api/service-workers.md",
|
"docs/api/service-workers.md",
|
||||||
@@ -98,6 +97,7 @@ auto_filenames = {
|
|||||||
"docs/api/structures/mime-typed-buffer.md",
|
"docs/api/structures/mime-typed-buffer.md",
|
||||||
"docs/api/structures/mouse-input-event.md",
|
"docs/api/structures/mouse-input-event.md",
|
||||||
"docs/api/structures/mouse-wheel-input-event.md",
|
"docs/api/structures/mouse-wheel-input-event.md",
|
||||||
|
"docs/api/structures/new-window-web-contents-event.md",
|
||||||
"docs/api/structures/notification-action.md",
|
"docs/api/structures/notification-action.md",
|
||||||
"docs/api/structures/notification-response.md",
|
"docs/api/structures/notification-response.md",
|
||||||
"docs/api/structures/payment-discount.md",
|
"docs/api/structures/payment-discount.md",
|
||||||
@@ -136,6 +136,7 @@ auto_filenames = {
|
|||||||
]
|
]
|
||||||
|
|
||||||
sandbox_bundle_deps = [
|
sandbox_bundle_deps = [
|
||||||
|
"lib/common/api/deprecate.ts",
|
||||||
"lib/common/api/native-image.ts",
|
"lib/common/api/native-image.ts",
|
||||||
"lib/common/define-properties.ts",
|
"lib/common/define-properties.ts",
|
||||||
"lib/common/ipc-messages.ts",
|
"lib/common/ipc-messages.ts",
|
||||||
@@ -211,7 +212,6 @@ auto_filenames = {
|
|||||||
"lib/browser/api/power-monitor.ts",
|
"lib/browser/api/power-monitor.ts",
|
||||||
"lib/browser/api/power-save-blocker.ts",
|
"lib/browser/api/power-save-blocker.ts",
|
||||||
"lib/browser/api/protocol.ts",
|
"lib/browser/api/protocol.ts",
|
||||||
"lib/browser/api/push-notifications.ts",
|
|
||||||
"lib/browser/api/safe-storage.ts",
|
"lib/browser/api/safe-storage.ts",
|
||||||
"lib/browser/api/screen.ts",
|
"lib/browser/api/screen.ts",
|
||||||
"lib/browser/api/session.ts",
|
"lib/browser/api/session.ts",
|
||||||
@@ -237,11 +237,11 @@ auto_filenames = {
|
|||||||
"lib/browser/rpc-server.ts",
|
"lib/browser/rpc-server.ts",
|
||||||
"lib/browser/web-view-events.ts",
|
"lib/browser/web-view-events.ts",
|
||||||
"lib/common/api/clipboard.ts",
|
"lib/common/api/clipboard.ts",
|
||||||
|
"lib/common/api/deprecate.ts",
|
||||||
"lib/common/api/module-list.ts",
|
"lib/common/api/module-list.ts",
|
||||||
"lib/common/api/native-image.ts",
|
"lib/common/api/native-image.ts",
|
||||||
"lib/common/api/shell.ts",
|
"lib/common/api/shell.ts",
|
||||||
"lib/common/define-properties.ts",
|
"lib/common/define-properties.ts",
|
||||||
"lib/common/deprecate.ts",
|
|
||||||
"lib/common/init.ts",
|
"lib/common/init.ts",
|
||||||
"lib/common/ipc-messages.ts",
|
"lib/common/ipc-messages.ts",
|
||||||
"lib/common/reset-search-paths.ts",
|
"lib/common/reset-search-paths.ts",
|
||||||
@@ -258,6 +258,7 @@ auto_filenames = {
|
|||||||
|
|
||||||
renderer_bundle_deps = [
|
renderer_bundle_deps = [
|
||||||
"lib/common/api/clipboard.ts",
|
"lib/common/api/clipboard.ts",
|
||||||
|
"lib/common/api/deprecate.ts",
|
||||||
"lib/common/api/module-list.ts",
|
"lib/common/api/module-list.ts",
|
||||||
"lib/common/api/native-image.ts",
|
"lib/common/api/native-image.ts",
|
||||||
"lib/common/api/shell.ts",
|
"lib/common/api/shell.ts",
|
||||||
@@ -296,6 +297,7 @@ auto_filenames = {
|
|||||||
|
|
||||||
worker_bundle_deps = [
|
worker_bundle_deps = [
|
||||||
"lib/common/api/clipboard.ts",
|
"lib/common/api/clipboard.ts",
|
||||||
|
"lib/common/api/deprecate.ts",
|
||||||
"lib/common/api/module-list.ts",
|
"lib/common/api/module-list.ts",
|
||||||
"lib/common/api/native-image.ts",
|
"lib/common/api/native-image.ts",
|
||||||
"lib/common/api/shell.ts",
|
"lib/common/api/shell.ts",
|
||||||
|
|||||||
@@ -108,8 +108,6 @@ filenames = {
|
|||||||
"shell/browser/ui/win/notify_icon.h",
|
"shell/browser/ui/win/notify_icon.h",
|
||||||
"shell/browser/ui/win/taskbar_host.cc",
|
"shell/browser/ui/win/taskbar_host.cc",
|
||||||
"shell/browser/ui/win/taskbar_host.h",
|
"shell/browser/ui/win/taskbar_host.h",
|
||||||
"shell/browser/win/dark_mode.cc",
|
|
||||||
"shell/browser/win/dark_mode.h",
|
|
||||||
"shell/browser/win/scoped_hstring.cc",
|
"shell/browser/win/scoped_hstring.cc",
|
||||||
"shell/browser/win/scoped_hstring.h",
|
"shell/browser/win/scoped_hstring.h",
|
||||||
"shell/common/api/electron_api_native_image_win.cc",
|
"shell/common/api/electron_api_native_image_win.cc",
|
||||||
@@ -129,7 +127,6 @@ filenames = {
|
|||||||
"shell/browser/api/electron_api_menu_mac.mm",
|
"shell/browser/api/electron_api_menu_mac.mm",
|
||||||
"shell/browser/api/electron_api_native_theme_mac.mm",
|
"shell/browser/api/electron_api_native_theme_mac.mm",
|
||||||
"shell/browser/api/electron_api_power_monitor_mac.mm",
|
"shell/browser/api/electron_api_power_monitor_mac.mm",
|
||||||
"shell/browser/api/electron_api_push_notifications_mac.mm",
|
|
||||||
"shell/browser/api/electron_api_system_preferences_mac.mm",
|
"shell/browser/api/electron_api_system_preferences_mac.mm",
|
||||||
"shell/browser/api/electron_api_web_contents_mac.mm",
|
"shell/browser/api/electron_api_web_contents_mac.mm",
|
||||||
"shell/browser/auto_updater_mac.mm",
|
"shell/browser/auto_updater_mac.mm",
|
||||||
@@ -171,8 +168,6 @@ filenames = {
|
|||||||
"shell/browser/ui/cocoa/electron_native_widget_mac.mm",
|
"shell/browser/ui/cocoa/electron_native_widget_mac.mm",
|
||||||
"shell/browser/ui/cocoa/electron_ns_window_delegate.h",
|
"shell/browser/ui/cocoa/electron_ns_window_delegate.h",
|
||||||
"shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
|
"shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
|
||||||
"shell/browser/ui/cocoa/electron_ns_panel.h",
|
|
||||||
"shell/browser/ui/cocoa/electron_ns_panel.mm",
|
|
||||||
"shell/browser/ui/cocoa/electron_ns_window.h",
|
"shell/browser/ui/cocoa/electron_ns_window.h",
|
||||||
"shell/browser/ui/cocoa/electron_ns_window.mm",
|
"shell/browser/ui/cocoa/electron_ns_window.mm",
|
||||||
"shell/browser/ui/cocoa/electron_preview_item.h",
|
"shell/browser/ui/cocoa/electron_preview_item.h",
|
||||||
@@ -297,8 +292,6 @@ filenames = {
|
|||||||
"shell/browser/api/electron_api_printing.cc",
|
"shell/browser/api/electron_api_printing.cc",
|
||||||
"shell/browser/api/electron_api_protocol.cc",
|
"shell/browser/api/electron_api_protocol.cc",
|
||||||
"shell/browser/api/electron_api_protocol.h",
|
"shell/browser/api/electron_api_protocol.h",
|
||||||
"shell/browser/api/electron_api_push_notifications.cc",
|
|
||||||
"shell/browser/api/electron_api_push_notifications.h",
|
|
||||||
"shell/browser/api/electron_api_safe_storage.cc",
|
"shell/browser/api/electron_api_safe_storage.cc",
|
||||||
"shell/browser/api/electron_api_safe_storage.h",
|
"shell/browser/api/electron_api_safe_storage.h",
|
||||||
"shell/browser/api/electron_api_screen.cc",
|
"shell/browser/api/electron_api_screen.cc",
|
||||||
@@ -416,6 +409,8 @@ filenames = {
|
|||||||
"shell/browser/media/media_capture_devices_dispatcher.h",
|
"shell/browser/media/media_capture_devices_dispatcher.h",
|
||||||
"shell/browser/media/media_device_id_salt.cc",
|
"shell/browser/media/media_device_id_salt.cc",
|
||||||
"shell/browser/media/media_device_id_salt.h",
|
"shell/browser/media/media_device_id_salt.h",
|
||||||
|
"shell/browser/media/media_stream_devices_controller.cc",
|
||||||
|
"shell/browser/media/media_stream_devices_controller.h",
|
||||||
"shell/browser/microtasks_runner.cc",
|
"shell/browser/microtasks_runner.cc",
|
||||||
"shell/browser/microtasks_runner.h",
|
"shell/browser/microtasks_runner.h",
|
||||||
"shell/browser/native_browser_view.cc",
|
"shell/browser/native_browser_view.cc",
|
||||||
@@ -463,6 +458,8 @@ filenames = {
|
|||||||
"shell/browser/notifications/platform_notification_service.h",
|
"shell/browser/notifications/platform_notification_service.h",
|
||||||
"shell/browser/plugins/plugin_utils.cc",
|
"shell/browser/plugins/plugin_utils.cc",
|
||||||
"shell/browser/plugins/plugin_utils.h",
|
"shell/browser/plugins/plugin_utils.h",
|
||||||
|
"shell/browser/pref_store_delegate.cc",
|
||||||
|
"shell/browser/pref_store_delegate.h",
|
||||||
"shell/browser/protocol_registry.cc",
|
"shell/browser/protocol_registry.cc",
|
||||||
"shell/browser/protocol_registry.h",
|
"shell/browser/protocol_registry.h",
|
||||||
"shell/browser/relauncher.cc",
|
"shell/browser/relauncher.cc",
|
||||||
@@ -505,6 +502,8 @@ filenames = {
|
|||||||
"shell/browser/ui/tray_icon_observer.h",
|
"shell/browser/ui/tray_icon_observer.h",
|
||||||
"shell/browser/ui/webui/accessibility_ui.cc",
|
"shell/browser/ui/webui/accessibility_ui.cc",
|
||||||
"shell/browser/ui/webui/accessibility_ui.h",
|
"shell/browser/ui/webui/accessibility_ui.h",
|
||||||
|
"shell/browser/unresponsive_suppressor.cc",
|
||||||
|
"shell/browser/unresponsive_suppressor.h",
|
||||||
"shell/browser/web_contents_permission_helper.cc",
|
"shell/browser/web_contents_permission_helper.cc",
|
||||||
"shell/browser/web_contents_permission_helper.h",
|
"shell/browser/web_contents_permission_helper.h",
|
||||||
"shell/browser/web_contents_preferences.cc",
|
"shell/browser/web_contents_preferences.cc",
|
||||||
@@ -570,11 +569,8 @@ filenames = {
|
|||||||
"shell/common/gin_converters/gfx_converter.h",
|
"shell/common/gin_converters/gfx_converter.h",
|
||||||
"shell/common/gin_converters/guid_converter.h",
|
"shell/common/gin_converters/guid_converter.h",
|
||||||
"shell/common/gin_converters/gurl_converter.h",
|
"shell/common/gin_converters/gurl_converter.h",
|
||||||
"shell/common/gin_converters/hid_device_info_converter.h",
|
|
||||||
"shell/common/gin_converters/image_converter.cc",
|
"shell/common/gin_converters/image_converter.cc",
|
||||||
"shell/common/gin_converters/image_converter.h",
|
"shell/common/gin_converters/image_converter.h",
|
||||||
"shell/common/gin_converters/media_converter.cc",
|
|
||||||
"shell/common/gin_converters/media_converter.h",
|
|
||||||
"shell/common/gin_converters/message_box_converter.cc",
|
"shell/common/gin_converters/message_box_converter.cc",
|
||||||
"shell/common/gin_converters/message_box_converter.h",
|
"shell/common/gin_converters/message_box_converter.h",
|
||||||
"shell/common/gin_converters/native_window_converter.h",
|
"shell/common/gin_converters/native_window_converter.h",
|
||||||
@@ -645,6 +641,8 @@ filenames = {
|
|||||||
"shell/common/process_util.h",
|
"shell/common/process_util.h",
|
||||||
"shell/common/skia_util.cc",
|
"shell/common/skia_util.cc",
|
||||||
"shell/common/skia_util.h",
|
"shell/common/skia_util.h",
|
||||||
|
"shell/common/v8_value_converter.cc",
|
||||||
|
"shell/common/v8_value_converter.h",
|
||||||
"shell/common/v8_value_serializer.cc",
|
"shell/common/v8_value_serializer.cc",
|
||||||
"shell/common/v8_value_serializer.h",
|
"shell/common/v8_value_serializer.h",
|
||||||
"shell/common/world_ids.h",
|
"shell/common/world_ids.h",
|
||||||
@@ -673,6 +671,8 @@ filenames = {
|
|||||||
"shell/renderer/electron_renderer_pepper_host_factory.h",
|
"shell/renderer/electron_renderer_pepper_host_factory.h",
|
||||||
"shell/renderer/electron_sandboxed_renderer_client.cc",
|
"shell/renderer/electron_sandboxed_renderer_client.cc",
|
||||||
"shell/renderer/electron_sandboxed_renderer_client.h",
|
"shell/renderer/electron_sandboxed_renderer_client.h",
|
||||||
|
"shell/renderer/guest_view_container.cc",
|
||||||
|
"shell/renderer/guest_view_container.h",
|
||||||
"shell/renderer/renderer_client_base.cc",
|
"shell/renderer/renderer_client_base.cc",
|
||||||
"shell/renderer/renderer_client_base.h",
|
"shell/renderer/renderer_client_base.h",
|
||||||
"shell/renderer/web_worker_observer.cc",
|
"shell/renderer/web_worker_observer.cc",
|
||||||
|
|||||||
@@ -1,503 +1,64 @@
|
|||||||
libcxx_headers = [
|
libcxx_headers = [
|
||||||
"//buildtools/third_party/libc++/trunk/include/CMakeLists.txt",
|
"//buildtools/third_party/libc++/trunk/include/CMakeLists.txt",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/adjacent_find.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/all_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/any_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/binary_search.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/clamp.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/comp.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/comp_ref_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/copy_backward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/copy_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/count.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/count_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/equal.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/equal_range.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/fill.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/fill_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/find.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/find_end.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/find_first_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/find_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/find_if_not.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/for_each.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/for_each_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/generate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/generate_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/half_positive.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_found_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_fun_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_in_out_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_in_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_out_out_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/in_out_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/includes.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/inplace_merge.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_heap_until.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_partitioned.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/is_sorted_until.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/iter_swap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/iterator_operations.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/lexicographical_compare.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/lower_bound.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/make_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/make_projected.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/max.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/max_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/merge.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/min.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/min_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/min_max_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/minmax.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/minmax_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/mismatch.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/move.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/move_backward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/next_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/none_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/nth_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/partial_sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/partial_sort_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/partition.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/partition_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/partition_point.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/pop_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/prev_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/push_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_adjacent_find.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_all_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_any_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_binary_search.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_clamp.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_backward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_copy_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_count_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_equal_range.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_fill_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_end.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_first_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_find_if_not.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_for_each_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_generate_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_includes.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_inplace_merge.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_heap_until.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_partitioned.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_is_sorted_until.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_iterator_concept.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lexicographical_compare.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_lower_bound.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_make_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_max_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_merge.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_min_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_minmax_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_mismatch.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_move_backward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_next_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_none_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_nth_element.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partial_sort_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_partition_point.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_pop_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_prev_permutation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_push_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_remove_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_replace_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_reverse_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_rotate_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sample.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_search_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_difference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_intersection.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_symmetric_difference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_set_union.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_shuffle.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_sort_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_partition.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_stable_sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_swap_ranges.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_transform.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_unique_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/ranges_upper_bound.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove_copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/remove_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/replace.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/replace_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/replace_copy_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/replace_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/reverse.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/reverse_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/rotate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/rotate_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/sample.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/search.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/search_n.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/set_difference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/set_intersection.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/set_symmetric_difference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/set_union.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/shift_left.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/shift_right.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/shuffle.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/sift_down.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/sort_heap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/stable_partition.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/stable_sort.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/swap_ranges.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/transform.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/uniform_random_bit_generator_adaptor.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/unique_copy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_iter.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/unwrap_range.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__algorithm/upper_bound.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__assert",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__availability",
|
"//buildtools/third_party/libc++/trunk/include/__availability",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bit/bit_cast.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bit/byteswap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bit_reference",
|
"//buildtools/third_party/libc++/trunk/include/__bit_reference",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bits",
|
"//buildtools/third_party/libc++/trunk/include/__bits",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bsd_locale_defaults.h",
|
"//buildtools/third_party/libc++/trunk/include/__bsd_locale_defaults.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h",
|
"//buildtools/third_party/libc++/trunk/include/__bsd_locale_fallbacks.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__charconv/chars_format.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__charconv/from_chars_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__charconv/tables.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_base_10.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__charconv/to_chars_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/calendar.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/convert_to_timespec.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/day.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/duration.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/file_clock.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/hh_mm_ss.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/high_resolution_clock.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/literals.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/month.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/month_weekday.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/monthday.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/steady_clock.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/system_clock.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/time_point.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/weekday.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/year.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month_day.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__chrono/year_month_weekday.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/common_comparison_category.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/compare_partial_order_fallback.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/compare_strong_order_fallback.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/compare_three_way.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/compare_three_way_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/compare_weak_order_fallback.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/is_eq.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/ordering.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/partial_order.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/strong_order.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/synth_three_way.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/three_way_comparable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__compare/weak_order.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/arithmetic.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/boolean_testable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/class_or_enum.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/common_reference_with.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/common_with.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/convertible_to.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/copyable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/derived_from.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/destructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/different_from.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/equality_comparable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/invocable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/movable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/predicate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/regular.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/relation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/same_as.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/semiregular.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/swappable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__concepts/totally_ordered.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__config",
|
"//buildtools/third_party/libc++/trunk/include/__config",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__config_site.in",
|
"//buildtools/third_party/libc++/trunk/include/__config_site.in",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__coroutine/coroutine_handle.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__coroutine/coroutine_traits.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__coroutine/noop_coroutine_handle.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__coroutine/trivial_awaitables.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__debug",
|
"//buildtools/third_party/libc++/trunk/include/__debug",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__debug_utils/randomize_range.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__errc",
|
"//buildtools/third_party/libc++/trunk/include/__errc",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/copy_options.h",
|
"//buildtools/third_party/libc++/trunk/include/__functional_03",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/directory_entry.h",
|
"//buildtools/third_party/libc++/trunk/include/__functional_base",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/directory_iterator.h",
|
"//buildtools/third_party/libc++/trunk/include/__functional_base_03",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/directory_options.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/file_status.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/file_time_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/file_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/filesystem_error.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/operations.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/path.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/path_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/perm_options.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/perms.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/recursive_directory_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/space_info.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__filesystem/u8path.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/buffer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/concepts.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/enable_insertable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/extended_grapheme_cluster_table.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_arg.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_arg_store.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_args.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_context.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_error.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_fwd.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_parse_context.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_string.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/format_to_n_result.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_bool.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_char.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_floating_point.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_integer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_integral.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_output.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/formatter_string.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/parser_std_format_spec.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__format/unicode.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/binary_function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/binary_negate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/bind.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/bind_back.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/bind_front.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/binder1st.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/binder2nd.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/boyer_moore_searcher.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/compose.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/default_searcher.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/hash.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/identity.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/invoke.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/is_transparent.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/mem_fn.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/mem_fun_ref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/not_fn.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/operations.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/perfect_forward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/pointer_to_binary_function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/pointer_to_unary_function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/ranges_operations.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/reference_wrapper.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/unary_function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/unary_negate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/unwrap_ref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__functional/weak_result_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__fwd/hash.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__fwd/pair.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__fwd/span.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__fwd/string_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__hash_table",
|
"//buildtools/third_party/libc++/trunk/include/__hash_table",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ios/fpos.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/access.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/advance.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/back_insert_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/bounded_iter.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/common_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h",
|
"//buildtools/third_party/libc++/trunk/include/__iterator/concepts.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/counted_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/data.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/default_sentinel.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/distance.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/empty.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/erase_if_container.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/front_insert_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/incrementable_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__iterator/incrementable_traits.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/indirectly_comparable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/insert_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/istream_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/istreambuf_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/iter_move.h",
|
"//buildtools/third_party/libc++/trunk/include/__iterator/iter_move.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/iter_swap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__iterator/iterator_traits.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/mergeable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/move_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/move_sentinel.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/next.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/ostream_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/ostreambuf_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/permutable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/prev.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/projected.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__iterator/readable_traits.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/reverse_access.h",
|
"//buildtools/third_party/libc++/trunk/include/__libcpp_version",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/reverse_iterator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/size.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/sortable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/unreachable_sentinel.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__iterator/wrap_iter.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__locale",
|
"//buildtools/third_party/libc++/trunk/include/__locale",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__mbstate_t.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/addressof.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/addressof.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/allocate_at_least.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/allocation_guard.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/allocator.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/allocator.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_arg_t.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/allocator_traits.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/assume_aligned.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/auto_ptr.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/compressed_pair.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/concepts.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/construct_at.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/construct_at.h",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/__memory/pointer_safety.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/pointer_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/pointer_traits.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/ranges_construct_at.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/ranges_uninitialized_algorithms.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/raw_storage_iterator.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/shared_ptr.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/swap_allocator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
|
"//buildtools/third_party/libc++/trunk/include/__memory/temporary_buffer.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/uninitialized_algorithms.h",
|
"//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/unique_ptr.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/uses_allocator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__memory/voidify.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__mutex_base",
|
"//buildtools/third_party/libc++/trunk/include/__mutex_base",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__node_handle",
|
"//buildtools/third_party/libc++/trunk/include/__node_handle",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/accumulate.h",
|
"//buildtools/third_party/libc++/trunk/include/__nullptr",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/adjacent_difference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/exclusive_scan.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/gcd_lcm.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/inclusive_scan.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/inner_product.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/iota.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/midpoint.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/partial_sum.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/reduce.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/transform_exclusive_scan.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/transform_inclusive_scan.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__numeric/transform_reduce.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/bernoulli_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/binomial_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/cauchy_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/chi_squared_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/clamp_to_integral.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/default_random_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/discard_block_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/discrete_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/exponential_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/extreme_value_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/fisher_f_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/gamma_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/generate_canonical.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/geometric_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/independent_bits_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/is_seed_sequence.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/is_valid.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/knuth_b.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/linear_congruential_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/log2.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/lognormal_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/mersenne_twister_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/negative_binomial_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/normal_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/piecewise_constant_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/piecewise_linear_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/poisson_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/random_device.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/ranlux.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/seed_seq.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/shuffle_order_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/student_t_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/subtract_with_carry_engine.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/uniform_int_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/uniform_random_bit_generator.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/uniform_real_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__random/weibull_distribution.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/access.h",
|
"//buildtools/third_party/libc++/trunk/include/__ranges/access.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/all.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/common_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h",
|
"//buildtools/third_party/libc++/trunk/include/__ranges/concepts.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/copyable_box.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/counted.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/dangling.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/data.h",
|
"//buildtools/third_party/libc++/trunk/include/__ranges/data.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/drop_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/empty.h",
|
"//buildtools/third_party/libc++/trunk/include/__ranges/empty.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/empty_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h",
|
"//buildtools/third_party/libc++/trunk/include/__ranges/enable_borrowed_range.h",
|
||||||
"//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/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",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/owning_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/range_adaptor.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/rbegin.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/ref_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/rend.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/reverse_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/single_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/size.h",
|
"//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/view.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/take_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",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__ranges/zip_view.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__split_buffer",
|
"//buildtools/third_party/libc++/trunk/include/__split_buffer",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__std_stream",
|
"//buildtools/third_party/libc++/trunk/include/__std_stream",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__string/char_traits.h",
|
"//buildtools/third_party/libc++/trunk/include/__string",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__string/extern_template_lists.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/android/locale_bionic.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/fuchsia/xlocale.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/gettod_zos.h",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/limits.h",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_aix.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/locale_mgmt_zos.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/nanosleep.h",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/support.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/ibm/xlocale.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/musl/xlocale.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/musl/xlocale.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/newlib/xlocale.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/newlib/xlocale.h",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/__support/nuttx/xlocale.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/openbsd/xlocale.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/openbsd/xlocale.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/solaris/floatingpoint.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/solaris/floatingpoint.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/solaris/wchar.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/solaris/wchar.h",
|
||||||
@@ -507,157 +68,11 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__nop_locale_mgmt.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__nop_locale_mgmt.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__posix_l_fallback.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__posix_l_fallback.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__strtonum_fallback.h",
|
"//buildtools/third_party/libc++/trunk/include/__support/xlocale/__strtonum_fallback.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__thread/poll_with_backoff.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__thread/timed_backoff_policy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__threading_support",
|
"//buildtools/third_party/libc++/trunk/include/__threading_support",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__tree",
|
"//buildtools/third_party/libc++/trunk/include/__tree",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__tuple",
|
"//buildtools/third_party/libc++/trunk/include/__tuple",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_const.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_cv.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_lvalue_reference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_rvalue_reference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/add_volatile.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_storage.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/aligned_union.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/alignment_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/apply_cv.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/can_extract_key.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_reference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/common_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/conditional.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/conjunction.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cv.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/copy_cvref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/decay.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/dependent_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/disjunction.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/enable_if.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/extent.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/has_unique_object_representation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/has_virtual_destructor.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/integral_constant.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_abstract.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_aggregate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_arithmetic.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_array.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_base_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_bounded_array.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_callable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_char_like_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_class.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_compound.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_const.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_constant_evaluated.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_convertible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_copy_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_core_convertible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_default_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_destructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_empty.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_enum.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_final.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_floating_point.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_function.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_fundamental.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_implicitly_default_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_integral.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_literal_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_function_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_object_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_member_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_move_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_convertible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_copy_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_default_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_destructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_nothrow_move_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_null_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_object.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_pod.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_polymorphic.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_primary_template.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_reference_wrapper.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_referenceable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_same.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_scalar.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_scoped_enum.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_signed_integer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_standard_layout.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_swappable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivial.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copy_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_copyable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_default_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_destructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_assignable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_trivially_move_constructible.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unbounded_array.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_union.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_unsigned_integer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_valid_expansion.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_void.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/is_volatile.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/lazy.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_32_64_or_128_bit.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_const_lvalue_ref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_signed.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/make_unsigned.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/maybe_const.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/nat.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/negation.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/promote.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/rank.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_all_extents.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_const_ref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cv.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_cvref.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_extent.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_pointer.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_reference.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/remove_volatile.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/result_of.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_identity.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/type_list.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/underlying_type.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__type_traits/void_t.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__undef_macros",
|
"//buildtools/third_party/libc++/trunk/include/__undef_macros",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/as_const.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/auto_cast.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/cmp.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/convert_to_integral.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/declval.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/exchange.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/forward.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/in_place.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/integer_sequence.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/move.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/pair.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/piecewise_construct.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/priority_tag.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/rel_ops.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/swap.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h",
|
"//buildtools/third_party/libc++/trunk/include/__utility/to_underlying.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/transaction.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__utility/unreachable.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__variant/monostate.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/__verbose_abort",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/algorithm",
|
"//buildtools/third_party/libc++/trunk/include/algorithm",
|
||||||
"//buildtools/third_party/libc++/trunk/include/any",
|
"//buildtools/third_party/libc++/trunk/include/any",
|
||||||
"//buildtools/third_party/libc++/trunk/include/array",
|
"//buildtools/third_party/libc++/trunk/include/array",
|
||||||
@@ -684,7 +99,6 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/complex.h",
|
"//buildtools/third_party/libc++/trunk/include/complex.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/concepts",
|
"//buildtools/third_party/libc++/trunk/include/concepts",
|
||||||
"//buildtools/third_party/libc++/trunk/include/condition_variable",
|
"//buildtools/third_party/libc++/trunk/include/condition_variable",
|
||||||
"//buildtools/third_party/libc++/trunk/include/coroutine",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/csetjmp",
|
"//buildtools/third_party/libc++/trunk/include/csetjmp",
|
||||||
"//buildtools/third_party/libc++/trunk/include/csignal",
|
"//buildtools/third_party/libc++/trunk/include/csignal",
|
||||||
"//buildtools/third_party/libc++/trunk/include/cstdarg",
|
"//buildtools/third_party/libc++/trunk/include/cstdarg",
|
||||||
@@ -697,7 +111,6 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/ctgmath",
|
"//buildtools/third_party/libc++/trunk/include/ctgmath",
|
||||||
"//buildtools/third_party/libc++/trunk/include/ctime",
|
"//buildtools/third_party/libc++/trunk/include/ctime",
|
||||||
"//buildtools/third_party/libc++/trunk/include/ctype.h",
|
"//buildtools/third_party/libc++/trunk/include/ctype.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/cuchar",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/cwchar",
|
"//buildtools/third_party/libc++/trunk/include/cwchar",
|
||||||
"//buildtools/third_party/libc++/trunk/include/cwctype",
|
"//buildtools/third_party/libc++/trunk/include/cwctype",
|
||||||
"//buildtools/third_party/libc++/trunk/include/deque",
|
"//buildtools/third_party/libc++/trunk/include/deque",
|
||||||
@@ -709,6 +122,7 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/experimental/algorithm",
|
"//buildtools/third_party/libc++/trunk/include/experimental/algorithm",
|
||||||
"//buildtools/third_party/libc++/trunk/include/experimental/coroutine",
|
"//buildtools/third_party/libc++/trunk/include/experimental/coroutine",
|
||||||
"//buildtools/third_party/libc++/trunk/include/experimental/deque",
|
"//buildtools/third_party/libc++/trunk/include/experimental/deque",
|
||||||
|
"//buildtools/third_party/libc++/trunk/include/experimental/filesystem",
|
||||||
"//buildtools/third_party/libc++/trunk/include/experimental/forward_list",
|
"//buildtools/third_party/libc++/trunk/include/experimental/forward_list",
|
||||||
"//buildtools/third_party/libc++/trunk/include/experimental/functional",
|
"//buildtools/third_party/libc++/trunk/include/experimental/functional",
|
||||||
"//buildtools/third_party/libc++/trunk/include/experimental/iterator",
|
"//buildtools/third_party/libc++/trunk/include/experimental/iterator",
|
||||||
@@ -753,7 +167,7 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/map",
|
"//buildtools/third_party/libc++/trunk/include/map",
|
||||||
"//buildtools/third_party/libc++/trunk/include/math.h",
|
"//buildtools/third_party/libc++/trunk/include/math.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/memory",
|
"//buildtools/third_party/libc++/trunk/include/memory",
|
||||||
"//buildtools/third_party/libc++/trunk/include/module.modulemap.in",
|
"//buildtools/third_party/libc++/trunk/include/module.modulemap",
|
||||||
"//buildtools/third_party/libc++/trunk/include/mutex",
|
"//buildtools/third_party/libc++/trunk/include/mutex",
|
||||||
"//buildtools/third_party/libc++/trunk/include/new",
|
"//buildtools/third_party/libc++/trunk/include/new",
|
||||||
"//buildtools/third_party/libc++/trunk/include/numbers",
|
"//buildtools/third_party/libc++/trunk/include/numbers",
|
||||||
@@ -773,7 +187,6 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/span",
|
"//buildtools/third_party/libc++/trunk/include/span",
|
||||||
"//buildtools/third_party/libc++/trunk/include/sstream",
|
"//buildtools/third_party/libc++/trunk/include/sstream",
|
||||||
"//buildtools/third_party/libc++/trunk/include/stack",
|
"//buildtools/third_party/libc++/trunk/include/stack",
|
||||||
"//buildtools/third_party/libc++/trunk/include/stdatomic.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/stdbool.h",
|
"//buildtools/third_party/libc++/trunk/include/stdbool.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/stddef.h",
|
"//buildtools/third_party/libc++/trunk/include/stddef.h",
|
||||||
"//buildtools/third_party/libc++/trunk/include/stdexcept",
|
"//buildtools/third_party/libc++/trunk/include/stdexcept",
|
||||||
@@ -792,7 +205,6 @@ libcxx_headers = [
|
|||||||
"//buildtools/third_party/libc++/trunk/include/type_traits",
|
"//buildtools/third_party/libc++/trunk/include/type_traits",
|
||||||
"//buildtools/third_party/libc++/trunk/include/typeindex",
|
"//buildtools/third_party/libc++/trunk/include/typeindex",
|
||||||
"//buildtools/third_party/libc++/trunk/include/typeinfo",
|
"//buildtools/third_party/libc++/trunk/include/typeinfo",
|
||||||
"//buildtools/third_party/libc++/trunk/include/uchar.h",
|
|
||||||
"//buildtools/third_party/libc++/trunk/include/unordered_map",
|
"//buildtools/third_party/libc++/trunk/include/unordered_map",
|
||||||
"//buildtools/third_party/libc++/trunk/include/unordered_set",
|
"//buildtools/third_party/libc++/trunk/include/unordered_set",
|
||||||
"//buildtools/third_party/libc++/trunk/include/utility",
|
"//buildtools/third_party/libc++/trunk/include/utility",
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ const splitPath = (archivePathOrBuffer: string | Buffer) => {
|
|||||||
// Convert asar archive's Stats object to fs's Stats object.
|
// Convert asar archive's Stats object to fs's Stats object.
|
||||||
let nextInode = 0;
|
let nextInode = 0;
|
||||||
|
|
||||||
const uid = process.getuid?.() ?? 0;
|
const uid = process.getuid != null ? process.getuid() : 0;
|
||||||
const gid = process.getgid?.() ?? 0;
|
const gid = process.getgid != null ? process.getgid() : 0;
|
||||||
|
|
||||||
const fakeTime = new Date();
|
const fakeTime = new Date();
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const { lstat } = fs;
|
const { lstat } = fs;
|
||||||
fs.lstat = (pathArgument: string, options: any, callback: any) => {
|
fs.lstat = function (pathArgument: string, options: any, callback: any) {
|
||||||
const pathInfo = splitPath(pathArgument);
|
const pathInfo = splitPath(pathArgument);
|
||||||
if (typeof options === 'function') {
|
if (typeof options === 'function') {
|
||||||
callback = options;
|
callback = options;
|
||||||
@@ -382,10 +382,10 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||||||
|
|
||||||
fs.promises.realpath = util.promisify(fs.realpath.native);
|
fs.promises.realpath = util.promisify(fs.realpath.native);
|
||||||
|
|
||||||
const { exists: nativeExists } = fs;
|
const { exists } = fs;
|
||||||
fs.exists = function exists (pathArgument: string, callback: any) {
|
fs.exists = (pathArgument: string, callback: any) => {
|
||||||
const pathInfo = splitPath(pathArgument);
|
const pathInfo = splitPath(pathArgument);
|
||||||
if (!pathInfo.isAsar) return nativeExists(pathArgument, callback);
|
if (!pathInfo.isAsar) return exists(pathArgument, callback);
|
||||||
const { asarPath, filePath } = pathInfo;
|
const { asarPath, filePath } = pathInfo;
|
||||||
|
|
||||||
const archive = getOrCreateArchive(asarPath);
|
const archive = getOrCreateArchive(asarPath);
|
||||||
@@ -399,9 +399,9 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
|||||||
nextTick(callback, [pathExists]);
|
nextTick(callback, [pathExists]);
|
||||||
};
|
};
|
||||||
|
|
||||||
fs.exists[util.promisify.custom] = function exists (pathArgument: string) {
|
fs.exists[util.promisify.custom] = (pathArgument: string) => {
|
||||||
const pathInfo = splitPath(pathArgument);
|
const pathInfo = splitPath(pathArgument);
|
||||||
if (!pathInfo.isAsar) return nativeExists[util.promisify.custom](pathArgument);
|
if (!pathInfo.isAsar) return exists[util.promisify.custom](pathArgument);
|
||||||
const { asarPath, filePath } = pathInfo;
|
const { asarPath, filePath } = pathInfo;
|
||||||
|
|
||||||
const archive = getOrCreateArchive(asarPath);
|
const archive = getOrCreateArchive(asarPath);
|
||||||
|
|||||||
@@ -18,4 +18,4 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import * as fs from 'fs';
|
import * as fs from 'fs';
|
||||||
|
|
||||||
import { Menu } from 'electron/main';
|
import { Menu, deprecate } from 'electron/main';
|
||||||
import * as deprecate from '@electron/internal/common/deprecate';
|
|
||||||
|
|
||||||
const bindings = process._linkedBinding('electron_browser_app');
|
const bindings = process._linkedBinding('electron_browser_app');
|
||||||
const commandLine = process._linkedBinding('electron_common_command_line');
|
const commandLine = process._linkedBinding('electron_common_command_line');
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Ensure we don't spawn multiple squirrel processes
|
// Ensure we don't spawn multiple squirrel processes
|
||||||
// Process spawned, same args: Attach events to already running process
|
// Process spawned, same args: Attach events to alread running process
|
||||||
// Process spawned, different args: Return with error
|
// Process spawned, different args: Return with error
|
||||||
// No process spawned: Spawn new process
|
// No process spawned: Spawn new process
|
||||||
if (spawnedProcess && !isSameArgs(args)) {
|
if (spawnedProcess && !isSameArgs(args)) {
|
||||||
@@ -68,7 +68,7 @@ const spawnUpdate = function (args: string[], detached: boolean, callback: Funct
|
|||||||
if (code !== 0) {
|
if (code !== 0) {
|
||||||
// Disabled for backwards compatibility:
|
// Disabled for backwards compatibility:
|
||||||
// eslint-disable-next-line standard/no-callback-literal
|
// eslint-disable-next-line standard/no-callback-literal
|
||||||
return callback(`Command failed: ${signal ?? code}\n${stderr}`);
|
return callback(`Command failed: ${signal != null ? signal : code}\n${stderr}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Success.
|
// Success.
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import { app } from 'electron/main';
|
import { app, deprecate } from 'electron/main';
|
||||||
import * as deprecate from '@electron/internal/common/deprecate';
|
|
||||||
|
|
||||||
const binding = process._linkedBinding('electron_browser_crash_reporter');
|
const binding = process._linkedBinding('electron_browser_crash_reporter');
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,8 @@ let currentlyRunning: {
|
|||||||
|
|
||||||
// |options.types| can't be empty and must be an array
|
// |options.types| can't be empty and must be an array
|
||||||
function isValid (options: Electron.SourcesOptions) {
|
function isValid (options: Electron.SourcesOptions) {
|
||||||
return Array.isArray(options?.types);
|
const types = options ? options.types : undefined;
|
||||||
|
return Array.isArray(types);
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getSources (args: Electron.SourcesOptions) {
|
export async function getSources (args: Electron.SourcesOptions) {
|
||||||
|
|||||||
@@ -2,4 +2,7 @@ import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
|
|||||||
|
|
||||||
const ipcMain = new IpcMainImpl();
|
const ipcMain = new IpcMainImpl();
|
||||||
|
|
||||||
|
// Do not throw exception when channel name is "error".
|
||||||
|
ipcMain.on('error', () => {});
|
||||||
|
|
||||||
export default ipcMain;
|
export default ipcMain;
|
||||||
|
|||||||
@@ -142,7 +142,7 @@ Menu.prototype.insert = function (pos, item) {
|
|||||||
if (item.icon) this.setIcon(pos, item.icon);
|
if (item.icon) this.setIcon(pos, item.icon);
|
||||||
if (item.role) this.setRole(pos, item.role);
|
if (item.role) this.setRole(pos, item.role);
|
||||||
|
|
||||||
// Make menu accessible to items.
|
// Make menu accessable to items.
|
||||||
item.overrideReadOnlyProperty('menu', this);
|
item.overrideReadOnlyProperty('menu', this);
|
||||||
|
|
||||||
// Remember the items.
|
// Remember the items.
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ export const browserModuleList: ElectronInternal.ModuleEntry[] = [
|
|||||||
{ name: 'Notification', loader: () => require('./notification') },
|
{ name: 'Notification', loader: () => require('./notification') },
|
||||||
{ name: 'powerMonitor', loader: () => require('./power-monitor') },
|
{ name: 'powerMonitor', loader: () => require('./power-monitor') },
|
||||||
{ name: 'powerSaveBlocker', loader: () => require('./power-save-blocker') },
|
{ name: 'powerSaveBlocker', loader: () => require('./power-save-blocker') },
|
||||||
{ name: 'pushNotifications', loader: () => require('./push-notifications') },
|
|
||||||
{ name: 'protocol', loader: () => require('./protocol') },
|
{ name: 'protocol', loader: () => require('./protocol') },
|
||||||
{ name: 'safeStorage', loader: () => require('./safe-storage') },
|
{ name: 'safeStorage', loader: () => require('./safe-storage') },
|
||||||
{ name: 'screen', loader: () => require('./screen') },
|
{ name: 'screen', loader: () => require('./screen') },
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
const { nativeTheme } = process._linkedBinding('electron_browser_native_theme');
|
const { nativeTheme } = process._linkedBinding('electron_common_native_theme');
|
||||||
|
|
||||||
module.exports = nativeTheme;
|
module.exports = nativeTheme;
|
||||||
|
|||||||
@@ -36,14 +36,17 @@ const discardableDuplicateHeaders = new Set([
|
|||||||
]);
|
]);
|
||||||
|
|
||||||
class IncomingMessage extends Readable {
|
class IncomingMessage extends Readable {
|
||||||
_shouldPush: boolean = false;
|
_shouldPush: boolean;
|
||||||
_data: (Buffer | null)[] = [];
|
_data: (Buffer | null)[];
|
||||||
_responseHead: NodeJS.ResponseHead;
|
_responseHead: NodeJS.ResponseHead;
|
||||||
_resume: (() => void) | null = null;
|
_resume: (() => void) | null;
|
||||||
|
|
||||||
constructor (responseHead: NodeJS.ResponseHead) {
|
constructor (responseHead: NodeJS.ResponseHead) {
|
||||||
super();
|
super();
|
||||||
|
this._shouldPush = false;
|
||||||
|
this._data = [];
|
||||||
this._responseHead = responseHead;
|
this._responseHead = responseHead;
|
||||||
|
this._resume = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
get statusCode () {
|
get statusCode () {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
const {
|
const {
|
||||||
Notification: ElectronNotification,
|
Notification: ElectronNotification,
|
||||||
isSupported
|
isSupported
|
||||||
} = process._linkedBinding('electron_browser_notification');
|
} = process._linkedBinding('electron_common_notification');
|
||||||
|
|
||||||
ElectronNotification.isSupported = isSupported;
|
ElectronNotification.isSupported = isSupported;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
const { pushNotifications } = process._linkedBinding('electron_browser_push_notifications');
|
|
||||||
|
|
||||||
export default pushNotifications;
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
|
||||||
const { createScreen } = process._linkedBinding('electron_browser_screen');
|
const { createScreen } = process._linkedBinding('electron_common_screen');
|
||||||
|
|
||||||
let _screen: Electron.Screen;
|
let _screen: Electron.Screen;
|
||||||
|
|
||||||
|
|||||||
@@ -395,7 +395,7 @@ class TouchBar extends EventEmitter implements Electron.TouchBar {
|
|||||||
this.on('change', changeListener);
|
this.on('change', changeListener);
|
||||||
|
|
||||||
const escapeItemListener = (item: Electron.TouchBarItemType | null) => {
|
const escapeItemListener = (item: Electron.TouchBarItemType | null) => {
|
||||||
window._setEscapeTouchBarItem(item ?? {});
|
window._setEscapeTouchBarItem(item != null ? item : {});
|
||||||
};
|
};
|
||||||
this.on('escape-item-change', escapeItemListener);
|
this.on('escape-item-change', escapeItemListener);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { app, ipcMain, session, webFrameMain } from 'electron/main';
|
import { app, ipcMain, session, webFrameMain, deprecate } from 'electron/main';
|
||||||
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
|
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
|
||||||
|
|
||||||
import * as url from 'url';
|
import * as url from 'url';
|
||||||
@@ -9,16 +9,12 @@ import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
|
|||||||
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
|
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
|
||||||
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
|
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
|
||||||
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
||||||
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
|
|
||||||
import * as deprecate from '@electron/internal/common/deprecate';
|
|
||||||
|
|
||||||
// session is not used here, the purpose is to make sure session is initialized
|
// session is not used here, the purpose is to make sure session is initalized
|
||||||
// before the webContents module.
|
// before the webContents module.
|
||||||
// eslint-disable-next-line
|
// eslint-disable-next-line
|
||||||
session
|
session
|
||||||
|
|
||||||
const webFrameMainBinding = process._linkedBinding('electron_browser_web_frame_main');
|
|
||||||
|
|
||||||
let nextId = 0;
|
let nextId = 0;
|
||||||
const getNextId = function () {
|
const getNextId = function () {
|
||||||
return ++nextId;
|
return ++nextId;
|
||||||
@@ -67,20 +63,6 @@ const PDFPageSizes: Record<string, ElectronInternal.MediaSize> = {
|
|||||||
}
|
}
|
||||||
} as const;
|
} as const;
|
||||||
|
|
||||||
const paperFormats: Record<string, ElectronInternal.PageSize> = {
|
|
||||||
letter: { width: 8.5, height: 11 },
|
|
||||||
legal: { width: 8.5, height: 14 },
|
|
||||||
tabloid: { width: 11, height: 17 },
|
|
||||||
ledger: { width: 17, height: 11 },
|
|
||||||
a0: { width: 33.1, height: 46.8 },
|
|
||||||
a1: { width: 23.4, height: 33.1 },
|
|
||||||
a2: { width: 16.54, height: 23.4 },
|
|
||||||
a3: { width: 11.7, height: 16.54 },
|
|
||||||
a4: { width: 8.27, height: 11.7 },
|
|
||||||
a5: { width: 5.83, height: 8.27 },
|
|
||||||
a6: { width: 4.13, height: 5.83 }
|
|
||||||
} as const;
|
|
||||||
|
|
||||||
// The minimum micron size Chromium accepts is that where:
|
// The minimum micron size Chromium accepts is that where:
|
||||||
// Per printing/units.h:
|
// Per printing/units.h:
|
||||||
// * kMicronsPerInch - Length of an inch in 0.001mm unit.
|
// * kMicronsPerInch - Length of an inch in 0.001mm unit.
|
||||||
@@ -94,6 +76,42 @@ const isValidCustomPageSize = (width: number, height: number) => {
|
|||||||
return [width, height].every(x => x > 352);
|
return [width, height].every(x => x > 352);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Default printing setting
|
||||||
|
const defaultPrintingSetting = {
|
||||||
|
// Customizable.
|
||||||
|
pageRange: [] as {from: number, to: number}[],
|
||||||
|
mediaSize: {} as ElectronInternal.MediaSize,
|
||||||
|
landscape: false,
|
||||||
|
headerFooterEnabled: false,
|
||||||
|
marginsType: 0,
|
||||||
|
scaleFactor: 100,
|
||||||
|
shouldPrintBackgrounds: false,
|
||||||
|
shouldPrintSelectionOnly: false,
|
||||||
|
// Non-customizable.
|
||||||
|
printWithCloudPrint: false,
|
||||||
|
printWithPrivet: false,
|
||||||
|
printWithExtension: false,
|
||||||
|
pagesPerSheet: 1,
|
||||||
|
isFirstRequest: false,
|
||||||
|
previewUIID: 0,
|
||||||
|
// True, if the document source is modifiable. e.g. HTML and not PDF.
|
||||||
|
previewModifiable: true,
|
||||||
|
printToPDF: true,
|
||||||
|
deviceName: 'Save as PDF',
|
||||||
|
generateDraftData: true,
|
||||||
|
dpiHorizontal: 72,
|
||||||
|
dpiVertical: 72,
|
||||||
|
rasterizePDF: false,
|
||||||
|
duplex: 0,
|
||||||
|
copies: 1,
|
||||||
|
// 2 = color - see ColorModel in //printing/print_job_constants.h
|
||||||
|
color: 2,
|
||||||
|
collate: true,
|
||||||
|
printerType: 2,
|
||||||
|
title: undefined as string | undefined,
|
||||||
|
url: undefined as string | undefined
|
||||||
|
} as const;
|
||||||
|
|
||||||
// JavaScript implementations of WebContents.
|
// JavaScript implementations of WebContents.
|
||||||
const binding = process._linkedBinding('electron_browser_web_contents');
|
const binding = process._linkedBinding('electron_browser_web_contents');
|
||||||
const printing = process._linkedBinding('electron_browser_printing');
|
const printing = process._linkedBinding('electron_browser_printing');
|
||||||
@@ -128,6 +146,13 @@ WebContents.prototype.sendToFrame = function (frameId, channel, ...args) {
|
|||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
WebContents.prototype._sendToFrameInternal = function (frameId, channel, ...args) {
|
||||||
|
const frame = getWebFrame(this, frameId);
|
||||||
|
if (!frame) return false;
|
||||||
|
frame._sendInternal(channel, ...args);
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
// Following methods are mapped to webFrame.
|
// Following methods are mapped to webFrame.
|
||||||
const webFrameMethods = [
|
const webFrameMethods = [
|
||||||
'insertCSS',
|
'insertCSS',
|
||||||
@@ -168,136 +193,136 @@ WebContents.prototype.executeJavaScriptInIsolatedWorld = async function (worldId
|
|||||||
let pendingPromise: Promise<any> | undefined;
|
let pendingPromise: Promise<any> | undefined;
|
||||||
WebContents.prototype.printToPDF = async function (options) {
|
WebContents.prototype.printToPDF = async function (options) {
|
||||||
const printSettings: Record<string, any> = {
|
const printSettings: Record<string, any> = {
|
||||||
requestID: getNextId(),
|
...defaultPrintingSetting,
|
||||||
landscape: false,
|
requestID: getNextId()
|
||||||
displayHeaderFooter: false,
|
|
||||||
headerTemplate: '',
|
|
||||||
footerTemplate: '',
|
|
||||||
printBackground: false,
|
|
||||||
scale: 1,
|
|
||||||
paperWidth: 8.5,
|
|
||||||
paperHeight: 11,
|
|
||||||
marginTop: 0,
|
|
||||||
marginBottom: 0,
|
|
||||||
marginLeft: 0,
|
|
||||||
marginRight: 0,
|
|
||||||
pageRanges: '',
|
|
||||||
preferCSSPageSize: false
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (options.landscape !== undefined) {
|
if (options.landscape !== undefined) {
|
||||||
if (typeof options.landscape !== 'boolean') {
|
if (typeof options.landscape !== 'boolean') {
|
||||||
return Promise.reject(new Error('landscape must be a Boolean'));
|
const error = new Error('landscape must be a Boolean');
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.landscape = options.landscape;
|
printSettings.landscape = options.landscape;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.displayHeaderFooter !== undefined) {
|
if (options.scaleFactor !== undefined) {
|
||||||
if (typeof options.displayHeaderFooter !== 'boolean') {
|
if (typeof options.scaleFactor !== 'number') {
|
||||||
return Promise.reject(new Error('displayHeaderFooter must be a Boolean'));
|
const error = new Error('scaleFactor must be a Number');
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.displayHeaderFooter = options.displayHeaderFooter;
|
printSettings.scaleFactor = options.scaleFactor;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.marginsType !== undefined) {
|
||||||
|
if (typeof options.marginsType !== 'number') {
|
||||||
|
const error = new Error('marginsType must be a Number');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
printSettings.marginsType = options.marginsType;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (options.printSelectionOnly !== undefined) {
|
||||||
|
if (typeof options.printSelectionOnly !== 'boolean') {
|
||||||
|
const error = new Error('printSelectionOnly must be a Boolean');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
printSettings.shouldPrintSelectionOnly = options.printSelectionOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.printBackground !== undefined) {
|
if (options.printBackground !== undefined) {
|
||||||
if (typeof options.printBackground !== 'boolean') {
|
if (typeof options.printBackground !== 'boolean') {
|
||||||
return Promise.reject(new Error('printBackground must be a Boolean'));
|
const error = new Error('printBackground must be a Boolean');
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.shouldPrintBackgrounds = options.printBackground;
|
printSettings.shouldPrintBackgrounds = options.printBackground;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.scale !== undefined) {
|
|
||||||
if (typeof options.scale !== 'number') {
|
|
||||||
return Promise.reject(new Error('scale must be a Number'));
|
|
||||||
}
|
|
||||||
printSettings.scaleFactor = options.scale;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { pageSize } = options;
|
|
||||||
if (pageSize !== undefined) {
|
|
||||||
if (typeof pageSize === 'string') {
|
|
||||||
const format = paperFormats[pageSize.toLowerCase()];
|
|
||||||
if (!format) {
|
|
||||||
return Promise.reject(new Error(`Invalid pageSize ${pageSize}`));
|
|
||||||
}
|
|
||||||
|
|
||||||
printSettings.paperWidth = format.width;
|
|
||||||
printSettings.paperHeight = format.height;
|
|
||||||
} else if (typeof options.pageSize === 'object') {
|
|
||||||
if (!pageSize.height || !pageSize.width) {
|
|
||||||
return Promise.reject(new Error('height and width properties are required for pageSize'));
|
|
||||||
}
|
|
||||||
|
|
||||||
printSettings.paperWidth = pageSize.width;
|
|
||||||
printSettings.paperHeight = pageSize.height;
|
|
||||||
} else {
|
|
||||||
return Promise.reject(new Error('pageSize must be a String or Object'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const { margins } = options;
|
|
||||||
if (margins !== undefined) {
|
|
||||||
if (typeof margins !== 'object') {
|
|
||||||
return Promise.reject(new Error('margins must be an Object'));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (margins.top !== undefined) {
|
|
||||||
if (typeof margins.top !== 'number') {
|
|
||||||
return Promise.reject(new Error('margins.top must be a Number'));
|
|
||||||
}
|
|
||||||
printSettings.marginTop = margins.top;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (margins.bottom !== undefined) {
|
|
||||||
if (typeof margins.bottom !== 'number') {
|
|
||||||
return Promise.reject(new Error('margins.bottom must be a Number'));
|
|
||||||
}
|
|
||||||
printSettings.marginBottom = margins.bottom;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (margins.left !== undefined) {
|
|
||||||
if (typeof margins.left !== 'number') {
|
|
||||||
return Promise.reject(new Error('margins.left must be a Number'));
|
|
||||||
}
|
|
||||||
printSettings.marginLeft = margins.left;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (margins.right !== undefined) {
|
|
||||||
if (typeof margins.right !== 'number') {
|
|
||||||
return Promise.reject(new Error('margins.right must be a Number'));
|
|
||||||
}
|
|
||||||
printSettings.marginRight = margins.right;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (options.pageRanges !== undefined) {
|
if (options.pageRanges !== undefined) {
|
||||||
if (typeof options.pageRanges !== 'string') {
|
const pageRanges = options.pageRanges;
|
||||||
return Promise.reject(new Error('printBackground must be a String'));
|
if (!Object.prototype.hasOwnProperty.call(pageRanges, 'from') || !Object.prototype.hasOwnProperty.call(pageRanges, 'to')) {
|
||||||
|
const error = new Error('pageRanges must be an Object with \'from\' and \'to\' properties');
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.pageRanges = options.pageRanges;
|
|
||||||
|
if (typeof pageRanges.from !== 'number') {
|
||||||
|
const error = new Error('pageRanges.from must be a Number');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (typeof pageRanges.to !== 'number') {
|
||||||
|
const error = new Error('pageRanges.to must be a Number');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Chromium uses 1-based page ranges, so increment each by 1.
|
||||||
|
printSettings.pageRange = [{
|
||||||
|
from: pageRanges.from + 1,
|
||||||
|
to: pageRanges.to + 1
|
||||||
|
}];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.headerTemplate !== undefined) {
|
if (options.headerFooter !== undefined) {
|
||||||
if (typeof options.headerTemplate !== 'string') {
|
const headerFooter = options.headerFooter;
|
||||||
return Promise.reject(new Error('headerTemplate must be a String'));
|
printSettings.headerFooterEnabled = true;
|
||||||
|
if (typeof headerFooter === 'object') {
|
||||||
|
if (!headerFooter.url || !headerFooter.title) {
|
||||||
|
const error = new Error('url and title properties are required for headerFooter');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
if (typeof headerFooter.title !== 'string') {
|
||||||
|
const error = new Error('headerFooter.title must be a String');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
printSettings.title = headerFooter.title;
|
||||||
|
|
||||||
|
if (typeof headerFooter.url !== 'string') {
|
||||||
|
const error = new Error('headerFooter.url must be a String');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
printSettings.url = headerFooter.url;
|
||||||
|
} else {
|
||||||
|
const error = new Error('headerFooter must be an Object');
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.headerTemplate = options.headerTemplate;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.footerTemplate !== undefined) {
|
// Optionally set size for PDF.
|
||||||
if (typeof options.footerTemplate !== 'string') {
|
if (options.pageSize !== undefined) {
|
||||||
return Promise.reject(new Error('footerTemplate must be a String'));
|
const pageSize = options.pageSize;
|
||||||
|
if (typeof pageSize === 'object') {
|
||||||
|
if (!pageSize.height || !pageSize.width) {
|
||||||
|
const error = new Error('height and width properties are required for pageSize');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Dimensions in Microns - 1 meter = 10^6 microns
|
||||||
|
const height = Math.ceil(pageSize.height);
|
||||||
|
const width = Math.ceil(pageSize.width);
|
||||||
|
if (!isValidCustomPageSize(width, height)) {
|
||||||
|
const error = new Error('height and width properties must be minimum 352 microns.');
|
||||||
|
return Promise.reject(error);
|
||||||
|
}
|
||||||
|
|
||||||
|
printSettings.mediaSize = {
|
||||||
|
name: 'CUSTOM',
|
||||||
|
custom_display_name: 'Custom',
|
||||||
|
height_microns: height,
|
||||||
|
width_microns: width
|
||||||
|
};
|
||||||
|
} else if (Object.prototype.hasOwnProperty.call(PDFPageSizes, pageSize)) {
|
||||||
|
printSettings.mediaSize = PDFPageSizes[pageSize];
|
||||||
|
} else {
|
||||||
|
const error = new Error(`Unsupported pageSize: ${pageSize}`);
|
||||||
|
return Promise.reject(error);
|
||||||
}
|
}
|
||||||
printSettings.footerTemplate = options.footerTemplate;
|
} else {
|
||||||
}
|
printSettings.mediaSize = PDFPageSizes.A4;
|
||||||
|
|
||||||
if (options.preferCSSPageSize !== undefined) {
|
|
||||||
if (typeof options.preferCSSPageSize !== 'boolean') {
|
|
||||||
return Promise.reject(new Error('footerTemplate must be a String'));
|
|
||||||
}
|
|
||||||
printSettings.preferCSSPageSize = options.preferCSSPageSize;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Chromium expects this in a 0-100 range number, not as float
|
||||||
|
printSettings.scaleFactor = Math.ceil(printSettings.scaleFactor) % 100;
|
||||||
|
// PrinterType enum from //printing/print_job_constants.h
|
||||||
|
printSettings.printerType = 2;
|
||||||
if (this._printToPDF) {
|
if (this._printToPDF) {
|
||||||
if (pendingPromise) {
|
if (pendingPromise) {
|
||||||
pendingPromise = pendingPromise.then(() => this._printToPDF(printSettings));
|
pendingPromise = pendingPromise.then(() => this._printToPDF(printSettings));
|
||||||
@@ -560,12 +585,6 @@ WebContents.prototype._init = function () {
|
|||||||
|
|
||||||
this._windowOpenHandler = null;
|
this._windowOpenHandler = null;
|
||||||
|
|
||||||
const ipc = new IpcMainImpl();
|
|
||||||
Object.defineProperty(this, 'ipc', {
|
|
||||||
get () { return ipc; },
|
|
||||||
enumerable: true
|
|
||||||
});
|
|
||||||
|
|
||||||
// Dispatch IPC messages to the ipc module.
|
// Dispatch IPC messages to the ipc module.
|
||||||
this.on('-ipc-message' as any, function (this: Electron.WebContents, event: Electron.IpcMainEvent, internal: boolean, channel: string, args: any[]) {
|
this.on('-ipc-message' as any, function (this: Electron.WebContents, event: Electron.IpcMainEvent, internal: boolean, channel: string, args: any[]) {
|
||||||
addSenderFrameToEvent(event);
|
addSenderFrameToEvent(event);
|
||||||
@@ -574,9 +593,6 @@ WebContents.prototype._init = function () {
|
|||||||
} else {
|
} else {
|
||||||
addReplyToEvent(event);
|
addReplyToEvent(event);
|
||||||
this.emit('ipc-message', event, channel, ...args);
|
this.emit('ipc-message', event, channel, ...args);
|
||||||
const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
|
|
||||||
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, ...args);
|
|
||||||
ipc.emit(channel, event, ...args);
|
|
||||||
ipcMain.emit(channel, event, ...args);
|
ipcMain.emit(channel, event, ...args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -588,10 +604,8 @@ WebContents.prototype._init = function () {
|
|||||||
console.error(`Error occurred in handler for '${channel}':`, error);
|
console.error(`Error occurred in handler for '${channel}':`, error);
|
||||||
event.sendReply({ error: error.toString() });
|
event.sendReply({ error: error.toString() });
|
||||||
};
|
};
|
||||||
const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
|
const target = internal ? ipcMainInternal : ipcMain;
|
||||||
const targets: (ElectronInternal.IpcMainInternal| undefined)[] = internal ? [ipcMainInternal] : [maybeWebFrame && maybeWebFrame.ipc, ipc, ipcMain];
|
if ((target as any)._invokeHandlers.has(channel)) {
|
||||||
const target = targets.find(target => target && (target as any)._invokeHandlers.has(channel));
|
|
||||||
if (target) {
|
|
||||||
(target as any)._invokeHandlers.get(channel)(event, ...args);
|
(target as any)._invokeHandlers.get(channel)(event, ...args);
|
||||||
} else {
|
} else {
|
||||||
event._throw(`No handler registered for '${channel}'`);
|
event._throw(`No handler registered for '${channel}'`);
|
||||||
@@ -605,13 +619,10 @@ WebContents.prototype._init = function () {
|
|||||||
ipcMainInternal.emit(channel, event, ...args);
|
ipcMainInternal.emit(channel, event, ...args);
|
||||||
} else {
|
} else {
|
||||||
addReplyToEvent(event);
|
addReplyToEvent(event);
|
||||||
const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
|
if (this.listenerCount('ipc-message-sync') === 0 && ipcMain.listenerCount(channel) === 0) {
|
||||||
if (this.listenerCount('ipc-message-sync') === 0 && ipc.listenerCount(channel) === 0 && ipcMain.listenerCount(channel) === 0 && (!maybeWebFrame || maybeWebFrame.ipc.listenerCount(channel) === 0)) {
|
|
||||||
console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${channel}' channel without listeners.`);
|
console.warn(`WebContents #${this.id} called ipcRenderer.sendSync() with '${channel}' channel without listeners.`);
|
||||||
}
|
}
|
||||||
this.emit('ipc-message-sync', event, channel, ...args);
|
this.emit('ipc-message-sync', event, channel, ...args);
|
||||||
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, ...args);
|
|
||||||
ipc.emit(channel, event, ...args);
|
|
||||||
ipcMain.emit(channel, event, ...args);
|
ipcMain.emit(channel, event, ...args);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -619,9 +630,6 @@ WebContents.prototype._init = function () {
|
|||||||
this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) {
|
this.on('-ipc-ports' as any, function (event: Electron.IpcMainEvent, internal: boolean, channel: string, message: any, ports: any[]) {
|
||||||
addSenderFrameToEvent(event);
|
addSenderFrameToEvent(event);
|
||||||
event.ports = ports.map(p => new MessagePortMain(p));
|
event.ports = ports.map(p => new MessagePortMain(p));
|
||||||
const maybeWebFrame = webFrameMainBinding.fromIdOrNull(event.processId, event.frameId);
|
|
||||||
maybeWebFrame && maybeWebFrame.ipc.emit(channel, event, message);
|
|
||||||
ipc.emit(channel, event, message);
|
|
||||||
ipcMain.emit(channel, event, message);
|
ipcMain.emit(channel, event, message);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -671,6 +679,7 @@ WebContents.prototype._init = function () {
|
|||||||
const options = result.browserWindowConstructorOptions;
|
const options = result.browserWindowConstructorOptions;
|
||||||
if (!event.defaultPrevented) {
|
if (!event.defaultPrevented) {
|
||||||
openGuestWindow({
|
openGuestWindow({
|
||||||
|
event,
|
||||||
embedder: event.sender,
|
embedder: event.sender,
|
||||||
disposition,
|
disposition,
|
||||||
referrer,
|
referrer,
|
||||||
@@ -717,16 +726,18 @@ WebContents.prototype._init = function () {
|
|||||||
transparent: windowOpenOverriddenOptions.transparent,
|
transparent: windowOpenOverriddenOptions.transparent,
|
||||||
...windowOpenOverriddenOptions.webPreferences
|
...windowOpenOverriddenOptions.webPreferences
|
||||||
} : undefined;
|
} : undefined;
|
||||||
|
// TODO(zcbenz): The features string is parsed twice: here where it is
|
||||||
|
// passed to C++, and in |makeBrowserWindowOptions| later where it is
|
||||||
|
// not actually used since the WebContents is created here.
|
||||||
|
// We should be able to remove the latter once the |new-window| event
|
||||||
|
// is removed.
|
||||||
const { webPreferences: parsedWebPreferences } = parseFeatures(rawFeatures);
|
const { webPreferences: parsedWebPreferences } = parseFeatures(rawFeatures);
|
||||||
|
// Parameters should keep same with |makeBrowserWindowOptions|.
|
||||||
const webPreferences = makeWebPreferences({
|
const webPreferences = makeWebPreferences({
|
||||||
embedder: event.sender,
|
embedder: event.sender,
|
||||||
insecureParsedWebPreferences: parsedWebPreferences,
|
insecureParsedWebPreferences: parsedWebPreferences,
|
||||||
secureOverrideWebPreferences
|
secureOverrideWebPreferences
|
||||||
});
|
});
|
||||||
windowOpenOverriddenOptions = {
|
|
||||||
...windowOpenOverriddenOptions,
|
|
||||||
webPreferences
|
|
||||||
};
|
|
||||||
this._setNextChildWebPreferences(webPreferences);
|
this._setNextChildWebPreferences(webPreferences);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -748,6 +759,7 @@ WebContents.prototype._init = function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
openGuestWindow({
|
openGuestWindow({
|
||||||
|
event,
|
||||||
embedder: event.sender,
|
embedder: event.sender,
|
||||||
guest: webContents,
|
guest: webContents,
|
||||||
overrideBrowserWindowOptions: overriddenOptions,
|
overrideBrowserWindowOptions: overriddenOptions,
|
||||||
|
|||||||
@@ -1,16 +1,7 @@
|
|||||||
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
|
import { MessagePortMain } from '@electron/internal/browser/message-port-main';
|
||||||
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
|
|
||||||
|
|
||||||
const { WebFrameMain, fromId } = process._linkedBinding('electron_browser_web_frame_main');
|
const { WebFrameMain, fromId } = process._linkedBinding('electron_browser_web_frame_main');
|
||||||
|
|
||||||
Object.defineProperty(WebFrameMain.prototype, 'ipc', {
|
|
||||||
get () {
|
|
||||||
const ipc = new IpcMainImpl();
|
|
||||||
Object.defineProperty(this, 'ipc', { value: ipc });
|
|
||||||
return ipc;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
WebFrameMain.prototype.send = function (channel, ...args) {
|
WebFrameMain.prototype.send = function (channel, ...args) {
|
||||||
if (typeof channel !== 'string') {
|
if (typeof channel !== 'string') {
|
||||||
throw new Error('Missing required channel argument');
|
throw new Error('Missing required channel argument');
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ export const setDefaultApplicationMenu = () => {
|
|||||||
{
|
{
|
||||||
label: 'Community Discussions',
|
label: 'Community Discussions',
|
||||||
click: async () => {
|
click: async () => {
|
||||||
await shell.openExternal('https://discord.gg/electronjs');
|
await shell.openExternal('https://discord.com/invite/APGC3k5yaH');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { webViewEvents } from '@electron/internal/browser/web-view-events';
|
|||||||
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages';
|
||||||
|
|
||||||
interface GuestInstance {
|
interface GuestInstance {
|
||||||
elementInstanceId: number;
|
elementInstanceId?: number;
|
||||||
visibilityState?: VisibilityState;
|
visibilityState?: VisibilityState;
|
||||||
embedder: Electron.WebContents;
|
embedder: Electron.WebContents;
|
||||||
guest: Electron.WebContents;
|
guest: Electron.WebContents;
|
||||||
@@ -22,6 +22,13 @@ const supportedWebViewEvents = Object.keys(webViewEvents);
|
|||||||
const guestInstances = new Map<number, GuestInstance>();
|
const guestInstances = new Map<number, GuestInstance>();
|
||||||
const embedderElementsMap = new Map<string, number>();
|
const embedderElementsMap = new Map<string, number>();
|
||||||
|
|
||||||
|
function sanitizeOptionsForGuest (options: Record<string, any>) {
|
||||||
|
const ret = { ...options };
|
||||||
|
// WebContents values can't be sent over IPC.
|
||||||
|
delete ret.webContents;
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
function makeWebPreferences (embedder: Electron.WebContents, params: Record<string, any>) {
|
function makeWebPreferences (embedder: Electron.WebContents, params: Record<string, any>) {
|
||||||
// parse the 'webpreferences' attribute string, if set
|
// parse the 'webpreferences' attribute string, if set
|
||||||
// this uses the same parsing rules as window.open uses for its features
|
// this uses the same parsing rules as window.open uses for its features
|
||||||
@@ -31,15 +38,14 @@ function makeWebPreferences (embedder: Electron.WebContents, params: Record<stri
|
|||||||
: null;
|
: null;
|
||||||
|
|
||||||
const webPreferences: Electron.WebPreferences = {
|
const webPreferences: Electron.WebPreferences = {
|
||||||
nodeIntegration: params.nodeintegration ?? false,
|
nodeIntegration: params.nodeintegration != null ? params.nodeintegration : false,
|
||||||
nodeIntegrationInSubFrames: params.nodeintegrationinsubframes ?? false,
|
nodeIntegrationInSubFrames: params.nodeintegrationinsubframes != null ? params.nodeintegrationinsubframes : false,
|
||||||
plugins: params.plugins,
|
plugins: params.plugins,
|
||||||
zoomFactor: embedder.zoomFactor,
|
zoomFactor: embedder.zoomFactor,
|
||||||
disablePopups: !params.allowpopups,
|
disablePopups: !params.allowpopups,
|
||||||
webSecurity: !params.disablewebsecurity,
|
webSecurity: !params.disablewebsecurity,
|
||||||
enableBlinkFeatures: params.blinkfeatures,
|
enableBlinkFeatures: params.blinkfeatures,
|
||||||
disableBlinkFeatures: params.disableblinkfeatures,
|
disableBlinkFeatures: params.disableblinkfeatures,
|
||||||
partition: params.partition,
|
|
||||||
...parsedWebPreferences
|
...parsedWebPreferences
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -81,26 +87,14 @@ function makeLoadURLOptions (params: Record<string, any>) {
|
|||||||
|
|
||||||
// Create a new guest instance.
|
// Create a new guest instance.
|
||||||
const createGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, params: Record<string, any>) {
|
const createGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, params: Record<string, any>) {
|
||||||
const webPreferences = makeWebPreferences(embedder, params);
|
|
||||||
const event = eventBinding.createWithSender(embedder);
|
|
||||||
|
|
||||||
const { instanceId } = params;
|
|
||||||
|
|
||||||
embedder.emit('will-attach-webview', event, webPreferences, params);
|
|
||||||
if (event.defaultPrevented) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
const guest = (webContents as typeof ElectronInternal.WebContents).create({
|
const guest = (webContents as typeof ElectronInternal.WebContents).create({
|
||||||
...webPreferences,
|
|
||||||
type: 'webview',
|
type: 'webview',
|
||||||
|
partition: params.partition,
|
||||||
embedder
|
embedder
|
||||||
});
|
});
|
||||||
|
|
||||||
const guestInstanceId = guest.id;
|
const guestInstanceId = guest.id;
|
||||||
guestInstances.set(guestInstanceId, {
|
guestInstances.set(guestInstanceId, {
|
||||||
elementInstanceId,
|
|
||||||
guest,
|
guest,
|
||||||
embedder
|
embedder
|
||||||
});
|
});
|
||||||
@@ -114,8 +108,11 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n
|
|||||||
|
|
||||||
// Init guest web view after attached.
|
// Init guest web view after attached.
|
||||||
guest.once('did-attach' as any, function (this: Electron.WebContents, event: Electron.Event) {
|
guest.once('did-attach' as any, function (this: Electron.WebContents, event: Electron.Event) {
|
||||||
|
const params = this.attachParams!;
|
||||||
|
delete this.attachParams;
|
||||||
|
|
||||||
const previouslyAttached = this.viewInstanceId != null;
|
const previouslyAttached = this.viewInstanceId != null;
|
||||||
this.viewInstanceId = instanceId;
|
this.viewInstanceId = params.instanceId;
|
||||||
|
|
||||||
// Only load URL and set size on first attach
|
// Only load URL and set size on first attach
|
||||||
if (previouslyAttached) {
|
if (previouslyAttached) {
|
||||||
@@ -123,7 +120,7 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (params.src) {
|
if (params.src) {
|
||||||
this.loadURL(params.src, makeLoadURLOptions(params));
|
this.loadURL(params.src, params.opts);
|
||||||
}
|
}
|
||||||
embedder.emit('did-attach-webview', event, guest);
|
embedder.emit('did-attach-webview', event, guest);
|
||||||
});
|
});
|
||||||
@@ -149,6 +146,15 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guest.on('new-window', function (event, url, frameName, disposition, options) {
|
||||||
|
sendToEmbedder(IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT, 'new-window', {
|
||||||
|
url,
|
||||||
|
frameName,
|
||||||
|
disposition,
|
||||||
|
options: sanitizeOptionsForGuest(options)
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Dispatch guest's IPC messages to embedder.
|
// Dispatch guest's IPC messages to embedder.
|
||||||
guest.on('ipc-message-host' as any, function (event: Electron.IpcMainEvent, channel: string, args: any[]) {
|
guest.on('ipc-message-host' as any, function (event: Electron.IpcMainEvent, channel: string, args: any[]) {
|
||||||
sendToEmbedder(IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT, 'ipc-message', {
|
sendToEmbedder(IPC_MESSAGES.GUEST_VIEW_INTERNAL_DISPATCH_EVENT, 'ipc-message', {
|
||||||
@@ -167,25 +173,78 @@ const createGuest = function (embedder: Electron.WebContents, embedderFrameId: n
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (attachGuest(embedder, embedderFrameId, elementInstanceId, guestInstanceId, params)) {
|
||||||
|
return guestInstanceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
return -1;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Attach the guest to an element of embedder.
|
||||||
|
const attachGuest = function (embedder: Electron.WebContents, embedderFrameId: number, elementInstanceId: number, guestInstanceId: number, params: Record<string, any>) {
|
||||||
// Destroy the old guest when attaching.
|
// Destroy the old guest when attaching.
|
||||||
const key = `${embedder.id}-${elementInstanceId}`;
|
const key = `${embedder.id}-${elementInstanceId}`;
|
||||||
const oldGuestInstanceId = embedderElementsMap.get(key);
|
const oldGuestInstanceId = embedderElementsMap.get(key);
|
||||||
if (oldGuestInstanceId != null) {
|
if (oldGuestInstanceId != null) {
|
||||||
|
// Reattachment to the same guest is just a no-op.
|
||||||
|
if (oldGuestInstanceId === guestInstanceId) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
const oldGuestInstance = guestInstances.get(oldGuestInstanceId);
|
const oldGuestInstance = guestInstances.get(oldGuestInstanceId);
|
||||||
if (oldGuestInstance) {
|
if (oldGuestInstance) {
|
||||||
oldGuestInstance.guest.detachFromOuterFrame();
|
oldGuestInstance.guest.detachFromOuterFrame();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const guestInstance = guestInstances.get(guestInstanceId);
|
||||||
|
// If this isn't a valid guest instance then do nothing.
|
||||||
|
if (!guestInstance) {
|
||||||
|
console.error(new Error(`Guest attach failed: Invalid guestInstanceId ${guestInstanceId}`));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const { guest } = guestInstance;
|
||||||
|
if (guest.hostWebContents !== embedder) {
|
||||||
|
console.error(new Error(`Guest attach failed: Access denied to guestInstanceId ${guestInstanceId}`));
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { instanceId } = params;
|
||||||
|
|
||||||
|
// If this guest is already attached to an element then remove it
|
||||||
|
if (guestInstance.elementInstanceId) {
|
||||||
|
const oldKey = `${guestInstance.embedder.id}-${guestInstance.elementInstanceId}`;
|
||||||
|
embedderElementsMap.delete(oldKey);
|
||||||
|
|
||||||
|
// Remove guest from embedder if moving across web views
|
||||||
|
if (guest.viewInstanceId !== instanceId) {
|
||||||
|
webViewManager.removeGuest(guestInstance.embedder, guestInstanceId);
|
||||||
|
guestInstance.embedder._sendInternal(`${IPC_MESSAGES.GUEST_VIEW_INTERNAL_DESTROY_GUEST}-${guest.viewInstanceId}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const webPreferences = makeWebPreferences(embedder, params);
|
||||||
|
|
||||||
|
const event = eventBinding.createWithSender(embedder);
|
||||||
|
embedder.emit('will-attach-webview', event, webPreferences, params);
|
||||||
|
if (event.defaultPrevented) {
|
||||||
|
if (guest.viewInstanceId == null) guest.viewInstanceId = instanceId;
|
||||||
|
guest.destroy();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
guest.attachParams = { instanceId, src: params.src, opts: makeLoadURLOptions(params) };
|
||||||
embedderElementsMap.set(key, guestInstanceId);
|
embedderElementsMap.set(key, guestInstanceId);
|
||||||
|
|
||||||
guest.setEmbedder(embedder);
|
guest.setEmbedder(embedder);
|
||||||
|
guestInstance.embedder = embedder;
|
||||||
|
guestInstance.elementInstanceId = elementInstanceId;
|
||||||
|
|
||||||
watchEmbedder(embedder);
|
watchEmbedder(embedder);
|
||||||
|
|
||||||
webViewManager.addGuest(guestInstanceId, embedder, guest, webPreferences);
|
webViewManager.addGuest(guestInstanceId, embedder, guest, webPreferences);
|
||||||
guest.attachToIframe(embedder, embedderFrameId);
|
guest.attachToIframe(embedder, embedderFrameId);
|
||||||
|
return true;
|
||||||
return guestInstanceId;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove an guest-embedder relationship.
|
// Remove an guest-embedder relationship.
|
||||||
|
|||||||
@@ -24,8 +24,13 @@ const getGuestWindowByFrameName = (name: string) => frameNamesToWindow.get(name)
|
|||||||
/**
|
/**
|
||||||
* `openGuestWindow` is called to create and setup event handling for the new
|
* `openGuestWindow` is called to create and setup event handling for the new
|
||||||
* window.
|
* window.
|
||||||
|
*
|
||||||
|
* Until its removal in 12.0.0, the `new-window` event is fired, allowing the
|
||||||
|
* user to preventDefault() on the passed event (which ends up calling
|
||||||
|
* DestroyWebContents).
|
||||||
*/
|
*/
|
||||||
export function openGuestWindow ({ embedder, guest, referrer, disposition, postData, overrideBrowserWindowOptions, windowOpenArgs, outlivesOpener }: {
|
export function openGuestWindow ({ event, embedder, guest, referrer, disposition, postData, overrideBrowserWindowOptions, windowOpenArgs, outlivesOpener }: {
|
||||||
|
event: { sender: WebContents, defaultPrevented: boolean },
|
||||||
embedder: WebContents,
|
embedder: WebContents,
|
||||||
guest?: WebContents,
|
guest?: WebContents,
|
||||||
referrer: Referrer,
|
referrer: Referrer,
|
||||||
@@ -36,14 +41,23 @@ export function openGuestWindow ({ embedder, guest, referrer, disposition, postD
|
|||||||
outlivesOpener: boolean,
|
outlivesOpener: boolean,
|
||||||
}): BrowserWindow | undefined {
|
}): BrowserWindow | undefined {
|
||||||
const { url, frameName, features } = windowOpenArgs;
|
const { url, frameName, features } = windowOpenArgs;
|
||||||
const { options: parsedOptions } = parseFeatures(features);
|
const { options: browserWindowOptions } = makeBrowserWindowOptions({
|
||||||
const browserWindowOptions = {
|
embedder,
|
||||||
show: true,
|
features,
|
||||||
width: 800,
|
overrideOptions: overrideBrowserWindowOptions
|
||||||
height: 600,
|
});
|
||||||
...parsedOptions,
|
|
||||||
...overrideBrowserWindowOptions
|
const didCancelEvent = emitDeprecatedNewWindowEvent({
|
||||||
};
|
event,
|
||||||
|
embedder,
|
||||||
|
guest,
|
||||||
|
browserWindowOptions,
|
||||||
|
windowOpenArgs,
|
||||||
|
disposition,
|
||||||
|
postData,
|
||||||
|
referrer
|
||||||
|
});
|
||||||
|
if (didCancelEvent) return;
|
||||||
|
|
||||||
// To spec, subsequent window.open calls with the same frame name (`target` in
|
// To spec, subsequent window.open calls with the same frame name (`target` in
|
||||||
// spec parlance) will reuse the previous window.
|
// spec parlance) will reuse the previous window.
|
||||||
@@ -120,6 +134,64 @@ const handleWindowLifecycleEvents = function ({ embedder, guest, frameName, outl
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Deprecated in favor of `webContents.setWindowOpenHandler` and
|
||||||
|
* `did-create-window` in 11.0.0. Will be removed in 12.0.0.
|
||||||
|
*/
|
||||||
|
function emitDeprecatedNewWindowEvent ({ event, embedder, guest, windowOpenArgs, browserWindowOptions, disposition, referrer, postData }: {
|
||||||
|
event: { sender: WebContents, defaultPrevented: boolean, newGuest?: BrowserWindow },
|
||||||
|
embedder: WebContents,
|
||||||
|
guest?: WebContents,
|
||||||
|
windowOpenArgs: WindowOpenArgs,
|
||||||
|
browserWindowOptions: BrowserWindowConstructorOptions,
|
||||||
|
disposition: string,
|
||||||
|
referrer: Referrer,
|
||||||
|
postData?: PostData,
|
||||||
|
}): boolean {
|
||||||
|
const { url, frameName } = windowOpenArgs;
|
||||||
|
const isWebViewWithPopupsDisabled = embedder.getType() === 'webview' && embedder.getLastWebPreferences()!.disablePopups;
|
||||||
|
const postBody = postData ? {
|
||||||
|
data: postData,
|
||||||
|
...parseContentTypeFormat(postData)
|
||||||
|
} : null;
|
||||||
|
|
||||||
|
embedder.emit(
|
||||||
|
'new-window',
|
||||||
|
event,
|
||||||
|
url,
|
||||||
|
frameName,
|
||||||
|
disposition,
|
||||||
|
{
|
||||||
|
...browserWindowOptions,
|
||||||
|
webContents: guest
|
||||||
|
},
|
||||||
|
[], // additionalFeatures
|
||||||
|
referrer,
|
||||||
|
postBody
|
||||||
|
);
|
||||||
|
|
||||||
|
const { newGuest } = event;
|
||||||
|
if (isWebViewWithPopupsDisabled) return true;
|
||||||
|
if (event.defaultPrevented) {
|
||||||
|
if (newGuest) {
|
||||||
|
if (guest === newGuest.webContents) {
|
||||||
|
// The webContents is not changed, so set defaultPrevented to false to
|
||||||
|
// stop the callers of this event from destroying the webContents.
|
||||||
|
event.defaultPrevented = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
handleWindowLifecycleEvents({
|
||||||
|
embedder: event.sender,
|
||||||
|
guest: newGuest,
|
||||||
|
frameName,
|
||||||
|
outlivesOpener: false
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
// Security options that child windows will always inherit from parent windows
|
// Security options that child windows will always inherit from parent windows
|
||||||
const securityWebPreferences: { [key: string]: boolean } = {
|
const securityWebPreferences: { [key: string]: boolean } = {
|
||||||
contextIsolation: true,
|
contextIsolation: true,
|
||||||
@@ -131,6 +203,33 @@ const securityWebPreferences: { [key: string]: boolean } = {
|
|||||||
enableWebSQL: false
|
enableWebSQL: false
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function makeBrowserWindowOptions ({ embedder, features, overrideOptions }: {
|
||||||
|
embedder: WebContents,
|
||||||
|
features: string,
|
||||||
|
overrideOptions?: BrowserWindowConstructorOptions,
|
||||||
|
}) {
|
||||||
|
const { options: parsedOptions, webPreferences: parsedWebPreferences } = parseFeatures(features);
|
||||||
|
|
||||||
|
return {
|
||||||
|
options: {
|
||||||
|
show: true,
|
||||||
|
width: 800,
|
||||||
|
height: 600,
|
||||||
|
...parsedOptions,
|
||||||
|
...overrideOptions,
|
||||||
|
// Note that for normal code path an existing WebContents created by
|
||||||
|
// Chromium will be used, with web preferences parsed in the
|
||||||
|
// |-will-add-new-contents| event.
|
||||||
|
// The |webPreferences| here is only used by the |new-window| event.
|
||||||
|
webPreferences: makeWebPreferences({
|
||||||
|
embedder,
|
||||||
|
insecureParsedWebPreferences: parsedWebPreferences,
|
||||||
|
secureOverrideWebPreferences: overrideOptions && overrideOptions.webPreferences
|
||||||
|
})
|
||||||
|
} as Electron.BrowserViewConstructorOptions
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export function makeWebPreferences ({ embedder, secureOverrideWebPreferences = {}, insecureParsedWebPreferences: parsedWebPreferences = {} }: {
|
export function makeWebPreferences ({ embedder, secureOverrideWebPreferences = {}, insecureParsedWebPreferences: parsedWebPreferences = {} }: {
|
||||||
embedder: WebContents,
|
embedder: WebContents,
|
||||||
insecureParsedWebPreferences?: ReturnType<typeof parseFeatures>['webPreferences'],
|
insecureParsedWebPreferences?: ReturnType<typeof parseFeatures>['webPreferences'],
|
||||||
|
|||||||
@@ -4,13 +4,6 @@ import { IpcMainInvokeEvent } from 'electron/main';
|
|||||||
export class IpcMainImpl extends EventEmitter {
|
export class IpcMainImpl extends EventEmitter {
|
||||||
private _invokeHandlers: Map<string, (e: IpcMainInvokeEvent, ...args: any[]) => void> = new Map();
|
private _invokeHandlers: Map<string, (e: IpcMainInvokeEvent, ...args: any[]) => void> = new Map();
|
||||||
|
|
||||||
constructor () {
|
|
||||||
super();
|
|
||||||
|
|
||||||
// Do not throw exception when channel name is "error".
|
|
||||||
this.on('error', () => {});
|
|
||||||
}
|
|
||||||
|
|
||||||
handle: Electron.IpcMain['handle'] = (method, fn) => {
|
handle: Electron.IpcMain['handle'] = (method, fn) => {
|
||||||
if (this._invokeHandlers.has(method)) {
|
if (this._invokeHandlers.has(method)) {
|
||||||
throw new Error(`Attempted to register a second handler for '${method}'`);
|
throw new Error(`Attempted to register a second handler for '${method}'`);
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
|
import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl';
|
||||||
|
|
||||||
export const ipcMainInternal = new IpcMainImpl() as ElectronInternal.IpcMainInternal;
|
export const ipcMainInternal = new IpcMainImpl() as ElectronInternal.IpcMainInternal;
|
||||||
|
|
||||||
|
// Do not throw exception when channel name is "error".
|
||||||
|
ipcMainInternal.on('error', () => {});
|
||||||
|
|||||||
@@ -68,10 +68,6 @@ ipcMainUtils.handleSync(IPC_MESSAGES.BROWSER_SANDBOX_LOAD, async function (event
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMainUtils.handleSync(IPC_MESSAGES.BROWSER_NONSANDBOX_LOAD, function (event) {
|
|
||||||
return { preloadPaths: event.sender._getPreloadPaths() };
|
|
||||||
});
|
|
||||||
|
|
||||||
ipcMainInternal.on(IPC_MESSAGES.BROWSER_PRELOAD_ERROR, function (event, preloadPath: string, error: Error) {
|
ipcMainInternal.on(IPC_MESSAGES.BROWSER_PRELOAD_ERROR, function (event, preloadPath: string, error: Error) {
|
||||||
event.sender.emit('preload-error', event, preloadPath, error);
|
event.sender.emit('preload-error', event, preloadPath, error);
|
||||||
});
|
});
|
||||||
|
|||||||
23
lib/common/.eslintrc.json
Normal file
23
lib/common/.eslintrc.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"rules": {
|
||||||
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
"paths": [
|
||||||
|
"electron",
|
||||||
|
"electron/main",
|
||||||
|
"electron/renderer"
|
||||||
|
],
|
||||||
|
"patterns": [
|
||||||
|
"./*",
|
||||||
|
"../*",
|
||||||
|
"@electron/internal/browser/*",
|
||||||
|
"@electron/internal/isolated_renderer/*",
|
||||||
|
"@electron/internal/renderer/*",
|
||||||
|
"@electron/internal/sandboxed_worker/*",
|
||||||
|
"@electron/internal/worker/*"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user