mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
69 Commits
v26.0.0-al
...
v26.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6771299fc2 | ||
|
|
b656337b43 | ||
|
|
fbfef19768 | ||
|
|
6b61917d4b | ||
|
|
d47fa5f787 | ||
|
|
9ee4cb49bc | ||
|
|
6a4bb4f6fd | ||
|
|
95855906d0 | ||
|
|
f184603992 | ||
|
|
26aa910d43 | ||
|
|
8655990d83 | ||
|
|
a175e1f69a | ||
|
|
038147b6bc | ||
|
|
03ed9531d4 | ||
|
|
24f2379892 | ||
|
|
9d5a25bf37 | ||
|
|
35a9d76531 | ||
|
|
54cd8e4827 | ||
|
|
a374f41528 | ||
|
|
a99fc5e40f | ||
|
|
77bfa2ad65 | ||
|
|
b7eb26c4df | ||
|
|
25c18637ed | ||
|
|
534cdbd538 | ||
|
|
689e3868cc | ||
|
|
6656001a62 | ||
|
|
6930ecea68 | ||
|
|
97825a3f09 | ||
|
|
459fe0e68d | ||
|
|
bd66a58fa7 | ||
|
|
db581a204d | ||
|
|
e7928ce519 | ||
|
|
5ab5427b6e | ||
|
|
d463bf9c16 | ||
|
|
4ba0fc8630 | ||
|
|
33376fba39 | ||
|
|
b0b87b098e | ||
|
|
13d224e816 | ||
|
|
96b2422f95 | ||
|
|
3cdd3d6518 | ||
|
|
2bab77a4e1 | ||
|
|
7ce73b5989 | ||
|
|
2b254b1d6d | ||
|
|
6452e5c992 | ||
|
|
28604db7a0 | ||
|
|
236272bf9f | ||
|
|
26e6252ac8 | ||
|
|
548f84df40 | ||
|
|
779a4e700d | ||
|
|
76f4291130 | ||
|
|
16aac6da13 | ||
|
|
479c2d8d4a | ||
|
|
6c05422a61 | ||
|
|
a6d76efc9e | ||
|
|
88408358ed | ||
|
|
1e3837f4c3 | ||
|
|
f8ed70b613 | ||
|
|
c2e362d2d3 | ||
|
|
b3a5ef767b | ||
|
|
94dba56d2c | ||
|
|
7ad80e414a | ||
|
|
e5419bcf5a | ||
|
|
8eeaacfafe | ||
|
|
582844c537 | ||
|
|
77d4ab0701 | ||
|
|
923ae840e1 | ||
|
|
50014e593f | ||
|
|
3a7e8d6a24 | ||
|
|
a55410576a |
@@ -4,37 +4,6 @@
|
||||
"onCreateCommand": ".devcontainer/on-create-command.sh",
|
||||
"updateContentCommand": ".devcontainer/update-content-command.sh",
|
||||
"workspaceFolder": "/workspaces/gclient/src/electron",
|
||||
"extensions": [
|
||||
"joeleinbinder.mojom-language",
|
||||
"rafaelmaiolla.diff",
|
||||
"surajbarkale.ninja",
|
||||
"ms-vscode.cpptools",
|
||||
"mutantdino.resourcemonitor",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"shakram02.bash-beautify",
|
||||
"marshallofsound.gnls-electron",
|
||||
"CircleCI.circleci"
|
||||
],
|
||||
"settings": {
|
||||
"editor.tabSize": 2,
|
||||
"bashBeautify.tabSize": 2,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"[gn]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"typescript.preferences.quoteStyle": "single"
|
||||
},
|
||||
"forwardPorts": [8088, 6080, 5901],
|
||||
"portsAttributes": {
|
||||
"8088": {
|
||||
@@ -60,6 +29,38 @@
|
||||
"openFiles": [
|
||||
".devcontainer/README.md"
|
||||
]
|
||||
},
|
||||
"vscode": {
|
||||
"extensions": ["joeleinbinder.mojom-language",
|
||||
"rafaelmaiolla.diff",
|
||||
"surajbarkale.ninja",
|
||||
"ms-vscode.cpptools",
|
||||
"mutantdino.resourcemonitor",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"shakram02.bash-beautify",
|
||||
"marshallofsound.gnls-electron",
|
||||
"CircleCI.circleci"
|
||||
],
|
||||
"settings": {
|
||||
"editor.tabSize": 2,
|
||||
"bashBeautify.tabSize": 2,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"[gn]": {
|
||||
"editor.formatOnSave": true
|
||||
},
|
||||
"[javascript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll.eslint": true
|
||||
}
|
||||
},
|
||||
"javascript.preferences.quoteStyle": "single",
|
||||
"typescript.preferences.quoteStyle": "single"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,8 @@ ln -s $buildtools_configs $buildtools/configs
|
||||
|
||||
# Write the gclient config if it does not already exist
|
||||
if [ ! -f $gclient_root/.gclient ]; then
|
||||
echo "Creating gclient config"
|
||||
|
||||
echo "solutions = [
|
||||
{ \"name\" : \"src/electron\",
|
||||
\"url\" : \"https://github.com/electron/electron\",
|
||||
@@ -32,6 +34,8 @@ fi
|
||||
# Write the default buildtools config file if it does
|
||||
# not already exist
|
||||
if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
echo "Creating build-tools testing config"
|
||||
|
||||
write_config() {
|
||||
echo "
|
||||
{
|
||||
@@ -53,7 +57,7 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
\"CHROMIUM_BUILDTOOLS_PATH\": \"/workspaces/gclient/src/buildtools\",
|
||||
\"GIT_CACHE_PATH\": \"/workspaces/gclient/.git-cache\"
|
||||
},
|
||||
\"$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\"
|
||||
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\"
|
||||
}
|
||||
" >$buildtools/configs/evm.testing.json
|
||||
}
|
||||
@@ -67,10 +71,12 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
||||
# if it works we can use the goma cluster
|
||||
export NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN
|
||||
if e d goma_auth login; then
|
||||
echo "$GITHUB_USER has GOMA access - switching to cluster mode"
|
||||
write_config cluster
|
||||
fi
|
||||
else
|
||||
# Even if the config file existed we still need to re-auth with the goma
|
||||
# cluster
|
||||
echo "build-tools testing config already exists"
|
||||
|
||||
# Re-auth with the goma cluster regardless.
|
||||
NOTGOMA_CODESPACES_TOKEN=$GITHUB_TOKEN e d goma_auth login || true
|
||||
fi
|
||||
|
||||
27
BUILD.gn
27
BUILD.gn
@@ -544,7 +544,6 @@ source_set("electron_lib") {
|
||||
|
||||
if (is_mac) {
|
||||
deps += [
|
||||
":chrome_lib_arc",
|
||||
":electron_lib_arc",
|
||||
"//components/remote_cocoa/app_shim",
|
||||
"//components/remote_cocoa/browser",
|
||||
@@ -781,32 +780,6 @@ source_set("electron_lib") {
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
source_set("chrome_lib_arc") {
|
||||
include_dirs = [ "." ]
|
||||
sources = [
|
||||
"//chrome/browser/extensions/global_shortcut_listener_mac.h",
|
||||
"//chrome/browser/extensions/global_shortcut_listener_mac.mm",
|
||||
"//chrome/browser/icon_loader_mac.mm",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.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/platform_util_mac.mm",
|
||||
"//chrome/browser/process_singleton_mac.mm",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//skia",
|
||||
"//third_party/electron_node:node_lib",
|
||||
"//third_party/webrtc_overrides:webrtc_component",
|
||||
"//v8",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
}
|
||||
|
||||
source_set("electron_lib_arc") {
|
||||
include_dirs = [ "." ]
|
||||
sources = [
|
||||
|
||||
@@ -60,6 +60,10 @@ dependencies, and tools contained in the `electron/electron` repository.
|
||||
* [Step 11: Landing](https://electronjs.org/docs/development/pull-requests#step-11-landing)
|
||||
* [Continuous Integration Testing](https://electronjs.org/docs/development/pull-requests#continuous-integration-testing)
|
||||
|
||||
### Dependencies Upgrades Policy
|
||||
|
||||
Dependencies in Electron's `package.json` or `yarn.lock` files should only be altered by maintainers. For security reasons, we will not accept PRs that alter our `package.json` or `yarn.lock` files. We invite contributors to make requests updating these files in our issue tracker. If the change is significantly complicated, draft PRs are welcome, with the understanding that these PRs will be closed in favor of a duplicate PR submitted by an Electron maintainer.
|
||||
|
||||
## Style Guides
|
||||
|
||||
See [Coding Style](https://electronjs.org/docs/development/coding-style) for information about which standards Electron adheres to in different parts of its codebase.
|
||||
|
||||
4
DEPS
4
DEPS
@@ -2,9 +2,9 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'116.0.5815.0',
|
||||
'116.0.5845.42',
|
||||
'node_version':
|
||||
'v18.16.0',
|
||||
'v18.16.1',
|
||||
'nan_version':
|
||||
'16fa32231e2ccd89d2804b3f765319128b20c4ac',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -49,6 +49,11 @@ environment:
|
||||
APPVEYOR_BUILD_WORKER_IMAGE: base-woa
|
||||
APPVEYOR_BUILD_WORKER_CLOUD: electronhq-woa
|
||||
|
||||
clone_script:
|
||||
- ps: git clone -q $("--branch=" + $Env:APPVEYOR_REPO_BRANCH) $("https://github.com/" + $Env:APPVEYOR_REPO_NAME + ".git") $Env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: if (!$Env:APPVEYOR_PULL_REQUEST_NUMBER) {$("git checkout -qf " + $Env:APPVEYOR_REPO_COMMIT)}
|
||||
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {git fetch -q origin +refs/pull/$($Env:APPVEYOR_PULL_REQUEST_NUMBER)/head; git checkout -qf FETCH_HEAD}
|
||||
|
||||
clone_folder: C:\projects\src\electron
|
||||
|
||||
skip_branch_with_pr: true
|
||||
@@ -85,6 +90,8 @@ for:
|
||||
Remove-Item -Recurse -Force $pwd\build-tools
|
||||
}
|
||||
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
|
||||
- depot_tools\bootstrap\win_tools.bat
|
||||
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
|
||||
- ps: >-
|
||||
if (Test-Path -Path "$pwd\src\electron") {
|
||||
@@ -194,16 +201,28 @@ for:
|
||||
on_finish:
|
||||
# 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 C:\projects\src
|
||||
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
|
||||
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||
- ps: |
|
||||
cd C:\projects\src
|
||||
$missing_artifacts = $false
|
||||
$artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
|
||||
foreach($artifact_name in $artifacts_to_upload) {
|
||||
if ($artifact_name -eq 'ffmpeg.zip') {
|
||||
$artifact_file = "out\ffmpeg\ffmpeg.zip"
|
||||
} elseif ($artifact_name -eq 'node_headers.zip') {
|
||||
$artifact_file = $artifact_name
|
||||
} else {
|
||||
$artifact_file = "out\Default\$artifact_name"
|
||||
}
|
||||
if (Test-Path $artifact_file) {
|
||||
appveyor-retry appveyor PushArtifact $artifact_file
|
||||
} else {
|
||||
Write-warning "$artifact_name is missing and cannot be added to artifacts"
|
||||
$missing_artifacts = $true
|
||||
}
|
||||
}
|
||||
if ($missing_artifacts) {
|
||||
throw "Build failed due to missing artifacts"
|
||||
}
|
||||
- ps: >-
|
||||
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||
appveyor-retry appveyor PushArtifact pdb.zip
|
||||
@@ -236,7 +255,7 @@ for:
|
||||
# Download build artifacts
|
||||
$apiUrl = 'https://ci.appveyor.com/api'
|
||||
$build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
|
||||
$artifacts_to_download = @('dist.zip','ffmpeg.zip','node_headers.zip','pdb.zip','electron.lib')
|
||||
$artifacts_to_download = @('dist.zip','ffmpeg.zip','node_headers.zip','electron.lib')
|
||||
foreach ($job in $build_info.build.jobs) {
|
||||
if ($job.name -eq "Build Arm on X64 Windows") {
|
||||
$jobId = $job.jobId
|
||||
@@ -248,10 +267,13 @@ for:
|
||||
}
|
||||
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
|
||||
}
|
||||
# Uncomment the following lines to download the pdb.zip to show real stacktraces when crashes happen during testing
|
||||
# Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/pdb.zip" -OutFile pdb.zip
|
||||
# 7z x -y -osrc pdb.zip
|
||||
}
|
||||
}
|
||||
- ps: |
|
||||
$out_default_zips = @('dist.zip','pdb.zip')
|
||||
$out_default_zips = @('dist.zip')
|
||||
foreach($zip_name in $out_default_zips) {
|
||||
7z x -y -osrc\out\Default $zip_name
|
||||
}
|
||||
|
||||
42
appveyor.yml
42
appveyor.yml
@@ -47,6 +47,11 @@ environment:
|
||||
- job_name: Test
|
||||
job_depends_on: Build
|
||||
|
||||
clone_script:
|
||||
- ps: git clone -q $("--branch=" + $Env:APPVEYOR_REPO_BRANCH) $("https://github.com/" + $Env:APPVEYOR_REPO_NAME + ".git") $Env:APPVEYOR_BUILD_FOLDER
|
||||
- ps: if (!$Env:APPVEYOR_PULL_REQUEST_NUMBER) {$("git checkout -qf " + $Env:APPVEYOR_REPO_COMMIT)}
|
||||
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {git fetch -q origin +refs/pull/$($Env:APPVEYOR_PULL_REQUEST_NUMBER)/head; git checkout -qf FETCH_HEAD}
|
||||
|
||||
clone_folder: C:\projects\src\electron
|
||||
|
||||
skip_branch_with_pr: true
|
||||
@@ -83,6 +88,8 @@ for:
|
||||
Remove-Item -Recurse -Force $pwd\build-tools
|
||||
}
|
||||
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
|
||||
- depot_tools\bootstrap\win_tools.bat
|
||||
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
|
||||
- ps: >-
|
||||
if (Test-Path -Path "$pwd\src\electron") {
|
||||
@@ -192,16 +199,28 @@ for:
|
||||
on_finish:
|
||||
# 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 C:\projects\src
|
||||
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||
- if exist out\Default\shell_browser_ui_unittests.exe (appveyor-retry appveyor PushArtifact out\Default\shell_browser_ui_unittests.exe)
|
||||
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||
- ps: |
|
||||
cd C:\projects\src
|
||||
$missing_artifacts = $false
|
||||
$artifacts_to_upload = @('dist.zip','windows_toolchain_profile.json','shell_browser_ui_unittests.exe','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip')
|
||||
foreach($artifact_name in $artifacts_to_upload) {
|
||||
if ($artifact_name -eq 'ffmpeg.zip') {
|
||||
$artifact_file = "out\ffmpeg\ffmpeg.zip"
|
||||
} elseif ($artifact_name -eq 'node_headers.zip') {
|
||||
$artifact_file = $artifact_name
|
||||
} else {
|
||||
$artifact_file = "out\Default\$artifact_name"
|
||||
}
|
||||
if (Test-Path $artifact_file) {
|
||||
appveyor-retry appveyor PushArtifact $artifact_file
|
||||
} else {
|
||||
Write-warning "$artifact_name is missing and cannot be added to artifacts"
|
||||
$missing_artifacts = $true
|
||||
}
|
||||
}
|
||||
if ($missing_artifacts) {
|
||||
throw "Build failed due to missing artifacts"
|
||||
}
|
||||
- ps: >-
|
||||
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||
appveyor-retry appveyor PushArtifact pdb.zip
|
||||
@@ -244,6 +263,9 @@ for:
|
||||
}
|
||||
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
|
||||
}
|
||||
# Uncomment the following lines to download the pdb.zip to show real stacktraces when crashes happen during testing
|
||||
# Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/pdb.zip" -OutFile pdb.zip
|
||||
# 7z x -y -osrc pdb.zip
|
||||
}
|
||||
}
|
||||
- ps: |
|
||||
|
||||
@@ -191,6 +191,10 @@ static_library("chrome") {
|
||||
public_deps += [ "//chrome/services/util_win:lib" ]
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
public_deps += [ ":chrome_lib_arc" ]
|
||||
}
|
||||
|
||||
if (enable_widevine) {
|
||||
sources += [
|
||||
"//chrome/renderer/media/chrome_key_systems.cc",
|
||||
@@ -339,6 +343,34 @@ static_library("chrome") {
|
||||
}
|
||||
}
|
||||
|
||||
if (is_mac) {
|
||||
source_set("chrome_lib_arc") {
|
||||
include_dirs = [ "." ]
|
||||
sources = [
|
||||
"//chrome/browser/extensions/global_shortcut_listener_mac.h",
|
||||
"//chrome/browser/extensions/global_shortcut_listener_mac.mm",
|
||||
"//chrome/browser/icon_loader_mac.mm",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.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/platform_util_mac.mm",
|
||||
"//chrome/browser/process_singleton_mac.mm",
|
||||
]
|
||||
|
||||
deps = [
|
||||
"//base",
|
||||
"//skia",
|
||||
"//third_party/electron_node:node_lib",
|
||||
"//third_party/webrtc_overrides:webrtc_component",
|
||||
"//v8",
|
||||
]
|
||||
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
}
|
||||
}
|
||||
|
||||
source_set("plugins") {
|
||||
sources = []
|
||||
deps = []
|
||||
|
||||
@@ -55,7 +55,7 @@ The `Super` (or `Meta`) key is mapped to the `Windows` key on Windows and Linux
|
||||
* `0` to `9`
|
||||
* `A` to `Z`
|
||||
* `F1` to `F24`
|
||||
* Punctuation like `~`, `!`, `@`, `#`, `$`, etc.
|
||||
* Various Punctuation: `)`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `:`, `;`, `:`, `+`, `=`, `<`, `,`, `_`, `-`, `>`, `.`, `?`, `/`, `~`, `` ` ``, `{`, `]`, `[`, `|`, `\`, `}`, `"`
|
||||
* `Plus`
|
||||
* `Space`
|
||||
* `Tab`
|
||||
|
||||
@@ -110,7 +110,7 @@ provided to the renderer process. Please refer to
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function<Promise\<void> | any>
|
||||
* `event` IpcMainInvokeEvent
|
||||
* `event` [IpcMainInvokeEvent][ipc-main-invoke-event]
|
||||
* `...args` any[]
|
||||
|
||||
Handles a single `invoke`able IPC message, then removes the listener. See
|
||||
@@ -122,17 +122,6 @@ Handles a single `invoke`able IPC message, then removes the listener. See
|
||||
|
||||
Removes any handler for `channel`, if present.
|
||||
|
||||
## IpcMainEvent object
|
||||
|
||||
The documentation for the `event` object passed to the `callback` can be found
|
||||
in the [`ipc-main-event`][ipc-main-event] structure docs.
|
||||
|
||||
## IpcMainInvokeEvent object
|
||||
|
||||
The documentation for the `event` object passed to `handle` callbacks can be
|
||||
found in the [`ipc-main-invoke-event`][ipc-main-invoke-event]
|
||||
structure docs.
|
||||
|
||||
[IPC tutorial]: ../tutorial/ipc.md
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[web-contents-send]: ../api/web-contents.md#contentssendchannel-args
|
||||
|
||||
@@ -26,7 +26,7 @@ The `ipcRenderer` module has the following method to listen for events and send
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` IpcRendererEvent
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Listens to `channel`, when a new message arrives `listener` would be called with
|
||||
@@ -36,7 +36,7 @@ Listens to `channel`, when a new message arrives `listener` would be called with
|
||||
|
||||
* `channel` string
|
||||
* `listener` Function
|
||||
* `event` IpcRendererEvent
|
||||
* `event` [IpcRendererEvent][ipc-renderer-event]
|
||||
* `...args` any[]
|
||||
|
||||
Adds a one time `listener` function for the event. This `listener` is invoked
|
||||
@@ -208,12 +208,8 @@ Sends a message to a window with `webContentsId` via `channel`.
|
||||
Like `ipcRenderer.send` but the event will be sent to the `<webview>` element in
|
||||
the host page instead of the main process.
|
||||
|
||||
## Event object
|
||||
|
||||
The documentation for the `event` object passed to the `callback` can be found
|
||||
in the [`ipc-renderer-event`](./structures/ipc-renderer-event.md) structure docs.
|
||||
|
||||
[event-emitter]: https://nodejs.org/api/events.html#events_class_eventemitter
|
||||
[SCA]: https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Structured_clone_algorithm
|
||||
[`window.postMessage`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
|
||||
[`MessagePort`]: https://developer.mozilla.org/en-US/docs/Web/API/MessagePort
|
||||
[ipc-renderer-event]: ./structures/ipc-renderer-event.md
|
||||
|
||||
@@ -80,6 +80,10 @@ The `menu` object has the following instance methods:
|
||||
* `positioningItem` number (optional) _macOS_ - The index of the menu item to
|
||||
be positioned under the mouse cursor at the specified coordinates. Default
|
||||
is -1.
|
||||
* `sourceType` string (optional) _Windows_ _Linux_ - This should map to the `menuSourceType`
|
||||
provided by the `context-menu` event. It is not recommended to set this value manually,
|
||||
only provide values you receive from other APIs or leave it `undefined`.
|
||||
Can be `none`, `mouse`, `keyboard`, `touch`, `touchMenu`, `longPress`, `longTap`, `touchHandle`, `stylus`, `adjustSelection`, or `adjustSelectionReset`.
|
||||
* `callback` Function (optional) - Called when menu is closed.
|
||||
|
||||
Pops up this menu as a context menu in the [`BrowserWindow`](browser-window.md).
|
||||
|
||||
@@ -38,3 +38,28 @@ Returns `string` - the decrypted string. Decrypts the encrypted buffer
|
||||
obtained with `safeStorage.encryptString` back into a string.
|
||||
|
||||
This function will throw an error if decryption fails.
|
||||
|
||||
### `safeStorage.setUsePlainTextEncryption(usePlainText)`
|
||||
|
||||
* `usePlainText` boolean
|
||||
|
||||
This function on Linux will force the module to use an in memory password for creating
|
||||
symmetric key that is used for encrypt/decrypt functions when a valid OS password
|
||||
manager cannot be determined for the current active desktop environment. This function
|
||||
is a no-op on Windows and MacOS.
|
||||
|
||||
### `safeStorage.getSelectedStorageBackend()` _Linux_
|
||||
|
||||
Returns `string` - User friendly name of the password manager selected on Linux.
|
||||
|
||||
This function will return one of the following values:
|
||||
|
||||
* `basic_text` - When the desktop environment is not recognised or if the following
|
||||
command line flag is provided `--password-store="basic"`.
|
||||
* `gnome_libsecret` - When the desktop environment is `X-Cinnamon`, `Deepin`, `GNOME`, `Pantheon`, `XFCE`, `UKUI`, `unity` or if the following command line flag is provided `--password-store="gnome-libsecret"`.
|
||||
* `kwallet` - When the desktop session is `kde4` or if the following command line flag
|
||||
is provided `--password-store="kwallet"`.
|
||||
* `kwallet5` - When the desktop session is `kde5` or if the following command line flag
|
||||
is provided `--password-store="kwallet5"`.
|
||||
* `kwallet6` - When the desktop session is `kde6`.
|
||||
* `unknown` - When the function is called before app has emitted the `ready` event.
|
||||
|
||||
@@ -891,18 +891,19 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `permission` string - The type of requested permission.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
* `display-capture` - Request access to capture the screen via the [Screen Capture API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API).
|
||||
* `fullscreen` - Request control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
* `geolocation` - Request access to the user's location via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
||||
* `idle-detection` - Request access to the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
||||
* `media` - Request access to media devices such as camera, microphone and speakers.
|
||||
* `display-capture` - Request access to capture the screen.
|
||||
* `mediaKeySystem` - Request access to DRM protected content.
|
||||
* `geolocation` - Request access to user's current location.
|
||||
* `notifications` - Request notification creation and the ability to display them in the user's system tray.
|
||||
* `midi` - Request MIDI access in the `webmidi` API.
|
||||
* `midiSysex` - Request the use of system exclusive messages in the `webmidi` API.
|
||||
* `pointerLock` - Request to directly interpret mouse movements as an input method. Click [here](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API) to know more. These requests always appear to originate from the main frame.
|
||||
* `fullscreen` - Request for the app to enter fullscreen mode.
|
||||
* `midi` - Request MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `midiSysex` - Request the use of system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `notifications` - Request notification creation and the ability to display them in the user's system tray using the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification)
|
||||
* `pointerLock` - Request to directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
||||
* `openExternal` - Request to open links in external applications.
|
||||
* `window-management` - Request access to enumerate screens using the [`getScreenDetails`](https://developer.chrome.com/en/articles/multi-screen-window-placement/) API.
|
||||
* `unknown` - An unrecognized permission request
|
||||
* `unknown` - An unrecognized permission request.
|
||||
* `callback` Function
|
||||
* `permissionGranted` boolean - Allow or deny the permission.
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
@@ -934,7 +935,22 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
|
||||
|
||||
* `handler` Function\<boolean> | null
|
||||
* `webContents` ([WebContents](web-contents.md) | null) - WebContents checking the permission. Please note that if the request comes from a subframe you should use `requestingUrl` to check the request origin. All cross origin sub frames making permission checks will pass a `null` webContents to this handler, while certain other permission checks such as `notifications` checks will always pass `null`. You should use `embeddingOrigin` and `requestingOrigin` to determine what origin the owning frame and the requesting frame are on respectively.
|
||||
* `permission` string - Type of permission check. Valid values are `midiSysex`, `notifications`, `geolocation`, `media`,`mediaKeySystem`,`midi`, `pointerLock`, `fullscreen`, `openExternal`, `hid`, `serial`, or `usb`.
|
||||
* `permission` string - Type of permission check.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `clipboard-sanitized-write` - Request access to write to the clipboard.
|
||||
* `geolocation` - Access the user's geolocation data via the [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API)
|
||||
* `fullscreen` - Control of the app's fullscreen state via the [Fullscreen API](https://developer.mozilla.org/en-US/docs/Web/API/Fullscreen_API).
|
||||
* `hid` - Access the HID protocol to manipulate HID devices via the [WebHID API](https://developer.mozilla.org/en-US/docs/Web/API/WebHID_API).
|
||||
* `idle-detection` - Access the user's idle state via the [IdleDetector API](https://developer.mozilla.org/en-US/docs/Web/API/IdleDetector).
|
||||
* `media` - Access to media devices such as camera, microphone and speakers.
|
||||
* `mediaKeySystem` - Access to DRM protected content.
|
||||
* `midi` - Enable MIDI access in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `midiSysex` - Use system exclusive messages in the [Web MIDI API](https://developer.mozilla.org/en-US/docs/Web/API/Web_MIDI_API).
|
||||
* `notifications` - Configure and display desktop notifications to the user with the [Notifications API](https://developer.mozilla.org/en-US/docs/Web/API/notification).
|
||||
* `openExternal` - Open links in external applications.
|
||||
* `pointerLock` - Directly interpret mouse movements as an input method via the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API). These requests always appear to originate from the main frame.
|
||||
* `serial` - Read from and write to serial devices with the [Web Serial API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Serial_API).
|
||||
* `usb` - Expose non-standard Universal Serial Bus (USB) compatible devices services to the web with the [WebUSB API](https://developer.mozilla.org/en-US/docs/Web/API/WebUSB_API).
|
||||
* `requestingOrigin` string - The origin URL of the permission check
|
||||
* `details` Object - Some properties are only available on certain permission types.
|
||||
* `embeddingOrigin` string (optional) - The origin of the frame embedding the frame that made the permission check. Only set for cross-origin sub frames making permission checks.
|
||||
@@ -1284,9 +1300,11 @@ reused for new connections.
|
||||
|
||||
Returns `Promise<Buffer>` - resolves with blob data.
|
||||
|
||||
#### `ses.downloadURL(url)`
|
||||
#### `ses.downloadURL(url[, options])`
|
||||
|
||||
* `url` string
|
||||
* `options` Object (optional)
|
||||
* `headers` Record<string, string> (optional) - HTTP request headers.
|
||||
|
||||
Initiates a download of the resource at `url`.
|
||||
The API will generate a [DownloadItem](download-item.md) that can be accessed
|
||||
|
||||
@@ -140,6 +140,16 @@ Possible values are:
|
||||
|
||||
* On Linux, possible types are `desktop`, `dock`, `toolbar`, `splash`,
|
||||
`notification`.
|
||||
* The `desktop` type places the window at the desktop background window level
|
||||
(kCGDesktopWindowLevel - 1). However, note that a desktop window will not
|
||||
receive focus, keyboard, or mouse events. You can still use globalShortcut to
|
||||
receive input sparingly.
|
||||
* The `dock` type creates a dock-like window behavior.
|
||||
* The `toolbar` type creates a window with a toolbar appearance.
|
||||
* The `splash` type behaves in a specific way. It is not
|
||||
draggable, even if the CSS styling of the window's body contains
|
||||
-webkit-app-region: drag. This type is commonly used for splash screens.
|
||||
* The `notification` type creates a window that behaves like a system notification.
|
||||
* On macOS, possible types are `desktop`, `textured`, `panel`.
|
||||
* The `textured` type adds metal gradient appearance
|
||||
(`NSWindowStyleMaskTexturedBackground`).
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
* `sender` [IpcRenderer](../ipc-renderer.md) - The `IpcRenderer` instance that emitted the event originally
|
||||
* `senderId` Integer - The `webContents.id` that sent the message, you can call `event.sender.sendTo(event.senderId, ...)` to reply to the message, see [ipcRenderer.sendTo][ipc-renderer-sendto] for more information. This only applies to messages sent from a different renderer. Messages sent directly from the main process set `event.senderId` to `0`.
|
||||
* `senderIsMainFrame` boolean (optional) - Whether the message sent via [ipcRenderer.sendTo][ipc-renderer-sendto] was sent by the main frame. This is relevant when `nodeIntegrationInSubFrames` is enabled in the originating `webContents`.
|
||||
* `ports` [MessagePort][][] - A list of MessagePorts that were transferred with this message
|
||||
|
||||
[ipc-renderer-sendto]: ../ipc-renderer.md#ipcrenderersendtowebcontentsid-channel-args
|
||||
|
||||
@@ -297,7 +297,7 @@ This API is only available on macOS 10.14 Mojave or newer.
|
||||
* `window-frame` - Window frame.
|
||||
* `window-text` - Text in windows.
|
||||
* On **macOS**
|
||||
* `alternate-selected-control-text` - The text on a selected surface in a list or table. _deprecated_
|
||||
* `alternate-selected-control-text` - The text on a selected surface in a list or table. _Deprecated_
|
||||
* `control-background` - The background of a large interface element, such as a browser or table.
|
||||
* `control` - The surface of a control.
|
||||
* `control-text` -The text of a control that isn’t disabled.
|
||||
|
||||
@@ -239,9 +239,8 @@ Returns:
|
||||
|
||||
* `details` Event<>
|
||||
* `url` string - The URL the frame is navigating to.
|
||||
* `isSameDocument` boolean - Whether the navigation happened without changing
|
||||
document. Examples of same document navigations are reference fragment
|
||||
navigations, pushState/replaceState, and same page history navigation.
|
||||
* `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations.
|
||||
This property is always set to `false` for this event.
|
||||
* `isMainFrame` boolean - True if the navigation is taking place in a main frame.
|
||||
* `frame` WebFrameMain - The frame to be navigated.
|
||||
* `initiator` WebFrameMain (optional) - The frame which initiated the
|
||||
@@ -273,6 +272,8 @@ Returns:
|
||||
|
||||
* `details` Event<>
|
||||
* `url` string - The URL the frame is navigating to.
|
||||
* `isSameDocument` boolean - This event does not fire for same document navigations using window.history api and reference fragment navigations.
|
||||
This property is always set to `false` for this event.
|
||||
* `isMainFrame` boolean - True if the navigation is taking place in a main frame.
|
||||
* `frame` WebFrameMain - The frame to be navigated.
|
||||
* `initiator` WebFrameMain (optional) - The frame which initiated the
|
||||
|
||||
@@ -59,7 +59,7 @@ window.open('https://github.com', '_blank', 'top=500,left=200,frame=false,nodeIn
|
||||
* Non-standard features (that are not handled by Chromium or Electron) given in
|
||||
`features` will be passed to any registered `webContents`'s
|
||||
`did-create-window` event handler in the `options` argument.
|
||||
* `frameName` follows the specification of `windowName` located in the [native documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#parameters).
|
||||
* `frameName` follows the specification of `target` located in the [native documentation](https://developer.mozilla.org/en-US/docs/Web/API/Window/open#parameters).
|
||||
* When opening `about:blank`, the child window's [`WebPreferences`](structures/web-preferences.md) will be copied
|
||||
from the parent window, and there is no way to override it because Chromium
|
||||
skips browser side navigation in this case.
|
||||
|
||||
@@ -12,6 +12,15 @@ This document uses the following convention to categorize breaking changes:
|
||||
* **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||
* **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||
|
||||
## Planned Breaking API Changes (27.0)
|
||||
|
||||
### Removed: macOS 10.13 / 10.14 support
|
||||
|
||||
macOS 10.13 (High Sierra) and macOS 10.14 (Mojave) are no longer supported by [Chromium](https://chromium-review.googlesource.com/c/chromium/src/+/4629466).
|
||||
|
||||
Older versions of Electron will continue to run on these operating systems, but macOS 10.15 (Catalina)
|
||||
or later will be required to run Electron v27.0.0 and higher.
|
||||
|
||||
## Planned Breaking API Changes (25.0)
|
||||
|
||||
### Deprecated: `protocol.{register,intercept}{Buffer,String,Stream,File,Http}Protocol`
|
||||
|
||||
@@ -41,7 +41,9 @@ Valid `algorithm` values are currently `SHA256` only. The `hash` is a hash of t
|
||||
ASAR integrity checking is currently disabled by default and can be enabled by toggling a fuse. See [Electron Fuses](fuses.md) for more information on what Electron Fuses are and how they work. When enabling this fuse you typically also want to enable the `onlyLoadAppFromAsar` fuse otherwise the validity checking can be bypassed via the Electron app code search path.
|
||||
|
||||
```js @ts-nocheck
|
||||
require('@electron/fuses').flipFuses(
|
||||
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
|
||||
|
||||
flipFuses(
|
||||
// E.g. /a/b/Foo.app
|
||||
pathToPackagedApp,
|
||||
{
|
||||
|
||||
@@ -9,10 +9,10 @@ check out our [Electron Versioning](./electron-versioning.md) doc.
|
||||
|
||||
| Electron | Alpha | Beta | Stable | EOL | Chrome | Node | Supported |
|
||||
| ------- | ----- | ------- | ------ | ------ | ---- | ---- | ---- |
|
||||
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-08 | TBD | M116 | TBD | ✅ |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2023-Dec-05 | M114 | TBD | ✅ |
|
||||
| 24.0.0 | 2022-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-03 | M112 | v18.14 | ✅ |
|
||||
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-08 | M110 | v18.12 | ✅ |
|
||||
| 26.0.0 | 2023-Jun-01 | 2023-Jun-27 | 2023-Aug-15 | TBD | M116 | TBD | ✅ |
|
||||
| 25.0.0 | 2023-Apr-10 | 2023-May-02 | 2023-May-30 | 2024-Jan-02 | M114 | v18.15 | ✅ |
|
||||
| 24.0.0 | 2022-Feb-09 | 2023-Mar-07 | 2023-Apr-04 | 2023-Oct-10 | M112 | v18.14 | ✅ |
|
||||
| 23.0.0 | 2022-Dec-01 | 2023-Jan-10 | 2023-Feb-07 | 2023-Aug-15 | M110 | v18.12 | ✅ |
|
||||
| 22.0.0 | 2022-Sep-29 | 2022-Oct-25 | 2022-Nov-29 | 2023-Oct-10 | M108 | v16.17 | ✅ |
|
||||
| 21.0.0 | 2022-Aug-04 | 2022-Aug-30 | 2022-Sep-27 | 2023-Apr-04 | M106 | v16.16 | 🚫 |
|
||||
| 20.0.0 | 2022-May-26 | 2022-Jun-21 | 2022-Aug-02 | 2023-Feb-07 | M104 | v16.15 | 🚫 |
|
||||
|
||||
@@ -68,7 +68,9 @@ The loadBrowserProcessSpecificV8Snapshot fuse changes which V8 snapshot file is
|
||||
We've made a handy module, [`@electron/fuses`](https://npmjs.com/package/@electron/fuses), to make flipping these fuses easy. Check out the README of that module for more details on usage and potential error cases.
|
||||
|
||||
```js @ts-nocheck
|
||||
require('@electron/fuses').flipFuses(
|
||||
const { flipFuses, FuseVersion, FuseV1Options } = require('@electron/fuses')
|
||||
|
||||
flipFuses(
|
||||
// Path to electron
|
||||
require('electron'),
|
||||
// Fuses to flip
|
||||
@@ -82,7 +84,7 @@ require('@electron/fuses').flipFuses(
|
||||
You can validate the fuses have been flipped or check the fuse status of an arbitrary Electron app using the fuses CLI.
|
||||
|
||||
```bash
|
||||
npx @electron/fuses read --app /Applications/Foo.app
|
||||
npx @electron/fuses read --app /Applications/Foo.app
|
||||
```
|
||||
|
||||
### The hard way
|
||||
|
||||
@@ -63,9 +63,9 @@ const createWindow = () => {
|
||||
|
||||
In this next step, we will create our `BrowserWindow` and tell our application how to handle an event in which an external protocol is clicked.
|
||||
|
||||
This code will be different in Windows compared to MacOS and Linux. This is due to Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](../api/app.md#apprequestsingleinstancelockadditionaldata).
|
||||
This code will be different in Windows and Linux compared to MacOS. This is due to both platforms emitting the `second-instance` event rather than the `open-url` event and Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](../api/app.md#apprequestsingleinstancelockadditionaldata).
|
||||
|
||||
#### Windows code:
|
||||
#### Windows and Linux code:
|
||||
|
||||
```javascript @ts-type={mainWindow:Electron.BrowserWindow} @ts-type={createWindow:()=>void}
|
||||
const gotTheLock = app.requestSingleInstanceLock()
|
||||
@@ -80,8 +80,7 @@ if (!gotTheLock) {
|
||||
mainWindow.focus()
|
||||
}
|
||||
// the commandLine is array of strings in which last element is deep link url
|
||||
// the url str ends with /
|
||||
dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop().slice(0, -1)}`)
|
||||
dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop()}`)
|
||||
})
|
||||
|
||||
// Create mainWindow, load the rest of the app, etc...
|
||||
@@ -91,7 +90,7 @@ if (!gotTheLock) {
|
||||
}
|
||||
```
|
||||
|
||||
#### MacOS and Linux code:
|
||||
#### MacOS code:
|
||||
|
||||
```javascript @ts-type={createWindow:()=>void}
|
||||
// This method will be called when Electron has finished
|
||||
|
||||
@@ -150,7 +150,7 @@ renderer.
|
||||
|
||||
```js title='renderer.js (Renderer Process)' @ts-nocheck
|
||||
// elsewhere in your code to send a message to the other renderers message handler
|
||||
window.electronMessagePort.postmessage('ping')
|
||||
window.electronMessagePort.postMessage('ping')
|
||||
```
|
||||
|
||||
### Worker process
|
||||
|
||||
@@ -51,6 +51,12 @@ but can only import a subset of Electron and Node's built-in modules:
|
||||
* [`timers`](https://nodejs.org/api/timers.html)
|
||||
* [`url`](https://nodejs.org/api/url.html)
|
||||
|
||||
[node: imports](https://nodejs.org/api/esm.html#node-imports) are supported as well:
|
||||
|
||||
* [`node:events`](https://nodejs.org/api/events.html)
|
||||
* [`node:timers`](https://nodejs.org/api/timers.html)
|
||||
* [`node:url`](https://nodejs.org/api/url.html)
|
||||
|
||||
In addition, the preload script also polyfills certain Node.js primitives as globals:
|
||||
|
||||
* [`Buffer`](https://nodejs.org/api/buffer.html)
|
||||
|
||||
@@ -838,7 +838,7 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
const originalModuleLoad = Module._load;
|
||||
Module._load = (request: string, ...args: any[]) => {
|
||||
const loadResult = originalModuleLoad(request, ...args);
|
||||
if (request === 'child_process') {
|
||||
if (request === 'child_process' || request === 'node:child_process') {
|
||||
if (!asarReady.has(loadResult)) {
|
||||
asarReady.add(loadResult);
|
||||
// Just to make it obvious what we are dealing with here
|
||||
|
||||
@@ -69,7 +69,7 @@ Menu.prototype.popup = function (options = {}) {
|
||||
if (options == null || typeof options !== 'object') {
|
||||
throw new TypeError('Options must be an object');
|
||||
}
|
||||
let { window, x, y, positioningItem, callback } = options;
|
||||
let { window, x, y, positioningItem, sourceType, callback } = options;
|
||||
|
||||
// no callback passed
|
||||
if (!callback || typeof callback !== 'function') callback = () => {};
|
||||
@@ -78,6 +78,7 @@ Menu.prototype.popup = function (options = {}) {
|
||||
if (typeof x !== 'number') x = -1;
|
||||
if (typeof y !== 'number') y = -1;
|
||||
if (typeof positioningItem !== 'number') positioningItem = -1;
|
||||
if (typeof sourceType !== 'string' || !sourceType) sourceType = 'mouse';
|
||||
|
||||
// find which window to use
|
||||
const wins = BaseWindow.getAllWindows();
|
||||
@@ -91,7 +92,7 @@ Menu.prototype.popup = function (options = {}) {
|
||||
}
|
||||
}
|
||||
|
||||
this.popupAt(window as unknown as BaseWindow, x, y, positioningItem, callback);
|
||||
this.popupAt(window as unknown as BaseWindow, x, y, positioningItem, sourceType, callback);
|
||||
return { browserWindow: window, x, y, position: positioningItem };
|
||||
};
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ const { registerSchemesAsPrivileged, getStandardSchemes, Protocol } = process._l
|
||||
const ERR_FAILED = -2;
|
||||
const ERR_UNEXPECTED = -9;
|
||||
|
||||
const isBuiltInScheme = (scheme: string) => scheme === 'http' || scheme === 'https';
|
||||
const isBuiltInScheme = (scheme: string) => ['http', 'https', 'file'].includes(scheme);
|
||||
|
||||
function makeStreamFromPipe (pipe: any): ReadableStream {
|
||||
const buf = new Uint8Array(1024 * 1024 /* 1 MB */);
|
||||
|
||||
@@ -317,7 +317,7 @@ WebContents.prototype.printToPDF = async function (options) {
|
||||
|
||||
if (options.preferCSSPageSize !== undefined) {
|
||||
if (typeof options.preferCSSPageSize !== 'boolean') {
|
||||
return Promise.reject(new Error('footerTemplate must be a String'));
|
||||
return Promise.reject(new Error('preferCSSPageSize must be a Boolean'));
|
||||
}
|
||||
printSettings.preferCSSPageSize = options.preferCSSPageSize;
|
||||
}
|
||||
|
||||
@@ -17,13 +17,13 @@ const isWebView = mainFrame.getWebPreference('isWebView');
|
||||
// ElectronApiServiceImpl will look for the "ipcNative" hidden object when
|
||||
// invoking the 'onMessage' callback.
|
||||
v8Util.setHiddenValue(global, 'ipcNative', {
|
||||
onMessage (internal: boolean, channel: string, ports: MessagePort[], args: any[], senderId: number) {
|
||||
onMessage (internal: boolean, channel: string, ports: MessagePort[], args: any[], senderId: number, senderIsMainFrame: boolean) {
|
||||
if (internal && senderId !== 0) {
|
||||
console.error(`Message ${channel} sent by unexpected WebContents (${senderId})`);
|
||||
return;
|
||||
}
|
||||
const sender = internal ? ipcRendererInternal : ipcRenderer;
|
||||
sender.emit(channel, { sender, senderId, ports }, ...args);
|
||||
sender.emit(channel, { sender, senderId, ...(senderId ? { senderIsMainFrame } : {}), ports }, ...args);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -38,12 +38,15 @@ const loadedModules = new Map<string, any>([
|
||||
['electron', electron],
|
||||
['electron/common', electron],
|
||||
['electron/renderer', electron],
|
||||
['events', events]
|
||||
['events', events],
|
||||
['node:events', events]
|
||||
]);
|
||||
|
||||
const loadableModules = new Map<string, Function>([
|
||||
['timers', () => require('timers')],
|
||||
['url', () => require('url')]
|
||||
['node:timers', () => require('timers')],
|
||||
['url', () => require('url')],
|
||||
['node:url', () => require('url')]
|
||||
]);
|
||||
|
||||
// Pass different process object to the preload script.
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
"devDependencies": {
|
||||
"@azure/storage-blob": "^12.9.0",
|
||||
"@electron/asar": "^3.2.1",
|
||||
"@electron/docs-parser": "^1.1.0",
|
||||
"@electron/docs-parser": "^1.1.1",
|
||||
"@electron/fiddle-core": "^1.0.4",
|
||||
"@electron/github-app-auth": "^2.0.0",
|
||||
"@electron/lint-roller": "^1.5.0",
|
||||
"@electron/typescript-definitions": "^8.14.0",
|
||||
"@electron/typescript-definitions": "^8.14.5",
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
"@types/basic-auth": "^1.1.3",
|
||||
|
||||
@@ -127,3 +127,8 @@ chore_defer_usb_service_getdevices_request_until_usb_service_is.patch
|
||||
fix_remove_profiles_from_spellcheck_service.patch
|
||||
chore_patch_out_profile_methods_in_chrome_browser_pdf.patch
|
||||
chore_patch_out_profile_methods_in_titlebar_config.patch
|
||||
fix_crash_on_nativetheme_change_during_context_menu_close.patch
|
||||
potential_fix_for_flaky_desktopcaptureapitest_delegation_unittest.patch
|
||||
fix_select_the_first_menu_item_when_opened_via_keyboard.patch
|
||||
chore_add_buildflag_guard_around_new_include.patch
|
||||
fix_use_delegated_generic_capturer_when_available.patch
|
||||
|
||||
@@ -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 16610b7729464949eb78ecaf78c87b2d6df3d973..386fadd8ba7e654707c41e32291c9d3d17e6756a 100644
|
||||
index 280c8b9d08a35c7fbe9e352f2f71ed104cbde955..12bbcb8518110a5f4873e4f4a89e43c8920ec7b6 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -255,6 +255,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -260,6 +260,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 16610b7729464949eb78ecaf78c87b2d6df3d973..386fadd8ba7e654707c41e32291c9d3d
|
||||
// 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
|
||||
@@ -339,7 +343,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -344,7 +348,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ index 103a9d9fb17e954ecaf0acecaa3eeafc23e39c94..de299316216dba204decba3b0eb57f5c
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 797ebc2b7aa045bcf9e032b3ebae28a3fc8d2403..f3d5f0b36a2484b1959e26ff170836750c4d4c3e 100644
|
||||
index 68cc76c0f63f3f828ab582dab88f893453144b2a..5547fb35630d2f2c24b21640a90b8c0858f604ce 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4419,6 +4419,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4438,6 +4438,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ index 93acf68fbb7ff9b3bfc414a33fa1cdda4fe73bb1..90ec3437c2c94e87cfd0b25b200729c1
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 62b35b9fa47f0b99f2b7b6bc712b3a4b2c1c8e4e..4a0fdbb120edc76647560fb86d95613c95ae7094 100644
|
||||
index 1cada05806cb35a82822507f708d43979d97de61..f8e063397b161b7501308945a7df9fb89ea7d165 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -198,6 +198,7 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -79,10 +79,10 @@ index 62b35b9fa47f0b99f2b7b6bc712b3a4b2c1c8e4e..4a0fdbb120edc76647560fb86d95613c
|
||||
if (World().IsMainWorld()) {
|
||||
probe::DidCreateMainWorldContext(GetFrame());
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index 6068419926ed24e8269905c7cfe89c429071fb9c..d48eb2cec03dd3186377d23b0e93097719ab0298 100644
|
||||
index fb229297df448dbe48e5b0ef2978bce2a8affc83..892d971c749b5bf7499c2fc246bc9d5fe5b63b79 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -321,6 +321,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -319,6 +319,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,7 +92,7 @@ index 6068419926ed24e8269905c7cfe89c429071fb9c..d48eb2cec03dd3186377d23b0e930977
|
||||
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 feed61542c8cd66744c1fbc0ba412879f3696035..1bf7b85147499b185189eab49bd6e2786751c0b1 100644
|
||||
index fa8c26e31341b2b53879a8760ad8314a569374c6..76ba9e3761d85acdaeeb017f52e24efc3d40e9b7 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
|
||||
@@ -283,6 +283,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index feed61542c8cd66744c1fbc0ba412879f3696035..1bf7b85147499b185189eab49bd6e278
|
||||
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 8ea11a5c27365a234cae9ec00eaa83ad2d2aa69a..3d2eed6318fe899e1b7e9625c7b3e2781aa2e65d 100644
|
||||
index 9f6a7e8337a4ade6b902d36919bee58f5e461790..9a73f4ceb6111b7e8bcb607b4e8eb96ebbfb0d42 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -123,10 +123,10 @@ index 8ea11a5c27365a234cae9ec00eaa83ad2d2aa69a..3d2eed6318fe899e1b7e9625c7b3e278
|
||||
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 bd4592a4f10d1370c72caf5c153cf831d5a55d7b..cc4d49cb14f5b259777a9b8023388175825ce8cf 100644
|
||||
index 6b695ab181bc7e8a8b6ecb48ca56145ddc63d6e8..4955c7246498139a20be290a48eee234de44530e 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -403,6 +403,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -401,6 +401,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron
|
||||
are included in `LICENSES.chromium.html`
|
||||
|
||||
diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
|
||||
index d775931a09f38db3eb472d095d461b50c5ef76f0..9d844edc8f7c2f526fa99804e8a072da1f47c656 100755
|
||||
index 2a6a4733128dfc5916163c1c91c26f27da1d2f0a..f248f68e22d94b5762f0a64e0fe6804eef1d61d1 100755
|
||||
--- a/tools/licenses/licenses.py
|
||||
+++ b/tools/licenses/licenses.py
|
||||
@@ -383,6 +383,31 @@ SPECIAL_CASES = {
|
||||
@@ -413,6 +413,31 @@ SPECIAL_CASES = {
|
||||
"License": "Apache 2.0",
|
||||
"License File": "/third_party/selenium-atoms/LICENSE.closure",
|
||||
},
|
||||
@@ -41,4 +41,4 @@ index d775931a09f38db3eb472d095d461b50c5ef76f0..9d844edc8f7c2f526fa99804e8a072da
|
||||
+ },
|
||||
}
|
||||
|
||||
# Special value for 'License File' field used to indicate that the license file
|
||||
# Soon-to-be-deprecated special value for 'License File' field used to indicate
|
||||
|
||||
@@ -84,10 +84,10 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..8b6436f3ba6c8bfc2cba054e77ab8886
|
||||
// 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 ec75fb7adcd7f1b39ded29df61dbcb060798becc..0576934b9f747ab731ab1fe52c7d02882949e227 100644
|
||||
index 3fd94156edd9868f0d46746227ae40da604bbc2c..ce99c90306bf2988fdb9a92e04d2ed8ec318da78 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3833,13 +3833,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3847,13 +3847,21 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ index 73bdc6d0788463ef7a8656e8902fde62cbbb5464..7d49d9928fcbb23361a63eb458d6841e
|
||||
return items_[ValidateItemIndex(index)].minor_text;
|
||||
}
|
||||
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
|
||||
index 11dde7dde3fb3bd2f61cacb4a11e33a3d2a90e0c..56ec74ee34397ce09248687e196400ed254d811c 100644
|
||||
index 5ffe7891e71c24a0f31f758c1f467eff645bb658..7c4d37c8b05c64866bc41b38596ffb06e16d69f4 100644
|
||||
--- a/ui/base/models/simple_menu_model.h
|
||||
+++ b/ui/base/models/simple_menu_model.h
|
||||
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -76,7 +76,7 @@ index 11dde7dde3fb3bd2f61cacb4a11e33a3d2a90e0c..56ec74ee34397ce09248687e196400ed
|
||||
std::u16string GetMinorTextAt(size_t index) const override;
|
||||
ImageModel GetMinorIconAt(size_t index) const override;
|
||||
bool IsItemDynamicAt(size_t index) const override;
|
||||
@@ -247,6 +252,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
@@ -246,6 +251,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
|
||||
int command_id = 0;
|
||||
ItemType type = TYPE_COMMAND;
|
||||
std::u16string label;
|
||||
|
||||
@@ -49,10 +49,10 @@ index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a0
|
||||
// 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 e49e7e8079d525e94d7063ed8613056b59e2d873..0ea3c6c8b4a718821ea5dd40cb9239114207216d 100644
|
||||
index 51ac02abf2f2e61538b26fcbbaa437567310c164..f91a1af51c01e29ee6ec734eee368e04bf714311 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -636,10 +636,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index e49e7e8079d525e94d7063ed8613056b59e2d873..0ea3c6c8b4a718821ea5dd40cb923911
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -687,6 +683,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -716,6 +712,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index d2cfdefd0d381247b9e257176bb85193e3ceed49..6b56429758776296c789f0f0fa29ee4f0034f452 100644
|
||||
index da966a58b11be318770fccdd14986efd2a92ccf8..2a7ea1edd970a205ec5f16c66b5722282f2bcf59 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -80,6 +80,8 @@
|
||||
|
||||
@@ -33,10 +33,10 @@ index 884bccba58c66861b43b3b50a7535cba543302e2..82e7bf534aa6b998cee8df53be3ca7db
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 5c981e6cfa75c311d0e7a8a155f16e6483396cc1..c9a7ba1796e07f5eb7a5d0ca47670f645f363cda 100644
|
||||
index 93184ddac697404d22156015e039b710813ce3a5..0a92a4dac5ce0b2d95ae7f45b76bf45e83420d6b 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4587,7 +4587,7 @@ static_library("browser") {
|
||||
@@ -4615,7 +4615,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 5c981e6cfa75c311d0e7a8a155f16e6483396cc1..c9a7ba1796e07f5eb7a5d0ca47670f64
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 94d59dba4df39f5b8fac141210e47574452df944..5c7a1739cf172c00dcb6c73574cb3619948b585b 100644
|
||||
index a6b47cee220af2083461bf8c25e9b37defae9c1f..ac514a50b6c7d19acf94da04d2ead46275b7d105 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6595,7 +6595,6 @@ test("unit_tests") {
|
||||
@@ -6587,7 +6587,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index 94d59dba4df39f5b8fac141210e47574452df944..5c7a1739cf172c00dcb6c73574cb3619
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -6621,6 +6620,10 @@ test("unit_tests") {
|
||||
@@ -6613,6 +6612,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,7 +68,7 @@ index 94d59dba4df39f5b8fac141210e47574452df944..5c7a1739cf172c00dcb6c73574cb3619
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -7543,7 +7546,6 @@ test("unit_tests") {
|
||||
@@ -7539,7 +7542,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -76,7 +76,7 @@ index 94d59dba4df39f5b8fac141210e47574452df944..5c7a1739cf172c00dcb6c73574cb3619
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:test_support",
|
||||
@@ -7629,6 +7631,10 @@ test("unit_tests") {
|
||||
@@ -7626,6 +7628,10 @@ test("unit_tests") {
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,10 +6,18 @@ Subject: build: only use the mas build config in the required components
|
||||
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 8cd7358cd054324b2527da4d3928e88db4498952..6d98aa0990f66a07be975f29b58b7b4de68edca3 100644
|
||||
index 304223b58a7062e3a6ae466d54b9e877708e5cb3..e9efa7f9d44977982fdf72153623e423753f0386 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1059,6 +1059,7 @@ component("base") {
|
||||
@@ -228,6 +228,7 @@ if (is_apple) {
|
||||
]
|
||||
defines = [ "BASE_IMPLEMENTATION" ]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
+ configs += [ "//electron/build/config:mas_build" ]
|
||||
deps = [
|
||||
"//base:base_static",
|
||||
"//base/numerics:base_numerics",
|
||||
@@ -1082,6 +1083,7 @@ component("base") {
|
||||
"//build/config/compiler:prevent_unsafe_narrowing",
|
||||
"//build/config/compiler:wexit_time_destructors",
|
||||
"//build/config/compiler:wglobal_constructors",
|
||||
@@ -30,10 +38,10 @@ index 63b32e52a11af599dbc5154ed353e2bf7250e9d3..fc6ed0cdbe211cb29dd5a1dded36b3b0
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/os_crypt/sync/BUILD.gn b/components/os_crypt/sync/BUILD.gn
|
||||
index a20e1b68ebd112d66ad82e5753b756218e457c9e..65c7170d1c2dbe4ecfc75c4fed92d6e7ff8efb27 100644
|
||||
index 7ed10085264af6f50b05e51dd93c49e3828d5b3b..d8c77f52376a13af7636e64ff0b5cf58f4fbcf97 100644
|
||||
--- a/components/os_crypt/sync/BUILD.gn
|
||||
+++ b/components/os_crypt/sync/BUILD.gn
|
||||
@@ -71,6 +71,8 @@ component("os_crypt") {
|
||||
@@ -48,6 +48,8 @@ component("os_crypt") {
|
||||
"os_crypt_mac.mm",
|
||||
]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
@@ -43,10 +51,18 @@ index a20e1b68ebd112d66ad82e5753b756218e457c9e..65c7170d1c2dbe4ecfc75c4fed92d6e7
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/components/remote_cocoa/app_shim/BUILD.gn b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
index 4aa9876ca290df64da2036a821dfa02fb411676a..fc0a9f2089810de74a9b6d9e08272a5a54c7dee9 100644
|
||||
index 3bc799978ea24e2f6e566dcc7f8638789e18d61d..cd8910dbc57813d41cd0fa28bb2ad61aaa014bc9 100644
|
||||
--- a/components/remote_cocoa/app_shim/BUILD.gn
|
||||
+++ b/components/remote_cocoa/app_shim/BUILD.gn
|
||||
@@ -16,6 +16,7 @@ component("app_shim") {
|
||||
@@ -17,6 +17,7 @@ source_set("app_shim_arc") {
|
||||
configs += [
|
||||
":app_shim_warnings",
|
||||
"//build/config/compiler:enable_arc",
|
||||
+ "//electron/build/config:mas_build"
|
||||
]
|
||||
sources = [
|
||||
"immersive_mode_controller.h",
|
||||
@@ -56,6 +57,7 @@ component("app_shim") {
|
||||
assert(is_mac)
|
||||
|
||||
configs += [ ":app_shim_warnings" ]
|
||||
@@ -55,10 +71,10 @@ index 4aa9876ca290df64da2036a821dfa02fb411676a..fc0a9f2089810de74a9b6d9e08272a5a
|
||||
"alert.h",
|
||||
"alert.mm",
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 9551e3ea2e5f3de9bff158fc0f443df69a27f93a..e8c192bfbe5a2688e8c767443edbe7fb573ed509 100644
|
||||
index 488abc9ed0d61a4b73f4bec34cbca416abfbf715..7b1b36d6ab787e2c43d7556b1e4bb1d39c279879 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -332,6 +332,7 @@ viz_component("service") {
|
||||
@@ -331,6 +331,7 @@ viz_component("service") {
|
||||
"frame_sinks/external_begin_frame_source_mac.h",
|
||||
]
|
||||
}
|
||||
@@ -66,7 +82,7 @@ index 9551e3ea2e5f3de9bff158fc0f443df69a27f93a..e8c192bfbe5a2688e8c767443edbe7fb
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -588,6 +589,8 @@ viz_source_set("unit_tests") {
|
||||
@@ -587,6 +588,8 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
@@ -76,7 +92,7 @@ index 9551e3ea2e5f3de9bff158fc0f443df69a27f93a..e8c192bfbe5a2688e8c767443edbe7fb
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index 1af36377e3841270ddb5db056b17710aa890a3c8..8c84f972e413911bc9f4c907619d4c1599b782d2 100644
|
||||
index abc33d4abffaff80f6c23f63e206505ffacade86..6e6fe7a75ae6ec87e1f4f13d28ffdffc1bb0e7ea 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -56,6 +56,7 @@ source_set("browser") {
|
||||
@@ -88,10 +104,10 @@ index 1af36377e3841270ddb5db056b17710aa890a3c8..8c84f972e413911bc9f4c907619d4c15
|
||||
libs = []
|
||||
frameworks = []
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index 9e9a06ef58e9aeff8193df7b198ee69939c2dd8f..fcf5e3f5403c6dfe7fcd6da243695d378e0d21fb 100644
|
||||
index aa1ae523aee045fb1db412a42af8aadb97e9ee2a..e5fe6c0212721a67d67b17ee8871eb92e339f845 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -172,6 +172,7 @@ source_set("common") {
|
||||
@@ -174,6 +174,7 @@ source_set("common") {
|
||||
"//content:content_implementation",
|
||||
"//build/config:precompiled_headers",
|
||||
]
|
||||
@@ -100,7 +116,7 @@ index 9e9a06ef58e9aeff8193df7b198ee69939c2dd8f..fcf5e3f5403c6dfe7fcd6da243695d37
|
||||
public_deps = [
|
||||
":mojo_bindings",
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index abf8aa4dcf498f9684c10fbbe85547040029401a..6a3897cb80071cf9cdd0ee035a7ade263e798478 100644
|
||||
index 65714a5dca013794527640645d8eb2ce36049ac6..b2df50b4cd64816ddf9c5b7e222c47b60304f01e 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -228,6 +228,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -112,10 +128,10 @@ index abf8aa4dcf498f9684c10fbbe85547040029401a..6a3897cb80071cf9cdd0ee035a7ade26
|
||||
|
||||
public_deps = [
|
||||
diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
|
||||
index b55ea68805100e3926785e10532f27c45c13270a..34afde50788ff285b74c51eb6f5607417fe43407 100644
|
||||
index dd42e72891b3cc5f32d8b69dba7cb9230efd033a..c8c6770a2382904edbffba0682b36747595f8754 100644
|
||||
--- a/content/test/BUILD.gn
|
||||
+++ b/content/test/BUILD.gn
|
||||
@@ -474,6 +474,7 @@ static_library("test_support") {
|
||||
@@ -475,6 +475,7 @@ static_library("test_support") {
|
||||
configs += [
|
||||
"//build/config:precompiled_headers",
|
||||
"//v8:external_startup_data",
|
||||
@@ -137,13 +153,13 @@ index 9d47887dd255187ffe49f5d9dbd01aff5b1de15e..7cde88462e0fc57f9f19badbf1042153
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
}
|
||||
diff --git a/device/bluetooth/BUILD.gn b/device/bluetooth/BUILD.gn
|
||||
index 642afd72cc0f98fe2590cef0c470f378eabb939e..894769a5de698767117339cab0fc2942d1a20b90 100644
|
||||
index 52940b9bc43aa96dc0a7f90e63ec123ca41c5fab..7c71b07ca2d4b1418b305e876b6be51921b3ea66 100644
|
||||
--- a/device/bluetooth/BUILD.gn
|
||||
+++ b/device/bluetooth/BUILD.gn
|
||||
@@ -240,6 +240,7 @@ component("bluetooth") {
|
||||
"IOKit.framework",
|
||||
@@ -241,6 +241,7 @@ component("bluetooth") {
|
||||
"Foundation.framework",
|
||||
]
|
||||
configs += [ "//build/config/compiler:enable_arc" ]
|
||||
+ configs += ["//electron/build/config:mas_build"]
|
||||
}
|
||||
|
||||
@@ -161,10 +177,10 @@ index ed977f540a2920858a05292f823bf49c669aa6d2..9acd66a086654d77f2a2f84b91779519
|
||||
if (is_ios) {
|
||||
sources += [
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index 93cf87a37792691f41d7c611104a378d9af45195..2d3a0f923f4991be41534e7f951fe5dfcceda5c9 100644
|
||||
index fbed855d14713ec3507b62d86d37b7be9969581e..b08bdea30ad4e5caf26f59c66c34fd63cd6207e4 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -199,6 +199,7 @@ source_set("audio") {
|
||||
@@ -203,6 +203,7 @@ source_set("audio") {
|
||||
"mac/coreaudio_dispatch_override.h",
|
||||
]
|
||||
frameworks += [ "AudioUnit.framework" ]
|
||||
@@ -214,10 +230,10 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
|
||||
|
||||
source_set("sandbox_unittests") {
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index 2c9080001cf8e8b4da54a4744f6754e3d5aac5a0..e08a38e5f9ea9c15fc5ceba1a38af682055389b7 100644
|
||||
index d1ab6d45d519dd131a854b01b90295b5e7316d71..7086774c980636b160f5152ac2c3c6b737217dd1 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -304,6 +304,7 @@ component("core") {
|
||||
@@ -308,6 +308,7 @@ component("core") {
|
||||
configs -= core_config_remove
|
||||
configs += core_config_add
|
||||
configs += [ "//v8:external_startup_data" ]
|
||||
@@ -239,10 +255,10 @@ index 7637db0ce03b9e8d242e47f5aff85c21967a541f..e66fdb98adb035a917942432806e0dfa
|
||||
sources += [ "ca_layer_frame_sink_provider.h" ]
|
||||
}
|
||||
diff --git a/ui/accessibility/platform/BUILD.gn b/ui/accessibility/platform/BUILD.gn
|
||||
index 7b3d41de1be2425929df590526082a5f45aaba9a..500b59ba38ef1dda1851443b774fa9c375aabcef 100644
|
||||
index cb282e3a526fb724b25c0d4c6a2af3da30ee0a20..d4275f68211f5a0cddfd2bcbc0f620e8f8b6c7aa 100644
|
||||
--- a/ui/accessibility/platform/BUILD.gn
|
||||
+++ b/ui/accessibility/platform/BUILD.gn
|
||||
@@ -252,6 +252,7 @@ component("platform") {
|
||||
@@ -247,6 +247,7 @@ component("platform") {
|
||||
weak_frameworks = [
|
||||
"Accessibility.framework", # macOS 11
|
||||
]
|
||||
@@ -251,7 +267,7 @@ index 7b3d41de1be2425929df590526082a5f45aaba9a..500b59ba38ef1dda1851443b774fa9c3
|
||||
|
||||
if (use_atk) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 260725d466d890dfec29d423700510f55caa7a52..f98598cf97a740b39016b35ca12825eefd1c1a07 100644
|
||||
index e6a0ca42d0fa2446b300714372986da7e2013f16..fd651028ead9103dabcbb3686e412c12ba8e7952 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -355,6 +355,7 @@ component("base") {
|
||||
@@ -263,7 +279,7 @@ index 260725d466d890dfec29d423700510f55caa7a52..f98598cf97a740b39016b35ca12825ee
|
||||
|
||||
if (is_apple) {
|
||||
diff --git a/ui/display/BUILD.gn b/ui/display/BUILD.gn
|
||||
index 4fb4a862d285fababc67d4f2fe38036ea83bd8a9..fa71bc82342412d85fb05312b441cecbfd9da778 100644
|
||||
index e7e52516cec15d41abb9f9c9458c5f3420de7dc0..2e13ca6442c616944577b3374fae082554e585c0 100644
|
||||
--- a/ui/display/BUILD.gn
|
||||
+++ b/ui/display/BUILD.gn
|
||||
@@ -67,6 +67,10 @@ component("display") {
|
||||
@@ -278,10 +294,10 @@ index 4fb4a862d285fababc67d4f2fe38036ea83bd8a9..fa71bc82342412d85fb05312b441cecb
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
|
||||
index f8dfc00b61d67aec62f26b57636b28dcfca8f989..bf067319394717738f5281a28bcbdaab8d8f3ead 100644
|
||||
index f5038c6478eeccc17e061681dbee0f384dac4911..bf23c3576bb7b2d10a840e6eb2a420b739b4f4d7 100644
|
||||
--- a/ui/gfx/BUILD.gn
|
||||
+++ b/ui/gfx/BUILD.gn
|
||||
@@ -192,6 +192,7 @@ component("gfx") {
|
||||
@@ -193,6 +193,7 @@ component("gfx") {
|
||||
"scoped_ns_graphics_context_save_gstate_mac.h",
|
||||
"scoped_ns_graphics_context_save_gstate_mac.mm",
|
||||
]
|
||||
@@ -290,10 +306,10 @@ index f8dfc00b61d67aec62f26b57636b28dcfca8f989..bf067319394717738f5281a28bcbdaab
|
||||
if (is_win) {
|
||||
sources += [
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 416497c77970e1c15ebecc27af59cf50112a6441..b366bbb8d84c6c7fb1a3b9b1b1e022d5de077b2d 100644
|
||||
index a4072a85236ad029ecb292be0085e537a7c482bb..d9250541ab197f625c42feb96d94aca4cd791195 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -681,6 +681,7 @@ component("views") {
|
||||
@@ -682,6 +682,7 @@ component("views") {
|
||||
"IOSurface.framework",
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
@@ -301,7 +317,7 @@ index 416497c77970e1c15ebecc27af59cf50112a6441..b366bbb8d84c6c7fb1a3b9b1b1e022d5
|
||||
}
|
||||
|
||||
if (is_win) {
|
||||
@@ -1097,6 +1098,8 @@ source_set("test_support") {
|
||||
@@ -1098,6 +1099,8 @@ source_set("test_support") {
|
||||
"//testing/gtest",
|
||||
]
|
||||
|
||||
@@ -311,7 +327,7 @@ index 416497c77970e1c15ebecc27af59cf50112a6441..b366bbb8d84c6c7fb1a3b9b1b1e022d5
|
||||
sources += [
|
||||
"test/desktop_window_tree_host_win_test_api.cc",
|
||||
diff --git a/ui/views/controls/webview/BUILD.gn b/ui/views/controls/webview/BUILD.gn
|
||||
index 7462baf7cfae6859a821b71501b60015ff2c4ed7..1eeacfc6bf7fd3a42a06198045260519bf606a48 100644
|
||||
index e3dd4fab3a1cac0138f8dac60247e0ea3343e87e..61ce57a66ec9d686816446c7f05ce82ee7ee442e 100644
|
||||
--- a/ui/views/controls/webview/BUILD.gn
|
||||
+++ b/ui/views/controls/webview/BUILD.gn
|
||||
@@ -19,6 +19,7 @@ component("webview") {
|
||||
|
||||
@@ -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 e6afcce7a20db58380478f855bd559ee5d5d3098..3c2d6925829ef571949ee13234ddac23603950f5 100644
|
||||
index 9f7b9d04cefd48539d8c62cb74c3aac084e116e6..0faa1fba5cea7e301b7497aca5838f761d9e02bd 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7824,6 +7824,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -7836,6 +7836,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 e6afcce7a20db58380478f855bd559ee5d5d3098..3c2d6925829ef571949ee13234ddac23
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 6a4120f593663551f7ea26d6729e06b1f7f8bc35..cb5d09ff6c2347caac3c31f642be244937fdd284 100644
|
||||
index 4efa2e72fdc340624ce888e93ffd4359e20c0973..5018e17e0f56efd54529ef3e9ae1de5e223aed68 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4175,6 +4175,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4206,6 +4206,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -37,7 +37,7 @@ index 6a4120f593663551f7ea26d6729e06b1f7f8bc35..cb5d09ff6c2347caac3c31f642be2449
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -4216,12 +4222,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4247,12 +4253,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ index 033780b477965e6915fc808cb468598f55050f2b..51da4e464c5768d979188bb46c11565c
|
||||
|
||||
// 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 1024cfb384eceb509ede5ea0bf846ab8d31e50f2..a60292d190df0e659f96ac1ae450b49b7deb6ff8 100644
|
||||
index d7a8a6d628b790ad9747335b45d1bb148f536ed7..7ba6f9bf054cf9b4d89cfa129caf91a865e1cf97 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -658,6 +658,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -665,6 +665,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +79,10 @@ index 1024cfb384eceb509ede5ea0bf846ab8d31e50f2..a60292d190df0e659f96ac1ae450b49b
|
||||
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 142fc907837fc194a2c5de0b44d6598e3935eaec..624ca55fd047d68d456be85f8bc45de57c452f67 100644
|
||||
index fe0b1b96209c48d298a0de2041e2841083f891a9..044a426f4dab1b60b035e4f383b6c468446afc74 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -167,6 +167,7 @@ class NetworkService;
|
||||
@@ -169,6 +169,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +90,7 @@ index 142fc907837fc194a2c5de0b44d6598e3935eaec..624ca55fd047d68d456be85f8bc45de5
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1067,6 +1068,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1078,6 +1079,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -100,7 +100,7 @@ index 142fc907837fc194a2c5de0b44d6598e3935eaec..624ca55fd047d68d456be85f8bc45de5
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 885899b151520e0173a5ca68c2613b1333cadddf..5b53ee691c0a07ed1655139ca2d90341b5fa55a3 100644
|
||||
index 0e348f7ca57e3004c1f85435ecd0c66896c5a8fb..8019a5c687a87a4257f9f7c0581781095fc20043 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -28,6 +28,17 @@ namespace content {
|
||||
@@ -122,7 +122,7 @@ index 885899b151520e0173a5ca68c2613b1333cadddf..5b53ee691c0a07ed1655139ca2d90341
|
||||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 5da6f93293bc5ddae88c17ac2dd8d7037ba8e8f3..76d699790fb7d92587293b14332f696dc5460322 100644
|
||||
index c5bda327264c330345baf7b44b4ba5c478e58952..989778079d5dc91127989e43f3ce6b25a9df56d4 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -148,10 +148,10 @@ index 5da6f93293bc5ddae88c17ac2dd8d7037ba8e8f3..76d699790fb7d92587293b14332f696d
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index c7b69423df941f2407b96a49ff6012cc22838dc2..797ebc2b7aa045bcf9e032b3ebae28a3fc8d2403 100644
|
||||
index 556f5310719f9a9e56bb3a34d75a529b8b26f839..68cc76c0f63f3f828ab582dab88f893453144b2a 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6297,6 +6297,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6316,6 +6316,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
blink::GetNavigationInitiatorActivationAndAdStatus(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -163,7 +163,7 @@ index c7b69423df941f2407b96a49ff6012cc22838dc2..797ebc2b7aa045bcf9e032b3ebae28a3
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index bdf18ff21a92c7cde33cb299b5c3c0a609ce2ea8..97822402213729a4204cf36c3cd42ee5f568fc21 100644
|
||||
index e4ee6ba03a5683ce7b1a72ac643b5b2520a2f998..44ac0ad92d22b2db8992c67910e420029f005433 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -504,6 +504,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -176,7 +176,7 @@ index bdf18ff21a92c7cde33cb299b5c3c0a609ce2ea8..97822402213729a4204cf36c3cd42ee5
|
||||
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 6e9041279578d8365a4eae6bd9f221baf79324d7..39ff665cc8b87ed4997a60a18c05cd42bc6ffd24 100644
|
||||
index d17a2d7f09d1899f2e8888c4747ecffbc5b5ff9a..894795fe392013e66513f1f578970908ec652d5d 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.h
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.h
|
||||
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
|
||||
@@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
|
||||
|
||||
} // 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 d4b693833254a9cb294c98c14cc5b0c00f7e678e..884635d65add468cfd896db7e8d8d001e79833fe 100644
|
||||
index 6283f14f8b613bc435f8c04fec13d1222795797a..2313fe0a9092dd41db0fecf17080ed12b91b0485 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2202,6 +2202,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2195,6 +2195,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window);
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Charles Kerr <charles@charleskerr.com>
|
||||
Date: Wed, 5 Jul 2023 16:28:30 -0500
|
||||
Subject: chore: add BUILDFLAG guard around new include
|
||||
|
||||
Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4628373
|
||||
|
||||
This is an experimental commit; but if it's successful,
|
||||
This patch should be upstreamed and then removed from electron's code.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
|
||||
index 7145cc6ad5d1724cde8e2c6b6168a36f4e6b2dbe..f796d075fd07d68e6992c351f639288e9baa4224 100644
|
||||
--- a/chrome/browser/ui/views/frame/browser_view.h
|
||||
+++ b/chrome/browser/ui/views/frame/browser_view.h
|
||||
@@ -43,7 +43,6 @@
|
||||
#include "chrome/browser/ui/views/user_education/browser_feature_promo_controller.h"
|
||||
#include "chrome/common/buildflags.h"
|
||||
#include "components/infobars/core/infobar_container.h"
|
||||
-#include "components/segmentation_platform/public/result.h"
|
||||
#include "components/user_education/common/feature_promo_controller.h"
|
||||
#include "components/user_education/common/feature_promo_handle.h"
|
||||
#include "components/webapps/browser/banners/app_banner_manager.h"
|
||||
@@ -62,6 +61,10 @@
|
||||
#include "ui/views/widget/widget_observer.h"
|
||||
#include "ui/views/window/client_view.h"
|
||||
|
||||
+#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#include "components/segmentation_platform/public/result.h"
|
||||
+#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
#include "ui/compositor/throughput_tracker.h"
|
||||
#endif
|
||||
@@ -18,7 +18,7 @@ index 7141c8b3de3bc419d536499ce775d98b619a7bdb..d316050668a44ccfd033a56cd1de4901
|
||||
/google_apis/internal
|
||||
/googleurl
|
||||
diff --git a/third_party/.gitignore b/third_party/.gitignore
|
||||
index a1dd3deb87cfe5dbd451f2a1cdab576e3152535b..d3f626cee6998992f67b14108090acea17eccaf1 100644
|
||||
index 971a366f4db719ac6893bac6d6bf27cc5c8c458f..f6044f9457967fb8dd77038d9b14b0e24c1d96ad 100644
|
||||
--- a/third_party/.gitignore
|
||||
+++ b/third_party/.gitignore
|
||||
@@ -94,6 +94,7 @@
|
||||
@@ -29,7 +29,7 @@ index a1dd3deb87cfe5dbd451f2a1cdab576e3152535b..d3f626cee6998992f67b14108090acea
|
||||
/elfutils/src
|
||||
/emoji-metadata/src
|
||||
/emoji-segmenter/src
|
||||
@@ -202,6 +203,7 @@
|
||||
@@ -203,6 +204,7 @@
|
||||
/mocha
|
||||
/mockito/src
|
||||
/nacl_sdk_binaries/
|
||||
@@ -37,7 +37,7 @@ index a1dd3deb87cfe5dbd451f2a1cdab576e3152535b..d3f626cee6998992f67b14108090acea
|
||||
/nasm
|
||||
/nearby/src
|
||||
/neon_2_sse/src
|
||||
@@ -269,6 +271,7 @@
|
||||
@@ -270,6 +272,7 @@
|
||||
/speex
|
||||
/sqlite/src
|
||||
/sqlite4java/lib/
|
||||
|
||||
@@ -34,7 +34,7 @@ index 2e4bacce52a45b5d9d7829c1f88f82aa0bb1b4bb..f3537e89191bd2c6d9b06c9b741a1680
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 1956bad91ae8b3f19908f5e0c5ac84bd8a5fffbd..a14b20dd969226d04634ea123601b61a8379c448 100644
|
||||
index 49d95d6d67eb5e9bf5ae2f1d64aaafe21e18bf5b..bffa2e1e41f6e61135c6ec3627268d2fbd8783b9 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3243,15 +3243,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
|
||||
@@ -7,7 +7,7 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
|
||||
of explicitly adding ScopedAllowBlocking calls as friends.
|
||||
|
||||
diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
|
||||
index 536ee9714219fd373567b80071f453cee896060f..28764535cf3724028bd76edf036e02045c8f02c3 100644
|
||||
index 385b540b5a4291070eff5e1e6a407223de097cdb..32fec685bc3b6631594ca3ee5922c5f49da83e45 100644
|
||||
--- a/base/threading/thread_restrictions.h
|
||||
+++ b/base/threading/thread_restrictions.h
|
||||
@@ -133,6 +133,7 @@ class FirefoxProfileLock;
|
||||
@@ -28,7 +28,7 @@ index 536ee9714219fd373567b80071f453cee896060f..28764535cf3724028bd76edf036e0204
|
||||
namespace enterprise_connectors {
|
||||
class LinuxKeyRotationCommand;
|
||||
} // namespace enterprise_connectors
|
||||
@@ -580,6 +584,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
|
||||
@@ -582,6 +586,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
|
||||
friend class ::DesktopNotificationBalloon;
|
||||
friend class ::FirefoxProfileLock;
|
||||
friend class ::GaiaConfig;
|
||||
@@ -36,7 +36,7 @@ index 536ee9714219fd373567b80071f453cee896060f..28764535cf3724028bd76edf036e0204
|
||||
friend class ::ProfileImpl;
|
||||
friend class ::ScopedAllowBlockingForProfile;
|
||||
friend class ::StartupTabProviderImpl;
|
||||
@@ -617,6 +622,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
|
||||
@@ -619,6 +624,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
|
||||
friend class crosapi::LacrosThreadTypeDelegate;
|
||||
friend class crypto::ScopedAllowBlockingForNSS; // http://crbug.com/59847
|
||||
friend class drive::FakeDriveService;
|
||||
|
||||
@@ -14,7 +14,7 @@ This change patches it out to prevent the DCHECK.
|
||||
It can be removed once/if we see a better solution to the problem.
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index 3a292071a755c420060f6553bb6ce36d0ca0b253..ac5b564c54d15410facff3754508e9163230f15e 100644
|
||||
index 6eeaf96f4f056eebe73555c46cf15436b1dcf184..cb91f11d38cca8b87b35b04fb39162b3d77acfd4 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -205,7 +205,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(
|
||||
|
||||
@@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 8485102b60faadccbc463c8fc52499e2f865f3f9..525aee88cd77d7f5cb561a97fb79d0bfe2582176 100644
|
||||
index 865414f0994a4e29f297532538486f780edd51d3..3a60a59497571a33bba8efa7654a32403ab99978 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4082,8 +4082,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4113,8 +4113,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -232,7 +232,7 @@ index 8485102b60faadccbc463c8fc52499e2f865f3f9..525aee88cd77d7f5cb561a97fb79d0bf
|
||||
static_cast<WebContentsImpl*>(delegate_->CreateCustomWebContents(
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 5b53ee691c0a07ed1655139ca2d90341b5fa55a3..684b2f9c1f20a2dd460491d9d4285756907a8aa4 100644
|
||||
index 8019a5c687a87a4257f9f7c0581781095fc20043..d7ccb0f7a7b15fb19640b1b0491750b179a77693 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -246,7 +246,7 @@ index 5b53ee691c0a07ed1655139ca2d90341b5fa55a3..684b2f9c1f20a2dd460491d9d4285756
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 76d699790fb7d92587293b14332f696dc5460322..2b15ee95474fab528fd710b52d3a1d9e6a60b871 100644
|
||||
index 989778079d5dc91127989e43f3ce6b25a9df56d4..71b5a7c30f6546e3172ea31f9b0572c0e6a9f660 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -322,8 +322,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -358,7 +358,7 @@ index 60acb83c8d76f71db689f9d188bb6e8f64a74ffb..aa6cee708d1e451b443bc26528b56cc8
|
||||
->options()
|
||||
->block_new_web_contents();
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
||||
index d7f5236840939989ffea27b67fe1ae0a35315bdf..9ce1696415228ac05dc745a6e0c79c3cd69d3828 100644
|
||||
index aa3148852ff61323cb9bf20817c6677cffe34ded..82790630067f11da8c4eac785b242d5cd131d3e3 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -428,8 +428,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
|
||||
@@ -7,7 +7,7 @@ By default, chromium sets up one v8 snapshot to be used in all v8 contexts. This
|
||||
to have a dedicated browser process v8 snapshot defined by the file `browser_v8_context_snapshot.bin`.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index 93eac2b049ecfb5a7650e778ea4e243bc1ca5b4d..d19698c57ecfb808e4b255b4bc8b17429afd2013 100644
|
||||
index 336705c28ca960d8e7d9af82bb56b009e49bc733..af5406b48c11ea859805a46b1167f475825cacca 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -39,6 +39,7 @@
|
||||
@@ -18,7 +18,7 @@ index 93eac2b049ecfb5a7650e778ea4e243bc1ca5b4d..d19698c57ecfb808e4b255b4bc8b1742
|
||||
#include "base/strings/string_number_conversions.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "base/task/single_thread_task_runner.h"
|
||||
@@ -258,8 +259,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
|
||||
@@ -252,8 +253,13 @@ std::string GetSnapshotDataDescriptor(const base::CommandLine& command_line) {
|
||||
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ index 93eac2b049ecfb5a7650e778ea4e243bc1ca5b4d..d19698c57ecfb808e4b255b4bc8b1742
|
||||
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
|
||||
base::FileDescriptorStore& file_descriptor_store =
|
||||
base::FileDescriptorStore::GetInstance();
|
||||
@@ -288,11 +294,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
@@ -282,11 +288,12 @@ bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
|
||||
@@ -48,7 +48,7 @@ index 93eac2b049ecfb5a7650e778ea4e243bc1ca5b4d..d19698c57ecfb808e4b255b4bc8b1742
|
||||
#endif // V8_USE_EXTERNAL_STARTUP_DATA
|
||||
}
|
||||
|
||||
@@ -966,7 +973,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
@@ -944,7 +951,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
|
||||
return TerminateForFatalInitializationError();
|
||||
#endif // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
|
||||
|
||||
@@ -102,10 +102,10 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3
|
||||
friend class ContentClientCreator;
|
||||
friend class ContentClientInitializer;
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 0d56182a284b91e7bf5749dbf0796cbe705d2c1f..a7578102abc92cba4334459f540776dc2463cdb5 100644
|
||||
index 4c2a4783f894c2dc62d87dfc51e2ebb8a0b51b2e..603fab0ef4b7f15a94805f897369d0940eeb1042 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -514,8 +514,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
@@ -532,8 +532,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
|
||||
|
||||
#if defined(V8_USE_EXTERNAL_STARTUP_DATA)
|
||||
|
||||
@@ -115,7 +115,7 @@ index 0d56182a284b91e7bf5749dbf0796cbe705d2c1f..a7578102abc92cba4334459f540776dc
|
||||
if (g_mapped_snapshot) {
|
||||
// TODO(crbug.com/802962): Confirm not loading different type of snapshot
|
||||
// files in a process.
|
||||
@@ -524,10 +523,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
@@ -542,10 +541,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
|
||||
|
||||
base::MemoryMappedFile::Region file_region;
|
||||
base::File file =
|
||||
|
||||
@@ -8,7 +8,7 @@ Allow registering custom protocols to handle service worker main script fetching
|
||||
Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
|
||||
|
||||
diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
index 939ea79947c6c1ae2d3d8b2d73226c89cffbdf2d..874a76e34586ab31658bac0f76835598ec003094 100644
|
||||
index 698c94642b98b03570fef8f7a5956486eacacbdc..7983abad9a78a115dfd7b9513c6f57be2cd40811 100644
|
||||
--- a/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
+++ b/content/browser/service_worker/service_worker_context_wrapper.cc
|
||||
@@ -1839,6 +1839,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
|
||||
|
||||
@@ -82,7 +82,7 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb
|
||||
const Source& GetSource(int index) const override;
|
||||
DesktopMediaList::Type GetMediaListType() const override;
|
||||
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..f994ac6086c7b4cd3e8534f34691189d78a21601 100644
|
||||
index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab1869877a 100644
|
||||
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
|
||||
@@ -147,7 +147,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
|
||||
@@ -94,17 +94,20 @@ index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..f994ac6086c7b4cd3e8534f34691189d
|
||||
#endif
|
||||
|
||||
} // namespace
|
||||
@@ -457,6 +457,9 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
@@ -457,6 +457,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
|
||||
FROM_HERE,
|
||||
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
|
||||
media_list_));
|
||||
+
|
||||
+ // This call is necessary to release underlying OS screen capture mechanisms.
|
||||
+ capturer_.reset();
|
||||
+ // Skip if the source list is delegated, as the source list window will be active.
|
||||
+ if (!capturer_->GetDelegatedSourceListController()) {
|
||||
+ capturer_.reset();
|
||||
+ }
|
||||
}
|
||||
|
||||
void NativeDesktopMediaList::Worker::OnCaptureResult(
|
||||
@@ -829,6 +832,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
@@ -829,6 +835,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
|
||||
FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
|
||||
base::Unretained(worker_.get()),
|
||||
std::move(native_ids), thumbnail_size_));
|
||||
|
||||
@@ -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 5bfae3cc8319e455cab3b1e3283dd26f056e6827..38e027307c5ca9d08c4dd8e3ce6667e4eaf803b5 100644
|
||||
index 256f599f8ad93578a7b56697070b1d0630b04897..3c1723ed20ab6a673df7e0ebf0119c2150b472bf 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1905,6 +1905,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1868,6 +1868,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
TargetColorParams params;
|
||||
@@ -93,10 +93,10 @@ index b7df289e4546fd5d33266223f4b678c1ab0e26e2..af4fdec439ebe630d43a60cfa53d3add
|
||||
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 2fe11fd6f014cb5b415efe2ae1ba97efa94281c4..b96f01c161cd71e16e3c203a19a6715a33cae2e2 100644
|
||||
index 19d712720b5eaf880c75eaaef897d814f4a5c35d..c8ad0f02d51d3340c8732ea8e349b3876be39601 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -3476,6 +3476,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3517,6 +3517,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,7 +6,7 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index e15e6b3e145aecfddd1ce20fdd6c844bfda6e31b..64d4e4ba8d8ab1414abb65a904e23b94352e40b9 100644
|
||||
index 4dce73888703a5db8fe7ae2a0e0745ee813ab9b0..e995e9b652397a67ca0b89e107975ab04bae7725 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -528,7 +528,11 @@
|
||||
|
||||
@@ -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 48e6fa3d8447e87ab2a729aa950cc5029c875673..90c6a5b6999571819ef71f859767cccf635ea883 100644
|
||||
index 95d27f99acc0e59c8660054eea9e2b221af0e0f3..2d705b183b1014a6f8dc89672b327d619ac52b1a 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -812,6 +812,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index 48e6fa3d8447e87ab2a729aa950cc5029c875673..90c6a5b6999571819ef71f859767cccf
|
||||
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 e987d9316f9b5335a9c94a2dfe1f84498d9f704b..b0eb03c065753fe3bc8756d565fc17fbdaa5ad2b 100644
|
||||
index e74883df0950b2e462a7ebdde8a476259cf0f231..3033d9d9efd3302fba1698a8b8f549c4c00ab82e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -900,6 +900,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -899,6 +899,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
|
||||
cc::BrowserControlsState current,
|
||||
bool animate);
|
||||
@@ -33,10 +33,10 @@ index e987d9316f9b5335a9c94a2dfe1f84498d9f704b..b0eb03c065753fe3bc8756d565fc17fb
|
||||
protected:
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
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 a122bd2170bbb543641454d39789d7f5f0500fc3..3d87288585c03cc9f7bb257823ff7359049d88ee 100644
|
||||
index 0e521106dda6bf6480e8c6a7fc6afda977e8ec08..9716c8f8a5fe15ffabe4eeedb7b5b35a57b61bac 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -607,7 +607,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -606,7 +606,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
DCHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ index 3d22d934c39f50760d1c519d665ddc3cb1908541..06fd4d3962b8aa0767d295deeba2e949
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 8a7a96ab4bcbff767b7d5fa44b87f1c5eb8f301d..2d8cb452448b7baa352aacb54a3544bc8afb1ad3 100644
|
||||
index 60e4436e29b8eaa36cea939edc53d3752e395eef..14a6ad7a22c809a1cd59f5e12d04752b6e7940ed 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1140,8 +1140,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
@@ -1141,8 +1141,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index f2ae2092be6042f48d50f690581dccff8a3e2566..81f3e8a29b721d66ef786ade7fac0b0852555421 100644
|
||||
index 0ffa0ec042bd59de5d28fad53dee2b6321d64b18..a6570cb144952a1bb7eca124bb4cbb33e249ef15 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1488,6 +1488,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1491,6 +1491,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index f2ae2092be6042f48d50f690581dccff8a3e2566..81f3e8a29b721d66ef786ade7fac0b08
|
||||
// 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 f3a89933fef78c62e4c67fcfd521c8413c32e38f..8497ad66f2344b0379b8033d26ca2b87fa134294 100644
|
||||
index f10414f382b48ecc162b22d9638d948e3e719733..47d13dbe9efd501efabe096607e53cb80744cd42 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread
|
||||
This is needed to blend Blink and Node's policy for code generation policy.
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index 6cc93de0150bebc10cee83aadc3a643eb8e84ce7..ec992270b6aa54e4507ad0bad501793f72353834 100644
|
||||
index 4a0ae5a492e35b8f11d9f4f98083a63050e0bbe0..653eaaddb8bd69de392695894fabfdacddc7de90 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -439,8 +439,9 @@ TrustedTypesCodeGenerationCheck(v8::Local<v8::Context> context,
|
||||
|
||||
@@ -12,10 +12,10 @@ 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 0576934b9f747ab731ab1fe52c7d02882949e227..dec1e6be2a678ce407deec8dd30957e26e6d2ab1 100644
|
||||
index ce99c90306bf2988fdb9a92e04d2ed8ec318da78..77f90f35ebad0655af1bd063d9a942964db48017 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -165,6 +165,7 @@
|
||||
@@ -166,6 +166,7 @@
|
||||
#include "third_party/blink/renderer/core/view_transition/view_transition_supplement.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/generic_font_family_settings.h"
|
||||
@@ -23,7 +23,7 @@ index 0576934b9f747ab731ab1fe52c7d02882949e227..dec1e6be2a678ce407deec8dd30957e2
|
||||
#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"
|
||||
@@ -1764,6 +1765,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1765,6 +1766,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
web_view_impl->SetMaximumLegibleScale(
|
||||
prefs.default_maximum_page_scale_factor);
|
||||
|
||||
@@ -65,10 +65,10 @@ index 02d9eabfef9521722340739bf86df3dfc30018d7..af8639ebcc61d8081a12334f652a551d
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool EscapeVirtualization(const base::FilePath& user_data_dir);
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a133f0f85d3 100644
|
||||
index 2071c301644f95e6cd0448b08cc7b535343a55a0..ec6c6425f4d76557ddb37a80fd68c1086fc5103d 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -608,6 +608,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
@@ -613,6 +613,7 @@ class ProcessSingleton::LinuxWatcher
|
||||
// |reader| is for sending back ACK message.
|
||||
void HandleMessage(const std::string& current_dir,
|
||||
const std::vector<std::string>& argv,
|
||||
@@ -76,7 +76,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
SocketReader* reader);
|
||||
|
||||
private:
|
||||
@@ -662,13 +663,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) {
|
||||
@@ -667,13 +668,16 @@ void ProcessSingleton::LinuxWatcher::StartListening(int socket) {
|
||||
}
|
||||
|
||||
void ProcessSingleton::LinuxWatcher::HandleMessage(
|
||||
@@ -95,7 +95,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
// Send back "ACK" message to prevent the client process from starting up.
|
||||
reader->FinishWithACK(kACKToken, std::size(kACKToken) - 1);
|
||||
} else {
|
||||
@@ -716,7 +720,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
@@ -721,7 +725,8 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,7 +105,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
const size_t kMinMessageLength = std::size(kStartToken) + 4;
|
||||
if (bytes_read_ < kMinMessageLength) {
|
||||
buf_[bytes_read_] = 0;
|
||||
@@ -746,10 +751,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
@@ -751,10 +756,28 @@ void ProcessSingleton::LinuxWatcher::SocketReader::
|
||||
tokens.erase(tokens.begin());
|
||||
tokens.erase(tokens.begin());
|
||||
|
||||
@@ -135,7 +135,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
fd_watch_controller_.reset();
|
||||
|
||||
// LinuxWatcher::HandleMessage() is in charge of destroying this SocketReader
|
||||
@@ -778,8 +801,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
@@ -783,8 +806,10 @@ void ProcessSingleton::LinuxWatcher::SocketReader::FinishWithACK(
|
||||
//
|
||||
ProcessSingleton::ProcessSingleton(
|
||||
const base::FilePath& user_data_dir,
|
||||
@@ -146,7 +146,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
current_pid_(base::GetCurrentProcId()) {
|
||||
socket_path_ = user_data_dir.Append(chrome::kSingletonSocketFilename);
|
||||
lock_path_ = user_data_dir.Append(chrome::kSingletonLockFilename);
|
||||
@@ -897,7 +922,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -902,7 +927,8 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
sizeof(socket_timeout));
|
||||
|
||||
// Found another process, prepare our command line
|
||||
@@ -156,7 +156,7 @@ index 5330402b1df783b8258b09d8e8dfc2cdf3819437..ab12ef7610f243f9cc0207d20fa55a13
|
||||
std::string to_send(kStartToken);
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
|
||||
@@ -907,11 +933,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
@@ -912,11 +938,21 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
||||
to_send.append(current_dir.value());
|
||||
|
||||
const std::vector<std::string>& argv = cmd_line.argv();
|
||||
|
||||
@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 4c60eb7caf5eddbdb71b753c710c7053476bee04..88dd58492d84c6da4f179a5ef651923ab17a76b1 100644
|
||||
index 8f13ff7194c8420038583b9c82ccb8b586d86aac..222f2983d85c2c57017e751919919a03d886c0e5 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -144,6 +144,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
@@ -145,6 +145,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors,
|
||||
NativeTheme::~NativeTheme() = default;
|
||||
|
||||
bool NativeTheme::ShouldUseDarkColors() const {
|
||||
@@ -26,7 +26,7 @@ index 4c60eb7caf5eddbdb71b753c710c7053476bee04..88dd58492d84c6da4f179a5ef651923a
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index a337d8ff4ed81dae4455af01cc9dc72356a31f82..ca9318f403ce9e80b28b107a47f67405663e8775 100644
|
||||
index 5ee7cd7952f7b956c32e793e251d5b0cb457026a..bc2fac2b97ffbcc4c0b54d1652c37bfb021d5d3d 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -410,6 +410,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -53,7 +53,7 @@ index a337d8ff4ed81dae4455af01cc9dc72356a31f82..ca9318f403ce9e80b28b107a47f67405
|
||||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -605,6 +622,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -606,6 +623,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
PageColors page_colors_ = PageColors::kOff;
|
||||
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
@@ -62,10 +62,10 @@ index a337d8ff4ed81dae4455af01cc9dc72356a31f82..ca9318f403ce9e80b28b107a47f67405
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index b27c0856568c5c601976aa0593d16014a4f99dfe..5aa80492896f7b1107c974b00e5d145256cf7647 100644
|
||||
index 87807be3558a2fdd222241b046718f9f1f0b7858..dcff51e17f5215d62c62141f2b63f26501e59d09 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -622,6 +622,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -623,6 +623,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
// ...unless --force-dark-mode was specified in which case caveat emptor.
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode())
|
||||
return false;
|
||||
|
||||
@@ -183,7 +183,7 @@ index 01e62d7e8df65efb900e9cd0d34bcd8e0ed3e7da..9af6784707f125046d9a734165fc2b08
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index cf3c0c18f582ea232eac24b517299e45a4d2f5f9..2f128d1fd1f7aa5e15adc3259f8275ceec1dd4b5 100644
|
||||
index 4a5df7babed52c05f453a264d724dd2d89f7a0c6..3e11e84f5a42b3758ff0662eff249b6ad6ded77b 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -156,11 +156,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
|
||||
@@ -59,10 +59,10 @@ index 5eeaadec9773f4890d9f8cccba1d50f645045b74..d7eb61a67c507ff8bd9e60878a9f5bbf
|
||||
// of lacros-chrome is complete.
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)
|
||||
diff --git a/components/viz/host/layered_window_updater_impl.cc b/components/viz/host/layered_window_updater_impl.cc
|
||||
index 271486b45dcc87b52b3fd8a8f248b08a4918c97e..9de13bd8ea5f2efe5d0f23ab045fe0aba226cf5d 100644
|
||||
index 8f726bde2cb5da6acfe630006af0fc3a09811d6c..45d8cae3ba0fca9a1514f83032a10c8820b3126d 100644
|
||||
--- a/components/viz/host/layered_window_updater_impl.cc
|
||||
+++ b/components/viz/host/layered_window_updater_impl.cc
|
||||
@@ -44,7 +44,9 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory(
|
||||
@@ -46,7 +46,9 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory(
|
||||
// |region|'s handle will close when it goes out of scope.
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 5583233391b2133acd30d76ce4c3c5d87e0ffbc8..9551e3ea2e5f3de9bff158fc0f443df69a27f93a 100644
|
||||
index ef3c8ba80dd3438277a2b96903baec12783381fc..488abc9ed0d61a4b73f4bec34cbca416abfbf715 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -141,6 +141,8 @@ viz_component("service") {
|
||||
@@ -231,10 +231,10 @@ index e12c1d87018a86d763f59e5ac62058cf815fce3a..01f8023811b49797674a0de6e32c358d
|
||||
|
||||
diff --git a/components/viz/service/display_embedder/software_output_device_proxy.cc b/components/viz/service/display_embedder/software_output_device_proxy.cc
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..28766c6a228d243065e363838a28b38ac2448332
|
||||
index 0000000000000000000000000000000000000000..25c427e337a1bc049cd6977a13c4113085dc9401
|
||||
--- /dev/null
|
||||
+++ b/components/viz/service/display_embedder/software_output_device_proxy.cc
|
||||
@@ -0,0 +1,160 @@
|
||||
@@ -0,0 +1,161 @@
|
||||
+// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
@@ -331,8 +331,9 @@ index 0000000000000000000000000000000000000000..28766c6a228d243065e363838a28b38a
|
||||
+ canvas_.reset();
|
||||
+
|
||||
+ size_t required_bytes;
|
||||
+ if (!ResourceSizes::MaybeSizeInBytes(
|
||||
+ viewport_pixel_size_, ResourceFormat::RGBA_8888, &required_bytes)) {
|
||||
+ if (!ResourceSizes::MaybeSizeInBytes(viewport_pixel_size_,
|
||||
+ SinglePlaneFormat::kRGBA_8888,
|
||||
+ &required_bytes)) {
|
||||
+ DLOG(ERROR) << "Invalid viewport size " << viewport_pixel_size_.ToString();
|
||||
+ return;
|
||||
+ }
|
||||
@@ -500,10 +501,10 @@ index 0000000000000000000000000000000000000000..e1a22ee881c0fd679ac2d2d4d11a3c93
|
||||
+
|
||||
+#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_
|
||||
diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
index d4d4c1444e7a169d154bb9062f09f2270e7e9734..01943e14de567afd7b14f6a92eec651df185e1bb 100644
|
||||
index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf2a707ac8 100644
|
||||
--- a/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
+++ b/components/viz/service/display_embedder/software_output_device_win.cc
|
||||
@@ -192,7 +192,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
@@ -193,7 +193,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
|
||||
if (!canvas_)
|
||||
return;
|
||||
|
||||
@@ -527,10 +528,10 @@ index 36673e93a8380d4e6d086fe3029a53fa483ccddb..ad91be73ec89f45c2ce083eaa3a8aba6
|
||||
// Creating output surface failed. The host can send a new request, possibly
|
||||
// with a different compositing mode.
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index ea2888e6e6ce03dd1918a6183960d5809a15b59c..68c628ecbe2f596c93b6ac0d6b1c68cbb6b0a508 100644
|
||||
index c86f1e090cb844fb555098d128391ae66de2d594..1f20ff61a66f9a269fe5d5257470ef99e11fa72c 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -401,8 +401,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
@@ -395,8 +395,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
|
||||
root_params->display_private =
|
||||
display_private.BindNewEndpointAndPassReceiver();
|
||||
|
||||
@@ -49,10 +49,10 @@ index 185c4ba2dad840a35dd06ab874c8e2b2f5c1730c..9b3107a616d68d02065470a3b8e517b1
|
||||
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
|
||||
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
index 5c5632b9563f748f8dfbf1395c06d6692d57be10..aac7abb6613277c27bc4e83202094660f943a80b 100644
|
||||
index b60c907a5ab72a618c7675844626f425a045af68..53f5e2535db83c68bb808571619da22adea7ba4e 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
@@ -88,6 +88,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
|
||||
@@ -93,6 +93,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
|
||||
out->disable_secure_dns = data.disable_secure_dns();
|
||||
out->has_user_activation = data.has_user_activation();
|
||||
out->allow_cookies_from_browser = data.allow_cookies_from_browser();
|
||||
@@ -76,10 +76,10 @@ index 549b0da0d4790e0ced3048e7167fe1a74ab3f78a..71bc5c45d4f2ecf0abb7f6045bd9945e
|
||||
cookie_observer(
|
||||
const network::ResourceRequest::TrustedParams& trusted_params) {
|
||||
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
|
||||
index 237e3fbfc9aec50dd74bd6a0e1235d2b50ad9fcd..3c81dda1ea478696790b3b4a2a3b7e59acaf70c3 100644
|
||||
index fa378b77ccfe9de4e4152352705e7bb1c9fcabee..b7687fed1cb3a9db028f19913c34696e28e23ff3 100644
|
||||
--- a/services/network/public/mojom/url_request.mojom
|
||||
+++ b/services/network/public/mojom/url_request.mojom
|
||||
@@ -72,6 +72,9 @@ struct TrustedUrlRequestParams {
|
||||
@@ -73,6 +73,9 @@ struct TrustedUrlRequestParams {
|
||||
// FollowRedirect().
|
||||
bool allow_cookies_from_browser;
|
||||
|
||||
@@ -153,10 +153,10 @@ index 73955b10b858243f95576b197e4bede26f9a827f..3b71d6f9f2edeb83bd9d360cc7581cbe
|
||||
|
||||
// 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 e0f480869bc0f0ab9f51be205a141cd6f59e2c0c..c1d7fde7a4a1c1555b0c1ff337885dbf6419c458 100644
|
||||
index 471d196dc4f5ccd8c0fdf6d25a13629cdd0ae808..c1b52c9394f2471a584e9a6cc0ebdfc0b6ef04ef 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -554,6 +554,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -555,6 +555,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
|
||||
resource_scheduler_request_handle_;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: feat: filter out non-shareable windows in the current application in
|
||||
This patch ensures that windows protected via win.setContentProtection(true) do not appear in full display captures via desktopCapturer. This patch could be upstreamed but as the check is limited to in-process windows it doesn't make a lot of sense for Chromium itself. This patch currently has a limitation that it only function for windows created / protected BEFORE the stream is started. There is theoretical future work we can do via polling / observers to automatically update the SCContentFilter when new windows are made but for now this will solve 99+% of the problem and folks can re-order their logic a bit to get it working for their use cases.
|
||||
|
||||
diff --git a/content/browser/media/capture/screen_capture_kit_device_mac.mm b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
index c1949132c7c6c6f23eb1bb2d795f3dc4f55bbe2f..c552860ca6e0d3a57836149af33eea10508844e3 100644
|
||||
index ffc09580be4f78c10dab2f02bc6b89855c4f80ae..92a9f4e4d256a329b9ad2378819289abe1cc8d66 100644
|
||||
--- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
+++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
|
||||
@@ -168,7 +168,15 @@ void OnShareableContentCreated(
|
||||
@@ -170,7 +170,15 @@ void OnShareableContentCreated(
|
||||
case DesktopMediaID::TYPE_SCREEN:
|
||||
for (SCDisplay* display : [content displays]) {
|
||||
if (source_.id == [display displayID]) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
|
||||
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index a93df5a741dbf2eb99a454050e7f31c506d0ce8d..49dd8a662476adc481b80241086f60517c24dd82 100644
|
||||
index 0582143a5466afb3ba618e848ff23ffa23e5ca70..7a7f74778d0d9118d01a2dc8b916fada56a8dfaa 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3603,7 +3603,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -3633,7 +3633,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -11,7 +11,7 @@ enlarge window above dimensions set during creation of the
|
||||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 2d8cb452448b7baa352aacb54a3544bc8afb1ad3..1956bad91ae8b3f19908f5e0c5ac84bd8a5fffbd 100644
|
||||
index 14a6ad7a22c809a1cd59f5e12d04752b6e7940ed..49d95d6d67eb5e9bf5ae2f1d64aaafe21e18bf5b 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3818,14 +3818,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
|
||||
@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 4e95d8d087ed3fd9832396d71faa64bb33953dbf..895fdd1a002c0bbef3548353a5a8300dd13f594c 100644
|
||||
index 76a53ed5fcae948a3b2e950d484ffebd1939fd6c..fdce51afdbb8759fb52bf2ae570de3e4da7dd752 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -7382,10 +7382,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -7345,10 +7345,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
if (IsForMhtmlSubframe())
|
||||
return origin_with_debug_info;
|
||||
|
||||
@@ -37,10 +37,10 @@ index 4e95d8d087ed3fd9832396d71faa64bb33953dbf..895fdd1a002c0bbef3548353a5a8300d
|
||||
}
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
index 0696c1d31dd035f1a2cbfe978684c75063a533f1..7fda5fa77989b46159e351f6a6a7218514fb60bd 100644
|
||||
index dcdb5a391827be8d5b3558242ced27cefc54a6e3..17bd5123e6713ed19baa23b72d1b2dc3c3448701 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
@@ -2913,6 +2913,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -2930,6 +2930,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// last committed document.
|
||||
CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
|
||||
|
||||
@@ -58,7 +58,7 @@ index 0696c1d31dd035f1a2cbfe978684c75063a533f1..7fda5fa77989b46159e351f6a6a72185
|
||||
// Sets a ResourceCache in the renderer. `this` must be active and there must
|
||||
// be no pending navigation. `remote` must have the same and process
|
||||
// isolation policy.
|
||||
@@ -3286,17 +3297,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -3307,17 +3318,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// relevant.
|
||||
void ResetWaitingState();
|
||||
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Shelley Vohr <shelley.vohr@gmail.com>
|
||||
Date: Fri, 16 Jun 2023 11:15:57 +0200
|
||||
Subject: fix: crash on nativeTheme change during context menu close
|
||||
|
||||
Refs https://chromium-review.googlesource.com/c/chromium/src/+/4363385
|
||||
|
||||
Fixes a crash seen when trying to change nativeTheme source during
|
||||
a context menu close. This happens as a result of a change added in the
|
||||
above CL, which doesn't check whether or not the menu controller could
|
||||
possibly be null as can happen during a context menu close. This
|
||||
only affects Windows 11, as Bubble Border is only enabled there.
|
||||
|
||||
This should be upstreamed, as other uses of MenuController in this
|
||||
file do check for menu controller being null.
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_scroll_view_container.cc b/ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
index 76bb4863858fb1bde1288b3d1b1d07f151a2f801..dc0dd45da0097330612a0810fcd2bd18f5c42be4 100644
|
||||
--- a/ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
+++ b/ui/views/controls/menu/menu_scroll_view_container.cc
|
||||
@@ -402,8 +402,7 @@ void MenuScrollViewContainer::CreateDefaultBorder() {
|
||||
MenuController* menu_controller =
|
||||
content_view_->GetMenuItem()->GetMenuController();
|
||||
const MenuConfig& menu_config = MenuConfig::instance();
|
||||
- corner_radius_ = menu_config.CornerRadiusForMenu(
|
||||
- content_view_->GetMenuItem()->GetMenuController());
|
||||
+ corner_radius_ = menu_config.CornerRadiusForMenu(menu_controller);
|
||||
int padding = menu_config.use_outer_border && corner_radius_ > 0
|
||||
? kBorderPaddingDueToRoundedCorners
|
||||
: 0;
|
||||
@@ -418,8 +417,9 @@ void MenuScrollViewContainer::CreateDefaultBorder() {
|
||||
int bottom_inset = GetFootnote() ? 0 : vertical_inset;
|
||||
|
||||
if (menu_config.use_outer_border) {
|
||||
- if (menu_config.use_bubble_border && (corner_radius_ > 0) &&
|
||||
- !menu_controller->IsCombobox()) {
|
||||
+ // Menu controller could be null during context menu being closed.
|
||||
+ bool is_combobox = menu_controller && menu_controller->IsCombobox();
|
||||
+ if (menu_config.use_bubble_border && (corner_radius_ > 0) && !is_combobox) {
|
||||
CreateBubbleBorder();
|
||||
} else {
|
||||
gfx::Insets insets = gfx::Insets::TLBR(vertical_inset, horizontal_inset,
|
||||
@@ -13,10 +13,10 @@ messages in the legacy window handle layer.
|
||||
These conditions are regularly hit with WCO-enabled windows on Windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/legacy_render_widget_host_win.cc b/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
||||
index c7bc52f1b54249e497a7f60e0bf7106d345b5ef6..bea43ee34da9869aec30dec4dc08ffd9d8af25a8 100644
|
||||
index e8636eea56835a3936765f7b1d5a1a88b20288e1..a7829f409a90a871f42c9d0d5fa65bf8f65045f0 100644
|
||||
--- a/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
||||
+++ b/content/browser/renderer_host/legacy_render_widget_host_win.cc
|
||||
@@ -318,12 +318,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,
|
||||
@@ -317,12 +317,12 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,
|
||||
WPARAM w_param,
|
||||
LPARAM l_param,
|
||||
BOOL& handled) {
|
||||
@@ -31,7 +31,7 @@ index c7bc52f1b54249e497a7f60e0bf7106d345b5ef6..bea43ee34da9869aec30dec4dc08ffd9
|
||||
tme.hwndTrack = hwnd();
|
||||
tme.dwHoverTime = 0;
|
||||
TrackMouseEvent(&tme);
|
||||
@@ -354,7 +354,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,
|
||||
@@ -353,7 +353,10 @@ LRESULT LegacyRenderWidgetHostHWND::OnMouseRange(UINT message,
|
||||
// out of the picture.
|
||||
if (!handled &&
|
||||
(message >= WM_NCMOUSEMOVE && message <= WM_NCXBUTTONDBLCLK)) {
|
||||
|
||||
@@ -15,7 +15,7 @@ node does not change in this case.
|
||||
chromium-bug: https://crbug.com/1369605
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
index 8f57ba0f182fa1ae687b628c3b050d58f9ab5426..865dba163fb68ca2ab3bde5b54a0024dc650cde1 100644
|
||||
index f509de422c2eb340b706afa364370e64107a4c84..76fa4ef05837a44632e9a05afea90da7e79d86d2 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
|
||||
@@ -996,6 +996,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
|
||||
@@ -32,7 +32,7 @@ index 8f57ba0f182fa1ae687b628c3b050d58f9ab5426..865dba163fb68ca2ab3bde5b54a0024d
|
||||
if (!text_input_manager_)
|
||||
return ui::TEXT_INPUT_TYPE_NONE;
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
|
||||
index 7935adbe496cacd9b02390439f759186e77ba336..a16bc977a807cf23aff0f1611ffab2fb3bca679f 100644
|
||||
index ed0641b888c6421b1791c086466bd9c158e9109d..3760b3823d5af3325017bb53f5b1d38e6d9091d8 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
|
||||
@@ -181,6 +181,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
|
||||
@@ -45,10 +45,10 @@ index 7935adbe496cacd9b02390439f759186e77ba336..a16bc977a807cf23aff0f1611ffab2fb
|
||||
// RenderFrameMetadataProvider::Observer implementation.
|
||||
void OnRenderFrameMetadataChangedBeforeActivation(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 49dd8a662476adc481b80241086f60517c24dd82..c5aece69290712db5c184e1b449a5d1abff41f9d 100644
|
||||
index 7a7f74778d0d9118d01a2dc8b916fada56a8dfaa..96bd0573473d9f401791125cd18cb24e76fab0db 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -8122,7 +8122,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -8163,7 +8163,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -25,7 +25,7 @@ index 3f6289a9cee6d94349ef30760aad4a2b0a015c25..63b833fb3473f526be21ebe4549e17ee
|
||||
// Returns true if duplex mode is set.
|
||||
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
|
||||
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
|
||||
index 01df1c7ddfeb4a08e9c35e3db2dd54823d8236bb..9b851930d6d1b966f8286e2a309141d545c60277 100644
|
||||
index 2748468ba184dca7befd1a1411dc3a27e2df7175..e1230b5df685a04c60404ff4345c6ec9ef86e98c 100644
|
||||
--- a/printing/printing_context_mac.mm
|
||||
+++ b/printing/printing_context_mac.mm
|
||||
@@ -204,7 +204,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
|
||||
|
||||
@@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
|
||||
for opaque frameless windows even with that block commented out.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index a14b20dd969226d04634ea123601b61a8379c448..1b8be7cda1faadd1cd9db1535337a39e73f329fc 100644
|
||||
index bffa2e1e41f6e61135c6ec3627268d2fbd8783b9..90dd6487fdf438a61672a81f08b545742045944a 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1873,7 +1873,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
@@ -1874,7 +1874,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
|
||||
0);
|
||||
|
||||
|
||||
@@ -20,10 +20,10 @@ index 34777e89362b14587979cef76d8cd71b634cca8c..3d5e44883bab30eebdfaba70f3933435
|
||||
injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
|
||||
}
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index 0fb81902e569ed974c98b33e980546d210765e83..d27cf6d13b26ce8a828e62e3ddf15d082c5874e1 100644
|
||||
index 21b689524b4ee4cab4baf95163c963e725af4226..592cf7fb30ffb93924c29cfb19e4cb6110b607bb 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -436,6 +436,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
|
||||
@@ -442,6 +442,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
|
||||
mojom::EvaluationTiming,
|
||||
mojom::LoadEventBlockingOption,
|
||||
WebScriptExecutionCallback,
|
||||
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 0ea3c6c8b4a718821ea5dd40cb9239114207216d..2c1abfad1538e92ddafbd09ed77beacce859e79d 100644
|
||||
index f91a1af51c01e29ee6ec734eee368e04bf714311..cf73051f87f646d5b5d356bc30946da1c258a384 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -2694,6 +2694,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2774,6 +2774,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -75,7 +75,7 @@ index 0ea3c6c8b4a718821ea5dd40cb9239114207216d..2c1abfad1538e92ddafbd09ed77beacc
|
||||
BackForwardCacheAware back_forward_cache_aware,
|
||||
mojom::blink::WantResultOption want_result_option,
|
||||
mojom::blink::PromiseResultOption promise_behavior) {
|
||||
@@ -2724,7 +2725,8 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -2804,7 +2805,8 @@ void LocalFrame::RequestExecuteScript(
|
||||
PausableScriptExecutor::CreateAndRun(
|
||||
ToScriptState(DomWindow(), *world), std::move(script_sources),
|
||||
execute_script_policy, user_gesture, evaluation_timing, blocking_option,
|
||||
@@ -86,10 +86,10 @@ index 0ea3c6c8b4a718821ea5dd40cb9239114207216d..2c1abfad1538e92ddafbd09ed77beacc
|
||||
|
||||
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
index 0cc1aaee2af66a2b1684d26bd089bb377fbf0995..c29af4b02ccbd0aff36180125dd14abc19346309 100644
|
||||
index bc24bbc46d829946da255a74947dc3e5d4685dd3..c5a02b325dae7beb8ebebca49c93b8aa1d86f212 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.h
|
||||
@@ -787,6 +787,7 @@ class CORE_EXPORT LocalFrame final
|
||||
@@ -800,6 +800,7 @@ class CORE_EXPORT LocalFrame final
|
||||
mojom::blink::EvaluationTiming,
|
||||
mojom::blink::LoadEventBlockingOption,
|
||||
WebScriptExecutionCallback,
|
||||
@@ -98,10 +98,10 @@ index 0cc1aaee2af66a2b1684d26bd089bb377fbf0995..c29af4b02ccbd0aff36180125dd14abc
|
||||
mojom::blink::WantResultOption,
|
||||
mojom::blink::PromiseResultOption);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
index b113185789eeac08b122242a0a41f039d11ce14b..032152d8a352de401d076c95e52d273d81a3030e 100644
|
||||
index 4a40473c167290328b6c2c0e9029c3d7c073fe44..f91e9eaab57aef9c202be8342281fa7d65fcbb8b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
@@ -954,6 +954,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
@@ -935,6 +935,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
std::move(callback).Run(value ? std::move(*value) : base::Value());
|
||||
},
|
||||
std::move(callback)),
|
||||
@@ -205,10 +205,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
|
||||
const mojom::blink::UserActivationOption user_activation_option_;
|
||||
const mojom::blink::LoadEventBlockingOption blocking_option_;
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 63cb39adfb346bdfe6ff06ccbf69dd0ba09adabc..1dc1397dd3e82c72dfa4f5b6deef4ca66f5fa9ce 100644
|
||||
index edd4bff81eddc975bdca36cdbf6b987109b7a9d8..0d22e08fd745e157e90079976f9ac205cbe161c9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -1131,14 +1131,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
@@ -1132,14 +1132,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
|
||||
mojom::blink::EvaluationTiming evaluation_timing,
|
||||
mojom::blink::LoadEventBlockingOption blocking_option,
|
||||
WebScriptExecutionCallback callback,
|
||||
@@ -227,10 +227,10 @@ index 63cb39adfb346bdfe6ff06ccbf69dd0ba09adabc..1dc1397dd3e82c72dfa4f5b6deef4ca6
|
||||
|
||||
v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index 56f09dfb61b3331120dbb150c71d09b613a3a43f..a8699af3b32aa4779b549b854d82e11483a47301 100644
|
||||
index 62106bbc17f85d6f24132d27dad7f7177df83762..4811bd8be40f5878af9321281a121934beda47be 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -195,6 +195,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
mojom::blink::EvaluationTiming,
|
||||
mojom::blink::LoadEventBlockingOption,
|
||||
WebScriptExecutionCallback,
|
||||
|
||||
@@ -0,0 +1,182 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <marshallofsound@electronjs.org>
|
||||
Date: Mon, 26 Jun 2023 00:50:45 -0700
|
||||
Subject: fix: select the first menu item when opened via keyboard
|
||||
|
||||
This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
|
||||
|
||||
diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
|
||||
index f8b3ded1dba82259f7d536ed5bab1a972d182419..b095843c8b28783bf51c0bf7becb111010651486 100644
|
||||
--- a/ui/views/controls/menu/menu_controller.cc
|
||||
+++ b/ui/views/controls/menu/menu_controller.cc
|
||||
@@ -563,6 +563,7 @@ void MenuController::Run(Widget* parent,
|
||||
MenuAnchorPosition position,
|
||||
bool context_menu,
|
||||
bool is_nested_drag,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures) {
|
||||
exit_type_ = ExitType::kNone;
|
||||
possible_drag_ = false;
|
||||
@@ -627,6 +628,14 @@ void MenuController::Run(Widget* parent,
|
||||
// Set the selection, which opens the initial menu.
|
||||
SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
|
||||
|
||||
+ if (source_type == ui::MENU_SOURCE_KEYBOARD && context_menu && root->HasSubmenu()) {
|
||||
+ // For context menus opened via the keyboard we select the first item by default
|
||||
+ // to match accessibility expectations
|
||||
+ MenuItemView* first_item = FindInitialSelectableMenuItem(root, INCREMENT_SELECTION_DOWN);
|
||||
+ if (first_item)
|
||||
+ SetSelection(first_item, SELECTION_UPDATE_IMMEDIATELY);
|
||||
+ }
|
||||
+
|
||||
if (button_controller) {
|
||||
pressed_lock_ = button_controller->TakeLock(
|
||||
false, ui::LocatedEvent::FromIfValid(event));
|
||||
@@ -2262,19 +2271,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
|
||||
}
|
||||
item->GetSubmenu()->ShowAt(params);
|
||||
|
||||
- // Figure out if the mouse is under the menu; if so, remember the mouse
|
||||
- // location so we can ignore the first mouse move event(s) with that
|
||||
- // location. We do this after `ShowAt` because `ConvertFromScreen` doesn't
|
||||
- // work correctly if the widget isn't shown.
|
||||
+ // Remember the mouse location so we can ignore the first mouse move
|
||||
+ // event(s) with that location. We do this after `ShowAt` because
|
||||
+ // `ConvertFromScreen` doesn't work correctly if the widget isn't shown.
|
||||
if (item->GetSubmenu()->GetWidget()) {
|
||||
const gfx::Point mouse_pos = ConvertFromScreen(
|
||||
*item->submenu_,
|
||||
display::Screen::GetScreen()->GetCursorScreenPoint());
|
||||
- MenuPart part_under_mouse = GetMenuPart(item->submenu_, mouse_pos);
|
||||
- if (part_under_mouse.type != MenuPartType::kNone) {
|
||||
- menu_open_mouse_loc_ =
|
||||
- GetLocationInRootMenu(*item->submenu_, mouse_pos);
|
||||
- }
|
||||
+ menu_open_mouse_loc_ =
|
||||
+ GetLocationInRootMenu(*item->submenu_, mouse_pos);
|
||||
}
|
||||
|
||||
item->GetSubmenu()->GetWidget()->SetNativeWindowProperty(
|
||||
diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
|
||||
index e10b92be74908f8d96e421843cb2231f712a4895..82dc2f014d2e333057836290a00c7142b460bb57 100644
|
||||
--- a/ui/views/controls/menu/menu_controller.h
|
||||
+++ b/ui/views/controls/menu/menu_controller.h
|
||||
@@ -134,6 +134,7 @@ class VIEWS_EXPORT MenuController
|
||||
MenuAnchorPosition position,
|
||||
bool context_menu,
|
||||
bool is_nested_drag,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures = gfx::NativeView());
|
||||
|
||||
bool for_drop() const { return for_drop_; }
|
||||
diff --git a/ui/views/controls/menu/menu_runner.cc b/ui/views/controls/menu/menu_runner.cc
|
||||
index adb22671b94fa16854773baad0e6bff1322c6646..fae32722f1209151fa1da59d0c7892aba8956108 100644
|
||||
--- a/ui/views/controls/menu/menu_runner.cc
|
||||
+++ b/ui/views/controls/menu/menu_runner.cc
|
||||
@@ -82,7 +82,7 @@ void MenuRunner::RunMenuAt(Widget* parent,
|
||||
}
|
||||
|
||||
impl_->RunMenuAt(parent, button_controller, bounds, anchor, run_types_,
|
||||
- native_view_for_gestures, corners);
|
||||
+ source_type, native_view_for_gestures, corners);
|
||||
}
|
||||
|
||||
bool MenuRunner::IsRunning() const {
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl.cc b/ui/views/controls/menu/menu_runner_impl.cc
|
||||
index c2513d2889a2baabb1464a53b6b0a32176d52d0c..54f4f863d9ecdf22e3087944f773a866e6c50024 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl.cc
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl.cc
|
||||
@@ -116,6 +116,7 @@ void MenuRunnerImpl::RunMenuAt(Widget* parent,
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t run_types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners) {
|
||||
closing_event_time_ = base::TimeTicks();
|
||||
@@ -184,7 +185,7 @@ void MenuRunnerImpl::RunMenuAt(Widget* parent,
|
||||
controller->Run(parent, button_controller, menu_, bounds, anchor,
|
||||
(run_types & MenuRunner::CONTEXT_MENU) != 0,
|
||||
(run_types & MenuRunner::NESTED_DRAG) != 0,
|
||||
- native_view_for_gestures);
|
||||
+ source_type, native_view_for_gestures);
|
||||
}
|
||||
|
||||
void MenuRunnerImpl::Cancel() {
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl.h b/ui/views/controls/menu/menu_runner_impl.h
|
||||
index 4d2909b5094ab2a4af63504ac0b9f905b5b17759..c49038f592ab1f219ba8b902b69ec7b320e1f74d 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl.h
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl.h
|
||||
@@ -52,6 +52,7 @@ class VIEWS_EXPORT MenuRunnerImpl : public MenuRunnerImplInterface,
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t run_types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
|
||||
void Cancel() override;
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.cc b/ui/views/controls/menu/menu_runner_impl_adapter.cc
|
||||
index b6c680063889bb997814cd1be45dfbe5f0989f74..dec5f4b2d609aa7b0cec0f16cc89e222bf9d7b85 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl_adapter.cc
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl_adapter.cc
|
||||
@@ -33,10 +33,11 @@ void MenuRunnerImplAdapter::RunMenuAt(
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners) {
|
||||
impl_->RunMenuAt(parent, button_controller, bounds, anchor, types,
|
||||
- native_view_for_gestures);
|
||||
+ source_type, native_view_for_gestures);
|
||||
}
|
||||
|
||||
void MenuRunnerImplAdapter::Cancel() {
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl_adapter.h b/ui/views/controls/menu/menu_runner_impl_adapter.h
|
||||
index e6587d2208a13576af1831b94724a6286f0e0607..91223ef3f099e20aee5cf1d685c45d2c7f53628e 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl_adapter.h
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl_adapter.h
|
||||
@@ -43,6 +43,7 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface {
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
|
||||
void Cancel() override;
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.h b/ui/views/controls/menu/menu_runner_impl_cocoa.h
|
||||
index 50291eb07440a35173410336927490f44aae604b..febdb941ff72f7e8e9cc9b36e04c35b0f4c0227d 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.h
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.h
|
||||
@@ -42,6 +42,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t run_types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
|
||||
void Cancel() override;
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
|
||||
index 46a50f5a808c3bda24f44c1ce3a9944327f22fa4..0bfdf45ed43b0701d927940ca78be765b9184b4f 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
|
||||
@@ -192,6 +192,7 @@
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t run_types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners) {
|
||||
DCHECK(!IsRunning());
|
||||
diff --git a/ui/views/controls/menu/menu_runner_impl_interface.h b/ui/views/controls/menu/menu_runner_impl_interface.h
|
||||
index cf696fbcf071455007422b95608485c358d8a2b8..b18a6f9b1b4858af0fcb65d1a2e36ba2596e9726 100644
|
||||
--- a/ui/views/controls/menu/menu_runner_impl_interface.h
|
||||
+++ b/ui/views/controls/menu/menu_runner_impl_interface.h
|
||||
@@ -45,6 +45,7 @@ class MenuRunnerImplInterface {
|
||||
const gfx::Rect& bounds,
|
||||
MenuAnchorPosition anchor,
|
||||
int32_t run_types,
|
||||
+ ui::MenuSourceType source_type,
|
||||
gfx::NativeView native_view_for_gestures,
|
||||
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) = 0;
|
||||
|
||||
@@ -39,7 +39,7 @@ index e7e710d58e2bdf1f0bc042f479add048f3aa1ffb..dc0d69a726f389e4925001fc2c817fe0
|
||||
dbus::MethodCall* method_call,
|
||||
dbus::ExportedObject::ResponseSender sender) {
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
index 1b0ffb4b1582f63bb13800f2f03bb4506988e8ff..b4498415faa5ecb1dc9e058fedde4dc03a300250 100644
|
||||
index 2c0df96d2840e6198604041fe1e1b63c89251208..09df6bb9fab6cffbab6302a04b7343b75568cdc3 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h
|
||||
@@ -71,10 +71,16 @@ class StatusIconLinuxDbus : public ui::StatusIconLinux,
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Athul Iddya <athul@iddya.com>
|
||||
Date: Fri, 14 Jul 2023 08:03:37 -0700
|
||||
Subject: fix: use delegated generic capturer when available
|
||||
|
||||
When the generic capturer is used to fetch capture sources, the returned
|
||||
ID will be arbitrarily prefixed with "screen" or "window" regardless of
|
||||
the source type. If the window capturer is used to stream video when the
|
||||
source was a screen or vice-versa, the stream fails to restart in
|
||||
delegated capturers like PipeWire.
|
||||
|
||||
To fix this, use the generic capturer to fetch the media stream if it's
|
||||
delegated and available. This does not cause any issues if the original
|
||||
capturer was window or screen-specific, as the IDs remain valid for
|
||||
generic capturer as well.
|
||||
|
||||
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
|
||||
index 27687ee9f362c708af3e45d61effb20cebb413ae..ac97925378aa3872c7dc55e6184866be855f7a6b 100644
|
||||
--- a/content/browser/media/capture/desktop_capture_device.cc
|
||||
+++ b/content/browser/media/capture/desktop_capture_device.cc
|
||||
@@ -789,8 +789,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
DesktopCapturerLacros::CaptureType::kScreen,
|
||||
webrtc::DesktopCaptureOptions());
|
||||
#else
|
||||
- std::unique_ptr<webrtc::DesktopCapturer> screen_capturer(
|
||||
- webrtc::DesktopCapturer::CreateScreenCapturer(options));
|
||||
+ std::unique_ptr<webrtc::DesktopCapturer> screen_capturer;
|
||||
+ if (auto generic_capturer =
|
||||
+ webrtc::DesktopCapturer::CreateGenericCapturer(options);
|
||||
+ generic_capturer && generic_capturer->GetDelegatedSourceListController()) {
|
||||
+ screen_capturer = std::move(generic_capturer);
|
||||
+ } else {
|
||||
+ screen_capturer = webrtc::DesktopCapturer::CreateScreenCapturer(options);
|
||||
+ }
|
||||
#endif
|
||||
if (screen_capturer && screen_capturer->SelectSource(source.id)) {
|
||||
capturer = std::make_unique<webrtc::DesktopAndCursorComposer>(
|
||||
@@ -809,8 +815,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
|
||||
new DesktopCapturerLacros(DesktopCapturerLacros::CaptureType::kWindow,
|
||||
webrtc::DesktopCaptureOptions()));
|
||||
#else
|
||||
- std::unique_ptr<webrtc::DesktopCapturer> window_capturer =
|
||||
- webrtc::DesktopCapturer::CreateWindowCapturer(options);
|
||||
+ std::unique_ptr<webrtc::DesktopCapturer> window_capturer;
|
||||
+ if (auto generic_capturer =
|
||||
+ webrtc::DesktopCapturer::CreateGenericCapturer(options);
|
||||
+ generic_capturer && generic_capturer->GetDelegatedSourceListController()) {
|
||||
+ window_capturer = std::move(generic_capturer);
|
||||
+ } else {
|
||||
+ window_capturer = webrtc::DesktopCapturer::CreateWindowCapturer(options);
|
||||
+ }
|
||||
#endif
|
||||
if (window_capturer && window_capturer->SelectSource(source.id)) {
|
||||
capturer = std::make_unique<webrtc::DesktopAndCursorComposer>(
|
||||
@@ -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 d9a57f3119f94051097472d8b8560106ce527e5d..39a00533445347b2247471848d9a6e84cebc864c 100644
|
||||
index 02c8f132c266a599c335f83474b3322700a0e5d1..19f731476a2a2beacef7c4493a586c4a6cd69dd0 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -3958,6 +3958,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3984,6 +3984,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index d9a57f3119f94051097472d8b8560106ce527e5d..39a00533445347b2247471848d9a6e84
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 624ca55fd047d68d456be85f8bc45de57c452f67..9ec568626e355be8c800e6beebc4c008b041a09a 100644
|
||||
index 044a426f4dab1b60b035e4f383b6c468446afc74..85f5c4d124dc8e5c4b8394eee5fc689a698be856 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -303,6 +303,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -305,6 +305,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ index 10caab6d9ef3345332c163a55dcef991248ab4ea..c9bc6e5dd7e1cf8d198afcd21cbb2497
|
||||
// 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 ba3ab6adff0db46c8a1fca2e1bf3b3cb4a41fbdd..0d56182a284b91e7bf5749dbf0796cbe705d2c1f 100644
|
||||
index 45da70dd0d164bd5be17ef4e3731f2a3c597571f..4c2a4783f894c2dc62d87dfc51e2ebb8a0b51b2e 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -402,7 +402,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
@@ -420,7 +420,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
|
||||
// static
|
||||
void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
const std::string js_command_line_flags,
|
||||
@@ -51,7 +51,7 @@ index ba3ab6adff0db46c8a1fca2e1bf3b3cb4a41fbdd..0d56182a284b91e7bf5749dbf0796cbe
|
||||
static bool v8_is_initialized = false;
|
||||
if (v8_is_initialized)
|
||||
return;
|
||||
@@ -412,7 +413,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
@@ -430,7 +431,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
|
||||
// See https://crbug.com/v8/11043
|
||||
SetFlags(mode, js_command_line_flags);
|
||||
|
||||
|
||||
@@ -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 a7bdccf0ab714763164f42b3e97aeaf1e51098de..fa48ef30f1f39c40618523d2d3ed931c58ccd747 100644
|
||||
index a34293da9026018a3e733ed58e4eabde666c0198..caf6fbc8b80f6fa0d767e698265b589838cdab35 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1165,6 +1165,11 @@
|
||||
@@ -1185,6 +1185,11 @@
|
||||
"includes": [7440],
|
||||
},
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ index 355067ea178bee1466f9df5a3ed146e9f09f0768..1b385d12692deece9e10722fc70215e8
|
||||
# on GTK.
|
||||
"//examples:peerconnection_client",
|
||||
diff --git a/ui/ozone/platform/x11/BUILD.gn b/ui/ozone/platform/x11/BUILD.gn
|
||||
index e537f1eb15458a7abfd68169c00215776325e2b9..efe6a94b36b49c79dcefc77ef4289592287ff57f 100644
|
||||
index 76f399cd766add88d96499dd1c15ae841a2273da..bd0382b148fdadafcfb32a26fc3ddbfa265fa512 100644
|
||||
--- a/ui/ozone/platform/x11/BUILD.gn
|
||||
+++ b/ui/ozone/platform/x11/BUILD.gn
|
||||
@@ -6,7 +6,7 @@ import("//build/config/chromeos/ui_mode.gni")
|
||||
|
||||
@@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were
|
||||
replaced with clean ozone native implementations.
|
||||
|
||||
diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
index 807a8f82fd0d6bfd402a5f84b5a9849a0f56f7e9..b351d8d47322d56bb219ad05d19d42c441c4ae0a 100644
|
||||
index bf0365da219530780ec232e477f13ed216e6d5b9..84b137b0bff80f63db58b08d6c97ed5228294e0a 100644
|
||||
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
|
||||
@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
@@ -193,6 +193,7 @@ class OzonePlatformX11 : public OzonePlatform,
|
||||
base::MessagePumpType::UI;
|
||||
properties->supports_vulkan_swap_chain = true;
|
||||
properties->skia_can_fall_back_to_x11 = true;
|
||||
@@ -21,7 +21,7 @@ index 807a8f82fd0d6bfd402a5f84b5a9849a0f56f7e9..b351d8d47322d56bb219ad05d19d42c4
|
||||
properties->supports_global_application_menus = true;
|
||||
properties->app_modal_dialogs_use_event_blocker = true;
|
||||
diff --git a/ui/ozone/public/ozone_platform.h b/ui/ozone/public/ozone_platform.h
|
||||
index f61ffe943680896432cad35d849e6a0ae5042d42..83e842039e821381edb8b4c96a6aabe34c009ea8 100644
|
||||
index dbdf1d99a28beced97636fd558be67a92e0a4793..fd0ac892fc511d2a3b16a46dee45a0bc4aad268d 100644
|
||||
--- a/ui/ozone/public/ozone_platform.h
|
||||
+++ b/ui/ozone/public/ozone_platform.h
|
||||
@@ -121,6 +121,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {
|
||||
|
||||
@@ -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 a068f7a77cbaf6487b1923dd7faa703973443d95..93eac2b049ecfb5a7650e778ea4e243bc1ca5b4d 100644
|
||||
index ab6bc68812e36afba65248d56bd1b7e9e453850a..336705c28ca960d8e7d9af82bb56b009e49bc733 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -279,11 +279,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
@@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {
|
||||
|
||||
bool ShouldLoadV8Snapshot(const base::CommandLine& command_line,
|
||||
const std::string& process_type) {
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 4a7d465c5f5690709eca8aa4ac90e905ab7d199e..30f72b9655e790d864fc7e28983b6a37074448a5 100644
|
||||
index eac90f20353e52ee676302b39ae5cb204c0a9dcb..1c3eb1dbd4417c675d4592cad126a7fe75cd1e3c 100644
|
||||
--- a/ui/display/mac/screen_mac.mm
|
||||
+++ b/ui/display/mac/screen_mac.mm
|
||||
@@ -268,7 +268,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {
|
||||
@@ -25,5 +25,5 @@ index 4a7d465c5f5690709eca8aa4ac90e905ab7d199e..30f72b9655e790d864fc7e28983b6a37
|
||||
display.set_is_monochrome(CGDisplayUsesForceToGray());
|
||||
+#endif
|
||||
|
||||
// Query the display's referesh rate.
|
||||
// Query the display's refresh rate.
|
||||
{
|
||||
|
||||
@@ -14,10 +14,10 @@ Disable usage of the following private APIs in MAS builds:
|
||||
* AudioDeviceDuck
|
||||
|
||||
diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm
|
||||
index 91a65a1e700cf1accb8e4541e0ceca4e0a734b16..323b9b48214aa013ad8f7da2f63cca2ee3295d68 100644
|
||||
index 32837d4ef4fddecf510c8681bc9bdb65f06cdbe6..6eac43311d31a5c71e07b74c8a9fbbbf46466eeb 100644
|
||||
--- a/base/enterprise_util_mac.mm
|
||||
+++ b/base/enterprise_util_mac.mm
|
||||
@@ -189,6 +189,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() {
|
||||
@@ -193,6 +193,13 @@ MacDeviceManagementStateNew IsDeviceRegisteredWithManagementNew() {
|
||||
DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
static DeviceUserDomainJoinState state = [] {
|
||||
DeviceUserDomainJoinState state{false, false};
|
||||
@@ -31,7 +31,7 @@ index 91a65a1e700cf1accb8e4541e0ceca4e0a734b16..323b9b48214aa013ad8f7da2f63cca2e
|
||||
|
||||
@autoreleasepool {
|
||||
ODSession* session = [ODSession defaultSession];
|
||||
@@ -295,5 +302,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
@@ -299,5 +306,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
|
||||
|
||||
return state;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ index de77363ffcb89e0b8c7b7033d973b89eb0dd28ae..fc02c33ccd023c366c73a21b87711a61
|
||||
if (__builtin_available(macOS 10.14, *)) {
|
||||
DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
|
||||
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
index 0b52fe6bd877347ac79a780aefc3c5c4b382f80e..5313bf169fdd6f86433db0fefe704f52011da861 100644
|
||||
index 6e73be2bd964aa8cf743c1ae01ce8e188dbcac8e..58a7eb1e982a90d6197579ffdb9545340356a65c 100644
|
||||
--- a/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
|
||||
@@ -31,19 +31,23 @@
|
||||
|
||||
@@ -44,10 +44,10 @@ index 88e4b9b878b59014dc3c4e875eb2acb1b72e7559..b5bdb96a05ab084166d64d4ca69ff917
|
||||
|
||||
} // 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 8e858bb088a49d9c8863a929f5698368dfe84ecf..2981ff2781093fea50c82cd4214c1fbb15dea9b7 100644
|
||||
index f31f2245a586079d5125a514e05e41e6cee478a2..16b9132250a2850a5c09cc4268c7ce9f400f158e 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
|
||||
@@ -572,10 +572,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -571,10 +571,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
// this should be treated as an error and caught early.
|
||||
CHECK(bridged_view_);
|
||||
|
||||
@@ -133,7 +133,7 @@ index 3a81bbe5542f39c82f6ccf6643f491cb73ecb2aa..6b156ac4c514855f73fedc85fb9b0080
|
||||
return false;
|
||||
}
|
||||
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 efca18c2a229b5d5afdcf5ac9c3057e0294bedd3..7a589e826f5c221259ac82ddfeba5985feb39d00 100644
|
||||
index 5fb7f2af49a3bd505840d2c118dfee9abf808c24..3f86c68811a90890255c7ac88bb251da60b40fdb 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
|
||||
@@ -51,7 +51,9 @@ class ScopedPasswordInputEnabler;
|
||||
@@ -146,7 +146,7 @@ index efca18c2a229b5d5afdcf5ac9c3057e0294bedd3..7a589e826f5c221259ac82ddfeba5985
|
||||
@class RenderWidgetHostViewCocoa;
|
||||
|
||||
namespace content {
|
||||
@@ -664,10 +666,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
@@ -666,10 +668,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
|
||||
// EnsureSurfaceSynchronizedForWebTest().
|
||||
uint32_t latest_capture_sequence_number_ = 0u;
|
||||
|
||||
@@ -160,7 +160,7 @@ index efca18c2a229b5d5afdcf5ac9c3057e0294bedd3..7a589e826f5c221259ac82ddfeba5985
|
||||
// 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 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844bfda6e31b 100644
|
||||
index b436ccf7a4ee0271d6f15226b9f195b5ffb6b24b..4dce73888703a5db8fe7ae2a0e0745ee813ab9b0 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -255,8 +255,10 @@
|
||||
@@ -174,7 +174,7 @@ index 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844b
|
||||
|
||||
// Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
|
||||
// pointers. `ns_view_` gets reinitialized later in this method.
|
||||
@@ -1568,8 +1570,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1572,8 +1574,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -185,7 +185,7 @@ index 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844b
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1613,9 +1617,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1617,9 +1621,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -197,7 +197,7 @@ index 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844b
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -2117,6 +2123,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2121,6 +2127,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
@@ -205,7 +205,7 @@ index 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844b
|
||||
if (window_token.empty()) {
|
||||
remote_window_accessible_.reset();
|
||||
} else {
|
||||
@@ -2124,6 +2131,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -2128,6 +2135,7 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token),
|
||||
base::scoped_policy::RETAIN);
|
||||
}
|
||||
@@ -214,7 +214,7 @@ index 1ae5b54369158da65d552f3c848e0f3c805b0f5c..e15e6b3e145aecfddd1ce20fdd6c844b
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 1876224cb6c51636b67d3bd5493ee34973f2af5f..260725d466d890dfec29d423700510f55caa7a52 100644
|
||||
index f85c1f22203a7f8a9dd7e7844ab022ed5efc2dc1..e6a0ca42d0fa2446b300714372986da7e2013f16 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -372,6 +372,13 @@ component("base") {
|
||||
|
||||
@@ -103,18 +103,18 @@ index 55ef23bac1acd703d4e29a4418d85676f8b56be3..42bd5787bfc77dac3e309f1075325368
|
||||
}
|
||||
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index 2c5387fbdcac4b33df770fcd37b050121d0b9b38..a4c2867b4bb6c2c2dcd6565873ccccd940712449 100644
|
||||
index 79bf09102ab4ca9b0a5830132d98b7bd844b1c26..e2b20c0cda169d7b4af5c05b8797188955df8e3c 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -37,6 +37,7 @@
|
||||
#include "device/bluetooth/bluetooth_socket_mac.h"
|
||||
#include "device/bluetooth/public/cpp/bluetooth_address.h"
|
||||
@@ -41,6 +41,7 @@
|
||||
#error "This file requires ARC support."
|
||||
#endif
|
||||
|
||||
+#if !IS_MAS_BUILD()
|
||||
extern "C" {
|
||||
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
|
||||
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
|
||||
@@ -50,6 +51,7 @@
|
||||
@@ -54,6 +55,7 @@
|
||||
// [4] https://support.apple.com/kb/PH25091
|
||||
void IOBluetoothPreferenceSetControllerPowerState(int state);
|
||||
}
|
||||
@@ -122,7 +122,7 @@ index 2c5387fbdcac4b33df770fcd37b050121d0b9b38..a4c2867b4bb6c2c2dcd6565873ccccd9
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -93,8 +95,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
@@ -97,8 +99,10 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
: controller_state_function_(
|
||||
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
||||
base::Unretained(this))),
|
||||
@@ -133,7 +133,7 @@ index 2c5387fbdcac4b33df770fcd37b050121d0b9b38..a4c2867b4bb6c2c2dcd6565873ccccd9
|
||||
classic_discovery_manager_(
|
||||
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
||||
device_paired_status_callback_(
|
||||
@@ -249,8 +253,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
@@ -253,8 +257,12 @@ bool IsDeviceSystemPaired(const std::string& device_address) {
|
||||
}
|
||||
|
||||
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
||||
|
||||
@@ -7,10 +7,10 @@ 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 6b9e093367cad7531f1880d5e05641605dc94c62..f2ae2092be6042f48d50f690581dccff8a3e2566 100644
|
||||
index d553d31e90ca7f3ea9a540d0eda7aaa6801f007b..0ffa0ec042bd59de5d28fad53dee2b6321d64b18 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -141,6 +141,11 @@
|
||||
@@ -142,6 +142,11 @@
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ index 6b9e093367cad7531f1880d5e05641605dc94c62..f2ae2092be6042f48d50f690581dccff
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
|
||||
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
|
||||
@@ -433,6 +438,99 @@ bool GetFullDataFilePath(
|
||||
@@ -434,6 +439,99 @@ bool GetFullDataFilePath(
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -122,7 +122,7 @@ index 6b9e093367cad7531f1880d5e05641605dc94c62..f2ae2092be6042f48d50f690581dccff
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -753,6 +851,13 @@ void NetworkContext::SetClient(
|
||||
@@ -756,6 +854,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ index 6b9e093367cad7531f1880d5e05641605dc94c62..f2ae2092be6042f48d50f690581dccff
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -2286,6 +2391,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -2289,6 +2394,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -147,7 +147,7 @@ index 6b9e093367cad7531f1880d5e05641605dc94c62..f2ae2092be6042f48d50f690581dccff
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index a2b8eaf4db85b2969a09cba5f12cbc642b677213..f3a89933fef78c62e4c67fcfd521c8413c32e38f 100644
|
||||
index 9cac607573e5411c6dd8c2a6309ae78c2a1784f4..f10414f382b48ecc162b22d9638d948e3e719733 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -114,6 +114,7 @@ class URLMatcher;
|
||||
|
||||
@@ -7,10 +7,10 @@ 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 aa9ce8fa016317d543752462f356ccdef6b931eb..71fc184b94286803300c396fe4845e5f17911f55 100644
|
||||
index f2ef4881ffacd2f76bffdcca774de614ad1fc593..c78571b85e7d76f8d0e9258cf1a5f1eb0474632e 100644
|
||||
--- a/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc
|
||||
@@ -200,6 +200,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
@@ -201,6 +201,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
|
||||
|
||||
// TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close)
|
||||
void PlatformNotificationServiceImpl::DisplayNotification(
|
||||
@@ -133,10 +133,10 @@ index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index d0814b812f4880cd5577a0b95cbc406ae0147f95..17415e1009465f44b606236cd6e525e612d6ebe9 100644
|
||||
index 15dc38f75fd7f967bbc045c9b53b2d1f3d896ff9..2d77f10cfed48e316d4026eb57c085dc6c922f68 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2178,7 +2178,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2220,7 +2220,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index d0814b812f4880cd5577a0b95cbc406ae0147f95..17415e1009465f44b606236cd6e525e6
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2186,7 +2186,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2228,7 +2228,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -8,10 +8,10 @@ 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 c5a7e77448422e934bd302016e9d53efc244ebbe..6ae95574acf18bc7679eb401d753f027d4c6355d 100644
|
||||
index 713dacb89ef7770449383cb8c5c83e679741a78d..0eaef82b4416e3fd4b51c71a544adb328084be39 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -364,6 +364,10 @@
|
||||
@@ -371,6 +371,10 @@
|
||||
E_CPONLY(kColorScrollbarThumbInactive) \
|
||||
E_CPONLY(kColorScrollbarThumbPressed) \
|
||||
E_CPONLY(kColorScrollbarTrack) \
|
||||
@@ -22,7 +22,7 @@ index c5a7e77448422e934bd302016e9d53efc244ebbe..6ae95574acf18bc7679eb401d753f027
|
||||
E_CPONLY(kColorSegmentedButtonBorder) \
|
||||
E_CPONLY(kColorSegmentedButtonFocus) \
|
||||
E_CPONLY(kColorSegmentedButtonForegroundChecked) \
|
||||
@@ -451,6 +455,7 @@
|
||||
@@ -458,6 +462,7 @@
|
||||
E_CPONLY(kColorTreeNodeForeground) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: henrika <henrika@chromium.org>
|
||||
Date: Thu, 22 Jun 2023 18:32:32 +0000
|
||||
Subject: Potential fix for flaky DesktopCaptureApiTest.Delegation unittest
|
||||
|
||||
Bug: 1457052
|
||||
Change-Id: I0b53347eafb60106a250d4fa1ca74a3c6862822e
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4632824
|
||||
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
|
||||
Commit-Queue: Henrik Andreasson <henrika@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1161343}
|
||||
|
||||
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
|
||||
index ef10371aa95ce930956975171077cccb6567e614..27687ee9f362c708af3e45d61effb20cebb413ae 100644
|
||||
--- a/content/browser/media/capture/desktop_capture_device.cc
|
||||
+++ b/content/browser/media/capture/desktop_capture_device.cc
|
||||
@@ -159,7 +159,7 @@ class ScopedHighResolutionTimer {
|
||||
}
|
||||
|
||||
private:
|
||||
- bool enabled_;
|
||||
+ bool enabled_ = false;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -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/BUILD.gn b/BUILD.gn
|
||||
index 48647e655b7b508117ea4373572cbab283d62e0e..e943d5ad0f0ebd720315d8913dd19589999407f5 100644
|
||||
index 9298bc0945ff258f295bb08849091036d15cadf1..67adb3fe09844e5dcaa8bbd1a9071d13366357ec 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -968,7 +968,6 @@ if (is_win) {
|
||||
@@ -971,7 +971,6 @@ if (is_win) {
|
||||
"//media:media_unittests",
|
||||
"//media/midi:midi_unittests",
|
||||
"//net:net_unittests",
|
||||
@@ -22,7 +22,7 @@ index 48647e655b7b508117ea4373572cbab283d62e0e..e943d5ad0f0ebd720315d8913dd19589
|
||||
"//sql:sql_unittests",
|
||||
"//third_party/breakpad:symupload($host_toolchain)",
|
||||
"//ui/base:ui_base_unittests",
|
||||
@@ -977,6 +976,10 @@ if (is_win) {
|
||||
@@ -980,6 +979,10 @@ if (is_win) {
|
||||
"//ui/views:views_unittests",
|
||||
"//url:url_unittests",
|
||||
]
|
||||
@@ -91,7 +91,7 @@ index 3a66a52b8d3c6da9cd8d7e9afdc8d59f528ec3d5..facaa6fbca8ee7c04f83607e62b81b95
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b93536b9d 100644
|
||||
index c976fb2a814e4ff09650982034371e40d1ab77bc..3ef781934426efd662db583492ffdef43b693b0c 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
@@ -187,7 +187,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -199,7 +222,10 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
@@ -199,12 +222,20 @@ void PrintViewManagerBase::DisableThirdPartyBlocking() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
|
||||
@@ -196,13 +196,10 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
+ bool silent,
|
||||
+ 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
|
||||
// `DisconnectFromCurrentPrintJob()`.
|
||||
@@ -227,7 +253,12 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
#endif
|
||||
if (!StartPrintCommon(rfh)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
+#if 0
|
||||
CompletePrintNow(rfh);
|
||||
+#endif
|
||||
@@ -212,7 +209,43 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -451,7 +482,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -313,12 +344,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
|
||||
}
|
||||
PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
|
||||
<< print_settings->requested_media().vendor_id;
|
||||
- CompleteUpdatePrintSettings(std::move(job_settings),
|
||||
+ CompleteUpdatePrintSettings(nullptr /* printer_query */, std::move(job_settings),
|
||||
std::move(print_settings), std::move(callback));
|
||||
}
|
||||
#endif
|
||||
|
||||
void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
+ std::unique_ptr<PrinterQuery> printer_query,
|
||||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
@@ -326,7 +358,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
settings->pages = GetPageRangesFromJobSettings(job_settings);
|
||||
settings->params = mojom::PrintParams::New();
|
||||
RenderParamsFromPrintSettings(*print_settings, settings->params.get());
|
||||
- settings->params->document_cookie = PrintSettings::NewCookie();
|
||||
+ settings->params->document_cookie = printer_query ? printer_query->cookie()
|
||||
+ : PrintSettings::NewCookie();
|
||||
if (!PrintMsgPrintParamsIsValid(*settings->params)) {
|
||||
mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
|
||||
*job_settings.FindInt(kSettingPrinterType));
|
||||
@@ -338,6 +371,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (printer_query && printer_query->cookie() && printer_query->settings().dpi()) {
|
||||
+ queue_->QueuePrinterQuery(std::move(printer_query));
|
||||
+ }
|
||||
+
|
||||
set_cookie(settings->params->document_cookie);
|
||||
std::move(callback).Run(std::move(settings));
|
||||
}
|
||||
@@ -441,7 +478,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -222,7 +255,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -466,12 +498,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -456,12 +494,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -240,7 +273,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
}
|
||||
|
||||
@@ -607,10 +642,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -598,10 +639,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -253,7 +286,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
@@ -661,10 +698,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -652,10 +695,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -266,7 +299,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
|
||||
absl::optional<int> printer_type_value =
|
||||
job_settings.FindInt(kSettingPrinterType);
|
||||
@@ -675,6 +714,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -666,6 +711,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
|
||||
mojom::PrinterType printer_type =
|
||||
static_cast<mojom::PrinterType>(*printer_type_value);
|
||||
@@ -274,7 +307,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
if (printer_type != mojom::PrinterType::kExtension &&
|
||||
printer_type != mojom::PrinterType::kPdf &&
|
||||
printer_type != mojom::PrinterType::kLocal) {
|
||||
@@ -694,6 +734,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -685,6 +731,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
@@ -282,7 +315,38 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -743,7 +784,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -704,7 +751,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
}
|
||||
|
||||
-#if BUILDFLAG(IS_WIN)
|
||||
+ std::unique_ptr<PrinterQuery> query =
|
||||
+ queue_->CreatePrinterQuery(GetCurrentTargetFrame()->GetGlobalId());
|
||||
+ auto* query_ptr = query.get();
|
||||
+ // We need to clone this before calling SetSettings because some environments
|
||||
+ // evaluate job_settings.Clone() first, and some std::move(job_settings) first,
|
||||
+ // for the former things work correctly but for the latter the cloned value is null.
|
||||
+ auto job_settings_copy = job_settings.Clone();
|
||||
+ query_ptr->SetSettings(
|
||||
+ std::move(job_settings_copy),
|
||||
+ base::BindOnce(&PrintViewManagerBase::CompleteUpdatePrintSettings,
|
||||
+ weak_ptr_factory_.GetWeakPtr(), std::move(query),
|
||||
+ std::move(job_settings), std::move(print_settings),
|
||||
+ std::move(callback)));
|
||||
+
|
||||
+#if 0 // See https://chromium-review.googlesource.com/412367
|
||||
// TODO(crbug.com/1424368): Remove this if the printable areas can be made
|
||||
// fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
|
||||
// for in-browser queries.
|
||||
@@ -726,15 +787,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
}
|
||||
#endif
|
||||
|
||||
- CompleteUpdatePrintSettings(std::move(job_settings),
|
||||
- std::move(print_settings), std::move(callback));
|
||||
}
|
||||
#endif // BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -291,7 +355,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -759,14 +800,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -750,14 +809,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
|
||||
@@ -308,7 +372,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -801,6 +842,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -792,6 +851,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
@@ -316,7 +380,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
// `PrintingFailed()` can occur because asynchronous compositing results
|
||||
// don't complete until after a print job has already failed and been
|
||||
// destroyed. In such cases the error notification to the user will
|
||||
@@ -810,7 +852,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -801,7 +861,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
@@ -325,8 +389,8 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -822,15 +864,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
observers_.RemoveObserver(&observer);
|
||||
@@ -813,15 +873,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
|
||||
test_observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
+void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
@@ -350,7 +414,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -882,7 +933,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -873,7 +942,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
// Printing is done, we don't need it anymore.
|
||||
// print_job_->is_job_pending() may still be true, depending on the order
|
||||
// of object registration.
|
||||
@@ -364,7 +428,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -891,9 +947,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -882,9 +956,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
@@ -376,7 +440,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -903,7 +960,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -894,7 +969,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
@@ -385,7 +449,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -951,7 +1008,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -942,7 +1017,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -397,7 +461,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -972,7 +1032,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -963,7 +1041,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
@@ -406,7 +470,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1034,6 +1094,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1031,6 +1109,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -418,7 +482,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -1041,7 +1106,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1038,7 +1121,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
@@ -427,7 +491,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1083,7 +1148,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1080,7 +1163,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -436,17 +500,17 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1191,7 +1256,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
@@ -1224,7 +1307,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
- GetPrintRenderFrame(rfh)->PrintRequestedPages();
|
||||
+ GetPrintRenderFrame(rfh)->PrintRequestedPages(/*silent=*/true, /*job_settings=*/base::Value::Dict());
|
||||
|
||||
for (auto& observer : GetObservers())
|
||||
for (auto& observer : GetTestObservers()) {
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -1239,7 +1304,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
bool allowed) {
|
||||
@@ -1274,7 +1357,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
set_analyzing_content(/*analyzing*/ false);
|
||||
if (!allowed || !printing_rfh_ || IsCrashed() ||
|
||||
!printing_rfh_->IsRenderFrameLive()) {
|
||||
- std::move(callback).Run(nullptr);
|
||||
@@ -455,7 +519,7 @@ index d7a3961a5c79e4d4f9f0fc5fbd6f1c55ab65ca9d..45c3bd7ef13be525ea6fbc2610513a0b
|
||||
}
|
||||
CompleteScriptedPrint(printing_rfh_, std::move(params), std::move(callback));
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 0b07b29da7df2595270391aed19e6eecd53b9f02..a5fb7fb6aac719df0dfed116daf798314a07b244 100644
|
||||
index 4ae11ba1c9cabb659910271c1ef20ff08a67df67..bbc77212abe5e73b58605058d7a3c49cfa1c003f 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -47,6 +47,8 @@ namespace printing {
|
||||
@@ -477,9 +541,9 @@ index 0b07b29da7df2595270391aed19e6eecd53b9f02..a5fb7fb6aac719df0dfed116daf79831
|
||||
+ base::Value::Dict settings = {},
|
||||
+ CompletionCallback callback = {});
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in `print_data` with settings specified in
|
||||
@@ -132,8 +137,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Like PrintNow(), but for the node under the context menu, instead of the
|
||||
// entire frame.
|
||||
@@ -136,8 +141,10 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void IsPrintingEnabled(IsPrintingEnabledCallback callback) override;
|
||||
void ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
ScriptedPrintCallback callback) override;
|
||||
@@ -490,9 +554,9 @@ index 0b07b29da7df2595270391aed19e6eecd53b9f02..a5fb7fb6aac719df0dfed116daf79831
|
||||
|
||||
// Adds and removes observers for `PrintViewManagerBase` events. The order in
|
||||
// which notifications are sent to observers is undefined. Observers must be
|
||||
@@ -141,6 +148,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void AddObserver(Observer& observer);
|
||||
void RemoveObserver(Observer& observer);
|
||||
@@ -145,6 +152,14 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
void AddTestObserver(TestObserver& observer);
|
||||
void RemoveTestObserver(TestObserver& observer);
|
||||
|
||||
+ enum class PrintStatus {
|
||||
+ kSucceeded,
|
||||
@@ -505,7 +569,15 @@ index 0b07b29da7df2595270391aed19e6eecd53b9f02..a5fb7fb6aac719df0dfed116daf79831
|
||||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -291,7 +306,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -272,6 +287,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
bool success);
|
||||
#endif
|
||||
void CompleteUpdatePrintSettings(
|
||||
+ std::unique_ptr<PrinterQuery> printer_query,
|
||||
base::Value::Dict job_settings,
|
||||
std::unique_ptr<PrintSettings> print_settings,
|
||||
UpdatePrintSettingsCallback callback);
|
||||
@@ -301,7 +317,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Runs `callback` with `params` to reply to ScriptedPrint().
|
||||
void ScriptedPrintReply(ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -515,7 +587,7 @@ index 0b07b29da7df2595270391aed19e6eecd53b9f02..a5fb7fb6aac719df0dfed116daf79831
|
||||
|
||||
// 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
|
||||
@@ -361,8 +377,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -371,8 +388,11 @@ 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;
|
||||
|
||||
@@ -847,10 +919,10 @@ index d971e446859507456da153a9d59f3ed4857b66cb..9ab75731a941e7065dfaa481508cfa47
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index eb6f14f2f99b6939a593a1c9428c719c91382994..1af36377e3841270ddb5db056b17710aa890a3c8 100644
|
||||
index 9c10d729b8e8f4ce9a7a6f945a3a18bfbb4492cb..abc33d4abffaff80f6c23f63e206505ffacade86 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2898,8 +2898,9 @@ source_set("browser") {
|
||||
@@ -2901,8 +2901,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ index b05c0157ecca222452fb38e3b28c9d7cc6bcfbfd..02d9eabfef9521722340739bf86df3df
|
||||
base::win::MessageWindow window_; // The message-only window.
|
||||
bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment.
|
||||
diff --git a/chrome/browser/process_singleton_posix.cc b/chrome/browser/process_singleton_posix.cc
|
||||
index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cdf3819437 100644
|
||||
index 356c30cc4bf0d672f62ccf15de829b3c7c42f476..2071c301644f95e6cd0448b08cc7b535343a55a0 100644
|
||||
--- a/chrome/browser/process_singleton_posix.cc
|
||||
+++ b/chrome/browser/process_singleton_posix.cc
|
||||
@@ -54,6 +54,7 @@
|
||||
@@ -70,9 +70,9 @@ index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cd
|
||||
#include "base/threading/platform_thread.h"
|
||||
#include "base/time/time.h"
|
||||
#include "base/timer/timer.h"
|
||||
@@ -96,9 +98,11 @@
|
||||
#include "net/base/network_interfaces.h"
|
||||
@@ -97,9 +99,11 @@
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/scoped_startup_resource_bundle.h"
|
||||
|
||||
+#if 0
|
||||
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
@@ -82,17 +82,17 @@ index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cd
|
||||
|
||||
using content::BrowserThread;
|
||||
|
||||
@@ -342,6 +346,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) {
|
||||
@@ -343,6 +347,9 @@ bool SymlinkPath(const base::FilePath& target, const base::FilePath& path) {
|
||||
bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
const std::string& hostname,
|
||||
int pid) {
|
||||
+ return true;
|
||||
+
|
||||
+#if 0
|
||||
std::u16string error = l10n_util::GetStringFUTF16(
|
||||
IDS_PROFILE_IN_USE_POSIX, base::NumberToString16(pid),
|
||||
base::ASCIIToUTF16(hostname));
|
||||
@@ -361,6 +368,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
// Ensure there is an instance of ResourceBundle that is initialized for
|
||||
// localized string resource accesses.
|
||||
ui::ScopedStartupResourceBundle ensure_startup_resource_bundle;
|
||||
@@ -366,6 +373,7 @@ bool DisplayProfileInUseError(const base::FilePath& lock_path,
|
||||
|
||||
NOTREACHED();
|
||||
return false;
|
||||
@@ -100,7 +100,7 @@ index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cd
|
||||
}
|
||||
|
||||
bool IsChromeProcess(pid_t pid) {
|
||||
@@ -401,6 +409,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
|
||||
@@ -406,6 +414,21 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
|
||||
return (cookie == ReadLink(path));
|
||||
}
|
||||
|
||||
@@ -122,7 +122,7 @@ index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cd
|
||||
bool ConnectSocket(ScopedSocket* socket,
|
||||
const base::FilePath& socket_path,
|
||||
const base::FilePath& cookie_path) {
|
||||
@@ -768,6 +791,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
@@ -773,6 +796,10 @@ ProcessSingleton::ProcessSingleton(
|
||||
|
||||
ProcessSingleton::~ProcessSingleton() {
|
||||
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
|
||||
@@ -133,7 +133,7 @@ index e1a955c90d6c9f2d5caf18c6bb32e5a388d566be..5330402b1df783b8258b09d8e8dfc2cd
|
||||
}
|
||||
|
||||
ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcess() {
|
||||
@@ -1031,14 +1058,32 @@ bool ProcessSingleton::Create() {
|
||||
@@ -1036,14 +1063,32 @@ bool ProcessSingleton::Create() {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0
|
||||
// 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 90c6a5b6999571819ef71f859767cccf635ea883..d08149b8cb57ca357a2304fc9a8b8be4524b18f9 100644
|
||||
index 2d705b183b1014a6f8dc89672b327d619ac52b1a..7107c17a8f36688d245b4cad5ee92dfcedd2485e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2130,6 +2130,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
@@ -2118,6 +2118,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_) {
|
||||
view_->UpdateCursor(cursor);
|
||||
}
|
||||
@@ -44,10 +44,10 @@ index 90c6a5b6999571819ef71f859767cccf635ea883..d08149b8cb57ca357a2304fc9a8b8be4
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index cb5d09ff6c2347caac3c31f642be244937fdd284..8485102b60faadccbc463c8fc52499e2f865f3f9 100644
|
||||
index 5018e17e0f56efd54529ef3e9ae1de5e223aed68..865414f0994a4e29f297532538486f780edd51d3 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4767,6 +4767,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4798,6 +4798,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index cb5d09ff6c2347caac3c31f642be244937fdd284..8485102b60faadccbc463c8fc52499e2
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 1c87dc4f4c015cd618a09c250c846a212229bd5e..b216a881167a53b88d548045f738b5aa173e3572 100644
|
||||
index 742fd02e00dca4056cde074f6fa85dd76814cfd8..b6ef149aed6641de2ca1ea8bf3d7bcc86768dd53 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -975,6 +975,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -976,6 +976,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
@@ -72,7 +72,7 @@ index 1c87dc4f4c015cd618a09c250c846a212229bd5e..b216a881167a53b88d548045f738b5aa
|
||||
RenderWidgetHostImpl* render_widget_host) override;
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index 977cd925f574c6960f4d801540f37e2a13396504..fcc16b4dff08b781be4e3494ae20481ca85dcd16 100644
|
||||
index 9694d1854873eaea76807ee761c43f21137f0bd2..fc70e75b3b6edcddd95a9960219ffc9b5ec798cc 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -30,6 +30,7 @@
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index d770e7b922232d3e2697ba4146e2e4a3984d6757..5761c122a3fd201c2b53b9d98f21191cd71fa002 100644
|
||||
index f1d50fba17a0a7be9e183467863ad9555438d1f6..8ebc730affa1ecd09426aa23c22f55f95bf07162 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -700,6 +700,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
@@ -684,6 +684,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ index d770e7b922232d3e2697ba4146e2e4a3984d6757..5761c122a3fd201c2b53b9d98f21191c
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index 7b8afe19a30886bff552d9db3daf456f6a0012f9..524e266126cc2d8e17c1a32aa3863924b8626c2f 100644
|
||||
index aed9a4aaa7c9fd320cc9527e5afa85676025ea60..af24500c65b7ecae80fd33c580d22b07876ab12b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -25,8 +25,11 @@
|
||||
@@ -60,7 +60,7 @@ index 7b8afe19a30886bff552d9db3daf456f6a0012f9..524e266126cc2d8e17c1a32aa3863924
|
||||
class WebContentsAccessibility;
|
||||
class DelegatedFrameHost;
|
||||
|
||||
@@ -148,6 +153,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
@@ -142,6 +147,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
const gfx::Rect& keyboard_rect) override {}
|
||||
bool IsHTMLFormPopup() const override;
|
||||
|
||||
@@ -70,7 +70,7 @@ index 7b8afe19a30886bff552d9db3daf456f6a0012f9..524e266126cc2d8e17c1a32aa3863924
|
||||
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
|
||||
// that handle content embedded within other RenderWidgetHostViews.
|
||||
gfx::PointF TransformPointToRootCoordSpaceF(
|
||||
@@ -316,6 +324,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
@@ -310,6 +318,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
|
||||
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
|
||||
const ui::LatencyInfo& latency);
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index 6b37ab029be690c4b773d54775730ea38181122c..67a98e4b6f8de2112c85e3786b4cdae112835a21 100644
|
||||
index b1ad4bd6c61089badd7eda1d95592f3f5b190a1b..64c4adde22136baf053275e8cd4d097b027f1abe 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1361,7 +1361,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1337,7 +1337,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 17415e1009465f44b606236cd6e525e612d6ebe9..2fe11fd6f014cb5b415efe2ae1ba97efa94281c4 100644
|
||||
index 2d77f10cfed48e316d4026eb57c085dc6c922f68..19d712720b5eaf880c75eaaef897d814f4a5c35d 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1863,9 +1863,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1905,9 +1905,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), IsJitDisabled());
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 525aee88cd77d7f5cb561a97fb79d0bfe2582176..a93df5a741dbf2eb99a454050e7f31c506d0ce8d 100644
|
||||
index 3a60a59497571a33bba8efa7654a32403ab99978..0582143a5466afb3ba618e848ff23ffa23e5ca70 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3221,6 +3221,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3242,6 +3242,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index 525aee88cd77d7f5cb561a97fb79d0bfe2582176..a93df5a741dbf2eb99a454050e7f31c5
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3231,6 +3238,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3252,6 +3259,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
@@ -35,10 +35,10 @@ index 525aee88cd77d7f5cb561a97fb79d0bfe2582176..a93df5a741dbf2eb99a454050e7f31c5
|
||||
CHECK(view_.get());
|
||||
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index eb085562fd557cc29f3666fbb4015fe719d04f5a..ea29ff6a0ea1fa93b96ea18c0a350988f6f3870b 100644
|
||||
index ea1643f689885617bc4a4e1809ce3f64b80764ee..d4c85155fd7c1fc1031655ec7b3a803c5c5c49db 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -96,10 +96,13 @@ class BrowserContext;
|
||||
@@ -97,10 +97,13 @@ class BrowserContext;
|
||||
class BrowserPluginGuestDelegate;
|
||||
class RenderFrameHost;
|
||||
class RenderViewHost;
|
||||
@@ -52,7 +52,7 @@ index eb085562fd557cc29f3666fbb4015fe719d04f5a..ea29ff6a0ea1fa93b96ea18c0a350988
|
||||
class WebUI;
|
||||
struct DropData;
|
||||
struct MHTMLGenerationParams;
|
||||
@@ -242,6 +245,10 @@ class WebContents : public PageNavigator,
|
||||
@@ -243,6 +246,10 @@ class WebContents : public PageNavigator,
|
||||
network::mojom::WebSandboxFlags starting_sandbox_flags =
|
||||
network::mojom::WebSandboxFlags::kNone;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ This allows dragging and dropping between <webview>s.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
index dc348722b376370486c80da7ffaaa6ebf5250b33..1d7fe07c337024b66d68f2db400260158e143cc4 100644
|
||||
index 18ad2b559dc7a19a75747f4a722b1df49f718990..5917786d2809860f2b1e6e302920e59e6e3b8414 100644
|
||||
--- a/content/browser/web_contents/web_contents_view_aura.cc
|
||||
+++ b/content/browser/web_contents/web_contents_view_aura.cc
|
||||
@@ -919,10 +919,7 @@ bool WebContentsViewAura::IsValidDragTarget(
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user