mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
125 Commits
miniak/lis
...
v31.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
156dbd57ba | ||
|
|
04b6a162ea | ||
|
|
3e92b72aef | ||
|
|
3d139fc424 | ||
|
|
82664bfdcc | ||
|
|
ddccf79f2d | ||
|
|
920391a85d | ||
|
|
c7219bf9e3 | ||
|
|
a4410e20a8 | ||
|
|
d061a0cadf | ||
|
|
e87b0b565a | ||
|
|
16e7e26a2b | ||
|
|
e4fd9da529 | ||
|
|
c519ee59b2 | ||
|
|
da6235ff55 | ||
|
|
8903eecbb6 | ||
|
|
68dfa0440a | ||
|
|
931f4b8dec | ||
|
|
3e177536ba | ||
|
|
2633298855 | ||
|
|
f272c5fb98 | ||
|
|
9ab67cc2f6 | ||
|
|
8035effa1a | ||
|
|
038e261069 | ||
|
|
0d12131f50 | ||
|
|
993d3331fa | ||
|
|
5f78c626d1 | ||
|
|
2021c2e8e9 | ||
|
|
52bc1dc085 | ||
|
|
540d88f809 | ||
|
|
bd17a98386 | ||
|
|
ea76144fa1 | ||
|
|
9a879385c1 | ||
|
|
bd4d0ae2d3 | ||
|
|
fea722b621 | ||
|
|
b0ba1a2113 | ||
|
|
420e834a31 | ||
|
|
8edbefcfa3 | ||
|
|
e21c70a9e0 | ||
|
|
6b86fb4bbb | ||
|
|
81c184ffc1 | ||
|
|
31a753ff7a | ||
|
|
7ff3905120 | ||
|
|
18da367676 | ||
|
|
b029f38750 | ||
|
|
e4bcd82590 | ||
|
|
a3c6dd9767 | ||
|
|
c2540f555c | ||
|
|
a0500a5faa | ||
|
|
ebf09b587b | ||
|
|
41feba221d | ||
|
|
bd900fb10f | ||
|
|
ea3001dd39 | ||
|
|
7294c766ac | ||
|
|
fb9d3ec897 | ||
|
|
75cefdb527 | ||
|
|
9694e7593f | ||
|
|
8d41e6ea9b | ||
|
|
e282ff6e4a | ||
|
|
282ffa10e5 | ||
|
|
72d85e90ac | ||
|
|
2fc89a6b2c | ||
|
|
12bc4dc6c0 | ||
|
|
cdf508a734 | ||
|
|
1dd99250c3 | ||
|
|
d2cb956a75 | ||
|
|
004ca01049 | ||
|
|
ec4ffa99b6 | ||
|
|
844265303c | ||
|
|
aee588b650 | ||
|
|
8f51e8fb5d | ||
|
|
773777f209 | ||
|
|
9437dd3ea8 | ||
|
|
fb5ffd2876 | ||
|
|
2d36065a15 | ||
|
|
e19963b0ac | ||
|
|
9c631ea744 | ||
|
|
9ab77e77b1 | ||
|
|
eb56416cb5 | ||
|
|
703241e1e7 | ||
|
|
0a8ed258da | ||
|
|
7ef5402599 | ||
|
|
a799513b2e | ||
|
|
bf754a3cae | ||
|
|
7120c58297 | ||
|
|
b118c70f77 | ||
|
|
cdafe09ffb | ||
|
|
b428315c6d | ||
|
|
c670e38b4b | ||
|
|
6aa9a003c8 | ||
|
|
2a6ad42113 | ||
|
|
d80c5f8377 | ||
|
|
755f7d5ed0 | ||
|
|
734395bea9 | ||
|
|
75dae2e004 | ||
|
|
b446ce7f22 | ||
|
|
05fba85aa3 | ||
|
|
db11090e58 | ||
|
|
df22e62bf4 | ||
|
|
f8c832d80d | ||
|
|
344aba0838 | ||
|
|
41ba963392 | ||
|
|
43a9f70d19 | ||
|
|
0a7df0ef3d | ||
|
|
38ef9a7690 | ||
|
|
ba3b647fd7 | ||
|
|
76f7bbb0a8 | ||
|
|
22c149812c | ||
|
|
42164d7081 | ||
|
|
3eb94b72ba | ||
|
|
752f2eb124 | ||
|
|
beafbfd511 | ||
|
|
d54645e554 | ||
|
|
0bf53a3876 | ||
|
|
62d4b21819 | ||
|
|
61457c9498 | ||
|
|
c6102b9278 | ||
|
|
72c2b9e862 | ||
|
|
08241669bc | ||
|
|
6e36153799 | ||
|
|
4f76fff978 | ||
|
|
c82ec0c72b | ||
|
|
c57ce31e84 | ||
|
|
32b44aa5c8 | ||
|
|
7032c0d03c |
@@ -56,7 +56,7 @@ executors:
|
||||
# 2xlarge should not be used directly, use the pipeline param instead
|
||||
enum: ["medium", "electronjs/aks-linux-medium", "xlarge", "electronjs/aks-linux-large", "2xlarge"]
|
||||
docker:
|
||||
- image: ghcr.io/electron/build:e6bebd08a51a0d78ec23e5b3fd7e7c0846412328
|
||||
- image: ghcr.io/electron/build:9a43c14f5c19be0359843299f79e736521373adc
|
||||
resource_class: << parameters.size >>
|
||||
|
||||
macos:
|
||||
@@ -260,9 +260,9 @@ step-depot-tools-get: &step-depot-tools-get
|
||||
index c305c248..e6e0fbdc 100755
|
||||
--- a/gclient.py
|
||||
+++ b/gclient.py
|
||||
@@ -735,7 +735,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
||||
|
||||
if dep_type == 'cipd':
|
||||
@@ -783,7 +783,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings):
|
||||
not condition or "non_git_source" not in condition):
|
||||
continue
|
||||
cipd_root = self.GetCipdRoot()
|
||||
- for package in dep_value.get('packages', []):
|
||||
+ packages = dep_value.get('packages', [])
|
||||
@@ -2291,6 +2291,7 @@ jobs:
|
||||
<<: *env-stack-dumping
|
||||
parallelism: 2
|
||||
steps:
|
||||
- run: nvm install lts/iron && nvm alias default lts/iron
|
||||
- electron-tests:
|
||||
artifact-key: darwin-x64
|
||||
|
||||
@@ -2317,6 +2318,7 @@ jobs:
|
||||
<<: *env-stack-dumping
|
||||
parallelism: 2
|
||||
steps:
|
||||
- run: nvm install lts/iron && nvm alias default lts/iron
|
||||
- electron-tests:
|
||||
artifact-key: mas-x64
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
]
|
||||
},
|
||||
"vscode": {
|
||||
"extensions": ["joeleinbinder.mojom-language",
|
||||
"extensions": [
|
||||
"joeleinbinder.mojom-language",
|
||||
"rafaelmaiolla.diff",
|
||||
"surajbarkale.ninja",
|
||||
"ms-vscode.cpptools",
|
||||
|
||||
@@ -2,7 +2,7 @@ version: '3'
|
||||
|
||||
services:
|
||||
buildtools:
|
||||
image: ghcr.io/electron/devcontainer:3d8d44d0f15b05bef6149e448f9cc522111847e9
|
||||
image: ghcr.io/electron/devcontainer:9a43c14f5c19be0359843299f79e736521373adc
|
||||
|
||||
volumes:
|
||||
- ..:/workspaces/gclient/src/electron:cached
|
||||
|
||||
@@ -39,7 +39,6 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
write_config() {
|
||||
echo "
|
||||
{
|
||||
\"goma\": \"$1\",
|
||||
\"root\": \"/workspaces/gclient\",
|
||||
\"remotes\": {
|
||||
\"electron\": {
|
||||
@@ -49,7 +48,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
\"gen\": {
|
||||
\"args\": [
|
||||
\"import(\\\"//electron/build/args/testing.gn\\\")\",
|
||||
\"import(\\\"/home/builduser/.electron_build_tools/third_party/goma.gn\\\")\"
|
||||
\"use_remoteexec = true\"
|
||||
],
|
||||
\"out\": \"Testing\"
|
||||
},
|
||||
@@ -57,26 +56,18 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
|
||||
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
|
||||
},
|
||||
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\"
|
||||
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
|
||||
\"configValidationLevel\": \"strict\",
|
||||
\"reclient\": \"$1\",
|
||||
\"goma\": \"none\",
|
||||
\"preserveXcode\": 5
|
||||
}
|
||||
" >$buildtools/configs/evm.testing.json
|
||||
}
|
||||
|
||||
# Start out as cache only
|
||||
write_config cache-only
|
||||
write_config remote_exec
|
||||
|
||||
e use testing
|
||||
|
||||
# Attempt to auth to the goma service via codespaces tokens
|
||||
# if it works we can use the goma cluster
|
||||
export NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN
|
||||
if e d goma_auth login; then
|
||||
echo "$GITHUB_USER has GOMA access - switching to cluster mode"
|
||||
write_config cluster
|
||||
fi
|
||||
e use testing
|
||||
else
|
||||
echo "build-tools testing config already exists"
|
||||
|
||||
# Re-auth with the goma cluster regardless.
|
||||
NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN e d goma_auth login || true
|
||||
fi
|
||||
|
||||
4
.github/workflows/issue-opened.yml
vendored
4
.github/workflows/issue-opened.yml
vendored
@@ -38,6 +38,8 @@ jobs:
|
||||
- run: npm install mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0
|
||||
- name: Add labels
|
||||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||
env:
|
||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||
with:
|
||||
github-token: ${{ steps.generate-token.outputs.token }}
|
||||
script: |
|
||||
@@ -47,7 +49,7 @@ jobs:
|
||||
const [ owner, repo ] = '${{ github.repository }}'.split('/');
|
||||
const issue_number = ${{ github.event.issue.number }};
|
||||
|
||||
const tree = fromMarkdown(`${{ github.event.issue.body }}`);
|
||||
const tree = fromMarkdown(process.env.ISSUE_BODY);
|
||||
|
||||
const labels = [];
|
||||
|
||||
|
||||
@@ -1,3 +1,17 @@
|
||||
{
|
||||
"extends": "@electron/lint-roller/configs/markdownlint.json"
|
||||
"extends": "@electron/lint-roller/configs/markdownlint.json",
|
||||
"no-angle-brackets": true,
|
||||
"no-inline-html": {
|
||||
"allowed_elements": [
|
||||
"br",
|
||||
"details",
|
||||
"img",
|
||||
"li",
|
||||
"summary",
|
||||
"ul",
|
||||
"unknown",
|
||||
"Tabs",
|
||||
"TabItem",
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
26
BUILD.gn
26
BUILD.gn
@@ -81,18 +81,11 @@ 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.
|
||||
# Generates headers which contain stubs for extracting function ptrs
|
||||
# from the gtk library. Function signatures for which stubs are
|
||||
# required should be declared in the sig files.
|
||||
generate_stubs("electron_gtk_stubs") {
|
||||
sigs = [
|
||||
"shell/browser/ui/electron_gdk_pixbuf.sigs",
|
||||
"shell/browser/ui/electron_gtk.sigs",
|
||||
]
|
||||
sigs = [ "shell/browser/ui/electron_gdk_pixbuf.sigs" ]
|
||||
extra_header = "shell/browser/ui/electron_gtk.fragment"
|
||||
output_name = "electron_gtk_stubs"
|
||||
public_deps = [ "//ui/gtk:gtk_config" ]
|
||||
@@ -475,6 +468,7 @@ source_set("electron_lib") {
|
||||
"//net:extras",
|
||||
"//net:net_resources",
|
||||
"//printing/buildflags",
|
||||
"//services/device/public/cpp/bluetooth:bluetooth",
|
||||
"//services/device/public/cpp/geolocation",
|
||||
"//services/device/public/cpp/hid",
|
||||
"//services/device/public/mojom",
|
||||
@@ -664,6 +658,7 @@ source_set("electron_lib") {
|
||||
libs += [ "dwmapi.lib" ]
|
||||
sources += [ "shell/common/asar/archive_win.cc" ]
|
||||
deps += [
|
||||
"//components/app_launch_prefetch",
|
||||
"//components/crash/core/app:crash_export_thunks",
|
||||
"//ui/native_theme:native_theme_browser",
|
||||
"//ui/wm",
|
||||
@@ -699,6 +694,8 @@ source_set("electron_lib") {
|
||||
sources += [
|
||||
"shell/browser/printing/print_view_manager_electron.cc",
|
||||
"shell/browser/printing/print_view_manager_electron.h",
|
||||
"shell/browser/printing/printing_utils.cc",
|
||||
"shell/browser/printing/printing_utils.h",
|
||||
"shell/renderer/printing/print_render_frame_helper_delegate.cc",
|
||||
"shell/renderer/printing/print_render_frame_helper_delegate.h",
|
||||
]
|
||||
@@ -744,6 +741,7 @@ source_set("electron_lib") {
|
||||
"//components/pdf/browser",
|
||||
"//components/pdf/browser:interceptors",
|
||||
"//components/pdf/common:constants",
|
||||
"//components/pdf/common:util",
|
||||
"//components/pdf/renderer",
|
||||
"//pdf",
|
||||
]
|
||||
@@ -1463,8 +1461,10 @@ dist_zip("hunspell_dictionaries_zip") {
|
||||
}
|
||||
|
||||
copy("libcxx_headers") {
|
||||
sources = libcxx_headers + libcxx_licenses +
|
||||
[ "//buildtools/third_party/libc++/__config_site" ]
|
||||
sources = libcxx_headers + libcxx_licenses + [
|
||||
"//buildtools/third_party/libc++/__assertion_handler",
|
||||
"//buildtools/third_party/libc++/__config_site",
|
||||
]
|
||||
outputs = [ "$target_gen_dir/electron_libcxx_include/{{source_root_relative_dir}}/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
|
||||
@@ -125,8 +125,8 @@ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/inclusion).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
|
||||
55
DEPS
55
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'124.0.6359.0',
|
||||
'126.0.6478.114',
|
||||
'node_version':
|
||||
'v20.11.1',
|
||||
'v20.14.0',
|
||||
'nan_version':
|
||||
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||
'squirrel.mac_version':
|
||||
@@ -48,6 +48,9 @@ vars = {
|
||||
# It's only needed to parse the native tests configurations.
|
||||
'checkout_pyyaml': False,
|
||||
|
||||
# Can be used to disable the sysroot hooks.
|
||||
'install_sysroot': True,
|
||||
|
||||
'use_rts': False,
|
||||
|
||||
'mac_xcode_version': 'default',
|
||||
@@ -161,6 +164,54 @@ hooks = [
|
||||
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@' + (Var("yarn_version")) + '", "install", "--frozen-lockfile"]);',
|
||||
],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_arm',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and checkout_arm',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=arm'],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_arm64',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and checkout_arm64',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=arm64'],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_x86',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and (checkout_x86 or checkout_x64)',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=x86'],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_mips',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and checkout_mips',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=mips'],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_mips64',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and checkout_mips64',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=mips64el'],
|
||||
},
|
||||
{
|
||||
'name': 'sysroot_x64',
|
||||
'pattern': '.',
|
||||
'condition': 'install_sysroot and checkout_linux and checkout_x64',
|
||||
'action': ['python3', 'src/build/linux/sysroot_scripts/install-sysroot.py',
|
||||
'--sysroots-json-path=' + Var('sysroots_json_path'),
|
||||
'--arch=x64'],
|
||||
},
|
||||
]
|
||||
|
||||
recursedeps = [
|
||||
|
||||
@@ -9,8 +9,8 @@ View these docs in other languages on our [Crowdin](https://crowdin.com/project/
|
||||
|
||||
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
|
||||
[Chromium](https://www.chromium.org) and is used by the [Visual Studio
|
||||
Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps).
|
||||
[Chromium](https://www.chromium.org) and is used by the
|
||||
[Visual Studio Code](https://github.com/Microsoft/vscode/) and many other [apps](https://electronjs.org/apps).
|
||||
|
||||
Follow [@electronjs](https://twitter.com/electronjs) on Twitter for important
|
||||
announcements.
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-124.0.6359.0
|
||||
image: e-126.0.6445.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
@@ -39,7 +39,7 @@ environment:
|
||||
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
|
||||
GYP_MSVS_HASH_27370823e7: 28622d16b1
|
||||
GYP_MSVS_HASH_7393122652: 3ba76c5c20
|
||||
PYTHONIOENCODING: UTF-8
|
||||
|
||||
matrix:
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-124.0.6359.0
|
||||
image: e-126.0.6445.0
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
@@ -39,7 +39,7 @@ environment:
|
||||
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, tap"
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
|
||||
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
|
||||
GYP_MSVS_HASH_27370823e7: 28622d16b1
|
||||
GYP_MSVS_HASH_7393122652: 3ba76c5c20
|
||||
PYTHONIOENCODING: UTF-8
|
||||
|
||||
matrix:
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||
node_module_version = 123
|
||||
node_module_version = 125
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -50,16 +50,13 @@ is_cfi = false
|
||||
# TODO: fix this once sysroots have been updated.
|
||||
use_qt = false
|
||||
|
||||
# https://chromium-review.googlesource.com/c/chromium/src/+/4365718
|
||||
# TODO(codebytere): fix perfetto incompatibility with Node.js.
|
||||
use_perfetto_client_library = false
|
||||
|
||||
# Disables the builtins PGO for V8
|
||||
v8_builtins_profiling_log_file = ""
|
||||
|
||||
# https://chromium.googlesource.com/chromium/src/+/main/docs/dangling_ptr.md
|
||||
# TODO(vertedinde): hunt down dangling pointers on Linux
|
||||
enable_dangling_raw_ptr_checks = false
|
||||
enable_dangling_raw_ptr_feature_flag = false
|
||||
|
||||
# This flag speeds up the performance of fork/execve on linux systems.
|
||||
# Ref: https://chromium-review.googlesource.com/c/v8/v8/+/4602858
|
||||
@@ -67,3 +64,12 @@ v8_enable_private_mapping_fork_optimization = true
|
||||
|
||||
# Expose public V8 symbols for native modules.
|
||||
v8_expose_public_symbols = true
|
||||
|
||||
# Disables unsafe-buffers-usage plugin due to incompatibilities with our reclient implementation
|
||||
# Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5426599
|
||||
# Ref: https://github.com/electron/electron/commit/8e20f16ea35eeaeb149ae63bad3703d782665f6a
|
||||
clang_unsafe_buffers_paths = ""
|
||||
|
||||
# Disable snapshotting a page when printing for its content to be analyzed for
|
||||
# sensitive content by enterprise users.
|
||||
enterprise_cloud_content_analysis = false
|
||||
|
||||
@@ -33,6 +33,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/devtools/visual_logging.h",
|
||||
"//chrome/browser/extensions/global_shortcut_listener.cc",
|
||||
"//chrome/browser/extensions/global_shortcut_listener.h",
|
||||
"//chrome/browser/file_system_access/file_system_access_features.cc",
|
||||
"//chrome/browser/file_system_access/file_system_access_features.h",
|
||||
"//chrome/browser/icon_loader.cc",
|
||||
"//chrome/browser/icon_loader.h",
|
||||
"//chrome/browser/icon_manager.cc",
|
||||
@@ -92,6 +94,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h",
|
||||
"//chrome/browser/ui/exclusive_access/exclusive_access_manager.cc",
|
||||
"//chrome/browser/ui/exclusive_access/exclusive_access_manager.h",
|
||||
"//chrome/browser/ui/exclusive_access/exclusive_access_permission_manager.cc",
|
||||
"//chrome/browser/ui/exclusive_access/exclusive_access_permission_manager.h",
|
||||
"//chrome/browser/ui/exclusive_access/fullscreen_controller.cc",
|
||||
"//chrome/browser/ui/exclusive_access/fullscreen_controller.h",
|
||||
"//chrome/browser/ui/exclusive_access/fullscreen_within_tab_helper.cc",
|
||||
@@ -181,6 +185,9 @@ static_library("chrome") {
|
||||
"//chrome/browser:resource_prefetch_predictor_proto",
|
||||
"//chrome/browser/resource_coordinator:mojo_bindings",
|
||||
"//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
|
||||
"//components/enterprise/buildflags",
|
||||
"//components/enterprise/common/proto:connectors_proto",
|
||||
"//components/safe_browsing/core/browser/db:safebrowsing_proto",
|
||||
"//components/vector_icons:vector_icons",
|
||||
"//ui/snapshot",
|
||||
"//ui/views/controls/webview",
|
||||
@@ -231,6 +238,7 @@ static_library("chrome") {
|
||||
"//chrome/services/util_win:lib",
|
||||
"//components/webapps/common:mojo_bindings",
|
||||
]
|
||||
deps += [ "//components/segmentation_platform/public/proto" ]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
@@ -268,6 +276,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/bad_message.h",
|
||||
"//chrome/browser/printing/prefs_util.cc",
|
||||
"//chrome/browser/printing/prefs_util.h",
|
||||
"//chrome/browser/printing/print_compositor_util.cc",
|
||||
"//chrome/browser/printing/print_compositor_util.h",
|
||||
"//chrome/browser/printing/print_job.cc",
|
||||
"//chrome/browser/printing/print_job.h",
|
||||
"//chrome/browser/printing/print_job_manager.cc",
|
||||
@@ -294,6 +304,8 @@ static_library("chrome") {
|
||||
|
||||
if (enable_oop_printing) {
|
||||
sources += [
|
||||
"//chrome/browser/printing/oop_features.cc",
|
||||
"//chrome/browser/printing/oop_features.h",
|
||||
"//chrome/browser/printing/print_backend_service_manager.cc",
|
||||
"//chrome/browser/printing/print_backend_service_manager.h",
|
||||
]
|
||||
@@ -320,6 +332,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/printing/pdf_to_emf_converter.h",
|
||||
"//chrome/browser/printing/printer_xml_parser_impl.cc",
|
||||
"//chrome/browser/printing/printer_xml_parser_impl.h",
|
||||
"//chrome/browser/printing/xps_features.cc",
|
||||
"//chrome/browser/printing/xps_features.h",
|
||||
]
|
||||
deps += [ "//printing:printing_base" ]
|
||||
}
|
||||
@@ -343,8 +357,6 @@ static_library("chrome") {
|
||||
"//chrome/browser/pdf/chrome_pdf_stream_delegate.h",
|
||||
"//chrome/browser/pdf/pdf_extension_util.cc",
|
||||
"//chrome/browser/pdf/pdf_extension_util.h",
|
||||
"//chrome/browser/pdf/pdf_frame_util.cc",
|
||||
"//chrome/browser/pdf/pdf_frame_util.h",
|
||||
"//chrome/browser/pdf/pdf_viewer_stream_manager.cc",
|
||||
"//chrome/browser/pdf/pdf_viewer_stream_manager.h",
|
||||
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc",
|
||||
|
||||
@@ -41,6 +41,10 @@ that was used to open the application, if it was launched from Notification Cent
|
||||
You can also call `app.isReady()` to check if this event has already fired and `app.whenReady()`
|
||||
to get a Promise that is fulfilled when Electron is initialized.
|
||||
|
||||
**Note**: The `ready` event is only fired after the main process has finished running the first
|
||||
tick of the event loop. If an Electron API needs to be called before the `ready` event, ensure
|
||||
that it is called synchronously in the top-level context of the main process.
|
||||
|
||||
### Event: 'window-all-closed'
|
||||
|
||||
Emitted when all windows have been closed.
|
||||
@@ -1261,7 +1265,7 @@ Returns `Object`:
|
||||
|
||||
* `openAtLogin` boolean - `true` if the app is set to open at login.
|
||||
* `openAsHidden` boolean _macOS_ _Deprecated_ - `true` if the app is set to open as hidden at login. This does not work on macOS 13 and up.
|
||||
* `wasOpenedAtLogin` boolean _macOS_ _Deprecated_ - `true` if the app was opened at login automatically. This setting is not available on [MAS builds][mas-builds] or on macOS 13 and up.
|
||||
* `wasOpenedAtLogin` boolean _macOS_ - `true` if the app was opened at login automatically.
|
||||
* `wasOpenedAsHidden` boolean _macOS_ _Deprecated_ - `true` if the app was opened as a hidden login item. This indicates that the app should not open any windows at startup. This setting is not available on [MAS builds][mas-builds] or on macOS 13 and up.
|
||||
* `restoreState` boolean _macOS_ _Deprecated_ - `true` if the app was opened as a login item that should restore the state from the previous session. This indicates that the app should restore the windows that were open the last time the app was closed. This setting is not available on [MAS builds][mas-builds] or on macOS 13 and up.
|
||||
* `status` string _macOS_ - can be one of `not-registered`, `enabled`, `requires-approval`, or `not-found`.
|
||||
@@ -1278,8 +1282,7 @@ Returns `Object`:
|
||||
* `settings` Object
|
||||
* `openAtLogin` boolean (optional) - `true` to open the app at login, `false` to remove
|
||||
the app as a login item. Defaults to `false`.
|
||||
* `openAsHidden` boolean (optional) _macOS_ _Deprecated_ - `true` to open the app as hidden. Defaults to `false`. The user can edit this setting from the System Preferences so `app.getLoginItemSettings().wasOpenedAsHidden` should be checked when the app is opened to know the current value. This setting is not available on [MAS build
|
||||
s][mas-builds] or on macOS 13 and up.
|
||||
* `openAsHidden` boolean (optional) _macOS_ _Deprecated_ - `true` to open the app as hidden. Defaults to `false`. The user can edit this setting from the System Preferences so `app.getLoginItemSettings().wasOpenedAsHidden` should be checked when the app is opened to know the current value. This setting is not available on [MAS builds][mas-builds] or on macOS 13 and up.
|
||||
* `type` string (optional) _macOS_ - The type of service to add as a login item. Defaults to `mainAppService`. Only available on macOS 13 and up.
|
||||
* `mainAppService` - The primary application.
|
||||
* `agentService` - The property list name for a launch agent. The property list name must correspond to a property list in the app’s `Contents/Library/LaunchAgents` directory.
|
||||
|
||||
@@ -20,8 +20,9 @@ In addition, there are some subtle differences on each platform:
|
||||
|
||||
On macOS, the `autoUpdater` module is built upon [Squirrel.Mac][squirrel-mac],
|
||||
meaning you don't need any special setup to make it work. For server-side
|
||||
requirements, you can read [Server Support][server-support]. Note that [App
|
||||
Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35) (ATS) applies to all requests made as part of the
|
||||
requirements, you can read [Server Support][server-support]. Note that
|
||||
[App Transport Security](https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW35)
|
||||
(ATS) applies to all requests made as part of the
|
||||
update process. Apps that need to disable ATS can add the
|
||||
`NSAllowsArbitraryLoads` key to their app's plist.
|
||||
|
||||
|
||||
@@ -600,7 +600,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
|
||||
on the right edge and 50 pixels of controls below the player. In order to
|
||||
maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
|
||||
the player itself we would call this function with arguments of 16/9 and
|
||||
{ width: 40, height: 50 }. The second argument doesn't care where the extra width and height
|
||||
\{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height
|
||||
are within the content view--only that they exist. Sum any extra width and
|
||||
height areas you have within the overall content view.
|
||||
|
||||
|
||||
@@ -723,7 +723,7 @@ Perhaps there are 15 pixels of controls on the left edge, 25 pixels of controls
|
||||
on the right edge and 50 pixels of controls below the player. In order to
|
||||
maintain a 16:9 aspect ratio (standard aspect ratio for HD @1920x1080) within
|
||||
the player itself we would call this function with arguments of 16/9 and
|
||||
{ width: 40, height: 50 }. The second argument doesn't care where the extra width and height
|
||||
\{ width: 40, height: 50 \}. The second argument doesn't care where the extra width and height
|
||||
are within the content view--only that they exist. Sum any extra width and
|
||||
height areas you have within the overall content view.
|
||||
|
||||
|
||||
@@ -17,6 +17,8 @@ following properties:
|
||||
method.
|
||||
* `url` string (optional) - The request URL. Must be provided in the absolute
|
||||
form with the protocol scheme specified as http or https.
|
||||
* `headers` Record\<string, string | string[]\> (optional) - Headers to be sent
|
||||
with the request.
|
||||
* `session` Session (optional) - The [`Session`](session.md) instance with
|
||||
which the request is associated.
|
||||
* `partition` string (optional) - The name of the [`partition`](session.md)
|
||||
|
||||
@@ -279,7 +279,7 @@ Aliased to `--debug[=[host:]port`.
|
||||
|
||||
Specify ways of the inspector web socket url exposure.
|
||||
|
||||
By default inspector websocket url is available in stderr and under /json/list endpoint on http://host:port/json/list.
|
||||
By default inspector websocket url is available in stderr and under /json/list endpoint on `http://host:port/json/list`.
|
||||
|
||||
### `--no-deprecation`
|
||||
|
||||
|
||||
@@ -35,8 +35,8 @@ The `contentTracing` module has the following methods:
|
||||
Returns `Promise<string[]>` - resolves with an array of category groups once all child processes have acknowledged the `getCategories` request
|
||||
|
||||
Get a set of category groups. The category groups can change as new code paths
|
||||
are reached. See also the [list of built-in tracing
|
||||
categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h).
|
||||
are reached. See also the
|
||||
[list of built-in tracing categories](https://chromium.googlesource.com/chromium/src/+/main/base/trace_event/builtin_categories.h).
|
||||
|
||||
> **NOTE:** Electron adds a non-default tracing category called `"electron"`.
|
||||
> This category can be used to capture Electron-specific tracing events.
|
||||
|
||||
@@ -174,7 +174,7 @@ dialog.showOpenDialog(mainWindow, {
|
||||
* `dontAddToRecent` _Windows_ - Do not add the item being saved to the recent documents list.
|
||||
* `securityScopedBookmarks` boolean (optional) _macOS_ _mas_ - Create a [security scoped bookmark](https://developer.apple.com/library/content/documentation/Security/Conceptual/AppSandboxDesignGuide/AppSandboxInDepth/AppSandboxInDepth.html#//apple_ref/doc/uid/TP40011183-CH3-SW16) when packaged for the Mac App Store. If this option is enabled and the file doesn't already exist a blank file will be created at the chosen path.
|
||||
|
||||
Returns `string | undefined`, the path of the file chosen by the user; if the dialog is cancelled it returns `undefined`.
|
||||
Returns `string`, the path of the file chosen by the user; if the dialog is cancelled it returns an empty string.
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
@@ -207,7 +207,7 @@ The `filters` specifies an array of file types that can be displayed, see
|
||||
Returns `Promise<Object>` - Resolve with an object containing the following:
|
||||
|
||||
* `canceled` boolean - whether or not the dialog was canceled.
|
||||
* `filePath` string (optional) - If the dialog is canceled, this will be `undefined`.
|
||||
* `filePath` string - If the dialog is canceled, this will be an empty string.
|
||||
* `bookmark` string (optional) _macOS_ _mas_ - Base64 encoded string which contains the security scoped bookmark data for the saved file. `securityScopedBookmarks` must be enabled for this to be present. (For return values, see [table here](#bookmarks-array).)
|
||||
|
||||
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
|
||||
|
||||
@@ -51,6 +51,18 @@ Unsupported options are:
|
||||
--http-parser
|
||||
```
|
||||
|
||||
If the [`nodeOptions` fuse](../tutorial/fuses.md#nodeoptions) is disabled, `NODE_OPTIONS` will be ignored.
|
||||
|
||||
### `NODE_EXTRA_CA_CERTS`
|
||||
|
||||
See [Node.js cli documentation](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) for details.
|
||||
|
||||
```sh
|
||||
export NODE_EXTRA_CA_CERTS=/path/to/cert.pem
|
||||
```
|
||||
|
||||
If the [`nodeOptions` fuse](../tutorial/fuses.md#nodeoptions) is disabled, `NODE_EXTRA_CA_CERTS` will be ignored.
|
||||
|
||||
### `GOOGLE_API_KEY`
|
||||
|
||||
Geolocation support in Electron requires the use of Google Cloud Platform's
|
||||
@@ -92,6 +104,8 @@ you would when running the normal Node.js executable, with the exception of the
|
||||
These flags are disabled owing to the fact that Electron uses BoringSSL instead of OpenSSL when building Node.js'
|
||||
`crypto` module, and so will not work as designed.
|
||||
|
||||
If the [`runAsNode` fuse](../tutorial/fuses.md#L13) is disabled, `ELECTRON_RUN_AS_NODE` will be ignored.
|
||||
|
||||
### `ELECTRON_NO_ATTACH_CONSOLE` _Windows_
|
||||
|
||||
Don't attach to the current console session.
|
||||
@@ -131,16 +145,16 @@ debugging purposes.
|
||||
Prints Chromium's internal logging to the console.
|
||||
|
||||
Setting this variable is the same as passing `--enable-logging`
|
||||
on the command line. For more info, see `--enable-logging` in [command-line
|
||||
switches](./command-line-switches.md#--enable-loggingfile).
|
||||
on the command line. For more info, see `--enable-logging` in
|
||||
[command-line switches](./command-line-switches.md#--enable-loggingfile).
|
||||
|
||||
### `ELECTRON_LOG_FILE`
|
||||
|
||||
Sets the file destination for Chromium's internal logging.
|
||||
|
||||
Setting this variable is the same as passing `--log-file`
|
||||
on the command line. For more info, see `--log-file` in [command-line
|
||||
switches](./command-line-switches.md#--log-filepath).
|
||||
on the command line. For more info, see `--log-file` in
|
||||
[command-line switches](./command-line-switches.md#--log-filepath).
|
||||
|
||||
### `ELECTRON_DEBUG_NOTIFICATIONS`
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
# Chrome Extension Support
|
||||
|
||||
Electron supports a subset of the [Chrome Extensions
|
||||
API][chrome-extensions-api-index], primarily to support DevTools extensions and
|
||||
Chromium-internal extensions, but it also happens to support some other
|
||||
extension capabilities.
|
||||
Electron supports a subset of the [Chrome Extensions API][chrome-extensions-api-index],
|
||||
primarily to support DevTools extensions and Chromium-internal extensions,
|
||||
but it also happens to support some other extension capabilities.
|
||||
|
||||
[chrome-extensions-api-index]: https://developer.chrome.com/extensions/api_index
|
||||
|
||||
|
||||
@@ -82,8 +82,8 @@ Removes all listeners, or those of the specified `channel`.
|
||||
* `...args` any[]
|
||||
|
||||
Send an asynchronous message to the main process via `channel`, along with
|
||||
arguments. Arguments will be serialized with the [Structured Clone
|
||||
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be
|
||||
arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
|
||||
just like [`window.postMessage`][], so prototype chains will not be
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
@@ -110,8 +110,8 @@ If you want to receive a single response from the main process, like the result
|
||||
Returns `Promise<any>` - Resolves with the response from the main process.
|
||||
|
||||
Send a message to the main process via `channel` and expect a result
|
||||
asynchronously. Arguments will be serialized with the [Structured Clone
|
||||
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be
|
||||
asynchronously. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
|
||||
just like [`window.postMessage`][], so prototype chains will not be
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
@@ -160,8 +160,8 @@ If you do not need a response to the message, consider using [`ipcRenderer.send`
|
||||
Returns `any` - The value sent back by the [`ipcMain`](./ipc-main.md) handler.
|
||||
|
||||
Send a message to the main process via `channel` and expect a result
|
||||
synchronously. Arguments will be serialized with the [Structured Clone
|
||||
Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will not be
|
||||
synchronously. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
|
||||
just like [`window.postMessage`][], so prototype chains will not be
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
@@ -208,8 +208,8 @@ ipcMain.on('port', (e, msg) => {
|
||||
})
|
||||
```
|
||||
|
||||
For more information on using `MessagePort` and `MessageChannel`, see the [MDN
|
||||
documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel).
|
||||
For more information on using `MessagePort` and `MessageChannel`, see the
|
||||
[MDN documentation](https://developer.mozilla.org/en-US/docs/Web/API/MessageChannel).
|
||||
|
||||
### `ipcRenderer.sendToHost(channel, ...args)`
|
||||
|
||||
|
||||
@@ -38,18 +38,18 @@ See [`Menu`](menu.md) for examples.
|
||||
`Menu.buildFromTemplate`.
|
||||
* `id` string (optional) - Unique within a single menu. If defined then it can be used
|
||||
as a reference to this item by the position attribute.
|
||||
* `before` string[] (optional) - Inserts this item before the item with the specified label. If
|
||||
* `before` string[] (optional) - Inserts this item before the item with the specified id. If
|
||||
the referenced item doesn't exist the item will be inserted at the end of the menu. Also implies
|
||||
that the menu item in question should be placed in the same “group” as the item.
|
||||
* `after` string[] (optional) - Inserts this item after the item with the specified label. If the
|
||||
* `after` string[] (optional) - Inserts this item after the item with the specified id. If the
|
||||
referenced item doesn't exist the item will be inserted at the end of
|
||||
the menu.
|
||||
* `beforeGroupContaining` string[] (optional) - Provides a means for a single context menu to declare
|
||||
the placement of their containing group before the containing group of the item
|
||||
with the specified label.
|
||||
with the specified id.
|
||||
* `afterGroupContaining` string[] (optional) - Provides a means for a single context menu to declare
|
||||
the placement of their containing group after the containing group of the item
|
||||
with the specified label.
|
||||
with the specified id.
|
||||
|
||||
**Note:** `acceleratorWorksWhenHidden` is specified as being macOS-only because accelerators always work when items are hidden on Windows and Linux. The option is exposed to users to give them the option to turn it off, as this is possible in native macOS development.
|
||||
|
||||
|
||||
@@ -336,16 +336,16 @@ browser windows.
|
||||
|
||||
You can make use of `before`, `after`, `beforeGroupContaining`, `afterGroupContaining` and `id` to control how the item will be placed when building a menu with `Menu.buildFromTemplate`.
|
||||
|
||||
* `before` - Inserts this item before the item with the specified label. If the
|
||||
* `before` - Inserts this item before the item with the specified id. If the
|
||||
referenced item doesn't exist the item will be inserted at the end of
|
||||
the menu. Also implies that the menu item in question should be placed in the same “group” as the item.
|
||||
* `after` - Inserts this item after the item with the specified label. If the
|
||||
* `after` - Inserts this item after the item with the specified id. If the
|
||||
referenced item doesn't exist the item will be inserted at the end of
|
||||
the menu. Also implies that the menu item in question should be placed in the same “group” as the item.
|
||||
* `beforeGroupContaining` - Provides a means for a single context menu to declare
|
||||
the placement of their containing group before the containing group of the item with the specified label.
|
||||
the placement of their containing group before the containing group of the item with the specified id.
|
||||
* `afterGroupContaining` - Provides a means for a single context menu to declare
|
||||
the placement of their containing group after the containing group of the item with the specified label.
|
||||
the placement of their containing group after the containing group of the item with the specified id.
|
||||
|
||||
By default, items will be inserted in the order they exist in the template unless one of the specified positioning keywords is used.
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ requests according to the specified protocol scheme in the `options` object.
|
||||
### `net.fetch(input[, init])`
|
||||
|
||||
* `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request)
|
||||
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional)
|
||||
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional)
|
||||
|
||||
Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response).
|
||||
|
||||
@@ -86,9 +86,8 @@ async function example () {
|
||||
}
|
||||
```
|
||||
|
||||
This method will issue requests from the [default
|
||||
session](session.md#sessiondefaultsession). To send a `fetch` request from
|
||||
another session, use [ses.fetch()](session.md#sesfetchinput-init).
|
||||
This method will issue requests from the [default session](session.md#sessiondefaultsession).
|
||||
To send a `fetch` request from another session, use [ses.fetch()](session.md#sesfetchinput-init).
|
||||
|
||||
See the MDN documentation for
|
||||
[`fetch()`](https://developer.mozilla.org/en-US/docs/Web/API/fetch) for more
|
||||
@@ -101,11 +100,10 @@ Limitations:
|
||||
* The `.type` and `.url` values of the returned `Response` object are
|
||||
incorrect.
|
||||
|
||||
By default, requests made with `net.fetch` can be made to [custom
|
||||
protocols](protocol.md) as well as `file:`, and will trigger
|
||||
[webRequest](web-request.md) handlers if present. When the non-standard
|
||||
`bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol
|
||||
handlers will not be called for this request. This allows forwarding an
|
||||
By default, requests made with `net.fetch` can be made to [custom protocols](protocol.md)
|
||||
as well as `file:`, and will trigger [webRequest](web-request.md) handlers if present.
|
||||
When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit,
|
||||
custom protocol handlers will not be called for this request. This allows forwarding an
|
||||
intercepted request to the built-in handler. [webRequest](web-request.md)
|
||||
handlers will still be triggered when bypassing custom protocols.
|
||||
|
||||
@@ -167,9 +165,8 @@ will be successful.
|
||||
|
||||
Returns [`Promise<ResolvedHost>`](structures/resolved-host.md) - Resolves with the resolved IP addresses for the `host`.
|
||||
|
||||
This method will resolve hosts from the [default
|
||||
session](session.md#sessiondefaultsession). To resolve a host from
|
||||
another session, use [ses.resolveHost()](session.md#sesresolvehosthost-options).
|
||||
This method will resolve hosts from the [default session](session.md#sessiondefaultsession).
|
||||
To resolve a host from another session, use [ses.resolveHost()](session.md#sesresolvehosthost-options).
|
||||
|
||||
## Properties
|
||||
|
||||
|
||||
@@ -9,10 +9,14 @@ An example of implementing a protocol that has the same effect as the
|
||||
|
||||
```js
|
||||
const { app, protocol, net } = require('electron')
|
||||
const path = require('node:path')
|
||||
const url = require('node:url')
|
||||
|
||||
app.whenReady().then(() => {
|
||||
protocol.handle('atom', (request) =>
|
||||
net.fetch('file://' + request.url.slice('atom://'.length)))
|
||||
protocol.handle('atom', (request) => {
|
||||
const filePath = request.url.slice('atom://'.length)
|
||||
return net.fetch(url.pathToFileURL(path.join(__dirname, filePath)).toString())
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
@@ -42,7 +46,7 @@ app.whenReady().then(() => {
|
||||
|
||||
ses.protocol.handle('atom', (request) => {
|
||||
const filePath = request.url.slice('atom://'.length)
|
||||
return net.fetch(url.pathToFileURL(path.join(__dirname, filePath)).toString())
|
||||
return net.fetch(url.pathToFileURL(path.resolve(__dirname, filePath)).toString())
|
||||
})
|
||||
|
||||
const mainWindow = new BrowserWindow({ webPreferences: { partition } })
|
||||
@@ -75,9 +79,8 @@ protocol.registerSchemesAsPrivileged([
|
||||
])
|
||||
```
|
||||
|
||||
A standard scheme adheres to what RFC 3986 calls [generic URI
|
||||
syntax](https://tools.ietf.org/html/rfc3986#section-3). For example `http` and
|
||||
`https` are standard schemes, while `file` is not.
|
||||
A standard scheme adheres to what RFC 3986 calls [generic URI syntax](https://tools.ietf.org/html/rfc3986#section-3).
|
||||
For example `http` and `https` are standard schemes, while `file` is not.
|
||||
|
||||
Registering a scheme as standard allows relative and absolute resources to
|
||||
be resolved correctly when served. Otherwise the scheme will behave like the
|
||||
|
||||
@@ -695,7 +695,7 @@ Returns `Promise<void>` - Resolves when all connections are closed.
|
||||
#### `ses.fetch(input[, init])`
|
||||
|
||||
* `input` string | [GlobalRequest](https://nodejs.org/api/globals.html#request)
|
||||
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & { bypassCustomProtocolHandlers?: boolean } (optional)
|
||||
* `init` [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/fetch#options) & \{ bypassCustomProtocolHandlers?: boolean \} (optional)
|
||||
|
||||
Returns `Promise<GlobalResponse>` - see [Response](https://developer.mozilla.org/en-US/docs/Web/API/Response).
|
||||
|
||||
@@ -729,11 +729,10 @@ Limitations:
|
||||
* The `.type` and `.url` values of the returned `Response` object are
|
||||
incorrect.
|
||||
|
||||
By default, requests made with `net.fetch` can be made to [custom
|
||||
protocols](protocol.md) as well as `file:`, and will trigger
|
||||
[webRequest](web-request.md) handlers if present. When the non-standard
|
||||
`bypassCustomProtocolHandlers` option is set in RequestInit, custom protocol
|
||||
handlers will not be called for this request. This allows forwarding an
|
||||
By default, requests made with `net.fetch` can be made to [custom protocols](protocol.md)
|
||||
as well as `file:`, and will trigger [webRequest](web-request.md) handlers if present.
|
||||
When the non-standard `bypassCustomProtocolHandlers` option is set in RequestInit,
|
||||
custom protocol handlers will not be called for this request. This allows forwarding an
|
||||
intercepted request to the built-in handler. [webRequest](web-request.md)
|
||||
handlers will still be triggered when bypassing custom protocols.
|
||||
|
||||
@@ -814,17 +813,14 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `keyboardLock` - Request capture of keypresses for any or all of the keys on the physical keyboard via the [Keyboard Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Keyboard/lock). These requests always appear to originate from the main frame.
|
||||
* `openExternal` - Request to open links in external applications.
|
||||
* `speaker-selection` - Request to enumerate and select audio output devices via the [speaker-selection permissions policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy/speaker-selection).
|
||||
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
|
||||
* `unknown` - An unrecognized permission request.
|
||||
* `fileSystem` - Request access to read, write, and file management capabilities using the [File System API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API).
|
||||
* `callback` Function
|
||||
* `permissionGranted` boolean - Allow or deny the permission.
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `externalURL` string (optional) - The url of the `openExternal` request.
|
||||
* `securityOrigin` string (optional) - The security origin of the `media` request.
|
||||
* `mediaTypes` string[] (optional) - The types of media access being requested, elements can be `video`
|
||||
or `audio`
|
||||
* `requestingUrl` string - The last URL the requesting frame loaded
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame
|
||||
* `details` [PermissionRequest](structures/permission-request.md) | [FilesystemPermissionRequest](structures/filesystem-permission-request.md) | [MediaAccessPermissionRequest](structures/media-access-permission-request.md) | [OpenExternalPermissionRequest](structures/open-external-permission-request.md) - Additional information about the permission being requested.
|
||||
|
||||
Sets the handler which can be used to respond to permission requests for the `session`.
|
||||
Calling `callback(true)` will allow the permission and `callback(false)` will reject it.
|
||||
@@ -862,6 +858,8 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
* `openExternal` - Open links in external applications.
|
||||
* `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
||||
* `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API).
|
||||
* `storage-access` - Allows content loaded in a third-party context to request access to third-party cookies using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `top-level-storage-access` - Allow top-level sites to request third-party cookie access on behalf of embedded content originating from another site in the same related website set using the [Storage Access API](https://developer.mozilla.org/en-US/docs/Web/API/Storage_Access_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
@@ -1424,23 +1422,34 @@ is emitted.
|
||||
Returns `string | null` - The absolute file system path where data for this
|
||||
session is persisted on disk. For in memory sessions this returns `null`.
|
||||
|
||||
#### `ses.clearData()`
|
||||
#### `ses.clearData([options])`
|
||||
|
||||
* `options` Object (optional)
|
||||
* `dataTypes` String[] (optional) - The types of data to clear. By default, this will clear all types of data.
|
||||
* `backgroundFetch` - Background Fetch
|
||||
* `cache` - Cache
|
||||
* `cookies` - Cookies
|
||||
* `downloads` - Downloads
|
||||
* `fileSystems` - File Systems
|
||||
* `indexedDB` - IndexedDB
|
||||
* `localStorage` - Local Storage
|
||||
* `serviceWorkers` - Service Workers
|
||||
* `webSQL` - WebSQL
|
||||
* `origins` String[] (optional) - Clear data for only these origins. Cannot be used with `excludeOrigins`.
|
||||
* `excludeOrigins` String[] (optional) - Clear data for all origins except these ones. Cannot be used with `origins`.
|
||||
* `avoidClosingConnections` boolean (optional) - Skips deleting cookies that would close current network connections. (Default: `false`)
|
||||
* `originMatchingMode` String (optional) - The behavior for matching data to origins.
|
||||
* `third-parties-included` (default) - Storage is matched on origin in first-party contexts and top-level-site in third-party contexts.
|
||||
* `origin-in-all-contexts` - Storage is matched on origin only in all contexts.
|
||||
|
||||
Returns `Promise<void>` - resolves when all data has been cleared.
|
||||
|
||||
This method clears many different types of data, inlcuding:
|
||||
|
||||
* Cache
|
||||
* Cookies
|
||||
* Downloads
|
||||
* IndexedDB
|
||||
* Local Storage
|
||||
* Service Workers
|
||||
* And more...
|
||||
Clears various different types of data.
|
||||
|
||||
This method clears more types of data and is more thourough than the
|
||||
`clearStorageData` method, however it is currently less configurable than that
|
||||
method.
|
||||
`clearStorageData` method.
|
||||
|
||||
**Note:** Cookies are stored at a broader scope than origins. When removing cookies and filtering by `origins` (or `excludeOrigins`), the cookies will be removed at the [registrable domain](https://url.spec.whatwg.org/#host-registrable-domain) level. For example, clearing cookies for the origin `https://really.specific.origin.example.com/` will end up clearing all cookies for `example.com`. Clearing cookies for the origin `https://my.website.example.co.uk/` will end up clearing all cookies for `example.co.uk`.
|
||||
|
||||
For more information, refer to Chromium's [`BrowsingDataRemover` interface](https://source.chromium.org/chromium/chromium/src/+/main:content/public/browser/browsing_data_remover.h).
|
||||
|
||||
|
||||
5
docs/api/structures/filesystem-permission-request.md
Normal file
5
docs/api/structures/filesystem-permission-request.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# FilesystemPermissionRequest Object extends `PermissionRequest`
|
||||
|
||||
* `filePath` string (optional) - The path of the `fileSystem` request.
|
||||
* `isDirectory` boolean (optional) - Whether the `fileSystem` request is a directory.
|
||||
* `fileAccessType` string (optional) - The access type of the `fileSystem` request. Can be `writable` or `readable`.
|
||||
5
docs/api/structures/media-access-permission-request.md
Normal file
5
docs/api/structures/media-access-permission-request.md
Normal file
@@ -0,0 +1,5 @@
|
||||
# MediaAccessPermissionRequest Object extends `PermissionRequest`
|
||||
|
||||
* `securityOrigin` string (optional) - The security origin of the request.
|
||||
* `mediaTypes` string[] (optional) - The types of media access being requested - elements can be `video`
|
||||
or `audio`.
|
||||
3
docs/api/structures/open-external-permission-request.md
Normal file
3
docs/api/structures/open-external-permission-request.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# OpenExternalPermissionRequest Object extends `PermissionRequest`
|
||||
|
||||
* `externalURL` string (optional) - The url of the `openExternal` request.
|
||||
4
docs/api/structures/permission-request.md
Normal file
4
docs/api/structures/permission-request.md
Normal file
@@ -0,0 +1,4 @@
|
||||
# PermissionRequest Object
|
||||
|
||||
* `requestingUrl` string - The last URL the requesting frame loaded.
|
||||
* `isMainFrame` boolean - Whether the frame making the request is the main frame.
|
||||
@@ -143,6 +143,7 @@
|
||||
contain the layout of the document—without requiring scrolling. Enabling
|
||||
this will cause the `preferred-size-changed` event to be emitted on the
|
||||
`WebContents` when the preferred size changes. Default is `false`.
|
||||
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
|
||||
|
||||
[chrome-content-scripts]: https://developer.chrome.com/extensions/content_scripts#execution-environment
|
||||
[runtime-enabled-features]: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/platform/runtime_enabled_features.json5
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
> Get system preferences.
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
Process: [Main](../glossary.md#main-process), [Utility](../glossary.md#utility-process)
|
||||
|
||||
```js
|
||||
const { systemPreferences } = require('electron')
|
||||
|
||||
@@ -48,6 +48,9 @@ Objects created with `new View` have the following instance methods:
|
||||
* `index` Integer (optional) - Index at which to insert the child view.
|
||||
Defaults to adding the child at the end of the child list.
|
||||
|
||||
If the same View is added to a parent which already contains it, it will be reordered such that
|
||||
it becomes the topmost view.
|
||||
|
||||
#### `view.removeChildView(view)`
|
||||
|
||||
* `view` View - Child view to remove.
|
||||
|
||||
@@ -36,8 +36,9 @@ Process: [Main](../glossary.md#main-process)
|
||||
|
||||
* `options` Object (optional)
|
||||
* `webPreferences` [WebPreferences](structures/web-preferences.md) (optional) - Settings of web page's features.
|
||||
* `webContents` [WebContents](web-contents.md) (optional) - If present, the given WebContents will be adopted by the WebContentsView. A WebContents may only be presented in one WebContentsView at a time.
|
||||
|
||||
Creates an empty WebContentsView.
|
||||
Creates a WebContentsView.
|
||||
|
||||
### Instance Properties
|
||||
|
||||
|
||||
@@ -617,8 +617,7 @@ Returns:
|
||||
|
||||
Emitted when failed to verify the `certificate` for `url`.
|
||||
|
||||
The usage is the same with [the `certificate-error` event of
|
||||
`app`](app.md#event-certificate-error).
|
||||
The usage is the same with [the `certificate-error` event of `app`](app.md#event-certificate-error).
|
||||
|
||||
#### Event: 'select-client-certificate'
|
||||
|
||||
@@ -632,8 +631,7 @@ Returns:
|
||||
|
||||
Emitted when a client certificate is requested.
|
||||
|
||||
The usage is the same with [the `select-client-certificate` event of
|
||||
`app`](app.md#event-select-client-certificate).
|
||||
The usage is the same with [the `select-client-certificate` event of `app`](app.md#event-select-client-certificate).
|
||||
|
||||
#### Event: 'login'
|
||||
|
||||
@@ -1850,8 +1848,8 @@ Opens the developer tools for the service worker context.
|
||||
* `...args` any[]
|
||||
|
||||
Send an asynchronous message to the renderer process via `channel`, along with
|
||||
arguments. Arguments will be serialized with the [Structured Clone
|
||||
Algorithm][SCA], just like [`postMessage`][], so prototype chains will not be
|
||||
arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
|
||||
just like [`postMessage`][], so prototype chains will not be
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
|
||||
@@ -103,10 +103,9 @@ Returns `boolean` - Whether the reload was initiated successfully. Only results
|
||||
* `...args` any[]
|
||||
|
||||
Send an asynchronous message to the renderer process via `channel`, along with
|
||||
arguments. Arguments will be serialized with the [Structured Clone
|
||||
Algorithm][SCA], just like [`postMessage`][], so prototype chains will not be
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
arguments. Arguments will be serialized with the [Structured Clone Algorithm][SCA],
|
||||
just like [`postMessage`][], so prototype chains will not be included.
|
||||
Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will throw an exception.
|
||||
|
||||
The renderer process can handle the message by listening to `channel` with the
|
||||
[`ipcRenderer`](ipc-renderer.md) module.
|
||||
|
||||
@@ -221,9 +221,7 @@ windows. Popups are disabled by default.
|
||||
```
|
||||
|
||||
A `string` which is a comma separated list of strings which specifies the web preferences to be set on the webview.
|
||||
The full list of supported preference strings can be found in [BrowserWindow](browser-window.md#new-browserwindowoptions). In addition, webview supports the following preferences:
|
||||
|
||||
* `transparent` boolean (optional) - Whether to enable background transparency for the guest page. Default is `true`. **Note:** The guest page's text and background colors are derived from the [color scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/color-scheme) of its root element. When transparency is enabled, the text color will still change accordingly but the background will remain transparent.
|
||||
The full list of supported preference strings can be found in [BrowserWindow](browser-window.md#new-browserwindowoptions).
|
||||
|
||||
The string follows the same format as the features string in `window.open`.
|
||||
A name by itself is given a `true` boolean value.
|
||||
|
||||
@@ -12,6 +12,25 @@ This document uses the following convention to categorize breaking changes:
|
||||
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||
|
||||
## Planned Breaking API Changes (31.0)
|
||||
|
||||
### Removed: `WebSQL` support
|
||||
|
||||
Chromium has removed support for WebSQL upstream, transitioning it to Android only. See
|
||||
[Chromium's intent to remove discussion](https://groups.google.com/a/chromium.org/g/blink-dev/c/fWYb6evVA-w/m/wGI863zaAAAJ)
|
||||
for more information.
|
||||
|
||||
### Behavior Changed: `nativeImage.toDataURL` will preseve PNG colorspace
|
||||
|
||||
PNG decoder implementation has been changed to preserve colorspace data, the
|
||||
encoded data returned from this function now matches it.
|
||||
|
||||
See [crbug.com/332584706](https://issues.chromium.org/issues/332584706) for more information.
|
||||
|
||||
### Behavior Changed: `window.flashFrame(bool)` will flash dock icon continuously on macOS
|
||||
|
||||
This brings the behavior to parity with Windows and Linux. Prior behavior: The first `flashFrame(true)` bounces the dock icon only once (using the [NSInformationalRequest](https://developer.apple.com/documentation/appkit/nsrequestuserattentiontype/nsinformationalrequest) level) and `flashFrame(false)` does nothing. New behavior: Flash continuously until `flashFrame(false)` is called. This uses the [NSCriticalRequest](https://developer.apple.com/documentation/appkit/nsrequestuserattentiontype/nscriticalrequest) level instead. To explicitly use `NSInformationalRequest` to cause a single dock icon bounce, it is still possible to use [`dock.bounce('informational')`](https://www.electronjs.org/docs/latest/api/dock#dockbouncetype-macos).
|
||||
|
||||
## Planned Breaking API Changes (30.0)
|
||||
|
||||
### Behavior Changed: cross-origin iframes now use Permission Policy to access features
|
||||
@@ -665,8 +684,8 @@ document.getElementById('webview').addEventListener('new-window', () => {
|
||||
### Deprecated: BrowserWindow `scroll-touch-*` events
|
||||
|
||||
The `scroll-touch-begin`, `scroll-touch-end` and `scroll-touch-edge` events on
|
||||
BrowserWindow are deprecated. Instead, use the newly available [`input-event`
|
||||
event](api/web-contents.md#event-input-event) on WebContents.
|
||||
BrowserWindow are deprecated. Instead, use the newly available
|
||||
[`input-event` event](api/web-contents.md#event-input-event) on WebContents.
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
@@ -691,8 +710,8 @@ win.webContents.on('input-event', (_, event) => {
|
||||
### 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
|
||||
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()`
|
||||
@@ -1294,8 +1313,7 @@ const w = new BrowserWindow({
|
||||
})
|
||||
```
|
||||
|
||||
We [recommend moving away from the remote
|
||||
module](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31).
|
||||
We [recommend moving away from the remote module](https://medium.com/@nornagon/electrons-remote-module-considered-harmful-70d69500f31).
|
||||
|
||||
### `protocol.unregisterProtocol`
|
||||
|
||||
@@ -1455,12 +1473,11 @@ You can see the original API proposal and reasoning [here](https://github.com/el
|
||||
|
||||
### Behavior Changed: Values sent over IPC are now serialized with Structured Clone Algorithm
|
||||
|
||||
The algorithm used to serialize objects sent over IPC (through
|
||||
`ipcRenderer.send`, `ipcRenderer.sendSync`, `WebContents.send` and related
|
||||
methods) has been switched from a custom algorithm to V8's built-in [Structured
|
||||
Clone Algorithm][SCA], the same algorithm used to serialize messages for
|
||||
`postMessage`. This brings about a 2x performance improvement for large
|
||||
messages, but also brings some breaking changes in behavior.
|
||||
The algorithm used to serialize objects sent over IPC (through `ipcRenderer.send`,
|
||||
`ipcRenderer.sendSync`, `WebContents.send` and related methods) has been switched from a custom
|
||||
algorithm to V8's built-in [Structured Clone Algorithm][SCA], the same algorithm used to serialize
|
||||
messages for `postMessage`. This brings about a 2x performance improvement for large messages,
|
||||
but also brings some breaking changes in behavior.
|
||||
|
||||
* Sending Functions, Promises, WeakMaps, WeakSets, or objects containing any
|
||||
such values, over IPC will now throw an exception, instead of silently
|
||||
@@ -1967,8 +1984,8 @@ app.getGPUInfo('basic')
|
||||
When building native modules for windows, the `win_delay_load_hook` variable in
|
||||
the module's `binding.gyp` must be true (which is the default). If this hook is
|
||||
not present, then the native module will fail to load on Windows, with an error
|
||||
message like `Cannot find module`. See the [native module
|
||||
guide](./tutorial/using-native-node-modules.md) for more.
|
||||
message like `Cannot find module`.
|
||||
See the [native module guide](./tutorial/using-native-node-modules.md) for more.
|
||||
|
||||
### Removed: IA32 Linux support
|
||||
|
||||
|
||||
@@ -110,22 +110,51 @@ $ export CHROMIUM_BUILDTOOLS_PATH=`pwd`/buildtools
|
||||
On Windows:
|
||||
|
||||
```sh
|
||||
# cmd
|
||||
$ cd src
|
||||
$ set CHROMIUM_BUILDTOOLS_PATH=%cd%\buildtools
|
||||
|
||||
# PowerShell
|
||||
$ cd src
|
||||
$ $env:CHROMIUM_BUILDTOOLS_PATH = "$(Get-Location)\buildtools"
|
||||
```
|
||||
|
||||
**To generate Testing build config of Electron:**
|
||||
|
||||
On Linux & MacOS
|
||||
|
||||
```sh
|
||||
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
|
||||
```
|
||||
|
||||
On Windows:
|
||||
|
||||
```sh
|
||||
# cmd
|
||||
$ gn gen out/Testing --args="import(\"//electron/build/args/testing.gn\")"
|
||||
|
||||
# PowerShell
|
||||
gn gen out/Testing --args="import(\`"//electron/build/args/testing.gn\`")"
|
||||
```
|
||||
|
||||
**To generate Release build config of Electron:**
|
||||
|
||||
On Linux & MacOS
|
||||
|
||||
```sh
|
||||
$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"
|
||||
```
|
||||
|
||||
On Windows:
|
||||
|
||||
```sh
|
||||
# cmd
|
||||
$ gn gen out/Release --args="import(\"//electron/build/args/release.gn\")"
|
||||
|
||||
# PowerShell
|
||||
$ gn gen out/Release --args="import(\`"//electron/build/args/release.gn\`")"
|
||||
```
|
||||
|
||||
**Note:** This will generate a `out/Testing` or `out/Release` build directory under `src/` with the testing or release build depending upon the configuration passed above. You can replace `Testing|Release` with another names, but it should be a subdirectory of `out`.
|
||||
|
||||
Also you shouldn't have to run `gn gen` again—if you want to change the build arguments, you can run `gn args out/Testing` to bring up an editor. To see the list of available build configuration options, run `gn args out/Testing --list`.
|
||||
|
||||
@@ -24,8 +24,8 @@ You can run `npm run lint` to show any style issues detected by `cpplint` and
|
||||
|
||||
## C++ and Python
|
||||
|
||||
For C++ and Python, we follow Chromium's [Coding
|
||||
Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md).
|
||||
For C++ and Python, we follow Chromium's
|
||||
[Coding Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md).
|
||||
There is also a script `script/cpplint.py` to check whether all files conform.
|
||||
|
||||
The Python version we are using now is Python 3.9.
|
||||
|
||||
@@ -15,7 +15,7 @@ calls, and other compiler optimizations. The only workaround is to build an
|
||||
unoptimized local build.
|
||||
|
||||
The official symbol server URL for Electron is
|
||||
<https://symbols.electronjs.org>.
|
||||
[https://symbols.electronjs.org](https://symbols.electronjs.org).
|
||||
You cannot visit this URL directly, you must add it to the symbol path of your
|
||||
debugging tool. In the examples below, a local cache directory is used to avoid
|
||||
repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
The source code of Electron is separated into a few parts, mostly
|
||||
following Chromium on the separation conventions.
|
||||
|
||||
You may need to become familiar with [Chromium's multi-process
|
||||
architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
|
||||
You may need to become familiar with
|
||||
[Chromium's multi-process architecture](https://dev.chromium.org/developers/design-documents/multi-process-architecture)
|
||||
to understand the source code better.
|
||||
|
||||
## Structure of Source Code
|
||||
|
||||
@@ -26,8 +26,8 @@ of the most powerful utilities in any Electron Developer's tool belt.
|
||||
## Main Process
|
||||
|
||||
Debugging the main process is a bit trickier, since you cannot open
|
||||
developer tools for them. The Chromium Developer Tools can [be used
|
||||
to debug Electron's main process][node-inspect] thanks to a closer collaboration
|
||||
developer tools for them. The Chromium Developer Tools can
|
||||
[be used to debug Electron's main process][node-inspect] thanks to a closer collaboration
|
||||
between Google / Chrome and Node.js, but you might encounter oddities like
|
||||
`require` not being present in the console.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ If you prefer the manual approach, there are 2 ways to distribute your applicati
|
||||
|
||||
### With prebuilt binaries
|
||||
|
||||
To distribute your app manually, you need to download Electron's [prebuilt
|
||||
binaries](https://github.com/electron/electron/releases). Next, the folder
|
||||
To distribute your app manually, you need to download Electron's
|
||||
[prebuilt binaries](https://github.com/electron/electron/releases). Next, the folder
|
||||
containing your app should be named `app` and placed in Electron's resources
|
||||
directory as shown in the following examples.
|
||||
|
||||
|
||||
@@ -6,10 +6,9 @@ hide_title: false
|
||||
---
|
||||
|
||||
After creating an [application distribution](application-distribution.md), the
|
||||
app's source code are usually bundled into an [ASAR
|
||||
archive](https://github.com/electron/asar), which is a simple extensive archive
|
||||
format designed for Electron apps. By bundling the app we can mitigate issues
|
||||
around long path names on Windows, speed up `require` and conceal your source
|
||||
app's source code are usually bundled into an [ASAR archive](https://github.com/electron/asar),
|
||||
which is a simple extensive archive format designed for Electron apps. By bundling the app
|
||||
we can mitigate issues around long path names on Windows, speed up `require` and conceal your source
|
||||
code from cursory inspection.
|
||||
|
||||
The bundled app runs in a virtual file system and most APIs would just work
|
||||
|
||||
@@ -5,40 +5,50 @@ slug: asar-integrity
|
||||
hide_title: false
|
||||
---
|
||||
|
||||
## Platform Support
|
||||
ASAR integrity is an experimental feature that validates the contents of your app's
|
||||
[ASAR archives](./asar-archives.md) at runtime.
|
||||
|
||||
Currently ASAR integrity checking is only supported on macOS.
|
||||
## Version support
|
||||
|
||||
## Requirements
|
||||
Currently, ASAR integrity checking is supported on:
|
||||
|
||||
### Electron Forge / Electron Packager
|
||||
* macOS as of `electron>=16.0.0`
|
||||
* Windows as of `electron>=30.0.0`
|
||||
|
||||
If you are using `>= @electron/packager`, `>= 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).
|
||||
In order to enable ASAR integrity checking, you also need to ensure that your `app.asar` file
|
||||
was generated by a version of the `@electron/asar` npm package that supports ASAR integrity.
|
||||
|
||||
### Other build systems
|
||||
Support was introduced in `asar@3.1.0`. Note that this package has since migrated over to `@electron/asar`.
|
||||
All versions of `@electron/asar` support ASAR integrity.
|
||||
|
||||
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`.
|
||||
## How it works
|
||||
|
||||
Your must then populate a valid `ElectronAsarIntegrity` dictionary block in your packaged apps `Info.plist`. An example is included below.
|
||||
Each ASAR archive contains a JSON string header. The header format includes an `integrity` object
|
||||
that contain a hex encoded hash of the entire archive as well as an array of hex encoded hashes for each
|
||||
block of `blockSize` bytes.
|
||||
|
||||
```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>
|
||||
```json
|
||||
{
|
||||
"algorithm": "SHA256",
|
||||
"hash": "...",
|
||||
"blockSize": 1024,
|
||||
"blocks": ["...", "..."]
|
||||
}
|
||||
```
|
||||
|
||||
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.
|
||||
Separately, you need to define a hex encoded hash of the entire ASAR header when packaging your Electron app.
|
||||
|
||||
## Toggling the Fuse
|
||||
When ASAR integrity is enabled, your Electron app will verify the header hash of the ASAR archive on runtime.
|
||||
If no hash is present or if there is a mismatch in the hashes, the app will forcefully terminate.
|
||||
|
||||
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.
|
||||
## Enabling ASAR integrity in the binary
|
||||
|
||||
ASAR integrity checking is currently disabled by default in Electron and can
|
||||
be enabled on build time by toggling the `EnableEmbeddedAsarIntegrityValidation`
|
||||
[Electron fuse](fuses.md).
|
||||
|
||||
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 @ts-nocheck
|
||||
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
|
||||
@@ -53,3 +63,71 @@ flipFuses(
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
:::tip Fuses in Electron Forge
|
||||
|
||||
With Electron Forge, you can configure your app's fuses with
|
||||
[@electron-forge/plugin-fuses](https://www.electronforge.io/config/plugins/fuses)
|
||||
in your Forge configuration file.
|
||||
|
||||
:::
|
||||
|
||||
## Providing the header hash
|
||||
|
||||
ASAR integrity validates the contents of the ASAR archive against the header hash that you provide
|
||||
on package time. The process of providing this packaged hash is different for macOS and Windows.
|
||||
|
||||
### Using Electron tooling
|
||||
|
||||
Electron Forge and Electron Packager do this setup automatically for you with no additional
|
||||
configuration. The minimum required versions for ASAR integrity are:
|
||||
|
||||
* `@electron/packager@18.3.1`
|
||||
* `@electron/forge@7.4.0`
|
||||
|
||||
### Using other build systems
|
||||
|
||||
#### macOS
|
||||
|
||||
When packaging for macOS, you must populate a valid `ElectronAsarIntegrity` dictionary block
|
||||
in your packaged app's `Info.plist`. An example is included below.
|
||||
|
||||
```xml title='Info.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 `@electron/asar` package exposes a `getRawHeader` method whose result can then be hashed to generate this value
|
||||
(e.g. using the [`node:crypto`](https://nodejs.org/api/crypto.html) module).
|
||||
|
||||
### Windows
|
||||
|
||||
When packaging for Windows, you must populate a valid [resource](https://learn.microsoft.com/en-us/windows/win32/menurc/resources)
|
||||
entry of type `Integrity` and name `ElectronAsar`. The value of this resource should be a JSON encoded dictionary
|
||||
in the form included below:
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"file": "resources\\app.asar",
|
||||
"alg": "sha256",
|
||||
"value": "9d1f61ea03c4bb62b4416387a521101b81151da0cfbe18c9f8c8b818c5cebfac"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
:::info
|
||||
|
||||
For an implementation example, see [`src/resedit.ts`](https://github.com/electron/packager/blob/main/src/resedit.ts)
|
||||
in the Electron Packager code.
|
||||
|
||||
:::
|
||||
|
||||
@@ -55,8 +55,8 @@ If you're not using an integrated build pipeline like Forge, you
|
||||
are likely using [`@electron/packager`][], which includes [`@electron/osx-sign`][] and
|
||||
[`@electron/notarize`][].
|
||||
|
||||
If you're using Packager's API, you can pass [in configuration that both signs
|
||||
and notarizes your application](https://electron.github.io/packager/main/modules.html).
|
||||
If you're using Packager's API, you can pass
|
||||
[in configuration that both signs and notarizes your application](https://electron.github.io/packager/main/modules.html).
|
||||
If the example below does not meet your needs, please see [`@electron/osx-sign`][] and
|
||||
[`@electron/notarize`][] for the many possible configuration options.
|
||||
|
||||
@@ -129,9 +129,9 @@ be found in the [Electron Forge Code Signing Tutorial](https://www.electronforge
|
||||
If you're not using an integrated build pipeline like Forge, you
|
||||
are likely using [`@electron/packager`][], which includes [`@electron/windows-sign`][].
|
||||
|
||||
If you're using Packager's API, you can pass [in configuration that signs
|
||||
your application](https://electron.github.io/packager/main/modules.html). If the
|
||||
example below does not meet your needs, please see [`@electron/windows-sign`][]
|
||||
If you're using Packager's API, you can pass
|
||||
[in configuration that signs your application](https://electron.github.io/packager/main/modules.html).
|
||||
If the example below does not meet your needs, please see [`@electron/windows-sign`][]
|
||||
for the many possible configuration options.
|
||||
|
||||
```js @ts-nocheck
|
||||
|
||||
@@ -9,10 +9,12 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.9+ | ✅ |
|
||||
| 32.0.0 | 2024-Jun-14 | 2024-Jul-24 | 2024-Aug-20 | 2025-Mar-04 | M128 | TBD | ✅ |
|
||||
| 31.0.0 | 2024-Apr-18 | 2024-May-15 | 2024-Jun-11 | 2025-Jan-07 | M126 | v20.14 | ✅ |
|
||||
| 30.0.0 | 2024-Feb-22 | 2024-Mar-20 | 2024-Apr-16 | 2024-Oct-15 | M124 | v20.11 | ✅ |
|
||||
| 29.0.0 | 2023-Dec-07 | 2024-Jan-24 | 2024-Feb-20 | 2024-Aug-20 | M122 | v20.9 | ✅ |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | ✅ |
|
||||
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | ✅ |
|
||||
| 28.0.0 | 2023-Oct-11 | 2023-Nov-06 | 2023-Dec-05 | 2024-Jun-11 | M120 | v18.18 | 🚫 |
|
||||
| 27.0.0 | 2023-Aug-17 | 2023-Sep-13 | 2023-Oct-10 | 2024-Apr-16 | M118 | v18.17 | 🚫 |
|
||||
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | 2024-Feb-20 | M116 | v18.16 | 🚫 |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | v18.15 | 🚫 |
|
||||
| 24.0.0 | 2023-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | 🚫 |
|
||||
|
||||
@@ -59,7 +59,7 @@ need to be called **before** the app's `ready` event is emitted.
|
||||
With top-level `await` available in Node.js ESM, make sure to `await` every Promise that you need to
|
||||
execute before the `ready` event. Otherwise, your app may be `ready` before your code executes.
|
||||
|
||||
This is particularly important to keep in mind for dynamic ESM import statmements (static imports are unaffected).
|
||||
This is particularly important to keep in mind for dynamic ESM import statements (static imports are unaffected).
|
||||
For example, if `index.mjs` calls `import('./set-up-paths.mjs')` at the top level, the app will
|
||||
likely already be `ready` by the time that dynamic import resolves.
|
||||
|
||||
@@ -78,7 +78,8 @@ JavaScript transpilers (e.g. Babel, TypeScript) have historically supported ES M
|
||||
syntax before Node.js supported ESM imports by turning these calls to CommonJS
|
||||
`require` calls.
|
||||
|
||||
<details><summary>Example: @babel/plugin-transform-modules-commonjs</summary>
|
||||
<details>
|
||||
<summary>Example: @babel/plugin-transform-modules-commonjs</summary>
|
||||
|
||||
The `@babel/plugin-transform-modules-commonjs` plugin will transform
|
||||
ESM imports down to `require` calls. The exact syntax will depend on the
|
||||
|
||||
@@ -29,7 +29,7 @@ The cookieEncryption fuse toggles whether the cookie store on disk is encrypted
|
||||
**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.
|
||||
The nodeOptions fuse toggles whether the [`NODE_OPTIONS`](https://nodejs.org/api/cli.html#node_optionsoptions) and [`NODE_EXTRA_CA_CERTS`](https://github.com/nodejs/node/blob/main/doc/api/cli.md#node_extra_ca_certsfile) environment variables are respected. The `NODE_OPTIONS` environment variable can be used to pass all kinds of custom options to the Node.js runtime and isn't typically used by apps in production. Most apps can safely disable this fuse.
|
||||
|
||||
### `nodeCliInspect`
|
||||
|
||||
|
||||
@@ -130,9 +130,8 @@ this for you.
|
||||
#### [Electron Forge](https://electronforge.io)
|
||||
|
||||
If you're using Electron Forge, adjust `packagerConfig` for macOS support, and the configuration for
|
||||
the appropriate Linux makers for Linux support, in your [Forge
|
||||
configuration](https://www.electronforge.io/configuration) _(please note the following example only
|
||||
shows the bare minimum needed to add the configuration changes)_:
|
||||
the appropriate Linux makers for Linux support, in your [Forge configuration](https://www.electronforge.io/configuration)
|
||||
_(please note the following example only shows the bare minimum needed to add the configuration changes)_:
|
||||
|
||||
```json
|
||||
{
|
||||
|
||||
@@ -20,7 +20,7 @@ You also have to register an Apple Developer account and join the
|
||||
|
||||
Electron apps can be distributed through Mac App Store or outside it. Each way
|
||||
requires different ways of signing and testing. This guide focuses on
|
||||
distribution via Mac App Store, but will also mention other methods.
|
||||
distribution via Mac App Store.
|
||||
|
||||
The following steps describe how to get the certificates from Apple, how to sign
|
||||
Electron apps, and how to test them.
|
||||
@@ -104,26 +104,15 @@ the App Sandbox. The standard darwin build of Electron will fail to launch
|
||||
when run under App Sandbox.
|
||||
|
||||
When signing the app with `@electron/osx-sign`, it will automatically add the
|
||||
necessary entitlements to your app's entitlements, but if you are using custom
|
||||
entitlements, you must ensure App Sandbox capacity is added:
|
||||
necessary entitlements to your app's entitlements.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>com.apple.security.app-sandbox</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
```
|
||||
|
||||
#### Extra steps without `electron-osx-sign`
|
||||
<details>
|
||||
<summary>Extra steps without `electron-osx-sign`</summary>
|
||||
|
||||
If you are signing your app without using `@electron/osx-sign`, you must ensure
|
||||
the app bundle's entitlements have at least following keys:
|
||||
|
||||
```xml
|
||||
```xml title='entitlements.plist'
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
@@ -174,6 +163,7 @@ When using `@electron/osx-sign` the `ElectronTeamID` key will be added
|
||||
automatically by extracting the Team ID from the certificate's name. You may
|
||||
need to manually add this key if `@electron/osx-sign` could not find the correct
|
||||
Team ID.
|
||||
</details>
|
||||
|
||||
### Sign apps for development
|
||||
|
||||
@@ -181,8 +171,14 @@ To sign an app that can run on your development machine, you must sign it with
|
||||
the "Apple Development" certificate and pass the provisioning profile to
|
||||
`@electron/osx-sign`.
|
||||
|
||||
```bash
|
||||
electron-osx-sign YourApp.app --identity='Apple Development' --provisioning-profile=/path/to/yourapp.provisionprofile
|
||||
```js @ts-nocheck
|
||||
const { signAsync } = require('@electron/osx-sign')
|
||||
|
||||
signAsync({
|
||||
app: '/path/to/your.app',
|
||||
identity: 'Apple Development',
|
||||
provisioningProfile: '/path/to/your.provisionprofile'
|
||||
})
|
||||
```
|
||||
|
||||
If you are signing without `@electron/osx-sign`, you must place the provisioning
|
||||
@@ -198,30 +194,16 @@ To sign an app that will be submitted to Mac App Store, you must sign it with
|
||||
the "Apple Distribution" certificate. Note that apps signed with this
|
||||
certificate will not run anywhere, unless it is downloaded from Mac App Store.
|
||||
|
||||
```bash
|
||||
electron-osx-sign YourApp.app --identity='Apple Distribution'
|
||||
```js @ts-nocheck
|
||||
const { signAsync } = require('@electron/osx-sign')
|
||||
|
||||
signAsync({
|
||||
app: 'path/to/your.app',
|
||||
identity: 'Apple Distribution'
|
||||
})
|
||||
```
|
||||
|
||||
### Sign apps for distribution outside the Mac App Store
|
||||
|
||||
If you don't plan to submit the app to Mac App Store, you can sign it the
|
||||
"Developer ID Application" certificate. In this way there is no requirement on
|
||||
App Sandbox, and you should use the normal darwin build of Electron if you don't
|
||||
use App Sandbox.
|
||||
|
||||
```bash
|
||||
electron-osx-sign YourApp.app --identity='Developer ID Application' --no-gatekeeper-assess
|
||||
```
|
||||
|
||||
By passing `--no-gatekeeper-assess`, `@electron/osx-sign` will skip the macOS
|
||||
GateKeeper check as your app usually has not been notarized yet by this step.
|
||||
|
||||
<!-- TODO(zcbenz): Add a chapter about App Notarization -->
|
||||
This guide does not cover [App Notarization][app-notarization], but you might
|
||||
want to do it otherwise Apple may prevent users from using your app outside Mac
|
||||
App Store.
|
||||
|
||||
## Submit Apps to the Mac App Store
|
||||
## Submit apps to the Mac App Store
|
||||
|
||||
After signing the app with the "Apple Distribution" certificate, you can
|
||||
continue to submit it to Mac App Store.
|
||||
@@ -263,10 +245,43 @@ more information.
|
||||
|
||||
### Additional entitlements
|
||||
|
||||
Every app running under the App Sandbox will run under a limited set of permissions,
|
||||
which limits potential damage from malicious code.
|
||||
Depending on which Electron APIs your app uses, you may need to add additional
|
||||
entitlements to your app's entitlements file. Otherwise, the App Sandbox may
|
||||
prevent you from using them.
|
||||
|
||||
Entitlements are specified using a file with format like
|
||||
property list (`.plist`) or XML. You must provide an entitlement file for the
|
||||
application bundle itself and a child entitlement file which basically describes
|
||||
an inheritance of properties, specified for all other enclosing executable files
|
||||
like binaries, frameworks (`.framework`), and dynamically linked libraries (`.dylib`).
|
||||
|
||||
A full list of entitlements is available in the [App Sandbox][app-sandboxing]
|
||||
documentation, but below are a few entitlements you might need for your
|
||||
MAS app.
|
||||
|
||||
With `@electron/osx-sign`, you can set custom entitlements per file as such:
|
||||
|
||||
```js @ts-nocheck
|
||||
const { signAsync } = require('@electron/osx-sign')
|
||||
|
||||
function getEntitlementsForFile (filePath) {
|
||||
if (filePath.startsWith('my-path-1')) {
|
||||
return './my-path-1.plist'
|
||||
} else {
|
||||
return './alternate.plist'
|
||||
}
|
||||
}
|
||||
|
||||
signAsync({
|
||||
optionsForFile: (filePath) => ({
|
||||
// Ensure you return the right entitlements path here based on the file being signed.
|
||||
entitlements: getEntitlementsForFile(filePath)
|
||||
})
|
||||
})
|
||||
```
|
||||
|
||||
#### Network access
|
||||
|
||||
Enable outgoing network connections to allow your app to connect to a server:
|
||||
@@ -342,12 +357,11 @@ Electron uses following cryptographic algorithms:
|
||||
|
||||
[developer-program]: https://developer.apple.com/support/compare-memberships/
|
||||
[@electron/osx-sign]: https://github.com/electron/osx-sign
|
||||
[app-sandboxing]: https://developer.apple.com/app-sandboxing/
|
||||
[app-notarization]: https://developer.apple.com/documentation/security/notarizing_macos_software_before_distribution
|
||||
[submitting-your-app]: https://developer.apple.com/library/mac/documentation/IDEs/Conceptual/AppDistributionGuide/SubmittingYourApp/SubmittingYourApp.html
|
||||
[create-record]: https://help.apple.com/app-store-connect/#/dev2cd126805
|
||||
[app-sandboxing]: https://developer.apple.com/documentation/security/app_sandbox
|
||||
[submitting-your-app]: https://help.apple.com/xcode/mac/current/#/dev067853c94
|
||||
[create-record]: https://developer.apple.com/help/app-store-connect/create-an-app-record/add-a-new-app
|
||||
[apple-transporter]: https://help.apple.com/itc/transporteruserguide/en.lproj/static.html
|
||||
[submit-for-review]: https://developer.apple.com/library/ios/documentation/LanguagesUtilities/Conceptual/iTunesConnect_Guide/Chapters/SubmittingTheApp.html
|
||||
[submit-for-review]: https://developer.apple.com/help/app-store-connect/manage-submissions-to-app-review/submit-for-review
|
||||
[export-compliance]: https://help.apple.com/app-store-connect/#/devc3f64248f
|
||||
[user-selected]: https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW6
|
||||
[network-access]: https://developer.apple.com/library/ios/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW9
|
||||
|
||||
@@ -158,11 +158,10 @@ This module allows you to detect ahead of time whether or not the notification w
|
||||
### Linux
|
||||
|
||||
Notifications are sent using `libnotify`, which can show notifications on any
|
||||
desktop environment that follows [Desktop Notifications
|
||||
Specification][notification-spec], including Cinnamon, Enlightenment, Unity,
|
||||
GNOME, and KDE.
|
||||
desktop environment that follows [Desktop Notifications Specification][notification-spec],
|
||||
including Cinnamon, Enlightenment, Unity, GNOME, and KDE.
|
||||
|
||||
[notification-spec]: https://developer-old.gnome.org/notification-spec/
|
||||
[notification-spec]: https://specifications.freedesktop.org/notification-spec/notification-spec-latest.html
|
||||
[app-user-model-id]: https://learn.microsoft.com/en-us/windows/win32/shell/appids
|
||||
[set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows
|
||||
[squirrel-events]: https://github.com/electron/windows-installer/blob/main/README.md#handling-squirrel-events
|
||||
|
||||
@@ -246,7 +246,7 @@ and prevent the use of Node primitives `contextIsolation` **must** also be used.
|
||||
:::info
|
||||
For more information on what `contextIsolation` is and how to enable it please
|
||||
see our dedicated [Context Isolation](context-isolation.md) document.
|
||||
:::info
|
||||
:::
|
||||
|
||||
### 4. Enable process sandboxing
|
||||
|
||||
@@ -259,7 +259,7 @@ content in an unsandboxed process, including the main process, is not advised.
|
||||
:::info
|
||||
For more information on what Process Sandboxing is and how to enable it please
|
||||
see our dedicated [Process Sandboxing](sandbox.md) document.
|
||||
:::info
|
||||
:::
|
||||
|
||||
### 5. Handle session permission requests from remote content
|
||||
|
||||
|
||||
@@ -121,7 +121,7 @@ need to install Node.js themselves as a prerequisite to running your app.
|
||||
|
||||
To check which version of Node.js is running in your app, you can access the global
|
||||
[`process.versions`][] variable in the main process or preload script. You can also reference
|
||||
<https://releases.electronjs.org/releases.json>.
|
||||
[https://releases.electronjs.org/releases.json](https://releases.electronjs.org/releases.json).
|
||||
|
||||
:::
|
||||
|
||||
|
||||
@@ -222,7 +222,8 @@ with CommonJS module syntax:
|
||||
- [app][app], which controls your application's event lifecycle.
|
||||
- [BrowserWindow][browser-window], which creates and manages app windows.
|
||||
|
||||
<details><summary>Module capitalization conventions</summary>
|
||||
<details>
|
||||
<summary>Module capitalization conventions</summary>
|
||||
|
||||
You might have noticed the capitalization difference between the **a**pp
|
||||
and **B**rowser**W**indow modules. Electron follows typical JavaScript conventions here,
|
||||
@@ -231,10 +232,11 @@ Notification) whereas camelCase modules are not instantiable (e.g. app, ipcRende
|
||||
|
||||
</details>
|
||||
|
||||
<details><summary>Typed import aliases</summary>
|
||||
<details>
|
||||
<summary>Typed import aliases</summary>
|
||||
|
||||
For better type checking when writing TypeScript code, you can choose to import
|
||||
main process modules from <code>electron/main</code>.
|
||||
main process modules from `electron/main`.
|
||||
|
||||
```js
|
||||
const { app, BrowserWindow } = require('electron/main')
|
||||
|
||||
@@ -152,7 +152,7 @@ command that can handle the version bumping and tagging for you.
|
||||
#### Bonus: Publishing in GitHub Actions
|
||||
|
||||
Publishing locally can be painful, especially because you can only create distributables
|
||||
for your host operating system (i.e. you can't publish a Window `.exe` file from macOS).
|
||||
for your host operating system (i.e. you can't publish a Windows `.exe` file from macOS).
|
||||
|
||||
A solution for this would be to publish your app via automation workflows
|
||||
such as [GitHub Actions][], which can run tasks in the
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
If you want to embed (third-party) web content in an Electron `BrowserWindow`,
|
||||
there are three options available to you: `<iframe>` tags, `<webview>` tags,
|
||||
and `BrowserViews`. Each one offers slightly different functionality and is
|
||||
and `WebContentsView`. Each one offers slightly different functionality and is
|
||||
useful in different situations. To help you choose between these, this guide
|
||||
explains the differences and capabilities of each option.
|
||||
|
||||
@@ -23,8 +23,8 @@ and only allow the capabilities you want to support.
|
||||
[we do not recommend you to use WebViews](../api/webview-tag.md#warning),
|
||||
as this tag undergoes dramatic architectural changes that may affect stability
|
||||
of your application. Consider switching to alternatives, like `iframe` and
|
||||
Electron's `BrowserView`, or an architecture that avoids embedded content
|
||||
by design.
|
||||
Electron's [`WebContentsView`](../api/web-contents-view.md), or an architecture
|
||||
that avoids embedded content by design.
|
||||
|
||||
[WebViews](../api/webview-tag.md) are based on Chromium's WebViews and are not
|
||||
explicitly supported by Electron. We do not guarantee that the WebView API will
|
||||
|
||||
@@ -89,6 +89,7 @@ auto_filenames = {
|
||||
"docs/api/structures/extension.md",
|
||||
"docs/api/structures/file-filter.md",
|
||||
"docs/api/structures/file-path-with-headers.md",
|
||||
"docs/api/structures/filesystem-permission-request.md",
|
||||
"docs/api/structures/gpu-feature-status.md",
|
||||
"docs/api/structures/hid-device.md",
|
||||
"docs/api/structures/input-event.md",
|
||||
@@ -99,6 +100,7 @@ auto_filenames = {
|
||||
"docs/api/structures/jump-list-item.md",
|
||||
"docs/api/structures/keyboard-event.md",
|
||||
"docs/api/structures/keyboard-input-event.md",
|
||||
"docs/api/structures/media-access-permission-request.md",
|
||||
"docs/api/structures/memory-info.md",
|
||||
"docs/api/structures/memory-usage-details.md",
|
||||
"docs/api/structures/mime-typed-buffer.md",
|
||||
@@ -106,7 +108,9 @@ auto_filenames = {
|
||||
"docs/api/structures/mouse-wheel-input-event.md",
|
||||
"docs/api/structures/notification-action.md",
|
||||
"docs/api/structures/notification-response.md",
|
||||
"docs/api/structures/open-external-permission-request.md",
|
||||
"docs/api/structures/payment-discount.md",
|
||||
"docs/api/structures/permission-request.md",
|
||||
"docs/api/structures/point.md",
|
||||
"docs/api/structures/post-body.md",
|
||||
"docs/api/structures/printer-info.md",
|
||||
@@ -347,6 +351,7 @@ auto_filenames = {
|
||||
|
||||
utility_bundle_deps = [
|
||||
"lib/browser/api/net-fetch.ts",
|
||||
"lib/browser/api/system-preferences.ts",
|
||||
"lib/browser/message-port-main.ts",
|
||||
"lib/common/api/net-client-request.ts",
|
||||
"lib/common/define-properties.ts",
|
||||
|
||||
@@ -34,7 +34,7 @@ filenames = {
|
||||
"shell/browser/notifications/linux/notification_presenter_linux.h",
|
||||
"shell/browser/relauncher_linux.cc",
|
||||
"shell/browser/ui/electron_desktop_window_tree_host_linux.cc",
|
||||
"shell/browser/ui/file_dialog_gtk.cc",
|
||||
"shell/browser/ui/file_dialog_linux.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.h",
|
||||
"shell/browser/ui/gtk/menu_util.cc",
|
||||
@@ -380,6 +380,10 @@ filenames = {
|
||||
"shell/browser/file_select_helper.cc",
|
||||
"shell/browser/file_select_helper.h",
|
||||
"shell/browser/file_select_helper_mac.mm",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context.cc",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context.h",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context_factory.cc",
|
||||
"shell/browser/file_system_access/file_system_access_permission_context_factory.h",
|
||||
"shell/browser/font_defaults.cc",
|
||||
"shell/browser/font_defaults.h",
|
||||
"shell/browser/hid/electron_hid_delegate.cc",
|
||||
@@ -753,8 +757,6 @@ filenames = {
|
||||
"shell/common/extensions/electron_extensions_client.h",
|
||||
"shell/common/gin_converters/extension_converter.cc",
|
||||
"shell/common/gin_converters/extension_converter.h",
|
||||
"shell/renderer/extensions/electron_extensions_dispatcher_delegate.cc",
|
||||
"shell/renderer/extensions/electron_extensions_dispatcher_delegate.h",
|
||||
"shell/renderer/extensions/electron_extensions_renderer_api_provider.cc",
|
||||
"shell/renderer/extensions/electron_extensions_renderer_api_provider.h",
|
||||
"shell/renderer/extensions/electron_extensions_renderer_client.cc",
|
||||
|
||||
@@ -218,6 +218,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__algorithm/shift_right.h",
|
||||
"//third_party/libc++/src/include/__algorithm/shuffle.h",
|
||||
"//third_party/libc++/src/include/__algorithm/sift_down.h",
|
||||
"//third_party/libc++/src/include/__algorithm/simd_utils.h",
|
||||
"//third_party/libc++/src/include/__algorithm/sort.h",
|
||||
"//third_party/libc++/src/include/__algorithm/sort_heap.h",
|
||||
"//third_party/libc++/src/include/__algorithm/stable_partition.h",
|
||||
@@ -382,7 +383,6 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__format/format_context.h",
|
||||
"//third_party/libc++/src/include/__format/format_error.h",
|
||||
"//third_party/libc++/src/include/__format/format_functions.h",
|
||||
"//third_party/libc++/src/include/__format/format_fwd.h",
|
||||
"//third_party/libc++/src/include/__format/format_parse_context.h",
|
||||
"//third_party/libc++/src/include/__format/format_string.h",
|
||||
"//third_party/libc++/src/include/__format/format_to_n_result.h",
|
||||
@@ -432,21 +432,27 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__fwd/array.h",
|
||||
"//third_party/libc++/src/include/__fwd/bit_reference.h",
|
||||
"//third_party/libc++/src/include/__fwd/complex.h",
|
||||
"//third_party/libc++/src/include/__fwd/deque.h",
|
||||
"//third_party/libc++/src/include/__fwd/format.h",
|
||||
"//third_party/libc++/src/include/__fwd/fstream.h",
|
||||
"//third_party/libc++/src/include/__fwd/functional.h",
|
||||
"//third_party/libc++/src/include/__fwd/ios.h",
|
||||
"//third_party/libc++/src/include/__fwd/istream.h",
|
||||
"//third_party/libc++/src/include/__fwd/mdspan.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory.h",
|
||||
"//third_party/libc++/src/include/__fwd/memory_resource.h",
|
||||
"//third_party/libc++/src/include/__fwd/ostream.h",
|
||||
"//third_party/libc++/src/include/__fwd/pair.h",
|
||||
"//third_party/libc++/src/include/__fwd/queue.h",
|
||||
"//third_party/libc++/src/include/__fwd/span.h",
|
||||
"//third_party/libc++/src/include/__fwd/sstream.h",
|
||||
"//third_party/libc++/src/include/__fwd/stack.h",
|
||||
"//third_party/libc++/src/include/__fwd/streambuf.h",
|
||||
"//third_party/libc++/src/include/__fwd/string.h",
|
||||
"//third_party/libc++/src/include/__fwd/string_view.h",
|
||||
"//third_party/libc++/src/include/__fwd/subrange.h",
|
||||
"//third_party/libc++/src/include/__fwd/tuple.h",
|
||||
"//third_party/libc++/src/include/__fwd/vector.h",
|
||||
"//third_party/libc++/src/include/__hash_table",
|
||||
"//third_party/libc++/src/include/__ios/fpos.h",
|
||||
"//third_party/libc++/src/include/__iterator/access.h",
|
||||
@@ -703,6 +709,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__thread/thread.h",
|
||||
"//third_party/libc++/src/include/__thread/timed_backoff_policy.h",
|
||||
"//third_party/libc++/src/include/__tree",
|
||||
"//third_party/libc++/src/include/__tuple/find_index.h",
|
||||
"//third_party/libc++/src/include/__tuple/make_tuple_types.h",
|
||||
"//third_party/libc++/src/include/__tuple/pair_like.h",
|
||||
"//third_party/libc++/src/include/__tuple/sfinae_helpers.h",
|
||||
@@ -756,10 +763,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_constant_evaluated.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_convertible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_copy_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_copy_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_core_convertible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_default_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_destructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_empty.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_enum.h",
|
||||
@@ -775,17 +779,10 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_function_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_object_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_member_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_move_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_move_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_convertible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_copy_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_copy_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_default_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_destructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_move_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_nothrow_move_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_null_pointer.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_object.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_pod.h",
|
||||
@@ -806,14 +803,9 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivial.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_copy_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_copy_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_copyable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_default_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_destructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_lexicographically_comparable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_move_assignable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_move_constructible.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_trivially_relocatable.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_unbounded_array.h",
|
||||
"//third_party/libc++/src/include/__type_traits/is_union.h",
|
||||
@@ -970,7 +962,7 @@ libcxx_headers = [
|
||||
"//third_party/libc++/src/include/mdspan",
|
||||
"//third_party/libc++/src/include/memory",
|
||||
"//third_party/libc++/src/include/memory_resource",
|
||||
"//third_party/libc++/src/include/module.modulemap.in",
|
||||
"//third_party/libc++/src/include/module.modulemap",
|
||||
"//third_party/libc++/src/include/mutex",
|
||||
"//third_party/libc++/src/include/new",
|
||||
"//third_party/libc++/src/include/numbers",
|
||||
|
||||
@@ -34,13 +34,17 @@ export default class BrowserView {
|
||||
}
|
||||
|
||||
setAutoResize (options: AutoResizeOptions) {
|
||||
if (options == null || typeof options !== 'object') { throw new Error('Invalid auto resize options'); }
|
||||
if (options == null || typeof options !== 'object') {
|
||||
throw new Error('Invalid auto resize options');
|
||||
}
|
||||
|
||||
this.#autoResizeFlags = {
|
||||
width: !!options.width,
|
||||
height: !!options.height,
|
||||
horizontal: !!options.horizontal,
|
||||
vertical: !!options.vertical
|
||||
};
|
||||
|
||||
this.#autoHorizontalProportion = null;
|
||||
this.#autoVerticalProportion = null;
|
||||
}
|
||||
@@ -71,7 +75,10 @@ export default class BrowserView {
|
||||
#autoHorizontalProportion: {width: number, left: number} | null = null;
|
||||
#autoVerticalProportion: {height: number, top: number} | null = null;
|
||||
#autoResize () {
|
||||
if (!this.ownerWindow) throw new Error('Electron bug: #autoResize called without owner window');
|
||||
if (!this.ownerWindow) {
|
||||
throw new Error('Electron bug: #autoResize called without owner window');
|
||||
};
|
||||
|
||||
if (this.#autoResizeFlags.horizontal && this.#autoHorizontalProportion == null) {
|
||||
const viewBounds = this.#webContentsView.getBounds();
|
||||
this.#autoHorizontalProportion = {
|
||||
@@ -79,6 +86,7 @@ export default class BrowserView {
|
||||
left: this.#lastWindowSize.width / viewBounds.x
|
||||
};
|
||||
}
|
||||
|
||||
if (this.#autoResizeFlags.vertical && this.#autoVerticalProportion == null) {
|
||||
const viewBounds = this.#webContentsView.getBounds();
|
||||
this.#autoVerticalProportion = {
|
||||
@@ -86,6 +94,7 @@ export default class BrowserView {
|
||||
top: this.#lastWindowSize.height / viewBounds.y
|
||||
};
|
||||
}
|
||||
|
||||
const newBounds = this.ownerWindow.getBounds();
|
||||
let widthDelta = newBounds.width - this.#lastWindowSize.width;
|
||||
let heightDelta = newBounds.height - this.#lastWindowSize.height;
|
||||
@@ -105,10 +114,12 @@ export default class BrowserView {
|
||||
newViewBounds.width = newBounds.width / this.#autoHorizontalProportion.width;
|
||||
newViewBounds.x = newBounds.width / this.#autoHorizontalProportion.left;
|
||||
}
|
||||
|
||||
if (this.#autoVerticalProportion) {
|
||||
newViewBounds.height = newBounds.height / this.#autoVerticalProportion.height;
|
||||
newViewBounds.y = newBounds.y / this.#autoVerticalProportion.top;
|
||||
}
|
||||
|
||||
if (this.#autoHorizontalProportion || this.#autoVerticalProportion) {
|
||||
this.#webContentsView.setBounds(newViewBounds);
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ BrowserWindow.prototype._init = function (this: BWT) {
|
||||
|
||||
this._browserViews = [];
|
||||
|
||||
this.on('close', () => {
|
||||
this.on('closed', () => {
|
||||
this._browserViews.forEach(b => b.webContents?.close({ waitForBeforeUnload: true }));
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { app, BrowserWindow } from 'electron/main';
|
||||
import { app, BaseWindow } from 'electron/main';
|
||||
import type { OpenDialogOptions, OpenDialogReturnValue, MessageBoxOptions, SaveDialogOptions, SaveDialogReturnValue, MessageBoxReturnValue, CertificateTrustDialogOptions } from 'electron/main';
|
||||
const dialogBinding = process._linkedBinding('electron_browser_dialog');
|
||||
|
||||
@@ -72,7 +72,7 @@ const setupSaveDialogProperties = (properties: (keyof typeof SaveFileDialogPrope
|
||||
return dialogProperties;
|
||||
};
|
||||
|
||||
const saveDialog = (sync: boolean, window: BrowserWindow | null, options?: SaveDialogOptions) => {
|
||||
const saveDialog = (sync: boolean, window: BaseWindow | null, options?: SaveDialogOptions) => {
|
||||
checkAppInitialized();
|
||||
|
||||
if (options == null) options = { title: 'Save' };
|
||||
@@ -111,7 +111,7 @@ const saveDialog = (sync: boolean, window: BrowserWindow | null, options?: SaveD
|
||||
return sync ? dialogBinding.showSaveDialogSync(settings) : dialogBinding.showSaveDialog(settings);
|
||||
};
|
||||
|
||||
const openDialog = (sync: boolean, window: BrowserWindow | null, options?: OpenDialogOptions) => {
|
||||
const openDialog = (sync: boolean, window: BaseWindow | null, options?: OpenDialogOptions) => {
|
||||
checkAppInitialized();
|
||||
|
||||
if (options == null) {
|
||||
@@ -152,7 +152,7 @@ const openDialog = (sync: boolean, window: BrowserWindow | null, options?: OpenD
|
||||
return (sync) ? dialogBinding.showOpenDialogSync(settings) : dialogBinding.showOpenDialog(settings);
|
||||
};
|
||||
|
||||
const messageBox = (sync: boolean, window: BrowserWindow | null, options?: MessageBoxOptions) => {
|
||||
const messageBox = (sync: boolean, window: BaseWindow | null, options?: MessageBoxOptions) => {
|
||||
checkAppInitialized();
|
||||
|
||||
if (options == null) options = { type: 'none', message: '' };
|
||||
@@ -237,51 +237,51 @@ const messageBox = (sync: boolean, window: BrowserWindow | null, options?: Messa
|
||||
}
|
||||
};
|
||||
|
||||
export function showOpenDialog(window: BrowserWindow, options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialog(window: BaseWindow, options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialog(options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialog (windowOrOptions: BrowserWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showOpenDialog (windowOrOptions: BaseWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return openDialog(false, window, options);
|
||||
}
|
||||
|
||||
export function showOpenDialogSync(window: BrowserWindow, options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialogSync(window: BaseWindow, options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialogSync(options: OpenDialogOptions): OpenDialogReturnValue;
|
||||
export function showOpenDialogSync (windowOrOptions: BrowserWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showOpenDialogSync (windowOrOptions: BaseWindow | OpenDialogOptions, maybeOptions?: OpenDialogOptions): OpenDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return openDialog(true, window, options);
|
||||
}
|
||||
|
||||
export function showSaveDialog(window: BrowserWindow, options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialog(window: BaseWindow, options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialog(options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialog (windowOrOptions: BrowserWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showSaveDialog (windowOrOptions: BaseWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return saveDialog(false, window, options);
|
||||
}
|
||||
|
||||
export function showSaveDialogSync(window: BrowserWindow, options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialogSync(window: BaseWindow, options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialogSync(options: SaveDialogOptions): SaveDialogReturnValue;
|
||||
export function showSaveDialogSync (windowOrOptions: BrowserWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showSaveDialogSync (windowOrOptions: BaseWindow | SaveDialogOptions, maybeOptions?: SaveDialogOptions): SaveDialogReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return saveDialog(true, window, options);
|
||||
}
|
||||
|
||||
export function showMessageBox(window: BrowserWindow, options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBox(window: BaseWindow, options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBox(options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBox (windowOrOptions: BrowserWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showMessageBox (windowOrOptions: BaseWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return messageBox(false, window, options);
|
||||
}
|
||||
|
||||
export function showMessageBoxSync(window: BrowserWindow, options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBoxSync(window: BaseWindow, options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBoxSync(options: MessageBoxOptions): MessageBoxReturnValue;
|
||||
export function showMessageBoxSync (windowOrOptions: BrowserWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showMessageBoxSync (windowOrOptions: BaseWindow | MessageBoxOptions, maybeOptions?: MessageBoxOptions): MessageBoxReturnValue {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
return messageBox(true, window, options);
|
||||
}
|
||||
|
||||
@@ -289,9 +289,9 @@ export function showErrorBox (...args: any[]) {
|
||||
return dialogBinding.showErrorBox(...args);
|
||||
}
|
||||
|
||||
export function showCertificateTrustDialog (windowOrOptions: BrowserWindow | CertificateTrustDialogOptions, maybeOptions?: CertificateTrustDialogOptions) {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BrowserWindow) ? windowOrOptions : maybeOptions);
|
||||
export function showCertificateTrustDialog (windowOrOptions: BaseWindow | CertificateTrustDialogOptions, maybeOptions?: CertificateTrustDialogOptions) {
|
||||
const window = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? null : windowOrOptions);
|
||||
const options = (windowOrOptions && !(windowOrOptions instanceof BaseWindow) ? windowOrOptions : maybeOptions);
|
||||
|
||||
if (options == null || typeof options !== 'object') {
|
||||
throw new TypeError('options must be an object');
|
||||
|
||||
@@ -18,7 +18,7 @@ function makeStreamFromPipe (pipe: any): ReadableStream {
|
||||
try {
|
||||
const rv = await pipe.read(buf);
|
||||
if (rv > 0) {
|
||||
controller.enqueue(buf.subarray(0, rv));
|
||||
controller.enqueue(buf.slice(0, rv));
|
||||
} else {
|
||||
controller.close();
|
||||
}
|
||||
|
||||
@@ -541,7 +541,8 @@ WebContents.prototype._init = function () {
|
||||
length: this._historyLength.bind(this),
|
||||
getEntryAtIndex: this._getNavigationEntryAtIndex.bind(this)
|
||||
},
|
||||
writable: false
|
||||
writable: false,
|
||||
enumerable: true
|
||||
});
|
||||
|
||||
// Dispatch IPC messages to the ipc module.
|
||||
|
||||
@@ -200,11 +200,11 @@ delete process.appCodeLoaded;
|
||||
if (packagePath) {
|
||||
// Finally load app's main.js and transfer control to C++.
|
||||
if ((packageJson.type === 'module' && !mainStartupScript.endsWith('.cjs')) || mainStartupScript.endsWith('.mjs')) {
|
||||
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
|
||||
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
|
||||
const main = (require('url') as typeof url).pathToFileURL(path.join(packagePath, mainStartupScript));
|
||||
loadESM(async (esmLoader: any) => {
|
||||
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
|
||||
try {
|
||||
await esmLoader.import(main.toString(), undefined, Object.create(null));
|
||||
await cascadedLoader.import(main.toString(), undefined, Object.create(null));
|
||||
appCodeLoaded!();
|
||||
} catch (err) {
|
||||
appCodeLoaded!();
|
||||
|
||||
@@ -209,6 +209,22 @@ type ExtraURLLoaderOptions = {
|
||||
headers: Record<string, { name: string, value: string | string[] }>;
|
||||
allowNonHttpProtocols: boolean;
|
||||
}
|
||||
|
||||
function validateHeader (name: any, value: any): void {
|
||||
if (typeof name !== 'string') {
|
||||
throw new TypeError('`name` should be a string in setHeader(name, value)');
|
||||
}
|
||||
if (value == null) {
|
||||
throw new Error('`value` required in setHeader("' + name + '", value)');
|
||||
}
|
||||
if (!isValidHeaderName(name)) {
|
||||
throw new Error(`Invalid header name: '${name}'`);
|
||||
}
|
||||
if (!isValidHeaderValue(value.toString())) {
|
||||
throw new Error(`Invalid value for header '${name}': '${value}'`);
|
||||
}
|
||||
}
|
||||
|
||||
function parseOptions (optionsIn: ClientRequestConstructorOptions | string): NodeJS.CreateURLLoaderOptions & ExtraURLLoaderOptions {
|
||||
// eslint-disable-next-line node/no-deprecated-api
|
||||
const options: any = typeof optionsIn === 'string' ? url.parse(optionsIn) : { ...optionsIn };
|
||||
@@ -275,12 +291,7 @@ function parseOptions (optionsIn: ClientRequestConstructorOptions | string): Nod
|
||||
};
|
||||
const headers: Record<string, string | string[]> = options.headers || {};
|
||||
for (const [name, value] of Object.entries(headers)) {
|
||||
if (!isValidHeaderName(name)) {
|
||||
throw new Error(`Invalid header name: '${name}'`);
|
||||
}
|
||||
if (!isValidHeaderValue(value.toString())) {
|
||||
throw new Error(`Invalid value for header '${name}': '${value}'`);
|
||||
}
|
||||
validateHeader(name, value);
|
||||
const key = name.toLowerCase();
|
||||
urlLoaderOptions.headers[key] = { name, value };
|
||||
}
|
||||
@@ -351,21 +362,10 @@ export class ClientRequest extends Writable implements Electron.ClientRequest {
|
||||
}
|
||||
|
||||
setHeader (name: string, value: string) {
|
||||
if (typeof name !== 'string') {
|
||||
throw new TypeError('`name` should be a string in setHeader(name, value)');
|
||||
}
|
||||
if (value == null) {
|
||||
throw new Error('`value` required in setHeader("' + name + '", value)');
|
||||
}
|
||||
if (this._started || this._firstWrite) {
|
||||
throw new Error('Can\'t set headers after they are sent');
|
||||
}
|
||||
if (!isValidHeaderName(name)) {
|
||||
throw new Error(`Invalid header name: '${name}'`);
|
||||
}
|
||||
if (!isValidHeaderValue(value.toString())) {
|
||||
throw new Error(`Invalid value for header '${name}': '${value}'`);
|
||||
}
|
||||
validateHeader(name, value);
|
||||
|
||||
const key = name.toLowerCase();
|
||||
this._urlLoaderOptions.headers[key] = { name, value };
|
||||
|
||||
@@ -494,7 +494,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
};
|
||||
|
||||
const { access } = fs;
|
||||
fs.access = function (pathArgument: string, mode: any, callback: any) {
|
||||
fs.access = function (pathArgument: string, mode: number, callback: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return access.apply(this, arguments);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
@@ -539,7 +539,16 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
nextTick(callback);
|
||||
};
|
||||
|
||||
fs.promises.access = util.promisify(fs.access);
|
||||
const { access: accessPromise } = fs.promises;
|
||||
fs.promises.access = function (pathArgument: string, mode: number) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) {
|
||||
return accessPromise.apply(this, arguments);
|
||||
}
|
||||
|
||||
const p = util.promisify(fs.access);
|
||||
return p(pathArgument, mode);
|
||||
};
|
||||
|
||||
const { accessSync } = fs;
|
||||
fs.accessSync = function (pathArgument: string, mode: any) {
|
||||
|
||||
@@ -2,6 +2,14 @@
|
||||
import { wrapFsWithAsar } from './asar-fs-wrapper';
|
||||
wrapFsWithAsar(require('fs'));
|
||||
|
||||
// See ElectronRendererClient::DidCreateScriptContext.
|
||||
if ((globalThis as any).blinkfetch) {
|
||||
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers'];
|
||||
for (const key of keys) {
|
||||
(globalThis as any)[key] = (globalThis as any)[`blink${key}`];
|
||||
}
|
||||
}
|
||||
|
||||
// Hook child_process.fork.
|
||||
import cp = require('child_process'); // eslint-disable-line import/first
|
||||
const originalFork = cp.fork;
|
||||
|
||||
@@ -150,12 +150,12 @@ if (cjsPreloads.length) {
|
||||
}
|
||||
}
|
||||
if (esmPreloads.length) {
|
||||
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
|
||||
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
|
||||
|
||||
loadESM(async (esmLoader: any) => {
|
||||
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
|
||||
// Load the preload scripts.
|
||||
for (const preloadScript of esmPreloads) {
|
||||
await esmLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => {
|
||||
await cascadedLoader.import(pathToFileURL(preloadScript).toString(), undefined, Object.create(null)).catch((err: Error) => {
|
||||
console.error(`Unable to load preload script: ${preloadScript}`);
|
||||
console.error(err);
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
// Utility side modules, please sort alphabetically.
|
||||
export const utilityNodeModuleList: ElectronInternal.ModuleEntry[] = [
|
||||
{ name: 'net', loader: () => require('./net') }
|
||||
{ name: 'net', loader: () => require('./net') },
|
||||
{ name: 'systemPreferences', loader: () => require('@electron/internal/browser/api/system-preferences') }
|
||||
];
|
||||
|
||||
@@ -36,11 +36,12 @@ parentPort.on('removeListener', (name: string) => {
|
||||
});
|
||||
|
||||
// Finally load entry script.
|
||||
const { loadESM } = __non_webpack_require__('internal/process/esm_loader');
|
||||
const { runEntryPointWithESMLoader } = __non_webpack_require__('internal/modules/run_main');
|
||||
const mainEntry = pathToFileURL(entryScript);
|
||||
loadESM(async (esmLoader: any) => {
|
||||
|
||||
runEntryPointWithESMLoader(async (cascadedLoader: any) => {
|
||||
try {
|
||||
await esmLoader.import(mainEntry.toString(), undefined, Object.create(null));
|
||||
await cascadedLoader.import(mainEntry.toString(), undefined, Object.create(null));
|
||||
} catch (err) {
|
||||
// @ts-ignore internalBinding is a secret internal global that we shouldn't
|
||||
// really be using, so we ignore the type error instead of declaring it in types
|
||||
|
||||
@@ -17,6 +17,14 @@ const { makeRequireFunction } = __non_webpack_require__('internal/modules/helper
|
||||
global.module = new Module('electron/js2c/worker_init');
|
||||
global.require = makeRequireFunction(global.module);
|
||||
|
||||
// See WebWorkerObserver::WorkerScriptReadyForEvaluation.
|
||||
if ((globalThis as any).blinkfetch) {
|
||||
const keys = ['fetch', 'Response', 'FormData', 'Request', 'Headers'];
|
||||
for (const key of keys) {
|
||||
(globalThis as any)[key] = (globalThis as any)[`blink${key}`];
|
||||
}
|
||||
}
|
||||
|
||||
// Set the __filename to the path of html file if it is file: protocol.
|
||||
// NB. 'self' isn't defined in an AudioWorklet.
|
||||
if (typeof self !== 'undefined' && self.location.protocol === 'file:') {
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
"@electron/docs-parser": "^1.2.0",
|
||||
"@electron/fiddle-core": "^1.0.4",
|
||||
"@electron/github-app-auth": "^2.0.0",
|
||||
"@electron/lint-roller": "^1.9.0",
|
||||
"@electron/lint-roller": "^1.12.1",
|
||||
"@electron/typescript-definitions": "^8.15.2",
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
@@ -49,7 +49,7 @@
|
||||
"eslint-plugin-standard": "^4.0.1",
|
||||
"eslint-plugin-unicorn": "^46.0.1",
|
||||
"events": "^3.2.0",
|
||||
"express": "^4.16.4",
|
||||
"express": "^4.19.2",
|
||||
"folder-hash": "^2.1.1",
|
||||
"fs-extra": "^9.0.1",
|
||||
"got": "^11.8.5",
|
||||
|
||||
@@ -10,7 +10,7 @@ this patch is required to provide ripemd160 support in the nodejs crypto
|
||||
module.
|
||||
|
||||
diff --git a/crypto/digest_extra/digest_extra.c b/crypto/digest_extra/digest_extra.c
|
||||
index 08ed671a8095566e6c87ea846a95c59efdd7f42b..29797fb8f69c23ac427c041d779a013b4a78c02a 100644
|
||||
index f5750354956ed9fa72d45f60ebcd7784ac0920f8..da9a93725154e661decac174491209baebab8d86 100644
|
||||
--- a/crypto/digest_extra/digest_extra.c
|
||||
+++ b/crypto/digest_extra/digest_extra.c
|
||||
@@ -85,6 +85,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index 98f97ebb28a06dfde00082922a1aff24f8aa154c..8ec11f0e839760ace90bd88e096ffbd17508e224 100644
|
||||
index ec0ee893e58d49890f5545d02b533d07e362309c..b1c1a77c340e7d2c9e2ef21fcf0cc01ed6e15cc0 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1334,7 +1334,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1340,7 +1340,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index 98f97ebb28a06dfde00082922a1aff24f8aa154c..8ec11f0e839760ace90bd88e096ffbd1
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2701,13 +2701,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2707,13 +2707,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,6 @@ allow_disabling_blink_scheduler_throttling_per_renderview.patch
|
||||
hack_plugin_response_interceptor_to_point_to_electron.patch
|
||||
feat_add_support_for_overriding_the_base_spellchecker_download_url.patch
|
||||
feat_enable_offscreen_rendering_with_viz_compositor.patch
|
||||
gpu_notify_when_dxdiag_request_fails.patch
|
||||
feat_allow_embedders_to_add_observers_on_created_hunspell.patch
|
||||
allow_in-process_windows_to_have_different_web_prefs.patch
|
||||
refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
|
||||
@@ -53,7 +52,7 @@ crash_allow_setting_more_options.patch
|
||||
upload_list_add_loadsync_method.patch
|
||||
allow_setting_secondary_label_via_simplemenumodel.patch
|
||||
feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
|
||||
fix_patch_out_profile_refs_in_accessibility_ui.patch
|
||||
adjust_accessibility_ui_for_electron.patch
|
||||
skip_atk_toolchain_check.patch
|
||||
worker_feat_add_hook_to_notify_script_ready.patch
|
||||
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
|
||||
@@ -83,7 +82,6 @@ fix_non-client_mouse_tracking_and_message_bubbling_on_windows.patch
|
||||
build_make_libcxx_abi_unstable_false_for_electron.patch
|
||||
introduce_ozoneplatform_electron_can_call_x11_property.patch
|
||||
make_gtk_getlibgtk_public.patch
|
||||
build_disable_print_content_analysis.patch
|
||||
custom_protocols_plzserviceworker.patch
|
||||
feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
|
||||
disable_freezing_flags_after_init_in_node.patch
|
||||
@@ -114,9 +112,7 @@ fix_disabling_background_throttling_in_compositor.patch
|
||||
fix_select_the_first_menu_item_when_opened_via_keyboard.patch
|
||||
fix_return_v8_value_from_localframe_requestexecutescript.patch
|
||||
fix_harden_blink_scriptstate_maybefrom.patch
|
||||
chore_add_buildflag_guard_around_new_include.patch
|
||||
fix_use_delegated_generic_capturer_when_available.patch
|
||||
build_remove_ent_content_analysis_assert.patch
|
||||
expose_webblob_path_to_allow_embedders_to_get_file_paths.patch
|
||||
fix_move_autopipsettingshelper_behind_branding_buildflag.patch
|
||||
revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch
|
||||
@@ -126,6 +122,11 @@ chore_remove_check_is_test_on_script_injection_tracker.patch
|
||||
fix_restore_original_resize_performance_on_macos.patch
|
||||
feat_allow_code_cache_in_custom_schemes.patch
|
||||
build_run_reclient_cfg_generator_after_chrome.patch
|
||||
fix_suppress_clang_-wimplicit-const-int-float-conversion_in.patch
|
||||
fix_getcursorscreenpoint_wrongly_returns_0_0.patch
|
||||
fix_add_support_for_skipping_first_2_no-op_refreshes_in_thumb_cap.patch
|
||||
refactor_expose_file_system_access_blocklist.patch
|
||||
partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
|
||||
feat_add_support_for_missing_dialog_features_to_shell_dialogs.patch
|
||||
fix_font_face_resolution_when_renderer_is_blocked.patch
|
||||
feat_enable_passing_exit_code_on_service_process_crash.patch
|
||||
x11_use_localized_display_label_only_for_browser_process.patch
|
||||
|
||||
@@ -10,10 +10,10 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
||||
3. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba9302780650952ecfa47 100644
|
||||
index 3094f8f1b445b639f43573af6f6b5ae5eddf7227..7c8e781cf1502bdb72ffc9f2d7ab2be684f37d5c 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -12,6 +12,7 @@
|
||||
#include "base/i18n/rtl.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/strings/string_util.h"
|
||||
@@ -21,7 +21,7 @@ index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba93027806509
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@@ -175,6 +176,11 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
@@ -183,6 +184,11 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
#endif
|
||||
|
||||
if (shortcut.empty()) {
|
||||
@@ -33,7 +33,7 @@ index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba93027806509
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
// Our fallback is to try translate the key code to a regular character
|
||||
// unless it is one of digits (VK_0 to VK_9). Some keyboard
|
||||
@@ -198,6 +204,10 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
@@ -206,6 +212,10 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
shortcut +=
|
||||
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
|
||||
#endif
|
||||
@@ -44,7 +44,7 @@ index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba93027806509
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
@@ -382,7 +392,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
@@ -390,7 +400,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
const std::u16string& shortcut) const {
|
||||
std::u16string result = shortcut;
|
||||
|
||||
@@ -53,7 +53,7 @@ index c33829d85745e595e3da8d9913f6e75b05e6c4a9..fa6fe3626b7c5f2b8e8ba93027806509
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
|
||||
|
||||
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
|
||||
@@ -390,7 +400,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
@@ -398,7 +408,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
// more information.
|
||||
if (IsCtrlDown())
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);
|
||||
|
||||
@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index c5155af40194660e4a9dc0e5351bdf4f0886265d..c8371a3ac10af6ba57769c1a574ebe8a0c2836b4 100644
|
||||
index bb019363bf40f8f2df7815353784c357254c0132..e994a0e7bbef2f78c642486e84aa0386cab7f794 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -264,6 +264,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -24,8 +24,8 @@ index c5155af40194660e4a9dc0e5351bdf4f0886265d..c8371a3ac10af6ba57769c1a574ebe8a
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -358,7 +362,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
|
||||
@@ -362,7 +366,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
#endif
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
- auto* client = GetContentClient()->gpu();
|
||||
|
||||
@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index 289a8c25f14cad42b9178ce94b11f67870be7434..5b91eadb698eeb5a87c9d0b2edf7e5ccf952555c 100644
|
||||
index 902d84ad70adc9496f3af989465a99b6f44b077a..3ce043eea32c41130aa59ab8570a05b31fdb4de9 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -146,6 +146,8 @@ class CONTENT_EXPORT RenderFrameObserver
|
||||
@@ -23,10 +23,10 @@ index 289a8c25f14cad42b9178ce94b11f67870be7434..5b91eadb698eeb5a87c9d0b2edf7e5cc
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 0eed4c5645d4e119393e9e0fbd770847eaf01030..95eb5224b90268937c1d24190c1234a5f42cb235 100644
|
||||
index 2d7d13fc9f361bc3e4b16e4db008c042f492704a..dc96cd01365491a2384e9d27e384b680c3e86a23 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4684,6 +4684,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4692,6 +4692,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 0eed4c5645d4e119393e9e0fbd770847eaf01030..95eb5224b90268937c1d24190c1234a5
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index e3350ff445fcffca7efb2b11eba66f4c84e05f14..46f2142ac5bb840f20f244d96384024431ea11c6 100644
|
||||
index b4e2293651bb0e234aa8119c2afece5faa11a758..37af654883ec39c761cc4fcaab9d22061595d451 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -640,6 +640,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -645,6 +645,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index e3350ff445fcffca7efb2b11eba66f4c84e05f14..46f2142ac5bb840f20f244d963840244
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index ace1251d03266e3c5ae75c2059ba8c575725222d..37e0a30d87529e5de27fef40d8e7de0f7c27f0cd 100644
|
||||
index 2bb6e24cf5b83b8f6cf523d648307608ede1b538..1fe4df62e66fd10267e72d91176529fccabe83aa 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -638,6 +638,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -645,6 +645,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -67,10 +67,10 @@ index ace1251d03266e3c5ae75c2059ba8c575725222d..37e0a30d87529e5de27fef40d8e7de0f
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 2cb0a08954850d229e99bae66fecd4787f20a178..79894ca0d51ed61a178818b38da5c43b63a2dee6 100644
|
||||
index 50352340def787f5c6a382b622c37905ee79302c..97a79a4bfbcdd63ec01b201571fdccf2701ae40b 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -213,6 +213,7 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -215,6 +215,7 @@ void LocalWindowProxy::Initialize() {
|
||||
}
|
||||
|
||||
InstallConditionalFeatures();
|
||||
@@ -79,10 +79,10 @@ index 2cb0a08954850d229e99bae66fecd4787f20a178..79894ca0d51ed61a178818b38da5c43b
|
||||
if (World().IsMainWorld()) {
|
||||
probe::DidCreateMainWorldContext(GetFrame());
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 7a5d4721f7bd3012351f17053e188505f26f1979..4c415c2464fee49581efa307070ffad976b69c76 100644
|
||||
index 69c46beec12f4b5abf530c2fb836d6185ee049f9..e9c0f5c0930929a5f62a34943f7619a368c551e1 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -305,6 +305,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -306,6 +306,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,10 +92,10 @@ index 7a5d4721f7bd3012351f17053e188505f26f1979..4c415c2464fee49581efa307070ffad9
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index 015daaa60e46a106bf2f36a2bd967c892bc299da..c07e4bc3b7dd937ef14a72506cd6f2299bc511f4 100644
|
||||
index 0cee9fc9642c4a2eac51cc7b57124d9772411b8c..4a2bd06f9f254969419d3ec00a59466f8278814c 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -292,6 +292,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -293,6 +293,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ index 015daaa60e46a106bf2f36a2bd967c892bc299da..c07e4bc3b7dd937ef14a72506cd6f229
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index c522b37b1918902e424f0df6a3eb379b0fd05fa4..0b3054bcb55bd6e731dd42b59c2bc0c24ec29165 100644
|
||||
index a70c4a78a3dc740446b06a44a448760015bc9c24..be9872bdd93755bbf9e2be684cfd37efe9f4a5a8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -123,10 +123,10 @@ index c522b37b1918902e424f0df6a3eb379b0fd05fa4..0b3054bcb55bd6e731dd42b59c2bc0c2
|
||||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index 4ea7eae36fcf1d42cbe639e895d9aca52d20082b..ce529d0edd69ad6542baa83725e18be33d3c2a4a 100644
|
||||
index ec2a8f7d2fc14702686be73e663dfb9632b5b4de..5f3fdd7d03b81c7bf59528af96c550d9f2307835 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -411,6 +411,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -412,6 +412,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -7,7 +7,7 @@ Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index cc7b17e13c4c8b9e483df9a097b23935ab2e56bc..b89810659dab27dd8150c0b7185ea2b679ab98a4 100755
|
||||
index f3a8ba3756a19beb286a3f7bba52399705bf59bf..7cf72db56d3bc71cf6fb2b3f88a80e7866db1598 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -336,6 +336,31 @@ SPECIAL_CASES = {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: add gin::Converter support for ArrayBufferView
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/gin/converter.cc b/gin/converter.cc
|
||||
index f6a93a1f74668e69b425a87c42e05c1adbc5cf54..4934f23d077d4b2a4c376196e37c720471fc88f6 100644
|
||||
index 62209cadaec7314d2d4ec3e63e1bc88394afa4a9..b035bfe1fd16fb6ca8be33bf446ff8578d7cc2a0 100644
|
||||
--- a/gin/converter.cc
|
||||
+++ b/gin/converter.cc
|
||||
@@ -18,6 +18,7 @@
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "v8/include/v8-value.h"
|
||||
|
||||
using v8::ArrayBuffer;
|
||||
@@ -17,7 +17,7 @@ index f6a93a1f74668e69b425a87c42e05c1adbc5cf54..4934f23d077d4b2a4c376196e37c7204
|
||||
using v8::External;
|
||||
using v8::Function;
|
||||
using v8::Int32;
|
||||
@@ -244,6 +245,20 @@ bool Converter<Local<ArrayBuffer>>::FromV8(Isolate* isolate,
|
||||
@@ -246,6 +247,20 @@ bool Converter<Local<ArrayBuffer>>::FromV8(Isolate* isolate,
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ index f6a93a1f74668e69b425a87c42e05c1adbc5cf54..4934f23d077d4b2a4c376196e37c7204
|
||||
Local<External> val) {
|
||||
return val.As<Value>();
|
||||
diff --git a/gin/converter.h b/gin/converter.h
|
||||
index 88ed39f337d5e9a1004d4e270f2bd020251ee518..175817151bfb8c83213767dc42f6ed14777f3cd1 100644
|
||||
index 828e59f4640e84ae9e4517b9ed9bc13b154fa9f2..c3d97c4e46fe47076299e475be7eec74cbc5783c 100644
|
||||
--- a/gin/converter.h
|
||||
+++ b/gin/converter.h
|
||||
@@ -190,6 +190,15 @@ struct GIN_EXPORT Converter<v8::Local<v8::ArrayBuffer> > {
|
||||
|
||||
@@ -8,7 +8,7 @@ decorations in maximized mode where needed, preventing empty space caused
|
||||
by decoration shadows and rounded titlebars around the window while maximized.
|
||||
|
||||
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
|
||||
index ab8f0d6b545b24c28eb427e6d2ef33ef35d22e91..ed3213e73959079e5bc119987da7c31cc07f2f27 100644
|
||||
index 7b81a752ffad229a7bf1917f000b7a45f0828c36..1f08396713155eafc78a1fa9fc8fec22df350a91 100644
|
||||
--- a/ui/gtk/gtk_ui.cc
|
||||
+++ b/ui/gtk/gtk_ui.cc
|
||||
@@ -562,11 +562,12 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
|
||||
@@ -51,7 +51,7 @@ index 0432ea4f5906502a4f6def46ab064292a6628218..e3cbfa3a1ac8c169c429e29c1262d0dd
|
||||
// Objects to notify when the window frame button order changes.
|
||||
base::ObserverList<ui::WindowButtonOrderObserver>::Unchecked
|
||||
diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc
|
||||
index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95179b0083 100644
|
||||
index 0b8fa0ec76098e0319b2e853719166d405cd3828..52615c5c119c58f17850454e98d1240b141e8a09 100644
|
||||
--- a/ui/gtk/window_frame_provider_gtk.cc
|
||||
+++ b/ui/gtk/window_frame_provider_gtk.cc
|
||||
@@ -30,20 +30,23 @@ constexpr int kMaxFrameSizeDip = 64;
|
||||
@@ -112,9 +112,9 @@ index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95
|
||||
double opacity = GetOpacityFromContext(context);
|
||||
if (opacity < 1.0) {
|
||||
return true;
|
||||
@@ -206,8 +209,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom(
|
||||
unfocused_bitmap = src.unfocused_bitmap;
|
||||
}
|
||||
@@ -189,8 +192,8 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::Asset::operator=(
|
||||
|
||||
WindowFrameProviderGtk::Asset::~Asset() = default;
|
||||
|
||||
-WindowFrameProviderGtk::WindowFrameProviderGtk(bool solid_frame, bool tiled)
|
||||
- : solid_frame_(solid_frame), tiled_(tiled) {
|
||||
@@ -123,7 +123,7 @@ index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95
|
||||
GtkSettings* settings = gtk_settings_get_default();
|
||||
// Unretained() is safe since WindowFrameProviderGtk will own the signals.
|
||||
auto callback = base::BindRepeating(&WindowFrameProviderGtk::OnThemeChanged,
|
||||
@@ -325,7 +328,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas,
|
||||
@@ -340,7 +343,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas,
|
||||
|
||||
auto header =
|
||||
PaintHeaderbar({client_bounds_px.width(), top_area_height_px},
|
||||
@@ -132,7 +132,7 @@ index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95
|
||||
image = gfx::ImageSkia::CreateFrom1xBitmap(header);
|
||||
// In GTK4, the headerbar gets clipped by the window.
|
||||
if (GtkCheckVersion(4)) {
|
||||
@@ -352,7 +355,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
|
||||
@@ -369,7 +372,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset(
|
||||
|
||||
gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip,
|
||||
2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip);
|
||||
@@ -141,20 +141,20 @@ index 794efdb773422ddc12ccbe013a13aadeb980b487..a60bbd76141f06202343c68e78688a95
|
||||
frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context));
|
||||
frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context));
|
||||
gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset));
|
||||
@@ -360,7 +363,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
|
||||
@@ -377,7 +380,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset(
|
||||
focused_context, scale);
|
||||
asset.unfocused_bitmap =
|
||||
PaintBitmap(bitmap_size, gfx::RectF(frame_bounds_dip),
|
||||
- DecorationContext(solid_frame_, tiled_, false), scale);
|
||||
+ DecorationContext(solid_frame_, tiled_, maximized_, false), scale);
|
||||
|
||||
// In GTK4, there's no way to obtain the frame thickness from CSS values
|
||||
// directly, so we must determine it experimentally based on the drawn
|
||||
return asset;
|
||||
}
|
||||
diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
|
||||
index bed28192daffe032fde3a74ca70f1298fb12b1b7..268acade8bd1075f3ce756cdf29bf50905ccb433 100644
|
||||
index 4faaae32a203bfa57f3e61c391dc6917c4a0bf59..94050a0136b78730f607f42991742e0434948d0e 100644
|
||||
--- a/ui/gtk/window_frame_provider_gtk.h
|
||||
+++ b/ui/gtk/window_frame_provider_gtk.h
|
||||
@@ -18,7 +18,7 @@ namespace gtk {
|
||||
@@ -20,7 +20,7 @@ namespace gtk {
|
||||
|
||||
class WindowFrameProviderGtk : public ui::WindowFrameProvider {
|
||||
public:
|
||||
@@ -163,7 +163,7 @@ index bed28192daffe032fde3a74ca70f1298fb12b1b7..268acade8bd1075f3ce756cdf29bf509
|
||||
|
||||
WindowFrameProviderGtk(const WindowFrameProviderGtk&) = delete;
|
||||
WindowFrameProviderGtk& operator=(const WindowFrameProviderGtk&) = delete;
|
||||
@@ -70,6 +70,8 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider {
|
||||
@@ -65,6 +65,8 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider {
|
||||
// Input parameters used for drawing.
|
||||
const bool solid_frame_;
|
||||
const bool tiled_;
|
||||
@@ -171,7 +171,7 @@ index bed28192daffe032fde3a74ca70f1298fb12b1b7..268acade8bd1075f3ce756cdf29bf509
|
||||
+ const bool maximized_;
|
||||
|
||||
// Scale-independent metric calculated based on the bitmaps.
|
||||
gfx::Insets frame_thickness_dip_;
|
||||
std::optional<gfx::Insets> frame_thickness_dip_;
|
||||
diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc
|
||||
index 8903f9ba950e7878fbd1bfa0cf2a42e0cc9daa21..7d13381eb1d16193bad0be1318e8ed199c6fb845 100644
|
||||
--- a/ui/linux/fallback_linux_ui.cc
|
||||
|
||||
@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
|
||||
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index 6095ece239ae3b3ef6795d54e5c8bc4d1bb730ff..43c39f61e7d040c9923dac60ddc50fce2e3ee038 100644
|
||||
index 6022a0af4241fe65bd03d7cbf95785e8879dc78e..ec9e4c6ece9014b66e7d65e99cda2b956a9a5d80 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
@@ -229,6 +229,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -29,7 +29,7 @@ index 6095ece239ae3b3ef6795d54e5c8bc4d1bb730ff..43c39f61e7d040c9923dac60ddc50fce
|
||||
objects_.clear();
|
||||
platform_representations_.clear();
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
index 6328d90cd1aca85c481b96bf859f0e9acb9de055..9aad0ae0134387fb2821d098a7d015ddd445de78 100644
|
||||
index 96ba9abb9b7efab79adbf299c6bd3b4f7a4501e1..0916b81ec5b3cb123185b7cff332120ee498fb57 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
@@ -89,6 +89,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
|
||||
151
patches/chromium/adjust_accessibility_ui_for_electron.patch
Normal file
151
patches/chromium/adjust_accessibility_ui_for_electron.patch
Normal file
@@ -0,0 +1,151 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Mon, 6 Jul 2020 13:46:06 -0700
|
||||
Subject: Adjust accessibility_ui for Electron
|
||||
|
||||
This tweaks Chrome's Accessibility support at chrome://accessibility
|
||||
to make it usable from Electron by replacing use of the Profile PrefService
|
||||
with Electron's own PrefService in ElectronBrowserContext. It also removes
|
||||
usage of BrowserList and Browser as we subclass related methods and use our
|
||||
WindowList.
|
||||
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
index aff8a187b6d81172bf5930c6da6bfed4d7989057..5923e39ae94cabd716d845c86db5f84c3c51e2cb 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
|
||||
@@ -43,6 +43,7 @@
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "content/public/browser/web_contents_delegate.h"
|
||||
#include "content/public/browser/web_ui_data_source.h"
|
||||
+#include "electron/shell/browser/electron_browser_context.h"
|
||||
#include "ui/accessibility/accessibility_features.h"
|
||||
#include "ui/accessibility/ax_updates_and_events.h"
|
||||
#include "ui/accessibility/platform/ax_platform_node.h"
|
||||
@@ -169,7 +170,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
|
||||
accessibility_mode);
|
||||
}
|
||||
|
||||
-#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if 0
|
||||
base::Value::Dict BuildTargetDescriptor(Browser* browser) {
|
||||
base::Value::Dict target_data;
|
||||
target_data.Set(kSessionIdField, browser->session_id().id());
|
||||
@@ -203,7 +204,7 @@ void HandleAccessibilityRequestCallback(
|
||||
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
|
||||
|
||||
base::Value::Dict data;
|
||||
- PrefService* pref = Profile::FromBrowserContext(current_context)->GetPrefs();
|
||||
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(current_context)->prefs();
|
||||
ui::AXMode mode =
|
||||
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
|
||||
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
|
||||
@@ -236,7 +237,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled());
|
||||
|
||||
std::string pref_api_type =
|
||||
- pref->GetString(prefs::kShownAccessibilityApiType);
|
||||
+ std::string(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
bool pref_api_type_supported = false;
|
||||
|
||||
std::vector<ui::AXApiType::Type> supported_api_types =
|
||||
@@ -303,11 +304,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(page_list));
|
||||
|
||||
base::Value::List browser_list;
|
||||
-#if !BUILDFLAG(IS_ANDROID)
|
||||
+#if 0
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
browser_list.Append(BuildTargetDescriptor(browser));
|
||||
}
|
||||
-#endif // !BUILDFLAG(IS_ANDROID)
|
||||
+#endif
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
base::Value::List widgets_list;
|
||||
@@ -647,7 +648,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
|
||||
const std::string value = CheckJSValue(data.FindString(kValueField));
|
||||
|
||||
if (string_name == kApiTypeField) {
|
||||
- PrefService* pref = Profile::FromWebUI(web_ui())->GetPrefs();
|
||||
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(
|
||||
+ web_ui()->GetWebContents()->GetBrowserContext())->prefs();
|
||||
pref->SetString(prefs::kShownAccessibilityApiType, value);
|
||||
}
|
||||
}
|
||||
@@ -700,7 +702,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
- PrefService* pref = Profile::FromWebUI(web_ui())->GetPrefs();
|
||||
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(
|
||||
+ web_contents->GetBrowserContext())->prefs();
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
std::string accessibility_contents =
|
||||
@@ -727,6 +730,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
+#if 0
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
base::Value::Dict result = BuildTargetDescriptor(browser);
|
||||
@@ -739,6 +743,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
#endif // !BUILDFLAG(IS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
base::Value::Dict result;
|
||||
@@ -807,11 +812,13 @@ void AccessibilityUIMessageHandler::StopRecording(
|
||||
}
|
||||
|
||||
ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
|
||||
- PrefService* pref = Profile::FromWebUI(web_ui())->GetPrefs();
|
||||
- const std::vector<ui::AXApiType::Type> supported_types =
|
||||
- content::AXInspectFactory::SupportedApis();
|
||||
+ PrefService* pref = static_cast<electron::ElectronBrowserContext*>(
|
||||
+ web_ui()->GetWebContents()->GetBrowserContext())->prefs();
|
||||
ui::AXApiType::Type api_type =
|
||||
ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
|
||||
+
|
||||
+ const std::vector<ui::AXApiType::Type> supported_types =
|
||||
+ content::AXInspectFactory::SupportedApis();
|
||||
// Check to see if it is in the supported types list.
|
||||
if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
|
||||
supported_types.end()) {
|
||||
@@ -881,8 +888,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
+#if 0
|
||||
const std::string_view default_api_type =
|
||||
std::string_view(ui::AXApiType::Type(ui::AXApiType::kBlink));
|
||||
registry->RegisterStringPref(prefs::kShownAccessibilityApiType,
|
||||
std::string(default_api_type));
|
||||
+ registry->RegisterBooleanPref(prefs::kShowInternalAccessibilityTree, false);
|
||||
+#endif
|
||||
}
|
||||
diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.h b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
index 45dead36d71f1c91e1be607180e548854083304c..79a2742e6b95e9ab8257c0f1af75eeebce8566e9 100644
|
||||
--- a/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.h
|
||||
@@ -30,6 +30,8 @@ class ScopedAccessibilityMode;
|
||||
class WebContents;
|
||||
} // namespace content
|
||||
|
||||
+class ElectronAccessibilityUIMessageHandler;
|
||||
+
|
||||
namespace user_prefs {
|
||||
class PrefRegistrySyncable;
|
||||
} // namespace user_prefs
|
||||
@@ -82,6 +84,8 @@ class AccessibilityUIMessageHandler : public content::WebUIMessageHandler {
|
||||
static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
|
||||
|
||||
private:
|
||||
+ friend class ElectronAccessibilityUIMessageHandler;
|
||||
+
|
||||
// Applies `mode` to `web_contents` for the lifetime of the accessibility
|
||||
// UI page.
|
||||
void SetAccessibilityModeForWebContents(content::WebContents* web_contents,
|
||||
@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
index 32b77897ef3669727fe05a1f3603a5f8335ec3cf..f1948d352bd71da5ec17d734e343bfd656d7ed69 100644
|
||||
index 1eb0f9919a29acf9f443f15ef5e7549138d73f7b..070ad96c753bc064c1af48a934a7a3bc7483174b 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
|
||||
@@ -163,6 +163,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {
|
||||
@@ -23,10 +23,10 @@ index 32b77897ef3669727fe05a1f3603a5f8335ec3cf..f1948d352bd71da5ec17d734e343bfd6
|
||||
return receiver_.BindNewEndpointAndPassDedicatedRemote();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 57926e0d557fdb3e8f46a096e335ecb5d1d2e13f..b0438d6077a3323785175424a3701ba4ae5e523d 100644
|
||||
index d39f6f582109e7323372c032048544738372cf41..9ba70f021fd72e5861566e89f40af3edf4dea7e1 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -714,6 +714,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -713,6 +713,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ index 57926e0d557fdb3e8f46a096e335ecb5d1d2e13f..b0438d6077a3323785175424a3701ba4
|
||||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index a94977d7a76ae9952bbba0efe59a7cb5021a1c84..11c4f890eaeae1329ca5a6634a698aef7a288fb4 100644
|
||||
index 5b4e90e2a9293f6d59e92b16bd461500f8188cc7..b69f66e5cf009a340766c355d9ceea89a20546b2 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -139,6 +139,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -51,20 +51,20 @@ index a94977d7a76ae9952bbba0efe59a7cb5021a1c84..11c4f890eaeae1329ca5a6634a698aef
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 4c78692adb777b8e0a8fa2e2350775b7e2ef676a..fa18900586854c5d6b936d6b9e6fac1c9e571bce 100644
|
||||
index 86c755796f215d3655648af4fa7a6e4eaabd109a..3c9b0864b2b96f6103b0661db3488e970b2886e1 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -553,8 +553,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
@@ -570,8 +570,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
|
||||
// OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
|
||||
// which updates `visibility_`, unless the host is hidden. Make sure no update
|
||||
// is needed.
|
||||
- DCHECK(host_->is_hidden() || visibility_ == Visibility::VISIBLE);
|
||||
- CHECK(host_->is_hidden() || visibility_ == Visibility::VISIBLE);
|
||||
- OnShowWithPageVisibility(page_visibility);
|
||||
+ if (host_->is_hidden() || visibility_ == Visibility::VISIBLE)
|
||||
+ OnShowWithPageVisibility(page_visibility);
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewAura::NotifyHostAndDelegateOnWasShown(
|
||||
void RenderWidgetHostViewAura::EnsurePlatformVisibility(
|
||||
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
|
||||
index 20ca763ff7f55e8176b77349b41917b11e051ae6..a50c122064b5f0092f57e3d508fb19389b72203b 100644
|
||||
--- a/content/public/browser/render_view_host.h
|
||||
@@ -104,7 +104,7 @@ index ed73a6fe6d146eac904f0aa0d88facf055df503e..4bbc792068db75739a7ceb8ad01c85f9
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index c4348be90db209a757f21cbc518e1244fe0954d5..1ee953ad860291cdc1095880f6646d1d05732843 100644
|
||||
index 6dfc5bef7ed4197067f63db2e12de9b1e1478e2e..ab8eb5352a18c514d864d6fd7c64a61e571dce3e 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -376,6 +376,7 @@ class BLINK_EXPORT WebView {
|
||||
@@ -116,10 +116,10 @@ index c4348be90db209a757f21cbc518e1244fe0954d5..1ee953ad860291cdc1095880f6646d1d
|
||||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 735b6ae3eefaeb9c558a1cf63371f533685cc5db..986b4c9f35431ed14989d5f69fc09d17a2c3fda9 100644
|
||||
index 173ca5a588d8b9525bd835207358007c120120b0..8db4b77dc968a6f8dd4612deecb7b4ce5ee71eb4 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -2431,6 +2431,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
@@ -2430,6 +2430,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
|
||||
TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
|
||||
"old_state", old_state, "new_state", new_state);
|
||||
|
||||
@@ -130,7 +130,7 @@ index 735b6ae3eefaeb9c558a1cf63371f533685cc5db..986b4c9f35431ed14989d5f69fc09d17
|
||||
bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
|
||||
!old_state->is_in_back_forward_cache;
|
||||
bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
|
||||
@@ -3932,10 +3936,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3940,10 +3944,23 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ index 735b6ae3eefaeb9c558a1cf63371f533685cc5db..986b4c9f35431ed14989d5f69fc09d17
|
||||
// Do not throttle if the page should be painting.
|
||||
bool is_visible =
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index db7f1cb1b0f682a20a618b342a9a42add0db9e74..bc2c06fd0e7d02624ad97ab1ebe21ff7b2217c05 100644
|
||||
index d6bfd9b670d03170c2c388bb69b2299ef3fe2286..8684fd118320d26549dbc7d0c5bdbbb4d081e0a3 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -451,6 +451,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -166,7 +166,7 @@ index db7f1cb1b0f682a20a618b342a9a42add0db9e74..bc2c06fd0e7d02624ad97ab1ebe21ff7
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -925,6 +926,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -927,6 +928,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on
|
||||
process-level command line switches, as before.
|
||||
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index 0f386b68028a8398bdf6b851b16e244e5ba918bd..7a9519c2c172178ace67251151363ac0611e8503 100644
|
||||
index 2eb418015552910f6a5bceb117953a563e3b8c07..9974a94a6ae78f36e7baab097e710a79f817e682 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -149,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -147,6 +147,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
|
||||
@@ -32,7 +32,7 @@ index 0f386b68028a8398bdf6b851b16e244e5ba918bd..7a9519c2c172178ace67251151363ac0
|
||||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 90a6a0bf5c0e2d21f23badb284292a4f0c90178f..4f1b6acaa503cd085ff607d292ad0d4ee6731a56 100644
|
||||
index a928196b83671b7f9a6fc27f2a8436c89fe3d3e5..ef5ba7b733bfa67158cb631b5b0bb6b28ba8758d 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -10,6 +10,7 @@
|
||||
@@ -43,7 +43,7 @@ index 90a6a0bf5c0e2d21f23badb284292a4f0c90178f..4f1b6acaa503cd085ff607d292ad0d4e
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
#include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
|
||||
@@ -425,6 +426,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -432,6 +433,20 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
// blocking user's access to the background web content.
|
||||
bool modal_context_menu = true;
|
||||
|
||||
@@ -65,7 +65,7 @@ index 90a6a0bf5c0e2d21f23badb284292a4f0c90178f..4f1b6acaa503cd085ff607d292ad0d4e
|
||||
// chrome, except for the cases where it would require lots of extra work for
|
||||
// the embedder to use the same default value.
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index 9960a1180a8e64d6e369936ab93aeb3417af5e8a..3f38e6e1289e1387e5fa54268c8efacda8fc3186 100644
|
||||
index ffddf92b78f1bc03f40969bb93260502b0887e8a..7a8f75cb6b501b90df7a1fec2b5a84667250691c 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -76,7 +76,7 @@ index 9960a1180a8e64d6e369936ab93aeb3417af5e8a..3f38e6e1289e1387e5fa54268c8efacd
|
||||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -439,6 +440,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -434,6 +435,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.stylus_handwriting_enabled;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ index 9960a1180a8e64d6e369936ab93aeb3417af5e8a..3f38e6e1289e1387e5fa54268c8efacd
|
||||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index c3ff064deb240a16f2d9adcb233426fbc4795324..7fd096a61e3dd33de09a25ce2926b010486b2dc2 100644
|
||||
index 2dc2c857784ce482c7437a39e3e12f9a1d15bc55..fd6cf5ca4fbb22450da2c9677dfa806ab3f2aeb9 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
@@ -141,7 +141,7 @@ index c3ff064deb240a16f2d9adcb233426fbc4795324..7fd096a61e3dd33de09a25ce2926b010
|
||||
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
@@ -218,6 +219,19 @@ struct WebPreferences {
|
||||
@@ -217,6 +218,19 @@ struct WebPreferences {
|
||||
// If true, stylus handwriting recognition to text input will be available in
|
||||
// editable input fields which are non-password type.
|
||||
bool stylus_handwriting_enabled;
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: allow new privileges in unsandboxed child processes
|
||||
This allows unsandboxed child process to launch setuid processes on Linux.
|
||||
|
||||
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
|
||||
index e21cd3f9c447d67299c034e2b9f212f251c5deca..795ad47165f2f02e816f424ce74391a435c61a32 100644
|
||||
index add20a2f81d66e51e1be5a3f3b35ef6b340b4cc3..31a2a14a95540477297943df9b09b1e4659a884d 100644
|
||||
--- a/content/browser/child_process_launcher_helper_linux.cc
|
||||
+++ b/content/browser/child_process_launcher_helper_linux.cc
|
||||
@@ -63,6 +63,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
@@ -64,6 +64,15 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
options->fds_to_remap.emplace_back(sandbox_fd, GetSandboxFD());
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ This is used by editors to obtain the filesystem path from a dragged file. See
|
||||
documentation at https://electronjs.org/docs/api/file-object
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
|
||||
index bb5967988cb69d24af94337b67379f1200a2508b..a935500bbef25a73840931648f3e65e70fc098f4 100644
|
||||
index 3b120f0de6dcd7e584a7882df9ece2a7adcbc368..01b5f3391abb0d8ff76c427fa187f9d6d2523919 100644
|
||||
--- a/third_party/blink/renderer/core/fileapi/file.h
|
||||
+++ b/third_party/blink/renderer/core/fileapi/file.h
|
||||
@@ -220,6 +220,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 0a742bbbd5e8e1eb3610cc32f785f779e8907e75..26967019244d409dadf4533405d4d5d27c75b73c 100644
|
||||
index 0e21d9c3194198e7540c7b3a84e8aed691821cbb..c0f5d92f8613ca380295cca7f55456d6fbcd6d1f 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index 0a742bbbd5e8e1eb3610cc32f785f779e8907e75..26967019244d409dadf4533405d4d5d2
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 81e90b80d4ff25c7003e4e98f071848be98280d6..92cfe0001933cd18ecb7384ead1dda26f563e62b 100644
|
||||
index 50edd8bfdb5a6ec6de8d324c7cec09655d8761d1..1b3ee460f8571602c8d1fc22e709ce44d6095d7a 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -684,10 +684,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -718,10 +718,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index 81e90b80d4ff25c7003e4e98f071848be98280d6..92cfe0001933cd18ecb7384ead1dda26
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -738,6 +734,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -772,6 +768,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn
|
||||
Build BoringSSL with some extra functions that nodejs needs.
|
||||
|
||||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
|
||||
index 6a0e44685b3208663e89287894c55be8e1285a1a..084d29bf0a38f73aeeceb9a6649ae347a7ba9c9a 100644
|
||||
index f1b4a1ac248479746a378c85e34845b7703d5867..727940b7c015bedb0a09c06123d9e12cbb039694 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -56,6 +56,21 @@ config("no_asm_config") {
|
||||
@@ -52,6 +52,21 @@ config("no_asm_config") {
|
||||
all_sources = crypto_sources + ssl_sources + pki_sources + pki_internal_headers
|
||||
all_headers = crypto_headers + ssl_headers + pki_headers + pki_internal_headers
|
||||
|
||||
@@ -28,6 +28,6 @@ index 6a0e44685b3208663e89287894c55be8e1285a1a..084d29bf0a38f73aeeceb9a6649ae347
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
if (enable_rust_boringssl) {
|
||||
if (enable_rust) {
|
||||
rust_bindgen("raw_bssl_sys_bindings") {
|
||||
header = "src/rust/bssl-sys/wrapper.h"
|
||||
|
||||
@@ -8,10 +8,10 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 5f6efb0e93bced90de5f6735e303feaa48c71df2..f3a31fdee0e9e75d05aa229a7066a520161c7f61 100644
|
||||
index 4c1a949117a070a74285d043ec89a677952fd2c4..a62476b75142705c01c7d2260c93fa7b4342a2b6 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -82,6 +82,7 @@
|
||||
@@ -87,6 +87,7 @@
|
||||
X("drm") \
|
||||
X("drmcursor") \
|
||||
X("dwrite") \
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
|
||||
This is similar to the //build usecase so we're OK adding ourselves here
|
||||
|
||||
diff --git a/.gn b/.gn
|
||||
index 6abe8e52e11154d5f3cb7c80d57754b1a3819e46..22adbcc359a53405b0c1b4dbc170a5c896eb2b5c 100644
|
||||
index e6f5cbc9c49f998d63dc8974c5b4789643b2fc87..1df4bbe26fe90eef2dc1a73faaff3c2405993491 100644
|
||||
--- a/.gn
|
||||
+++ b/.gn
|
||||
@@ -173,4 +173,8 @@ exec_script_whitelist =
|
||||
@@ -169,4 +169,8 @@ exec_script_whitelist =
|
||||
|
||||
"//tools/grit/grit_rule.gni",
|
||||
"//tools/gritsettings/BUILD.gn",
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <vertedinde@electronjs.org>
|
||||
Date: Sun, 1 May 2022 18:01:42 -0700
|
||||
Subject: build: disable print_content_analysis
|
||||
|
||||
Print Content Analysis enables enterprise users to scan to-be-printed
|
||||
pages and documents for sensitive data if the OnPrintEnterpriseConnector
|
||||
policy is enabled. A conversation with the Chromium team confirmed
|
||||
this feature was intended for enterprise Chrome users and not embedders,
|
||||
so we're disabling it to prevent build issues/additional unneeded files.
|
||||
|
||||
This patch can be removed when enable_print_content_analysis can be more
|
||||
easily enabled or disabled by default with buildflags.
|
||||
|
||||
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
|
||||
index 9382e3ed7dab7fa8992b697759addb43ec55f622..a83508602f5bd5052086d06487e3110409f313af 100644
|
||||
--- a/printing/buildflags/buildflags.gni
|
||||
+++ b/printing/buildflags/buildflags.gni
|
||||
@@ -48,7 +48,7 @@ declare_args() {
|
||||
|
||||
# Enable snapshotting a page when printing for its content to be analyzed for
|
||||
# sensitive content by enterprise users.
|
||||
- enable_print_content_analysis = is_chromeos || is_win || is_linux || is_mac
|
||||
+ enable_print_content_analysis = is_chromeos_ash || is_chromeos_lacros
|
||||
}
|
||||
|
||||
declare_args() {
|
||||
@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 4af5b8d5da1c0ae4c5603f49e3a1dbfec422f55e..d21e450d1ee387a72bbe60141285626042a27a35 100644
|
||||
index c13bf8667c6996ec8ad4a3149993b266cea446bf..da2704e283bbaad9110ca57fb5bef786362c224e 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -189,11 +189,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,10 +33,10 @@ index 4af5b8d5da1c0ae4c5603f49e3a1dbfec422f55e..d21e450d1ee387a72bbe601412856260
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 34cdca093a7fb4cf849c2964e6542558966bf3b1..e0ac5b6c7412a017077c342ef2f3d13cc0123008 100644
|
||||
index 0be27cd41b86673d7c8a4a8d7211a19ad8c8e36c..e67d70e81cbad7520616e5d19565d59dde1491c2 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4793,7 +4793,7 @@ static_library("browser") {
|
||||
@@ -4926,7 +4926,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
@@ -46,10 +46,10 @@ index 34cdca093a7fb4cf849c2964e6542558966bf3b1..e0ac5b6c7412a017077c342ef2f3d13c
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index bfb0033d1536941b52592a834b0c64d15cc1ed2c..2313065706e3c4531dfa8179a8b0ff26266aa7d9 100644
|
||||
index 6870df1cee3431d979f2a729316d6449dbf1bea5..b049528a981b1353d0092b4f8e5cc5ab8ed4e17b 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -7195,9 +7195,12 @@ test("unit_tests") {
|
||||
@@ -7317,9 +7317,12 @@ test("unit_tests") {
|
||||
"//chrome/browser/safe_browsing/incident_reporting/verifier_test:verifier_test_dll_2",
|
||||
]
|
||||
|
||||
@@ -63,7 +63,7 @@ index bfb0033d1536941b52592a834b0c64d15cc1ed2c..2313065706e3c4531dfa8179a8b0ff26
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -8176,6 +8179,10 @@ test("unit_tests") {
|
||||
@@ -8318,6 +8321,10 @@ test("unit_tests") {
|
||||
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
|
||||
]
|
||||
|
||||
@@ -74,7 +74,7 @@ index bfb0033d1536941b52592a834b0c64d15cc1ed2c..2313065706e3c4531dfa8179a8b0ff26
|
||||
sources += [
|
||||
# The importer code is not used on Android.
|
||||
"../common/importer/firefox_importer_utils_unittest.cc",
|
||||
@@ -8245,7 +8252,6 @@ test("unit_tests") {
|
||||
@@ -8394,7 +8401,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user