chore: bump chromium to 137.0.7149.0 (main) (#46777)

* chore: bump chromium in DEPS to 137.0.7144.0

* chore: bump chromium in DEPS to 137.0.7145.0

* chore: bump chromium in DEPS to 137.0.7147.0

* chore: update patches

* Remove deprecated GetVar(std::string_view, std::string*) overload

Refs https://chromium-review.googlesource.com/c/chromium/src/+/6468873

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* fixup! Remove deprecated GetVar(std::string_view, std::string*) overload

* chore: bump chromium in DEPS to 137.0.7149.0

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
This commit is contained in:
electron-roller[bot] 2025-04-28 11:39:12 -04:00 committed by GitHub
commit f2240e07f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
47 changed files with 174 additions and 183 deletions

2
DEPS
View file

@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
vars = { vars = {
'chromium_version': 'chromium_version':
'137.0.7143.0', '137.0.7149.0',
'node_version': 'node_version':
'v22.14.0', 'v22.14.0',
'nan_version': 'nan_version':

View file

@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows. This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc diff --git a/content/browser/renderer_host/navigation_controller_impl_unittest.cc b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
index a4ed89e2211ad793310c0595d329dbbd4b2c0b34..73a14f1569329baa0830d5cf8c993fe9264f7c74 100644 index f9b27264f7e3e1f8de6f088ccb78e4a4693c5e93..85aebec5028fd6b324a1f1d9416fbf99c150e09a 100644
--- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc --- a/content/browser/renderer_host/navigation_controller_impl_unittest.cc
+++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc +++ b/content/browser/renderer_host/navigation_controller_impl_unittest.cc
@@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast { @@ -168,6 +168,12 @@ class MockPageBroadcast : public blink::mojom::PageBroadcast {

View file

@ -49,7 +49,7 @@ index 2072f6b14289b1f3a76dbccc98f29aa178c1c35c..d7017437a7e7e6ac130677e52731d048
// its owning reference back to our owning LocalFrame. // its owning reference back to our owning LocalFrame.
client_->Detached(type); 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 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index c8eb0358c9b486f6332f93fb574e7d22c3c2ab0e..bb0ab8b88dc62bbe2bd208928453a23d73c41679 100644 index ecaae5e1a2911b122678b2f4f77b5796323ad0bf..fbfd4d96e8082df8c5db5d354ac7c39bc329d4ee 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -753,10 +753,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) { @@ -753,10 +753,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {

View file

@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
This is similar to the //build usecase so we're OK adding ourselves here This is similar to the //build usecase so we're OK adding ourselves here
diff --git a/.gn b/.gn diff --git a/.gn b/.gn
index b8756e53903be9d9760080391b0fc50909945749..ce957d8efd45f546db5d695e3ad1c660217be5e1 100644 index 09c0044a0eb116efc03f4406a29003e7948a39bb..a185f4f0c7061a2b12895196583bd256e06614fb 100644
--- a/.gn --- a/.gn
+++ b/.gn +++ b/.gn
@@ -173,4 +173,26 @@ exec_script_allowlist = @@ -168,4 +168,26 @@ exec_script_allowlist =
"//tools/grit/grit_rule.gni", "//tools/grit/grit_rule.gni",
"//tools/gritsettings/BUILD.gn", "//tools/gritsettings/BUILD.gn",

View file

@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
patch. patch.
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 69502170fe7a4d37773ad3e9cd7eeaf63fe1984d..fe0de5d0ec23121bd43acd641afcab2e50573a68 100644 index 39ef34bbd58d51d8453dcb076bb6e45ec78a3832..119d7e409b46995ff602989e9308e2d39f6820ed 100644
--- a/chrome/BUILD.gn --- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -200,11 +200,16 @@ if (!is_android && !is_mac) { @@ -200,11 +200,16 @@ if (!is_android && !is_mac) {
@ -33,10 +33,10 @@ index 69502170fe7a4d37773ad3e9cd7eeaf63fe1984d..fe0de5d0ec23121bd43acd641afcab2e
"//base", "//base",
"//build:branding_buildflags", "//build:branding_buildflags",
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 416399ec9fb7876dcb95775cf1d2dd91a322c71b..961197adbf99391660abbf60bbfa34c522f91fc8 100644 index 03805c70105cf375bb5959a6b30d91e1c86a2466..c817919101f77b4571964b94007f9204b5873248 100644
--- a/chrome/browser/BUILD.gn --- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn
@@ -4609,7 +4609,7 @@ static_library("browser") { @@ -4617,7 +4617,7 @@ static_library("browser") {
[ "//chrome/browser/ui/webui/signin:profile_impl" ] [ "//chrome/browser/ui/webui/signin:profile_impl" ]
} }
@ -46,10 +46,10 @@ index 416399ec9fb7876dcb95775cf1d2dd91a322c71b..961197adbf99391660abbf60bbfa34c5
# than here in :chrome_dll. # than here in :chrome_dll.
deps += [ "//chrome:packed_resources_integrity_header" ] deps += [ "//chrome:packed_resources_integrity_header" ]
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
index bdc86bb7f4592b147ea051349a749c3f26d9ea4f..7073a7279d1b67f06adc392318c658dda74a2ef6 100644 index 99aa117b2ade28e6e41068e463703e816eb3da55..2572a43601d5e10a894b9fe08c038ea97c024e9a 100644
--- a/chrome/test/BUILD.gn --- a/chrome/test/BUILD.gn
+++ b/chrome/test/BUILD.gn +++ b/chrome/test/BUILD.gn
@@ -7182,9 +7182,12 @@ test("unit_tests") { @@ -7174,9 +7174,12 @@ test("unit_tests") {
"//chrome/notification_helper", "//chrome/notification_helper",
] ]
@ -63,7 +63,7 @@ index bdc86bb7f4592b147ea051349a749c3f26d9ea4f..7073a7279d1b67f06adc392318c658dd
"//chrome//services/util_win:unit_tests", "//chrome//services/util_win:unit_tests",
"//chrome/app:chrome_dll_resources", "//chrome/app:chrome_dll_resources",
"//chrome/app:win_unit_tests", "//chrome/app:win_unit_tests",
@@ -8148,6 +8151,10 @@ test("unit_tests") { @@ -8142,6 +8145,10 @@ test("unit_tests") {
"../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc", "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
] ]
@ -74,7 +74,7 @@ index bdc86bb7f4592b147ea051349a749c3f26d9ea4f..7073a7279d1b67f06adc392318c658dd
sources += [ sources += [
# The importer code is not used on Android. # The importer code is not used on Android.
"../common/importer/firefox_importer_utils_unittest.cc", "../common/importer/firefox_importer_utils_unittest.cc",
@@ -8203,7 +8210,6 @@ test("unit_tests") { @@ -8197,7 +8204,6 @@ test("unit_tests") {
# Non-android deps for "unit_tests" target. # Non-android deps for "unit_tests" target.
deps += [ deps += [
"../browser/screen_ai:screen_ai_install_state", "../browser/screen_ai:screen_ai_install_state",

View file

@ -9,10 +9,10 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken. 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 diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index f4b76ef5bf500b8eb9d965dfdefac8e3b570edc3..5b02e27e3ea06561ddac8ad700bf073701eab73a 100644 index ebf407904b9b9bc7f60a9c13a5c39ce64640189d..7b45a0006af60400f5d8ba5b925f971cb5cf393e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -9772,6 +9772,7 @@ void RenderFrameHostImpl::CreateNewWindow( @@ -9778,6 +9778,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type, last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(), params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features, params->frame_name, params->disposition, *params->features,
@ -21,10 +21,10 @@ index f4b76ef5bf500b8eb9d965dfdefac8e3b570edc3..5b02e27e3ea06561ddac8ad700bf0737
&no_javascript_access); &no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 132230946c506d077986aa07c7276b0adaf5fc90..cdf14dcd6ebd9be63a47ff7ba68120e9878c68f5 100644 index fe352434dd26ebbde72145df335520ff9d026e80..4f87894219452e736311ad25a62b71b8aec4d158 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5118,6 +5118,12 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5126,6 +5126,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params, SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
opener); opener);
@ -37,7 +37,7 @@ index 132230946c506d077986aa07c7276b0adaf5fc90..cdf14dcd6ebd9be63a47ff7ba68120e9
// If the new frame has a name, make sure any SiteInstances that can find // 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 // this named frame have proxies for it. Must be called after
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses // SetSessionStorageNamespace, since this calls CreateRenderView, which uses
@@ -5159,12 +5165,6 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5167,12 +5173,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl); AddWebContentsDestructionObserver(new_contents_impl);
} }
@ -163,7 +163,7 @@ index 5af26eef19c2f7ce082af02cff6d8f919c4d245d..e3f9f9406f51d4d4cb48fd35d33ee3d6
// moved on send. // moved on send.
bool is_background_tab = 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 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 7c4f2f67cf934472eac4a678fbced01c177c9b47..584faf64137ea3eb939e795684061c9b70ad6263 100644 index 75bd6c082dbda49bd5ee177105d78b670d147034..bceb8a8acf9a23d0d1df2d6749b94f4c98ee72ec 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc --- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc +++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -535,6 +535,8 @@ bool WebTestContentBrowserClient::CanCreateWindow( @@ -535,6 +535,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(

View file

@ -18,12 +18,12 @@ index 0a0f0118d5c1a5a2f3ad28b068bebb849eba7246..5ca6d03b709ef119ccd6482b2f305f8a
/googleurl /googleurl
/gpu/gles2_conform_test /gpu/gles2_conform_test
diff --git a/third_party/.gitignore b/third_party/.gitignore diff --git a/third_party/.gitignore b/third_party/.gitignore
index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f2a55c7b5 100644 index ad591b3a0f2afe24d53dac76655f81790c1baa50..080d19d34659290e70f599e3d91da286013be76f 100644
--- a/third_party/.gitignore --- a/third_party/.gitignore
+++ b/third_party/.gitignore +++ b/third_party/.gitignore
@@ -45,7 +45,9 @@ @@ -46,7 +46,9 @@
/devserver
/directxsdk /directxsdk
/dragonbox/src
/edk2 /edk2
+/electron_node +/electron_node
/elfutils/src /elfutils/src
@ -31,7 +31,7 @@ index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f
/espresso/lib/ /espresso/lib/
/eyesfree/src /eyesfree/src
/fast_float/src /fast_float/src
@@ -93,6 +95,7 @@ @@ -94,6 +96,7 @@
/mocha /mocha
/mockito/src /mockito/src
/nacl_sdk_binaries/ /nacl_sdk_binaries/
@ -39,7 +39,7 @@ index 3e117f79191d5cea0fb4f1c6b0e95513562d7691..f197d17a55a802b01aaba602eff7c83f
/ninja /ninja
/node/*.tar.gz /node/*.tar.gz
/node/linux/ /node/linux/
@@ -137,7 +140,7 @@ @@ -138,7 +141,7 @@
/spirv-cross/src /spirv-cross/src
/spirv-headers/src /spirv-headers/src
/spirv-tools/src /spirv-tools/src

View file

@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
by changing something in Electron. by changing something in Electron.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 30ed2f38b7d2b7909bcab3fc593ef635e72a96e1..e288cf5bfd3dfa1a2ca499293130c582ae8c354b 100644 index 4c30f71ced0da645637c989c08ccc93e463e755f..56b2fb93d5d85f520081de9e42e26ef3f8f6090e 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5037,7 +5037,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5045,7 +5045,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
: IsGuest(); : IsGuest();
// While some guest types do not have a guest SiteInstance, the ones that // While some guest types do not have a guest SiteInstance, the ones that
// don't all override WebContents creation above. // don't all override WebContents creation above.

View file

@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
content::WebContents* source, content::WebContents* source,
const content::OpenURLParams& params, const content::OpenURLParams& params,
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index 4650a05dbfa8fb464a6264fc6d4f0108fbd60150..9f70060a0d581bafa5d74cc22c28285bc25b392a 100644 index acb3a3aa595f3e6694270c928b9422388c0f25a5..670f77936863c686aca70072e9d42293463a6a28 100644
--- a/chrome/browser/ui/browser.cc --- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc +++ b/chrome/browser/ui/browser.cc
@@ -2310,12 +2310,11 @@ bool Browser::IsWebContentsCreationOverridden( @@ -2314,12 +2314,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance, content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type, content::mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,
@ -99,10 +99,10 @@ index 4650a05dbfa8fb464a6264fc6d4f0108fbd60150..9f70060a0d581bafa5d74cc22c28285b
WebContents* Browser::CreateCustomWebContents( WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 23e920f90bca09f0e1efacf1a4291f7080dce382..0f12cca9cba240f8b8e620fbf4f99cbf3e9e6ea8 100644 index c4cea0b6e8c4c95ebcddf5497d731d1d63934f22..7686b75c5504d093dcd9dd8a7ffd28e0c2fd036c 100644
--- a/chrome/browser/ui/browser.h --- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h +++ b/chrome/browser/ui/browser.h
@@ -1025,8 +1025,7 @@ class Browser : public TabStripModelObserver, @@ -1026,8 +1026,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance, content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type, content::mojom::WindowContainerType window_container_type,
const GURL& opener_url, const GURL& opener_url,
@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
content::WebContents* AddNewContents( content::WebContents* AddNewContents(
content::WebContents* source, content::WebContents* source,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6e9b45c4b257edd7e7a5c452f709a0b9b64250fe..6dbbe9cf521eb5b165f1de1fc1db2a01e69e5d9b 100644 index 7a8d7ce6f628123f5288d693046ca7602eeccac1..f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5000,8 +5000,7 @@ FrameTree* WebContentsImpl::CreateNewWindow( @@ -5008,8 +5008,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
// TODO(crbug.com/40202416): Support a way for MPArch guests to support this. // TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
if (delegate_ && delegate_->IsWebContentsCreationOverridden( if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type, source_site_instance, params.window_container_type,

View file

@ -99,18 +99,18 @@ index a53b4901dde0dc83dce6c9b56616eef0d02d94a5..b419672af985f673f375fbb63b4d2b2c
protected: protected:
~WebSettings() = default; ~WebSettings() = default;
diff --git a/third_party/blink/renderer/build/scripts/core/css/css_properties.py b/third_party/blink/renderer/build/scripts/core/css/css_properties.py diff --git a/third_party/blink/renderer/build/scripts/core/css/css_properties.py b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
index aa3a6b93cceae8c8bfbefdd7a043ae576f921979..17544d7ed4757fb51e2f82fd1b90638131ba05cc 100755 index 6e991652d242795e292cea4c94cff59aaea078fa..b6834c78575520bb6e584dd2ce3333ac17299fef 100755
--- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py --- a/third_party/blink/renderer/build/scripts/core/css/css_properties.py
+++ b/third_party/blink/renderer/build/scripts/core/css/css_properties.py +++ b/third_party/blink/renderer/build/scripts/core/css/css_properties.py
@@ -313,7 +313,7 @@ class CSSProperties(object): @@ -314,7 +314,7 @@ class CSSProperties(object):
if name_without_leading_dash.startswith('-'):
name_without_leading_dash = name_without_leading_dash[1:] name_without_leading_dash = name_without_leading_dash[1:]
internal_visited_order = 1 internal_visited_order = 1
- if name_without_leading_dash.startswith('internal-visited-'): if name_without_leading_dash.startswith(
+ if name_without_leading_dash.startswith('internal-'): - 'internal-visited-'
+ 'internal-'
) or name_without_leading_dash.startswith(
'internal-forced-visited-'):
internal_visited_order = 0 internal_visited_order = 0
property_.sorting_key = (-property_.priority,
internal_visited_order,
diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5 diff --git a/third_party/blink/renderer/core/css/css_properties.json5 b/third_party/blink/renderer/core/css/css_properties.json5
index c3dfa4c1f53a6ebba5735214037e0d1c6a88961d..17a08450227844dceccbaab7ff9de60d6e058b1f 100644 index c3dfa4c1f53a6ebba5735214037e0d1c6a88961d..17a08450227844dceccbaab7ff9de60d6e058b1f 100644
--- a/third_party/blink/renderer/core/css/css_properties.json5 --- a/third_party/blink/renderer/core/css/css_properties.json5
@ -307,10 +307,10 @@ index 2c2f4f405074e5baa4a26f255283404f86b40e21..ebeb7d6988ee9e6a4e78cb82fc01fdad
ContouredRect PixelSnappedContouredBorderInternal( ContouredRect PixelSnappedContouredBorderInternal(
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index d419aae417d76f6f2e5a477e28dbb980e28ce07e..ddf8b3bd075914c52c0275049145cda95ac4ca70 100644 index 6718aad4a16cd99c8dd7118ca62cebd29ffbfe97..39d426936b266d8f44ab8a614a48247462ceea2d 100644
--- a/third_party/blink/renderer/platform/BUILD.gn --- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn +++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1656,6 +1656,8 @@ component("platform") { @@ -1658,6 +1658,8 @@ component("platform") {
"widget/widget_base.h", "widget/widget_base.h",
"widget/widget_base_client.h", "widget/widget_base_client.h",
"windows_keyboard_codes.h", "windows_keyboard_codes.h",

View file

@ -522,10 +522,10 @@ index f0aca972c4a81c3dfb536e14244daafae21ee716..a15afbc1a3519e657121b4952444d2f4
waiting_on_draw_ack_ = true; waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 7898d49d84cebde8d6f03e63a6555c29cc9becff..c86e066ae303220d699f4bc3832ae4b31b40b0bc 100644 index ed921225298fbb4f6d12d7c49be825ee586d009c..78a393d96ddf4dc3bf8d1af297ed2642eacac495 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -115,7 +115,8 @@ RootCompositorFrameSinkImpl::Create( @@ -130,7 +130,8 @@ RootCompositorFrameSinkImpl::Create(
params->gpu_compositing, params->widget); params->gpu_compositing, params->widget);
auto output_surface = output_surface_provider->CreateOutputSurface( auto output_surface = output_surface_provider->CreateOutputSurface(
params->widget, params->gpu_compositing, display_client.get(), params->widget, params->gpu_compositing, display_client.get(),
@ -585,10 +585,10 @@ index 8e2ddfa9337b5ba952a186a85bce78d39a62e8bd..efb54a95b2ad76546eafa1907064a298
compositor_data.display_client->GetBoundRemote(resize_task_runner_); compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController> mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index 3046e60995bceb1c9931038be3d309577a830a60..4476f48510f807d03f05a4afa2a648dac8720010 100644 index afdda5292ce89d6dac6eaa1e3476fdfd0e9e7f08..8147e4bf6173699df6ab9492898989c68ffbb2b8 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom --- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom +++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -125,7 +125,6 @@ interface DisplayClient { @@ -123,7 +123,6 @@ interface DisplayClient {
// Creates a LayeredWindowUpdater implementation to draw into a layered // Creates a LayeredWindowUpdater implementation to draw into a layered
// window. // window.

View file

@ -15,7 +15,7 @@ We also need to ensure that an initial paint is scheduled when
the compositor is unsuspended in headles mode. the compositor is unsuspended in headles mode.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 0c9f3b71063ff55ea16d23fd6de2b8984feba0e0..ce57d3d1af387b63efe27e816d5d2ae74872267b 100644 index 1d77de15d281c597c1cb3dbca04eb4d8e16cc11d..187bb87a0b356551e2260f480de326c574aa914b 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -663,9 +663,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -663,9 +663,10 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@ -31,10 +31,10 @@ index 0c9f3b71063ff55ea16d23fd6de2b8984feba0e0..ce57d3d1af387b63efe27e816d5d2ae7
// Register the CGWindowID (used to identify this window for video capture) // Register the CGWindowID (used to identify this window for video capture)
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index 9b76dad4ebf12322bd32d29fd03b7ed93e8652eb..8d456181d7617e558dd2e66bf7f6aa03980adc1c 100644 index 9087ed4c1035104e4c5f32e86f81dae6aad09d3d..18f82c39b63269daf34a91d805c94070de9cd271 100644
--- a/ui/views/widget/widget.h --- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h +++ b/ui/views/widget/widget.h
@@ -1233,6 +1233,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -1239,6 +1239,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// True if widget was created in headless mode. // True if widget was created in headless mode.
bool is_headless() const { return is_headless_; } bool is_headless() const { return is_headless_; }

View file

@ -28,10 +28,10 @@ The patch should be removed in favor of either:
Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397. Upstream bug https://bugs.chromium.org/p/chromium/issues/detail?id=1081397.
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index cbee5764fa2c048f511fcde5843a741d19c2ff91..dbfbed89df4f02a4ec3cabc8e3b064b8a0629d72 100644 index 4c78563c29ce92c8217d288ed03f73fb482c6b49..aee0097df986cb4b3b75112fab828c59803e28d1 100644
--- a/content/browser/renderer_host/navigation_request.cc --- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc +++ b/content/browser/renderer_host/navigation_request.cc
@@ -11151,6 +11151,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() { @@ -11159,6 +11159,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
"blob"); "blob");
} }

View file

@ -10,10 +10,10 @@ This patch should be backported to e29, upstreamed to Chromium, and then
removed if it lands upstream. removed if it lands upstream.
diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc diff --git a/ui/events/x/events_x_utils.cc b/ui/events/x/events_x_utils.cc
index 86ee14757d2373ef6410d1785547676b0fcb806b..6069382276151a5126bf0279e0f1ce9e356166ed 100644 index 0fcb43d631eb638ad6879539dee8ad8a21da945b..86f8756f038a68bae29072318d874e23e4d00707 100644
--- a/ui/events/x/events_x_utils.cc --- a/ui/events/x/events_x_utils.cc
+++ b/ui/events/x/events_x_utils.cc +++ b/ui/events/x/events_x_utils.cc
@@ -591,6 +591,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) { @@ -594,6 +594,9 @@ gfx::Point EventLocationFromXEvent(const x11::Event& xev) {
gfx::Point EventSystemLocationFromXEvent(const x11::Event& xev) { gfx::Point EventSystemLocationFromXEvent(const x11::Event& xev) {
if (auto* crossing = xev.As<x11::CrossingEvent>()) if (auto* crossing = xev.As<x11::CrossingEvent>())
return gfx::Point(crossing->root_x, crossing->root_y); return gfx::Point(crossing->root_x, crossing->root_y);

View file

@ -75,7 +75,7 @@ index 659e8d79766a78d261e58adab08f9abccda8390b..bc4dc2e3a93877d2e20890560f61d3f2
PictureInPictureOcclusionTracker* PictureInPictureOcclusionTracker*
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index 5012789f084113a9289e8d198eed2f021953bef9..141db7a24abb0b609fdf81847af87bc59ba1a83f 100644 index dde04e0070cfd0a294d88fad3c32eadacf4030e8..de6816ba24a300b936c5ddbc1b5f1dd0f4865a9c 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -431,11 +431,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create( @@ -431,11 +431,13 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(

View file

@ -87,10 +87,10 @@ index 75df43e3cd2721a92c90c18154d53d5c203e2465..ce42c75c8face36d21f53f44c0201ac4
// The view with active text input state, i.e., a focused <input> element. // The view with active text input state, i.e., a focused <input> element.
// It will be nullptr if no such view exists. Note that the active view // It will be nullptr if no such view exists. Note that the active view
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d28f93f09b2274923a86ac421bb12087b67b0dea..30ed2f38b7d2b7909bcab3fc593ef635e72a96e1 100644 index 3b9e634245986b1ef22e8bf4e116470343f5ff60..4c30f71ced0da645637c989c08ccc93e463e755f 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -9982,7 +9982,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame( @@ -9992,7 +9992,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
"WebContentsImpl::OnFocusedElementChangedInFrame", "WebContentsImpl::OnFocusedElementChangedInFrame",
"render_frame_host", frame); "render_frame_host", frame);
RenderWidgetHostViewBase* root_view = RenderWidgetHostViewBase* root_view =

View file

@ -59,10 +59,10 @@ index cba373664bec3a32abad6fe0396bd67b53b7e67f..a54f1b3351efd2d8f324436f7f35cd43
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_ #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 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index bb0ab8b88dc62bbe2bd208928453a23d73c41679..11b57a28c3e122147058d2d02ce504a93df20527 100644 index fbfd4d96e8082df8c5db5d354ac7c39bc329d4ee..c8be9f437cc19668f8349e8777135e66a67fb9cb 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc --- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc +++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -3116,6 +3116,7 @@ void LocalFrame::RequestExecuteScript( @@ -3113,6 +3113,7 @@ void LocalFrame::RequestExecuteScript(
mojom::blink::EvaluationTiming evaluation_timing, mojom::blink::EvaluationTiming evaluation_timing,
mojom::blink::LoadEventBlockingOption blocking_option, mojom::blink::LoadEventBlockingOption blocking_option,
WebScriptExecutionCallback callback, WebScriptExecutionCallback callback,
@ -70,7 +70,7 @@ index bb0ab8b88dc62bbe2bd208928453a23d73c41679..11b57a28c3e122147058d2d02ce504a9
BackForwardCacheAware back_forward_cache_aware, BackForwardCacheAware back_forward_cache_aware,
mojom::blink::WantResultOption want_result_option, mojom::blink::WantResultOption want_result_option,
mojom::blink::PromiseResultOption promise_behavior) { mojom::blink::PromiseResultOption promise_behavior) {
@@ -3148,7 +3149,7 @@ void LocalFrame::RequestExecuteScript( @@ -3145,7 +3146,7 @@ void LocalFrame::RequestExecuteScript(
PausableScriptExecutor::CreateAndRun( PausableScriptExecutor::CreateAndRun(
script_state, std::move(script_sources), execute_script_policy, script_state, std::move(script_sources), execute_script_policy,
user_gesture, evaluation_timing, blocking_option, want_result_option, user_gesture, evaluation_timing, blocking_option, want_result_option,
@ -80,7 +80,7 @@ index bb0ab8b88dc62bbe2bd208928453a23d73c41679..11b57a28c3e122147058d2d02ce504a9
void LocalFrame::SetEvictCachedSessionStorageOnFreezeOrUnload() { 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 diff --git a/third_party/blink/renderer/core/frame/local_frame.h b/third_party/blink/renderer/core/frame/local_frame.h
index 89365bf58126d02c62ed4e2f18100e22e74b8962..7d040ff5300014c4f8bfbddccaf5d0b750499c86 100644 index 80c37508a9382a0aeb221c37d2a96f13c526e550..0d12cf49599f0a249ab97f371e5c27cfe654f463 100644
--- a/third_party/blink/renderer/core/frame/local_frame.h --- a/third_party/blink/renderer/core/frame/local_frame.h
+++ b/third_party/blink/renderer/core/frame/local_frame.h +++ b/third_party/blink/renderer/core/frame/local_frame.h
@@ -826,6 +826,7 @@ class CORE_EXPORT LocalFrame final @@ -826,6 +826,7 @@ class CORE_EXPORT LocalFrame final

View file

@ -15,10 +15,10 @@ capturer was window or screen-specific, as the IDs remain valid for
generic capturer as well. generic capturer as well.
diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc diff --git a/content/browser/media/capture/desktop_capture_device.cc b/content/browser/media/capture/desktop_capture_device.cc
index 93823d191f63f81f79d370f85991f51747c39b46..715a761e3bea87381ccf43b86dddba9bc03bbe9e 100644 index 03c74299de1558ed4ce0e8273e936a60e53e6154..fa168fd69a3a9e6679f942651b23b4012a8a9c48 100644
--- a/content/browser/media/capture/desktop_capture_device.cc --- a/content/browser/media/capture/desktop_capture_device.cc
+++ b/content/browser/media/capture/desktop_capture_device.cc +++ b/content/browser/media/capture/desktop_capture_device.cc
@@ -908,8 +908,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create( @@ -915,8 +915,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
switch (source.type) { switch (source.type) {
case DesktopMediaID::TYPE_SCREEN: { case DesktopMediaID::TYPE_SCREEN: {
@ -35,7 +35,7 @@ index 93823d191f63f81f79d370f85991f51747c39b46..715a761e3bea87381ccf43b86dddba9b
if (screen_capturer && screen_capturer->SelectSource(source.id)) { if (screen_capturer && screen_capturer->SelectSource(source.id)) {
capturer = std::make_unique<webrtc::DesktopAndCursorComposer>( capturer = std::make_unique<webrtc::DesktopAndCursorComposer>(
std::move(screen_capturer), options); std::move(screen_capturer), options);
@@ -922,8 +928,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create( @@ -929,8 +935,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
} }
case DesktopMediaID::TYPE_WINDOW: { case DesktopMediaID::TYPE_WINDOW: {

View file

@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903 Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
index b1a37f7449e3eda1d0fe16503c45e86a2c207b7c..a01822fb1057eacd785dba63917ef927f3680aa4 100755 index 8f419c43dcb0bb4b882d04db7fadbcd25560ece0..709cca39197ef74c304cdef1cab750f244f9bf29 100755
--- a/tools/clang/scripts/update.py --- a/tools/clang/scripts/update.py
+++ b/tools/clang/scripts/update.py +++ b/tools/clang/scripts/update.py
@@ -304,6 +304,8 @@ def GetDefaultHostOs(): @@ -304,6 +304,8 @@ def GetDefaultHostOs():

View file

@ -9,10 +9,10 @@ at rutime. It would be best if eventually all usages of this property were
replaced with clean ozone native implementations. 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 diff --git a/ui/ozone/platform/x11/ozone_platform_x11.cc b/ui/ozone/platform/x11/ozone_platform_x11.cc
index dcca94fc47fb95a431cfc7c7c9765288f35d3440..c8ae2c0b4b26e1547c0bdfd81ac3ae0d51bab76b 100644 index 14a38b11d595c63cd827f542479df04473bdbe42..c6e1398fcce871ba50017d6e528d6018226f9649 100644
--- a/ui/ozone/platform/x11/ozone_platform_x11.cc --- a/ui/ozone/platform/x11/ozone_platform_x11.cc
+++ b/ui/ozone/platform/x11/ozone_platform_x11.cc +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
@@ -194,6 +194,7 @@ class OzonePlatformX11 : public OzonePlatform, @@ -193,6 +193,7 @@ class OzonePlatformX11 : public OzonePlatform,
base::MessagePumpType::UI; base::MessagePumpType::UI;
properties->supports_vulkan_swap_chain = true; properties->supports_vulkan_swap_chain = true;
properties->skia_can_fall_back_to_x11 = true; properties->skia_can_fall_back_to_x11 = true;

View file

@ -35,7 +35,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
system priority. system priority.
diff --git a/base/BUILD.gn b/base/BUILD.gn diff --git a/base/BUILD.gn b/base/BUILD.gn
index 2e12fdc3f0d49e899d8ce8df570a4222fc84c956..73cc370f8c7390e156224f328c28f7b588ba8f30 100644 index acec47a0be2986a4d7fe1e1284db0260e5814d6c..69a68e3776f142ab77f838a7c1827b1de99d4605 100644
--- a/base/BUILD.gn --- a/base/BUILD.gn
+++ b/base/BUILD.gn +++ b/base/BUILD.gn
@@ -1045,6 +1045,7 @@ component("base") { @@ -1045,6 +1045,7 @@ component("base") {
@ -1678,7 +1678,7 @@ index 6846060ef9622d8fc8d1d6c8da16e2f1b785e6bd..05c22db87e882b246bd7034e027cf149
// Accessible object // Accessible object
if (AXElementWrapper::IsValidElement(value)) { if (AXElementWrapper::IsValidElement(value)) {
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index 8abb389faddb435980c1c06c3d69e33d5bf13881..62bb9b60b54252a44590616142a0beabbf6b55bf 100644 index dfca458adb5b38cb1e597c16e9e6b6cc1521dea2..2372ff1193d1d52b719b6ee311cc07ac472a2f8d 100644
--- a/ui/base/BUILD.gn --- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn
@@ -365,6 +365,13 @@ component("base") { @@ -365,6 +365,13 @@ component("base") {
@ -1925,7 +1925,7 @@ index a8f20a694252ae90eb6c6c7d77d250dcdb2df1a3..8e3f87df5e1345ddeb12cb424abaf3a4
sources += [ sources += [
"test/desktop_window_tree_host_win_test_api.cc", "test/desktop_window_tree_host_win_test_api.cc",
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index f71a4c7559edf9d8c420ca20aa7bd89097498951..6e94f732d996a726d5147db9b96c5e39e68d2fb5 100644 index dcbd888db4ffec7b960bca18837c5210eb99bd87..2583e94b7de865ab5f02566760e9994a9f3bc434 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
@ -1946,7 +1946,7 @@ index f71a4c7559edf9d8c420ca20aa7bd89097498951..6e94f732d996a726d5147db9b96c5e39
@class NSView; @class NSView;
namespace remote_cocoa { namespace remote_cocoa {
@@ -497,10 +500,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost @@ -501,10 +504,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow> mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
remote_ns_window_remote_; remote_ns_window_remote_;
@ -1960,7 +1960,7 @@ index f71a4c7559edf9d8c420ca20aa7bd89097498951..6e94f732d996a726d5147db9b96c5e39
// Used to force the NSApplication's focused accessibility element to be the // Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused. // views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 896ff97c4799a31f14bce4c25ca6d33e7dd2e2e8..0c9f3b71063ff55ea16d23fd6de2b8984feba0e0 100644 index cfd4c6bd099edfcf10ed33be000c665a6d4af16e..1d77de15d281c597c1cb3dbca04eb4d8e16cc11d 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
@ -1997,7 +1997,7 @@ index 896ff97c4799a31f14bce4c25ca6d33e7dd2e2e8..0c9f3b71063ff55ea16d23fd6de2b898
} }
remote_cocoa::mojom::NativeWidgetNSWindow* remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1393,9 +1402,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1407,9 +1416,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
// for PWAs. However this breaks accessibility on in-process windows, // for PWAs. However this breaks accessibility on in-process windows,
// so set it back to NO when a local window gains focus. See // so set it back to NO when a local window gains focus. See
// https://crbug.com/41485830. // https://crbug.com/41485830.
@ -2009,7 +2009,7 @@ index 896ff97c4799a31f14bce4c25ca6d33e7dd2e2e8..0c9f3b71063ff55ea16d23fd6de2b898
// Explicitly set the keyboard accessibility state on regaining key // Explicitly set the keyboard accessibility state on regaining key
// window status. // window status.
if (is_key && is_content_first_responder) { if (is_key && is_content_first_responder) {
@@ -1536,17 +1547,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1550,17 +1561,20 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens( void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token, const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) { const std::vector<uint8_t>& view_token) {
@ -2030,7 +2030,7 @@ index 896ff97c4799a31f14bce4c25ca6d33e7dd2e2e8..0c9f3b71063ff55ea16d23fd6de2b898
*pid = getpid(); *pid = getpid();
id element_id = GetNativeViewAccessible(); id element_id = GetNativeViewAccessible();
@@ -1559,6 +1573,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator, @@ -1573,6 +1587,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
} }
*token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id); *token = ui::RemoteAccessibility::GetTokenForLocalElement(element_id);

View file

@ -7,7 +7,7 @@ Pass RenderFrameHost through to PlatformNotificationService
so Electron can identify which renderer a notification came from. 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 diff --git a/chrome/browser/notifications/platform_notification_service_impl.cc b/chrome/browser/notifications/platform_notification_service_impl.cc
index 02293a6e07672fe9118f78b3a2159e682ef35ef0..64600edc11c173d762e8f5e54c1c025b0566de91 100644 index 2f9eb931d8cd30617fc8df6c9ff976ba2e29d194..2985c28ed040793819dcde2ccd1694b28275e66b 100644
--- a/chrome/browser/notifications/platform_notification_service_impl.cc --- a/chrome/browser/notifications/platform_notification_service_impl.cc
+++ b/chrome/browser/notifications/platform_notification_service_impl.cc +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
@@ -245,6 +245,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically( @@ -245,6 +245,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(

View file

@ -10,7 +10,7 @@ an about:blank check to this area.
Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876 Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5403876
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 31ee25e669b67198b2ca76e912eb8f7005298d0e..b8284cb4c3c2ef85e03d2a66a8121be8a49fa321 100644 index 5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4..bab3c9fdb1a90dd42394ab77732976e0b444a4e5 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -807,8 +807,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch( @@ -807,8 +807,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(

View file

@ -38,7 +38,7 @@ index 8168b4cfbafd42fa93a5aa9a3691c2552fabfb86..ba49212bd76d209f99c1cee649fc1466
ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground, ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
kCloseButtonIconSize)); kCloseButtonIconSize));
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
index c65308ac3bec1e6399c74f5d0bcf59364db4e997..5012789f084113a9289e8d198eed2f021953bef9 100644 index 2878aa40f60e977ecd2f7eedd37d1ce199472cf4..dde04e0070cfd0a294d88fad3c32eadacf4030e8 100644
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc +++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
@@ -19,9 +19,11 @@ @@ -19,9 +19,11 @@

View file

@ -44,10 +44,10 @@ index 8637d83c1d3a912bbc48effcc095b426640351ad..3419628c08b62a16c62778cc124c365a
void RenderWidgetHostImpl::ShowContextMenuAtPoint( void RenderWidgetHostImpl::ShowContextMenuAtPoint(
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index cdf14dcd6ebd9be63a47ff7ba68120e9878c68f5..6e9b45c4b257edd7e7a5c452f709a0b9b64250fe 100644 index 4f87894219452e736311ad25a62b71b8aec4d158..7a8d7ce6f628123f5288d693046ca7602eeccac1 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -5870,6 +5870,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { @@ -5878,6 +5878,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
return text_input_manager_.get(); return text_input_manager_.get();
} }

View file

@ -15,10 +15,10 @@ This CL removes these filters so the unresponsive event can still be
accessed from our JS event. The filtering is moved into Electron's code. accessed from our JS event. The filtering is moved into Electron's code.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index e288cf5bfd3dfa1a2ca499293130c582ae8c354b..82b273f894f9bb22df8c10e255e76cdafb471274 100644 index 56b2fb93d5d85f520081de9e42e26ef3f8f6090e..b32e75e7c1922e63fdca891dfd7d4bcb27c5096e 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -10119,25 +10119,13 @@ void WebContentsImpl::RendererUnresponsive( @@ -10129,25 +10129,13 @@ void WebContentsImpl::RendererUnresponsive(
base::RepeatingClosure hang_monitor_restarter) { base::RepeatingClosure hang_monitor_restarter) {
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive", OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
"render_widget_host", render_widget_host); "render_widget_host", render_widget_host);

View file

@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon). None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index a9de281b6a295840a7be4602117522649edef15f..69502170fe7a4d37773ad3e9cd7eeaf63fe1984d 100644 index 3db6dd6496794e924e87c5cd4c442e5fd90106cf..39ef34bbd58d51d8453dcb076bb6e45ec78a3832 100644
--- a/chrome/BUILD.gn --- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn +++ b/chrome/BUILD.gn
@@ -1554,7 +1554,7 @@ if (is_chrome_branded && !is_android) { @@ -1559,7 +1559,7 @@ if (is_chrome_branded && !is_android) {
} }
} }
@ -64,7 +64,7 @@ index a9de281b6a295840a7be4602117522649edef15f..69502170fe7a4d37773ad3e9cd7eeaf6
chrome_paks("packed_resources") { chrome_paks("packed_resources") {
if (is_mac) { if (is_mac) {
output_dir = "$root_gen_dir/repack" output_dir = "$root_gen_dir/repack"
@@ -1600,6 +1600,12 @@ repack("browser_tests_pak") { @@ -1605,6 +1605,12 @@ repack("browser_tests_pak") {
deps = [ "//chrome/test/data/webui:resources" ] deps = [ "//chrome/test/data/webui:resources" ]
} }

View file

@ -8,7 +8,7 @@ as its one of our supported platforms.
https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9 https://chromium-review.googlesource.com/q/I3a62f02f564f07be63173b0773b4ecaffbe939b9
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 6f248e837d8ebf389f0b89254702034ae89f8044..251e90f0e3d81c6144e7a6e9e5c5d2165da8738f 100644 index fca6c92950708307743b4e4f7081ff58ca1ad54c..3d3e9762875f3328cb777d1880d93527e2ed1f70 100644
--- a/build/config/compiler/BUILD.gn --- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn
@@ -619,7 +619,8 @@ config("compiler") { @@ -619,7 +619,8 @@ config("compiler") {

View file

@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226. 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 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 6dbbe9cf521eb5b165f1de1fc1db2a01e69e5d9b..28ab1bd63a12898c70d0b14641d06494f65377d4 100644 index f73f2ac411c0af45d7c0a4ba94222b2bd1d4841c..3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3939,6 +3939,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3947,6 +3947,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy, params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create()); base::UnguessableToken::Create());
@ -26,7 +26,7 @@ index 6dbbe9cf521eb5b165f1de1fc1db2a01e69e5d9b..28ab1bd63a12898c70d0b14641d06494
std::unique_ptr<WebContentsViewDelegate> delegate = std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this); GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3949,6 +3956,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -3957,6 +3964,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate), view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_); &render_view_host_delegate_view_);
} }

View file

@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
`api::WebContents::IsFullscreenForTabOrPending` value. `api::WebContents::IsFullscreenForTabOrPending` value.
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index 5b02e27e3ea06561ddac8ad700bf073701eab73a..31ee25e669b67198b2ca76e912eb8f7005298d0e 100644 index 7b45a0006af60400f5d8ba5b925f971cb5cf393e..5870b90b02ba5cf4b197e91ae9c9dc8fa3ebf7e4 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc --- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -8878,6 +8878,17 @@ void RenderFrameHostImpl::EnterFullscreen( @@ -8884,6 +8884,17 @@ void RenderFrameHostImpl::EnterFullscreen(
} }
} }
@ -37,10 +37,10 @@ index 5b02e27e3ea06561ddac8ad700bf073701eab73a..31ee25e669b67198b2ca76e912eb8f70
if (had_fullscreen_token && !GetView()->HasFocus()) if (had_fullscreen_token && !GetView()->HasFocus())
GetView()->Focus(); GetView()->Focus();
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 28ab1bd63a12898c70d0b14641d06494f65377d4..d28f93f09b2274923a86ac421bb12087b67b0dea 100644 index 3ec3dd8f89bb167ed82c0da95a0f1d3d9738ac72..3b9e634245986b1ef22e8bf4e116470343f5ff60 100644
--- a/content/browser/web_contents/web_contents_impl.cc --- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc
@@ -4214,21 +4214,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent( @@ -4222,21 +4222,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
const input::NativeWebKeyboardEvent& event) { const input::NativeWebKeyboardEvent& event) {
OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"), OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
"WebContentsImpl::PreHandleKeyboardEvent"); "WebContentsImpl::PreHandleKeyboardEvent");
@ -78,7 +78,7 @@ index 28ab1bd63a12898c70d0b14641d06494f65377d4..d28f93f09b2274923a86ac421bb12087
} }
bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) { bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -4387,7 +4391,7 @@ void WebContentsImpl::EnterFullscreenMode( @@ -4395,7 +4399,7 @@ void WebContentsImpl::EnterFullscreenMode(
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode"); OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
DCHECK(CanEnterFullscreenMode(requesting_frame)); DCHECK(CanEnterFullscreenMode(requesting_frame));
DCHECK(requesting_frame->IsActive()); DCHECK(requesting_frame->IsActive());

View file

@ -26,10 +26,10 @@ index 7a2d251ba2d13d0a34df176111e6524a27b87f55..cbbe0fbdd25a0f7859b113fdb3dcd9ce
// An empty URL is returned if the URL is not overriden. // An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url); virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index c1d1c8a094a9161856d12945945c31bb187fe5a2..45bd68c7c54c4465831a146ed5d4e72414c18770 100644 index 5747f9452788737375f0e67e588f98e9b89b381c..a01f865ae54476ffb55feae026329d06d0dabea8 100644
--- a/content/renderer/renderer_blink_platform_impl.cc --- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -895,6 +895,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { @@ -893,6 +893,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
} }
@ -43,10 +43,10 @@ index c1d1c8a094a9161856d12945945c31bb187fe5a2..45bd68c7c54c4465831a146ed5d4e724
const v8::Local<v8::Context>& worker) { const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread( GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index ce5aee7746ba05cdf185899f0b30e1f11f2ba45f..1b8af76a25eb06626ed7f211552eb5658d03429d 100644 index 206b8df48273a041ff7fd18f5d71e7e128f6da7d..549fdfb451ad72c5058cb0bc3be481aaff713769 100644
--- a/content/renderer/renderer_blink_platform_impl.h --- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h
@@ -198,6 +198,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -197,6 +197,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override; void DidStartWorkerThread() override;
void WillStopWorkerThread() override; void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override; void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -55,10 +55,10 @@ index ce5aee7746ba05cdf185899f0b30e1f11f2ba45f..1b8af76a25eb06626ed7f211552eb565
const blink::WebSecurityOrigin& script_origin) override; const blink::WebSecurityOrigin& script_origin) override;
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel( blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 617b7a582f1331796129f78c12558ebc81850bf9..ae2de15efaae470ec8b137323c1ad543c465c5ad 100644 index fa4beef133fd9bec1f1dc5fefdfbb240cec28621..7f3e3d7fa01d3d6cb7142ed1cd168268043052f7 100644
--- a/third_party/blink/public/platform/platform.h --- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h
@@ -672,6 +672,7 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -671,6 +671,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {} virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {} virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {} virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View file

@ -35,10 +35,10 @@ index cbbe0fbdd25a0f7859b113fdb3dcd9ce57e597d6..1345bb5008e1b4fc3a450f7e353d52ec
// from the worker thread. // from the worker thread.
virtual void WillDestroyWorkerContextOnWorkerThread( virtual void WillDestroyWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 45bd68c7c54c4465831a146ed5d4e72414c18770..e6c7f23da99c63e44d14c4eb16f6a647ad9f750e 100644 index a01f865ae54476ffb55feae026329d06d0dabea8..57eadd71e6f46bda772f5c1326df7483010089ba 100644
--- a/content/renderer/renderer_blink_platform_impl.cc --- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -907,6 +907,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( @@ -905,6 +905,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
worker); worker);
} }
@ -52,10 +52,10 @@ index 45bd68c7c54c4465831a146ed5d4e72414c18770..e6c7f23da99c63e44d14c4eb16f6a647
const blink::WebSecurityOrigin& script_origin) { const blink::WebSecurityOrigin& script_origin) {
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker( return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 1b8af76a25eb06626ed7f211552eb5658d03429d..cbaf3450fc2f56cc66413c48e178879074ea072d 100644 index 549fdfb451ad72c5058cb0bc3be481aaff713769..52a575f593ef6f59fb6f0d85f12164f02541a5ab 100644
--- a/content/renderer/renderer_blink_platform_impl.h --- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h +++ b/content/renderer/renderer_blink_platform_impl.h
@@ -198,6 +198,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { @@ -197,6 +197,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override; void DidStartWorkerThread() override;
void WillStopWorkerThread() override; void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override; void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@ -65,10 +65,10 @@ index 1b8af76a25eb06626ed7f211552eb5658d03429d..cbaf3450fc2f56cc66413c48e1788790
bool AllowScriptExtensionForServiceWorker( bool AllowScriptExtensionForServiceWorker(
const blink::WebSecurityOrigin& script_origin) override; const blink::WebSecurityOrigin& script_origin) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index ae2de15efaae470ec8b137323c1ad543c465c5ad..852e76537ebcabd37c22c17def182295e7e61bdd 100644 index 7f3e3d7fa01d3d6cb7142ed1cd168268043052f7..00682c4fe82ec77f79a4d9e70c6e7f5788083f25 100644
--- a/third_party/blink/public/platform/platform.h --- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h +++ b/third_party/blink/public/platform/platform.h
@@ -672,6 +672,8 @@ class BLINK_PLATFORM_EXPORT Platform { @@ -671,6 +671,8 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {} virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {} virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {} virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

View file

@ -15,10 +15,10 @@ include the out dir, and the linker won't be able to find ffmpeg.dylib
because of so. because of so.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
index 52b8ad2ad28c1210bad5411d9839ebb965f58032..e7486f4d724dd3446c24e98d1f014b8cc0f93990 100644 index 6af67ce26eefaf833cc7bf4a66de16f6ed5315ab..4a998334d458cdd9ab9a8874a1fa02d24298536a 100644
--- a/BUILD.gn --- a/BUILD.gn
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -451,7 +451,7 @@ if (is_component_ffmpeg) { @@ -453,7 +453,7 @@ if (is_component_ffmpeg) {
if (!is_component_build) { if (!is_component_build) {
if (is_mac) { if (is_mac) {

View file

@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
V8_INLINE static void* GetAlignedPointerFromInternalField( V8_INLINE static void* GetAlignedPointerFromInternalField(
const BasicTracedReference<Object>& object, int index) { const BasicTracedReference<Object>& object, int index) {
diff --git a/src/api/api.cc b/src/api/api.cc diff --git a/src/api/api.cc b/src/api/api.cc
index bf1066d7fbfea74693a68318aab50a4254009307..681fa7d4a99819de7926ecc740151b91ca339c5f 100644 index 0ab95ba54d1829ea0fda9a5678a906850b4b509b..2a01241d7db654098720f00a9130996e79d63261 100644
--- a/src/api/api.cc --- a/src/api/api.cc
+++ b/src/api/api.cc +++ b/src/api/api.cc
@@ -6309,14 +6309,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) { @@ -6313,14 +6313,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate)); i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
} }

View file

@ -36,7 +36,7 @@ for desktop capturer. This change re-enables that fallback, which was
previously default behavior. previously default behavior.
diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc diff --git a/modules/desktop_capture/desktop_capturer.cc b/modules/desktop_capture/desktop_capturer.cc
index 45c13751aadb108325836efeca7edbbcb672c1fd..7569900495bfacaa27e6ec2a57cb4f283bbfc827 100644 index 94605f409cd1523036f3e7d167a8d1f3c030e586..fae73654c84a7a8185ddf7255b49a86f6b239404 100644
--- a/modules/desktop_capture/desktop_capturer.cc --- a/modules/desktop_capture/desktop_capturer.cc
+++ b/modules/desktop_capture/desktop_capturer.cc +++ b/modules/desktop_capture/desktop_capturer.cc
@@ -117,7 +117,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateGenericCapturer( @@ -117,7 +117,7 @@ std::unique_ptr<DesktopCapturer> DesktopCapturer::CreateGenericCapturer(

View file

@ -48,11 +48,11 @@ void ElectronCrashReporterClient::Create() {
// By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate // By setting the BREAKPAD_DUMP_LOCATION environment variable, an alternate
// location to write crash dumps can be set. // location to write crash dumps can be set.
auto env = base::Environment::Create(); auto env = base::Environment::Create();
std::string alternate_crash_dump_location;
base::FilePath crash_dumps_dir_path; base::FilePath crash_dumps_dir_path;
if (env->GetVar("BREAKPAD_DUMP_LOCATION", &alternate_crash_dump_location)) { if (std::optional<std::string> alternate_crash_dump_location =
env->GetVar("BREAKPAD_DUMP_LOCATION")) {
crash_dumps_dir_path = crash_dumps_dir_path =
base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location); base::FilePath::FromUTF8Unsafe(alternate_crash_dump_location.value());
} }
if (!crash_dumps_dir_path.empty()) { if (!crash_dumps_dir_path.empty()) {
electron::ScopedAllowBlockingForElectron allow_blocking; electron::ScopedAllowBlockingForElectron allow_blocking;

View file

@ -151,13 +151,18 @@ int NodeMain() {
#endif #endif
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
std::string fd_string, pid_string; int pid = -1;
if (os_env->GetVar("CRASHDUMP_SIGNAL_FD", &fd_string) && auto* command_line = base::CommandLine::ForCurrentProcess();
os_env->GetVar("CRASHPAD_HANDLER_PID", &pid_string)) { std::optional<std::string> fd_string = os_env->GetVar("CRASHDUMP_SIGNAL_FD");
int fd = -1, pid = -1; std::optional<std::string> pid_string =
DCHECK(base::StringToInt(fd_string, &fd)); os_env->GetVar("CRASHPAD_HANDLER_PID");
DCHECK(base::StringToInt(pid_string, &pid)); if (fd_string && pid_string) {
int fd = -1;
DCHECK(base::StringToInt(fd_string.value(), &fd));
DCHECK(base::StringToInt(pid_string.value(), &pid));
base::GlobalDescriptors::GetInstance()->Set(kCrashDumpSignal, fd); base::GlobalDescriptors::GetInstance()->Set(kCrashDumpSignal, fd);
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid, pid_string.value());
// Following API is unsafe in multi-threaded scenario, but at this point // Following API is unsafe in multi-threaded scenario, but at this point
// we are still single threaded. // we are still single threaded.
os_env->UnSetVar("CRASHDUMP_SIGNAL_FD"); os_env->UnSetVar("CRASHDUMP_SIGNAL_FD");
@ -200,10 +205,7 @@ int NodeMain() {
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
// On Linux, initialize crashpad after Nodejs init phase so that // On Linux, initialize crashpad after Nodejs init phase so that
// crash and termination signal handlers can be set by the crashpad client. // crash and termination signal handlers can be set by the crashpad client.
if (!pid_string.empty()) { if (pid != -1) {
auto* command_line = base::CommandLine::ForCurrentProcess();
command_line->AppendSwitchASCII(
crash_reporter::switches::kCrashpadHandlerPid, pid_string);
ElectronCrashReporterClient::Create(); ElectronCrashReporterClient::Create();
crash_reporter::InitializeCrashpad(false, "node"); crash_reporter::InitializeCrashpad(false, "node");
crash_keys::SetCrashKeysFromCommandLine( crash_keys::SetCrashKeysFromCommandLine(

View file

@ -79,11 +79,12 @@ bool SetDefaultWebClient(const std::string& protocol) {
argv.emplace_back(kXdgSettingsDefaultSchemeHandler); argv.emplace_back(kXdgSettingsDefaultSchemeHandler);
argv.emplace_back(protocol); argv.emplace_back(protocol);
} }
std::string desktop_name;
if (!env->GetVar("CHROME_DESKTOP", &desktop_name)) { if (std::optional<std::string> desktop_name = env->GetVar("CHROME_DESKTOP")) {
argv.emplace_back(desktop_name.value());
} else {
return false; return false;
} }
argv.emplace_back(desktop_name);
int exit_code; int exit_code;
bool ran_ok = LaunchXdgUtility(argv, &exit_code); bool ran_ok = LaunchXdgUtility(argv, &exit_code);
@ -108,12 +109,13 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
if (protocol.empty()) if (protocol.empty())
return false; return false;
std::string desktop_name; std::vector<std::string> argv = {kXdgSettings, "check",
if (!env->GetVar("CHROME_DESKTOP", &desktop_name)) kXdgSettingsDefaultSchemeHandler, protocol};
if (std::optional<std::string> desktop_name = env->GetVar("CHROME_DESKTOP")) {
argv.emplace_back(desktop_name.value());
} else {
return false; return false;
const std::vector<std::string> argv = {kXdgSettings, "check", }
kXdgSettingsDefaultSchemeHandler,
protocol, desktop_name};
// Allow any reply that starts with "yes". // Allow any reply that starts with "yes".
const std::optional<std::string> output = GetXdgAppOutput(argv); const std::optional<std::string> output = GetXdgAppOutput(argv);
return output && output->starts_with("yes"); return output && output->starts_with("yes");

View file

@ -600,8 +600,7 @@ void ElectronBrowserClient::AppendExtraCommandLineSwitches(
// attempt to get api key from env // attempt to get api key from env
std::string ElectronBrowserClient::GetGeolocationApiKey() { std::string ElectronBrowserClient::GetGeolocationApiKey() {
auto env = base::Environment::Create(); auto env = base::Environment::Create();
std::string api_key; std::string api_key = env->GetVar("GOOGLE_API_KEY").value_or("");
env->GetVar("GOOGLE_API_KEY", &api_key);
return api_key; return api_key;
} }

View file

@ -308,9 +308,7 @@ int ElectronBrowserMainParts::PreCreateThreads() {
auto env = base::Environment::Create(); auto env = base::Environment::Create();
std::optional<std::string> lc_all; std::optional<std::string> lc_all;
if (!locale.empty()) { if (!locale.empty()) {
std::string str; lc_all = env->GetVar("LC_ALL");
if (env->GetVar("LC_ALL", &str))
lc_all.emplace(std::move(str));
env->SetVar("LC_ALL", locale); env->SetVar("LC_ALL", locale);
} }
#endif #endif

View file

@ -30,20 +30,15 @@ constexpr std::string_view kElectronOzonePlatformHint{
constexpr char kPlatformWayland[] = "wayland"; constexpr char kPlatformWayland[] = "wayland";
bool HasWaylandDisplay(base::Environment* env) { bool HasWaylandDisplay(base::Environment* env) {
std::string wayland_display; if (std::optional<std::string> wayland_display =
const bool has_wayland_display = env->GetVar("WAYLAND_DISPLAY")) {
env->GetVar("WAYLAND_DISPLAY", &wayland_display) &&
!wayland_display.empty();
if (has_wayland_display)
return true; return true;
}
std::string xdg_runtime_dir; if (std::optional<std::string> xdg_runtime_dir =
const bool has_xdg_runtime_dir = env->GetVar("XDG_RUNTIME_DIR")) {
env->GetVar("XDG_RUNTIME_DIR", &xdg_runtime_dir) &&
!xdg_runtime_dir.empty();
if (has_xdg_runtime_dir) {
auto wayland_server_pipe = auto wayland_server_pipe =
base::FilePath(xdg_runtime_dir).Append("wayland-0"); base::FilePath(*xdg_runtime_dir).Append("wayland-0");
// Normally, this should happen exactly once, at the startup of the main // Normally, this should happen exactly once, at the startup of the main
// process. // process.
electron::ScopedAllowBlockingForElectron allow_blocking; electron::ScopedAllowBlockingForElectron allow_blocking;
@ -77,12 +72,9 @@ std::string MaybeFixPlatformName(const std::string& ozone_platform_hint) {
ozone_platform_hint == "auto") { ozone_platform_hint == "auto") {
auto env(base::Environment::Create()); auto env(base::Environment::Create());
std::string xdg_session_type; std::optional<std::string> xdg_session_type =
const bool has_xdg_session_type = env->GetVar(base::nix::kXdgSessionTypeEnvVar);
env->GetVar(base::nix::kXdgSessionTypeEnvVar, &xdg_session_type) && if ((xdg_session_type.has_value() && *xdg_session_type == "wayland") ||
!xdg_session_type.empty();
if ((has_xdg_session_type && xdg_session_type == "wayland") ||
(ozone_platform_hint == kPlatformWayland && (ozone_platform_hint == kPlatformWayland &&
HasWaylandDisplay(env.get()))) { HasWaylandDisplay(env.get()))) {
return kPlatformWayland; return kPlatformWayland;
@ -127,7 +119,8 @@ void ElectronBrowserMainParts::DetectOzonePlatform() {
auto ozone_platform_hint = auto ozone_platform_hint =
command_line->GetSwitchValueASCII(switches::kOzonePlatformHint); command_line->GetSwitchValueASCII(switches::kOzonePlatformHint);
if (ozone_platform_hint.empty()) { if (ozone_platform_hint.empty()) {
env->GetVar(kElectronOzonePlatformHint, &ozone_platform_hint); ozone_platform_hint =
env->GetVar(kElectronOzonePlatformHint).value_or("");
} }
if (!ozone_platform_hint.empty()) { if (!ozone_platform_hint.empty()) {
command_line->AppendSwitchASCII( command_line->AppendSwitchASCII(
@ -135,9 +128,9 @@ void ElectronBrowserMainParts::DetectOzonePlatform() {
} }
} }
std::string desktop_startup_id; if (std::optional<std::string> desktop_startup_id =
if (env->GetVar("DESKTOP_STARTUP_ID", &desktop_startup_id)) env->GetVar("DESKTOP_STARTUP_ID"))
command_line->AppendSwitchASCII("desktop-startup-id", desktop_startup_id); command_line->AppendSwitchASCII("desktop-startup-id", *desktop_startup_id);
} }
} // namespace electron } // namespace electron

View file

@ -9,9 +9,9 @@
namespace { namespace {
v8::Local<v8::Value> GetVar(v8::Isolate* isolate, const std::string& name) { v8::Local<v8::Value> GetVar(v8::Isolate* isolate, const std::string& name) {
std::string value; if (std::optional<std::string> value =
if (base::Environment::Create()->GetVar(name, &value)) { base::Environment::Create()->GetVar(name)) {
return gin::StringToV8(isolate, value); return gin::StringToV8(isolate, *value);
} else { } else {
return v8::Null(isolate); return v8::Null(isolate);
} }

View file

@ -18,9 +18,8 @@ namespace {
GDesktopAppInfo* get_desktop_app_info() { GDesktopAppInfo* get_desktop_app_info() {
GDesktopAppInfo* ret = nullptr; GDesktopAppInfo* ret = nullptr;
std::string desktop_id; if (std::optional<std::string> desktop_id = platform_util::GetDesktopName())
if (platform_util::GetDesktopName(&desktop_id)) ret = g_desktop_app_info_new(desktop_id->c_str());
ret = g_desktop_app_info_new(desktop_id.c_str());
return ret; return ret;
} }

View file

@ -25,7 +25,7 @@ constexpr std::string_view kElectronEnableLogging{"ELECTRON_ENABLE_LOGGING"};
base::FilePath GetLogFileName(const base::CommandLine& command_line) { base::FilePath GetLogFileName(const base::CommandLine& command_line) {
std::string filename = command_line.GetSwitchValueASCII(switches::kLogFile); std::string filename = command_line.GetSwitchValueASCII(switches::kLogFile);
if (filename.empty()) if (filename.empty())
base::Environment::Create()->GetVar(kLogFileName, &filename); filename = base::Environment::Create()->GetVar(kLogFileName).value_or("");
if (!filename.empty()) if (!filename.empty())
return base::FilePath::FromUTF8Unsafe(filename); return base::FilePath::FromUTF8Unsafe(filename);
@ -43,7 +43,7 @@ namespace {
bool HasExplicitLogFile(const base::CommandLine& command_line) { bool HasExplicitLogFile(const base::CommandLine& command_line) {
std::string filename = command_line.GetSwitchValueASCII(switches::kLogFile); std::string filename = command_line.GetSwitchValueASCII(switches::kLogFile);
if (filename.empty()) if (filename.empty())
base::Environment::Create()->GetVar(kLogFileName, &filename); filename = base::Environment::Create()->GetVar(kLogFileName).value_or("");
return !filename.empty(); return !filename.empty();
} }
@ -60,7 +60,7 @@ LoggingDestination DetermineLoggingDestination(
auto env = base::Environment::Create(); auto env = base::Environment::Create();
if (env->HasVar(kElectronEnableLogging)) { if (env->HasVar(kElectronEnableLogging)) {
enable_logging = true; enable_logging = true;
env->GetVar(kElectronEnableLogging, &logging_destination); logging_destination = env->GetVar(kElectronEnableLogging).value();
} }
} }
if (!enable_logging) if (!enable_logging)
@ -68,11 +68,9 @@ LoggingDestination DetermineLoggingDestination(
bool also_log_to_stderr = false; bool also_log_to_stderr = false;
#if !defined(NDEBUG) #if !defined(NDEBUG)
std::string also_log_to_stderr_str; if (std::optional<std::string> also_log_to_stderr_str =
if (base::Environment::Create()->GetVar("ELECTRON_ALSO_LOG_TO_STDERR", base::Environment::Create()->GetVar("ELECTRON_ALSO_LOG_TO_STDERR"))
&also_log_to_stderr_str) && also_log_to_stderr = !also_log_to_stderr_str->empty();
!also_log_to_stderr_str.empty())
also_log_to_stderr = true;
#endif #endif
// --enable-logging logs to stderr, --enable-logging=file logs to a file. // --enable-logging logs to stderr, --enable-logging=file logs to a file.

View file

@ -394,9 +394,8 @@ void SetNodeOptions(base::Environment* env) {
if (env->HasVar("NODE_OPTIONS")) { if (env->HasVar("NODE_OPTIONS")) {
if (electron::fuses::IsNodeOptionsEnabled()) { if (electron::fuses::IsNodeOptionsEnabled()) {
std::string options;
std::string result_options; std::string result_options;
env->GetVar("NODE_OPTIONS", &options); std::string options = env->GetVar("NODE_OPTIONS").value();
const std::vector<std::string_view> parts = base::SplitStringPiece( const std::vector<std::string_view> parts = base::SplitStringPiece(
options, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY); options, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_NONEMPTY);

View file

@ -5,6 +5,7 @@
#ifndef ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_ #ifndef ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_
#define ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_ #define ELECTRON_SHELL_COMMON_PLATFORM_UTIL_H_
#include <optional>
#include <string> #include <string>
#include "base/files/file_path.h" #include "base/files/file_path.h"
@ -57,9 +58,9 @@ bool SetLoginItemEnabled(const std::string& type,
#endif #endif
#if BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_LINUX)
// Returns a success flag. // Returns a desktop name if available.
// Unlike libgtkui, does *not* use "chromium-browser.desktop" as a fallback. // Unlike libgtkui, does *not* use "chromium-browser.desktop" as a fallback.
bool GetDesktopName(std::string* setme); std::optional<std::string> GetDesktopName();
// The XDG application ID must match the name of the desktop entry file without // The XDG application ID must match the name of the desktop entry file without
// the .desktop extension. // the .desktop extension.

View file

@ -377,8 +377,8 @@ bool MoveItemToTrash(const base::FilePath& full_path, bool delete_on_fail) {
auto env = base::Environment::Create(); auto env = base::Environment::Create();
// find the trash method // find the trash method
std::string trash; std::string trash = env->GetVar(ELECTRON_TRASH).value_or("");
if (!env->GetVar(ELECTRON_TRASH, &trash)) { if (trash.empty()) {
// Determine desktop environment and set accordingly. // Determine desktop environment and set accordingly.
const auto desktop_env(base::nix::GetDesktopEnvironment(env.get())); const auto desktop_env(base::nix::GetDesktopEnvironment(env.get()));
if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_KDE4 || if (desktop_env == base::nix::DESKTOP_ENVIRONMENT_KDE4 ||
@ -424,22 +424,22 @@ void Beep() {
gdk_display_beep(display); gdk_display_beep(display);
} }
bool GetDesktopName(std::string* setme) { std::optional<std::string> GetDesktopName() {
return base::Environment::Create()->GetVar("CHROME_DESKTOP", setme); return base::Environment::Create()->GetVar("CHROME_DESKTOP");
} }
std::string GetXdgAppId() { std::string GetXdgAppId() {
std::string desktop_file_name; if (std::optional<std::string> desktop_file_name = GetDesktopName()) {
if (GetDesktopName(&desktop_file_name)) {
const std::string kDesktopExtension{".desktop"}; const std::string kDesktopExtension{".desktop"};
if (base::EndsWith(desktop_file_name, kDesktopExtension, if (base::EndsWith(*desktop_file_name, kDesktopExtension,
base::CompareCase::INSENSITIVE_ASCII)) { base::CompareCase::INSENSITIVE_ASCII)) {
desktop_file_name.resize(desktop_file_name.size() - desktop_file_name->resize(desktop_file_name->size() -
kDesktopExtension.size()); kDesktopExtension.size());
} }
return *desktop_file_name;
} }
return desktop_file_name; return "";
} }
} // namespace platform_util } // namespace platform_util