mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
Compare commits
207 Commits
v19.0.0-be
...
v20.0.0-ni
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ba7dedcc6f | ||
|
|
5ff94e7f2b | ||
|
|
17c8ec765b | ||
|
|
588005a9d5 | ||
|
|
73e0bf973d | ||
|
|
455544dfb6 | ||
|
|
2436152536 | ||
|
|
61374019c0 | ||
|
|
04b33b319b | ||
|
|
97c9451efc | ||
|
|
4e3587c7c6 | ||
|
|
ccde8994b5 | ||
|
|
125c324a49 | ||
|
|
4aba68a59d | ||
|
|
7af0b58c98 | ||
|
|
cc411946d7 | ||
|
|
b06737fdac | ||
|
|
8b5613efcb | ||
|
|
a8103691ac | ||
|
|
142e1f667b | ||
|
|
ff5f66395e | ||
|
|
ba3aca8200 | ||
|
|
d67532ee9f | ||
|
|
4f8a843606 | ||
|
|
dd6ce91f57 | ||
|
|
6f8a36f404 | ||
|
|
c512993744 | ||
|
|
6063d4f8df | ||
|
|
64dc90824b | ||
|
|
79e1881b2a | ||
|
|
a853a6ce9f | ||
|
|
5633c45c19 | ||
|
|
9bcbe70dbe | ||
|
|
e76cf3e2ed | ||
|
|
627c2987ba | ||
|
|
7f5346b954 | ||
|
|
4fc42092b8 | ||
|
|
c8fbabae48 | ||
|
|
b94f25c287 | ||
|
|
5572659988 | ||
|
|
030087c1c7 | ||
|
|
5391211824 | ||
|
|
00368aca37 | ||
|
|
9483e714c4 | ||
|
|
03e68e2efe | ||
|
|
6fea35271c | ||
|
|
dd7dfd7ecd | ||
|
|
3ba60de51d | ||
|
|
1bdbb69351 | ||
|
|
2900bc55aa | ||
|
|
0d35084ada | ||
|
|
0f2da5c830 | ||
|
|
808efd89ed | ||
|
|
0696320d28 | ||
|
|
a401360057 | ||
|
|
d8a7219d07 | ||
|
|
a2a8e493eb | ||
|
|
90eb47f70b | ||
|
|
323f7d4c19 | ||
|
|
706d585eb8 | ||
|
|
5b648854d5 | ||
|
|
2091343b78 | ||
|
|
4fad376b0e | ||
|
|
60f1e5e008 | ||
|
|
349cd98b0a | ||
|
|
747dfe5851 | ||
|
|
658407df7a | ||
|
|
0893733496 | ||
|
|
f887000d50 | ||
|
|
7dee5179cb | ||
|
|
a71936e395 | ||
|
|
e1ed96b574 | ||
|
|
9901d2f281 | ||
|
|
14f07d7814 | ||
|
|
6f851afab5 | ||
|
|
682d2e3f78 | ||
|
|
b55f9d868a | ||
|
|
ce562b6889 | ||
|
|
015185ad5a | ||
|
|
fb534c927a | ||
|
|
192a7fad0d | ||
|
|
097da1d4ba | ||
|
|
b3530d5df8 | ||
|
|
b5297ea8e2 | ||
|
|
15c931201a | ||
|
|
f91b24deb5 | ||
|
|
d2c3e78117 | ||
|
|
a00544c745 | ||
|
|
160d6923db | ||
|
|
6d5501d0bd | ||
|
|
bfabd67112 | ||
|
|
40c022ad69 | ||
|
|
028a72daac | ||
|
|
6a1748da06 | ||
|
|
0a73f60423 | ||
|
|
f48a921d14 | ||
|
|
f3e0517b6e | ||
|
|
53c3dd68b2 | ||
|
|
283e4826af | ||
|
|
e571417c52 | ||
|
|
a5501d7118 | ||
|
|
0c8c755ffb | ||
|
|
bb146e3deb | ||
|
|
33e9bfd99b | ||
|
|
e864bc44c6 | ||
|
|
64517b36ef | ||
|
|
00021a41b1 | ||
|
|
b53118ca28 | ||
|
|
0c864837af | ||
|
|
fec147a0cb | ||
|
|
841e0a4e0c | ||
|
|
31c2b5703a | ||
|
|
6733279037 | ||
|
|
2d0ad04354 | ||
|
|
5ae234d5e1 | ||
|
|
0f087127de | ||
|
|
b9c0166b49 | ||
|
|
fd191fc50b | ||
|
|
37b7e347fc | ||
|
|
9d4aceb940 | ||
|
|
eee4232069 | ||
|
|
635b3a94c8 | ||
|
|
99791f620b | ||
|
|
8b0af86097 | ||
|
|
f5e874cbcb | ||
|
|
dda8bc3cd1 | ||
|
|
233a39dbc9 | ||
|
|
7658edfa1a | ||
|
|
16f8d713ab | ||
|
|
3d4d39d67b | ||
|
|
b66667b843 | ||
|
|
bfbba9dad6 | ||
|
|
341b7bdf4a | ||
|
|
4c4e02318f | ||
|
|
de2f48b40f | ||
|
|
a9c52926c0 | ||
|
|
bfa5b21044 | ||
|
|
d804cd5de2 | ||
|
|
7038d2d418 | ||
|
|
b8c0ef9713 | ||
|
|
c5b93eaf17 | ||
|
|
2ca46058cd | ||
|
|
3057ff0120 | ||
|
|
48edb2c707 | ||
|
|
56ab3d73c6 | ||
|
|
0287c3f511 | ||
|
|
1c53fc4331 | ||
|
|
c0d442364a | ||
|
|
59dd17f2cf | ||
|
|
e8ed9cb4b5 | ||
|
|
c9fd255093 | ||
|
|
caddc83cfe | ||
|
|
a7a5e7fcfd | ||
|
|
207d4e5823 | ||
|
|
8e2310db31 | ||
|
|
6872306117 | ||
|
|
41c1a7e318 | ||
|
|
9d6e6c45c1 | ||
|
|
f711fe6b57 | ||
|
|
94c2a7671c | ||
|
|
4d4682c0e3 | ||
|
|
7fb1c8faad | ||
|
|
ba8e7b9638 | ||
|
|
75ccec7996 | ||
|
|
68d6d8d451 | ||
|
|
0168aede8e | ||
|
|
a05d9be44f | ||
|
|
f95e565884 | ||
|
|
4615fc53ca | ||
|
|
927ab3104d | ||
|
|
cc3743bd43 | ||
|
|
fcbdaab5e3 | ||
|
|
a72acfc535 | ||
|
|
477aa389e6 | ||
|
|
1ada5d7ddf | ||
|
|
dce6c23b33 | ||
|
|
df34d20a21 | ||
|
|
d309558f64 | ||
|
|
128560c4ac | ||
|
|
bff1a37791 | ||
|
|
fcd7dbfa5c | ||
|
|
58386fbf43 | ||
|
|
09251fe24c | ||
|
|
18db9c551d | ||
|
|
c2449c421c | ||
|
|
e28bde9947 | ||
|
|
f287b0b382 | ||
|
|
204b53e7b8 | ||
|
|
0ac6d74536 | ||
|
|
78a3752ade | ||
|
|
9207c2aa68 | ||
|
|
1864edd287 | ||
|
|
9722ca78b2 | ||
|
|
7612df7687 | ||
|
|
cbd06cd25e | ||
|
|
8c8642634d | ||
|
|
afe0116d59 | ||
|
|
b711860d21 | ||
|
|
929fc8bea5 | ||
|
|
a508dce1bf | ||
|
|
f13f07023f | ||
|
|
aac546368f | ||
|
|
c119b1ebef | ||
|
|
df3cfb663c | ||
|
|
a9296229c8 | ||
|
|
9c3b159b95 | ||
|
|
89c1abd1b3 |
@@ -14,8 +14,7 @@ parameters:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
# TODO (vertedinde): migrate this variable to upload-to-az
|
||||
upload-to-s3:
|
||||
upload-to-storage:
|
||||
type: string
|
||||
default: '1'
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ parameters:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
upload-to-s3:
|
||||
upload-to-storage:
|
||||
type: string
|
||||
default: '1'
|
||||
|
||||
@@ -637,9 +637,9 @@ step-electron-publish: &step-electron-publish
|
||||
fi
|
||||
|
||||
cd src/electron
|
||||
if [ "$UPLOAD_TO_S3" == "1" ]; then
|
||||
echo 'Uploading Electron release distribution to S3'
|
||||
script/release/uploaders/upload.py --verbose --upload_to_s3
|
||||
if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
|
||||
echo 'Uploading Electron release distribution to Azure'
|
||||
script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
|
||||
else
|
||||
echo 'Uploading Electron release distribution to Github releases'
|
||||
script/release/uploaders/upload.py --verbose
|
||||
@@ -654,6 +654,7 @@ step-persist-data-for-tests: &step-persist-data-for-tests
|
||||
- src/out/Default/mksnapshot.zip
|
||||
- src/out/Default/chromedriver.zip
|
||||
- src/out/Default/gen/node_headers
|
||||
- src/out/Default/overlapped-checker
|
||||
- src/out/ffmpeg/ffmpeg.zip
|
||||
- src/electron
|
||||
- src/third_party/electron_node
|
||||
@@ -680,13 +681,6 @@ step-electron-dist-unzip: &step-electron-dist-unzip
|
||||
# passed.
|
||||
unzip -:o dist.zip
|
||||
|
||||
step-ffmpeg-unzip: &step-ffmpeg-unzip
|
||||
run:
|
||||
name: Unzip ffmpeg.zip
|
||||
command: |
|
||||
cd src/out/ffmpeg
|
||||
unzip -:o ffmpeg.zip
|
||||
|
||||
step-mksnapshot-unzip: &step-mksnapshot-unzip
|
||||
run:
|
||||
name: Unzip mksnapshot.zip
|
||||
@@ -715,13 +709,6 @@ step-ffmpeg-build: &step-ffmpeg-build
|
||||
cd src
|
||||
ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||
|
||||
step-verify-ffmpeg: &step-verify-ffmpeg
|
||||
run:
|
||||
name: Verify ffmpeg
|
||||
command: |
|
||||
cd src
|
||||
python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
|
||||
|
||||
step-verify-mksnapshot: &step-verify-mksnapshot
|
||||
run:
|
||||
name: Verify mksnapshot
|
||||
@@ -1059,53 +1046,6 @@ steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-cha
|
||||
#Compile ts/js to verify doc change didn't break anything
|
||||
- *step-ts-compile
|
||||
|
||||
steps-native-tests: &steps-native-tests
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-install-python2-on-mac
|
||||
- *step-setup-env-for-build
|
||||
- *step-setup-goma-for-build
|
||||
- *step-wait-for-goma
|
||||
- *step-gn-gen-default
|
||||
|
||||
- run:
|
||||
name: Build tests
|
||||
command: |
|
||||
cd src
|
||||
ninja -C out/Default $BUILD_TARGET
|
||||
- *step-show-goma-stats
|
||||
|
||||
- *step-setup-linux-for-headless-testing
|
||||
- run:
|
||||
name: Run tests
|
||||
command: |
|
||||
mkdir test_results
|
||||
python src/electron/script/native-tests.py run \
|
||||
--config $TESTS_CONFIG \
|
||||
--tests-dir src/out/Default \
|
||||
--output-dir test_results \
|
||||
$TESTS_ARGS
|
||||
|
||||
- store_artifacts:
|
||||
path: test_results
|
||||
destination: test_results # Put it in the root folder.
|
||||
- store_test_results:
|
||||
path: test_results
|
||||
|
||||
steps-verify-ffmpeg: &steps-verify-ffmpeg
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-depot-tools-add-to-path
|
||||
- *step-electron-dist-unzip
|
||||
- *step-ffmpeg-unzip
|
||||
- *step-setup-linux-for-headless-testing
|
||||
|
||||
- *step-verify-ffmpeg
|
||||
- *step-maybe-notify-slack-failure
|
||||
|
||||
steps-tests: &steps-tests
|
||||
steps:
|
||||
- attach_workspace:
|
||||
@@ -1487,7 +1427,7 @@ commands:
|
||||
- *step-electron-build
|
||||
- *step-maybe-electron-dist-strip
|
||||
- step-electron-dist-build:
|
||||
additional-targets: shell_browser_ui_unittests third_party/electron_node:headers electron:hunspell_dictionaries_zip
|
||||
additional-targets: shell_browser_ui_unittests third_party/electron_node:headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip
|
||||
|
||||
- *step-show-goma-stats
|
||||
|
||||
@@ -1747,7 +1687,7 @@ jobs:
|
||||
environment:
|
||||
<<: *env-linux-2xlarge-release
|
||||
<<: *env-release-build
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -1791,7 +1731,7 @@ jobs:
|
||||
<<: *env-release-build
|
||||
<<: *env-32bit-release
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -1844,7 +1784,7 @@ jobs:
|
||||
<<: *env-arm64
|
||||
<<: *env-release-build
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True'
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -1885,14 +1825,14 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
osx-publish-x64-skip-checkout:
|
||||
osx-publish-x64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
environment:
|
||||
<<: *env-mac-large-release
|
||||
<<: *env-release-build
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -1906,7 +1846,7 @@ jobs:
|
||||
attach: true
|
||||
checkout: false
|
||||
|
||||
osx-publish-arm64-skip-checkout:
|
||||
osx-publish-arm64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
@@ -1914,7 +1854,7 @@ jobs:
|
||||
<<: *env-mac-large-release
|
||||
<<: *env-release-build
|
||||
<<: *env-apple-silicon
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -1976,7 +1916,7 @@ jobs:
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
||||
<<: *steps-electron-gn-check
|
||||
|
||||
mas-publish-x64-skip-checkout:
|
||||
mas-publish-x64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
@@ -1984,7 +1924,7 @@ jobs:
|
||||
<<: *env-mac-large-release
|
||||
<<: *env-mas
|
||||
<<: *env-release-build
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
steps:
|
||||
- run: echo running
|
||||
- when:
|
||||
@@ -1997,7 +1937,7 @@ jobs:
|
||||
attach: true
|
||||
checkout: false
|
||||
|
||||
mas-publish-arm64-skip-checkout:
|
||||
mas-publish-arm64:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
@@ -2005,7 +1945,7 @@ jobs:
|
||||
<<: *env-mac-large-release
|
||||
<<: *env-mas-apple-silicon
|
||||
<<: *env-release-build
|
||||
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
|
||||
UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
|
||||
<<: *env-ninja-status
|
||||
steps:
|
||||
- run: echo running
|
||||
@@ -2083,16 +2023,6 @@ jobs:
|
||||
<<: *env-stack-dumping
|
||||
<<: *steps-test-node
|
||||
|
||||
linux-x64-verify-ffmpeg:
|
||||
executor:
|
||||
name: linux-docker
|
||||
size: medium
|
||||
environment:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-headless-testing
|
||||
<<: *env-send-slack-notifications
|
||||
<<: *steps-verify-ffmpeg
|
||||
|
||||
linux-arm-testing-tests:
|
||||
executor: linux-arm
|
||||
environment:
|
||||
@@ -2149,17 +2079,6 @@ jobs:
|
||||
<<: *env-apple-silicon
|
||||
<<: *steps-tests
|
||||
|
||||
# Layer 4: Summary.
|
||||
linux-release-summary:
|
||||
executor:
|
||||
name: linux-docker
|
||||
size: medium
|
||||
environment:
|
||||
<<: *env-linux-medium
|
||||
<<: *env-send-slack-notifications
|
||||
steps:
|
||||
- *step-maybe-notify-slack-success
|
||||
|
||||
# List all workflows
|
||||
workflows:
|
||||
docs-only:
|
||||
@@ -2185,19 +2104,19 @@ workflows:
|
||||
when: << pipeline.parameters.run-macos-publish >>
|
||||
jobs:
|
||||
- mac-checkout
|
||||
- osx-publish-x64-skip-checkout:
|
||||
- osx-publish-x64:
|
||||
requires:
|
||||
- mac-checkout
|
||||
context: release-env
|
||||
- mas-publish-x64-skip-checkout:
|
||||
- mas-publish-x64:
|
||||
requires:
|
||||
- mac-checkout
|
||||
context: release-env
|
||||
- osx-publish-arm64-skip-checkout:
|
||||
- osx-publish-arm64:
|
||||
requires:
|
||||
- mac-checkout
|
||||
context: release-env
|
||||
- mas-publish-arm64-skip-checkout:
|
||||
- mas-publish-arm64:
|
||||
requires:
|
||||
- mac-checkout
|
||||
context: release-env
|
||||
|
||||
16
BUILD.gn
16
BUILD.gn
@@ -79,6 +79,13 @@ if (is_linux) {
|
||||
]
|
||||
}
|
||||
|
||||
# Generates electron_gtk_stubs.h header which contains
|
||||
# stubs for extracting function ptrs from the gtk library.
|
||||
# Function signatures for which stubs are required should be
|
||||
# declared in electron_gtk.sigs, currently this file contains
|
||||
# signatures for the functions used with native file chooser
|
||||
# implementation. In future, this file can be extended to contain
|
||||
# gtk4 stubs to switch gtk version in runtime.
|
||||
generate_stubs("electron_gtk_stubs") {
|
||||
sigs = [ "shell/browser/ui/electron_gtk.sigs" ]
|
||||
extra_header = "shell/browser/ui/electron_gtk.fragment"
|
||||
@@ -359,6 +366,7 @@ source_set("electron_lib") {
|
||||
"shell/common/api:mojo",
|
||||
"//base:base_static",
|
||||
"//base/allocator:buildflags",
|
||||
"//chrome:strings",
|
||||
"//chrome/app:command_ids",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
"//components/autofill/core/common:features",
|
||||
@@ -553,8 +561,8 @@ source_set("electron_lib") {
|
||||
"//ui/base/ime/linux",
|
||||
"//ui/events/devices/x11",
|
||||
"//ui/events/platform/x11",
|
||||
"//ui/gtk",
|
||||
"//ui/views/controls/webview",
|
||||
"//ui/views/linux_ui:linux_ui_factory",
|
||||
"//ui/wm",
|
||||
]
|
||||
if (ozone_platform_x11) {
|
||||
@@ -903,7 +911,10 @@ if (is_mac) {
|
||||
assert(defined(invoker.helper_name_suffix))
|
||||
|
||||
output_name = electron_helper_name + invoker.helper_name_suffix
|
||||
deps = [ ":electron_framework+link" ]
|
||||
deps = [
|
||||
":electron_framework+link",
|
||||
"//base/allocator:early_zone_registration_mac",
|
||||
]
|
||||
if (!is_mas_build) {
|
||||
deps += [ "//sandbox/mac:seatbelt" ]
|
||||
}
|
||||
@@ -1063,6 +1074,7 @@ if (is_mac) {
|
||||
":electron_app_plist",
|
||||
":electron_app_resources",
|
||||
":electron_fuses",
|
||||
"//base/allocator:early_zone_registration_mac",
|
||||
"//electron/buildflags",
|
||||
]
|
||||
if (is_mas_build) {
|
||||
|
||||
9
DEPS
9
DEPS
@@ -2,14 +2,11 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'102.0.5005.40',
|
||||
'103.0.5044.0',
|
||||
'node_version':
|
||||
'v16.14.2',
|
||||
'v16.15.0',
|
||||
'nan_version':
|
||||
# The following commit hash of NAN is v2.14.2 with *only* changes to the
|
||||
# test suite. This should be updated to a specific tag when one becomes
|
||||
# available.
|
||||
'65b32af46e9d7fab2e4ff657751205b3865f4920',
|
||||
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
|
||||
'squirrel.mac_version':
|
||||
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
19.0.0-beta.5
|
||||
20.0.0-nightly.20220520
|
||||
51
appveyor.yml
51
appveyor.yml
@@ -11,7 +11,7 @@
|
||||
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64', 'mips64el'}.
|
||||
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
||||
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
||||
# - "UPLOAD_TO_S3" Set it to '1' upload a release to the S3 bucket.
|
||||
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
||||
# Otherwise the release will be uploaded to the Github Releases.
|
||||
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
||||
#
|
||||
@@ -23,10 +23,6 @@
|
||||
# https://www.appveyor.com/docs/build-configuration/#secure-variables
|
||||
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
|
||||
|
||||
# Uncomment these lines to enable RDP
|
||||
#on_finish:
|
||||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electron-16-core
|
||||
image: vs2019bt-16.16.11
|
||||
@@ -183,34 +179,21 @@ build_script:
|
||||
- ninja -C out/Default third_party/electron_node:headers
|
||||
- python %LOCAL_GOMA_DIR%\goma_ctl.py stat
|
||||
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
||||
- appveyor PushArtifact out/Default/windows_toolchain_profile.json
|
||||
- appveyor PushArtifact out/Default/dist.zip
|
||||
- appveyor PushArtifact out/Default/shell_browser_ui_unittests.exe
|
||||
- appveyor PushArtifact out/Default/chromedriver.zip
|
||||
- appveyor PushArtifact out/ffmpeg/ffmpeg.zip
|
||||
- 7z a node_headers.zip out\Default\gen\node_headers
|
||||
- appveyor PushArtifact node_headers.zip
|
||||
- appveyor PushArtifact out/Default/mksnapshot.zip
|
||||
- appveyor PushArtifact out/Default/hunspell_dictionaries.zip
|
||||
- appveyor PushArtifact out/Default/electron.lib
|
||||
# Temporarily disable symbol generation on 32-bit Windows due to failures
|
||||
- ps: >-
|
||||
if ($env:GN_CONFIG -eq 'release' -And $env:TARGET_ARCH -ne 'ia32') {
|
||||
if ($env:GN_CONFIG -eq 'release') {
|
||||
# Needed for msdia140.dll on 64-bit windows
|
||||
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
|
||||
ninja -C out/Default electron:electron_symbols
|
||||
}
|
||||
- ps: >-
|
||||
if ($env:GN_CONFIG -eq 'release') {
|
||||
if ($env:TARGET_ARCH -ne 'ia32') {
|
||||
python electron\script\zip-symbols.py
|
||||
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
||||
}
|
||||
python electron\script\zip-symbols.py
|
||||
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
||||
} else {
|
||||
# It's useful to have pdb files when debugging testing builds that are
|
||||
# built on CI.
|
||||
7z a pdb.zip out\Default\*.pdb
|
||||
appveyor-retry appveyor PushArtifact pdb.zip
|
||||
}
|
||||
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
|
||||
test_script:
|
||||
@@ -239,14 +222,13 @@ test_script:
|
||||
- echo "Done verifying mksnapshot"
|
||||
- if "%RUN_TESTS%"=="true" ( echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd% )
|
||||
- echo "Done verifying chromedriver"
|
||||
- if exist %cd%\electron.log ( appveyor-retry appveyor PushArtifact %cd%\electron.log )
|
||||
deploy_script:
|
||||
- cd electron
|
||||
- ps: >-
|
||||
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||
if (Test-Path Env:\UPLOAD_TO_S3) {
|
||||
Write-Output "Uploading Electron release distribution to s3"
|
||||
& python script\release\uploaders\upload.py --verbose --upload_to_s3
|
||||
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
||||
Write-Output "Uploading Electron release distribution to azure"
|
||||
& python script\release\uploaders\upload.py --verbose --upload_to_storage
|
||||
} else {
|
||||
Write-Output "Uploading Electron release distribution to github releases"
|
||||
& python script\release\uploaders\upload.py --verbose
|
||||
@@ -255,4 +237,21 @@ deploy_script:
|
||||
node script/release/ci-release-build.js --job=electron-woa-testing --ci=VSTS --armTest --appveyorJobId=$env:APPVEYOR_JOB_ID $env:APPVEYOR_REPO_BRANCH
|
||||
}
|
||||
on_finish:
|
||||
- if exist src\electron\electron.log ( appveyor-retry appveyor PushArtifact src\electron\electron.log )
|
||||
# Uncomment this lines to enable RDP
|
||||
#- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||
- cd ..
|
||||
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
|
||||
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||
- ps: >-
|
||||
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||
appveyor-retry appveyor PushArtifact pdb.zip
|
||||
}
|
||||
|
||||
- if exist electron\electron.log ( appveyor-retry appveyor PushArtifact electron\electron.log )
|
||||
|
||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
||||
root_extra_deps = [ "//electron" ]
|
||||
|
||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/master/doc/abi_version_registry.json
|
||||
node_module_version = 106
|
||||
node_module_version = 107
|
||||
|
||||
v8_promise_internal_field_count = 1
|
||||
v8_embedder_string = "-electron.0"
|
||||
@@ -21,6 +21,9 @@ proprietary_codecs = true
|
||||
ffmpeg_branding = "Chrome"
|
||||
|
||||
enable_basic_printing = true
|
||||
|
||||
# Removes DLLs from the build, which are only meant to be used for Chromium development.
|
||||
# See https://github.com/electron/electron/pull/17985
|
||||
angle_enable_vulkan_validation_layers = false
|
||||
dawn_enable_vulkan_validation_layers = false
|
||||
|
||||
@@ -29,9 +32,16 @@ dawn_enable_vulkan_validation_layers = false
|
||||
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
|
||||
enable_pseudolocales = false
|
||||
|
||||
is_cfi = false
|
||||
|
||||
# Make application name configurable at runtime for cookie crypto
|
||||
allow_runtime_configurable_key_storage = true
|
||||
|
||||
# CET shadow stack is incompatible with v8, until v8 is CET compliant
|
||||
# enabling this flag causes main process crashes where CET is enabled
|
||||
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=357
|
||||
enable_cet_shadow_stack = false
|
||||
|
||||
# For similar reasons, disable CFI, which is not well supported in V8.
|
||||
# Chromium doesn't have any problems with this because they do not run
|
||||
# V8 in the browser process.
|
||||
# Ref: https://source.chromium.org/chromium/chromium/src/+/45fba672185aae233e75d6ddc81ea1e0b30db050:v8/BUILD.gn;l=281
|
||||
is_cfi = false
|
||||
|
||||
@@ -89,6 +89,8 @@ static_library("chrome") {
|
||||
"//chrome/browser/icon_loader_mac.mm",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.h",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm",
|
||||
"//chrome/browser/media/webrtc/window_icon_util_mac.mm",
|
||||
"//chrome/browser/process_singleton_mac.mm",
|
||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
||||
|
||||
@@ -606,6 +606,10 @@ You should seek to use the `steal` option as sparingly as possible.
|
||||
|
||||
Hides all application windows without minimizing them.
|
||||
|
||||
### `app.isHidden()` _macOS_
|
||||
|
||||
Returns `boolean` - `true` if the application—including all of its windows—is hidden (e.g. with `Command-H`), `false` otherwise.
|
||||
|
||||
### `app.show()` _macOS_
|
||||
|
||||
Shows application windows after they were hidden. Does not automatically focus
|
||||
@@ -631,9 +635,18 @@ Returns `string` - The current application directory.
|
||||
* `%APPDATA%` on Windows
|
||||
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
|
||||
* `~/Library/Application Support` on macOS
|
||||
* `userData` The directory for storing your app's configuration files, which by
|
||||
default it is the `appData` directory appended with your app's name.
|
||||
* `cache`
|
||||
* `userData` The directory for storing your app's configuration files, which
|
||||
by default is the `appData` directory appended with your app's name. By
|
||||
convention files storing user data should be written to this directory, and
|
||||
it is not recommended to write large files here because some environments
|
||||
may backup this directory to cloud storage.
|
||||
* `sessionData` The directory for storing data generated by `Session`, such
|
||||
as localStorage, cookies, disk cache, downloaded dictionaries, network
|
||||
state, devtools files. By default this points to `userData`. Chromium may
|
||||
write very large disk cache here, so if your app does not rely on browser
|
||||
storage like localStorage or cookies to save user data, it is recommended
|
||||
to set this directory to other locations to avoid polluting the `userData`
|
||||
directory.
|
||||
* `temp` Temporary directory.
|
||||
* `exe` The current executable file.
|
||||
* `module` The `libchromiumcontent` library.
|
||||
@@ -683,9 +696,9 @@ In that case, the directory should be created with `fs.mkdirSync` or similar.
|
||||
|
||||
You can only override paths of a `name` defined in `app.getPath`.
|
||||
|
||||
By default, web pages' cookies and caches will be stored under the `userData`
|
||||
By default, web pages' cookies and caches will be stored under the `sessionData`
|
||||
directory. If you want to change this location, you have to override the
|
||||
`userData` path before the `ready` event of the `app` module is emitted.
|
||||
`sessionData` path before the `ready` event of the `app` module is emitted.
|
||||
|
||||
### `app.getVersion()`
|
||||
|
||||
|
||||
@@ -11,6 +11,9 @@ relative to its owning window. It is meant to be an alternative to the
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
This module cannot be used until the `ready` event of the `app`
|
||||
module is emitted.
|
||||
|
||||
### Example
|
||||
|
||||
```javascript
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
|
||||
Process: [Main](../glossary.md#main-process)
|
||||
|
||||
This module cannot be used until the `ready` event of the `app`
|
||||
module is emitted.
|
||||
|
||||
```javascript
|
||||
// In the main process.
|
||||
const { BrowserWindow } = require('electron')
|
||||
|
||||
@@ -35,7 +35,7 @@ page you load in your renderer executes code in this world.
|
||||
|
||||
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
|
||||
"Isolated World". You can read more about context isolation and what it affects in the
|
||||
[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs.
|
||||
[security](../tutorial/security.md#3-enable-context-isolation) docs.
|
||||
|
||||
## Methods
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ The `safeStorage` module has the following methods:
|
||||
|
||||
Returns `boolean` - Whether encryption is available.
|
||||
|
||||
On Linux, returns true if the secret key is
|
||||
available. On MacOS, returns true if Keychain is available.
|
||||
On Linux, returns true if the app has emitted the `ready` event and the secret key is available.
|
||||
On MacOS, returns true if Keychain is available.
|
||||
On Windows, returns true once the app has emitted the `ready` event.
|
||||
|
||||
### `safeStorage.encryptString(plainText)`
|
||||
|
||||
@@ -253,9 +253,11 @@ Returns:
|
||||
* `device` [HIDDevice[]](structures/hid-device.md)
|
||||
* `frame` [WebFrameMain](web-frame-main.md)
|
||||
|
||||
Emitted when a new HID device becomes available. For example, when a new USB device is plugged in.
|
||||
|
||||
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
|
||||
Emitted after `navigator.hid.requestDevice` has been called and
|
||||
`select-hid-device` has fired if a new device becomes available before
|
||||
the callback from `select-hid-device` is called. This event is intended for
|
||||
use when using a UI to ask users to pick a device so that the UI can be updated
|
||||
with the newly added device.
|
||||
|
||||
#### Event: 'hid-device-removed'
|
||||
|
||||
@@ -266,9 +268,11 @@ Returns:
|
||||
* `device` [HIDDevice[]](structures/hid-device.md)
|
||||
* `frame` [WebFrameMain](web-frame-main.md)
|
||||
|
||||
Emitted when a HID device has been removed. For example, this event will fire when a USB device is unplugged.
|
||||
|
||||
This event will only be emitted after `navigator.hid.requestDevice` has been called and `select-hid-device` has fired.
|
||||
Emitted after `navigator.hid.requestDevice` has been called and
|
||||
`select-hid-device` has fired if a device has been removed before the callback
|
||||
from `select-hid-device` is called. This event is intended for use when using
|
||||
a UI to ask users to pick a device so that the UI can be updated to remove the
|
||||
specified device.
|
||||
|
||||
#### Event: 'select-serial-port'
|
||||
|
||||
@@ -348,7 +352,11 @@ Returns:
|
||||
* `port` [SerialPort](structures/serial-port.md)
|
||||
* `webContents` [WebContents](web-contents.md)
|
||||
|
||||
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a new serial port becomes available. For example, this event will fire when a new USB device is plugged in.
|
||||
Emitted after `navigator.serial.requestPort` has been called and
|
||||
`select-serial-port` has fired if a new serial port becomes available before
|
||||
the callback from `select-serial-port` is called. This event is intended for
|
||||
use when using a UI to ask users to pick a port so that the UI can be updated
|
||||
with the newly added port.
|
||||
|
||||
#### Event: 'serial-port-removed'
|
||||
|
||||
@@ -358,7 +366,11 @@ Returns:
|
||||
* `port` [SerialPort](structures/serial-port.md)
|
||||
* `webContents` [WebContents](web-contents.md)
|
||||
|
||||
Emitted after `navigator.serial.requestPort` has been called and `select-serial-port` has fired if a serial port has been removed. For example, this event will fire when a USB device is unplugged.
|
||||
Emitted after `navigator.serial.requestPort` has been called and
|
||||
`select-serial-port` has fired if a serial port has been removed before the
|
||||
callback from `select-serial-port` is called. This event is intended for use
|
||||
when using a UI to ask users to pick a port so that the UI can be updated
|
||||
to remove the specified port.
|
||||
|
||||
### Instance Methods
|
||||
|
||||
|
||||
@@ -556,7 +556,7 @@ Stops any `findInPage` request for the `webview` with the provided `action`.
|
||||
* `header` string (optional) - string to be printed as page header.
|
||||
* `footer` string (optional) - string to be printed as page footer.
|
||||
* `pageSize` string | Size (optional) - Specify page size of the printed document. Can be `A3`,
|
||||
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height`.
|
||||
`A4`, `A5`, `Legal`, `Letter`, `Tabloid` or an Object containing `height` in microns.
|
||||
|
||||
Returns `Promise<void>`
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ value.
|
||||
In Electron 12, `contextIsolation` will be enabled by default. To restore
|
||||
the previous behavior, `contextIsolation: false` must be specified in WebPreferences.
|
||||
|
||||
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application.
|
||||
We [recommend having contextIsolation enabled](tutorial/security.md#3-enable-context-isolation) for the security of your application.
|
||||
|
||||
Another implication is that `require()` cannot be used in the renderer process unless
|
||||
`nodeIntegration` is `true` and `contextIsolation` is `false`.
|
||||
|
||||
@@ -8,20 +8,24 @@ function createWindow () {
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('select-hid-device', (event, details, callback) => {
|
||||
//Add events to handle devices being added or removed before the callback on
|
||||
//`select-hid-device` is called.
|
||||
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
|
||||
console.log('hid-device-added FIRED WITH', device)
|
||||
//Optionally update details.deviceList
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
|
||||
console.log('hid-device-removed FIRED WITH', device)
|
||||
//Optionally update details.deviceList
|
||||
})
|
||||
|
||||
event.preventDefault()
|
||||
if (details.deviceList && details.deviceList.length > 0) {
|
||||
callback(details.deviceList[0].deviceId)
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('hid-device-added', (event, device) => {
|
||||
console.log('hid-device-added FIRED WITH', device)
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('hid-device-removed', (event, device) => {
|
||||
console.log('hid-device-removed FIRED WITH', device)
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||
if (permission === 'hid' && details.securityOrigin === 'file:///') {
|
||||
return true
|
||||
|
||||
@@ -8,6 +8,19 @@ function createWindow () {
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('select-serial-port', (event, portList, webContents, callback) => {
|
||||
|
||||
//Add listeners to handle ports being added or removed before the callback for `select-serial-port`
|
||||
//is called.
|
||||
mainWindow.webContents.session.on('serial-port-added', (event, port) => {
|
||||
console.log('serial-port-added FIRED WITH', port)
|
||||
//Optionally update portList to add the new port
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('serial-port-removed', (event, port) => {
|
||||
console.log('serial-port-removed FIRED WITH', port)
|
||||
//Optionally update portList to remove the port
|
||||
})
|
||||
|
||||
event.preventDefault()
|
||||
if (portList && portList.length > 0) {
|
||||
callback(portList[0].portId)
|
||||
@@ -16,14 +29,6 @@ function createWindow () {
|
||||
}
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('serial-port-added', (event, port) => {
|
||||
console.log('serial-port-added FIRED WITH', port)
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.on('serial-port-removed', (event, port) => {
|
||||
console.log('serial-port-removed FIRED WITH', port)
|
||||
})
|
||||
|
||||
mainWindow.webContents.session.setPermissionCheckHandler((webContents, permission, requestingOrigin, details) => {
|
||||
if (permission === 'serial' && details.securityOrigin === 'file:///') {
|
||||
return true
|
||||
|
||||
@@ -36,8 +36,10 @@ the WebHID API:
|
||||
can be used to select a HID device when a call to
|
||||
`navigator.hid.requestDevice` is made. Additionally the [`hid-device-added`](../api/session.md#event-hid-device-added)
|
||||
and [`hid-device-removed`](../api/session.md#event-hid-device-removed) events
|
||||
on the Session can be used to handle devices being plugged in or unplugged during the
|
||||
`navigator.hid.requestDevice` process.
|
||||
on the Session can be used to handle devices being plugged in or unplugged
|
||||
when handling the `select-hid-device` event.
|
||||
**Note:** These events only fire until the callback from `select-hid-device`
|
||||
is called. They are not intended to be used as a generic hid device listener.
|
||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
can be used to provide default permissioning to devices without first calling
|
||||
for permission to devices via `navigator.hid.requestDevice`. Additionally,
|
||||
@@ -82,8 +84,11 @@ There are several additional APIs for working with the Web Serial API:
|
||||
|
||||
* The [`serial-port-added`](../api/session.md#event-serial-port-added)
|
||||
and [`serial-port-removed`](../api/session.md#event-serial-port-removed) events
|
||||
on the Session can be used to handle devices being plugged in or unplugged during the
|
||||
`navigator.serial.requestPort` process.
|
||||
on the Session can be used to handle devices being plugged in or unplugged
|
||||
when handling the `select-serial-port` event.
|
||||
**Note:** These events only fire until the callback from `select-serial-port`
|
||||
is called. They are not intended to be used as a generic serial port
|
||||
listener.
|
||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
can be used to provide default permissioning to devices without first calling
|
||||
for permission to devices via `navigator.serial.requestPort`. Additionally,
|
||||
|
||||
@@ -22,11 +22,12 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
| 12.0.0 | -- | 2020-Nov-19 | 2021-Mar-02 | M89 | v14.16 | 🚫 |
|
||||
| 13.0.0 | -- | 2021-Mar-04 | 2021-May-25 | M91 | v14.16 | 🚫 |
|
||||
| 14.0.0 | -- | 2021-May-27 | 2021-Aug-31 | M93 | v14.17 | 🚫 |
|
||||
| 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | M94 | v16.5 | ✅ |
|
||||
| 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | M96 | v16.9 | ✅ |
|
||||
| 15.0.0 | 2021-Jul-20 | 2021-Sep-01 | 2021-Sep-21 | M94 | v16.5 | 🚫 |
|
||||
| 16.0.0 | 2021-Sep-23 | 2021-Oct-20 | 2021-Nov-16 | M96 | v16.9 | 🚫 |
|
||||
| 17.0.0 | 2021-Nov-18 | 2022-Jan-06 | 2022-Feb-01 | M98 | v16.13 | ✅ |
|
||||
| 18.0.0 | 2022-Feb-03 | 2022-Mar-03 | 2022-Mar-29 | M100 | v16.13 | ✅ |
|
||||
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | TBD | ✅ |
|
||||
| 19.0.0 | 2022-Mar-31 | 2022-Apr-26 | 2022-May-24 | M102 | v16.14 | ✅ |
|
||||
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | M104 | TBD | ✅ |
|
||||
|
||||
**Notes:**
|
||||
|
||||
|
||||
@@ -116,7 +116,7 @@ inAppPurchase.getProducts(PRODUCT_IDS).then(products => {
|
||||
console.log(`The price of ${product.localizedTitle} is ${product.formattedPrice}.`)
|
||||
})
|
||||
|
||||
// Ask the user which product he/she wants to purchase.
|
||||
// Ask the user which product they want to purchase.
|
||||
const selectedProduct = products[0]
|
||||
const selectedQuantity = 1
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ app.on('window-all-closed', () => {
|
||||
```js
|
||||
// preload.js
|
||||
|
||||
// All of the Node.js APIs are available in the preload process.
|
||||
// All the Node.js APIs are available in the preload process.
|
||||
// It has the same sandbox as a Chrome extension.
|
||||
window.addEventListener('DOMContentLoaded', () => {
|
||||
const replaceText = (selector, text) => {
|
||||
|
||||
@@ -99,7 +99,7 @@ You should at least follow these steps to improve the security of your applicati
|
||||
|
||||
1. [Only load secure content](#1-only-load-secure-content)
|
||||
2. [Disable the Node.js integration in all renderers that display remote content](#2-do-not-enable-nodejs-integration-for-remote-content)
|
||||
3. [Enable context isolation in all renderers that display remote content](#3-enable-context-isolation-for-remote-content)
|
||||
3. [Enable context isolation in all renderers](#3-enable-context-isolation)
|
||||
4. [Enable process sandboxing](#4-enable-process-sandboxing)
|
||||
5. [Use `ses.setPermissionRequestHandler()` in all sessions that load remote content](#5-handle-session-permission-requests-from-remote-content)
|
||||
6. [Do not disable `webSecurity`](#6-do-not-disable-websecurity)
|
||||
@@ -225,7 +225,7 @@ do consume Node.js modules or features. Preload scripts continue to have access
|
||||
to `require` and other Node.js features, allowing developers to expose a custom
|
||||
API to remotely loaded content via the [contextBridge API](../api/context-bridge.md).
|
||||
|
||||
### 3. Enable Context Isolation for remote content
|
||||
### 3. Enable Context Isolation
|
||||
|
||||
:::info
|
||||
This recommendation is the default behavior in Electron since 12.0.0.
|
||||
|
||||
@@ -54,6 +54,8 @@ template("electron_extra_paks") {
|
||||
])
|
||||
output = "${invoker.output_dir}/resources.pak"
|
||||
sources = [
|
||||
"$root_gen_dir/chrome/browser_resources.pak",
|
||||
"$root_gen_dir/chrome/common_resources.pak",
|
||||
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
|
||||
"$root_gen_dir/components/components_resources.pak",
|
||||
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
|
||||
@@ -69,6 +71,8 @@ template("electron_extra_paks") {
|
||||
]
|
||||
deps = [
|
||||
"//chrome/browser:dev_ui_browser_resources",
|
||||
"//chrome/browser:resources",
|
||||
"//chrome/common:resources",
|
||||
"//components/resources",
|
||||
"//content:content_resources",
|
||||
"//content:dev_ui_content_resources",
|
||||
@@ -172,20 +176,28 @@ template("electron_paks") {
|
||||
}
|
||||
|
||||
source_patterns = [
|
||||
"${root_gen_dir}/chrome/locale_settings_",
|
||||
"${root_gen_dir}/chrome/platform_locale_settings_",
|
||||
"${root_gen_dir}/chrome/generated_resources_",
|
||||
"${root_gen_dir}/components/strings/components_locale_settings_",
|
||||
"${root_gen_dir}/components/strings/components_strings_",
|
||||
"${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
|
||||
"${root_gen_dir}/extensions/strings/extensions_strings_",
|
||||
"${root_gen_dir}/services/strings/services_strings_",
|
||||
"${root_gen_dir}/third_party/blink/public/strings/blink_accessibility_strings_",
|
||||
"${root_gen_dir}/third_party/blink/public/strings/blink_strings_",
|
||||
"${root_gen_dir}/device/bluetooth/strings/bluetooth_strings_",
|
||||
"${root_gen_dir}/services/strings/services_strings_",
|
||||
"${root_gen_dir}/ui/strings/app_locale_settings_",
|
||||
"${root_gen_dir}/ui/strings/ax_strings_",
|
||||
"${root_gen_dir}/ui/strings/ui_strings_",
|
||||
]
|
||||
deps = [
|
||||
"//chrome/app:generated_resources",
|
||||
"//chrome/app/resources:locale_settings",
|
||||
"//chrome/app/resources:platform_locale_settings",
|
||||
"//components/strings:components_locale_settings",
|
||||
"//components/strings:components_strings",
|
||||
"//device/bluetooth/strings",
|
||||
"//extensions/strings",
|
||||
"//services/strings",
|
||||
"//third_party/blink/public/strings",
|
||||
"//third_party/blink/public/strings:accessibility_strings",
|
||||
|
||||
@@ -11,15 +11,8 @@
|
||||
<output filename="electron_resources.pak" type="data_package" />
|
||||
</outputs>
|
||||
<release seq="1" allow_pseudo="false">
|
||||
<messages fallback_to_english="true">
|
||||
<!-- TODO(deepak1556): Add translations,
|
||||
check https://www.chromium.org/developers/design-documents/ui-localization -->
|
||||
<part file="electron_strings.grdp" />
|
||||
</messages>
|
||||
<includes>
|
||||
<include name="IDR_CONTENT_SHELL_DEVTOOLS_DISCOVERY_PAGE" file="${target_gen_dir}/shell_devtools_discovery_page.html" use_base_dir="false" type="BINDATA" />
|
||||
<include name="IDR_PDF_MANIFEST" file="../chrome/browser/resources/pdf/manifest.json" type="BINDATA" />
|
||||
<include name="IDR_CRYPTOTOKEN_MANIFEST" file="../chrome/browser/resources/cryptotoken/manifest.json" type="BINDATA" />
|
||||
</includes>
|
||||
</release>
|
||||
</grit>
|
||||
|
||||
@@ -1,160 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<grit-part>
|
||||
<!-- Windows Caption Buttons -->
|
||||
<message name="IDS_APP_ACCNAME_CLOSE" desc="The accessible name for the Close button.">
|
||||
Close
|
||||
</message>
|
||||
<message name="IDS_APP_ACCNAME_MINIMIZE" desc="The accessible name for the Minimize button.">
|
||||
Minimize
|
||||
</message>
|
||||
<message name="IDS_APP_ACCNAME_MAXIMIZE" desc="The accessible name for the Maximize button.">
|
||||
Maximize
|
||||
</message>
|
||||
<message name="IDS_APP_ACCNAME_RESTORE" desc="The accessible name for the Restore button.">
|
||||
Restore
|
||||
</message>
|
||||
|
||||
<!-- Printing Service -->
|
||||
<message name="IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME" desc="The name of the utility process used for printing conversions.">
|
||||
Printing Service
|
||||
</message>
|
||||
<message name="IDS_PRINT_INVALID_PRINTER_SETTINGS" desc="Message to display when selected printer is not reachable or its settings are invalid.">
|
||||
The selected printer is not available or not installed correctly. <ph name="BR"><br></ph> Check your printer or try selecting another printer.
|
||||
</message>
|
||||
<message name="IDS_DEFAULT_PRINT_DOCUMENT_TITLE" desc="Default title for a print document">
|
||||
Untitled Document
|
||||
</message>
|
||||
|
||||
<!-- Desktop Capturer API -->
|
||||
<message name="IDS_DESKTOP_MEDIA_PICKER_SINGLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there is only one monitor.">
|
||||
Entire Screen
|
||||
</message>
|
||||
<message name="IDS_DESKTOP_MEDIA_PICKER_MULTIPLE_SCREEN_NAME" desc="Name for screens in the desktop media picker UI when there are multiple monitors.">
|
||||
{SCREEN_INDEX, plural, =1{Screen #} other{Screen #}}
|
||||
</message>
|
||||
|
||||
<!-- File Select Helper-->
|
||||
<message name="IDS_IMAGE_FILES" desc="The description of the image file extensions in the select file dialog.">
|
||||
Image Files
|
||||
</message>
|
||||
<message name="IDS_AUDIO_FILES" desc="The description of the audio file extensions in the select file dialog.">
|
||||
Audio Files
|
||||
</message>
|
||||
<message name="IDS_VIDEO_FILES" desc="The description of the video file extensions in the select file dialog.">
|
||||
Video Files
|
||||
</message>
|
||||
<message name="IDS_CUSTOM_FILES" desc="The description of the custom file extensions in the select file dialog.">
|
||||
Custom Files
|
||||
</message>
|
||||
<message name="IDS_DEFAULT_DOWNLOAD_FILENAME" desc="Default name for downloaded files when we have no idea what they could be.">
|
||||
download
|
||||
</message>
|
||||
|
||||
<!-- Picture-in-Picture -->
|
||||
<if expr="is_macosx">
|
||||
<message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
|
||||
Picture in Picture
|
||||
</message>
|
||||
</if>
|
||||
<if expr="not is_macosx">
|
||||
<message name="IDS_PICTURE_IN_PICTURE_TITLE_TEXT" desc="Title of the Picture-in-Picture window. This appears in the system tray and window header.">
|
||||
Picture in picture
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_PAUSE_CONTROL_TEXT" desc="Text label of the pause control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently playing.">
|
||||
Pause
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_PLAY_CONTROL_TEXT" desc="Text label of the play control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently paused.">
|
||||
Play
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_REPLAY_CONTROL_TEXT" desc="Text label of the replay control button. The button appears when the user hovers over the Picture-in-Picture window and the video is ended.">
|
||||
Play from the beginning
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_BACK_TO_TAB_CONTROL_TEXT" desc="Text label of the back to tab control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Back to video player
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently unmuted.">
|
||||
Mute
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_UNMUTE_CONTROL_TEXT" desc="Text label of the mute control button. The button appears when the user hovers over the Picture-in-Picture window and the video is currently muted.">
|
||||
Unmute
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_SKIP_AD_CONTROL_TEXT" desc="Text label of the skip ad control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Skip Ad
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_MUTE_MICROPHONE_TEXT" desc="Text label of the mute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Mute microphone
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_UNMUTE_MICROPHONE_TEXT" desc="Text label of the unmute microphone control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Unmute microphone
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_TURN_ON_CAMERA_TEXT" desc="Text label of the turn on camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Turn on camera
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_TURN_OFF_CAMERA_TEXT" desc="Text label of the turn off camera control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Turn off camera
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_HANG_UP_TEXT" desc="Text label of the hang up control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Hang up
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_CLOSE_CONTROL_TEXT" desc="Text label of the close control button. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Close
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_RESIZE_HANDLE_TEXT" desc="Text label of the resize handle. The button appears when the user hovers over the Picture-in-Picture window.">
|
||||
Resize
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_PLAY_PAUSE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles between play and pause controls.">
|
||||
Toggle video to play or pause
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_MUTE_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button toggles mute state.">
|
||||
Toggle mute
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_NEXT_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes next track action.">
|
||||
Next track
|
||||
</message>
|
||||
<message name="IDS_PICTURE_IN_PICTURE_PREVIOUS_TRACK_CONTROL_ACCESSIBLE_TEXT" desc="Accessible text label used for the controls button in the Picture-in-Picture window. The button invokes previous track action.">
|
||||
Previous track
|
||||
</message>
|
||||
<message name="IDS_SPELLCHECK_DICTIONARY" use_name_for_id="true">
|
||||
en-US
|
||||
</message>
|
||||
<message name="IDS_ACCEPT_LANGUAGES" use_name_for_id="true">
|
||||
en-US,en
|
||||
</message>
|
||||
<if expr="is_win">
|
||||
<message name="IDS_UTILITY_PROCESS_UTILITY_WIN_NAME" desc="The name of the utility process used to handle Windows utility operations.">
|
||||
Windows Utilities
|
||||
</message>
|
||||
</if>
|
||||
<message name="IDS_DOWNLOAD_MORE_ACTIONS"
|
||||
desc="Tooltip of a button on the downloads page that shows a menu with actions like 'Open downloads folder' or 'Clear all'">
|
||||
More actions
|
||||
</message>
|
||||
<!-- Badging -->
|
||||
<message name="IDS_SATURATED_BADGE_CONTENT" desc="The content to display when the application's badge is too large to display to indicate that the badge is more than a given maximum. This string should be as short as possible, preferably only one character beyond the content">
|
||||
<ph name="MAXIMUM_VALUE">$1<ex>99</ex></ph>+
|
||||
</message>
|
||||
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS_SATURATED" desc="The accessibility text which will be read by a screen reader when the notification count is too large to display (e.g. greater than 99).">
|
||||
{MAX_UNREAD_NOTIFICATIONS, plural, =1 {More than 1 unread notification} other {More than # unread notifications}}
|
||||
</message>
|
||||
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS_UNSPECIFIED" desc="The accessibility text which will be read by a screen reader when there are some unspecified number of notifications, or user attention is required">
|
||||
Unread Notifications
|
||||
</message>
|
||||
<message name="IDS_BADGE_UNREAD_NOTIFICATIONS" desc="The accessibility text which will be read by a screen reader when there are notifcatications">
|
||||
{UNREAD_NOTIFICATIONS, plural, =1 {1 Unread Notification} other {# Unread Notifications}}
|
||||
</message>
|
||||
<message name="IDS_HID_CHOOSER_ITEM_WITHOUT_NAME" desc="User option displaying the device IDs for a Human Interface Device (HID) without a device name.">
|
||||
Unknown Device (<ph name="DEVICE_ID">$1<ex>1234:abcd</ex></ph>) </message>
|
||||
<if expr="is_win">
|
||||
<then>
|
||||
<message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for a graphic (image) on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
|
||||
Unlabeled graphic
|
||||
</message>
|
||||
</then>
|
||||
<else>
|
||||
<message name="IDS_AX_UNLABELED_IMAGE_ROLE_DESCRIPTION" desc="Accessibility role description for an image on a web page or PDF that does not have a description for blind users." is_accessibility_with_no_ui="true">
|
||||
Unlabeled image
|
||||
</message>
|
||||
</else>
|
||||
</if>
|
||||
</grit-part>
|
||||
@@ -36,17 +36,14 @@ const discardableDuplicateHeaders = new Set([
|
||||
]);
|
||||
|
||||
class IncomingMessage extends Readable {
|
||||
_shouldPush: boolean;
|
||||
_data: (Buffer | null)[];
|
||||
_shouldPush: boolean = false;
|
||||
_data: (Buffer | null)[] = [];
|
||||
_responseHead: NodeJS.ResponseHead;
|
||||
_resume: (() => void) | null;
|
||||
_resume: (() => void) | null = null;
|
||||
|
||||
constructor (responseHead: NodeJS.ResponseHead) {
|
||||
super();
|
||||
this._shouldPush = false;
|
||||
this._data = [];
|
||||
this._responseHead = responseHead;
|
||||
this._resume = null;
|
||||
}
|
||||
|
||||
get statusCode () {
|
||||
|
||||
@@ -78,6 +78,19 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
|
||||
...browserWindowOptions
|
||||
});
|
||||
|
||||
if (!guest) {
|
||||
// When we open a new window from a link (via OpenURLFromTab),
|
||||
// the browser process is responsible for initiating navigation
|
||||
// in the new window.
|
||||
window.loadURL(url, {
|
||||
httpReferrer: referrer,
|
||||
...(postData && {
|
||||
postData,
|
||||
extraHeaders: formatPostDataHeaders(postData as Electron.UploadRawData[])
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
handleWindowLifecycleEvents({ embedder, frameName, guest: window, outlivesOpener });
|
||||
|
||||
embedder.emit('did-create-window', window, { url, frameName, options: browserWindowOptions, disposition, referrer, postData });
|
||||
@@ -243,6 +256,15 @@ export function makeWebPreferences ({ embedder, secureOverrideWebPreferences = {
|
||||
};
|
||||
}
|
||||
|
||||
function formatPostDataHeaders (postData: PostData) {
|
||||
if (!postData) return;
|
||||
|
||||
const { contentType, boundary } = parseContentTypeFormat(postData);
|
||||
if (boundary != null) { return `content-type: ${contentType}; boundary=${boundary}`; }
|
||||
|
||||
return `content-type: ${contentType}`;
|
||||
}
|
||||
|
||||
const MULTIPART_CONTENT_TYPE = 'multipart/form-data';
|
||||
const URL_ENCODED_CONTENT_TYPE = 'application/x-www-form-urlencoded';
|
||||
|
||||
|
||||
@@ -70,17 +70,8 @@ function isInstalled () {
|
||||
|
||||
// unzips and makes path.txt point at the correct executable
|
||||
function extractFile (zipPath) {
|
||||
return new Promise((resolve, reject) => {
|
||||
extract(zipPath, { dir: path.join(__dirname, 'dist') }, err => {
|
||||
if (err) return reject(err);
|
||||
|
||||
fs.writeFile(path.join(__dirname, 'path.txt'), platformPath, err => {
|
||||
if (err) return reject(err);
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
return extract(zipPath, { dir: path.join(__dirname, 'dist') })
|
||||
.then(() => fs.promises.writeFile(path.join(__dirname, 'path.txt'), platformPath));
|
||||
}
|
||||
|
||||
function getPlatformPath () {
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
"dependencies": {
|
||||
"@electron/get": "^1.14.1",
|
||||
"@types/node": "^16.11.26",
|
||||
"extract-zip": "^1.0.3"
|
||||
"extract-zip": "^2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.6"
|
||||
"node": ">= 10.17.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "19.0.0-beta.5",
|
||||
"version": "20.0.0-nightly.20220520",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
@@ -141,5 +141,8 @@
|
||||
"DEPS": [
|
||||
"node script/gen-hunspell-filenames.js"
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac"
|
||||
}
|
||||
}
|
||||
@@ -21,15 +21,11 @@ resource_file_conflict.patch
|
||||
scroll_bounce_flag.patch
|
||||
mas_blink_no_private_api.patch
|
||||
mas_no_private_api.patch
|
||||
mas-cfisobjc.patch
|
||||
mas-cgdisplayusesforcetogray.patch
|
||||
mas-audiodeviceduck.patch
|
||||
mas_disable_remote_layer.patch
|
||||
mas_disable_remote_accessibility.patch
|
||||
mas_disable_custom_window_frame.patch
|
||||
mas_avoid_usage_of_abort_report_np.patch
|
||||
mas_avoid_usage_of_pthread_fchdir_np.patch
|
||||
mas_avoid_usage_of_setapplicationisdaemon_and.patch
|
||||
mas_avoid_usage_of_private_macos_apis.patch
|
||||
mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch
|
||||
chrome_key_systems.patch
|
||||
add_didinstallconditionalfeatures.patch
|
||||
@@ -58,7 +54,6 @@ feat_add_set_theme_source_to_allow_apps_to.patch
|
||||
add_webmessageportconverter_entangleandinjectmessageportchannel.patch
|
||||
ignore_rc_check.patch
|
||||
remove_usage_of_incognito_apis_in_the_spellchecker.patch
|
||||
chore_use_electron_resources_not_chrome_for_spellchecker.patch
|
||||
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
|
||||
@@ -80,7 +75,6 @@ skip_atk_toolchain_check.patch
|
||||
worker_feat_add_hook_to_notify_script_ready.patch
|
||||
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
|
||||
fix_properly_honor_printing_page_ranges.patch
|
||||
fix_use_electron_generated_resources.patch
|
||||
chore_expose_v8_initialization_isolate_callbacks.patch
|
||||
export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
|
||||
fix_export_zlib_symbols.patch
|
||||
@@ -102,7 +96,6 @@ chore_do_not_use_chrome_windows_in_cryptotoken_webrequestsender.patch
|
||||
process_singleton.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
add_ui_scopedcliboardwriter_writeunsaferawdata.patch
|
||||
mas_gate_private_enterprise_APIs.patch
|
||||
load_v8_snapshot_in_browser_process.patch
|
||||
fix_patch_out_permissions_checks_in_exclusive_access.patch
|
||||
fix_aspect_ratio_with_max_size.patch
|
||||
@@ -116,4 +109,3 @@ 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
|
||||
feat_move_firstpartysets_to_content_browser_client.patch
|
||||
|
||||
@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
|
||||
3. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index 2468b2c5881821d6f8e24a0e7c42243427b384ad..7e44c97edabf5ae012ff4f84d1404d8f223a13fe 100644
|
||||
index 783202623cc15168c726180fe232751551c43798..7cf5449a61a31bebbaffd920129daf1866211d7c 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 660c5f35c6095b23cc483c8eb1c119c215dc681d..961c0d7f7a9fe5f9e130998aeb0c872c571b710e 100644
|
||||
index e0ff6fae1e96699e7cb54c9e82a3c68a8e95602b..2179a906bb6c93fbfaa8e7b7e64fddfaab034e94 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -240,6 +240,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -241,6 +241,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 660c5f35c6095b23cc483c8eb1c119c215dc681d..961c0d7f7a9fe5f9e130998aeb0c872c
|
||||
// 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
|
||||
@@ -346,7 +350,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -347,7 +351,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
GpuProcess gpu_process(io_thread_priority);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ index eb6f4c87c4479d5f4fb8e3f85a231fb9cc744a63..11298b413021b4d438195482db253a93
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index f217de19126feeeafee01b2be31ced936696ce20..95966ce7f0eeb0a7f2822bef69b540ac6bfe298d 100644
|
||||
index abcd95ad39d8d66e1a7149e89bc6bfe2a8197d19..1b021461f214287c94fb22b17d980c19e3f07dde 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4489,6 +4489,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -79,10 +79,10 @@ index a6ba8411384855c82712960375bc949c5c2bd522..fc86ca807c9c1bda9236160580b09415
|
||||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index f36d04ff77481bd30e0de3f6d45c54dfece4067c..d30f569cd68716b9e963cf0fb5da3f7e65cc215a 100644
|
||||
index 810726792cba326f66df5a8d0d833eaee4975594..635fb45b0a9d1716bd45d8b6c5dbc5f9fbf0ffa8 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -303,6 +303,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,10 +92,10 @@ index f36d04ff77481bd30e0de3f6d45c54dfece4067c..d30f569cd68716b9e963cf0fb5da3f7e
|
||||
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 5a83dcdf50acc27da2b1fbb3e515cb4316305a3a..86f31acc40a2dd296c34f3ecf5ef6ccd97cbc18c 100644
|
||||
index 772748673a5854349ba2be28abe21b7ff3f8541f..b3ebd622a61187f718ca16ac8cfeb189d35584d2 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
|
||||
@@ -275,6 +275,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -273,6 +273,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ index 5a83dcdf50acc27da2b1fbb3e515cb4316305a3a..86f31acc40a2dd296c34f3ecf5ef6ccd
|
||||
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 ac81fdc1ac99ca02458a10c0d258b846a8a9955e..ed838db2474790437ff4b57e23a1e289afce4d47 100644
|
||||
index 200f0c57df1f15428b45a228adfee8fd5465ecbf..ec8cad0a94b31561096fdaba1a75fb54c96d3f7e 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
|
||||
@@ -80,6 +80,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -123,10 +123,10 @@ index ac81fdc1ac99ca02458a10c0d258b846a8a9955e..ed838db2474790437ff4b57e23a1e289
|
||||
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 aab6a77b18f83adeac065083f83b94b7ff251282..0d0e272a162be8d1bee9e0122e3e7a59b0ad32a3 100644
|
||||
index acd3b33c64f1534555c14047e29c18f31a1e8f92..63a9e0695efb0f357c0c3298175da9bbdc78a41c 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -359,6 +359,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -352,6 +352,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -8,7 +8,7 @@ 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 3009acd40eee36bc3d4dd8642f0ce5e6476da973..1d52ce84184a3ca94e4e0f04d331bf56d75e07d0 100644
|
||||
index 1eb1d0fe4696f26e7de43fc8797c283e9e6db042..766f8d8df866ce7fbc337cecceb715cced39643c 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index a9267b633e126f057e914b895f280ed658ff279d..179b5449f53c2d7b9024fb08fe1b1f6c03c6d5b0 100644
|
||||
index f19a15f85afe2d754833667d8c272c75da3de0b2..18de1a2533b479a6090ed412987f0b5c3922c711 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -665,6 +665,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -661,6 +661,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -22,11 +22,11 @@ index a9267b633e126f057e914b895f280ed658ff279d..179b5449f53c2d7b9024fb08fe1b1f6c
|
||||
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 3f0df3df3dd74ced71869ce01abf7b159387b8f4..85b169530a21bcfc016d1439a71d35378077774d 100644
|
||||
index 64f6ebe2a86a659da70f32cdbdb961384adca43f..2fc1062eb798a233f0eede6dd945f25d633e5f8f 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -137,6 +137,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
bool IsRenderViewLiveForTesting() const override;
|
||||
@@ -136,6 +136,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
void EnablePreferredSizeMode() override;
|
||||
void WriteIntoTrace(perfetto::TracedProto<TraceProto> context) const override;
|
||||
|
||||
+ void SetSchedulerThrottling(bool allowed) override;
|
||||
@@ -34,10 +34,10 @@ index 3f0df3df3dd74ced71869ce01abf7b159387b8f4..85b169530a21bcfc016d1439a71d3537
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
|
||||
index 3b01b3419c4361d5d75ad1c37e5baa3a1967bd09..35c82d931242a1180091267c18e0255840acc5ce 100644
|
||||
index 4d2a4c6746e1dbfc619faf2e16eaa4948d74e372..6c9f190ff595234eca18ff20ca0655da4689b7a2 100644
|
||||
--- a/content/public/browser/render_view_host.h
|
||||
+++ b/content/public/browser/render_view_host.h
|
||||
@@ -80,6 +80,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
@@ -77,6 +77,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
virtual void WriteIntoTrace(
|
||||
perfetto::TracedProto<TraceProto> context) const = 0;
|
||||
|
||||
@@ -85,10 +85,10 @@ index 5e4032ccf916f969cd669af7d983becddb57c72b..a858c9f2fa609ae756a2e70d0362f2de
|
||||
// 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 6504c73f614bebad7b899c8b76c4b3034b7dab7a..f76a0ee0778d7b4e4df69a4c43b4a6bfdc89294d 100644
|
||||
index 9704d8d8a4ee9e36c1a61c6723ce1039320014b6..cd14dd54e3c7bb56e82cbd6c566c11018b4deb94 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3689,6 +3689,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3698,6 +3698,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index 6504c73f614bebad7b899c8b76c4b3034b7dab7a..f76a0ee0778d7b4e4df69a4c43b4a6bf
|
||||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3700,7 +3707,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
@@ -3709,7 +3716,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
@@ -113,10 +113,10 @@ index 6504c73f614bebad7b899c8b76c4b3034b7dab7a..f76a0ee0778d7b4e4df69a4c43b4a6bf
|
||||
|
||||
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
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 5c9609a6a8d1e18981ac14ad5321fa82c3eb38e0..0a2564a8e45210ba58438e95caa70d01fac22aee 100644
|
||||
index 51ab4f029e467fa5ea2663af38445d9565e19fe4..18005ca7a272d7731a4b8eeeac92ce163c2a262e 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -420,6 +420,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -419,6 +419,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -124,7 +124,7 @@ index 5c9609a6a8d1e18981ac14ad5321fa82c3eb38e0..0a2564a8e45210ba58438e95caa70d01
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -855,6 +856,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -854,6 +855,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.cc b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
index 4e51622d725ad0ee448ea1794c209aae7f78e09a..df6e9ed6fda9e6fa695fa3ab717847735dc63b17 100644
|
||||
index 6d51f6a77c21b60ab756dbf8d4961b351a2e2b07..c6dc3cebfb32489a5e50b850ed02a066bf3f258e 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
@@ -140,6 +140,20 @@ WebPreferences::WebPreferences()
|
||||
@@ -142,6 +142,20 @@ WebPreferences::WebPreferences()
|
||||
fake_no_alloc_direct_call_for_testing_enabled(false),
|
||||
v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
|
||||
record_whole_document(false),
|
||||
@@ -33,13 +33,13 @@ index 4e51622d725ad0ee448ea1794c209aae7f78e09a..df6e9ed6fda9e6fa695fa3ab71784773
|
||||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadcc12afd1a 100644
|
||||
index 187fd8d9818693262256d5cbddd5e02659ba903d..f166517f4e70ced310253539fb6197f6b3af559c 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
|
||||
@@ -22,6 +22,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
!data.ReadSansSerifFontFamilyMap(&out->sans_serif_font_family_map) ||
|
||||
@@ -23,6 +23,10 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
!data.ReadCursiveFontFamilyMap(&out->cursive_font_family_map) ||
|
||||
!data.ReadFantasyFontFamilyMap(&out->fantasy_font_family_map) ||
|
||||
!data.ReadMathFontFamilyMap(&out->math_font_family_map) ||
|
||||
+ // Begin Electron-specific WebPreferences.
|
||||
+ !data.ReadPreloads(&out->preloads) ||
|
||||
+ !data.ReadPreload(&out->preload) ||
|
||||
@@ -47,7 +47,7 @@ index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadc
|
||||
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
|
||||
&out->lazy_frame_loading_distance_thresholds_px) ||
|
||||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
|
||||
@@ -145,6 +149,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -148,6 +152,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
data.fake_no_alloc_direct_call_for_testing_enabled();
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
@@ -68,7 +68,7 @@ index 16e7501cf2da98d0046d65102e634af31c1f6c39..53fbfdb4837fe444c3564523068faadc
|
||||
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 b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f0812c41aab 100644
|
||||
index 59947bfd3c042e5f7d3993967fece9b519f93472..368ec7fb398409cd6386269934eaffcce356793f 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 @@
|
||||
@@ -79,7 +79,7 @@ index b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f08
|
||||
#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"
|
||||
@@ -152,6 +153,22 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -154,6 +155,22 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
blink::mojom::V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
@@ -103,7 +103,7 @@ index b2b3be2019209d3810bb0dc570e2a1ebcf702ad8..0ff23de6bd73d6d0ba82402ec39d2f08
|
||||
// only controls whether or not the "document.cookie" field is properly
|
||||
// connected to the backing store, for instance if you wanted to be able to
|
||||
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 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691eccaf3cd7b19 100644
|
||||
index bd425a5869477de9095c6a41c683609d065b08c0..3a5d7450aa40e8a7614e83f316d3d0fb59583381 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 @@
|
||||
@@ -114,7 +114,7 @@ index 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691ecca
|
||||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -418,6 +419,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -428,6 +429,60 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.record_whole_document;
|
||||
}
|
||||
|
||||
@@ -176,7 +176,7 @@ index 30fd01c6e804d05091ff6147ac570901a8d998b9..4acd2df36ab6928947b5defe8691ecca
|
||||
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 d10d1b4c0b16ac9e863077cf60feca35fa2da329..1a49fb1a11f75aa3c79cd3cc1796957d0b9a5549 100644
|
||||
index 738ac646e075f7a37ba2a263c7799a755e63d3fb..80d6ae17d34ef5c7fd14e21c4e1ee3ed4ef9c5fe 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -10,6 +10,7 @@ import "third_party/blink/public/mojom/v8_cache_options.mojom";
|
||||
@@ -187,7 +187,7 @@ index d10d1b4c0b16ac9e863077cf60feca35fa2da329..1a49fb1a11f75aa3c79cd3cc1796957d
|
||||
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
@@ -204,6 +205,22 @@ struct WebPreferences {
|
||||
@@ -206,6 +207,22 @@ struct WebPreferences {
|
||||
V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: allow new privileges in unsandboxed child processes
|
||||
This allows unsandboxed renderers 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 f60ad777ab7698a4518d3b1b61ade29e7c618a3a..c7781bdb49f8a92aa9ee1d8dd1af03fa9cf2dfe3 100644
|
||||
index 80db4cb5941ee84db1534c070c4daefef76d0faf..cf40ac56a9ce4bd4a28eb511b5f37d148e4be6ac 100644
|
||||
--- a/content/browser/child_process_launcher_helper_linux.cc
|
||||
+++ b/content/browser/child_process_launcher_helper_linux.cc
|
||||
@@ -53,6 +53,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
@@ -54,6 +54,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
|
||||
if (GetProcessType() == switches::kRendererProcess) {
|
||||
const int sandbox_fd = SandboxHostLinux::GetInstance()->GetChildSocket();
|
||||
options->fds_to_remap.push_back(std::make_pair(sandbox_fd, GetSandboxFD()));
|
||||
|
||||
@@ -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 a519c49a01987feab4dadbc4ba48b73e943fa404..c8d2a65cb428e85c33675668cc106f0af124dfee 100644
|
||||
index c136ea03ea961ce419d42c60efc646e4ddfe5693..4e635c3775df0f1b3b3d7551fba8f8d59d1b541b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -123,14 +123,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index a519c49a01987feab4dadbc4ba48b73e943fa404..c8d2a65cb428e85c33675668cc106f0a
|
||||
// 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 3efc0a04ae3fa60dce4aeb9a296c8dd1bb43320a..5dac7c18f39abefcc318ba2a7b8fad449189d0b6 100644
|
||||
index 019b87a77fb7306bacdcda20e388cdfb8d3a6be8..f972ae236566248d3179d147e9692322153e326d 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -543,10 +543,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -544,10 +544,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index 3efc0a04ae3fa60dce4aeb9a296c8dd1bb43320a..5dac7c18f39abefcc318ba2a7b8fad44
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -592,6 +588,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -593,6 +589,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ breakpad independently, as a "browser" process. This patches
|
||||
crash annotation.
|
||||
|
||||
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
|
||||
index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa6025207d80 100644
|
||||
index 3933fa761768b5a45891bfef4c2c2123b92fc276..2eb52b71d7ebc7525cceffbecc99db6751429afd 100644
|
||||
--- a/components/crash/core/app/breakpad_linux.cc
|
||||
+++ b/components/crash/core/app/breakpad_linux.cc
|
||||
@@ -718,8 +718,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
@@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
|
||||
log_path[log_path_len] = '\0';
|
||||
info.log_filename = log_path;
|
||||
#endif
|
||||
@@ -29,7 +29,7 @@ index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa60
|
||||
info.distro = base::g_linux_distro;
|
||||
info.distro_length = my_strlen(base::g_linux_distro);
|
||||
info.upload = upload;
|
||||
@@ -2025,8 +2030,13 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
@@ -2027,8 +2032,13 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
process_type == kWebViewSingleProcessType ||
|
||||
process_type == kBrowserProcessType ||
|
||||
#endif
|
||||
@@ -40,6 +40,6 @@ index 43f6d476f3ee2759cf41c492f932522994e7ddec..8df14f416ee321e1259433715a61fa60
|
||||
+ g_is_node = true;
|
||||
+ }
|
||||
+
|
||||
#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if !BUILDFLAG(IS_CHROMEOS)
|
||||
SetUploadURL(GetCrashReporterClient()->GetUploadUrl());
|
||||
#endif
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index 0736e7021761e6019e1b52448d21ffdb73b964fc..571b553e9aaa98739851d0ff312eefe9f6a75596 100644
|
||||
index 7528d88c5d40571f1dcbd02201128ba2eed0cf08..ae50430c441539eb6152a926d382fb0552f3c358 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -80,6 +80,7 @@
|
||||
|
||||
@@ -11,10 +11,10 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4..b5a20be5e22238e7e1969bdaf52c0b05e84bb846 100644
|
||||
index 99ab95668a7d3a31339b576b4a3a6038f39c2795..92f43eac6d654ff8ebe57d291c4f77aa1b029895 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -171,11 +171,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -173,11 +173,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
@@ -33,10 +33,10 @@ index 3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4..b5a20be5e22238e7e1969bdaf52c0b05
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 1d80724ace438fb9d2c20ff78d87a93053cf7420..840548c9685c2e3bd584ea8f48d02d21ac541c1b 100644
|
||||
index cb28e691fb863fe7739a7ca536170e6c7a76a315..eacc853e2b9fc3c9e448f419e02d7378da310e9e 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4559,7 +4559,7 @@ static_library("browser") {
|
||||
@@ -4588,7 +4588,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 1d80724ace438fb9d2c20ff78d87a93053cf7420..840548c9685c2e3bd584ea8f48d02d21
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 641f52eb7952858738a6623b480f767261e5d009..6d0c624ea62a9125ef7e5579da197de2327a12ff 100644
|
||||
index 24a27fb4a47678be448d597c7e430ce28d23be11..664e9b0378d5b7c09fa66b7a10c7f938da14aab9 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6002,7 +6002,6 @@ test("unit_tests") {
|
||||
@@ -5841,7 +5841,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index 641f52eb7952858738a6623b480f767261e5d009..6d0c624ea62a9125ef7e5579da197de2
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/browser:chrome_process_finder",
|
||||
@@ -6025,6 +6024,10 @@ test("unit_tests") {
|
||||
@@ -5864,6 +5863,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,7 +68,7 @@ index 641f52eb7952858738a6623b480f767261e5d009..6d0c624ea62a9125ef7e5579da197de2
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -6712,7 +6715,6 @@ test("unit_tests") {
|
||||
@@ -6757,7 +6760,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -76,15 +76,14 @@ index 641f52eb7952858738a6623b480f767261e5d009..6d0c624ea62a9125ef7e5579da197de2
|
||||
"//chrome/browser:cart_db_content_proto",
|
||||
"//chrome/browser:coupon_db_content_proto",
|
||||
"//chrome/browser/media/router:test_support",
|
||||
@@ -6760,6 +6762,11 @@ test("unit_tests") {
|
||||
if (is_chromeos) {
|
||||
deps += [ "//ui/chromeos" ]
|
||||
@@ -6856,6 +6858,10 @@ test("unit_tests") {
|
||||
}
|
||||
}
|
||||
|
||||
+ if (!is_electron_build) {
|
||||
+ deps += [ "//chrome:packed_resources_integrity_hash" ]
|
||||
+ }
|
||||
+
|
||||
+ if (!is_electron_build) {
|
||||
+ deps += [ "//chrome:packed_resources_integrity_hash" ]
|
||||
+ }
|
||||
+
|
||||
if (is_chromeos_ash) {
|
||||
deps += [
|
||||
"//ash/assistant/model",
|
||||
if (is_chromeos_ash) {
|
||||
sources -= [
|
||||
"../browser/policy/cloud/user_policy_signin_service_unittest.cc",
|
||||
|
||||
@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
|
||||
nan tests
|
||||
|
||||
diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
|
||||
index a53cc9066a3485ff6829e3c410eb523de7d074d6..9697e2dc2d0892fc7f1007d62488c2f2f24ec92f 100644
|
||||
index 74b6ad644d49c003996db0eab225ea30ac17420a..0a1ba3510be3047bfc34e603c5aaafbf15908269 100644
|
||||
--- a/buildtools/third_party/libc++/BUILD.gn
|
||||
+++ b/buildtools/third_party/libc++/BUILD.gn
|
||||
@@ -44,7 +44,11 @@ config("winver") {
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index ec886101b6e5347bdd832684a5c3b2cc3179c657..0287e414f4020147ddee297f7c1447c32a118905 100644
|
||||
index aa0be995df8c2f9fa0d84922d30c7e1cdf9025c8..e588b460aa32b4c984d593ed54e10310b59ace9b 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -6943,6 +6943,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -6840,6 +6840,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index ec886101b6e5347bdd832684a5c3b2cc3179c657..0287e414f4020147ddee297f7c1447c3
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 335e70179a03ee379082525bb4c7d596983bd633..faa795be3a6cbc7ae13d9a42a1bdbd01ac0406a9 100644
|
||||
index 6da28755d61f8957b0e6b6d0f1e669c2dbb347fa..a96bb634eb5c5405abb62b88d576e5e3ed354caa 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3947,6 +3947,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3951,6 +3951,14 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -39,7 +39,7 @@ index 335e70179a03ee379082525bb4c7d596983bd633..faa795be3a6cbc7ae13d9a42a1bdbd01
|
||||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_config, session_storage_namespace);
|
||||
|
||||
@@ -3991,12 +3999,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3995,12 +4003,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -68,10 +68,10 @@ index a7f36529608011013dab96a803ad3187c940fc81..2bbcea3efede2fda4ff2c5b270e1db01
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index ffa24d4b6779226ea3b94afdf176939ea7e42e34..16fb4946cb3ea2d097e8ed05bb340cc3f0782ed6 100644
|
||||
index 984205b3d1bb4acfde6c5d106118a88f866af341..e33a5c9c6d493cd4ac2664ea10390193e3e53fcc 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -579,6 +579,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -581,6 +581,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -81,10 +81,10 @@ index ffa24d4b6779226ea3b94afdf176939ea7e42e34..16fb4946cb3ea2d097e8ed05bb340cc3
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d563d5aafc 100644
|
||||
index 7e22f3e0b84f3e6b1ef7b1c5176665b38bd53629..f6d98708c436447ee6c93acb5d476719c238ca9c 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -165,6 +165,7 @@ class NetworkService;
|
||||
@@ -168,6 +168,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -92,7 +92,7 @@ index ae3dda4b9b40bb0d4c1a10eaedda9270d3543a8b..9b988bb631ab759739ae01c918efb1d5
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -954,6 +955,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -959,6 +960,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -173,7 +173,7 @@ index 89b07508aef80680a847c106fea0e2fa58ff964b..6630af3583a6bac6135d46644280d644
|
||||
/*is_opener_navigation=*/false, request.HasUserGesture(),
|
||||
// `openee_can_access_opener_origin` only matters for opener navigations,
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index 4379497806bf7c85ade2f4e4554d6a60c4ec966c..fa860bbcf0c12df33dae69d25b01587676a1b79e 100644
|
||||
index 2e7c332565ebe33b00ab7fff96a6a8dfc61422a6..0ab061f51d1d0c93f23bfcf5ba051172cea37eb8 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -438,6 +438,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -186,7 +186,7 @@ index 4379497806bf7c85ade2f4e4554d6a60c4ec966c..fa860bbcf0c12df33dae69d25b015876
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
|
||||
index d4eb4d482b2641585d501131c64b90cc9dbcfd18..132a5d86279b9a2cb4364b9c6d3e89e12d55052e 100644
|
||||
index 00e2a8c21d4f0ef00c942498251fa44065da63c0..0fc4b092fa276063e05f990bf920fecd60c6d26c 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -80,6 +80,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -220,10 +220,10 @@ index 84d32491a56528a84b4395fba1d54cdbb38d522b..09998a83c449ef8cd9f360fbcdcf7edc
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 2e2ba228a7f179b7cf9c43434bd20ca20b1f1af6..de9f95426ad2dcc99bc4961a0e57539d287408e4 100644
|
||||
index ea47699384318126fef1a8c4cc3cb881cdc8e624..22d63b9f89913878518294f19afc85550196ca3e 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2074,6 +2074,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2088,6 +2088,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, incumbent_window);
|
||||
|
||||
@@ -108,10 +108,10 @@ index 6688ba8ba2fb7d930773144cdbc43f1f6fa2b685..22015c7b9b50e1264551ce226757f90e
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 7548e63c57dc8463cb59614122e32c574ae17437..a9e1c335e3fae4fa795059c9b28bd5d404184c2e 100644
|
||||
index 1837aac53e6e13aebb0eee00249b305e0c7192c9..cf0b500239f635decc718fb9cfceb3f3f5be23c6 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1786,12 +1786,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -127,10 +127,10 @@ index 7548e63c57dc8463cb59614122e32c574ae17437..a9e1c335e3fae4fa795059c9b28bd5d4
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 5edda102ff59ccb30d2150a88e75e8fb65379fca..82aaa442bca9e7a5e57315ace0b1c62e40ec1d24 100644
|
||||
index 631c30c8f153e72cd92de457d8ba6f44574edbe6..a24181efacd35c3d7b9b0bcdc066dd0a0f7bc43a 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -808,8 +808,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -828,8 +828,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -246,10 +246,10 @@ index c6bd5c19f8a7ceec17c9e32af5296a9617f3a619..02199b439fba7fdc617b7f7980d958b7
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index add5ba98f4409460b93aa2f8c49eb49a1f59470a..4b77c71375a7375e168c9bee93a73c3af6fe1252 100644
|
||||
index 1b616ba52d9c77c64c7f24a0d204ce36641dce38..0303ae1c4d8681bc1bf56eb9ff1fc13afd678706 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3895,8 +3895,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3899,8 +3899,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -344,10 +344,10 @@ index ef6faf317dd4168adf6fd530a7da0b80f9166dec..f401659a81d4aeaf71039d71eb8fec48
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
|
||||
index 424c5f89440dccc29f3431e034d0a4fd4f647a00..8d40d0bd30fc28e841eedb3f34be3c033db62449 100644
|
||||
index d2497be79bb5d7943589bb928e2fbe13f76aa3e3..54adf30432cf178f2d00630420e45cfa95551b54 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.cc
|
||||
+++ b/fuchsia/engine/browser/frame_impl.cc
|
||||
@@ -402,8 +402,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -404,8 +404,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Wed, 23 Oct 2019 14:17:18 -0700
|
||||
Subject: chore: use electron resources not chrome for spellchecker
|
||||
|
||||
spellchecker uses a few IDS_ resources. We need to load these from
|
||||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 86bbdc45c6911c7249cb898f38d8e262fa1646c1..1d80724ace438fb9d2c20ff78d87a93053cf7420 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -7181,6 +7181,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
+ "//electron:resources",
|
||||
]
|
||||
|
||||
if (!is_android) {
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
index 7c3b6a69acb16186add5d467dbc22360d90d46d4..703e2ce60f4f35f9c71e8b503ffd62f9ea8f365a 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/browser/profiles/incognito_helpers.h"
|
||||
#include "chrome/browser/spellchecker/spellcheck_service.h"
|
||||
-#include "chrome/grit/locale_settings.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/keyed_service/content/browser_context_dependency_manager.h"
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
|
||||
index fdba4ca90882656d6ba369dae48d5dfc13991cb8..fb3b759362275aafd4ed01a7865a4dd0dfaad727 100644
|
||||
--- a/components/language/core/browser/BUILD.gn
|
||||
+++ b/components/language/core/browser/BUILD.gn
|
||||
@@ -30,6 +30,7 @@ static_library("browser") {
|
||||
"//components/pref_registry",
|
||||
"//components/prefs",
|
||||
"//components/strings",
|
||||
+ "//electron:resources",
|
||||
"//ui/base",
|
||||
]
|
||||
}
|
||||
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
|
||||
index 26f86d67c32b2a022698ae5ea5509912d2ccfacb..d48844d49308d67ee7bfa823335c7443173badbe 100644
|
||||
--- a/components/language/core/browser/language_prefs.cc
|
||||
+++ b/components/language/core/browser/language_prefs.cc
|
||||
@@ -22,7 +22,7 @@
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/prefs/scoped_user_pref_update.h"
|
||||
-#include "components/strings/grit/components_locale_settings.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
namespace language {
|
||||
@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
|
||||
as its not supported in the current version of chrome.
|
||||
|
||||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
|
||||
index ff769b9855810bfe3761079ddae286fc8aa5602f..1fea025e8fc1d4e2496f117780fa4d0eb2f2e983 100644
|
||||
index 587144562fffda66cee9cbd23b16fb4e8607d208..a41bb82f8dcf292cf23aa8781bd5a5c52f11e578 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
@@ -13,10 +13,10 @@ Ultimately we should remove the option to disable compression, and
|
||||
subsequently remove this patch.
|
||||
|
||||
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
|
||||
index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb880264464787eb32 100644
|
||||
index 2eb52b71d7ebc7525cceffbecc99db6751429afd..d3ff2942d831745efed440be0fe1e82441a39ff7 100644
|
||||
--- a/components/crash/core/app/breakpad_linux.cc
|
||||
+++ b/components/crash/core/app/breakpad_linux.cc
|
||||
@@ -110,6 +110,8 @@ void SetUploadURL(const std::string& url) {
|
||||
@@ -111,6 +111,8 @@ void SetUploadURL(const std::string& url) {
|
||||
DCHECK(!g_upload_url);
|
||||
g_upload_url = strdup(url.c_str());
|
||||
}
|
||||
@@ -25,9 +25,9 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446
|
||||
#endif
|
||||
|
||||
bool g_is_node = false;
|
||||
@@ -1322,56 +1324,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1324,56 +1326,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
|
||||
#else // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#else // BUILDFLAG(IS_CHROMEOS)
|
||||
|
||||
- // Compress |dumpfile| with gzip.
|
||||
- const pid_t gzip_child = sys_fork();
|
||||
@@ -127,7 +127,7 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446
|
||||
static const char header_msg[] =
|
||||
"--header=Content-Type: multipart/form-data; boundary=";
|
||||
const size_t header_content_type_size =
|
||||
@@ -1398,7 +1404,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
@@ -1400,7 +1406,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
|
||||
static const char kWgetBinary[] = "/usr/bin/wget";
|
||||
const char* args[] = {
|
||||
kWgetBinary,
|
||||
@@ -137,9 +137,9 @@ index 8df14f416ee321e1259433715a61fa6025207d80..1d7f38d3f89d9c7f110cc9eb88026446
|
||||
header_content_type,
|
||||
post_file,
|
||||
g_upload_url,
|
||||
@@ -2039,6 +2046,7 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
@@ -2041,6 +2048,7 @@ void InitCrashReporter(const std::string& process_type) {
|
||||
|
||||
#if !BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#if !BUILDFLAG(IS_CHROMEOS)
|
||||
SetUploadURL(GetCrashReporterClient()->GetUploadUrl());
|
||||
+ g_compress_uploads = GetCrashReporterClient()->GetShouldCompressUploads();
|
||||
#endif
|
||||
|
||||
@@ -9,10 +9,10 @@ rate-limiting, compression and global annotations.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
|
||||
index 823e49a234e3dd31bf6527c2e4efa96f3d23f1f2..43f6d476f3ee2759cf41c492f932522994e7ddec 100644
|
||||
index 4ed2558351e37dde0eb35b6eb32f442346ff2490..3933fa761768b5a45891bfef4c2c2123b92fc276 100644
|
||||
--- a/components/crash/core/app/breakpad_linux.cc
|
||||
+++ b/components/crash/core/app/breakpad_linux.cc
|
||||
@@ -112,6 +112,7 @@ void SetUploadURL(const std::string& url) {
|
||||
@@ -113,6 +113,7 @@ void SetUploadURL(const std::string& url) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
|
||||
failing checks and allow the rest of the target to have them enabled.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
|
||||
index ab0afb79514e42acb87e94809ed4a2b7c736a825..23fb303820860a030643d6d5a1a449823bb146e8 100644
|
||||
index 21e7b1cbada3856a7d91040c259be80ae95df07e..b19206ba58725f949403469a3e1d221b12833581 100644
|
||||
--- a/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
|
||||
+++ b/third_party/blink/renderer/core/mobile_metrics/mobile_friendliness_checker.cc
|
||||
@@ -515,8 +515,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint(
|
||||
@@ -542,8 +542,7 @@ void MobileFriendlinessChecker::NotifyInvalidatePaint(
|
||||
->GetPageScaleConstraintsSet()
|
||||
.FinalConstraints()
|
||||
.initial_scale;
|
||||
|
||||
@@ -82,18 +82,9 @@ index 1e4a652634fbde2ca9a256baca840bbc5a0e001f..546f5bc3a2f79035f0eec196d9e704b8
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..2026b926eee56f6b235963b23ab86b2743eaed90 100644
|
||||
index 6d8c9d940bb4488ffedc1eb8c543c065bb3953c9..d5092cb0245a4b8dc26073741f0bc6657b943bdd 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/media/webrtc/desktop_media_list.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/browser_thread.h"
|
||||
#include "content/public/common/content_features.h"
|
||||
@@ -127,8 +127,9 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
||||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index 14e13169de8b5e808e3284792237bef9939b1e00..7628a96dc8b2c9e8128cd462138d3487304c6e10 100644
|
||||
index f3f1d19619717f0f0493ab1ec90f47fd16bdd574..10bdf83528295d50cde496ade386a3546aa7bfc2 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1894,6 +1894,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1880,6 +1880,9 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
TargetColorParams params;
|
||||
@@ -228,7 +228,7 @@ index 7fb664525ba696626544c8b09597105bff874c05..b987d649ef84451a9d3e5c2f87da3eb0
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 8cd9a960ca1de81857af60daa91596c1dbb17786..7455afe4d81eac31fe3792a4459834a7f968918c 100644
|
||||
index 11e2a00aaffeba9379c0f2c41e6300d3020c7a88..9cfd058861a506bc3d6f72e5ed4a37b60ff4454b 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -240,7 +240,7 @@ index 8cd9a960ca1de81857af60daa91596c1dbb17786..7455afe4d81eac31fe3792a4459834a7
|
||||
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
|
||||
sandbox::policy::switches::kGpuSandboxFailuresFatal,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 09f72f1fbd7b782c5bf52245482b358103f0c243..80d9fd40efed1edc90e7bdf1db534acb876206ca 100644
|
||||
index 0c8d0735523d388d0e68d2ad0b20a1c2525502ed..089b8e85776874938cfdafad0c3576562a78c1b0 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -198,6 +198,7 @@
|
||||
@@ -251,7 +251,7 @@ index 09f72f1fbd7b782c5bf52245482b358103f0c243..80d9fd40efed1edc90e7bdf1db534acb
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "url/gurl.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3219,6 +3220,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3217,6 +3218,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
// Propagate the following switches to the renderer command line (along
|
||||
// with any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
|
||||
@@ -6,19 +6,19 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 18c77a5520ea2ae7cfee4eea3ed01fa8a588829d..557b77bea785108359b0c78f12c2b2afbdc2475d 100644
|
||||
index c37193c2207fb4f20993a35e2ac6fde8f0727a45..8e81312b1424d37c756bbb93cb4020a693c9b380 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -511,7 +511,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
@@ -531,7 +531,11 @@
|
||||
browser_compositor_->GetDelegatedFrameHost()->HasSavedFrame();
|
||||
if (has_saved_frame)
|
||||
TRACE_EVENT_BEGIN("cc", "RWHVMac::WasOccluded with saved frame");
|
||||
- browser_compositor_->SetRenderWidgetHostIsHidden(true);
|
||||
+ // Consider the RWHV occluded only if it is not attached to a window
|
||||
+ // (e.g. unattached BrowserView). Otherwise we treat it as visible to
|
||||
+ // prevent unnecessary compositor recycling.
|
||||
+ const bool unattached = ![GetInProcessNSView() window];
|
||||
+ browser_compositor_->SetRenderWidgetHostIsHidden(unattached);
|
||||
if (has_saved_frame)
|
||||
TRACE_EVENT_END("cc");
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetSize(const gfx::Size& size) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 9e740edbf36dd7a30062c88f857103c56eebd729..7cda66952e0d3a67c32791ad3c7d7de8df03f876 100644
|
||||
index 730ac0aaf36da1842c7add66fbaea58baadf2e74..fcc45c987cfce94f5378d4aeee1cfe703178e133 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -808,6 +808,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -809,6 +809,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
@@ -20,10 +20,10 @@ index 9e740edbf36dd7a30062c88f857103c56eebd729..7cda66952e0d3a67c32791ad3c7d7de8
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index 23783e5e004b613c27fd753e1f7ff96d51fa5f68..225b4ea0c5ac74d6b6700c306182d003a972cedc 100644
|
||||
index 2ae96b816427148f4f0adf39c549d37fe3d02619..0288d36642629d7ec1846cd977f378ff9c0afd40 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -886,6 +886,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -879,6 +879,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
|
||||
SiteInstanceGroup* GetSiteInstanceGroup();
|
||||
|
||||
@@ -34,7 +34,7 @@ index 23783e5e004b613c27fd753e1f7ff96d51fa5f68..225b4ea0c5ac74d6b6700c306182d003
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index 5f29761ad8556e730dca6b076b87f6391313fb95..3e5f5a34150079bf74d612bff85b6875ad41d2e6 100644
|
||||
index a3eb86299d8d34262347ee093940e61af6eab348..cb99fd2eb69bba9b133664fb68076eeeb9576818 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index c289c888bc9d74d3f696714650b65aa373be27b4..aad7ec5ed0b6f6ab5cdfe0d7902d952c7c9e36c6 100644
|
||||
index cfc5263749fa3068ad3699892bc4060891d7a0ef..f0aa5f66bc62efb2ea2d105d86dc3a8ea13e5eec 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1286,6 +1286,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1293,6 +1293,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index c289c888bc9d74d3f696714650b65aa373be27b4..aad7ec5ed0b6f6ab5cdfe0d7902d952c
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1332,6 +1333,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1339,6 +1340,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: Don't run PCScan functions if PCScan is disabled
|
||||
PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657.
|
||||
|
||||
diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||
index d871ceecd76e21b23c500643363ced2ca87e8013..e0a26a90ee38342aefdbdd76e9c56a932b214235 100644
|
||||
index 1e54559bd5f9a2ee889b921379d70c51e902502d..6797a076b612ad4ed6d5ce7d9868d944fae3694f 100644
|
||||
--- a/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||
+++ b/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||
@@ -66,7 +66,7 @@ void MemoryReclaimer::Reclaim(int flags) {
|
||||
@@ -49,7 +49,7 @@ index d51b37c8a2df11f71fa6056193100d00883db43d..b44002788cf4d4f5d754dd35dd193be2
|
||||
#endif
|
||||
|
||||
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
|
||||
index 8542c0d0d49511298cca800a59796b1e4271a3d8..1d0eeff5800f2ccf3f1fb6b1356c8cd067cfd945 100644
|
||||
index 5b179a2d15cfc4997410d9467bf9484f5cae0b9f..98296aa4e8d75e94b141694c592dfa83627861ff 100644
|
||||
--- a/base/threading/platform_thread_win.cc
|
||||
+++ b/base/threading/platform_thread_win.cc
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
@@ -11,7 +11,7 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
|
||||
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
|
||||
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 95966ce7f0eeb0a7f2822bef69b540ac6bfe298d..34c2bdc5d4dda2fb0bdf2a8c3e5f8f9a5e11b977 100644
|
||||
index 1b021461f214287c94fb22b17d980c19e3f07dde..76691715d09a62a1edc0306dcac1d3e7e312fb1d 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2398,7 +2398,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
|
||||
|
||||
@@ -21,10 +21,10 @@ index c9b535eb083c250f4f874d8e6bd0c29ea9f3a10f..f220b8669507a4aea616b0dfbabda509
|
||||
v8::ZoneBackingAllocator* GetZoneBackingAllocator() override;
|
||||
#endif
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index 952023235d9f1905b64195f625dbb3b1af97f908..3d8b4cc17584e7ae8be0b77a073a0453bcd5b3ef 100644
|
||||
index 1a41a282f054d8ca93db19dc5df7f1de14cb8e44..452372aa40947531452c7ad7226a4ee6b0adfccb 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -366,6 +366,10 @@ PageAllocator* V8Platform::GetPageAllocator() {
|
||||
@@ -367,6 +367,10 @@ PageAllocator* V8Platform::GetPageAllocator() {
|
||||
return g_page_allocator.Pointer();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ index 14c71cc69388da46f62d9835e2a06fef0870da02..9481ea08401ae29ae9c1d960491b05b3
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index f06a04983571623b542dba11933c4c95c3dcf398..606573a33573884baa173b796e1870b8defcda2a 100644
|
||||
index 6a331146e6fbf23e4177176f67fe534141579eb7..7f6974b8fbfe052902e6c0a55d386fb3a8b26558 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1407,6 +1407,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -51,10 +51,10 @@ index f06a04983571623b542dba11933c4c95c3dcf398..606573a33573884baa173b796e1870b8
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 2cd8707b120deb41683e13def5d446fd3bf93afe..c654d54cbb1427e700d918a94390c022b5b1cb14 100644
|
||||
index 620d7b7b733cc9749775c2bcabcebdedafe6ba0b..984e1f04c01006b7f038538c16ad2dd224925731 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -302,6 +302,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -298,6 +298,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
@@ -63,10 +63,10 @@ index 2cd8707b120deb41683e13def5d446fd3bf93afe..c654d54cbb1427e700d918a94390c022
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index b52e5a2230e96d55d7886bde331a505c58dd093a..757dd77b06cba44e832e86e729e44b1e9a427c49 100644
|
||||
index 0450b50b5545d9b8f9025553167bed2e78157130..1b772288816ee770ee47cb59cf6c93439729320e 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1087,6 +1087,9 @@ interface NetworkContext {
|
||||
@@ -1090,6 +1090,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
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 f76a0ee0778d7b4e4df69a4c43b4a6bfdc89294d..45baa4d62cb4e5aebedebba993ddbc9f06711d35 100644
|
||||
index cd14dd54e3c7bb56e82cbd6c566c11018b4deb94..0b0b3a03a64ae6a321eeb27619f4f0ae5ee388cc 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -159,6 +159,7 @@
|
||||
@@ -23,7 +23,7 @@ index f76a0ee0778d7b4e4df69a4c43b4a6bfdc89294d..45baa4d62cb4e5aebedebba993ddbc9f
|
||||
#include "third_party/blink/renderer/platform/graphics/image.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
|
||||
@@ -1776,6 +1777,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1785,6 +1786,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -96,10 +96,10 @@ index 5a64220aaf1309832dc0ad543e353de67fe0a779..5b701b1361707b610ed60c344e441e67
|
||||
// Return true if the given pid is one of our child processes.
|
||||
// Assumes that the current pid is the root of all pids of the current
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190f7d1137d 100644
|
||||
index 9bb12894da06fc7d281daced754b240afa9bedeb..52717600e7346daeb0726c177162c718da53500a 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -146,7 +146,7 @@ const char kACKToken[] = "ACK";
|
||||
@@ -145,7 +145,7 @@ const char kACKToken[] = "ACK";
|
||||
const char kShutdownToken[] = "SHUTDOWN";
|
||||
const char kTokenDelimiter = '\0';
|
||||
const int kMaxMessageLength = 32 * 1024;
|
||||
@@ -108,7 +108,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
|
||||
bool g_disable_prompt = false;
|
||||
bool g_skip_is_chrome_process_check = false;
|
||||
@@ -612,6 +612,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
@@ -611,6 +611,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
// |reader| is for sending back ACK message.
|
||||
void HandleMessage(const std::string& current_dir,
|
||||
const std::vector<std::string>& argv,
|
||||
@@ -116,7 +116,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
SocketReader* reader);
|
||||
|
||||
private:
|
||||
@@ -636,6 +637,9 @@ class ProcessSingleton::LinuxWatcher
|
||||
@@ -635,6 +636,9 @@ class ProcessSingleton::LinuxWatcher
|
||||
// The ProcessSingleton that owns us.
|
||||
ProcessSingleton* const parent_;
|
||||
|
||||
@@ -126,7 +126,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
std::set<std::unique_ptr<SocketReader>, base::UniquePtrComparator> readers_;
|
||||
};
|
||||
|
||||
@@ -666,16 +670,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) {
|
||||
@@ -665,16 +669,21 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) {
|
||||
}
|
||||
|
||||
void ProcessSingleton::LinuxWatcher::HandleMessage(
|
||||
@@ -154,7 +154,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
LOG(WARNING) << "Not handling interprocess notification as browser"
|
||||
" is shutting down";
|
||||
// Send back "SHUTDOWN" message, so that the client process can start up
|
||||
@@ -685,6 +694,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage(
|
||||
@@ -684,6 +693,22 @@ void ProcessSingleton::LinuxWatcher::HandleMessage(
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
void ProcessSingleton::LinuxWatcher::RemoveSocketReader(SocketReader* reader) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::IO);
|
||||
DCHECK(reader);
|
||||
@@ -720,7 +745,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
@@ -719,7 +744,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
const size_t kMinMessageLength = std::size(kStartToken) + 4;
|
||||
if (bytes_read_ < kMinMessageLength) {
|
||||
buf_[bytes_read_] = 0;
|
||||
@@ -750,10 +776,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
@@ -749,10 +775,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
tokens.erase(tokens.begin());
|
||||
tokens.erase(tokens.begin());
|
||||
|
||||
@@ -217,7 +217,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
fd_watch_controller_.reset();
|
||||
|
||||
// LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader
|
||||
@@ -782,8 +826,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
@@ -781,8 +825,12 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
//
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const base::FilePath& user_data_dir,
|
||||
@@ -231,7 +231,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
current_pid_(base::GetCurrentProcId()),
|
||||
watcher_(new LinuxWatcher(this)) {
|
||||
socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename);
|
||||
@@ -902,7 +950,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -901,7 +949,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
sizeof(socket_timeout));
|
||||
|
||||
// Found another process, prepare our command line
|
||||
@@ -241,7 +241,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
std::string to_send(kStartToken);
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
|
||||
@@ -912,11 +961,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -911,11 +960,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
to_send.append(current_dir.value());
|
||||
|
||||
const std::vector<std::string>& argv = cmd_line.argv();
|
||||
@@ -263,7 +263,7 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
// Send the message
|
||||
if (!WriteToSocket(socket.fd(), to_send.data(), to_send.length())) {
|
||||
// Try to kill the other process, because it might have been dead.
|
||||
@@ -958,6 +1017,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -957,6 +1016,17 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
linux_ui->NotifyWindowManagerStartupComplete();
|
||||
#endif
|
||||
|
||||
@@ -282,10 +282,21 @@ index be2c417c07a4206fac4a9a6c03e516fd0493c942..78f74b0b21242553b6af98628dc48190
|
||||
return PROCESS_NOTIFIED;
|
||||
}
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d05018b627 100644
|
||||
index 0c87fc8ccb4511904f19b76ae5e03a5df6664391..83ede77121c5dadbde8b0a4132de1dba6eeb5b52 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -21,6 +21,7 @@
|
||||
@@ -13,15 +13,18 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/debug/activity_tracker.h"
|
||||
#include "base/files/file_path.h"
|
||||
+#include "base/files/file_util.h"
|
||||
#include "base/logging.h"
|
||||
#include "base/metrics/histogram_functions.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/process/process.h"
|
||||
#include "base/process/process_info.h"
|
||||
#include "base/strings/escape.h"
|
||||
+#include "base/rand_util.h"
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/time/time.h"
|
||||
@@ -293,11 +304,10 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
#include "base/trace_event/base_tracing.h"
|
||||
#include "base/win/registry.h"
|
||||
#include "base/win/scoped_handle.h"
|
||||
@@ -45,6 +46,14 @@
|
||||
@@ -45,6 +48,13 @@
|
||||
namespace {
|
||||
|
||||
const char kLockfile[] = "lockfile";
|
||||
+const LPCWSTR kPipeName = L"\\\\.\\pipe\\electronAckPipe";
|
||||
+const DWORD kPipeTimeout = 10000;
|
||||
+const DWORD kMaxMessageLength = 32 * 1024;
|
||||
+
|
||||
@@ -308,7 +318,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
|
||||
// A helper class that acquires the given |mutex| while the AutoLockMutex is in
|
||||
// scope.
|
||||
@@ -80,10 +89,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||
@@ -80,10 +90,12 @@ BOOL CALLBACK BrowserWindowEnumeration(HWND window, LPARAM param) {
|
||||
|
||||
bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
base::CommandLine* parsed_command_line,
|
||||
@@ -323,7 +333,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
static const int min_message_size = 7;
|
||||
if (cds->cbData < min_message_size * sizeof(wchar_t) ||
|
||||
cds->cbData % sizeof(wchar_t) != 0) {
|
||||
@@ -133,11 +144,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
@@ -133,11 +145,82 @@ bool ParseCommandLine(const COPYDATASTRUCT* cds,
|
||||
const std::wstring cmd_line =
|
||||
msg.substr(second_null + 1, third_null - second_null);
|
||||
*parsed_command_line = base::CommandLine::FromString(cmd_line);
|
||||
@@ -406,7 +416,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
bool ProcessLaunchNotification(
|
||||
const ProcessSingleton::NotificationCallback& notification_callback,
|
||||
UINT message,
|
||||
@@ -151,16 +233,35 @@ bool ProcessLaunchNotification(
|
||||
@@ -151,16 +234,35 @@ bool ProcessLaunchNotification(
|
||||
|
||||
// Handle the WM_COPYDATA message from another process.
|
||||
const COPYDATASTRUCT* cds = reinterpret_cast<COPYDATASTRUCT*>(lparam);
|
||||
@@ -446,7 +456,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -261,9 +362,13 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
@@ -261,9 +363,13 @@ bool ProcessSingleton::EscapeVirtualization(
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const std::string& program_name,
|
||||
const base::FilePath& user_data_dir,
|
||||
@@ -461,16 +471,26 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
program_name_(program_name),
|
||||
is_app_sandboxed_(is_app_sandboxed),
|
||||
is_virtualized_(false),
|
||||
@@ -278,6 +383,37 @@ ProcessSingleton::~ProcessSingleton() {
|
||||
@@ -278,6 +384,47 @@ ProcessSingleton::~ProcessSingleton() {
|
||||
::CloseHandle(lock_file_);
|
||||
}
|
||||
|
||||
+void ReadAck(const ProcessSingleton::NotificationAckCallback& ack_callback) {
|
||||
+void ReadAck(const ProcessSingleton::NotificationAckCallback& ack_callback,
|
||||
+ const std::string program_name,
|
||||
+ base::FilePath& user_data_dir) {
|
||||
+ // We are reading the ack from the first instance.
|
||||
+ // First, wait for the pipe.
|
||||
+ ::WaitNamedPipe(kPipeName, NMPWAIT_USE_DEFAULT_WAIT);
|
||||
+ HWND remote_window = chrome::FindRunningChromeWindow(user_data_dir);
|
||||
+ DWORD process_id;
|
||||
+ DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id);
|
||||
+ std::string identifier = base::NumberToString(process_id) +
|
||||
+ base::NumberToString(thread_id);
|
||||
+ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier +
|
||||
+ program_name);
|
||||
+ const LPCWSTR w_pipe_name = pipe_name.c_str();
|
||||
+ ::WaitNamedPipe(w_pipe_name, NMPWAIT_USE_DEFAULT_WAIT);
|
||||
+
|
||||
+ HANDLE read_ack_pipe = ::CreateFile(kPipeName,
|
||||
+ HANDLE read_ack_pipe = ::CreateFile(w_pipe_name,
|
||||
+ GENERIC_READ,
|
||||
+ FILE_SHARE_READ,
|
||||
+ NULL,
|
||||
@@ -499,23 +519,31 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
// Code roughly based on Mozilla.
|
||||
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
TRACE_EVENT0("startup", "ProcessSingleton::NotifyOtherProcess");
|
||||
@@ -290,8 +426,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -290,8 +437,9 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
return PROCESS_NONE;
|
||||
}
|
||||
|
||||
- switch (chrome::AttemptToNotifyRunningChrome(remote_window_)) {
|
||||
+ switch (chrome::AttemptToNotifyRunningChrome(remote_window_, additional_data_)) {
|
||||
case chrome::NOTIFY_SUCCESS:
|
||||
+ ReadAck(notification_ack_callback_);
|
||||
+ ReadAck(notification_ack_callback_, program_name_, user_data_dir_);
|
||||
return PROCESS_NOTIFIED;
|
||||
case chrome::NOTIFY_FAILED:
|
||||
remote_window_ = NULL;
|
||||
@@ -429,6 +566,18 @@ bool ProcessSingleton::Create() {
|
||||
@@ -429,6 +577,26 @@ bool ProcessSingleton::Create() {
|
||||
<< "Lock file can not be created! Error code: " << error;
|
||||
|
||||
if (lock_file_ != INVALID_HANDLE_VALUE) {
|
||||
+ // We are the first instance. Create a pipe to send out ack data.
|
||||
+ ack_pipe_ = ::CreateNamedPipe(kPipeName,
|
||||
+ // Create a per-process pipename using a combination of the
|
||||
+ // username, process id, thread id, and program name. Pipe names max
|
||||
+ // at 256 characters, can include any character other than a backslash
|
||||
+ std::string identifier = base::NumberToString(::GetCurrentProcessId()) +
|
||||
+ base::NumberToString(::GetCurrentThreadId());
|
||||
+ std::wstring pipe_name = base::UTF8ToWide("\\\\.\\pipe\\" + identifier +
|
||||
+ program_name_);
|
||||
+ const LPCWSTR w_pipe_name = pipe_name.c_str();
|
||||
+ ack_pipe_ = ::CreateNamedPipe(w_pipe_name,
|
||||
+ PIPE_ACCESS_OUTBOUND,
|
||||
+ PIPE_TYPE_BYTE | PIPE_REJECT_REMOTE_CLIENTS,
|
||||
+ PIPE_UNLIMITED_INSTANCES,
|
||||
@@ -529,7 +557,7 @@ index ec725b44296266bea1a51aea889463a0bba8449c..3bb74c08cd78b11cd9925a6bfafc62d0
|
||||
// Set the window's title to the path of our user data directory so
|
||||
// other Chrome instances can decide if they should forward to us.
|
||||
TRACE_EVENT0("startup", "ProcessSingleton::Create:CreateWindow");
|
||||
@@ -456,6 +605,7 @@ bool ProcessSingleton::Create() {
|
||||
@@ -456,6 +624,7 @@ bool ProcessSingleton::Create() {
|
||||
}
|
||||
|
||||
void ProcessSingleton::Cleanup() {
|
||||
|
||||
@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
|
||||
whole bunch more useful!
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
index a284d187968914b4304eb49362b2a8ccafa5e5c2..d6f8bf39c47cfc622dec5736d82ccc308d406cfa 100644
|
||||
index b72ede668172bd8202b1d52736e4eb4ffe84d619..7ec7e3883925b50b064682e8976d09b18222d637 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
@@ -162,6 +162,7 @@ void MessagePort::close() {
|
||||
@@ -166,6 +166,7 @@ void MessagePort::close() {
|
||||
Entangle(pipe.TakePort0());
|
||||
}
|
||||
closed_ = true;
|
||||
@@ -22,7 +22,7 @@ index a284d187968914b4304eb49362b2a8ccafa5e5c2..d6f8bf39c47cfc622dec5736d82ccc30
|
||||
|
||||
void MessagePort::Entangle(MessagePortDescriptor port) {
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
|
||||
index c5e0fefac929d4a484488761741d42f2b002f7a1..83d7901d99ad01ba039ea1ffa3dbee2595fc31ff 100644
|
||||
index 30d13d1e47e3acc7df6ce5c627fd7b3a32c3edc4..f9baba3c6d13992508da48a13c97bb10c8ec56e0 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.h
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.h
|
||||
@@ -120,6 +120,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
|
||||
|
||||
@@ -81,7 +81,7 @@ index 309422bcf85810db88a048bd0930c4072b41f234..759549f3046f4a897b597409b670bb1c
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 002b3ddfb0f77b787b74ee088578e3eb813d0192..a9003a98546bbfe78e2d30457a032218cc263441 100644
|
||||
index fe988e3bbcf0c9deb5592f24fdeda3016114e3bf..da82b0458d0c87cf4de793007b826984d010cbb2 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -139,6 +139,8 @@ viz_component("service") {
|
||||
@@ -653,7 +653,7 @@ index de00e766ba17532e10dcf5d0fd31fa344920a9f7..7aaedf83ad22dcc1d2dd39a31cf7e08b
|
||||
float scale_factor;
|
||||
};
|
||||
diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
|
||||
index c7035798bd867f51b39f36f1be79293bf2b5cc12..131446361de812f9b915483bca2b6d2165b65e3d 100644
|
||||
index a80185658d82c67713e578d176955c442f0568ab..e29003b3b6def9a1f842139f4269893a2609a601 100644
|
||||
--- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
|
||||
+++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
|
||||
@@ -52,6 +52,9 @@ bool StructTraits<gfx::mojom::CALayerParamsDataView, gfx::CALayerParams>::Read(
|
||||
|
||||
@@ -103,10 +103,10 @@ index 4c4cc16db82d7434573f7740855fbe72d68815e6..f71290800b6bb51a39b1f86be36f02d6
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index c79ad06ecb80ea431bf48c16e413286c768e2316..2a5cce5b467e79df1f34d7318862fd16134b74c3 100644
|
||||
index 44ea9794a42eb9d2f0bcff722a05e530dbfff10c..318da554d3326b376898689c80b576979c564c5e 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -469,6 +469,7 @@ URLLoader::URLLoader(
|
||||
@@ -468,6 +468,7 @@ URLLoader::URLLoader(
|
||||
mojo::SimpleWatcher::ArmingPolicy::MANUAL,
|
||||
base::SequencedTaskRunnerHandle::Get()),
|
||||
per_factory_corb_state_(context.GetMutableCorbState()),
|
||||
@@ -114,7 +114,7 @@ index c79ad06ecb80ea431bf48c16e413286c768e2316..2a5cce5b467e79df1f34d7318862fd16
|
||||
devtools_request_id_(request.devtools_request_id),
|
||||
request_mode_(request.mode),
|
||||
request_credentials_mode_(request.credentials_mode),
|
||||
@@ -636,7 +637,7 @@ URLLoader::URLLoader(
|
||||
@@ -620,7 +621,7 @@ URLLoader::URLLoader(
|
||||
url_request_->SetRequestHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
|
||||
|
||||
@@ -123,7 +123,7 @@ index c79ad06ecb80ea431bf48c16e413286c768e2316..2a5cce5b467e79df1f34d7318862fd16
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1427,6 +1428,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1347,6 +1348,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
@@ -144,10 +144,10 @@ index c79ad06ecb80ea431bf48c16e413286c768e2316..2a5cce5b467e79df1f34d7318862fd16
|
||||
|
||||
// Parse and remove the Trust Tokens response headers, if any are expected,
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index e235b3cc8657e081063709f6d2cd6e0b2e99f2b2..15b77b8648b905711df8551b1645b14dd7d6fd87 100644
|
||||
index abc8ecdcd717b06552af7cf5c4e4e8f60db16ec1..4f633b5a818388f6cfd30a15496c94dde1e2b48c 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -502,6 +502,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -497,6 +497,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
|
||||
@@ -1,874 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <keeleymhammond@gmail.com>
|
||||
Date: Sun, 8 May 2022 17:21:12 -0700
|
||||
Subject: feat: replace ad-hoc SetPublicFirstPartySets calls with method in
|
||||
ContentBrowserClient
|
||||
|
||||
Cherry-picked from upstream Chromium. This patch can be removed when the
|
||||
fix is inherited from the next Chromium roll backport.
|
||||
|
||||
This essentially requires
|
||||
embedders to indicate whether they will
|
||||
(maybe asynchronously) call SetPublicFirstPartySets during startup, or
|
||||
not. This makes it easier to initialize First-Party Sets properly, since
|
||||
it is now done via a pull-based interface rather than a push-based
|
||||
interface (which would require code in every embedder in order to
|
||||
set up the First-Party Sets backend). Now, there is a single place (in
|
||||
content) that handles every embedder that won't need to explicitly call
|
||||
SetPublicFirstPartySets at some point (e.g. after initializing
|
||||
Component Updater, in Chrome's case).
|
||||
|
||||
Bug: 1321908
|
||||
Change-Id: I47eaaaf77e548079e1bd6360fd573e877aa79b32
|
||||
Reviewed-on:
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/3623985
|
||||
Reviewed-by: Avi Drissman <avi@chromium.org>
|
||||
Commit-Queue: Chris Fredrickson <cfredric@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#999047}
|
||||
|
||||
Patch-Filename:
|
||||
feat_move_firstpartysets_to_content_browser_client.patch
|
||||
|
||||
diff --git a/chrome/browser/chrome_browser_main.cc b/chrome/browser/chrome_browser_main.cc
|
||||
index e07874dc5a2fab83dff0a07d35aeb0cad7a1a67c..9f635870282f0f2a9b8bfaaa59e34f91675dcda3 100644
|
||||
--- a/chrome/browser/chrome_browser_main.cc
|
||||
+++ b/chrome/browser/chrome_browser_main.cc
|
||||
@@ -1601,10 +1601,6 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
|
||||
// called inside PostProfileInit and depends on it.
|
||||
if (!parsed_command_line().HasSwitch(switches::kDisableComponentUpdate)) {
|
||||
component_updater::RegisterComponentsForUpdate();
|
||||
- } else {
|
||||
- // Initialize First-Party Sets even if component updater is disabled.
|
||||
- content::FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets(
|
||||
- base::File());
|
||||
}
|
||||
|
||||
// TODO(stevenjb): Move WIN and MACOSX specific code to appropriate Parts.
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
||||
index 3943c32ab29e785f401c2a5b31f1f6ed832514f0..939c28a029418bc353795aa1a007508680f42e57 100644
|
||||
--- a/chrome/browser/chrome_content_browser_client.cc
|
||||
+++ b/chrome/browser/chrome_content_browser_client.cc
|
||||
@@ -6462,6 +6462,12 @@ bool ChromeContentBrowserClient::IsFirstPartySetsEnabled() {
|
||||
return local_state->GetBoolean(first_party_sets::kFirstPartySetsEnabled);
|
||||
}
|
||||
|
||||
+bool ChromeContentBrowserClient::WillProvidePublicFirstPartySets() {
|
||||
+ return !base::CommandLine::ForCurrentProcess()->HasSwitch(
|
||||
+ switches::kDisableComponentUpdate) &&
|
||||
+ base::FeatureList::IsEnabled(features::kFirstPartySets);
|
||||
+}
|
||||
+
|
||||
base::Value::Dict ChromeContentBrowserClient::GetFirstPartySetsOverrides() {
|
||||
if (!g_browser_process) {
|
||||
// If browser process doesn't exist (e.g. in minimal mode on Android),
|
||||
diff --git a/chrome/browser/chrome_content_browser_client.h b/chrome/browser/chrome_content_browser_client.h
|
||||
index f0415a5099cdf181ab620fb6400db4f524c2c892..016b8276feeb6c35c88bc779ae84eea38d66f57d 100644
|
||||
--- a/chrome/browser/chrome_content_browser_client.h
|
||||
+++ b/chrome/browser/chrome_content_browser_client.h
|
||||
@@ -772,6 +772,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
|
||||
|
||||
bool IsFindInPageDisabledForOrigin(const url::Origin& origin) override;
|
||||
bool IsFirstPartySetsEnabled() override;
|
||||
+ bool WillProvidePublicFirstPartySets() override;
|
||||
base::Value::Dict GetFirstPartySetsOverrides() override;
|
||||
|
||||
bool ShouldPreconnectNavigation(
|
||||
diff --git a/content/browser/first_party_sets/first_party_set_parser.cc b/content/browser/first_party_sets/first_party_set_parser.cc
|
||||
index b03570f072f407a1d2c6a58646db0f48a845429d..3ac5c0d206c7910e5ae653004e96780c14c8315d 100644
|
||||
--- a/content/browser/first_party_sets/first_party_set_parser.cc
|
||||
+++ b/content/browser/first_party_sets/first_party_set_parser.cc
|
||||
@@ -323,4 +323,4 @@ FirstPartySetParser::ParseSetsFromEnterprisePolicy(
|
||||
return absl::nullopt;
|
||||
}
|
||||
|
||||
-} // namespace content
|
||||
+} // namespace content
|
||||
\ No newline at end of file
|
||||
diff --git a/content/browser/first_party_sets/first_party_set_parser.h b/content/browser/first_party_sets/first_party_set_parser.h
|
||||
index 491a8b508ef0d093f37608d2fde615427b9319df..3f33b1604fecbff0d4db8739ad138d95223b579c 100644
|
||||
--- a/content/browser/first_party_sets/first_party_set_parser.h
|
||||
+++ b/content/browser/first_party_sets/first_party_set_parser.h
|
||||
@@ -102,4 +102,4 @@ class CONTENT_EXPORT FirstPartySetParser {
|
||||
|
||||
} // namespace content
|
||||
|
||||
-#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SET_PARSER_H_
|
||||
+#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SET_PARSER_H_
|
||||
\ No newline at end of file
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_handler_impl.cc b/content/browser/first_party_sets/first_party_sets_handler_impl.cc
|
||||
index e5d277236b6393d35e8cf5a69c7f6d16f3394582..bb6840eecabfab9e9f0ae6b0fdc4e4436d1ea3b1 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_handler_impl.cc
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_handler_impl.cc
|
||||
@@ -74,7 +74,8 @@ FirstPartySetsHandler* FirstPartySetsHandler::GetInstance() {
|
||||
// static
|
||||
FirstPartySetsHandlerImpl* FirstPartySetsHandlerImpl::GetInstance() {
|
||||
static base::NoDestructor<FirstPartySetsHandlerImpl> instance(
|
||||
- GetContentClient()->browser()->IsFirstPartySetsEnabled());
|
||||
+ GetContentClient()->browser()->IsFirstPartySetsEnabled(),
|
||||
+ GetContentClient()->browser()->WillProvidePublicFirstPartySets());
|
||||
return instance.get();
|
||||
}
|
||||
|
||||
@@ -89,8 +90,12 @@ FirstPartySetsHandler::ValidateEnterprisePolicy(
|
||||
policy, /*out_sets=*/nullptr);
|
||||
}
|
||||
|
||||
-FirstPartySetsHandlerImpl::FirstPartySetsHandlerImpl(bool enabled)
|
||||
- : enabled_(enabled) {
|
||||
+FirstPartySetsHandlerImpl::FirstPartySetsHandlerImpl(
|
||||
+ bool enabled,
|
||||
+ bool embedder_will_provide_public_sets)
|
||||
+ : enabled_(enabled),
|
||||
+ embedder_will_provide_public_sets_(enabled &&
|
||||
+ embedder_will_provide_public_sets) {
|
||||
sets_loader_ = std::make_unique<FirstPartySetsLoader>(
|
||||
base::BindOnce(&FirstPartySetsHandlerImpl::SetCompleteSets,
|
||||
// base::Unretained(this) is safe here because
|
||||
@@ -112,12 +117,23 @@ void FirstPartySetsHandlerImpl::Init(const base::FilePath& user_data_dir,
|
||||
const std::string& flag_value,
|
||||
SetsReadyOnceCallback on_sets_ready) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(!initialized_);
|
||||
+ DCHECK(persisted_sets_path_.empty());
|
||||
+ DCHECK(on_sets_ready_.is_null());
|
||||
+
|
||||
+ initialized_ = true;
|
||||
on_sets_ready_ = std::move(on_sets_ready);
|
||||
SetPersistedSets(user_data_dir);
|
||||
- SetManuallySpecifiedSet(flag_value);
|
||||
|
||||
- if (!IsEnabled())
|
||||
+ if (IsEnabled()) {
|
||||
+ DCHECK(!on_sets_ready_.is_null());
|
||||
+ sets_loader_->SetManuallySpecifiedSet(flag_value);
|
||||
+ if (!embedder_will_provide_public_sets_) {
|
||||
+ sets_loader_->SetComponentSets(base::File());
|
||||
+ }
|
||||
+ } else {
|
||||
SetCompleteSets({});
|
||||
+ }
|
||||
}
|
||||
|
||||
bool FirstPartySetsHandlerImpl::IsEnabled() const {
|
||||
@@ -127,16 +143,17 @@ bool FirstPartySetsHandlerImpl::IsEnabled() const {
|
||||
|
||||
void FirstPartySetsHandlerImpl::SetPublicFirstPartySets(base::File sets_file) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- if (!IsEnabled()) {
|
||||
- sets_loader_->DisposeFile(std::move(sets_file));
|
||||
- return;
|
||||
- }
|
||||
+ DCHECK(enabled_);
|
||||
+ DCHECK(embedder_will_provide_public_sets_);
|
||||
sets_loader_->SetComponentSets(std::move(sets_file));
|
||||
}
|
||||
|
||||
void FirstPartySetsHandlerImpl::ResetForTesting() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ initialized_ = false;
|
||||
enabled_ = GetContentClient()->browser()->IsFirstPartySetsEnabled();
|
||||
+ embedder_will_provide_public_sets_ =
|
||||
+ GetContentClient()->browser()->WillProvidePublicFirstPartySets();
|
||||
|
||||
// Initializes the `sets_loader_` member with a callback to SetCompleteSets
|
||||
// and the result of content::GetFirstPartySetsOverrides.
|
||||
@@ -153,19 +170,16 @@ void FirstPartySetsHandlerImpl::ResetForTesting() {
|
||||
raw_persisted_sets_ = absl::nullopt;
|
||||
}
|
||||
|
||||
-void FirstPartySetsHandlerImpl::SetManuallySpecifiedSet(
|
||||
- const std::string& flag_value) {
|
||||
- DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- if (!IsEnabled())
|
||||
- return;
|
||||
- sets_loader_->SetManuallySpecifiedSet(flag_value);
|
||||
-}
|
||||
-
|
||||
void FirstPartySetsHandlerImpl::SetPersistedSets(
|
||||
const base::FilePath& user_data_dir) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(!raw_persisted_sets_.has_value());
|
||||
+ DCHECK(persisted_sets_path_.empty());
|
||||
if (user_data_dir.empty()) {
|
||||
VLOG(1) << "Empty path. Failed loading serialized First-Party Sets file.";
|
||||
+ // We have to continue, in case the embedder has enabled FPS but has not
|
||||
+ // provided a directory to store persisted sets.
|
||||
+ OnReadPersistedSetsFile("");
|
||||
return;
|
||||
}
|
||||
persisted_sets_path_ = user_data_dir.Append(kPersistedFirstPartySetsFileName);
|
||||
@@ -184,19 +198,36 @@ void FirstPartySetsHandlerImpl::SetPersistedSets(
|
||||
void FirstPartySetsHandlerImpl::OnReadPersistedSetsFile(
|
||||
const std::string& raw_persisted_sets) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- DCHECK(!persisted_sets_path_.empty());
|
||||
+ DCHECK(!raw_persisted_sets_.has_value());
|
||||
raw_persisted_sets_ = raw_persisted_sets;
|
||||
UmaHistogramTimes(
|
||||
- "Cookie.FirstPartySets.InitializationDuration.ReadPersistedSets",
|
||||
+ "Cookie.FirstPartySets.InitializationDuration.ReadPersistedSets2",
|
||||
construction_timer_.Elapsed());
|
||||
- ClearSiteDataOnChangedSetsIfReady();
|
||||
+
|
||||
+ if (sets_.has_value()) {
|
||||
+ ClearSiteDataOnChangedSets();
|
||||
+
|
||||
+ if (IsEnabled()) {
|
||||
+ DCHECK(!on_sets_ready_.is_null());
|
||||
+ std::move(on_sets_ready_).Run(sets_.value());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
void FirstPartySetsHandlerImpl::SetCompleteSets(
|
||||
base::flat_map<net::SchemefulSite, net::SchemefulSite> sets) {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(!sets_.has_value());
|
||||
sets_ = std::move(sets);
|
||||
- ClearSiteDataOnChangedSetsIfReady();
|
||||
+
|
||||
+ if (raw_persisted_sets_.has_value()) {
|
||||
+ ClearSiteDataOnChangedSets();
|
||||
+
|
||||
+ if (IsEnabled()) {
|
||||
+ DCHECK(!on_sets_ready_.is_null());
|
||||
+ std::move(on_sets_ready_).Run(sets_.value());
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
// static
|
||||
@@ -229,10 +260,10 @@ base::flat_set<net::SchemefulSite> FirstPartySetsHandlerImpl::ComputeSetsDiff(
|
||||
return result;
|
||||
}
|
||||
|
||||
-void FirstPartySetsHandlerImpl::ClearSiteDataOnChangedSetsIfReady() {
|
||||
+void FirstPartySetsHandlerImpl::ClearSiteDataOnChangedSets() const {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- if (!raw_persisted_sets_.has_value() || !sets_.has_value())
|
||||
- return;
|
||||
+ DCHECK(sets_.has_value());
|
||||
+ DCHECK(raw_persisted_sets_.has_value());
|
||||
|
||||
base::flat_set<net::SchemefulSite> diff =
|
||||
ComputeSetsDiff(FirstPartySetParser::DeserializeFirstPartySets(
|
||||
@@ -241,14 +272,13 @@ void FirstPartySetsHandlerImpl::ClearSiteDataOnChangedSetsIfReady() {
|
||||
|
||||
// TODO(shuuran@chromium.org): Implement site state clearing.
|
||||
|
||||
- if (!on_sets_ready_.is_null() && IsEnabledAndReady())
|
||||
- std::move(on_sets_ready_).Run(sets_.value());
|
||||
-
|
||||
- base::ThreadPool::PostTask(
|
||||
- FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
|
||||
- base::BindOnce(
|
||||
- &MaybeWriteSetsToDisk, persisted_sets_path_,
|
||||
- FirstPartySetParser::SerializeFirstPartySets(sets_.value())));
|
||||
+ if (!persisted_sets_path_.empty()) {
|
||||
+ base::ThreadPool::PostTask(
|
||||
+ FROM_HERE, {base::MayBlock(), base::TaskPriority::BEST_EFFORT},
|
||||
+ base::BindOnce(
|
||||
+ &MaybeWriteSetsToDisk, persisted_sets_path_,
|
||||
+ FirstPartySetParser::SerializeFirstPartySets(sets_.value())));
|
||||
+ }
|
||||
}
|
||||
|
||||
bool FirstPartySetsHandlerImpl::IsEnabledAndReady() const {
|
||||
@@ -256,4 +286,4 @@ bool FirstPartySetsHandlerImpl::IsEnabledAndReady() const {
|
||||
return IsEnabled() && sets_.has_value();
|
||||
}
|
||||
|
||||
-} // namespace content
|
||||
+} // namespace content
|
||||
\ No newline at end of file
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_handler_impl.h b/content/browser/first_party_sets/first_party_sets_handler_impl.h
|
||||
index a60adcd16b5b8911965f9a22c2e70b5044150758..829cd96245cbe39eeddecf2e0403f2ba1ab88793 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_handler_impl.h
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_handler_impl.h
|
||||
@@ -55,10 +55,9 @@ class CONTENT_EXPORT FirstPartySetsHandlerImpl : public FirstPartySetsHandler {
|
||||
// persisted sets, since we may still need to clear data from a previous
|
||||
// invocation of Chromium which had First-Party Sets enabled.
|
||||
//
|
||||
- // TODO(https://crbug.com/1309188): Init() should be called in the
|
||||
- // BrowserMainLoop::PreMainMessageLoopRun(). But just in case it's
|
||||
- // accidentally called from other places, make sure it's no-op for the
|
||||
- // following calls.
|
||||
+ // If First-Party Sets is enabled, `on_sets_ready` must not be null.
|
||||
+ //
|
||||
+ // Must be called exactly once.
|
||||
void Init(const base::FilePath& user_data_dir,
|
||||
const std::string& flag_value,
|
||||
SetsReadyOnceCallback on_sets_ready);
|
||||
@@ -78,6 +77,11 @@ class CONTENT_EXPORT FirstPartySetsHandlerImpl : public FirstPartySetsHandler {
|
||||
enabled_ = enabled;
|
||||
}
|
||||
|
||||
+ void SetEmbedderWillProvidePublicSetsForTesting(bool will_provide) {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ embedder_will_provide_public_sets_ = enabled_ && will_provide;
|
||||
+ }
|
||||
+
|
||||
// Compares the map `old_sets` to `current_sets` and returns the set of sites
|
||||
// that: 1) were in `old_sets` but are no longer in `current_sets`, i.e. leave
|
||||
// the FPSs; or, 2) mapped to a different owner site.
|
||||
@@ -92,41 +96,38 @@ class CONTENT_EXPORT FirstPartySetsHandlerImpl : public FirstPartySetsHandler {
|
||||
private:
|
||||
friend class base::NoDestructor<FirstPartySetsHandlerImpl>;
|
||||
|
||||
- explicit FirstPartySetsHandlerImpl(bool enabled);
|
||||
+ FirstPartySetsHandlerImpl(bool enabled,
|
||||
+ bool embedder_will_provide_public_sets);
|
||||
|
||||
// This method reads the persisted First-Party Sets from the file under
|
||||
- // `user_data_dir`.
|
||||
+ // `user_data_dir`. Must be called exactly once.
|
||||
void SetPersistedSets(const base::FilePath& user_data_dir);
|
||||
|
||||
- // Stores the read persisted sets in `raw_persisted_sets_`.
|
||||
+ // Stores the read persisted sets in `raw_persisted_sets_`. Must be called
|
||||
+ // exactly once.
|
||||
void OnReadPersistedSetsFile(const std::string& raw_persisted_sets);
|
||||
|
||||
- // Parses and sets the First-Party Set that was provided via the
|
||||
- // `kUseFirstPartySet` flag/switch.
|
||||
- //
|
||||
- // Has no effect if `kFirstPartySets` is disabled, or
|
||||
- // `SetPublicFirstPartySets` is not called.
|
||||
- void SetManuallySpecifiedSet(const std::string& flag_value);
|
||||
-
|
||||
- // Sets the current First-Party Sets data.
|
||||
+ // Sets the current First-Party Sets data. Must be called exactly once.
|
||||
void SetCompleteSets(FlattenedSets sets);
|
||||
|
||||
- // Checks the required inputs have been received, and if so:
|
||||
+ // Does the following:
|
||||
// 1) computes the diff between the `sets_` and the parsed
|
||||
// `raw_persisted_sets_`;
|
||||
// 2) clears the site data of the set of sites based on the diff;
|
||||
- // 3) calls `on_sets_ready_` if conditions are met;
|
||||
- // 4) writes the current First-Party Sets to the file in
|
||||
+ // 3) writes the current First-Party Sets to the file in
|
||||
// `persisted_sets_path_`.
|
||||
//
|
||||
// TODO(shuuran@chromium.org): Implement the code to clear site state.
|
||||
- void ClearSiteDataOnChangedSetsIfReady();
|
||||
+ void ClearSiteDataOnChangedSets() const;
|
||||
|
||||
// Returns true if:
|
||||
// * First-Party Sets are enabled;
|
||||
// * `sets_` is ready to be used.
|
||||
bool IsEnabledAndReady() const;
|
||||
|
||||
+ // Whether Init has been called already or not.
|
||||
+ bool initialized_ = false;
|
||||
+
|
||||
// Represents the mapping of site -> site, where keys are members of sets, and
|
||||
// values are owners of the sets. Owners are explicitly represented as members
|
||||
// of the set.
|
||||
@@ -144,6 +145,7 @@ class CONTENT_EXPORT FirstPartySetsHandlerImpl : public FirstPartySetsHandler {
|
||||
base::FilePath persisted_sets_path_ GUARDED_BY_CONTEXT(sequence_checker_);
|
||||
|
||||
bool enabled_ GUARDED_BY_CONTEXT(sequence_checker_);
|
||||
+ bool embedder_will_provide_public_sets_ GUARDED_BY_CONTEXT(sequence_checker_);
|
||||
|
||||
// We use a OnceCallback to ensure we only pass along the sets once
|
||||
// during Chrome's lifetime (modulo reconfiguring the network service).
|
||||
@@ -160,4 +162,4 @@ class CONTENT_EXPORT FirstPartySetsHandlerImpl : public FirstPartySetsHandler {
|
||||
|
||||
} // namespace content
|
||||
|
||||
-#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_HANDLER_IMPL_H_
|
||||
+#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_HANDLER_IMPL_H_
|
||||
\ No newline at end of file
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc b/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc
|
||||
index 0c0eeda67a8a4bdc9876f5ad3fe78c06c4f18b5d..3e92801eb25e339e6b3a43b5fadab8f1b78b23f9 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_handler_impl_unittest.cc
|
||||
@@ -367,14 +367,6 @@ TEST_F(FirstPartySetsHandlerImplDisabledTest, IgnoresValid) {
|
||||
FAIL(); // Should not be called.
|
||||
}));
|
||||
|
||||
- // Set required inputs to be able to receive the merged sets from
|
||||
- // FirstPartySetsLoader.
|
||||
- const std::string input =
|
||||
- "{\"owner\": \"https://example.test\",\"members\": "
|
||||
- "[\"https://aaaa.test\"]}";
|
||||
- ASSERT_TRUE(base::JSONReader::Read(input));
|
||||
- SetPublicFirstPartySetsAndWait(input);
|
||||
-
|
||||
env().RunUntilIdle();
|
||||
|
||||
// TODO(shuuran@chromium.org): test site state is cleared.
|
||||
@@ -397,9 +389,6 @@ TEST_F(FirstPartySetsHandlerImplDisabledTest,
|
||||
FAIL(); // Should not be called.
|
||||
}));
|
||||
|
||||
- SetPublicFirstPartySetsAndWait(R"({"owner": "https://example.test", )"
|
||||
- R"("members": ["https://member.test"]})");
|
||||
-
|
||||
EXPECT_EQ(
|
||||
FirstPartySetsHandlerImpl::GetInstance()->GetSetsIfEnabledAndReady(),
|
||||
absl::nullopt);
|
||||
@@ -413,11 +402,6 @@ class FirstPartySetsHandlerImplEnabledTest
|
||||
};
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest, PersistedSetsNotReady) {
|
||||
- const std::string input = R"({"owner": "https://foo.test", )"
|
||||
- R"("members": ["https://member2.test"]})";
|
||||
- ASSERT_TRUE(base::JSONReader::Read(input));
|
||||
- SetPublicFirstPartySetsAndWait(input);
|
||||
-
|
||||
// Empty `user_data_dir` will fail loading persisted sets.
|
||||
FirstPartySetsHandlerImpl::GetInstance()->Init(
|
||||
/*user_data_dir=*/{},
|
||||
@@ -431,6 +415,8 @@ TEST_F(FirstPartySetsHandlerImplEnabledTest, PersistedSetsNotReady) {
|
||||
}
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest, PublicFirstPartySetsNotReady) {
|
||||
+ FirstPartySetsHandlerImpl::GetInstance()
|
||||
+ ->SetEmbedderWillProvidePublicSetsForTesting(true);
|
||||
ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}"));
|
||||
|
||||
// Persisted sets are expected to be loaded with the provided path.
|
||||
@@ -447,6 +433,8 @@ TEST_F(FirstPartySetsHandlerImplEnabledTest, PublicFirstPartySetsNotReady) {
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest,
|
||||
Successful_PersistedSetsFileNotExist) {
|
||||
+ FirstPartySetsHandlerImpl::GetInstance()
|
||||
+ ->SetEmbedderWillProvidePublicSetsForTesting(true);
|
||||
const std::string input = R"({"owner": "https://foo.test", )"
|
||||
R"("members": ["https://member2.test"]})";
|
||||
ASSERT_TRUE(base::JSONReader::Read(input));
|
||||
@@ -479,6 +467,8 @@ TEST_F(FirstPartySetsHandlerImplEnabledTest,
|
||||
}
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest, Successful_PersistedSetsEmpty) {
|
||||
+ FirstPartySetsHandlerImpl::GetInstance()
|
||||
+ ->SetEmbedderWillProvidePublicSetsForTesting(true);
|
||||
ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}"));
|
||||
|
||||
const std::string input = R"({"owner": "https://foo.test", )"
|
||||
@@ -514,6 +504,8 @@ TEST_F(FirstPartySetsHandlerImplEnabledTest, Successful_PersistedSetsEmpty) {
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest,
|
||||
GetSetsIfEnabledAndReady_AfterSetsReady) {
|
||||
+ FirstPartySetsHandlerImpl::GetInstance()
|
||||
+ ->SetEmbedderWillProvidePublicSetsForTesting(true);
|
||||
ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}"));
|
||||
|
||||
const std::string input = R"({"owner": "https://example.test", )"
|
||||
@@ -549,6 +541,8 @@ TEST_F(FirstPartySetsHandlerImplEnabledTest,
|
||||
|
||||
TEST_F(FirstPartySetsHandlerImplEnabledTest,
|
||||
GetSetsIfEnabledAndReady_BeforeSetsReady) {
|
||||
+ FirstPartySetsHandlerImpl::GetInstance()
|
||||
+ ->SetEmbedderWillProvidePublicSetsForTesting(true);
|
||||
ASSERT_TRUE(base::WriteFile(persisted_sets_path_, "{}"));
|
||||
|
||||
// Call GetSetsIfEnabledAndReady before the sets are ready.
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_loader.cc b/content/browser/first_party_sets/first_party_sets_loader.cc
|
||||
index 52acedfde41b85acfc9246121ccfd6e63290270e..c229815ff14160c4f325fb51473e3b4baf5a9891 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_loader.cc
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_loader.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "base/strings/string_split.h"
|
||||
#include "base/task/thread_pool.h"
|
||||
#include "base/values.h"
|
||||
+#include "content/browser/first_party_sets/addition_overlaps_union_find.h"
|
||||
#include "content/browser/first_party_sets/first_party_set_parser.h"
|
||||
#include "net/base/schemeful_site.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -66,6 +67,37 @@ std::string ReadSetsFile(base::File sets_file) {
|
||||
return base::ReadStreamToString(file.get(), &raw_sets) ? raw_sets : "";
|
||||
}
|
||||
|
||||
+// Creates a set of SchemefulSites present with the given list of SingleSets.
|
||||
+base::flat_set<net::SchemefulSite> FlattenSingleSetList(
|
||||
+ const std::vector<content::FirstPartySetsLoader::SingleSet>& sets) {
|
||||
+ std::vector<net::SchemefulSite> sites;
|
||||
+ for (const content::FirstPartySetsLoader::SingleSet& set : sets) {
|
||||
+ sites.push_back(set.first);
|
||||
+ sites.insert(sites.end(), set.second.begin(), set.second.end());
|
||||
+ }
|
||||
+ return sites;
|
||||
+}
|
||||
+
|
||||
+// Populates the `policy_set_overlaps` out-parameter by checking
|
||||
+// `existing_sets`. If `site` is equal to an existing site e in `sets`, then
|
||||
+// `policy_set_index` will be added to the list of set indices at
|
||||
+// `policy_set_overlaps`[e].
|
||||
+void AddIfPolicySetOverlaps(
|
||||
+ const net::SchemefulSite& site,
|
||||
+ size_t policy_set_index,
|
||||
+ FirstPartySetsLoader::FlattenedSets existing_sets,
|
||||
+ base::flat_map<net::SchemefulSite, base::flat_set<size_t>>&
|
||||
+ policy_set_overlaps) {
|
||||
+ // Check `site` for membership in `existing_sets`.
|
||||
+ if (auto it = existing_sets.find(site); it != existing_sets.end()) {
|
||||
+ // Add the index of `site`'s policy set to the list of policy set indices
|
||||
+ // that also overlap with site_owner.
|
||||
+ auto [site_and_sets, inserted] =
|
||||
+ policy_set_overlaps.insert({it->second, {}});
|
||||
+ site_and_sets->second.insert(policy_set_index);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
} // namespace
|
||||
|
||||
FirstPartySetsLoader::FirstPartySetsLoader(
|
||||
@@ -89,7 +121,7 @@ void FirstPartySetsLoader::SetManuallySpecifiedSet(
|
||||
manually_specified_set_ = {CanonicalizeSet(base::SplitString(
|
||||
flag_value, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY))};
|
||||
UmaHistogramTimes(
|
||||
- "Cookie.FirstPartySets.InitializationDuration.ReadCommandLineSet",
|
||||
+ "Cookie.FirstPartySets.InitializationDuration.ReadCommandLineSet2",
|
||||
construction_timer_.Elapsed());
|
||||
|
||||
MaybeFinishLoading();
|
||||
@@ -127,7 +159,7 @@ void FirstPartySetsLoader::OnReadSetsFile(const std::string& raw_sets) {
|
||||
|
||||
component_sets_parse_progress_ = Progress::kFinished;
|
||||
UmaHistogramTimes(
|
||||
- "Cookie.FirstPartySets.InitializationDuration.ReadComponentSets",
|
||||
+ "Cookie.FirstPartySets.InitializationDuration.ReadComponentSets2",
|
||||
construction_timer_.Elapsed());
|
||||
MaybeFinishLoading();
|
||||
}
|
||||
@@ -144,33 +176,141 @@ void FirstPartySetsLoader::DisposeFile(base::File sets_file) {
|
||||
}
|
||||
}
|
||||
|
||||
+std::vector<FirstPartySetsLoader::SingleSet>
|
||||
+FirstPartySetsLoader::NormalizeAdditionSets(
|
||||
+ const FlattenedSets& existing_sets,
|
||||
+ const std::vector<SingleSet>& addition_sets) {
|
||||
+ // Create a mapping from an owner site in `existing_sets` to all policy sets
|
||||
+ // that intersect with the set that it owns.
|
||||
+ base::flat_map<net::SchemefulSite, base::flat_set<size_t>>
|
||||
+ policy_set_overlaps;
|
||||
+ for (size_t set_idx = 0; set_idx < addition_sets.size(); set_idx++) {
|
||||
+ const net::SchemefulSite& owner = addition_sets[set_idx].first;
|
||||
+ AddIfPolicySetOverlaps(owner, set_idx, existing_sets, policy_set_overlaps);
|
||||
+ for (const net::SchemefulSite& member : addition_sets[set_idx].second) {
|
||||
+ AddIfPolicySetOverlaps(member, set_idx, existing_sets,
|
||||
+ policy_set_overlaps);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ AdditionOverlapsUnionFind union_finder(addition_sets.size());
|
||||
+ for (auto& [public_site, policy_set_indices] : policy_set_overlaps) {
|
||||
+ // Union together all overlapping policy sets to determine which one will
|
||||
+ // take ownership.
|
||||
+ for (size_t representative : policy_set_indices) {
|
||||
+ union_finder.Union(*policy_set_indices.begin(), representative);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // The union-find data structure now knows which policy set should be given
|
||||
+ // the role of representative for each entry in policy_set_overlaps.
|
||||
+ // AdditionOverlapsUnionFind::SetsMapping returns a map from representative
|
||||
+ // index to list of its children.
|
||||
+ std::vector<SingleSet> normalized_additions;
|
||||
+ for (auto& [rep, children] : union_finder.SetsMapping()) {
|
||||
+ SingleSet normalized = addition_sets[rep];
|
||||
+ for (size_t child_set_idx : children) {
|
||||
+ // Update normalized to absorb the child_set_idx-th addition set.
|
||||
+ const SingleSet& child_set = addition_sets[child_set_idx];
|
||||
+ normalized.second.insert(child_set.first);
|
||||
+ normalized.second.insert(child_set.second.begin(),
|
||||
+ child_set.second.end());
|
||||
+ }
|
||||
+ normalized_additions.push_back(normalized);
|
||||
+ }
|
||||
+ return normalized_additions;
|
||||
+}
|
||||
+
|
||||
void FirstPartySetsLoader::ApplyManuallySpecifiedSet() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- DCHECK_EQ(component_sets_parse_progress_, Progress::kFinished);
|
||||
- DCHECK(manually_specified_set_.has_value());
|
||||
+ DCHECK(HasAllInputs());
|
||||
if (!manually_specified_set_.value().has_value())
|
||||
return;
|
||||
+ ApplyReplacementOverrides({manually_specified_set_->value()});
|
||||
+ RemoveAllSingletons();
|
||||
+}
|
||||
+
|
||||
+void FirstPartySetsLoader::ApplyReplacementOverrides(
|
||||
+ const std::vector<SingleSet>& override_sets) {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(HasAllInputs());
|
||||
+
|
||||
+ base::flat_set<net::SchemefulSite> all_override_sites =
|
||||
+ FlattenSingleSetList(override_sets);
|
||||
+
|
||||
+ // Erase the intersection between |sets_| and the list of |override_sets| and
|
||||
+ // any members whose owner was in the intersection.
|
||||
+ base::EraseIf(
|
||||
+ sets_, [&all_override_sites](
|
||||
+ const std::pair<net::SchemefulSite, net::SchemefulSite>& p) {
|
||||
+ return all_override_sites.contains(p.first) ||
|
||||
+ all_override_sites.contains(p.second);
|
||||
+ });
|
||||
+
|
||||
+ // Next, we must add each site in the override_sets to |sets_|.
|
||||
+ for (auto& [owner, members] : override_sets) {
|
||||
+ sets_.emplace(owner, owner);
|
||||
+ for (const net::SchemefulSite& member : members) {
|
||||
+ sets_.emplace(member, owner);
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+void FirstPartySetsLoader::ApplyAdditionOverrides(
|
||||
+ const std::vector<SingleSet>& new_sets) {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(HasAllInputs());
|
||||
+
|
||||
+ if (new_sets.empty())
|
||||
+ return;
|
||||
|
||||
- const net::SchemefulSite& manual_owner =
|
||||
- manually_specified_set_.value()->first;
|
||||
- const base::flat_set<net::SchemefulSite>& manual_members =
|
||||
- manually_specified_set_.value()->second;
|
||||
+ std::vector<SingleSet> normalized_additions =
|
||||
+ NormalizeAdditionSets(sets_, new_sets);
|
||||
|
||||
- const auto was_manually_provided =
|
||||
- [&manual_members, &manual_owner](const net::SchemefulSite& site) {
|
||||
- return site == manual_owner || manual_members.contains(site);
|
||||
- };
|
||||
+ FlattenedSets flattened_additions;
|
||||
+ for (const auto& [owner, members] : normalized_additions) {
|
||||
+ for (const net::SchemefulSite& member : members)
|
||||
+ flattened_additions.emplace(member, owner);
|
||||
+ flattened_additions.emplace(owner, owner);
|
||||
+ }
|
||||
|
||||
- // Erase the intersection between the manually-specified set and the
|
||||
- // CU-supplied set, and any members whose owner was in the intersection.
|
||||
- base::EraseIf(sets_, [&was_manually_provided](const auto& p) {
|
||||
- return was_manually_provided(p.first) || was_manually_provided(p.second);
|
||||
- });
|
||||
+ // Identify intersections between addition sets and existing sets. This will
|
||||
+ // be used to reparent existing sets if they intersect with an addition set.
|
||||
+ //
|
||||
+ // Since we reparent every member of an existing set (regardless of whether
|
||||
+ // the intersection was via one of its members or its owner), we just keep
|
||||
+ // track of the set itself, via its owner.
|
||||
+ base::flat_map<net::SchemefulSite, net::SchemefulSite> owners_in_intersection;
|
||||
+ for (const auto& [site, owner] : flattened_additions) {
|
||||
+ // Found an overlap with an existing set. Add the existing owner to the
|
||||
+ // map.
|
||||
+ if (auto it = sets_.find(site); it != sets_.end()) {
|
||||
+ owners_in_intersection[it->second] = owner;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ // Update the (site, owner) mappings in sets_ such that if owner is in the
|
||||
+ // intersection, then the site is mapped to owners_in_intersection[owner].
|
||||
+ //
|
||||
+ // This reparents existing sets to their owner given by the normalized
|
||||
+ // addition sets.
|
||||
+ for (auto& [site, owner] : sets_) {
|
||||
+ if (auto owner_entry = owners_in_intersection.find(owner);
|
||||
+ owner_entry != owners_in_intersection.end()) {
|
||||
+ owner = owner_entry->second;
|
||||
+ }
|
||||
+ }
|
||||
|
||||
- // Now remove singleton sets. We already removed any sites that were part
|
||||
- // of the intersection, or whose owner was part of the intersection. This
|
||||
- // leaves sites that *are* owners, which no longer have any (other)
|
||||
- // members.
|
||||
+ // Since the intersection between sets_ and flattened_additions has already
|
||||
+ // been updated above, we can insert flattened_additions into sets_ without
|
||||
+ // affecting any existing mappings in sets_.
|
||||
+ sets_.insert(flattened_additions.begin(), flattened_additions.end());
|
||||
+}
|
||||
+
|
||||
+void FirstPartySetsLoader::RemoveAllSingletons() {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ // Now remove singleton sets, which are sets that just contain sites that
|
||||
+ // *are* owners, but no longer have any (other) members.
|
||||
std::set<net::SchemefulSite> owners_with_members;
|
||||
for (const auto& it : sets_) {
|
||||
if (it.first != it.second)
|
||||
@@ -179,21 +319,29 @@ void FirstPartySetsLoader::ApplyManuallySpecifiedSet() {
|
||||
base::EraseIf(sets_, [&owners_with_members](const auto& p) {
|
||||
return p.first == p.second && !base::Contains(owners_with_members, p.first);
|
||||
});
|
||||
+}
|
||||
|
||||
- // Next, we must add the manually-added set to the parsed value.
|
||||
- for (const net::SchemefulSite& member : manual_members) {
|
||||
- sets_.emplace(member, manual_owner);
|
||||
- }
|
||||
- sets_.emplace(manual_owner, manual_owner);
|
||||
+void FirstPartySetsLoader::ApplyAllPolicyOverrides() {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ DCHECK(HasAllInputs());
|
||||
+ ApplyReplacementOverrides(policy_overrides_.replacements);
|
||||
+ ApplyAdditionOverrides(policy_overrides_.additions);
|
||||
+ RemoveAllSingletons();
|
||||
}
|
||||
|
||||
void FirstPartySetsLoader::MaybeFinishLoading() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
- if (component_sets_parse_progress_ != Progress::kFinished ||
|
||||
- !manually_specified_set_.has_value())
|
||||
+ if (!HasAllInputs())
|
||||
return;
|
||||
ApplyManuallySpecifiedSet();
|
||||
+ ApplyAllPolicyOverrides();
|
||||
std::move(on_load_complete_).Run(std::move(sets_));
|
||||
}
|
||||
|
||||
-} // namespace content
|
||||
+bool FirstPartySetsLoader::HasAllInputs() const {
|
||||
+ DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
+ return component_sets_parse_progress_ == Progress::kFinished &&
|
||||
+ manually_specified_set_.has_value();
|
||||
+}
|
||||
+
|
||||
+} // namespace content
|
||||
\ No newline at end of file
|
||||
diff --git a/content/browser/first_party_sets/first_party_sets_loader.h b/content/browser/first_party_sets/first_party_sets_loader.h
|
||||
index c27d2300c4c3533df91a8e814e89827bbd7d72ae..8588fe5f9922b36c9fe8e16ac16d02ccf00c8723 100644
|
||||
--- a/content/browser/first_party_sets/first_party_sets_loader.h
|
||||
+++ b/content/browser/first_party_sets/first_party_sets_loader.h
|
||||
@@ -57,6 +57,19 @@ class CONTENT_EXPORT FirstPartySetsLoader {
|
||||
// Close the file on thread pool that allows blocking.
|
||||
void DisposeFile(base::File sets_file);
|
||||
|
||||
+ // Handles addition sets which overlap by intersecting with the same existing
|
||||
+ // set, known as a transitive-overlap.
|
||||
+ //
|
||||
+ // This uses a Union-Find algorithm to select the earliest-provided addition
|
||||
+ // set as the representative of all other addition sets that
|
||||
+ // transitively-overlap with it.
|
||||
+ //
|
||||
+ // The "earliest-provided" tie-breaker is determined using a set's index in
|
||||
+ // `addition_sets`.
|
||||
+ static std::vector<SingleSet> NormalizeAdditionSets(
|
||||
+ const FlattenedSets& existing_sets,
|
||||
+ const std::vector<SingleSet>& addition_sets);
|
||||
+
|
||||
private:
|
||||
// Parses the contents of `raw_sets` as a collection of First-Party Set
|
||||
// declarations, and assigns to `sets_`.
|
||||
@@ -67,10 +80,42 @@ class CONTENT_EXPORT FirstPartySetsLoader {
|
||||
// `SetManuallySpecifiedSet`, and the public sets via `SetComponentSets`.
|
||||
void ApplyManuallySpecifiedSet();
|
||||
|
||||
+ // Removes the intersection between `sets_` and `override_sets` from the
|
||||
+ // `sets_` member variable, and then adds the `override_sets` into `sets_`.
|
||||
+ void ApplyReplacementOverrides(const std::vector<SingleSet>& override_sets);
|
||||
+
|
||||
+ // Updates the intersection between `sets_` and `override_sets` within the
|
||||
+ // `sets_` member variable, and then adds the `override_sets` into
|
||||
+ // `sets_`.
|
||||
+ //
|
||||
+ // The applied update ensures that invariants of First-Party Sets are
|
||||
+ // maintained, and that all sets in sets_ are disjoint.
|
||||
+ //
|
||||
+ // This will add in the `override_sets` into `sets_` without removing
|
||||
+ // any existing sites from the list of First-Party Sets.
|
||||
+ void ApplyAdditionOverrides(const std::vector<SingleSet>& override_sets);
|
||||
+
|
||||
+ // Removes all singletons (owners that have no members) from sets_.
|
||||
+ void RemoveAllSingletons();
|
||||
+
|
||||
+ // Applies the First-Party Sets overrides provided by policy.
|
||||
+ //
|
||||
+ // Must not be called until the loader has already received the public sets
|
||||
+ // via `SetComponentSets` and the CLI-provided sets have been applied to
|
||||
+ // `sets_`.
|
||||
+ //
|
||||
+ // Applies "Replacement" overrides before applying "Addition" overrides.
|
||||
+ void ApplyAllPolicyOverrides();
|
||||
+
|
||||
// Checks the required inputs have been received, and if so, invokes the
|
||||
// callback `on_load_complete_`, after merging sets appropriately.
|
||||
void MaybeFinishLoading();
|
||||
|
||||
+ // Returns true if all sources are present (Component Updater sets, CLI set,
|
||||
+ // and Policy sets). The Policy sets are provided at construction time, so
|
||||
+ // this effectively checks that the other two sources are ready.
|
||||
+ bool HasAllInputs() const;
|
||||
+
|
||||
// Represents the mapping of site -> site, where keys are members of sets,
|
||||
// and values are owners of the sets (explicitly including an entry of owner
|
||||
// -> owner).
|
||||
@@ -117,4 +162,4 @@ class CONTENT_EXPORT FirstPartySetsLoader {
|
||||
|
||||
} // namespace content
|
||||
|
||||
-#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_LOADER_H_
|
||||
+#endif // CONTENT_BROWSER_FIRST_PARTY_SETS_FIRST_PARTY_SETS_LOADER_H_
|
||||
\ No newline at end of file
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 16fb4946cb3ea2d097e8ed05bb340cc3f0782ed6..b751bf43d41a149579047faeec958646ecc3a5e0 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -1327,6 +1327,10 @@ bool ContentBrowserClient::IsFirstPartySetsEnabled() {
|
||||
return base::FeatureList::IsEnabled(features::kFirstPartySets);
|
||||
}
|
||||
|
||||
+bool ContentBrowserClient::WillProvidePublicFirstPartySets() {
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
base::Value::Dict ContentBrowserClient::GetFirstPartySetsOverrides() {
|
||||
return base::Value::Dict();
|
||||
}
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 4db1e6c2dbea27249ca15d5660b7fcd8c6736ad1..8aac2a95a3ac66f0b0c180f46ec29ca7341a1d4c 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -2227,6 +2227,16 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
// should not change in a single browser session.
|
||||
virtual bool IsFirstPartySetsEnabled();
|
||||
|
||||
+ // Returns true iff the embedder will provide a list of First-Party Sets via
|
||||
+ // content::FirstPartySetsHandler::SetPublicFirstPartySets during startup, at
|
||||
+ // some point. If `IsFirstPartySetsEnabled()` returns false, this method will
|
||||
+ // still be called, but its return value will be ignored.
|
||||
+ //
|
||||
+ // If this method returns false but `IsFirstPartySetsEnabled()` returns true
|
||||
+ // (e.g. in tests), an empty list will be used instead of waiting for the
|
||||
+ // embedder to call content::FirstPartySetsHandler::SetPublicFirstPartySets.
|
||||
+ virtual bool WillProvidePublicFirstPartySets();
|
||||
+
|
||||
// Returns a base::Value::Dict containing the value of the First-Party Sets
|
||||
// Overrides enterprise policy.
|
||||
// If the policy was not present or it was invalid, this returns an empty
|
||||
diff --git a/content/public/browser/first_party_sets_handler.h b/content/public/browser/first_party_sets_handler.h
|
||||
index 8bd62717732a4afe1e8c02fd5ceb39bd1790e3e0..3ff5dea5612fe3329c7c612818f1436a980ea9e3 100644
|
||||
--- a/content/public/browser/first_party_sets_handler.h
|
||||
+++ b/content/public/browser/first_party_sets_handler.h
|
||||
@@ -72,7 +72,9 @@ class CONTENT_EXPORT FirstPartySetsHandler {
|
||||
//
|
||||
// Embedder should call this method as early as possible during browser
|
||||
// startup if First-Party Sets are enabled, since no First-Party Sets queries
|
||||
- // are answered until initialization is complete.
|
||||
+ // are answered until initialization is complete. Must not be called if
|
||||
+ // `ContentBrowserClient::WillProvidePublicFirstPartySets` returns false or
|
||||
+ // `ContentBrowserClient::IsFrstpartySetsEnabled` returns false.
|
||||
virtual void SetPublicFirstPartySets(base::File sets_file) = 0;
|
||||
|
||||
// Resets the state on the instance for testing.
|
||||
diff --git a/content/shell/browser/shell_browser_main_parts.cc b/content/shell/browser/shell_browser_main_parts.cc
|
||||
index 89040432c9f56d8285d8e9f59e1e0280abc25199..bd412789695f49253f67f237b2a92b8dee298e7a 100644
|
||||
--- a/content/shell/browser/shell_browser_main_parts.cc
|
||||
+++ b/content/shell/browser/shell_browser_main_parts.cc
|
||||
@@ -189,8 +189,6 @@ int ShellBrowserMainParts::PreMainMessageLoopRun() {
|
||||
net::NetModule::SetResourceProvider(PlatformResourceProvider);
|
||||
ShellDevToolsManagerDelegate::StartHttpHandler(browser_context_.get());
|
||||
InitializeMessageLoopContext();
|
||||
- // The First-Party Sets feature always expects to be initialized
|
||||
- FirstPartySetsHandler::GetInstance()->SetPublicFirstPartySets(base::File());
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: export zlib symbols
|
||||
This patch sets ZLIB_DLL so that we properly export zlib symbols.
|
||||
|
||||
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
|
||||
index 49f52e1f8b1e505481a124a55ab91a7dd5ec571c..2cb7ee4f708808433e638bf62cb9a465c3651944 100644
|
||||
index 999b1de1b2ba1fff5dd92173300dc22b9aa5a865..2132d8ef92acd39bffe3bebddb80b4317e1f52b8 100644
|
||||
--- a/third_party/zlib/BUILD.gn
|
||||
+++ b/third_party/zlib/BUILD.gn
|
||||
@@ -312,6 +312,10 @@ component("zlib") {
|
||||
@@ -313,6 +313,10 @@ component("zlib") {
|
||||
defines = []
|
||||
deps = []
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
||||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 2a29af8d9aa67768ec521e87190174397a25b722..7a5ce3038427756c26e38c91c5b3211a9a8999dd 100644
|
||||
index df1633d59070e19592a52f02a76bdd9006d7c6f0..e599e866d2f5e72259e5b34b65510a06b3209784 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1828,7 +1828,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1820,7 +1820,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// IncrementCapturerCount() is destructed.
|
||||
void DecrementCapturerCount(bool stay_hidden,
|
||||
bool stay_awake,
|
||||
|
||||
@@ -14,7 +14,7 @@ but it's not strictly necessary for this API to work to spec.
|
||||
Profile check has been upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3247196
|
||||
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90ea117e47 100644
|
||||
index ac9f8b06b066adb53a92cb1768e21d6b6e9be2a8..9fb77b8d7c3d9cb49dcb3ac1f2495fa52f53932e 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
|
||||
@@ -16,12 +16,16 @@
|
||||
@@ -34,7 +34,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
#include "chrome/common/chrome_switches.h"
|
||||
#include "content/public/browser/navigation_details.h"
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
@@ -164,6 +168,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -165,6 +169,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
if (base::FeatureList::IsEnabled(
|
||||
blink::features::kWindowPlacementFullscreenCompanionWindow)) {
|
||||
if (!popunder_preventer_)
|
||||
@@ -171,6 +176,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -172,6 +177,7 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
else
|
||||
popunder_preventer_->WillActivateWebContents(web_contents);
|
||||
}
|
||||
@@ -50,7 +50,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
|
||||
// Keep the current state. |SetTabWithExclusiveAccess| may change the return
|
||||
// value of |IsWindowFullscreenForTabOrPending|.
|
||||
@@ -220,7 +226,9 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
@@ -221,7 +227,9 @@ void FullscreenController::EnterFullscreenModeForTab(
|
||||
}
|
||||
|
||||
void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -60,7 +60,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
|
||||
if (MaybeToggleFullscreenWithinTab(web_contents, false)) {
|
||||
// During tab capture of fullscreen-within-tab views, the browser window
|
||||
@@ -275,11 +283,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
@@ -276,11 +284,13 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
|
||||
void FullscreenController::FullscreenTabOpeningPopup(
|
||||
content::WebContents* opener,
|
||||
content::WebContents* popup) {
|
||||
@@ -74,7 +74,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
}
|
||||
|
||||
void FullscreenController::OnTabDeactivated(
|
||||
@@ -429,17 +439,15 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -443,17 +453,15 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
// Do not enter fullscreen mode if disallowed by pref. This prevents the user
|
||||
// from manually entering fullscreen mode and also disables kiosk mode on
|
||||
// desktop platforms.
|
||||
@@ -88,7 +88,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
return;
|
||||
- }
|
||||
#endif
|
||||
|
||||
started_fullscreen_transition_ = true;
|
||||
toggled_into_fullscreen_ = true;
|
||||
+#if 0
|
||||
bool entering_tab_fullscreen = option == TAB && !tab_fullscreen_;
|
||||
@@ -96,7 +96,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
GURL url;
|
||||
if (option == TAB) {
|
||||
url = GetRequestingOrigin();
|
||||
@@ -449,6 +457,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -463,6 +471,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
url = extension_caused_fullscreen_;
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
if (option == TAB && display_id != display::kInvalidDisplayId) {
|
||||
// Check, but do not prompt, for permission to request a specific screen.
|
||||
// Sites generally need permission to get the display id in the first place.
|
||||
@@ -466,6 +475,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
@@ -480,6 +489,7 @@ void FullscreenController::EnterFullscreenModeInternal(
|
||||
GetDisplayId(WebContents::FromRenderFrameHost(requesting_frame));
|
||||
}
|
||||
}
|
||||
@@ -113,10 +113,10 @@ index 467fed776d390e1a10075d62dab75fd8a6789627..5992117c90fbff008cf2f6a914f85c90
|
||||
if (option == BROWSER)
|
||||
base::RecordAction(base::UserMetricsAction("ToggleFullscreen"));
|
||||
diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.h b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
index 58a1ff5fb9fecd8c85905045ba43f43f0c63c2bb..15f868ac651c05eae6505adb80f2b4573a1166ef 100644
|
||||
index f0841982cb296079c8b943067564d74bc1b7067c..49f59fc2c12c98faada52e0e7c8c9c6e6251b599 100644
|
||||
--- a/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
+++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.h
|
||||
@@ -224,10 +224,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
@@ -242,10 +242,12 @@ class FullscreenController : public ExclusiveAccessControllerBase {
|
||||
// Used in testing to set the state to tab fullscreen.
|
||||
bool is_tab_fullscreen_for_testing_ = false;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
|
||||
to make it usable from Electron by removing Profile references.
|
||||
|
||||
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
index ee30fddfeb034d14ae05cb5957026f65f32a4fd4..aa38a6e0cc4c0ac57469bb67c85dae3b8ce19bc2 100644
|
||||
index 35568a00ef94ca0db2cbb0325634ce8d2a881e12..a8ea8eaabb7cf3248b19af93bf5002f88e23fd8d 100644
|
||||
--- a/chrome/browser/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
@@ -21,7 +21,10 @@
|
||||
@@ -22,7 +22,10 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
|
||||
@@ -100,10 +100,10 @@ index b7ba6ba4446963b08bce9fe416379169bd880378..7c621ea7a60725d08ee9ade68b65fd5b
|
||||
} else {
|
||||
// No need to bother, we don't know how many pages are available.
|
||||
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
index 804166d8844da5bd889f014e79d59d0cd75f5490..35ef412756a2c63394e5f2587b5bc73eadae4d60 100644
|
||||
index d0143dc64f818ee662694576ce2aa9488114f1c7..e3cbaa1b9c91805f8a4f81e110c8a85591b5f380 100644
|
||||
--- a/ui/gtk/printing/print_dialog_gtk.cc
|
||||
+++ b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
@@ -239,6 +239,24 @@ void PrintDialogGtk::UpdateSettings(
|
||||
@@ -242,6 +242,24 @@ void PrintDialogGtk::UpdateSettings(
|
||||
|
||||
gtk_print_settings_set_n_copies(gtk_settings_, settings->copies());
|
||||
gtk_print_settings_set_collate(gtk_settings_, settings->collate());
|
||||
|
||||
@@ -1,53 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Thu, 24 Sep 2020 11:10:41 -0700
|
||||
Subject: fix: use electron generated resources
|
||||
|
||||
This patch fixes a few instances where we need to use Electron generated
|
||||
resources for IDS strings, or the IDs will be wrong and cause DCHECKS
|
||||
as they will loaded as empty strings.
|
||||
|
||||
* IDS_UTILITY_PROCESS_UTILITY_WIN_NAME on Windows
|
||||
* IDR_PDF_MANIFEST on Linux
|
||||
* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows
|
||||
|
||||
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
index 441c28828328b72b625db10c5dca85f1f2349482..17973b511994cf32da051d144fc893a87fbb1d0c 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -11,8 +11,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/common/chrome_content_client.h"
|
||||
-#include "chrome/grit/browser_resources.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/strings/grit/components_strings.h"
|
||||
#include "components/zoom/page_zoom_constants.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
diff --git a/chrome/browser/printing/printing_service.cc b/chrome/browser/printing/printing_service.cc
|
||||
index 6d18517898c11c6a628cec2eade57fe845827b3d..a21f52e8a3c6f80d69b27faae4b77700fdd09e35 100644
|
||||
--- a/chrome/browser/printing/printing_service.cc
|
||||
+++ b/chrome/browser/printing/printing_service.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "chrome/browser/printing/printing_service.h"
|
||||
|
||||
#include "base/no_destructor.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "chrome/services/printing/public/mojom/printing_service.mojom.h"
|
||||
#include "content/public/browser/service_process_host.h"
|
||||
|
||||
diff --git a/chrome/browser/win/icon_reader_service.cc b/chrome/browser/win/icon_reader_service.cc
|
||||
index d5497a7e26cdb66c7c074bc509e2bfec7d7875cd..62d2f555253eef903bd04ff1a0ad37d1470309e0 100644
|
||||
--- a/chrome/browser/win/icon_reader_service.cc
|
||||
+++ b/chrome/browser/win/icon_reader_service.cc
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
#include "chrome/browser/win/icon_reader_service.h"
|
||||
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "chrome/services/util_win/public/mojom/util_read_icon.mojom.h"
|
||||
#include "content/public/browser/service_process_host.h"
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index b17180351e6e693352fcda973bdc23da79d8bfac..307ea58a72fe05f283b2cdfd6027625f96c5a99b 100644
|
||||
index 2b8e23df6545ca438c4af8434120cc40c70e09ec..049350bc63d627e85b239d23b976c3a62381fd57 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -3167,6 +3167,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3206,6 +3206,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index b17180351e6e693352fcda973bdc23da79d8bfac..307ea58a72fe05f283b2cdfd6027625f
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 9b988bb631ab759739ae01c918efb1d563d5aafc..4db1e6c2dbea27249ca15d5660b7fcd8c6736ad1 100644
|
||||
index f6d98708c436447ee6c93acb5d476719c238ca9c..505279149690d469fa979010435373e40a5c8c43 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -272,6 +272,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -274,6 +274,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ index 20cfc2257e9ba25ec3f39f19db952ba6b6036c72..4efc13c79ae742fa1925d06431862745
|
||||
// Returns whether `Initialize` has already been invoked in the process.
|
||||
// Initialization is a one-way operation (i.e., this method cannot return
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 9dddcdf88d56b32a9b8b9be529f0f13a03bd6e06..f4e5be79c1d3b92f6723f7b0c4d9a7f38c81ff99 100644
|
||||
index 072387786cc70f7d0b7d3d31cebf86af69f98a30..9df4d0aa257e7b4ecacd8c7a4ad392c4a33ff177 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -352,7 +352,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
|
||||
@@ -12,7 +12,7 @@ rendering and there is no signal from browser process on this event
|
||||
to identify it.
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
index e9c3f3dee36a44d40844a88dbb899f593d03c907..c8dc226ce7c87fa84da5c99760f12538e367bbc9 100644
|
||||
index bbdd4dcc4bc327b99db11629422cc92a9d477256..0f21c9a6e4da03e4af7a8ea692ce71bb008827ed 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
@@ -230,6 +230,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -28,10 +28,10 @@ index e9c3f3dee36a44d40844a88dbb899f593d03c907..c8dc226ce7c87fa84da5c99760f12538
|
||||
|
||||
void GpuDataManagerImpl::UpdateDawnInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
index 4ed951d5829e87431a1f9f84f0317978cb673e31..82f9a2f97e71848ece8d04effc083db94a45d495 100644
|
||||
index 0a01900683c73778565f9059b293bbe863d2d070..cd4e58f73e7d5bd0f9f41b1ec63031666e6b978e 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
@@ -124,6 +124,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
@@ -128,6 +128,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
// BrowserMainParts override instead.
|
||||
void PostCreateThreads();
|
||||
void TerminateInfoCollectionGpuProcess();
|
||||
@@ -40,10 +40,10 @@ index 4ed951d5829e87431a1f9f84f0317978cb673e31..82f9a2f97e71848ece8d04effc083db9
|
||||
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 53402e4d706f58c26498015c1a5c33b4f7ceabc7..c14ce99ec72881133a5bf2bd90369ee0211f6ca1 100644
|
||||
index 260a2d4ef5df85291eda27a0f7066646d31dacfe..1f83ab4a9b22b35dd2b9053553121b49e1c42ca1 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1215,6 +1215,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -1232,6 +1232,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
if (host)
|
||||
host->ForceShutdown();
|
||||
}
|
||||
@@ -57,7 +57,7 @@ index 53402e4d706f58c26498015c1a5c33b4f7ceabc7..c14ce99ec72881133a5bf2bd90369ee0
|
||||
|
||||
void GpuDataManagerImplPrivate::UpdateDawnInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
index ac0afe687650da564187127dc7ea93a47acde719..237e3f00b1451be43949a797ef1b35885b958a5d 100644
|
||||
index 85a4d09a54922205d416538ea97c7f2b5897f86a..acba97124a8643c7452bea63e91533cbfa7e182c 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -90,6 +90,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 6a91282809a76ca60dd1b329c683705b127eb22a..a2672faad7c39c3d938c1c31abb6fd0d37582fbf 100644
|
||||
index 6cda63d5c6a0b7b2b41d01382b73dbdeea3651de..174e6a5265ec4186934a0bd0619ecf02073f4fe1 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -954,6 +954,11 @@
|
||||
@@ -962,6 +962,11 @@
|
||||
"includes": [4960],
|
||||
},
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
||||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index 6bd25626dc999438316c2084442a29389d4154fb..bc27370e73d3061dfacbd96a3b8cf576b94e3d9b 100755
|
||||
index 36786064cd26faf4968e8ee90fb382e95247e4de..ce9f4b6a0d4f3350f89e9ba4f02a5cbb064524c4 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -298,6 +298,8 @@ def GetDefaultHostOs():
|
||||
|
||||
@@ -9,10 +9,10 @@ but due to the nature of electron, we need to load the v8 snapshot
|
||||
in the browser process.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 85a55e9bbb7403b031c512fa5e010cbb0487d9c6..31c83eab4781725540f57e1e66c6f7e7c0b85d8b 100644
|
||||
index 0a0c6eb9567a96f569c25bad8ea98b4cd165b04a..0ce83c22636fce72e613893df30ca52b142077fd 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -247,11 +247,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
@@ -252,11 +252,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
|
||||
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
const std::string& process_type) {
|
||||
|
||||
@@ -7,7 +7,7 @@ Allows embedders to get a handle to the gtk library
|
||||
already loaded in the process.
|
||||
|
||||
diff --git a/ui/gtk/gtk_compat.cc b/ui/gtk/gtk_compat.cc
|
||||
index 0ed04582106639911d9a4e0284ff880be9c3bc74..bfda81b08be52406048be9b96d2de59223d56ee7 100644
|
||||
index b5c7af5bdb93b320f95252d35d2d76bae7f8c445..40b706ed7cde206e98274025148604760b7477f9 100644
|
||||
--- a/ui/gtk/gtk_compat.cc
|
||||
+++ b/ui/gtk/gtk_compat.cc
|
||||
@@ -86,12 +86,6 @@ void* GetLibGtk4(bool check = true) {
|
||||
@@ -37,10 +37,10 @@ index 0ed04582106639911d9a4e0284ff880be9c3bc74..bfda81b08be52406048be9b96d2de592
|
||||
static bool loaded = LoadGtkImpl();
|
||||
return loaded;
|
||||
diff --git a/ui/gtk/gtk_compat.h b/ui/gtk/gtk_compat.h
|
||||
index 72981270fe26579211afcaf3c596a412f69f5fac..b5dbfde5b011d57d26960d245e0dc61cac9341e4 100644
|
||||
index 57e55b9e749b43d327deff449a530e1f435a8e8b..2245974f91be4a691d82f54b55e12e44ae2000c5 100644
|
||||
--- a/ui/gtk/gtk_compat.h
|
||||
+++ b/ui/gtk/gtk_compat.h
|
||||
@@ -37,6 +37,9 @@ using SkColor = uint32_t;
|
||||
@@ -34,6 +34,9 @@ using SkColor = uint32_t;
|
||||
|
||||
namespace gtk {
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
Date: Thu, 20 Sep 2018 17:49:31 -0700
|
||||
Subject: mas: avoid usage of AudioDeviceDuck
|
||||
|
||||
Removes usage of the AudioDeviceDuck private API.
|
||||
|
||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
index 0e842caf7b6487d94978c7b68fb5b222e330581f..5eafcd163ee1a05203a5eb76592a449f5a84e71f 100644
|
||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
@@ -34,19 +34,23 @@
|
||||
|
||||
namespace {
|
||||
extern "C" {
|
||||
+#ifndef MAS_BUILD
|
||||
// See:
|
||||
// https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h?rev=228264
|
||||
OSStatus AudioDeviceDuck(AudioDeviceID inDevice,
|
||||
Float32 inDuckedLevel,
|
||||
const AudioTimeStamp* __nullable inStartTime,
|
||||
Float32 inRampDuration) __attribute__((weak_import));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void UndoDucking(AudioDeviceID output_device_id) {
|
||||
+#ifndef MAS_BUILD
|
||||
if (AudioDeviceDuck != nullptr) {
|
||||
// Ramp the volume back up over half a second.
|
||||
AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
@@ -1,44 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Apthorp <nornagon@nornagon.net>
|
||||
Date: Thu, 20 Sep 2018 17:49:20 -0700
|
||||
Subject: mas: avoid usage of _CFIsObjC
|
||||
|
||||
Removes usage of the _CFIsObjC private API.
|
||||
|
||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
||||
index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644
|
||||
--- a/base/mac/foundation_util.mm
|
||||
+++ b/base/mac/foundation_util.mm
|
||||
@@ -30,12 +30,6 @@
|
||||
#if !BUILDFLAG(IS_IOS)
|
||||
CFTypeID SecACLGetTypeID();
|
||||
CFTypeID SecTrustedApplicationGetTypeID();
|
||||
-// The NSFont/CTFont toll-free bridging is broken before 10.15.
|
||||
-// http://www.openradar.me/15341349 rdar://15341349
|
||||
-//
|
||||
-// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the
|
||||
-// minimum OS for Chromium, remove this SPI declaration.
|
||||
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
||||
@@ -316,8 +310,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
|
||||
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
||||
DCHECK(!cf_val ||
|
||||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
||||
- (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
|
||||
- [ns_val isKindOfClass:[NSFont class]]));
|
||||
+ ([ns_val isKindOfClass:[NSFont class]]));
|
||||
return ns_val;
|
||||
}
|
||||
|
||||
@@ -388,9 +381,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
||||
return (CTFontRef)(cf_val);
|
||||
}
|
||||
|
||||
- if (!_CFIsObjC(CTFontGetTypeID(), cf_val))
|
||||
- return NULL;
|
||||
-
|
||||
id<NSObject> ns_val = reinterpret_cast<id>(const_cast<void*>(cf_val));
|
||||
if ([ns_val isKindOfClass:[NSFont class]]) {
|
||||
return (CTFontRef)(cf_val);
|
||||
@@ -6,10 +6,10 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
|
||||
Removes usage of the CGDisplayUsesForceToGray private API.
|
||||
|
||||
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
|
||||
index 21778ef0c7657937987fdc70bf9ceb9439aebf15..2f6e1390a3b824d80832e47f6c368e757e2d9806 100644
|
||||
index 335e8a576f9a66a20b5720dfd083708bf490587e..0abf4ae5c58bd841c013775f6df0b6065d6d77b1 100644
|
||||
--- a/ui/display/mac/screen_mac.mm
|
||||
+++ b/ui/display/mac/screen_mac.mm
|
||||
@@ -162,7 +162,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
|
||||
@@ -156,7 +156,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
|
||||
display.set_color_depth(Display::kDefaultBitsPerPixel);
|
||||
display.set_depth_per_component(Display::kDefaultBitsPerComponent);
|
||||
}
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Mon, 4 Mar 2019 14:43:36 -0800
|
||||
Subject: mas: avoid usage of abort_report_np
|
||||
|
||||
Disable usage of the private API abort_report_np in MAS builds.
|
||||
|
||||
diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
|
||||
index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e3a9f81d4 100644
|
||||
--- a/sandbox/mac/sandbox_logging.cc
|
||||
+++ b/sandbox/mac/sandbox_logging.cc
|
||||
@@ -32,9 +32,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
extern "C" {
|
||||
void abort_report_np(const char*, ...);
|
||||
}
|
||||
+#endif
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
@@ -104,9 +106,11 @@ void SendAslLog(Level level, const char* message) {
|
||||
asl_set(asl_message.get(), ASL_KEY_MSG, message);
|
||||
asl_send(asl_client.get(), asl_message.get());
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
if (level == Level::FATAL) {
|
||||
abort_report_np(message);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
// |error| is strerror(errno) when a P* logging function is called. Pass
|
||||
233
patches/chromium/mas_avoid_usage_of_private_macos_apis.patch
Normal file
233
patches/chromium/mas_avoid_usage_of_private_macos_apis.patch
Normal file
@@ -0,0 +1,233 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Mon, 4 Mar 2019 14:43:36 -0800
|
||||
Subject: mas: avoid usage of private macOS APIs
|
||||
|
||||
Disable usage of the following private APIs in MAS builds:
|
||||
* abort_report_np
|
||||
* pthread_fchdir_np
|
||||
* pthread_chdir_np
|
||||
* SetApplicationIsDaemon
|
||||
* _LSSetApplicationLaunchServicesServerConnectionStatus
|
||||
* AreDeviceAndUserJoinedToDomain
|
||||
* _CFIsObjC
|
||||
* AudioDeviceDuck
|
||||
|
||||
diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm
|
||||
index dd14c8cfa32ab0bb2e92f192c54a494c4f5b4fb7..2c6f0b336c97bc23995e9fe8cdc7f72a69f54e64 100644
|
||||
--- a/base/enterprise_util_mac.mm
|
||||
+++ b/base/enterprise_util_mac.mm
|
||||
@@ -189,6 +189,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() {
|
||||
DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
static DeviceUserDomainJoinState state = [] {
|
||||
DeviceUserDomainJoinState state{false, false};
|
||||
+#if defined(MAS_BUILD)
|
||||
+ return state;
|
||||
+ }();
|
||||
+
|
||||
+ return state;
|
||||
+}
|
||||
+#else
|
||||
|
||||
@autoreleasepool {
|
||||
ODSession* session = [ODSession defaultSession];
|
||||
@@ -295,5 +302,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
|
||||
return state;
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace base
|
||||
diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
|
||||
index 61641e1ad8a47a4910918ff61523a23854745b81..d4a3e2282256f5a43235b40b4c9f46caa725c507 100644
|
||||
--- a/base/mac/foundation_util.mm
|
||||
+++ b/base/mac/foundation_util.mm
|
||||
@@ -30,12 +30,6 @@
|
||||
#if !BUILDFLAG(IS_IOS)
|
||||
CFTypeID SecACLGetTypeID();
|
||||
CFTypeID SecTrustedApplicationGetTypeID();
|
||||
-// The NSFont/CTFont toll-free bridging is broken before 10.15.
|
||||
-// http://www.openradar.me/15341349 rdar://15341349
|
||||
-//
|
||||
-// TODO(https://crbug.com/1076527): This is fixed in 10.15. When 10.15 is the
|
||||
-// minimum OS for Chromium, remove this SPI declaration.
|
||||
-Boolean _CFIsObjC(CFTypeID typeID, CFTypeRef obj);
|
||||
#endif
|
||||
} // extern "C"
|
||||
|
||||
@@ -316,8 +310,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
|
||||
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
|
||||
DCHECK(!cf_val ||
|
||||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
|
||||
- (_CFIsObjC(CTFontGetTypeID(), cf_val) &&
|
||||
- [ns_val isKindOfClass:[NSFont class]]));
|
||||
+ ([ns_val isKindOfClass:[NSFont class]]));
|
||||
return ns_val;
|
||||
}
|
||||
|
||||
@@ -388,9 +381,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
|
||||
return (CTFontRef)(cf_val);
|
||||
}
|
||||
|
||||
- if (!_CFIsObjC(CTFontGetTypeID(), cf_val))
|
||||
- return NULL;
|
||||
-
|
||||
id<NSObject> ns_val = reinterpret_cast<id>(const_cast<void*>(cf_val));
|
||||
if ([ns_val isKindOfClass:[NSFont class]]) {
|
||||
return (CTFontRef)(cf_val);
|
||||
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
|
||||
index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644
|
||||
--- a/base/process/launch_mac.cc
|
||||
+++ b/base/process/launch_mac.cc
|
||||
@@ -26,8 +26,10 @@ extern "C" {
|
||||
// descriptor. libpthread only exposes a syscall wrapper starting in
|
||||
// macOS 10.12, but the system call dates back to macOS 10.5. On older OSes,
|
||||
// the syscall is issued directly.
|
||||
+#if !defined(MAS_BUILD)
|
||||
int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12));
|
||||
int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12));
|
||||
+#endif
|
||||
|
||||
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
|
||||
API_AVAILABLE(macosx(10.14));
|
||||
@@ -96,21 +98,29 @@ class PosixSpawnFileActions {
|
||||
};
|
||||
|
||||
int ChangeCurrentThreadDirectory(const char* path) {
|
||||
+ #if defined(MAS_BUILD)
|
||||
+ return syscall(SYS___pthread_chdir, path);
|
||||
+ #else
|
||||
if (__builtin_available(macOS 10.12, *)) {
|
||||
return pthread_chdir_np(path);
|
||||
} else {
|
||||
return syscall(SYS___pthread_chdir, path);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
|
||||
// The recommended way to unset a per-thread cwd is to set a new value to an
|
||||
// invalid file descriptor, per libpthread-218.1.3/private/private.h.
|
||||
int ResetCurrentThreadDirectory() {
|
||||
+ #if defined(MAS_BUILD)
|
||||
+ return syscall(SYS___pthread_fchdir, -1);
|
||||
+ #else
|
||||
if (__builtin_available(macOS 10.12, *)) {
|
||||
return pthread_fchdir_np(-1);
|
||||
} else {
|
||||
return syscall(SYS___pthread_fchdir, -1);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
|
||||
struct GetAppOutputOptions {
|
||||
@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
file_actions.Inherit(STDERR_FILENO);
|
||||
}
|
||||
|
||||
+#if 0
|
||||
if (options.disclaim_responsibility) {
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
std::vector<char*> argv_cstr;
|
||||
argv_cstr.reserve(argv.size() + 1);
|
||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
index 0e842caf7b6487d94978c7b68fb5b222e330581f..5eafcd163ee1a05203a5eb76592a449f5a84e71f 100644
|
||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
@@ -34,19 +34,23 @@
|
||||
|
||||
namespace {
|
||||
extern "C" {
|
||||
+#ifndef MAS_BUILD
|
||||
// See:
|
||||
// https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/PAL/pal/spi/cf/CoreAudioSPI.h?rev=228264
|
||||
OSStatus AudioDeviceDuck(AudioDeviceID inDevice,
|
||||
Float32 inDuckedLevel,
|
||||
const AudioTimeStamp* __nullable inStartTime,
|
||||
Float32 inRampDuration) __attribute__((weak_import));
|
||||
+#endif
|
||||
}
|
||||
|
||||
void UndoDucking(AudioDeviceID output_device_id) {
|
||||
+#ifndef MAS_BUILD
|
||||
if (AudioDeviceDuck != nullptr) {
|
||||
// Ramp the volume back up over half a second.
|
||||
AudioDeviceDuck(output_device_id, 1.0, nullptr, 0.5);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace
|
||||
diff --git a/sandbox/mac/sandbox_logging.cc b/sandbox/mac/sandbox_logging.cc
|
||||
index 702224dce1871c07b07f6882e46d14fe532d6ed2..797cb6646171486797a5e5fbbb1b187e3a9f81d4 100644
|
||||
--- a/sandbox/mac/sandbox_logging.cc
|
||||
+++ b/sandbox/mac/sandbox_logging.cc
|
||||
@@ -32,9 +32,11 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
extern "C" {
|
||||
void abort_report_np(const char*, ...);
|
||||
}
|
||||
+#endif
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
@@ -104,9 +106,11 @@ void SendAslLog(Level level, const char* message) {
|
||||
asl_set(asl_message.get(), ASL_KEY_MSG, message);
|
||||
asl_send(asl_client.get(), asl_message.get());
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
if (level == Level::FATAL) {
|
||||
abort_report_np(message);
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
// |error| is strerror(errno) when a P* logging function is called. Pass
|
||||
diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc
|
||||
index 9f5261425162791668c2d15b7ffba091f831d652..c37f3dc05cb8372c7a6c4caef7a280b6f2f48e98 100644
|
||||
--- a/sandbox/mac/system_services.cc
|
||||
+++ b/sandbox/mac/system_services.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/mac/mac_logging.h"
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
extern "C" {
|
||||
OSStatus SetApplicationIsDaemon(Boolean isDaemon);
|
||||
void _LSSetApplicationLaunchServicesServerConnectionStatus(
|
||||
@@ -19,10 +20,12 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus(
|
||||
// https://github.com/WebKit/webkit/commit/8da694b0b3febcc262653d01a45e946ce91845ed.
|
||||
void _CSCheckFixDisable() API_AVAILABLE(macosx(10.15));
|
||||
} // extern "C"
|
||||
+#endif
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
void DisableLaunchServices() {
|
||||
+ #if !defined(MAS_BUILD)
|
||||
// Allow the process to continue without a LaunchServices ASN. The
|
||||
// INIT_Process function in HIServices will abort if it cannot connect to
|
||||
// launchservicesd to get an ASN. By setting this flag, HIServices skips
|
||||
@@ -36,12 +39,15 @@ void DisableLaunchServices() {
|
||||
0, ^bool(CFDictionaryRef options) {
|
||||
return false;
|
||||
});
|
||||
+ #endif
|
||||
}
|
||||
|
||||
void DisableCoreServicesCheckFix() {
|
||||
+#if !defined(MAS_BUILD)
|
||||
if (__builtin_available(macOS 10.15, *)) {
|
||||
_CSCheckFixDisable();
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace sandbox
|
||||
@@ -1,66 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Mon, 4 Mar 2019 14:46:48 -0800
|
||||
Subject: mas: avoid usage of pthread_fchdir_np
|
||||
|
||||
Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
|
||||
|
||||
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
|
||||
index 184cfa25dbc6cfa2a32be3f8d964ea359254f807..c9bfc4d8ca1408206244305d7634dcd51e99377c 100644
|
||||
--- a/base/process/launch_mac.cc
|
||||
+++ b/base/process/launch_mac.cc
|
||||
@@ -26,8 +26,10 @@ extern "C" {
|
||||
// descriptor. libpthread only exposes a syscall wrapper starting in
|
||||
// macOS 10.12, but the system call dates back to macOS 10.5. On older OSes,
|
||||
// the syscall is issued directly.
|
||||
+#if !defined(MAS_BUILD)
|
||||
int pthread_chdir_np(const char* dir) API_AVAILABLE(macosx(10.12));
|
||||
int pthread_fchdir_np(int fd) API_AVAILABLE(macosx(10.12));
|
||||
+#endif
|
||||
|
||||
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
|
||||
API_AVAILABLE(macosx(10.14));
|
||||
@@ -96,21 +98,29 @@ class PosixSpawnFileActions {
|
||||
};
|
||||
|
||||
int ChangeCurrentThreadDirectory(const char* path) {
|
||||
+ #if defined(MAS_BUILD)
|
||||
+ return syscall(SYS___pthread_chdir, path);
|
||||
+ #else
|
||||
if (__builtin_available(macOS 10.12, *)) {
|
||||
return pthread_chdir_np(path);
|
||||
} else {
|
||||
return syscall(SYS___pthread_chdir, path);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
|
||||
// The recommended way to unset a per-thread cwd is to set a new value to an
|
||||
// invalid file descriptor, per libpthread-218.1.3/private/private.h.
|
||||
int ResetCurrentThreadDirectory() {
|
||||
+ #if defined(MAS_BUILD)
|
||||
+ return syscall(SYS___pthread_fchdir, -1);
|
||||
+ #else
|
||||
if (__builtin_available(macOS 10.12, *)) {
|
||||
return pthread_fchdir_np(-1);
|
||||
} else {
|
||||
return syscall(SYS___pthread_fchdir, -1);
|
||||
}
|
||||
+ #endif
|
||||
}
|
||||
|
||||
struct GetAppOutputOptions {
|
||||
@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
file_actions.Inherit(STDERR_FILENO);
|
||||
}
|
||||
|
||||
+#if 0
|
||||
if (options.disclaim_responsibility) {
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
std::vector<char*> argv_cstr;
|
||||
argv_cstr.reserve(argv.size() + 1);
|
||||
@@ -1,50 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Mon, 4 Mar 2019 14:51:45 -0800
|
||||
Subject: mas: avoid usage of SetApplicationIsDaemon and
|
||||
_LSSetApplicationLaunchServicesServerConnectionStatus
|
||||
|
||||
Disable usage of SetApplicationIsDaemon and
|
||||
_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
|
||||
|
||||
diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc
|
||||
index 9f5261425162791668c2d15b7ffba091f831d652..c37f3dc05cb8372c7a6c4caef7a280b6f2f48e98 100644
|
||||
--- a/sandbox/mac/system_services.cc
|
||||
+++ b/sandbox/mac/system_services.cc
|
||||
@@ -9,6 +9,7 @@
|
||||
|
||||
#include "base/mac/mac_logging.h"
|
||||
|
||||
+#if !defined(MAS_BUILD)
|
||||
extern "C" {
|
||||
OSStatus SetApplicationIsDaemon(Boolean isDaemon);
|
||||
void _LSSetApplicationLaunchServicesServerConnectionStatus(
|
||||
@@ -19,10 +20,12 @@ void _LSSetApplicationLaunchServicesServerConnectionStatus(
|
||||
// https://github.com/WebKit/webkit/commit/8da694b0b3febcc262653d01a45e946ce91845ed.
|
||||
void _CSCheckFixDisable() API_AVAILABLE(macosx(10.15));
|
||||
} // extern "C"
|
||||
+#endif
|
||||
|
||||
namespace sandbox {
|
||||
|
||||
void DisableLaunchServices() {
|
||||
+ #if !defined(MAS_BUILD)
|
||||
// Allow the process to continue without a LaunchServices ASN. The
|
||||
// INIT_Process function in HIServices will abort if it cannot connect to
|
||||
// launchservicesd to get an ASN. By setting this flag, HIServices skips
|
||||
@@ -36,12 +39,15 @@ void DisableLaunchServices() {
|
||||
0, ^bool(CFDictionaryRef options) {
|
||||
return false;
|
||||
});
|
||||
+ #endif
|
||||
}
|
||||
|
||||
void DisableCoreServicesCheckFix() {
|
||||
+#if !defined(MAS_BUILD)
|
||||
if (__builtin_available(macOS 10.15, *)) {
|
||||
_CSCheckFixDisable();
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
} // namespace sandbox
|
||||
@@ -75,7 +75,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
|
||||
+
|
||||
@end
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db34239394139 100644
|
||||
index 67ebc56bd7ee267c03a5543e10a6a41042fcaa38..af3ed27dea51c22ab32ce14686dd7807eb797316 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
|
||||
@@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
|
||||
@@ -95,7 +95,7 @@ index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db342
|
||||
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
|
||||
// can only be accomplished by overriding methods.
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56ad456bd01 100644
|
||||
index 622b25c637ba14f287cbcdb4781967564d7e9eff..a21fe0aa19069a748b41e7d0781e20031c40fbfc 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -16,7 +16,9 @@
|
||||
@@ -126,7 +126,7 @@ index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56a
|
||||
@implementation NativeWidgetMacNSWindow {
|
||||
@private
|
||||
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
|
||||
@@ -186,6 +192,8 @@ - (BOOL)hasViewsMenuActive {
|
||||
@@ -209,6 +215,8 @@ - (BOOL)hasViewsMenuActive {
|
||||
|
||||
// NSWindow overrides.
|
||||
|
||||
@@ -135,7 +135,7 @@ index 83e08e8e56f8fdfe5c321c33b451b9bde8ee819a..f48d8ac4816e2d775c16758e086eb56a
|
||||
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
if (windowStyle & NSWindowStyleMaskTitled) {
|
||||
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
|
||||
@@ -197,6 +205,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
@@ -220,6 +228,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
|
||||
return [super frameViewClassForStyleMask:windowStyle];
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ needs to think it's coming from the PWA process). I think it can just be chopped
|
||||
out -- if there are any side-effects, we should be able to work around them.
|
||||
|
||||
diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components/remote_cocoa/app_shim/application_bridge.mm
|
||||
index 04691696ee653b95cf046edfd464b1a800a38abe..b567b1e1fa9e5103a6219292a649f8807f0aa7ae 100644
|
||||
index 306db835fe203f663b1d84dd3490b619eb3f60b2..7a41d7afe6197e0a78934206782b1063f77f707a 100644
|
||||
--- a/components/remote_cocoa/app_shim/application_bridge.mm
|
||||
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
|
||||
@@ -51,6 +51,7 @@
|
||||
@@ -44,10 +44,10 @@ index 04691696ee653b95cf046edfd464b1a800a38abe..b567b1e1fa9e5103a6219292a649f880
|
||||
|
||||
} // namespace
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
index 6394980da8ab8b38e29693ccedfc3827ac111a4c..7fff28ee83475963f80987f7736ac866daa7dad2 100644
|
||||
index 26a2fa4c0f39ea0254bee322f355d92a55ba3b4e..e42de9720456161c187d41d39487ee3272fa1cf9 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
@@ -567,10 +567,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -583,10 +583,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
// this should be treated as an error and caught early.
|
||||
CHECK(bridged_view_);
|
||||
|
||||
@@ -61,10 +61,10 @@ index 6394980da8ab8b38e29693ccedfc3827ac111a4c..7fff28ee83475963f80987f7736ac866
|
||||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
|
||||
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf77817c9e 100644
|
||||
index 60e99da4a9493dbaca871b08d75341a48488a65e..3328e9e90bd4904dd404b413fd4245f4fb37ae38 100644
|
||||
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
@@ -73,8 +73,10 @@ id GetFocusedBrowserAccessibilityElement() override {
|
||||
@@ -74,8 +74,10 @@ id GetFocusedBrowserAccessibilityElement() override {
|
||||
return nil;
|
||||
}
|
||||
void SetAccessibilityWindow(NSWindow* window) override {
|
||||
@@ -75,7 +75,7 @@ index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf
|
||||
}
|
||||
|
||||
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
|
||||
@@ -136,8 +138,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
|
||||
@@ -137,8 +139,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
|
||||
|
||||
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
|
||||
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
|
||||
@@ -87,7 +87,7 @@ index 2cd40c288f42937688e4f846a002779158ada68f..f4c7bb0ab75835bfdbd100ce852646bf
|
||||
}
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
index 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b442248c6a 100644
|
||||
index 0048862cb89d519b8c1c111f923e6dd960c855d6..c7b9124462b0779ed4d1b27fe167e653bf5c6be5 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
@@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler;
|
||||
@@ -114,10 +114,10 @@ index 2b99d6a9f13f12a2a470fb6a5aa98c05f26a54c7..46d735add749d76c32f80512d00373b4
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8a588829d 100644
|
||||
index 3fbe8be5b94817d48622590cb3acd271bf07db31..c37193c2207fb4f20993a35e2ac6fde8f0727a45 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -252,8 +252,10 @@
|
||||
@@ -255,8 +255,10 @@
|
||||
void RenderWidgetHostViewMac::MigrateNSViewBridge(
|
||||
remote_cocoa::mojom::Application* remote_cocoa_application,
|
||||
uint64_t parent_ns_view_id) {
|
||||
@@ -128,7 +128,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8
|
||||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1519,8 +1521,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1541,8 +1543,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -139,7 +139,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1564,9 +1568,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1586,9 +1590,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -151,7 +151,7 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2061,12 +2067,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2083,12 +2089,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
@@ -167,11 +167,11 @@ index 961c759eca96ffc0ffcf40cfdaf42388f47d9c2b..18c77a5520ea2ae7cfee4eea3ed01fa8
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 028a97becd88fb12481b1de0395c7c81857d3af3..4491be85cb82f050cc70c24e933e841a08b9123f 100644
|
||||
index 2e39255bdb26664e8bc2d0abb26c2359c9b84bd3..1425e9935b599b01fd53f43d0415a77002c92f00 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -319,6 +319,13 @@ component("base") {
|
||||
]
|
||||
@@ -329,6 +329,13 @@ component("base") {
|
||||
sources += [ "resource/resource_bundle_lacros.cc" ]
|
||||
}
|
||||
|
||||
+ if (is_mas_build) {
|
||||
|
||||
@@ -40,7 +40,7 @@ index 1b84c9df5990d0905d068ca822d5173313a74edd..89a90a5c8e0c3ede1b0fe63d45c5768b
|
||||
|
||||
gfx::Size pixel_size_;
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
index 767d3f6454ef3150354911ed683f5485bb83fbbb..f273b56276c1b277b307f6c4c061e08d12daea42 100644
|
||||
index 547a5c4260b28d651d470e06c4c4e6bfa77ef966..01fee4e6b104aad68d52f30c9af3e9072f078e0c 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
@@ -60,7 +60,7 @@
|
||||
@@ -60,7 +60,7 @@ index 767d3f6454ef3150354911ed683f5485bb83fbbb..f273b56276c1b277b307f6c4c061e08d
|
||||
}
|
||||
|
||||
template <typename BaseClass>
|
||||
@@ -149,7 +150,9 @@
|
||||
@@ -160,7 +161,9 @@
|
||||
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
|
||||
"width", pixel_size_.width());
|
||||
if (use_remote_layer_api_) {
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: VerteDinde <khammond@slack-corp.com>
|
||||
Date: Tue, 19 Oct 2021 16:56:25 -0700
|
||||
Subject: fix: mas gate private enterprise APIs
|
||||
|
||||
Beginning in Electron 15.2.0, Chromium moved several formerly public
|
||||
APIs into the AreDeviceAndUserJoinedToDomain method. Using these APIs
|
||||
in a MAS build will result in rejection from the Apple Store. This
|
||||
patch gates those APIs to non-MAS builds to comply with Apple
|
||||
Store requirements, and returns the default state for MAS builds.
|
||||
|
||||
diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm
|
||||
index bbb851e1cafb37ebaa67e4577598fab25c90fde6..6ab12e5505b5ba545e7e0cc8c93d3ba9a6d0bacc 100644
|
||||
--- a/base/enterprise_util_mac.mm
|
||||
+++ b/base/enterprise_util_mac.mm
|
||||
@@ -168,6 +168,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() {
|
||||
DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
static DeviceUserDomainJoinState state = [] {
|
||||
DeviceUserDomainJoinState state{false, false};
|
||||
+#if defined(MAS_BUILD)
|
||||
+ return state;
|
||||
+ }();
|
||||
+
|
||||
+ return state;
|
||||
+}
|
||||
+#else
|
||||
|
||||
@autoreleasepool {
|
||||
ODSession* session = [ODSession defaultSession];
|
||||
@@ -274,5 +281,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
|
||||
return state;
|
||||
}
|
||||
+#endif
|
||||
|
||||
} // namespace base
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index ecc38d1584570c46826084054f0a3249f9e2eb92..f06a04983571623b542dba11933c4c95c3dcf398 100644
|
||||
index 12d74d8751802b06198952682bfc99f18e5f8df8..6a331146e6fbf23e4177176f67fe534141579eb7 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -128,6 +128,11 @@
|
||||
@@ -139,10 +139,10 @@ index ecc38d1584570c46826084054f0a3249f9e2eb92..f06a04983571623b542dba11933c4c95
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 994712b56fb25fbfa7559ac034cfd7e1c76597de..2cd8707b120deb41683e13def5d446fd3bf93afe 100644
|
||||
index bcd47e726ad4d320cac3c3341d87b9a3ca2c4065..620d7b7b733cc9749775c2bcabcebdedafe6ba0b 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -109,6 +109,7 @@ class URLMatcher;
|
||||
@@ -105,6 +105,7 @@ class URLMatcher;
|
||||
|
||||
namespace network {
|
||||
class CertVerifierWithTrustAnchors;
|
||||
@@ -150,7 +150,7 @@ index 994712b56fb25fbfa7559ac034cfd7e1c76597de..2cd8707b120deb41683e13def5d446fd
|
||||
class CookieManager;
|
||||
class ExpectCTReporter;
|
||||
class HostResolver;
|
||||
@@ -240,6 +241,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -236,6 +237,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
@@ -159,7 +159,7 @@ index 994712b56fb25fbfa7559ac034cfd7e1c76597de..2cd8707b120deb41683e13def5d446fd
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -827,6 +830,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -823,6 +826,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
std::vector<base::OnceClosure> dismount_closures_;
|
||||
#endif // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
|
||||
|
||||
@@ -169,10 +169,10 @@ index 994712b56fb25fbfa7559ac034cfd7e1c76597de..2cd8707b120deb41683e13def5d446fd
|
||||
// CertNetFetcher is not used by the current platform, or if the actual
|
||||
// net::CertVerifier is instantiated outside of the network service.
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index b2beaa762bfe88b56ac24d35646b6e6cbc630816..b52e5a2230e96d55d7886bde331a505c58dd093a 100644
|
||||
index cc3f99007db46a488d7f8dacd3ede4a90e1d2ae3..0450b50b5545d9b8f9025553167bed2e78157130 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -281,6 +281,17 @@ struct NetworkContextFilePaths {
|
||||
@@ -282,6 +282,17 @@ struct NetworkContextFilePaths {
|
||||
bool trigger_migration = false;
|
||||
};
|
||||
|
||||
@@ -190,7 +190,7 @@ index b2beaa762bfe88b56ac24d35646b6e6cbc630816..b52e5a2230e96d55d7886bde331a505c
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -830,6 +841,9 @@ interface NetworkContext {
|
||||
@@ -833,6 +844,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
|
||||
so Electron can identify which renderer a notification came from.
|
||||
|
||||
diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
index 83b33e3f521aa79942ba3446a8b161a4e4e23da1..24f409f673797b6e8bb1da680343ea1ddc083e4f 100644
|
||||
index 362fedd0a0b654db546a73ff84c7e0676097e824..f1f6e2a36a6764ef12827fdab16818061b007959 100644
|
||||
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
@@ -195,6 +195,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
@@ -31,7 +31,7 @@ index b0e64049d411305d58802fd290bb0480e9b36fee..4afcf3b7a5b841409b0e1c4c2f32fd48
|
||||
const GURL& origin,
|
||||
const GURL& document_url,
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
|
||||
index 32a61e73658d33dcd0fe1640094c8b79dde0be37..3c3650e0f8364a5c86bd11a6f11ca559a97f5900 100644
|
||||
index a3df152caabcadaba454f73f58763a89fdea4247..ba76f2f294a2eab8581b5ef8d879cb464f14cb1f 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl.cc
|
||||
@@ -82,10 +82,12 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
|
||||
@@ -77,7 +77,7 @@ index dc8de24c86f1769680ce7830844d35dfef7eb7e7..fcd99361fa8c895d6bd89bacb9fb94e7
|
||||
|
||||
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
index 7461d5079f9cb0f257fbb93248c98be9409d38e7..4ddb9e40f0441b378d73ac75d99ae64c90d32b58 100644
|
||||
index fe015fa7d7813115a2c6a23a00cb509c4c16cd93..88e04351204c786d0fc72a99ccc421f76fc26ef9 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
@@ -129,7 +129,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
|
||||
@@ -90,7 +90,7 @@ index 7461d5079f9cb0f257fbb93248c98be9409d38e7..4ddb9e40f0441b378d73ac75d99ae64c
|
||||
notification_service_remote_.BindNewPipeAndPassReceiver());
|
||||
|
||||
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
index 1195296c6f925e6c4f52f61866cf4b7f824af4e9..d3142bef0856c5cd7f4822ee9dcaedaef74a12d3 100644
|
||||
index fc24d16beb5a0ae61bf3123d0594287031d69ddf..6a6edfa8f919ffca815cc0f50fcde0b09067d494 100644
|
||||
--- a/content/browser/notifications/platform_notification_context_impl.cc
|
||||
+++ b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
@@ -282,13 +282,14 @@ void PlatformNotificationContextImpl::Shutdown() {
|
||||
@@ -130,10 +130,10 @@ index 69f000e5cd25c6d89c88238873f638923bafdf0e..4f0068a92a0e99e2b34f105954689c7b
|
||||
const GURL& document_url,
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index b74b4c2028ccb22349253960b9aa6c5bfe87579c..396377fd4041cced3c68f8d57c8f868098bb8923 100644
|
||||
index 36830abdfa49fed9b8294ca33065816faa672e18..36b4e75828436df4274b522bdf75e88e1112aab6 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2088,7 +2088,8 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2085,7 +2085,8 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
document_url = rfh->GetLastCommittedURL();
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -8,50 +8,11 @@ chrome's generated resources for our own. This updates the #include so that we
|
||||
don't get errors for Chrome's generated resources, which are non-existent
|
||||
because we don't generate them in our build.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
||||
index 7bc8d118f87b91baf1c3bd1d34374996ab1d3638..2d2c1c86f311b07f0c2b09d5a4c082cc5599600c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
index d566dbf99ea1164c6a8407026a9839218a6ba1fb..239cd53d70c547c79214988a82efdc8c472d553c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/base/cursor/cursor.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
index a3d9c0f03c8ade2553bad5721d4e15e6fd658074..b3b043cbf9144013bf7903121575b31b348ea87e 100644
|
||||
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/base/models/image_model.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca8751134eaf3c33 100644
|
||||
index 27e776fcf770b0ef72151d98d07778badabe807e..f7fb7850497a289ca8627752ba952d9f59468079 100644
|
||||
--- a/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/document_overlay_window_views.cc
|
||||
@@ -15,24 +15,28 @@
|
||||
@@ -15,15 +15,19 @@
|
||||
#include "base/timer/timer.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
@@ -71,16 +32,6 @@ index 3309906bcae27ba89d73ce4fba49843a10cd31f6..9f828f70606238186b35b5e1ca875113
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/resize_handle_button.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
#include "components/omnibox/browser/location_bar_model_impl.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "content/public/browser/document_picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "content/public/common/content_constants.h"
|
||||
#include "media/base/media_switches.h"
|
||||
#include "media/base/video_util.h"
|
||||
@@ -57,7 +61,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
@@ -161,24 +112,11 @@ index b2b178ccadce82f8d4ec8e5a6dafe1c67bcecd74..603d82a461c4c443ac26c85a46fbd866
|
||||
|
||||
// OverlayWindowViews
|
||||
bool ControlsHitTestContainsPoint(const gfx::Point& point) override;
|
||||
diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc
|
||||
index 75bfe0f7a4d759f677cad5c365fa7f98121d54de..cb251381f1c77ad01d4906132f3d68865aaace10 100644
|
||||
--- a/chrome/browser/ui/views/overlay/hang_up_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/hang_up_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/constants.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c36ad14705 100644
|
||||
index 55b53039e4db6afa197fbb61c40d0a21095c5bf9..9dfdd0288391aac31556c716d24c66d123fbd783 100644
|
||||
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
@@ -14,13 +14,15 @@
|
||||
@@ -14,9 +14,11 @@
|
||||
#include "base/time/time.h"
|
||||
#include "base/timer/timer.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -186,15 +124,10 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_finder.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#endif
|
||||
#include "chrome/grit/generated_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "content/public/browser/picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/display/display.h"
|
||||
#include "ui/display/screen.h"
|
||||
@@ -36,7 +38,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
@@ -204,86 +137,8 @@ index 850b34e3b40f7ff1848c66158976db079e0853bd..105dbc3661eb2710b2f10ca6584e85c3
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
||||
index cb1621a9deefcec601d7537e2cc2fbd24e5f7f64..2d74ab12e1eaf77a6f9dde13e894172d6835e061 100644
|
||||
--- a/chrome/browser/ui/views/overlay/playback_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/playback_image_button.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/constants.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
||||
index 8bf217b9b0c2bd22d6940c24c58eccb9865c5286..91f061a1243135db475371dda00c2fe054f4e8e3 100644
|
||||
--- a/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
index 51c7db1bfbd3c03b9cb2786c8c7482b33e3aca0b..2890f7420d2fd258f84019963eab6c9606e228db 100644
|
||||
--- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "chrome/browser/ui/views/overlay/skip_ad_label_button.h"
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
||||
index 20b82ff4dcf7fef3315b2b47bb480446509c6541..244a50e57b6c12680405c92f0ecbdbdb8bcfcb4f 100644
|
||||
--- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/toggle_camera_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/constants.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
||||
index 1a1edb6321490fdbf5cd347cb3d2cb9a6a5b1080..1e959cf1c8fe356ab4427e4bf4f8da1028f4575f 100644
|
||||
--- a/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/toggle_microphone_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/constants.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
index 5e136488b37887e9523ac04a9ff4ccdfaf96c104..24899f4c2b6fe66b96a6728bf747f1aad66f20a9 100644
|
||||
--- a/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index c24fdd1360e582293a8b21b2f29dc6bc02b564c9..24bb07ae2efaad2e7f5957a73585885168349109 100644
|
||||
index c1d2614f3ae3e7256db95a2cd3c5253ab6b25bd0..cabe6f261c863c35882deb8f850194e27f78a4f9 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -15,9 +15,11 @@
|
||||
@@ -298,18 +153,6 @@ index c24fdd1360e582293a8b21b2f29dc6bc02b564c9..24bb07ae2efaad2e7f5957a735858851
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_image_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
@@ -29,10 +31,10 @@
|
||||
#include "chrome/browser/ui/views/overlay/toggle_camera_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/toggle_microphone_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/track_image_button.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "content/public/browser/video_picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "media/base/media_switches.h"
|
||||
#include "media/base/video_util.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
@@ -56,7 +58,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
@@ -319,7 +162,7 @@ index c24fdd1360e582293a8b21b2f29dc6bc02b564c9..24bb07ae2efaad2e7f5957a735858851
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -167,7 +169,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
@@ -166,7 +168,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
overlay_window->Init(std::move(params));
|
||||
overlay_window->OnRootViewReady();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
||||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
|
||||
index 13c1a8c9760fa0f286c6c5adc8f74fdae910ab50..b7a967642ff059c97f55002a9a0962709d806959 100644
|
||||
index 14d91a0d19c01a856a9614b127a4ef3655614684..a243dd71886af7c5313b16a8522a50ae50af5959 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -128,6 +128,16 @@
|
||||
@@ -37,10 +37,10 @@ index 13c1a8c9760fa0f286c6c5adc8f74fdae910ab50..b7a967642ff059c97f55002a9a096270
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
|
||||
index 3e44d34fe1317822c340ebbcc895d7d8b55bed0b..be1737a96058c29d03645cc00999b6d7fc315f48 100644
|
||||
index 8b5b8c6321aaf668ad90870a0567c1a97d268323..8296b2c017f1774c1a38d931add2b7cac4f57dfe 100644
|
||||
--- a/ui/color/ui_color_mixer.cc
|
||||
+++ b/ui/color/ui_color_mixer.cc
|
||||
@@ -148,6 +148,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -149,6 +149,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
SetAlpha(GetColorWithMaxContrast(kColorOverlayScrollbarFillHoveredLight),
|
||||
gfx::kGoogleGreyAlpha500);
|
||||
mixer[kColorProgressBar] = {kColorAccent};
|
||||
@@ -58,7 +58,7 @@ index 3e44d34fe1317822c340ebbcc895d7d8b55bed0b..be1737a96058c29d03645cc00999b6d7
|
||||
mixer[kColorSeparator] = {kColorMidground};
|
||||
mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800};
|
||||
mixer[kColorShadowValueAmbientShadowElevationThree] =
|
||||
@@ -223,6 +234,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -228,6 +239,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground};
|
||||
mixer[kColorTreeNodeForegroundSelectedUnfocused] = {
|
||||
kColorTreeNodeForegroundSelectedFocused};
|
||||
|
||||
@@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
|
||||
This patch also fixes callback for manual user cancellation and success.
|
||||
|
||||
diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
|
||||
index 6408cbee8b5a8e45c4276ed966b57c1e61ad1137..e951c41a1bd92a33e32f6835841d3935a05dde53 100644
|
||||
index 331a084371402b5a2440b5d60feac8f0189e84b9..6755d1f497cef4deea6b83df1d8720dcf54817e9 100644
|
||||
--- a/chrome/browser/printing/print_job.cc
|
||||
+++ b/chrome/browser/printing/print_job.cc
|
||||
@@ -89,6 +89,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
@@ -90,6 +90,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
|
||||
return base::FeatureList::IsEnabled(features::kPrintWithReducedRasterization);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ index 6408cbee8b5a8e45c4276ed966b57c1e61ad1137..e951c41a1bd92a33e32f6835841d3935
|
||||
PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
|
||||
// TODO(thestig): Figure out why crbug.com/1083911 occurred, which is likely
|
||||
// because `web_contents` was null. As a result, this section has many more
|
||||
@@ -97,6 +98,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
|
||||
@@ -98,6 +99,7 @@ PrefService* GetPrefsForWebContents(content::WebContents* web_contents) {
|
||||
web_contents ? web_contents->GetBrowserContext() : nullptr;
|
||||
return context ? Profile::FromBrowserContext(context)->GetPrefs() : nullptr;
|
||||
}
|
||||
@@ -30,7 +30,7 @@ index 6408cbee8b5a8e45c4276ed966b57c1e61ad1137..e951c41a1bd92a33e32f6835841d3935
|
||||
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
@@ -360,8 +362,10 @@ void PrintJob::StartPdfToEmfConversion(
|
||||
@@ -351,8 +353,10 @@ void PrintJob::StartPdfToEmfConversion(
|
||||
|
||||
const PrintSettings& settings = document()->settings();
|
||||
|
||||
@@ -42,7 +42,7 @@ index 6408cbee8b5a8e45c4276ed966b57c1e61ad1137..e951c41a1bd92a33e32f6835841d3935
|
||||
|
||||
using RenderMode = PdfRenderSettings::Mode;
|
||||
RenderMode mode = print_with_reduced_rasterization
|
||||
@@ -451,8 +455,10 @@ void PrintJob::StartPdfToPostScriptConversion(
|
||||
@@ -442,8 +446,10 @@ void PrintJob::StartPdfToPostScriptConversion(
|
||||
if (ps_level2) {
|
||||
mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2;
|
||||
} else {
|
||||
@@ -55,7 +55,7 @@ index 6408cbee8b5a8e45c4276ed966b57c1e61ad1137..e951c41a1bd92a33e32f6835841d3935
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
|
||||
index 86770178101d411bdf84617678c65a4a29ddbb5c..16e1fe8fc650fba441bcc7e467d58e0071dbc945 100644
|
||||
index ee713c5686d4ea8a5d73cebf74e67381b685cff6..375ce3294727b84bf0071681c7bc35c772e4e3b9 100644
|
||||
--- a/chrome/browser/printing/print_job_worker.cc
|
||||
+++ b/chrome/browser/printing/print_job_worker.cc
|
||||
@@ -20,7 +20,6 @@
|
||||
@@ -70,7 +70,7 @@ index 86770178101d411bdf84617678c65a4a29ddbb5c..16e1fe8fc650fba441bcc7e467d58e00
|
||||
#include "content/public/browser/global_routing_id.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
+#include "chrome/grit/generated_resources.h"
|
||||
#include "printing/backend/print_backend.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
@@ -113,7 +113,7 @@ index dd27bbf387718d6abda5080e7d2c609cd0eaff17..8837cf2aeaa2f87d51be8d00aa356c8a
|
||||
|
||||
void PrintJobWorkerOop::UnregisterServiceManagerClient() {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8cfda8d6b5 100644
|
||||
index 3701853ada7f0ffe3cc8a798496f9f48541b4f47..973666a1315c8cbba0a2cefbe9195fdc9c122ae3 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -30,10 +30,10 @@
|
||||
@@ -133,7 +133,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
+#include "chrome/grit/generated_resources.h"
|
||||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/metafile_skia.h"
|
||||
@@ -206,7 +206,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
-bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
+bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh,
|
||||
+ bool silent,
|
||||
+ base::Value settings,
|
||||
+ base::Value::Dict settings,
|
||||
+ CompletionCallback callback) {
|
||||
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
|
||||
// is still valid after a possible inner message loop runs in
|
||||
@@ -317,15 +317,15 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -748,7 +774,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
PrintManager::PrintingFailed(cookie);
|
||||
@@ -763,7 +789,6 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
#if !BUILDFLAG(IS_ANDROID) // Android does not implement this function.
|
||||
- ShowPrintErrorDialog();
|
||||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -763,6 +788,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
@@ -778,6 +803,11 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
@@ -337,7 +337,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -773,10 +803,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
@@ -788,10 +818,12 @@ void PrintViewManagerBase::RenderFrameHostStateChanged(
|
||||
content::RenderFrameHost* render_frame_host,
|
||||
content::RenderFrameHost::LifecycleState /*old_state*/,
|
||||
content::RenderFrameHost::LifecycleState new_state) {
|
||||
@@ -350,7 +350,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::DidStartLoading() {
|
||||
@@ -836,6 +868,11 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -851,6 +883,11 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
@@ -893,7 +930,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -908,7 +945,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current |print_job_|.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -374,7 +374,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -972,6 +1012,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -987,6 +1027,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
UnregisterSystemPrintClient();
|
||||
#endif
|
||||
|
||||
@@ -388,7 +388,7 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1021,7 +1068,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1036,7 +1083,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -397,17 +397,17 @@ index fb69efbfa8e355f8389abf9490cf338e70f16c7b..3949a0c01e2d305d9560791a1dd9ed8c
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1129,7 +1176,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
@@ -1144,7 +1191,7 @@ void PrintViewManagerBase::SendPrintingEnabled(bool enabled,
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
- GetPrintRenderFrame(rfh)->PrintRequestedPages();
|
||||
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/);
|
||||
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(/*silent=*/true, /*job_settings=*/base::Value::Dict());
|
||||
|
||||
for (auto& observer : GetObservers())
|
||||
observer.OnPrintNow(rfh);
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 48895e0f8a846aeb725e306c7f22ac159d5d96a7..7ae57ba04cedd9d4a428c140e48bd9a8ecb57c21 100644
|
||||
index 746df417a23f7760818ba265d4a7d589dec8bf34..0027387d4717c59f2df3f279caf7aa0de6669400 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -41,6 +41,8 @@ namespace printing {
|
||||
@@ -419,27 +419,27 @@ index 48895e0f8a846aeb725e306c7f22ac159d5d96a7..7ae57ba04cedd9d4a428c140e48bd9a8
|
||||
// Base class for managing the print commands for a WebContents.
|
||||
class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
public:
|
||||
@@ -62,7 +64,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -64,7 +66,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Prints the current document immediately. Since the rendering is
|
||||
// asynchronous, the actual printing will not be completed on the return of
|
||||
// this function. Returns false if printing is impossible at the moment.
|
||||
- virtual bool PrintNow(content::RenderFrameHost* rfh);
|
||||
+ virtual bool PrintNow(content::RenderFrameHost* rfh,
|
||||
+ bool silent = true,
|
||||
+ base::Value settings = {},
|
||||
+ base::Value::Dict settings = {},
|
||||
+ CompletionCallback callback = {});
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in `print_data` with settings specified in
|
||||
@@ -110,6 +115,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
ScriptedPrintCallback callback) override;
|
||||
@@ -113,6 +118,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void ShowInvalidPrinterSettingsError() override;
|
||||
void PrintingFailed(int32_t cookie) override;
|
||||
void PrintingFailed(int32_t cookie,
|
||||
mojom::PrintFailureReason reason) override;
|
||||
+ void UserInitCanceled();
|
||||
|
||||
// Adds and removes observers for `PrintViewManagerBase` events. The order in
|
||||
// which notifications are sent to observers is undefined. Observers must be
|
||||
@@ -231,7 +237,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -241,7 +247,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Runs `callback` with `params` to reply to ScriptedPrint().
|
||||
void ScriptedPrintReply(ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -449,7 +449,7 @@ index 48895e0f8a846aeb725e306c7f22ac159d5d96a7..7ae57ba04cedd9d4a428c140e48bd9a8
|
||||
|
||||
// Requests the RenderView to render all the missing pages for the print job.
|
||||
// No-op if no print job is pending. Returns true if at least one page has
|
||||
@@ -297,9 +304,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -314,9 +321,15 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
|
||||
|
||||
@@ -466,20 +466,20 @@ index 48895e0f8a846aeb725e306c7f22ac159d5d96a7..7ae57ba04cedd9d4a428c140e48bd9a8
|
||||
// This means we are _blocking_ until all the necessary pages have been
|
||||
// rendered or the print settings are being loaded.
|
||||
diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc
|
||||
index 016e0d8fcc575bfa77323d8600d5daba152abbc6..3a9b68a88c71c6f9760ed305f8aefd9fa5e71650 100644
|
||||
index aa727261738698610fab5abd3618d0d0f0d29792..2793fbc33e66cf9d7e3fc5e10f0d01730f3b935d 100644
|
||||
--- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc
|
||||
+++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.cc
|
||||
@@ -20,7 +20,7 @@ FakePrintRenderFrame::FakePrintRenderFrame(
|
||||
@@ -21,7 +21,7 @@ FakePrintRenderFrame::FakePrintRenderFrame(
|
||||
|
||||
FakePrintRenderFrame::~FakePrintRenderFrame() = default;
|
||||
|
||||
-void FakePrintRenderFrame::PrintRequestedPages() {}
|
||||
+void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value /*settings*/) {}
|
||||
|
||||
void FakePrintRenderFrame::PrintForSystemDialog() {}
|
||||
+void FakePrintRenderFrame::PrintRequestedPages(bool /*silent*/, ::base::Value::Dict /*settings*/) {}
|
||||
|
||||
void FakePrintRenderFrame::PrintWithParams(mojom::PrintPagesParamsPtr params) {
|
||||
NOTREACHED();
|
||||
diff --git a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h
|
||||
index 3c95ee5c0d169f677947427a6ace55b4bfe80277..9e9d3f327b0033229cdd9b78159a1abdad5d3a80 100644
|
||||
index 5f4d6e314b21351e3e5912e3a43ef87774343085..8627c8305686654dca7cd9c26433592e934d4eb0 100644
|
||||
--- a/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h
|
||||
+++ b/chrome/browser/ui/webui/print_preview/fake_print_render_frame.h
|
||||
@@ -25,7 +25,7 @@ class FakePrintRenderFrame : public mojom::PrintRenderFrame {
|
||||
@@ -487,73 +487,47 @@ index 3c95ee5c0d169f677947427a6ace55b4bfe80277..9e9d3f327b0033229cdd9b78159a1abd
|
||||
private:
|
||||
// printing::mojom::PrintRenderFrame:
|
||||
- void PrintRequestedPages() override;
|
||||
+ void PrintRequestedPages(bool silent, ::base::Value settings) override;
|
||||
+ void PrintRequestedPages(bool silent, ::base::Value::Dict settings) override;
|
||||
void PrintWithParams(mojom::PrintPagesParamsPtr params) override;
|
||||
void PrintForSystemDialog() override;
|
||||
void SetPrintPreviewUI(
|
||||
mojo::PendingAssociatedRemote<mojom::PrintPreviewUI> preview) override;
|
||||
diff --git a/components/printing/browser/print_to_pdf/pdf_print_manager.cc b/components/printing/browser/print_to_pdf/pdf_print_manager.cc
|
||||
index 3ba45e77f66531bc6b81717eb9c7d3faca1e9fa9..41271d3fe390dd16d1c2b9839ac32013f495df51 100644
|
||||
index 82591f8c2abbc1a180ef62f7264a68ca279e9b9c..ad27a15ba3028af1046482192dec789df5dda7b2 100644
|
||||
--- a/components/printing/browser/print_to_pdf/pdf_print_manager.cc
|
||||
+++ b/components/printing/browser/print_to_pdf/pdf_print_manager.cc
|
||||
@@ -116,7 +116,8 @@ void PdfPrintManager::PrintToPdf(
|
||||
set_cookie(print_pages_params_->params->document_cookie);
|
||||
@@ -132,7 +132,8 @@ void PdfPrintManager::PrintToPdf(
|
||||
set_cookie(print_pages_params->params->document_cookie);
|
||||
callback_ = std::move(callback);
|
||||
|
||||
- GetPrintRenderFrame(rfh)->PrintRequestedPages();
|
||||
- GetPrintRenderFrame(rfh)->PrintWithParams(std::move(print_pages_params));
|
||||
+ // TODO(electron-maintainers): do something with job_settings here?
|
||||
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(true/*silent*/, base::Value{}/*job_settings*/);
|
||||
}
|
||||
|
||||
void PdfPrintManager::GetDefaultPrintSettings(
|
||||
@@ -138,14 +139,14 @@ void PdfPrintManager::ScriptedPrint(
|
||||
if (!printing_rfh_) {
|
||||
DLOG(ERROR) << "Unexpected message received before PrintToPdf is "
|
||||
"called: ScriptedPrint";
|
||||
- std::move(callback).Run(std::move(default_param));
|
||||
+ std::move(callback).Run(std::move(default_param), true/*canceled*/);
|
||||
return;
|
||||
}
|
||||
if (params->is_scripted &&
|
||||
GetCurrentTargetFrame()->IsNestedWithinFencedFrame()) {
|
||||
DLOG(ERROR) << "Unexpected message received. Script Print is not allowed"
|
||||
" in a fenced frame.";
|
||||
- std::move(callback).Run(std::move(default_param));
|
||||
+ std::move(callback).Run(std::move(default_param), true/*canceled*/);
|
||||
return;
|
||||
}
|
||||
absl::variant<printing::PageRanges, PageRangeError> page_ranges =
|
||||
@@ -162,7 +163,7 @@ void PdfPrintManager::ScriptedPrint(
|
||||
break;
|
||||
}
|
||||
ReleaseJob(print_result);
|
||||
- std::move(callback).Run(std::move(default_param));
|
||||
+ std::move(callback).Run(std::move(default_param), true/*canceled*/);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -170,7 +171,7 @@ void PdfPrintManager::ScriptedPrint(
|
||||
print_pages_params_->pages = printing::PageRange::GetPages(
|
||||
absl::get<printing::PageRanges>(page_ranges));
|
||||
|
||||
- std::move(callback).Run(print_pages_params_->Clone());
|
||||
+ std::move(callback).Run(print_pages_params_->Clone(), false/*canceled*/);
|
||||
@@ -147,7 +148,7 @@ void PdfPrintManager::ScriptedPrint(
|
||||
auto default_param = printing::mojom::PrintPagesParams::New();
|
||||
default_param->params = printing::mojom::PrintParams::New();
|
||||
DLOG(ERROR) << "Scripted print is not supported";
|
||||
- std::move(callback).Run(std::move(default_param));
|
||||
+ std::move(callback).Run(std::move(default_param), true/*canceled*/);
|
||||
}
|
||||
|
||||
void PdfPrintManager::ShowInvalidPrinterSettingsError() {
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index 156b987aa9cafb69c04bed483aa78f26baa9cd97..fd50e8ca937878d73f9ae4c22aec204e7851e95b 100644
|
||||
index 8e5c441b3d0a2d35fc5c6f9d43b4a4ca167e09ca..2cfcd810c9507c434e673064b63e8fbc95172537 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -275,7 +275,7 @@ interface PrintPreviewUI {
|
||||
@@ -280,7 +280,7 @@ enum PrintFailureReason {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
- PrintRequestedPages();
|
||||
+ PrintRequestedPages(bool silent, mojo_base.mojom.DeprecatedDictionaryValue settings);
|
||||
+ PrintRequestedPages(bool silent, mojo_base.mojom.DictionaryValue settings);
|
||||
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page using the print preview document's frame/node, and then
|
||||
@@ -348,7 +348,7 @@ interface PrintManagerHost {
|
||||
// Requests the frame to be printed with specified parameters. This is used
|
||||
// to programmatically produce PDF by request from the browser (e.g. over
|
||||
@@ -362,7 +362,7 @@ interface PrintManagerHost {
|
||||
// Request the print settings from the user. This step is about showing
|
||||
// UI to the user to select the final print settings.
|
||||
[Sync]
|
||||
@@ -563,37 +537,37 @@ index 156b987aa9cafb69c04bed483aa78f26baa9cd97..fd50e8ca937878d73f9ae4c22aec204e
|
||||
// Tells the browser that there are invalid printer settings.
|
||||
ShowInvalidPrinterSettingsError();
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb208b0d21 100644
|
||||
index db8913ae41d46d14fd15c6127e126e4b129dc4b8..ddbc3b0d5a00af9de84e1b0aadc44adb6ff84495 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -41,6 +41,7 @@
|
||||
#include "printing/metafile_skia.h"
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "printing/mojom/print.mojom.h"
|
||||
#include "printing/page_number.h"
|
||||
#include "printing/print_job_constants.h"
|
||||
+#include "printing/print_settings.h"
|
||||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
@@ -1276,7 +1277,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1277,7 +1278,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
- Print(web_frame, blink::WebNode(), PrintRequestType::kScripted);
|
||||
+ Print(web_frame, blink::WebNode(), PrintRequestType::kScripted,
|
||||
+ false /* silent */, base::DictionaryValue() /* new_settings */);
|
||||
+ false /* silent */, base::Value::Dict() /* new_settings */);
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
@@ -1307,7 +1309,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1308,7 +1310,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
-void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
+void PrintRenderFrameHelper::PrintRequestedPages(bool silent, base::Value settings) {
|
||||
+void PrintRenderFrameHelper::PrintRequestedPages(bool silent, base::Value::Dict settings) {
|
||||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
@@ -1322,7 +1324,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1323,7 +1325,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// plugin node and print that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
@@ -602,17 +576,17 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
|
||||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
@@ -1353,7 +1355,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1389,7 +1391,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
- PrintRequestType::kRegular);
|
||||
+ PrintRequestType::kRegular, false,
|
||||
+ base::DictionaryValue());
|
||||
+ base::Value::Dict());
|
||||
if (!render_frame_gone_)
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1402,6 +1405,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
@@ -1438,6 +1441,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
|
||||
return;
|
||||
|
||||
@@ -621,37 +595,37 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -2008,7 +2013,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2051,7 +2056,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
- PrintRequestType::kRegular);
|
||||
+ PrintRequestType::kRegular, false /* silent */,
|
||||
+ base::DictionaryValue() /* new_settings */);
|
||||
+ base::Value::Dict() /* new_settings */);
|
||||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -2023,7 +2029,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -2066,7 +2072,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
- PrintRequestType print_request_type) {
|
||||
+ PrintRequestType print_request_type,
|
||||
+ bool silent,
|
||||
+ base::Value settings) {
|
||||
+ base::Value::Dict settings) {
|
||||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -2031,7 +2039,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2074,7 +2082,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
- if (!CalculateNumberOfPages(frame, node, &expected_page_count)) {
|
||||
+ if (!CalculateNumberOfPages(frame, node, &expected_page_count, base::Value::AsDictionaryValue(settings))) {
|
||||
+ if (!CalculateNumberOfPages(frame, node, &expected_page_count, std::move(settings))) {
|
||||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -2050,8 +2058,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -2093,8 +2101,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -668,7 +642,7 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2300,36 +2315,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2327,36 +2342,52 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -678,10 +652,10 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
- GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
|
||||
+bool PrintRenderFrameHelper::InitPrintSettings(
|
||||
+ bool fit_to_paper_size,
|
||||
+ const base::DictionaryValue& new_settings) {
|
||||
+ base::Value::Dict new_settings) {
|
||||
+ mojom::PrintPagesParamsPtr settings;
|
||||
+
|
||||
+ if (new_settings.DictEmpty()) {
|
||||
+ if (new_settings.empty()) {
|
||||
+ settings = mojom::PrintPagesParams::New();
|
||||
+ settings->params = mojom::PrintParams::New();
|
||||
+ GetPrintManagerHost()->GetDefaultPrintSettings(&settings->params);
|
||||
@@ -690,7 +664,7 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
+ int cookie =
|
||||
+ print_pages_params_ ? print_pages_params_->params->document_cookie : 0;
|
||||
+ GetPrintManagerHost()->UpdatePrintSettings(
|
||||
+ cookie, new_settings.GetDict().Clone(), &settings, &canceled);
|
||||
+ cookie, std::move(new_settings), &settings, &canceled);
|
||||
+ if (canceled)
|
||||
+ return false;
|
||||
+ }
|
||||
@@ -725,15 +699,15 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
+ blink::WebLocalFrame* frame,
|
||||
+ const blink::WebNode& node,
|
||||
+ uint32_t* number_of_pages,
|
||||
+ const base::DictionaryValue& settings) {
|
||||
+ base::Value::Dict settings) {
|
||||
DCHECK(frame);
|
||||
bool fit_to_paper_size = !IsPrintingPdfFrame(frame, node);
|
||||
- if (!InitPrintSettings(fit_to_paper_size)) {
|
||||
+ if (!InitPrintSettings(fit_to_paper_size, settings)) {
|
||||
+ if (!InitPrintSettings(fit_to_paper_size, std::move(settings))) {
|
||||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2454,7 +2485,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
@@ -2481,7 +2512,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
|
||||
std::move(params),
|
||||
base::BindOnce(
|
||||
[](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
|
||||
@@ -742,7 +716,7 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
*output = std::move(input);
|
||||
std::move(quit_closure).Run();
|
||||
},
|
||||
@@ -2705,18 +2736,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type,
|
||||
@@ -2725,18 +2756,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type,
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::CheckForCancel() {
|
||||
@@ -763,43 +737,43 @@ index e0ecf8f3f09dafe44a5220117281a08e38a61bef..01059e34e4c90c681dd347ad4876c0fb
|
||||
|
||||
bool PrintRenderFrameHelper::PreviewPageRendered(
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index 15c367bd66706c915fdb95faf483429a8b31eb4c..628e113b861b6ea5157ff2179ea29dbb063ad992 100644
|
||||
index 220b28a7e63625fe8b76290f0d2f40dd32cae255..cff9e35fab9df680c3c39467c50ddb033c2e6cba 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -254,7 +254,7 @@ class PrintRenderFrameHelper
|
||||
@@ -255,7 +255,7 @@ class PrintRenderFrameHelper
|
||||
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
|
||||
|
||||
// printing::mojom::PrintRenderFrame:
|
||||
- void PrintRequestedPages() override;
|
||||
+ void PrintRequestedPages(bool silent, base::Value settings) override;
|
||||
+ void PrintRequestedPages(bool silent, base::Value::Dict settings) override;
|
||||
void PrintWithParams(mojom::PrintPagesParamsPtr params) override;
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
void PrintForSystemDialog() override;
|
||||
void SetPrintPreviewUI(
|
||||
@@ -325,7 +325,9 @@ class PrintRenderFrameHelper
|
||||
@@ -327,7 +327,9 @@ class PrintRenderFrameHelper
|
||||
// WARNING: |this| may be gone after this method returns.
|
||||
void Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
- PrintRequestType print_request_type);
|
||||
+ PrintRequestType print_request_type,
|
||||
+ bool silent,
|
||||
+ base::Value settings);
|
||||
+ base::Value::Dict settings);
|
||||
|
||||
// Notification when printing is done - signal tear-down/free resources.
|
||||
void DidFinishPrinting(PrintingResult result);
|
||||
@@ -334,12 +336,14 @@ class PrintRenderFrameHelper
|
||||
@@ -336,12 +338,14 @@ class PrintRenderFrameHelper
|
||||
|
||||
// Initialize print page settings with default settings.
|
||||
// Used only for native printing workflow.
|
||||
- bool InitPrintSettings(bool fit_to_paper_size);
|
||||
+ bool InitPrintSettings(bool fit_to_paper_size,
|
||||
+ const base::DictionaryValue& settings);
|
||||
+ base::Value::Dict new_settings);
|
||||
|
||||
// Calculate number of pages in source document.
|
||||
bool CalculateNumberOfPages(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
- uint32_t* number_of_pages);
|
||||
+ uint32_t* number_of_pages,
|
||||
+ const base::DictionaryValue& settings);
|
||||
+ base::Value::Dict settings);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
|
||||
@@ -75,7 +75,7 @@ index 16bb3aa15a5378e8319f75f4b6b72b39177828f4..5a64220aaf1309832dc0ad543e353de6
|
||||
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd0493c942 100644
|
||||
index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..9bb12894da06fc7d281daced754b240afa9bedeb 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -54,6 +54,7 @@
|
||||
@@ -86,15 +86,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/base_paths.h"
|
||||
@@ -80,6 +81,7 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "base/task/sequenced_task_runner_helpers.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
+#include "base/task/post_task.h"
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/threading/thread_task_runner_handle.h"
|
||||
#include "base/time/time.h"
|
||||
@@ -96,9 +98,11 @@
|
||||
@@ -96,9 +97,11 @@
|
||||
#include "net/base/network_interfaces.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
|
||||
@@ -106,7 +98,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
|
||||
#if defined(TOOLKIT_VIEWS) && \
|
||||
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS))
|
||||
@@ -347,6 +351,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) {
|
||||
@@ -347,6 +350,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) {
|
||||
bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
const std::string& hostname,
|
||||
int pid) {
|
||||
@@ -116,7 +108,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
std::u16string error = l10n_util::GetStringFUTF16(
|
||||
IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid),
|
||||
base::ASCIIToUTF16(hostname));
|
||||
@@ -366,6 +373,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
@@ -366,6 +372,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
|
||||
NOTREACHED();
|
||||
return false;
|
||||
@@ -124,7 +116,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
}
|
||||
|
||||
bool IsChromeProcess(pid_t pid) {
|
||||
@@ -406,6 +414,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
|
||||
@@ -406,6 +413,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
|
||||
return (cookie == ReadLink(path));
|
||||
}
|
||||
|
||||
@@ -146,7 +138,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
bool ConnectSocket(ScopedSocket* socket,
|
||||
const base::FilePath& socket_path,
|
||||
const base::FilePath& cookie_path) {
|
||||
@@ -773,6 +796,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
@@ -773,6 +795,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
|
||||
ProcessSingleton::~ProcessSingleton() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -157,13 +149,13 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
}
|
||||
|
||||
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -945,6 +972,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
@@ -945,6 +971,20 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessOrCreate() {
|
||||
base::Seconds(kTimeoutInSeconds));
|
||||
}
|
||||
|
||||
+void ProcessSingleton::StartListeningOnSocket() {
|
||||
+ watcher_ = base::MakeRefCounted<LinuxWatcher>(this);
|
||||
+ base::PostTask(FROM_HERE, {BrowserThread::IO},
|
||||
+ content::GetIOThreadTaskRunner({})->PostTask(FROM_HERE,
|
||||
+ base::BindOnce(&ProcessSingleton::LinuxWatcher::StartListening,
|
||||
+ watcher_, sock_));
|
||||
+}
|
||||
@@ -178,7 +170,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
ProcessSingleton::NotifyResult
|
||||
ProcessSingleton::NotifyOtherProcessWithTimeoutOrCreate(
|
||||
const base::CommandLine& command_line,
|
||||
@@ -1044,14 +1085,32 @@ bool ProcessSingleton::Create() {
|
||||
@@ -1044,14 +1084,32 @@ bool ProcessSingleton::Create() {
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -216,7 +208,7 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
// Check that the directory was created with the correct permissions.
|
||||
int dir_mode = 0;
|
||||
CHECK(base::GetPosixFilePermissions(socket_dir_.GetPath(), &dir_mode) &&
|
||||
@@ -1094,10 +1153,13 @@ bool ProcessSingleton::Create() {
|
||||
@@ -1094,10 +1152,13 @@ bool ProcessSingleton::Create() {
|
||||
if (listen(sock, 5) < 0)
|
||||
NOTREACHED() << "listen failed: " << base::safe_strerror(errno);
|
||||
|
||||
@@ -235,10 +227,10 @@ index 22331cd6985b2aa2347fe9d4211f51634e94d0a6..be2c417c07a4206fac4a9a6c03e516fd
|
||||
return true;
|
||||
}
|
||||
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc
|
||||
index e2312c65623a3f54ecbc18058720ccae53822e76..ec725b44296266bea1a51aea889463a0bba8449c 100644
|
||||
index 363c18e4d9d5c0fe30f843d32df67e97e3d73111..0c87fc8ccb4511904f19b76ae5e03a5df6664391 100644
|
||||
--- a/chrome/browser/process_singleton_win.cc
|
||||
+++ b/chrome/browser/process_singleton_win.cc
|
||||
@@ -28,7 +28,9 @@
|
||||
@@ -29,7 +29,9 @@
|
||||
#include "base/win/wmi.h"
|
||||
#include "chrome/browser/process_singleton_internal.h"
|
||||
#include "chrome/browser/shell_integration.h"
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: proxy_config_monitor.patch
|
||||
Allow monitoring proxy config changes for a pref service.
|
||||
|
||||
diff --git a/chrome/browser/net/proxy_config_monitor.cc b/chrome/browser/net/proxy_config_monitor.cc
|
||||
index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a8bb9daae 100644
|
||||
index d05a82a9c369a42cddebb1af1546a5ba6ae59c9f..7a263e3e6cc2a6bd27ec61598d9aae81c12d16e0 100644
|
||||
--- a/chrome/browser/net/proxy_config_monitor.cc
|
||||
+++ b/chrome/browser/net/proxy_config_monitor.cc
|
||||
@@ -11,7 +11,9 @@
|
||||
@@ -34,7 +34,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a
|
||||
ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
DCHECK(profile);
|
||||
@@ -56,6 +59,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
|
||||
@@ -57,6 +60,7 @@ ProxyConfigMonitor::ProxyConfigMonitor(Profile* profile) {
|
||||
|
||||
proxy_config_service_->AddObserver(this);
|
||||
}
|
||||
@@ -42,7 +42,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a
|
||||
|
||||
ProxyConfigMonitor::ProxyConfigMonitor(PrefService* local_state) {
|
||||
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI) ||
|
||||
@@ -133,9 +137,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() {
|
||||
@@ -134,9 +138,11 @@ void ProxyConfigMonitor::OnLazyProxyConfigPoll() {
|
||||
void ProxyConfigMonitor::OnPACScriptError(int32_t line_number,
|
||||
const std::string& details) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -54,7 +54,7 @@ index 88fad9811069e7851363c8068f9702a9019669cc..526d951589f2757835fded706f4e448a
|
||||
}
|
||||
|
||||
void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings(
|
||||
@@ -149,9 +155,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings(
|
||||
@@ -150,9 +156,10 @@ void ProxyConfigMonitor::OnRequestMaybeFailedDueToProxySettings(
|
||||
// controlled.
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -30,10 +30,10 @@ index bdad25cd2c823fa2125fc523c400479882735ae6..bf2ddb136274eb3e4e597ed3060aabca
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 7cda66952e0d3a67c32791ad3c7d7de8df03f876..8cb3a596593c52e776d546d25fb078003204faa6 100644
|
||||
index fcc45c987cfce94f5378d4aeee1cfe703178e133..d78ca15f4d589b6789908168c00d9e403e62d6f4 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2080,6 +2080,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -2081,6 +2081,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(WebCursor(cursor));
|
||||
@@ -43,10 +43,10 @@ index 7cda66952e0d3a67c32791ad3c7d7de8df03f876..8cb3a596593c52e776d546d25fb07800
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index faa795be3a6cbc7ae13d9a42a1bdbd01ac0406a9..add5ba98f4409460b93aa2f8c49eb49a1f59470a 100644
|
||||
index a96bb634eb5c5405abb62b88d576e5e3ed354caa..1b616ba52d9c77c64c7f24a0d204ce36641dce38 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4523,6 +4523,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4527,6 +4527,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ index faa795be3a6cbc7ae13d9a42a1bdbd01ac0406a9..add5ba98f4409460b93aa2f8c49eb49a
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 7ad2648933434282c5bdd3fd5d9187d86e142b60..2a29af8d9aa67768ec521e87190174397a25b722 100644
|
||||
index 6b6fc6881c88b72c164d786c036b2e56ccd43ac8..df1633d59070e19592a52f02a76bdd9006d7c6f0 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -954,6 +954,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -10,10 +10,10 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
|
||||
Additionally, disables usage of some private APIs in MAS builds.
|
||||
|
||||
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66dc8d9d5da 100644
|
||||
index aa0802116eaffaac58800a1b9e08367c489adacd..9eb0014c0aff821814ed83eb83059ba4087ce4ff 100644
|
||||
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
|
||||
@@ -154,6 +154,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
@@ -155,6 +155,15 @@ void ExtractUnderlines(NSAttributedString* string,
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -29,7 +29,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d
|
||||
// These are not documented, so use only after checking -respondsToSelector:.
|
||||
@interface NSApplication (UndocumentedSpeechMethods)
|
||||
- (void)speakString:(NSString*)string;
|
||||
@@ -610,6 +619,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
@@ -611,6 +620,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
|
||||
}
|
||||
|
||||
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
|
||||
@@ -39,7 +39,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d
|
||||
return [self acceptsMouseEventsWhenInactive];
|
||||
}
|
||||
|
||||
@@ -686,6 +698,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
@@ -687,6 +699,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
|
||||
// its parent view.
|
||||
BOOL hitSelf = NO;
|
||||
while (view) {
|
||||
@@ -50,7 +50,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d
|
||||
if (view == self)
|
||||
hitSelf = YES;
|
||||
if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
|
||||
@@ -1005,6 +1021,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
@@ -1006,6 +1022,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
|
||||
eventType == NSKeyDown &&
|
||||
!(modifierFlags & NSCommandKeyMask);
|
||||
|
||||
@@ -61,7 +61,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d
|
||||
// We only handle key down events and just simply forward other events.
|
||||
if (eventType != NSKeyDown) {
|
||||
_hostHelper->ForwardKeyboardEvent(event, latency_info);
|
||||
@@ -1751,9 +1771,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
@@ -1769,9 +1789,11 @@ - (NSAccessibilityRole)accessibilityRole {
|
||||
// Since this implementation doesn't have to wait any IPC calls, this doesn't
|
||||
// make any key-typing jank. --hbono 7/23/09
|
||||
//
|
||||
@@ -73,7 +73,7 @@ index 1393c9c8382dd405edd9a5515210176395a98fe5..38bd45e0ca66af9f78bb532e411db66d
|
||||
|
||||
- (NSArray*)validAttributesForMarkedText {
|
||||
// This code is just copied from WebKit except renaming variables.
|
||||
@@ -1762,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
@@ -1780,7 +1802,10 @@ - (NSArray*)validAttributesForMarkedText {
|
||||
initWithObjects:NSUnderlineStyleAttributeName,
|
||||
NSUnderlineColorAttributeName,
|
||||
NSMarkedClauseSegmentAttributeName,
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 7203dde2f96d5e8ed44443e21a2257166b6e6f36..3c40d999a9545051e91a9f0ad3bf7ca2a95d80c4 100644
|
||||
index 5c564fe889ca6621ff33d31d8d2fff93563093eb..99ab95668a7d3a31339b576b4a3a6038f39c2795 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1529,7 +1529,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1534,7 +1534,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index 7203dde2f96d5e8ed44443e21a2257166b6e6f36..3c40d999a9545051e91a9f0ad3bf7ca2
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1558,6 +1558,12 @@ if (!is_android) {
|
||||
@@ -1563,6 +1563,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user