Browse Source

chore: bump chromium to 135.0.7027.0 (main) (#45677)

* chore: bump chromium in DEPS to 135.0.7021.0

* chore: bump chromium in DEPS to 135.0.7023.0

* chore: update patches

* chore: gen-libc++-filenames.js

* [Extensions] Add a BUILD.gn file for the chrome.system.display API.

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

* chore: bump chromium in DEPS to 135.0.7025.0

* fixup! [Extensions] Add a BUILD.gn file for the chrome.system.display API.

* [DevTools] Add support for automatic workspace folders.

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

* Add UseCounter for potential PNA 2.0 breakage

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

* Remove references to NavigationEntry/Controller in Zoom code.

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

* chore: update patches

* Allow DevTools to record UmaHistogramMediumTimes

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

* chore: update patches

* [gpu] Remove unnecessary media_buildflags include

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

* chore: bump chromium in DEPS to 135.0.7027.0

* chore: update patches

* Remove type alias

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

* [Refactor] Make ExtensionRegistrar a browser keyed service.

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

* Remove unused functions

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

* chore: IWYU

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <[email protected]>
electron-roller[bot] 1 month ago
parent
commit
612da3ec47
78 changed files with 347 additions and 575 deletions
  1. 1 1
      DEPS
  2. 0 2
      filenames.gni
  3. 7 0
      filenames.libcxx.gni
  4. 3 3
      patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch
  5. 0 1
      patches/chromium/.patches
  6. 13 13
      patches/chromium/add_didinstallconditionalfeatures.patch
  7. 0 216
      patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
  8. 5 5
      patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch
  9. 12 12
      patches/chromium/adjust_accessibility_ui_for_electron.patch
  10. 1 1
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  11. 2 2
      patches/chromium/build_add_electron_tracing_category.patch
  12. 2 2
      patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch
  13. 7 7
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  14. 1 1
      patches/chromium/build_libc_as_static_library.patch
  15. 19 19
      patches/chromium/can_create_window.patch
  16. 2 2
      patches/chromium/chore_partial_revert_of.patch
  17. 1 1
      patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch
  18. 10 10
      patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch
  19. 1 1
      patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch
  20. 5 5
      patches/chromium/desktop_media_list.patch
  21. 2 2
      patches/chromium/disable_compositor_recycling.patch
  22. 6 6
      patches/chromium/disable_hidden.patch
  23. 1 1
      patches/chromium/dump_syms.patch
  24. 5 5
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  25. 14 14
      patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch
  26. 5 5
      patches/chromium/feat_configure_launch_options_for_service_process.patch
  27. 7 7
      patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch
  28. 2 2
      patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch
  29. 1 1
      patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch
  30. 5 5
      patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch
  31. 2 2
      patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
  32. 2 2
      patches/chromium/fix_add_method_which_disables_headless_mode_on_native_widget.patch
  33. 5 5
      patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
  34. 7 7
      patches/chromium/fix_disabling_background_throttling_in_compositor.patch
  35. 6 6
      patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
  36. 2 2
      patches/chromium/fix_restore_original_resize_performance_on_macos.patch
  37. 5 5
      patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch
  38. 3 3
      patches/chromium/fix_use_delegated_generic_capturer_when_available.patch
  39. 4 4
      patches/chromium/frame_host_manager.patch
  40. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  41. 1 1
      patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
  42. 1 1
      patches/chromium/ignore_parse_errors_for_pkey_appusermodel_toastactivatorclsid.patch
  43. 3 3
      patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch
  44. 1 1
      patches/chromium/load_v8_snapshot_in_browser_process.patch
  45. 35 35
      patches/chromium/mas_avoid_private_macos_api_usage.patch.patch
  46. 6 6
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  47. 5 5
      patches/chromium/notification_provenance.patch
  48. 2 2
      patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch
  49. 1 1
      patches/chromium/port_autofill_colors_to_the_color_pipeline.patch
  50. 2 2
      patches/chromium/printing.patch
  51. 8 8
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  52. 1 1
      patches/chromium/refactor_expose_file_system_access_blocklist.patch
  53. 2 2
      patches/chromium/refactor_unfilter_unresponsive_events.patch
  54. 7 7
      patches/chromium/render_widget_host_view_base.patch
  55. 1 1
      patches/chromium/render_widget_host_view_mac.patch
  56. 6 6
      patches/chromium/resource_file_conflict.patch
  57. 6 6
      patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
  58. 2 2
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  59. 3 3
      patches/chromium/web_contents.patch
  60. 6 6
      patches/chromium/webview_fullscreen.patch
  61. 4 4
      patches/chromium/worker_context_will_destroy.patch
  62. 4 4
      patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch
  63. 3 3
      patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch
  64. 2 2
      patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch
  65. 1 1
      shell/browser/electron_browser_client.cc
  66. 2 1
      shell/browser/electron_browser_client.h
  67. 0 11
      shell/browser/extensions/electron_display_info_provider.cc
  68. 0 24
      shell/browser/extensions/electron_display_info_provider.h
  69. 8 5
      shell/browser/extensions/electron_extension_loader.cc
  70. 2 2
      shell/browser/extensions/electron_extension_loader.h
  71. 1 1
      shell/browser/login_handler.cc
  72. 11 10
      shell/browser/login_handler.h
  73. 5 0
      shell/browser/net/url_loader_network_observer.h
  74. 8 0
      shell/browser/ui/inspectable_web_contents.h
  75. 12 16
      shell/browser/web_contents_zoom_controller.cc
  76. 5 0
      shell/common/api/electron_api_url_loader.h
  77. 1 2
      shell/common/gin_helper/callback.cc
  78. 1 0
      shell/renderer/api/electron_api_web_frame.cc

+ 1 - 1
DEPS

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

+ 0 - 2
filenames.gni

@@ -757,8 +757,6 @@ filenames = {
     "shell/browser/extensions/electron_browser_context_keyed_service_factories.h",
     "shell/browser/extensions/electron_component_extension_resource_manager.cc",
     "shell/browser/extensions/electron_component_extension_resource_manager.h",
-    "shell/browser/extensions/electron_display_info_provider.cc",
-    "shell/browser/extensions/electron_display_info_provider.h",
     "shell/browser/extensions/electron_extension_host_delegate.cc",
     "shell/browser/extensions/electron_extension_host_delegate.h",
     "shell/browser/extensions/electron_extension_loader.cc",

+ 7 - 0
filenames.libcxx.gni

@@ -271,11 +271,13 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__chrono/steady_clock.h",
   "//third_party/libc++/src/include/__chrono/sys_info.h",
   "//third_party/libc++/src/include/__chrono/system_clock.h",
+  "//third_party/libc++/src/include/__chrono/tai_clock.h",
   "//third_party/libc++/src/include/__chrono/time_point.h",
   "//third_party/libc++/src/include/__chrono/time_zone.h",
   "//third_party/libc++/src/include/__chrono/time_zone_link.h",
   "//third_party/libc++/src/include/__chrono/tzdb.h",
   "//third_party/libc++/src/include/__chrono/tzdb_list.h",
+  "//third_party/libc++/src/include/__chrono/utc_clock.h",
   "//third_party/libc++/src/include/__chrono/weekday.h",
   "//third_party/libc++/src/include/__chrono/year.h",
   "//third_party/libc++/src/include/__chrono/year_month.h",
@@ -1382,8 +1384,11 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__filesystem/space_info.h",
   "//third_party/libc++/src/include/__filesystem/u8path.h",
   "//third_party/libc++/src/include/__flat_map/flat_map.h",
+  "//third_party/libc++/src/include/__flat_map/flat_multimap.h",
   "//third_party/libc++/src/include/__flat_map/key_value_iterator.h",
+  "//third_party/libc++/src/include/__flat_map/sorted_equivalent.h",
   "//third_party/libc++/src/include/__flat_map/sorted_unique.h",
+  "//third_party/libc++/src/include/__flat_map/utils.h",
   "//third_party/libc++/src/include/__format/buffer.h",
   "//third_party/libc++/src/include/__format/concepts.h",
   "//third_party/libc++/src/include/__format/container_adaptor.h",
@@ -1573,12 +1578,14 @@ libcxx_headers = [
   "//third_party/libc++/src/include/__memory/compressed_pair.h",
   "//third_party/libc++/src/include/__memory/concepts.h",
   "//third_party/libc++/src/include/__memory/construct_at.h",
+  "//third_party/libc++/src/include/__memory/destroy.h",
   "//third_party/libc++/src/include/__memory/destruct_n.h",
   "//third_party/libc++/src/include/__memory/inout_ptr.h",
   "//third_party/libc++/src/include/__memory/noexcept_move_assign_container.h",
   "//third_party/libc++/src/include/__memory/out_ptr.h",
   "//third_party/libc++/src/include/__memory/pointer_traits.h",
   "//third_party/libc++/src/include/__memory/ranges_construct_at.h",
+  "//third_party/libc++/src/include/__memory/ranges_destroy.h",
   "//third_party/libc++/src/include/__memory/ranges_uninitialized_algorithms.h",
   "//third_party/libc++/src/include/__memory/raw_storage_iterator.h",
   "//third_party/libc++/src/include/__memory/shared_count.h",

+ 3 - 3
patches/boringssl/revert_track_ssl_error_zero_return_explicitly.patch

@@ -20,10 +20,10 @@ index 2cdcbc346175eeee69402ecee7f169e61c655199..f7226fe711e4214b216ea2c5173a0212
  
      case ssl_open_record_error:
 diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
-index 98bd21eed9b71d2339c1fbc19a294cc0f00fe43b..87b6a657b4a5a5423299febb703ea5122be0bf9c 100644
+index c859ea612ce2e6be80c6351d85fae230ca5bc2dd..5f4ffedb3b19dee4eef62e2033b0000847167111 100644
 --- a/ssl/ssl_lib.cc
 +++ b/ssl/ssl_lib.cc
-@@ -1198,7 +1198,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
+@@ -1196,7 +1196,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
    }
  
    if (ret_code == 0) {
@@ -32,7 +32,7 @@ index 98bd21eed9b71d2339c1fbc19a294cc0f00fe43b..87b6a657b4a5a5423299febb703ea512
        return SSL_ERROR_ZERO_RETURN;
      }
      // An EOF was observed which violates the protocol, and the underlying
-@@ -2565,13 +2565,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
+@@ -2563,13 +2563,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
    return CRYPTO_get_ex_data(&ctx->ex_data, idx);
  }
  

+ 0 - 1
patches/chromium/.patches

@@ -84,7 +84,6 @@ disable_freezing_flags_after_init_in_node.patch
 short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
 chore_add_electron_deps_to_gitignores.patch
 chore_allow_chromium_to_handle_synthetic_mouse_events_for_touch.patch
-add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
 add_electron_deps_to_license_credits_file.patch
 fix_crash_loading_non-standard_schemes_in_iframes.patch
 create_browser_v8_snapshot_file_name_fuse.patch

+ 13 - 13
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
 context, which can cause some preload scripts to trip.
 
 diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
-index bb4d6c56978469d3c2efb4b2d519a7a69ef538b0..b164e89a394df060f6154ad2acadf15dc1f48fc6 100644
+index 44da0544b778d6ff4c14b6f4e8463cb8260d2f0d..8ae8939af4141a684b7a6d50a43e1abb354ea028 100644
 --- a/content/public/renderer/render_frame_observer.h
 +++ b/content/public/renderer/render_frame_observer.h
 @@ -149,6 +149,8 @@ class CONTENT_EXPORT RenderFrameObserver
@@ -23,10 +23,10 @@ index bb4d6c56978469d3c2efb4b2d519a7a69ef538b0..b164e89a394df060f6154ad2acadf15d
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 51d32ef662315d4a9dcc544093dd1d5e93d39c6f..827f64a8b4299222ff1e9c2ee492bbdea5c1cc32 100644
+index 76ab61d5d388b70a0da0999ff2d2ea97f39f6fc6..0d7e92d25f4ba3b9375b590d8f7dd2955fb1bf78 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4780,6 +4780,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -4786,6 +4786,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -40,10 +40,10 @@ index 51d32ef662315d4a9dcc544093dd1d5e93d39c6f..827f64a8b4299222ff1e9c2ee492bbde
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index e4ac51a559845b299c10410adad7163a4bb1d80e..9fcc915ebb81d9008db4196560ed382e7aeb1b6e 100644
+index add44302103a44dc5d14f79a4087a9b0a11fc239..5705d51eb4edc7a2534682dffe43ca9dc0dfe98b 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
-@@ -652,6 +652,8 @@ class CONTENT_EXPORT RenderFrameImpl
+@@ -653,6 +653,8 @@ class CONTENT_EXPORT RenderFrameImpl
    void DidObserveLayoutShift(double score, bool after_input_or_scroll) override;
    void DidCreateScriptContext(v8::Local<v8::Context> context,
                                int world_id) override;
@@ -53,10 +53,10 @@ index e4ac51a559845b299c10410adad7163a4bb1d80e..9fcc915ebb81d9008db4196560ed382e
                                  int world_id) override;
    void DidChangeScrollOffset() override;
 diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
-index e0791aeed4ae6bee2451036682bff355c189c530..8d63259537e5b7a892a065b3c0ad42229284e252 100644
+index cfa2a64d94d5d48351ba039a9552b701702c0fec..88bf84d812eda3373c8435a714265d5099270a3f 100644
 --- a/third_party/blink/public/web/web_local_frame_client.h
 +++ b/third_party/blink/public/web/web_local_frame_client.h
-@@ -663,6 +663,9 @@ class BLINK_EXPORT WebLocalFrameClient {
+@@ -664,6 +664,9 @@ class BLINK_EXPORT WebLocalFrameClient {
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) {}
  
@@ -79,10 +79,10 @@ index f7e0144c74f879e9b29871d7c372b99e127966bb..c3cd7b77ed282f212a56d151dc3fbec3
    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 cae725c13d9035d44347f679dfeeaae65d3dfdff..0446107a44351c92346151e72e1202cc84b7f556 100644
+index 8bb6b0465069529f79aaec21792e8b159535b3e9..f9782531c639d07002dda07732750a0007109468 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
-@@ -300,6 +300,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
+@@ -299,6 +299,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
  
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index cae725c13d9035d44347f679dfeeaae65d3dfdff..0446107a44351c92346151e72e1202cc
                                          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 fc0114fc50bcc54788462015454644ff91c6d644..27fa62ebf059fa657d38d8b100f431c46c503bef 100644
+index cfcabe9a443adae146c816419e0845cb6fc18404..717587c2cfe0b0228ae40adce04139cb54a34d0e 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
 @@ -296,6 +296,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,10 +110,10 @@ index fc0114fc50bcc54788462015454644ff91c6d644..27fa62ebf059fa657d38d8b100f431c4
      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 4b8bdefc3ae0d70f72bc922009aecebeca88edd7..25d8a758401a5a28429b8c387768fdab467c584c 100644
+index 4c7375a27a22f04694e14fecc17d633734d4cccc..ea2a32b151aaf07b5704e463d01714eb41680afb 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
-@@ -81,6 +81,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
+@@ -82,6 +82,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override;
@@ -123,7 +123,7 @@ index 4b8bdefc3ae0d70f72bc922009aecebeca88edd7..25d8a758401a5a28429b8c387768fdab
                                  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 2d2e02500d44b1738dae8840f86bd61fbe9b5456..0b4ebb4f86cb2ff1e704495c7b0800d9c63b03f4 100644
+index 6b967bd0b430732732ef30fb404e615a55c7c364..6bba885bca8f65744bcd03efcb98725649687856 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
 @@ -415,6 +415,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

+ 0 - 216
patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

@@ -1,216 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: msizanoen1 <[email protected]>
-Date: Tue, 19 Jul 2022 05:11:06 +0200
-Subject: Add maximized parameter to LinuxUI::GetWindowFrameProvider
-
-This allows ClientFrameViewLinux to instruct the toolkit to draw the window
-decorations in maximized mode where needed, preventing empty space caused
-by decoration shadows and rounded titlebars around the window while maximized.
-
-diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
-index 771c253082e2ab1103fd22218d56bf1a8d5ba7ab..d50528171925436a34ddd61ff7a0e7dee998d10c 100644
---- a/ui/gtk/gtk_ui.cc
-+++ b/ui/gtk/gtk_ui.cc
-@@ -584,11 +584,12 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
- }
- 
- ui::WindowFrameProvider* GtkUi::GetWindowFrameProvider(bool solid_frame,
--                                                       bool tiled) {
--  auto& provider = frame_providers_[solid_frame][tiled];
-+                                                       bool tiled,
-+                                                       bool maximized) {
-+  auto& provider = frame_providers_[solid_frame][tiled][maximized];
-   if (!provider) {
-     provider =
--        std::make_unique<gtk::WindowFrameProviderGtk>(solid_frame, tiled);
-+        std::make_unique<gtk::WindowFrameProviderGtk>(solid_frame, tiled, maximized);
-   }
-   return provider.get();
- }
-diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
-index 32051374590fc1179e5cfa21ebc34474d2ce0190..09e9399a67d30d4686f4c141050538b8dde9f301 100644
---- a/ui/gtk/gtk_ui.h
-+++ b/ui/gtk/gtk_ui.h
-@@ -110,7 +110,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
-   void SetAccentColor(std::optional<SkColor> accent_color) override;
-   std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
-   ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
--                                                  bool tiled) override;
-+                                                  bool tiled,
-+                                                  bool maximized) override;
- 
-  private:
-   using TintMap = std::map<int, color_utils::HSL>;
-@@ -199,7 +200,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
-   // while Chrome is running.  This 2D array is indexed first by whether the
-   // frame is translucent (0) or solid(1), then by whether the frame is normal
-   // (0) or tiled (1).
--  std::unique_ptr<ui::WindowFrameProvider> frame_providers_[2][2];
-+  std::unique_ptr<ui::WindowFrameProvider> frame_providers_[2][2][2];
- 
-   // Objects to notify when the window frame button order changes.
-   base::ObserverList<ui::WindowButtonOrderObserver>::Unchecked
-diff --git a/ui/gtk/window_frame_provider_gtk.cc b/ui/gtk/window_frame_provider_gtk.cc
-index e24cce85b453ecee9a4854bfdf7b8eeb6814f8c3..d3e3e9b918011c433b4ac6ded245803410ccb5d4 100644
---- a/ui/gtk/window_frame_provider_gtk.cc
-+++ b/ui/gtk/window_frame_provider_gtk.cc
-@@ -29,20 +29,23 @@ constexpr int kMaxFrameSizeDip = 64;
- // will get an incorrect hint as to which pixels are fully opaque.
- constexpr int kMaxCornerRadiusDip = 32;
- 
--GtkCssContext WindowContext(bool solid_frame, bool tiled, bool focused) {
-+GtkCssContext WindowContext(bool solid_frame, bool tiled, bool maximized, bool focused) {
-   std::string selector = "window.background.";
-   selector += solid_frame ? "solid-csd" : "csd";
-   if (tiled) {
-     selector += ".tiled";
-   }
-+  if (maximized) {
-+    selector += ".maximized";
-+  }
-   if (!focused) {
-     selector += ":inactive";
-   }
-   return AppendCssNodeToStyleContext({}, selector);
- }
- 
--GtkCssContext DecorationContext(bool solid_frame, bool tiled, bool focused) {
--  auto context = WindowContext(solid_frame, tiled, focused);
-+GtkCssContext DecorationContext(bool solid_frame, bool tiled, bool maximized, bool focused) {
-+  auto context = WindowContext(solid_frame, tiled, maximized, focused);
-   // GTK4 renders the decoration directly on the window.
-   if (!GtkCheckVersion(4)) {
-     context = AppendCssNodeToStyleContext(context, "decoration");
-@@ -61,8 +64,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool tiled, bool focused) {
-   return context;
- }
- 
--GtkCssContext HeaderContext(bool solid_frame, bool tiled, bool focused) {
--  auto context = WindowContext(solid_frame, tiled, focused);
-+GtkCssContext HeaderContext(bool solid_frame, bool tiled, bool maximized, bool focused) {
-+  auto context = WindowContext(solid_frame, tiled, maximized, focused);
-   context =
-       AppendCssNodeToStyleContext(context, "headerbar.header-bar.titlebar");
-   if (!focused) {
-@@ -117,8 +120,8 @@ int ComputeTopCornerRadius() {
-   // need to experimentally determine the corner radius by rendering a sample.
-   // Additionally, in GTK4, the headerbar corners get clipped by the window
-   // rather than the headerbar having its own rounded corners.
--  auto context = GtkCheckVersion(4) ? DecorationContext(false, false, false)
--                                    : HeaderContext(false, false, false);
-+  auto context = GtkCheckVersion(4) ? DecorationContext(false, false, false, false)
-+                                    : HeaderContext(false, false, false, false);
-   ApplyCssToContext(context, R"(window, headerbar {
-     background-image: none;
-     background-color: black;
-@@ -152,7 +155,7 @@ int ComputeTopCornerRadius() {
- bool HeaderIsTranslucent() {
-   // The arbitrary square size to render a sample header.
-   constexpr int kHeaderSize = 32;
--  auto context = HeaderContext(false, false, false);
-+  auto context = HeaderContext(false, false, false, false);
-   double opacity = GetOpacityFromContext(context);
-   if (opacity < 1.0) {
-     return true;
-@@ -186,8 +189,8 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::Asset::operator=(
- 
- WindowFrameProviderGtk::Asset::~Asset() = default;
- 
--WindowFrameProviderGtk::WindowFrameProviderGtk(bool solid_frame, bool tiled)
--    : solid_frame_(solid_frame), tiled_(tiled) {
-+WindowFrameProviderGtk::WindowFrameProviderGtk(bool solid_frame, bool tiled, bool maximized)
-+    : solid_frame_(solid_frame), tiled_(tiled), maximized_(maximized) {
-   GtkSettings* settings = gtk_settings_get_default();
-   // Unretained() is safe since WindowFrameProviderGtk will own the signals.
-   auto callback = base::BindRepeating(&WindowFrameProviderGtk::OnThemeChanged,
-@@ -337,7 +340,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(gfx::Canvas* canvas,
- 
-   auto header =
-       PaintHeaderbar({client_bounds_px.width(), top_area_height_px},
--                     HeaderContext(solid_frame_, tiled_, focused), scale);
-+                     HeaderContext(solid_frame_, tiled_, maximized_, focused), scale);
-   image = gfx::ImageSkia::CreateFrom1xBitmap(header);
-   // In GTK4, the headerbar gets clipped by the window.
-   if (GtkCheckVersion(4)) {
-@@ -366,7 +369,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset(
- 
-   gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip,
-                              2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip);
--  auto focused_context = DecorationContext(solid_frame_, tiled_, true);
-+  auto focused_context = DecorationContext(solid_frame_, tiled_, maximized_, true);
-   frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context));
-   frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context));
-   gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset));
-@@ -374,7 +377,7 @@ WindowFrameProviderGtk::Asset& WindowFrameProviderGtk::GetOrCreateAsset(
-                                      focused_context, scale);
-   asset.unfocused_bitmap =
-       PaintBitmap(bitmap_size, gfx::RectF(frame_bounds_dip),
--                  DecorationContext(solid_frame_, tiled_, false), scale);
-+                  DecorationContext(solid_frame_, tiled_, maximized_, false), scale);
- 
-   return asset;
- }
-diff --git a/ui/gtk/window_frame_provider_gtk.h b/ui/gtk/window_frame_provider_gtk.h
-index 4faaae32a203bfa57f3e61c391dc6917c4a0bf59..94050a0136b78730f607f42991742e0434948d0e 100644
---- a/ui/gtk/window_frame_provider_gtk.h
-+++ b/ui/gtk/window_frame_provider_gtk.h
-@@ -20,7 +20,7 @@ namespace gtk {
- 
- class WindowFrameProviderGtk : public ui::WindowFrameProvider {
-  public:
--  WindowFrameProviderGtk(bool solid_frame, bool tiled);
-+  WindowFrameProviderGtk(bool solid_frame, bool tiled, bool maximized);
- 
-   WindowFrameProviderGtk(const WindowFrameProviderGtk&) = delete;
-   WindowFrameProviderGtk& operator=(const WindowFrameProviderGtk&) = delete;
-@@ -65,6 +65,8 @@ class WindowFrameProviderGtk : public ui::WindowFrameProvider {
-   // Input parameters used for drawing.
-   const bool solid_frame_;
-   const bool tiled_;
-+  // Whether to draw the window decorations as maximized.
-+  const bool maximized_;
- 
-   // Scale-independent metric calculated based on the bitmaps.
-   std::optional<gfx::Insets> frame_thickness_dip_;
-diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc
-index e4a7f8eb0ef8bacd2d4e4231d0990b4a01021626..3477542587b08691c164941b2c2e3b22050231ca 100644
---- a/ui/linux/fallback_linux_ui.cc
-+++ b/ui/linux/fallback_linux_ui.cc
-@@ -143,7 +143,8 @@ FallbackLinuxUi::CreateNavButtonProvider() {
- 
- ui::WindowFrameProvider* FallbackLinuxUi::GetWindowFrameProvider(
-     bool solid_frame,
--    bool tiled) {
-+    bool tiled,
-+    bool maximized) {
-   return nullptr;
- }
- 
-diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h
-index 0800349bc18753e6a41a938c70213dd7dd123d0d..a1553e0cb1fac188fb2c74e10163c52dead02f29 100644
---- a/ui/linux/fallback_linux_ui.h
-+++ b/ui/linux/fallback_linux_ui.h
-@@ -67,7 +67,8 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
-   void SetAccentColor(std::optional<SkColor> accent_color) override;
-   std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
-   ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
--                                                  bool tiled) override;
-+                                                  bool tiled,
-+                                                  bool maximized) override;
- 
-  private:
-   std::optional<gfx::FontRenderParams> default_font_render_params_;
-diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
-index 1e59679d206462f72495d587740ac48ba0fa30df..090e770ac2f8e5231f2bdd11247cacaceb0c7ef6 100644
---- a/ui/linux/linux_ui.h
-+++ b/ui/linux/linux_ui.h
-@@ -306,7 +306,8 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
-   // The returned object is not owned by the caller and will remain alive until
-   // the process ends.
-   virtual WindowFrameProvider* GetWindowFrameProvider(bool solid_frame,
--                                                      bool tiled) = 0;
-+                                                      bool tiled,
-+                                                      bool maximized) = 0;
- 
-  protected:
-   LinuxUiTheme();

+ 5 - 5
patches/chromium/add_ui_scopedcliboardwriter_writeunsaferawdata.patch

@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
 https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
 
 diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
-index 48f0b7a7812a073c31ac1d7af156470efbb1b051..296ee0b51e3bdd68ceb63df4fbe5813a91669b7c 100644
+index fd162a607424bd4d0b324ccc7270522eb3b6a991..df1d5564a52ef67b447bbc222ceb1f864eb3dd81 100644
 --- a/ui/base/clipboard/scoped_clipboard_writer.cc
 +++ b/ui/base/clipboard/scoped_clipboard_writer.cc
-@@ -227,6 +227,16 @@ void ScopedClipboardWriter::WriteData(const std::u16string& format,
+@@ -230,6 +230,16 @@ void ScopedClipboardWriter::WriteData(std::u16string_view format,
    }
  }
  
@@ -29,12 +29,12 @@ index 48f0b7a7812a073c31ac1d7af156470efbb1b051..296ee0b51e3bdd68ceb63df4fbe5813a
    objects_.clear();
    raw_objects_.clear();
 diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
-index e63c08b06c00dc0b1bd9c8339d3c6375e952e4f7..9e35ab7e6512c749fdea75fa863a97318541d350 100644
+index d8fd611e88c22f2c1319da769dcd14cc218f9c90..f17304e1e9fd202dc4e1b7724031dc4c333a4baf 100644
 --- a/ui/base/clipboard/scoped_clipboard_writer.h
 +++ b/ui/base/clipboard/scoped_clipboard_writer.h
-@@ -88,6 +88,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
+@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
    // This is only used to write custom format data.
-   void WriteData(const std::u16string& format, mojo_base::BigBuffer data);
+   void WriteData(std::u16string_view format, mojo_base::BigBuffer data);
  
 +  // write raw (non-pickled) data to the clipboard
 +  void WriteUnsafeRawData(const std::u16string& format,

+ 12 - 12
patches/chromium/adjust_accessibility_ui_for_electron.patch

@@ -10,10 +10,10 @@ usage of BrowserList and Browser as we subclass related methods and use our
 WindowList.
 
 diff --git a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
-index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a502a5f48e 100644
+index ff25e6eb48deb339ab92152eb09ad856068fd589..4a1f81429f0857e129e31103b026079de13fd826 100644
 --- a/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
 +++ b/chrome/browser/ui/webui/accessibility/accessibility_ui.cc
-@@ -47,6 +47,7 @@
+@@ -48,6 +48,7 @@
  #include "content/public/browser/web_contents_observer.h"
  #include "content/public/browser/web_contents_user_data.h"
  #include "content/public/browser/web_ui_data_source.h"
@@ -21,7 +21,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
  #include "ui/accessibility/accessibility_features.h"
  #include "ui/accessibility/ax_updates_and_events.h"
  #include "ui/accessibility/platform/ax_platform_node.h"
-@@ -170,7 +171,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
+@@ -171,7 +172,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
                                 rvh->GetRoutingID(), accessibility_mode);
  }
  
@@ -30,7 +30,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
  base::Value::Dict BuildTargetDescriptor(Browser* browser) {
    base::Value::Dict target_data;
    target_data.Set(kSessionIdField, browser->session_id().id());
-@@ -191,7 +192,7 @@ void HandleAccessibilityRequestCallback(
+@@ -192,7 +193,7 @@ void HandleAccessibilityRequestCallback(
    DCHECK(ShouldHandleAccessibilityRequestCallback(path));
  
    base::Value::Dict data;
@@ -39,7 +39,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    ui::AXMode mode =
        content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
    bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
-@@ -220,7 +221,7 @@ void HandleAccessibilityRequestCallback(
+@@ -221,7 +222,7 @@ void HandleAccessibilityRequestCallback(
    data.Set(kPDFPrinting, pdf_printing ? kOn : kOff);
  
    std::string pref_api_type =
@@ -48,7 +48,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    bool pref_api_type_supported = false;
  
    std::vector<ui::AXApiType::Type> supported_api_types =
-@@ -287,11 +288,11 @@ void HandleAccessibilityRequestCallback(
+@@ -288,11 +289,11 @@ void HandleAccessibilityRequestCallback(
    data.Set(kPagesField, std::move(page_list));
  
    base::Value::List browser_list;
@@ -62,7 +62,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    data.Set(kBrowsersField, std::move(browser_list));
  
    std::string json_string;
-@@ -761,7 +762,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
+@@ -762,7 +763,8 @@ void AccessibilityUIMessageHandler::SetGlobalString(
    const std::string value = CheckJSValue(data.FindString(kValueField));
  
    if (string_name == kApiTypeField) {
@@ -72,7 +72,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
      pref->SetString(prefs::kShownAccessibilityApiType, value);
    }
  }
-@@ -815,7 +817,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
+@@ -816,7 +818,8 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
                       AXPropertyFilter::ALLOW_EMPTY);
    AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
  
@@ -82,7 +82,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    ui::AXApiType::Type api_type =
        ui::AXApiType::From(pref->GetString(prefs::kShownAccessibilityApiType));
    std::string accessibility_contents =
-@@ -842,6 +845,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
+@@ -843,6 +846,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
                       AXPropertyFilter::ALLOW_EMPTY);
    AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
  
@@ -90,7 +90,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    for (Browser* browser : *BrowserList::GetInstance()) {
      if (browser->session_id().id() == session_id) {
        base::Value::Dict result = BuildTargetDescriptor(browser);
-@@ -854,6 +858,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
+@@ -855,6 +859,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
        return;
      }
    }
@@ -98,7 +98,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
  #endif  // !BUILDFLAG(IS_ANDROID)
    // No browser with the specified |session_id| was found.
    base::Value::Dict result;
-@@ -897,11 +902,13 @@ void AccessibilityUIMessageHandler::StopRecording(
+@@ -898,11 +903,13 @@ void AccessibilityUIMessageHandler::StopRecording(
  }
  
  ui::AXApiType::Type AccessibilityUIMessageHandler::GetRecordingApiType() {
@@ -115,7 +115,7 @@ index 90d8660e8a109ac547d9ab8feacc641e8a6c5a57..fe176f7b2106d767da8b28864fd574a5
    // Check to see if it is in the supported types list.
    if (std::find(supported_types.begin(), supported_types.end(), api_type) ==
        supported_types.end()) {
-@@ -971,8 +978,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
+@@ -972,8 +979,11 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
  // static
  void AccessibilityUIMessageHandler::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {

+ 1 - 1
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -51,7 +51,7 @@ index 5fb8a3dc69dc5fc5bfa08e01d8f03707a23c9274..41774b60b8cb7e0a22cedc597dc07ad1
    void SendRendererPreferencesToRenderer(
        const blink::RendererPreferences& preferences);
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
-index 1a79ccf14ba53eabf4915e4a0aee1f7e0fdcc9f8..dd7347996d3e4dcf2ba27258b771e705d31384b6 100644
+index 92085aca6bd0c95a73b98e4173c0128d596b77f4..9503beefcbcfe7d99674582ece10a7e551fae96d 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -579,8 +579,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {

+ 2 - 2
patches/chromium/build_add_electron_tracing_category.patch

@@ -8,10 +8,10 @@ categories in use are known / declared.  This patch is required for us
 to introduce a new Electron category for Electron-specific tracing.
 
 diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
-index 397fd890b7db6aed6f75ee3d685fe4b7c22e875f..4f5735f7700360b30378b6e7869f3551c5ae7ba2 100644
+index c428a5f8d79e826077ab05fb6c56ae8e0e4ff609..c5fd8782fc1343f04f9e2c2c0414245d20696193 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
-@@ -92,6 +92,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
+@@ -91,6 +91,7 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS(
      perfetto::Category("drm"),
      perfetto::Category("drmcursor"),
      perfetto::Category("dwrite"),

+ 2 - 2
patches/chromium/build_allow_electron_mojom_interfaces_to_depend_on_blink.patch

@@ -10,10 +10,10 @@ Needed for:
 2) //electron/shell/common:web_contents_utility
 
 diff --git a/content/public/common/BUILD.gn b/content/public/common/BUILD.gn
-index 659f500a47eb0f2d1f753dee2b234bb7bf1027d4..8f6e733b1ae1081f19a090cbdf2372b164e514a8 100644
+index dee8a4413f62ac5535f4bce504ff0dc934db743a..064a62b40679f05feac3c81f9d6e6c2c90972727 100644
 --- a/content/public/common/BUILD.gn
 +++ b/content/public/common/BUILD.gn
-@@ -379,6 +379,8 @@ mojom("interfaces") {
+@@ -380,6 +380,8 @@ mojom("interfaces") {
      "//content/common/*",
      "//extensions/common:mojom",
      "//extensions/common:mojom_blink",

+ 7 - 7
patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch

@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
 patch.
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index 3973c5f5889b987410c116ac0f75b29df979d5b2..1215b1ea6c98e5dd9c661e392ef564626629cad5 100644
+index bdf6d5865fb0069f4df368613167069d2fb50c86..93a126365406badf911d938dde2dcd8b140b7f6f 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -196,11 +196,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index 3973c5f5889b987410c116ac0f75b29df979d5b2..1215b1ea6c98e5dd9c661e392ef56462
          "//base",
          "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 78103d77874650347f367818488a6845c6230e72..4124318730e8e686e968dcfc97af197e7f0e47e0 100644
+index 77e4a8ebf25c81b9aa23361935cedee805193c30..069884a988be3ba63486b7248f44cd3ddc16368b 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4542,7 +4542,7 @@ static_library("browser") {
+@@ -4568,7 +4568,7 @@ static_library("browser") {
            [ "//chrome/browser/ui/webui/signin:profile_impl" ]
      }
  
@@ -46,10 +46,10 @@ index 78103d77874650347f367818488a6845c6230e72..4124318730e8e686e968dcfc97af197e
        # than here in :chrome_dll.
        deps += [ "//chrome:packed_resources_integrity_header" ]
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index d3ecec0092f76a25a74d3d3255d5e6aaa4415106..2197307d6bdf07daaf397890e63a9e7c27d53254 100644
+index 490c8fa666f85f0a4c4591059b74da1d6320c60b..e8a34358b9b01f918a475e4b7805a41a5d0c4904 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -7007,9 +7007,12 @@ test("unit_tests") {
+@@ -7027,9 +7027,12 @@ test("unit_tests") {
        "//chrome/notification_helper",
      ]
  
@@ -63,7 +63,7 @@ index d3ecec0092f76a25a74d3d3255d5e6aaa4415106..2197307d6bdf07daaf397890e63a9e7c
        "//chrome//services/util_win:unit_tests",
        "//chrome/app:chrome_dll_resources",
        "//chrome/app:win_unit_tests",
-@@ -7968,6 +7971,10 @@ test("unit_tests") {
+@@ -7986,6 +7989,10 @@ test("unit_tests") {
        "../browser/performance_manager/policies/background_tab_loading_policy_unittest.cc",
      ]
  
@@ -74,7 +74,7 @@ index d3ecec0092f76a25a74d3d3255d5e6aaa4415106..2197307d6bdf07daaf397890e63a9e7c
      sources += [
        # The importer code is not used on Android.
        "../common/importer/firefox_importer_utils_unittest.cc",
-@@ -8023,7 +8030,6 @@ test("unit_tests") {
+@@ -8041,7 +8048,6 @@ test("unit_tests") {
      # Non-android deps for "unit_tests" target.
      deps += [
        "../browser/screen_ai:screen_ai_install_state",

+ 1 - 1
patches/chromium/build_libc_as_static_library.patch

@@ -7,7 +7,7 @@ Build libc++ as static library to compile and pass
 nan tests
 
 diff --git a/buildtools/third_party/libc++/BUILD.gn b/buildtools/third_party/libc++/BUILD.gn
-index 3ae561bd6627329ece5e29eda845c5dc61fcb77e..aa1ae438f9742808f775a13ff1bb37c33738e0bc 100644
+index a5471961656af134738ac7388fae70e9544dd4aa..2592fdc2e04683a6d42fa9fad87313d296199857 100644
 --- a/buildtools/third_party/libc++/BUILD.gn
 +++ b/buildtools/third_party/libc++/BUILD.gn
 @@ -192,7 +192,11 @@ libcxx_modules("std_wctype_h") {

+ 19 - 19
patches/chromium/can_create_window.patch

@@ -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 f0089dddae47d970a04acc0df2fb0e2bdffc4856..33088669c478d5b7f6bbaa7998e14479e539c5cc 100644
+index 2221ff3eacc547fd3e7411e7107cd31fdf94ecec..e1e674944993234358fd8892dbe0074bc4b67409 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -9601,6 +9601,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -9615,6 +9615,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 f0089dddae47d970a04acc0df2fb0e2bdffc4856..33088669c478d5b7f6bbaa7998e14479
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index f9f64fefddb0c7259877f7d39100fb9caee328b7..104e06b584e9321bc1da4c0913fd36e6cee909ee 100644
+index a5e33433796b6759aae64b7c7ffd086f70e1de6b..7200d6e7959c19cd461d894be3fb4c27caf0fb9c 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -5003,6 +5003,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -5031,6 +5031,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
    SetPartitionedPopinOpenerOnNewWindowIfNeeded(new_contents_impl, params,
                                                 opener);
  
@@ -37,7 +37,7 @@ index f9f64fefddb0c7259877f7d39100fb9caee328b7..104e06b584e9321bc1da4c0913fd36e6
    // 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
-@@ -5044,12 +5050,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -5072,12 +5078,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
      AddWebContentsDestructionObserver(new_contents_impl);
    }
  
@@ -66,7 +66,7 @@ index 91dcf6c9c4a2d840fb50cb329fe3ef1bba9103c3..cbc887a3034605a93468e73a310e9ca6
  
  // 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 f07621fc686236a9b009d425b96d2a847ffd07cf..6d7b34575a4831eafca792a5b8ed4720d4ad5957 100644
+index 8572c59e4b734f444280f247ef5b615149159dd5..f8037aa47437f03dfd0c67ff57a41f16d43da05a 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -805,6 +805,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -79,10 +79,10 @@ index f07621fc686236a9b009d425b96d2a847ffd07cf..6d7b34575a4831eafca792a5b8ed4720
      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 373e9128eeefb3931059fc67099b00fdc071a52e..045689f947f45e7d4c50850ba760b0861af79798 100644
+index 69aaf3146da25e8a30382568af5002a983de2da2..abdac7f78b24392e04c431584a0bae8fca814df6 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -203,6 +203,7 @@ class NetworkService;
+@@ -198,6 +198,7 @@ class NetworkService;
  class TrustedURLLoaderHeaderClient;
  }  // namespace mojom
  struct ResourceRequest;
@@ -90,7 +90,7 @@ index 373e9128eeefb3931059fc67099b00fdc071a52e..045689f947f45e7d4c50850ba760b086
  }  // namespace network
  
  namespace sandbox {
-@@ -1361,6 +1362,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -1356,6 +1357,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -100,7 +100,7 @@ index 373e9128eeefb3931059fc67099b00fdc071a52e..045689f947f45e7d4c50850ba760b086
        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 ece9688e5f0a06be4cb6fb2d85e60269d0f66463..a955b37b93ca0887f3fba1ebea4a3c89e62aa6bc 100644
+index ac4deeb6acebf79987591756320e2406d74d7a1e..f688e6d1e6c11f0dd80f498e6361fa822e8c2eb8 100644
 --- a/content/public/browser/web_contents_delegate.cc
 +++ b/content/public/browser/web_contents_delegate.cc
 @@ -32,6 +32,17 @@ namespace content {
@@ -122,7 +122,7 @@ index ece9688e5f0a06be4cb6fb2d85e60269d0f66463..a955b37b93ca0887f3fba1ebea4a3c89
      WebContents* source,
      const OpenURLParams& params,
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index fbd5d3275fb9dfb04bee078b5ef275926fdad926..3938045d8028abff5f44ad347b514e4f823748cd 100644
+index ac2e7cdceb13ce07966a908fab3ff8feff969484..96cb58b1a88499cf8f78d748dc5a1cc1c6b6a128 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -18,6 +18,7 @@
@@ -133,7 +133,7 @@ index fbd5d3275fb9dfb04bee078b5ef275926fdad926..3938045d8028abff5f44ad347b514e4f
  #include "content/public/browser/eye_dropper.h"
  #include "content/public/browser/fullscreen_types.h"
  #include "content/public/browser/invalidate_type.h"
-@@ -366,6 +367,13 @@ class CONTENT_EXPORT WebContentsDelegate {
+@@ -375,6 +376,13 @@ class CONTENT_EXPORT WebContentsDelegate {
        const StoragePartitionConfig& partition_config,
        SessionStorageNamespace* session_storage_namespace);
  
@@ -148,10 +148,10 @@ index fbd5d3275fb9dfb04bee078b5ef275926fdad926..3938045d8028abff5f44ad347b514e4f
    // 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 5d9ad1b7d5dfce78ce411a7670d4b20f35747b88..51d32ef662315d4a9dcc544093dd1d5e93d39c6f 100644
+index 539a274082fda54ea6bf8ed36a1fe21bbb55d73d..76ab61d5d388b70a0da0999ff2d2ea97f39f6fc6 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -6893,6 +6893,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
+@@ -6899,6 +6899,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
            request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
            GetWebFrame()->IsAdScriptInStack());
  
@@ -163,10 +163,10 @@ index 5d9ad1b7d5dfce78ce411a7670d4b20f35747b88..51d32ef662315d4a9dcc544093dd1d5e
    // 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 3735a52cfd6d4fcd19a59507eda7ed4349aa0b38..cc6bf491b88a404e489e445e50d3bbe33c602204 100644
+index fa36b9907988ab971c94eae317e6e1dc4d170762..a2cafef6cae2fd78580fdf90dae17ac6586a7312 100644
 --- a/content/web_test/browser/web_test_content_browser_client.cc
 +++ b/content/web_test/browser/web_test_content_browser_client.cc
-@@ -524,6 +524,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
+@@ -534,6 +534,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -176,7 +176,7 @@ index 3735a52cfd6d4fcd19a59507eda7ed4349aa0b38..cc6bf491b88a404e489e445e50d3bbe3
      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 e6212744a71fffa8aec3244e336eca0a38acab8b..537bde0bdd836183f90a8d44e911d508fb5f396d 100644
+index 9c6bbdc4f8e4f78fd745ac4e71510d9534925a78..f4a68476f71e8283bb3da3642758416efb98c168 100644
 --- a/content/web_test/browser/web_test_content_browser_client.h
 +++ b/content/web_test/browser/web_test_content_browser_client.h
 @@ -93,6 +93,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -210,10 +210,10 @@ index 82e9d3dfb5f7da76d89fe15ae61d379fa46e177d..fd035512099a54dff6cc951a2226c23a
  
  }  // 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 3fa7cfabb084914d4fe9c65a17daacb6e274a40d..ca4bc6cd7060da4bdff70e896bb824a3d75f9dea 100644
+index b44f0db98f89befc33430bcf275bffcfae9e7171..66f92d1e975a74720af12662447ea214ac210248 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -2269,6 +2269,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -2270,6 +2270,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
    WebWindowFeatures window_features =
        GetWindowFeaturesFromString(features, entered_window);
  

+ 2 - 2
patches/chromium/chore_partial_revert_of.patch

@@ -14,10 +14,10 @@ track down the source of this problem & figure out if we can fix it
 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
-index 0346d081467f0728183f55b0d088325d776e6290..43476fbb3621ac3a1ca61bed9c5115443f6e255d 100644
+index 037e3a33c6238b22c6f82ca3ec17b85f3aba3cd4..b48b1e6e1c94abe5f64a7ac45194016ec27bd3b8 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4922,7 +4922,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4950,7 +4950,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
            : IsGuest();
    // While some guest types do not have a guest SiteInstance, the ones that
    // don't all override WebContents creation above.

+ 1 - 1
patches/chromium/chore_patch_out_partition_attribute_dcheck_for_webviews.patch

@@ -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 66c3eaa6977bb59cec16ad31d650fbaa4581e76c..27ac20158a93a1f128a6b0184c36e9130193708f 100644
+index d4dd73e7fa1e550d0d13b4c09da0ce6899894494..679a59db98261eca3fbbd7ddb20516ab4f618cfb 100644
 --- a/content/browser/site_instance_impl.cc
 +++ b/content/browser/site_instance_impl.cc
 @@ -229,7 +229,7 @@ scoped_refptr<SiteInstanceImpl> SiteInstanceImpl::CreateForGuest(

+ 10 - 10
patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch

@@ -80,10 +80,10 @@ index 4fd8dff1089cd6afa6a66dc185734d7671657281..0a1f4268ea771a3d5d4a2668928c6e5d
        content::WebContents* source,
        const content::OpenURLParams& params,
 diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
-index ac52887ba23d3024db9b0b326eaa350c24f3e2a6..fa692bee467ea888914ebc6dafb6f6178b3eb73d 100644
+index 8d56a23f148e394675d620c3283a5cbd20c682bf..dceba5e060a9a9c924145b9686507804e127cddd 100644
 --- a/chrome/browser/ui/browser.cc
 +++ b/chrome/browser/ui/browser.cc
-@@ -2212,12 +2212,11 @@ bool Browser::IsWebContentsCreationOverridden(
+@@ -2217,12 +2217,11 @@ bool Browser::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -99,10 +99,10 @@ index ac52887ba23d3024db9b0b326eaa350c24f3e2a6..fa692bee467ea888914ebc6dafb6f617
  
  WebContents* Browser::CreateCustomWebContents(
 diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
-index 23066b006559fccdfc556d2097fab7e2b08f185c..b1348af15c6fb246ae10520597e3655c7352e368 100644
+index dc94ad2f75d40b378e184b861d2837d15044538c..6ad84b0d51c57588c7cce6de9198028e9fd01a78 100644
 --- a/chrome/browser/ui/browser.h
 +++ b/chrome/browser/ui/browser.h
-@@ -977,8 +977,7 @@ class Browser : public TabStripModelObserver,
+@@ -979,8 +979,7 @@ class Browser : public TabStripModelObserver,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -218,10 +218,10 @@ index c6838c83ef971b88769b1f3fba8095025ae25464..2da6a4e08340e72ba7de5d03444c2f17
    content::WebContents* AddNewContents(
        content::WebContents* source,
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index bb132ec61070beaae27d583282bc3e9f34f5357b..90ac881d8e9f534c875b5eb259b06ef1db1c71d3 100644
+index 9715736427fda7e0054ca45ba782b2326a8d01fe..5f72ddb8d428d72ea22b0bb37dfe74b3ee056a49 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4885,8 +4885,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
+@@ -4913,8 +4913,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
    // TODO(crbug.com/40202416): Support a way for MPArch guests to support this.
    if (delegate_ && delegate_->IsWebContentsCreationOverridden(
                         source_site_instance, params.window_container_type,
@@ -232,10 +232,10 @@ index bb132ec61070beaae27d583282bc3e9f34f5357b..90ac881d8e9f534c875b5eb259b06ef1
          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 a955b37b93ca0887f3fba1ebea4a3c89e62aa6bc..7b764a2f9a18a1650c88e2ab22ca4c2e9e73b7d8 100644
+index f688e6d1e6c11f0dd80f498e6361fa822e8c2eb8..dc47ebfd61f16901b7f8e0e4c30c79eaf5d0710e 100644
 --- a/content/public/browser/web_contents_delegate.cc
 +++ b/content/public/browser/web_contents_delegate.cc
-@@ -153,8 +153,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
+@@ -159,8 +159,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
      SiteInstance* source_site_instance,
      mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -246,10 +246,10 @@ index a955b37b93ca0887f3fba1ebea4a3c89e62aa6bc..7b764a2f9a18a1650c88e2ab22ca4c2e
  }
  
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index 3938045d8028abff5f44ad347b514e4f823748cd..ac40cfdbd35ba560f5363f84122140833315e907 100644
+index 96cb58b1a88499cf8f78d748dc5a1cc1c6b6a128..8ff56b56da764c8af14c40babc529ee4cb089c7e 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
-@@ -345,8 +345,7 @@ class CONTENT_EXPORT WebContentsDelegate {
+@@ -354,8 +354,7 @@ class CONTENT_EXPORT WebContentsDelegate {
        SiteInstance* source_site_instance,
        mojom::WindowContainerType window_container_type,
        const GURL& opener_url,

+ 1 - 1
patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch

@@ -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 08fa1ff278c0b6b2f804d79234898b90f3d29b29..0874ec4e05f55e5a80aad064b221459b007a16f6 100644
+index 68842f303c7ce77fedf8c7c0bc9824b52d0aac16..562b64439db7a27cb0081776e4602e43408b4060 100644
 --- a/content/app/content_main_runner_impl.cc
 +++ b/content/app/content_main_runner_impl.cc
 @@ -271,8 +271,13 @@ void AsanProcessInfoCB(const char*, bool*) {

+ 5 - 5
patches/chromium/desktop_media_list.patch

@@ -82,10 +82,10 @@ index 786c526588d81b8b5b1b5dd3760719a53e005995..f66b7d0b4dfcbb8ed3dde5a9ff463ae2
    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 b1d9cc5b8897b0b6d153b0b4813c8a6eca42664e..c85ea4f9a9b5ec9a669196f4e8d1010457bf38f0 100644
+index bd2b565158f807d872d4c9205012b91fc37c2290..312882d656f9f6b3d3fd98128131cea63f818e0d 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-@@ -233,9 +233,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
+@@ -215,9 +215,13 @@ content::DesktopMediaID::Id GetUpdatedWindowId(
      }
    }
  #elif BUILDFLAG(IS_MAC)
@@ -99,7 +99,7 @@ index b1d9cc5b8897b0b6d153b0b4813c8a6eca42664e..c85ea4f9a9b5ec9a669196f4e8d10104
  #endif
  
    return window_id;
-@@ -338,7 +342,7 @@ class NativeDesktopMediaList::Worker
+@@ -320,7 +324,7 @@ class NativeDesktopMediaList::Worker
    base::WeakPtr<NativeDesktopMediaList> media_list_;
  
    DesktopMediaID::Type source_type_;
@@ -108,7 +108,7 @@ index b1d9cc5b8897b0b6d153b0b4813c8a6eca42664e..c85ea4f9a9b5ec9a669196f4e8d10104
    const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
    const bool add_current_process_windows_;
    const bool auto_show_delegated_source_list_;
-@@ -628,6 +632,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
+@@ -602,6 +606,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
        FROM_HERE,
        base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
                       media_list_));
@@ -121,7 +121,7 @@ index b1d9cc5b8897b0b6d153b0b4813c8a6eca42664e..c85ea4f9a9b5ec9a669196f4e8d10104
  }
  
  void NativeDesktopMediaList::Worker::OnCaptureResult(
-@@ -1035,6 +1045,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
+@@ -1009,6 +1019,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
          FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
                                    base::Unretained(worker_.get()),
                                    std::move(native_ids), thumbnail_size_));

+ 2 - 2
patches/chromium/disable_compositor_recycling.patch

@@ -6,10 +6,10 @@ 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 efa697b7c4d428200d14e436ab062c13273916f4..48a6a7e35daf565d727d02cd874f2052eb3c1e3e 100644
+index 943e3b8875c68178e84ae79c241c7a31e9305c6c..6055992c0f61348a95823b64c73574ca6b24904b 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -559,7 +559,11 @@
+@@ -560,7 +560,11 @@
      return;
  
    host()->WasHidden();

+ 6 - 6
patches/chromium/disable_hidden.patch

@@ -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 d5537feb9b4b6cc24d0ed226e0e02b9c288efe26..6bf8d9100658d406bae3d5f346c7c904ea9a3874 100644
+index e6d739f62afc1c8fa8c19601f8bc034c5ce7edf1..99d7fe568cecce44b68dfb896f4d2560d75b5556 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -823,6 +823,10 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -832,6 +832,10 @@ void RenderWidgetHostImpl::WasHidden() {
      return;
    }
  
@@ -19,12 +19,12 @@ index d5537feb9b4b6cc24d0ed226e0e02b9c288efe26..6bf8d9100658d406bae3d5f346c7c904
 +
    // Cancel pending pointer lock requests, unless there's an open user prompt.
    // Prompts should remain open and functional across tab switches.
-   if (!delegate_->IsWaitingForPointerLockPrompt(this)) {
+   if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) {
 diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
-index 4420f3a141d8c66eedf387e28350344b9a6c2525..990881ea27f1720ce956cc1d6671b1061d70a45e 100644
+index fe1fdd4d52e8671daf173dbded92af0e95812452..18087692f089fb86def2da7d5ec98acad6e0f3db 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -1012,6 +1012,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -1015,6 +1015,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    // Requests a commit and forced redraw in the renderer compositor.
    void ForceRedrawForTesting();
  
@@ -35,7 +35,7 @@ index 4420f3a141d8c66eedf387e28350344b9a6c2525..990881ea27f1720ce956cc1d6671b106
    // |routing_id| must not be MSG_ROUTING_NONE.
    // If this object outlives |delegate|, DetachDelegate() must be called when
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
-index 48e8a414e0b7156dd002766175a2a5bb3ee71bb3..1a79ccf14ba53eabf4915e4a0aee1f7e0fdcc9f8 100644
+index 1d08f25b91496dbafc3a164e7fb3e66d1a48557b..92085aca6bd0c95a73b98e4173c0128d596b77f4 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
 @@ -643,7 +643,7 @@ void RenderWidgetHostViewAura::HideImpl() {

+ 1 - 1
patches/chromium/dump_syms.patch

@@ -8,7 +8,7 @@ this but it is not a blocker for releasing Electron.  This patch removes
 tthe hard fail on dylib resolve failure from dump_syms
 
 diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
-index 1e5ebd243c1f1eeb37d087a9d72afcfd947ec6a0..fe43b91f5c52e3f99dcec9cddb3cacfae1eb4646 100755
+index fb1ef0cfd6a78920e5e2831e94330bf8d213107d..cafcf442f79e89da9993536dce808f01221ca8f7 100755
 --- a/components/crash/content/tools/generate_breakpad_symbols.py
 +++ b/components/crash/content/tools/generate_breakpad_symbols.py
 @@ -204,7 +204,7 @@ def GetSharedLibraryDependenciesMac(binary, exe_path):

+ 5 - 5
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -33,10 +33,10 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
  
  }  // namespace net
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index 014012457bbda884ae6c9eaf46deb7f41e203351..311529eb8b306a647ef56416d3859245acb05cef 100644
+index 64dede12549790b8ce9e50b3de2a62154f5acf79..5d39f64bda0a48f1e278686f3ac567fd441afce4 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1795,6 +1795,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1810,6 +1810,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,7 +51,7 @@ index 014012457bbda884ae6c9eaf46deb7f41e203351..311529eb8b306a647ef56416d3859245
    // 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 cc94073bc278af202cd6bbb47882b56f48a2ebbe..16f63000f1d7c62430ca762240bbacf4d9d11436 100644
+index fe04f634b32e503f6e93ae6f20c8c7f7c85d02be..990df479da79b513cf8797aa2fcacba10c4fbbd9 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -317,6 +317,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,7 +63,7 @@ index cc94073bc278af202cd6bbb47882b56f48a2ebbe..16f63000f1d7c62430ca762240bbacf4
    void SetEnableReferrers(bool enable_referrers) override;
  #if BUILDFLAG(IS_CT_SUPPORTED)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 029287034d13f7c2bffa60900ecbbaa980330bf4..64688c3a31993dc2ae60f2c187d1fa1db1a40e19 100644
+index e928d012d77ccffe16263fd0ee7c2769adfe4bac..1be1b691fa240fa3c5e2c572821977a968841211 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
 @@ -1253,6 +1253,9 @@ interface NetworkContext {
@@ -77,7 +77,7 @@ index 029287034d13f7c2bffa60900ecbbaa980330bf4..64688c3a31993dc2ae60f2c187d1fa1d
    SetAcceptLanguage(string new_accept_language);
  
 diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
-index 6b09b32c3a6206310baf87da0a2b4025d488fd09..6ff591e3adbfa4df938f1044009365d8ac2e7f26 100644
+index 97e8f9f145cecad9b0cd8b43a2de4af29cec7778..b9539a731d2252c8301d51ccb7a1bd7b1a23ca53 100644
 --- a/services/network/test/test_network_context.h
 +++ b/services/network/test/test_network_context.h
 @@ -156,6 +156,7 @@ class TestNetworkContext : public mojom::NetworkContext {

+ 14 - 14
patches/chromium/feat_allow_usage_of_sccontentsharingpicker_on_supported_platforms.patch

@@ -46,7 +46,7 @@ index 8ac12480f663a74dfbdcf7128a582a81b4474d25..db6802a2603e1d3c3039e49737438124
    // OnStop is called by StopAndDeAllocate.
    virtual void OnStop() = 0;
 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 d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb349f3797 100644
+index 8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c..8749fa47bd841fd5ae57899cb3447378719b14fe 100644
 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
 +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
 @@ -26,6 +26,61 @@
@@ -111,7 +111,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
  
  namespace {
  API_AVAILABLE(macos(12.3))
-@@ -100,18 +155,22 @@ @interface ScreenCaptureKitDeviceHelper
+@@ -120,18 +175,22 @@ @interface ScreenCaptureKitDeviceHelper
      : NSObject <SCStreamDelegate, SCStreamOutput>
  
  - (instancetype)initWithSampleCallback:(SampleCallback)sampleCallback
@@ -134,7 +134,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
      _errorCallback = errorCallback;
    }
    return self;
-@@ -187,29 +246,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
+@@ -207,29 +266,53 @@ + (SCStreamConfiguration*)streamConfigurationWithFrameSize:(gfx::Size)frameSize
  
  class API_AVAILABLE(macos(12.3)) ScreenCaptureKitDeviceMac
      : public IOSurfaceCaptureDeviceBase,
@@ -192,7 +192,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
  
    void OnShareableContentCreated(SCShareableContent* content) {
      DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
-@@ -277,7 +360,7 @@ void CreateStream(SCContentFilter* filter) {
+@@ -297,7 +380,7 @@ void CreateStream(SCContentFilter* filter) {
        return;
      }
  
@@ -201,7 +201,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
        // Update the content size. This step is neccessary when used together
        // with SCContentSharingPicker. If the Chrome picker is used, it will
        // change to retina resolution if applicable.
-@@ -286,6 +369,9 @@ void CreateStream(SCContentFilter* filter) {
+@@ -306,6 +389,9 @@ void CreateStream(SCContentFilter* filter) {
                      filter.contentRect.size.height * filter.pointPixelScale);
      }
  
@@ -211,7 +211,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
      gfx::RectF dest_rect_in_frame;
      actual_capture_format_ = capture_params().requested_format;
      actual_capture_format_.pixel_format = media::PIXEL_FORMAT_NV12;
-@@ -299,6 +385,7 @@ void CreateStream(SCContentFilter* filter) {
+@@ -319,6 +405,7 @@ void CreateStream(SCContentFilter* filter) {
      stream_ = [[SCStream alloc] initWithFilter:filter
                                   configuration:config
                                        delegate:helper_];
@@ -219,7 +219,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
      {
        NSError* error = nil;
        bool add_stream_output_result =
-@@ -452,7 +539,7 @@ void OnStreamError() {
+@@ -472,7 +559,7 @@ void OnStreamError() {
        if (fullscreen_module_) {
          fullscreen_module_->Reset();
        }
@@ -228,7 +228,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
      } else {
        client()->OnError(media::VideoCaptureError::kScreenCaptureKitStreamError,
                          FROM_HERE, "Stream delegate called didStopWithError");
-@@ -475,23 +562,41 @@ void OnUpdateConfigurationError() {
+@@ -495,23 +582,41 @@ void OnUpdateConfigurationError() {
    }
  
    // IOSurfaceCaptureDeviceBase:
@@ -285,7 +285,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
    }
    void OnStop() override {
      DCHECK(device_task_runner_->RunsTasksInCurrentSequence());
-@@ -549,8 +654,9 @@ void ResetStreamTo(SCWindow* window) override {
+@@ -569,8 +674,9 @@ void ResetStreamTo(SCWindow* window) override {
    }
  
   private:
@@ -296,7 +296,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
    const scoped_refptr<base::SingleThreadTaskRunner> device_task_runner_;
  
    // The actual format of the video frames that are sent to `client`.
-@@ -566,6 +672,10 @@ void ResetStreamTo(SCWindow* window) override {
+@@ -586,6 +692,10 @@ void ResetStreamTo(SCWindow* window) override {
    // Helper class that acts as output and delegate for `stream_`.
    ScreenCaptureKitDeviceHelper* __strong helper_;
  
@@ -307,7 +307,7 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
    // This is used to detect when a captured presentation enters fullscreen mode.
    // If this happens, the module will call the ResetStreamTo function.
    std::unique_ptr<ScreenCaptureKitFullscreenModule> fullscreen_module_;
-@@ -578,6 +688,8 @@ void ResetStreamTo(SCWindow* window) override {
+@@ -598,6 +708,8 @@ void ResetStreamTo(SCWindow* window) override {
    base::WeakPtrFactory<ScreenCaptureKitDeviceMac> weak_factory_{this};
  };
  
@@ -317,10 +317,10 @@ index d85a71dde16218bc942245c895666ecf038bcef7..e99684a6b70f5d344cfcd4b1271c4abb
  
  // Although ScreenCaptureKit is available in 12.3 there were some bugs that
 diff --git a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
-index fe2bd3b710a5b9de73afa8fee556185bb5b96906..0cd669dd6bfd06d73af51893a35020c4b31632b2 100644
+index 0ab684dc8e792359abb90b91917eddae42e6123d..f0f08a834f06c7669da6030640434308a5cbd056 100644
 --- a/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
 +++ b/content/browser/renderer_host/media/in_process_video_capture_device_launcher.cc
-@@ -330,8 +330,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
+@@ -316,8 +316,16 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
          break;
        }
  
@@ -338,7 +338,7 @@ index fe2bd3b710a5b9de73afa8fee556185bb5b96906..0cd669dd6bfd06d73af51893a35020c4
          // For the other capturers, when a bug reports the type of capture it's
          // easy enough to determine which capturer was used, but it's a little
          // fuzzier with window capture.
-@@ -347,13 +355,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
+@@ -333,13 +341,15 @@ void InProcessVideoCaptureDeviceLauncher::LaunchDeviceAsync(
        }
  #endif  // defined(USE_AURA) || BUILDFLAG(IS_MAC)
  

+ 5 - 5
patches/chromium/feat_configure_launch_options_for_service_process.patch

@@ -19,7 +19,7 @@ to STDOUT_FILENO/STD_OUTPUT_HANDLE and STDERR_FILENO/STD_ERROR_HANDLE allowing t
 parent process to read from the pipe.
 
 diff --git a/content/browser/child_process_launcher.h b/content/browser/child_process_launcher.h
-index 9f9b497aaef2558d2fb02edb115ba5916e1dd578..4e36d3a028d0bb8cdfb100b6424be397915bd7ee 100644
+index 6a3645f020d7348f758ebcc93c49ddcbee709937..55994606517a4f52475610db2da26b5560865fab 100644
 --- a/content/browser/child_process_launcher.h
 +++ b/content/browser/child_process_launcher.h
 @@ -33,6 +33,7 @@
@@ -30,7 +30,7 @@ index 9f9b497aaef2558d2fb02edb115ba5916e1dd578..4e36d3a028d0bb8cdfb100b6424be397
  #endif
  
  #if BUILDFLAG(IS_POSIX)
-@@ -189,7 +190,10 @@ struct ChildProcessLauncherFileData {
+@@ -196,7 +197,10 @@ struct ChildProcessLauncherFileData {
        delete;
    ~ChildProcessLauncherFileData();
  
@@ -42,7 +42,7 @@ index 9f9b497aaef2558d2fb02edb115ba5916e1dd578..4e36d3a028d0bb8cdfb100b6424be397
    // Files opened by the browser and passed as corresponding file descriptors
    // in the child process. If a FilePath is provided, the file will be opened
    // and the descriptor cached for future process launches. If a ScopedFD is
-@@ -204,6 +208,15 @@ struct ChildProcessLauncherFileData {
+@@ -211,6 +215,15 @@ struct ChildProcessLauncherFileData {
    std::map<std::string, absl::variant<base::FilePath, base::ScopedFD>>
        files_to_preload;
  #endif
@@ -187,7 +187,7 @@ index bdd5bec301f5fcff2d3e3d7994ecbc4eae46da36..f6082bada22c5f4e70af60ea6f555b0f
    host->GetChildProcess()->BindServiceInterface(std::move(receiver));
  }
 diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
-index aa8b2a92140b2be01860f4de0b739b90942ecd4c..51962b374123297f89126b6a5ebe3fccf0606ca1 100644
+index b0be2d050c84a2e824f7fe5f458dc60d4a53cc9e..59319bf14d79c27ef48a37e7463dfb868e412e23 100644
 --- a/content/browser/utility_process_host.cc
 +++ b/content/browser/utility_process_host.cc
 @@ -188,11 +188,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@@ -237,7 +237,7 @@ index aa8b2a92140b2be01860f4de0b739b90942ecd4c..51962b374123297f89126b6a5ebe3fcc
  mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
    return static_cast<ChildProcessHostImpl*>(process_->GetHost())
        ->child_process();
-@@ -448,9 +474,26 @@ bool UtilityProcessHost::StartProcess() {
+@@ -449,9 +475,26 @@ bool UtilityProcessHost::StartProcess() {
      }
  #endif  // BUILDFLAG(ENABLE_GPU_CHANNEL_MEDIA_CAPTURE) && !BUILDFLAG(IS_WIN)
  

+ 7 - 7
patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

@@ -90,7 +90,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
   private:
    const HWND hwnd_;
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index 51fd7f87f0d8b07b1b7f531ff0033976d9327e53..f53aa0c2c8b3a428c08ca6715d6b837a28ad0892 100644
+index 610ed4c922705697b27af569af55064daeff5d25..9cb52cb768e648235f89f65e870d853d45268900 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
 @@ -168,6 +168,8 @@ viz_component("service") {
@@ -522,7 +522,7 @@ index 4d6cc977ed5000d93918336a0dd57f60c0e95bbb..54d936e86b60f0538c70c4ee69e109cc
    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
-index 5f2da4e50e5b1ef4a120c4b8102ebcaea584681f..014e985ad5eaac42370657ebaf8484e376438332 100644
+index d119eb1e217cf90c85bf752f1530345b1eec01f2..655ed4ee5525a126309f173775a28e183b4dd29a 100644
 --- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
 +++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
 @@ -112,7 +112,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -620,10 +620,10 @@ index 2f462f0deb5fc8a637457243fb5d5849fc214d14..695869b83cefaa24af93a2e11b39de05
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index f58baf68d5c77cc00b421fe9c82fb47fda9c5da4..d273005942ac48cef4d9b00f5b1baeb917114c80 100644
+index 7f71cc6b8812cc112262d3e9153884e428a7e495..8a61b0cc5d45a55ac188babf63b59492cff428e1 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
-@@ -90,6 +90,7 @@ class DisplayPrivate;
+@@ -92,6 +92,7 @@ class DisplayPrivate;
  class ExternalBeginFrameController;
  }  // namespace mojom
  
@@ -631,7 +631,7 @@ index f58baf68d5c77cc00b421fe9c82fb47fda9c5da4..d273005942ac48cef4d9b00f5b1baeb9
  class HostFrameSinkManager;
  class LocalSurfaceId;
  class RasterContextProvider;
-@@ -152,6 +153,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory {
+@@ -154,6 +155,15 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory {
        viz::mojom::ExternalBeginFrameControllerClient>
    CreateExternalBeginFrameControllerClient() = 0;
  };
@@ -647,7 +647,7 @@ index f58baf68d5c77cc00b421fe9c82fb47fda9c5da4..d273005942ac48cef4d9b00f5b1baeb9
  
  // Compositor object to take care of GPU painting.
  // A Browser compositor object is responsible for generating the final
-@@ -196,6 +206,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -198,6 +208,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
    // Schedules a redraw of the layer tree associated with this compositor.
    void ScheduleDraw();
  
@@ -657,7 +657,7 @@ index f58baf68d5c77cc00b421fe9c82fb47fda9c5da4..d273005942ac48cef4d9b00f5b1baeb9
    // Sets the root of the layer tree drawn by this Compositor. The root layer
    // must have no parent. The compositor's root layer is reset if the root layer
    // is destroyed. NULL can be passed to reset the root layer, in which case the
-@@ -612,6 +625,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -620,6 +633,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
        simple_begin_frame_observers_;
    std::unique_ptr<ui::HostBeginFrameObserver> host_begin_frame_observer_;
  

+ 2 - 2
patches/chromium/feat_enable_passing_exit_code_on_service_process_crash.patch

@@ -52,10 +52,10 @@ index f6082bada22c5f4e70af60ea6f555b0f363919c5..f691676a629bf82f81117599ae0bd0a4
  
   private:
 diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
-index 51962b374123297f89126b6a5ebe3fccf0606ca1..ea4260d475933cb37cb2ac4873f6d886e438b909 100644
+index 59319bf14d79c27ef48a37e7463dfb868e412e23..ff6f3ea26f0ccb741cd292bc417a47719de86487 100644
 --- a/content/browser/utility_process_host.cc
 +++ b/content/browser/utility_process_host.cc
-@@ -531,7 +531,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
+@@ -532,7 +532,7 @@ void UtilityProcessHost::OnProcessCrashed(int exit_code) {
    // Take ownership of |client_| so the destructor doesn't notify it of
    // termination.
    auto client = std::move(client_);

+ 1 - 1
patches/chromium/feat_expose_documentloader_setdefersloading_on_webdocumentloader.patch

@@ -28,7 +28,7 @@ index 23b29fe25bc463ff1d36aa502a27c4222595e7c5..c1ac6172c4cee72f64f42ca64d2db9c0
  
    // Returns the http referrer of original request which initited this load.
 diff --git a/third_party/blink/renderer/core/loader/document_loader.h b/third_party/blink/renderer/core/loader/document_loader.h
-index 2568658735315720f05c09d7b5324700be8f17bc..4225e8799622e47124efcbeb24a85b22874bb6c3 100644
+index 1c6da71f9526f1567fe18d40524818f48e62584a..63b9bdae7f6552e047023be3b503bf05154e7ca9 100644
 --- a/third_party/blink/renderer/core/loader/document_loader.h
 +++ b/third_party/blink/renderer/core/loader/document_loader.h
 @@ -327,7 +327,7 @@ class CORE_EXPORT DocumentLoader : public GarbageCollected<DocumentLoader>,

+ 5 - 5
patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch

@@ -37,7 +37,7 @@ index babcf42e01be00da8b853a1207e869614765b2bb..1c051a64d77e3ea8909dced73d93764d
           allow_cookies_from_browser == other.allow_cookies_from_browser &&
           include_request_cookies_with_response ==
 diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
-index 23762da9e9ff297007685662f45343b68d7aa351..cc4b067095a46ca34e5d409b10f0c91486b399a8 100644
+index 3d1e70bd812c18206846f4188b85321e931964bb..cc3aad56c873bd97adb1179b1626d14ef346378c 100644
 --- a/services/network/public/cpp/resource_request.h
 +++ b/services/network/public/cpp/resource_request.h
 @@ -76,6 +76,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -61,7 +61,7 @@ index de0780c4f29026d3cc7d2742d8e80acddc6916ad..76c724151ee12fccecd36d2e9a6b7f26
        mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
    out->trust_token_observer = data.TakeTrustTokenObserver<
 diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
-index 60feb8454fb3d41e5297a2b10c04baee4a4c01bf..08f82304444f4596a6054b758feb3803dfa3618e 100644
+index ebd70d33c9e7df5abd35ed3683f39d0e7fc8b34d..45dd29445589dec900221edb65f8fe566b81ca6e 100644
 --- a/services/network/public/cpp/url_request_mojom_traits.h
 +++ b/services/network/public/cpp/url_request_mojom_traits.h
 @@ -70,6 +70,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -112,7 +112,7 @@ index 5c4b8a05034f8defacbc13671fe9bc92f76ade5a..e7390e01f113755613f42d592b36108b
    string mime_type;
  
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index 805ebedd50772df795c13684d8f4e2452723fee9..3ef307958c8b1b95af797a95fe9deb131b8a0dbb 100644
+index 4a55e0381a239294a868b5aece518bed26985e83..7daf3e28f12084a3ba8ca132d846dcf333f5d799 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
 @@ -666,6 +666,9 @@ URLLoader::URLLoader(
@@ -134,7 +134,7 @@ index 805ebedd50772df795c13684d8f4e2452723fee9..3ef307958c8b1b95af797a95fe9deb13
      url_request_->SetResponseHeadersCallback(base::BindRepeating(
          &URLLoader::SetRawResponseHeaders, base::Unretained(this)));
    }
-@@ -2036,6 +2039,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
+@@ -2049,6 +2052,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
    }
  
    response_ = BuildResponseHead();
@@ -155,7 +155,7 @@ index 805ebedd50772df795c13684d8f4e2452723fee9..3ef307958c8b1b95af797a95fe9deb13
  
    // 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 6dc9341df6fcdaff1dcefc8d7d1e2be27f9bd3ce..da41999306bdc47743b74f4e73a7a8ca62b3d907 100644
+index 4ce74976a4902914e6f59ea943ef3b5b92d090f6..783e4bd84074530e8ded3af8a1869274bb5ebe0c 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
 @@ -714,6 +714,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader

+ 2 - 2
patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch

@@ -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 4f81c7854247e6c2ffffe39751ae6ca3377afb66..d85a71dde16218bc942245c895666ecf038bcef7 100644
+index 8e7fb47f5f28f40e8e3bd00d2bb1c928112976e4..8d5a5d16fa08b9eb4abcf167a0d5acd8351a582c 100644
 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
 +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
-@@ -230,8 +230,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
+@@ -250,8 +250,17 @@ void OnShareableContentCreated(SCShareableContent* content) {
            // fallback. See https://crbug.com/325530044.
            if (source_.id == display.displayID ||
                source_.id == webrtc::kFullDesktopScreenId) {

+ 2 - 2
patches/chromium/fix_add_method_which_disables_headless_mode_on_native_widget.patch

@@ -12,10 +12,10 @@ ui problems (like dissapearing popup during typing in html's
 input list.
 
 diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
-index 6dae25a61bfaf26c59f044628629771c36be73f3..2e76f18cf48303462c7489a01d002a3531695b83 100644
+index 842ea6f7eb2415170a59e46ca955165d656ba149..1ea926753f65baa8f9671fdd63f98fb94c28ba6c 100644
 --- a/ui/views/widget/widget.h
 +++ b/ui/views/widget/widget.h
-@@ -1201,6 +1201,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
+@@ -1200,6 +1200,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
    // True if widget was created in headless mode.
    bool is_headless() const { return is_headless_; }
  

+ 5 - 5
patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch

@@ -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.
 
 diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
-index 0c67607fd99b2fceba176308a041c8f08643506a..6b38139e1b58db7c7a0c4d553ed2cdaa11a63d2d 100644
+index b98cb8525ca3a17bdabfb22bbf6fc19840cff247..9e7b805177b44a43aef1608f0e158721362dc7ad 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -10980,6 +10980,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
+@@ -11059,6 +11059,12 @@ NavigationRequest::GetOriginForURLLoaderFactoryUncheckedWithDebugInfo() {
          "blob");
    }
  
@@ -45,10 +45,10 @@ index 0c67607fd99b2fceba176308a041c8f08643506a..6b38139e1b58db7c7a0c4d553ed2cdaa
    // origin of |common_params.url| and/or |common_params.initiator_origin|.
    url::Origin resolved_origin = url::Origin::Resolve(
 diff --git a/third_party/blink/renderer/core/loader/document_loader.cc b/third_party/blink/renderer/core/loader/document_loader.cc
-index cbf8b2ed5ce03a3b4524f4e7f97bbb7750e5c583..b84bdff826390234f470025edba02abddefff045 100644
+index 0c7b5af098a53a8709cdf62d455520ccef222dbb..1b6a7942c1506abc2fbe7d1efe58c0964a4e3be0 100644
 --- a/third_party/blink/renderer/core/loader/document_loader.cc
 +++ b/third_party/blink/renderer/core/loader/document_loader.cc
-@@ -2325,6 +2325,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
+@@ -2336,6 +2336,10 @@ Frame* DocumentLoader::CalculateOwnerFrame() {
  scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
      Document* owner_document) {
    scoped_refptr<SecurityOrigin> origin;
@@ -59,7 +59,7 @@ index cbf8b2ed5ce03a3b4524f4e7f97bbb7750e5c583..b84bdff826390234f470025edba02abd
    StringBuilder debug_info_builder;
    // Whether the origin is newly created within this call, instead of copied
    // from an existing document's origin or from `origin_to_commit_`. If this is
-@@ -2378,6 +2382,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
+@@ -2389,6 +2393,10 @@ scoped_refptr<SecurityOrigin> DocumentLoader::CalculateOrigin(
      // the end of this function.
      origin = origin_to_commit_;
      debug_info_builder.Append("use_origin_to_commit");

+ 7 - 7
patches/chromium/fix_disabling_background_throttling_in_compositor.patch

@@ -12,10 +12,10 @@ invisible state of the `viz::DisplayScheduler` owned
 by the `ui::Compositor`.
 
 diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
-index 12cf38959be01d05cd43a9635ac87538c4f5e5ad..1a2a1bb5480085432c9575a90fb6959b9d0eac87 100644
+index 008df596834faccfa19525dcae0239ffed7b2c3f..aecfa059c6ac53a3377e1f60b3c66bbb594514a3 100644
 --- a/ui/compositor/compositor.cc
 +++ b/ui/compositor/compositor.cc
-@@ -350,7 +350,8 @@ void Compositor::SetLayerTreeFrameSink(
+@@ -361,7 +361,8 @@ void Compositor::SetLayerTreeFrameSink(
    if (display_private_) {
      disabled_swap_until_resize_ = false;
      display_private_->Resize(size());
@@ -25,7 +25,7 @@ index 12cf38959be01d05cd43a9635ac87538c4f5e5ad..1a2a1bb5480085432c9575a90fb6959b
      display_private_->SetDisplayColorSpaces(display_color_spaces_);
      display_private_->SetDisplayColorMatrix(
          gfx::SkM44ToTransform(display_color_matrix_));
-@@ -570,7 +571,9 @@ void Compositor::SetVisible(bool visible) {
+@@ -581,7 +582,9 @@ void Compositor::SetVisible(bool visible) {
    // updated then. We need to call this even if the visibility hasn't changed,
    // for the same reason.
    if (display_private_)
@@ -36,7 +36,7 @@ index 12cf38959be01d05cd43a9635ac87538c4f5e5ad..1a2a1bb5480085432c9575a90fb6959b
  
    if (changed) {
      observer_list_.Notify(&CompositorObserver::OnCompositorVisibilityChanged,
-@@ -1023,6 +1026,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
+@@ -1034,6 +1037,15 @@ void Compositor::MaybeUpdateObserveBeginFrame() {
        host_begin_frame_observer_->GetBoundRemote());
  }
  
@@ -53,10 +53,10 @@ index 12cf38959be01d05cd43a9635ac87538c4f5e5ad..1a2a1bb5480085432c9575a90fb6959b
  void Compositor::SetSeamlessRefreshRates(
      const std::vector<float>& seamless_refresh_rates) {
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index d273005942ac48cef4d9b00f5b1baeb917114c80..679c4fb30252b447c83dfc4d75caeded54798299 100644
+index 8a61b0cc5d45a55ac188babf63b59492cff428e1..07200e5320c999f1a067ce785b7ad5c7952586d7 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
-@@ -521,6 +521,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -523,6 +523,10 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
  
    const cc::LayerTreeSettings& GetLayerTreeSettings() const;
  
@@ -67,7 +67,7 @@ index d273005942ac48cef4d9b00f5b1baeb917114c80..679c4fb30252b447c83dfc4d75caeded
    size_t saved_events_metrics_count_for_testing() const {
      return host_->saved_events_metrics_count_for_testing();
    }
-@@ -706,6 +710,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
+@@ -714,6 +718,12 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
    // See go/report-ux-metrics-at-painting for details.
    bool animation_started_ = false;
  

+ 6 - 6
patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch

@@ -9,10 +9,10 @@ focus node change via TextInputManager.
 chromium-bug: https://crbug.com/1369605
 
 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 dd7347996d3e4dcf2ba27258b771e705d31384b6..7e88f2322e5f8a2790f19d094bc5a912abb816c8 100644
+index 9503beefcbcfe7d99674582ece10a7e551fae96d..32302e3dae2098319ed2d1f1403649fe8db2887e 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -3225,6 +3225,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
+@@ -3229,6 +3229,12 @@ void RenderWidgetHostViewAura::OnTextSelectionChanged(
    }
  }
  
@@ -26,10 +26,10 @@ index dd7347996d3e4dcf2ba27258b771e705d31384b6..7e88f2322e5f8a2790f19d094bc5a912
      RenderWidgetHostViewAura* popup_child_host_view) {
    popup_child_host_view_ = popup_child_host_view;
 diff --git a/content/browser/renderer_host/render_widget_host_view_aura.h b/content/browser/renderer_host/render_widget_host_view_aura.h
-index 11fdb50a81150113d5064c8fcd4abc85764660b2..c457232607723779355384e4c6843ca453f5799d 100644
+index 06fc7daf2761ae728f3adf9eb2ef3910a14cf827..8d34f9dfd9a8625a3fab397f7b96c12c87cb8a61 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.h
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.h
-@@ -652,6 +652,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
+@@ -653,6 +653,8 @@ class CONTENT_EXPORT RenderWidgetHostViewAura
        RenderWidgetHostViewBase* updated_view) override;
    void OnTextSelectionChanged(TextInputManager* text_input_mangager,
                                RenderWidgetHostViewBase* updated_view) override;
@@ -87,10 +87,10 @@ index 51522e60d6dc14f1113cc438558b6b393c3fe73a..153ed02f493a83ef9ca354cc18736f93
    // 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
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index b3d5c5522ea1afb0a3d3ce076f5e05f34b4ea488..0346d081467f0728183f55b0d088325d776e6290 100644
+index ab1dc94b4c98913c20a0862dabfa15e3f1879f60..037e3a33c6238b22c6f82ca3ec17b85f3aba3cd4 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -9701,7 +9701,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
+@@ -9729,7 +9729,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
                          "WebContentsImpl::OnFocusedElementChangedInFrame",
                          "render_frame_host", frame);
    RenderWidgetHostViewBase* root_view =

+ 2 - 2
patches/chromium/fix_restore_original_resize_performance_on_macos.patch

@@ -11,10 +11,10 @@ This patch should be upstreamed as a conditional revert of the logic in desktop
 vs mobile runtimes.  i.e. restore the old logic only on desktop platforms
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index e49341203f9de52d7adf3152400f424bde11b0e2..2062b186448130159ca1cafcd86a074dff8ce84c 100644
+index e420ccfd374e1a6be1ab1e16752584413de23c63..7d3d003fee030926e330a02a9f00b1f807940be3 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2090,9 +2090,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
+@@ -2103,9 +2103,8 @@ RenderWidgetHostImpl::GetWidgetInputHandler() {
  void RenderWidgetHostImpl::NotifyScreenInfoChanged() {
    // The resize message (which may not happen immediately) will carry with it
    // the screen info as well as the new size (if the screen has changed scale

+ 5 - 5
patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch

@@ -20,7 +20,7 @@ index fc9cb7e68bdad4c40fab63f70243e09ad005ab80..199fbceda530da31aab9126d78b4bd21
        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 a75e0a913627e0648b2857613f50bb9a7777ce1a..bf1e77268249efea84dc68fa16ef383cc2292edd 100644
+index f5ec8d885be87b7f2199092b118524f8fb0cc6bc..e42ffaabae75a7db9fe46a33ce58f430c80d768f 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
 @@ -459,6 +459,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -80,7 +80,7 @@ index 4da759d7ab6d6fb6b6d4d1648da0e62d7629ad5c..7e537b54b11220f3bc6619b027677182
  
  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 846bb3f11c60152e86d8ee50369a8bbcc7a6cb7d..5047a3dc08cdf24ee3418c39c930e3f34ea83add 100644
+index b90e58cb52d32c10d5dcabf3de001b510e1a4cc4..c2ba0c05a74fc786684b50093720e509c6f723c3 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.h
 +++ b/third_party/blink/renderer/core/frame/local_frame.h
 @@ -814,6 +814,7 @@ class CORE_EXPORT LocalFrame final
@@ -203,10 +203,10 @@ index fa65331f40b90d812b71a489fd560e9359152d2b..390714d631dc88ef92d59ef9618a5706
    const mojom::blink::UserActivationOption user_activation_option_;
    const mojom::blink::LoadEventBlockingOption blocking_option_;
 diff --git a/third_party/blink/renderer/core/frame/web_frame_test.cc b/third_party/blink/renderer/core/frame/web_frame_test.cc
-index c7ae64a16dbf0a15bb60276a2e1002d72621f889..28d375a355b31c6f764c3158e59487775a0354d5 100644
+index 2e2aa78d308157642cf27941fc22a211f6396a0d..c5bcbe1f933f2e79003f7eb9f6368174426a6f0a 100644
 --- a/third_party/blink/renderer/core/frame/web_frame_test.cc
 +++ b/third_party/blink/renderer/core/frame/web_frame_test.cc
-@@ -297,6 +297,7 @@ void ExecuteScriptsInMainWorld(
+@@ -298,6 +298,7 @@ void ExecuteScriptsInMainWorld(
        DOMWrapperWorld::kMainWorldId, sources, user_gesture,
        mojom::blink::EvaluationTiming::kSynchronous,
        mojom::blink::LoadEventBlockingOption::kDoNotBlock, std::move(callback),
@@ -215,7 +215,7 @@ index c7ae64a16dbf0a15bb60276a2e1002d72621f889..28d375a355b31c6f764c3158e5948777
        mojom::blink::WantResultOption::kWantResult, wait_for_promise);
  }
 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 4324f5cfe8fe78bb42a4bb6b393a5f2a1591b141..45293740bb09f87d237b21867b8aba5967852686 100644
+index 17dfa9c34625493409a7e1f7a403413d1f4ac940..1b43dc5b302b8ba3c4194b37c7cd45332d329912 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
 @@ -1097,14 +1097,15 @@ void WebLocalFrameImpl::RequestExecuteScript(

+ 3 - 3
patches/chromium/fix_use_delegated_generic_capturer_when_available.patch

@@ -15,10 +15,10 @@ 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 56e7c4058bbdd4d13c5ac90eb41972ad63da8abf..f5d78bb1c70f656c91596fd389aa0b70533b6148 100644
+index 010deff30b050c1de9324f969588385958bcb14e..b4b1e9ee805a8565a04737e0898ad8e46709c4d8 100644
 --- a/content/browser/media/capture/desktop_capture_device.cc
 +++ b/content/browser/media/capture/desktop_capture_device.cc
-@@ -899,8 +899,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
+@@ -902,8 +902,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
  
    switch (source.type) {
      case DesktopMediaID::TYPE_SCREEN: {
@@ -35,7 +35,7 @@ index 56e7c4058bbdd4d13c5ac90eb41972ad63da8abf..f5d78bb1c70f656c91596fd389aa0b70
        if (screen_capturer && screen_capturer->SelectSource(source.id)) {
          capturer = std::make_unique<webrtc::DesktopAndCursorComposer>(
              std::move(screen_capturer), options);
-@@ -913,8 +919,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
+@@ -916,8 +922,14 @@ std::unique_ptr<media::VideoCaptureDevice> DesktopCaptureDevice::Create(
      }
  
      case DesktopMediaID::TYPE_WINDOW: {

+ 4 - 4
patches/chromium/frame_host_manager.patch

@@ -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 9030e3be131eb2e4cf60bbe34c8e54bb2912283b..78fa182b5a25a850dc0a4104d8f045057ea3a028 100644
+index 7ece2f1a4e55587c37bff9ebeec6d8783625f795..fc5f6cffb6eee6a80728e649ec503d3be10644bc 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -4716,6 +4716,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -4728,6 +4728,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -20,10 +20,10 @@ index 9030e3be131eb2e4cf60bbe34c8e54bb2912283b..78fa182b5a25a850dc0a4104d8f04505
  }
  
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 045689f947f45e7d4c50850ba760b0861af79798..7be5a91c4f132ce73869e8680db85d43feed6cc0 100644
+index abdac7f78b24392e04c431584a0bae8fca814df6..bd284a39c7f23fc56860eb4ad68afefbd1b18801 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -344,6 +344,11 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -339,6 +339,11 @@ class CONTENT_EXPORT ContentBrowserClient {
  
    virtual ~ContentBrowserClient() = default;
  

+ 2 - 2
patches/chromium/gritsettings_resource_ids.patch

@@ -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 9af4abc3411d81d6839937df38f2a3534eeab9cf..f65e8bd618f71ebb8e5ef30a2eeb8e7417be16d2 100644
+index b162935b2b83c06fd58ad955f0506e11ed6c73f7..dec7cb3653328bc94dafd21efda8e9098e1a2c5a 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -1463,6 +1463,11 @@
+@@ -1467,6 +1467,11 @@
    "<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": {
      "META": {"sizes": {"messages": [2000],}},
      "messages": [10080],

+ 1 - 1
patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch

@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
 Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
 
 diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
-index 76bdbec504d5c14d7ad57e2dabf968800dc60a99..47ef5260dda62057c115da7fb65f7ebaa6cf5c88 100755
+index 6602d1f1b2f5e6a4f3a49be2d79264aa1477d3af..26b511e1ec9691a91e13acb8297dc38ecc582313 100755
 --- a/tools/clang/scripts/update.py
 +++ b/tools/clang/scripts/update.py
 @@ -304,6 +304,8 @@ def GetDefaultHostOs():

+ 1 - 1
patches/chromium/ignore_parse_errors_for_pkey_appusermodel_toastactivatorclsid.patch

@@ -11,7 +11,7 @@ Bug: N/A
 Change-Id: I9fc472212b2d3afac2c8e18a2159bc2d50bbdf98
 
 diff --git a/AUTHORS b/AUTHORS
-index f4241df1a2f0919c51a15f9a55a24781ac7bd02a..af43f7c96ab4b6daa4a5f823fd9f449530361b7e 100644
+index 66e37c775006eaba80440a48b92cce825efd2944..8d03ca899968f24ef73c8563dfe8f13bf4fc6ee8 100644
 --- a/AUTHORS
 +++ b/AUTHORS
 @@ -340,6 +340,7 @@ David Futcher <[email protected]>

+ 3 - 3
patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch

@@ -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 ec79b3c8e3e434987f2f08d95c8567982a0c4368..d5e5f81b8c6ccae1822e8192b107eeff2d3a6dd9 100644
+index 35023e37a34bbcdcfa09cbdad55648f8e0419b37..9a10db499bd0a48feb1c96f87e71af4ffb114d75 100644
 --- a/ui/ozone/platform/x11/ozone_platform_x11.cc
 +++ b/ui/ozone/platform/x11/ozone_platform_x11.cc
-@@ -193,6 +193,7 @@ class OzonePlatformX11 : public OzonePlatform,
+@@ -194,6 +194,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 ec79b3c8e3e434987f2f08d95c8567982a0c4368..d5e5f81b8c6ccae1822e8192b107eeff
        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 78e83ecd9bf73cbc8d9c1d697f022f9f1f0f1d66..8ca1b1451b5bea0100a723e327762d16622c76fe 100644
+index 2f088c0ee697b2525c9770eb8d02e28ae48a85d2..ed8fe0a40537b598695af8aa42c2f0bdc61ab1bb 100644
 --- a/ui/ozone/public/ozone_platform.h
 +++ b/ui/ozone/public/ozone_platform.h
 @@ -128,6 +128,10 @@ class COMPONENT_EXPORT(OZONE) OzonePlatform {

+ 1 - 1
patches/chromium/load_v8_snapshot_in_browser_process.patch

@@ -9,7 +9,7 @@ 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 bd44d9c63b506f8e2c126f2bc0054b1d018b9b39..08fa1ff278c0b6b2f804d79234898b90f3d29b29 100644
+index cefdfbba24ab6da7d12a94541c03b01a497e4036..68842f303c7ce77fedf8c7c0bc9824b52d0aac16 100644
 --- a/content/app/content_main_runner_impl.cc
 +++ b/content/app/content_main_runner_impl.cc
 @@ -292,11 +292,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

+ 35 - 35
patches/chromium/mas_avoid_private_macos_api_usage.patch.patch

@@ -35,10 +35,10 @@ system font by checking if it's kCTFontPriorityAttribute is set to
 system priority.
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 9f37a5f18f623c9502c2e2e254df905ba34c9d6c..121c577e0c0c518bd0ae1e5b5aa15cb1c6165315 100644
+index bd024dbc6fdbdf7116453f7d36a9f0795713ebb6..fad6b58f6c44c9bafce89a132bf0f86f8fa291a8 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
-@@ -1027,6 +1027,7 @@ component("base") {
+@@ -1031,6 +1031,7 @@ component("base") {
      "//build:ios_buildflags",
      "//build/config/compiler:compiler_buildflags",
      "//third_party/modp_b64",
@@ -474,10 +474,10 @@ index 36c522793dc37f7c72f7cccde50895927b5560cb..689351b5a6e6e6013b808c1b4924b884
    // Beware: This view was briefly removed (in favor of a bare CALayer) in
    // https://crrev.com/c/1236675. The ordering of unassociated layers relative
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index 6e7ea90385f34b233a0c7beb6647f539ad976169..51fd7f87f0d8b07b1b7f531ff0033976d9327e53 100644
+index b1cb8132b0e8d7bb18848d49634ecaaa939eefd4..610ed4c922705697b27af569af55064daeff5d25 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
-@@ -370,6 +370,7 @@ viz_component("service") {
+@@ -371,6 +371,7 @@ viz_component("service") {
          "frame_sinks/external_begin_frame_source_mac.h",
        ]
      }
@@ -485,7 +485,7 @@ index 6e7ea90385f34b233a0c7beb6647f539ad976169..51fd7f87f0d8b07b1b7f531ff0033976
    }
  
    if (is_android || use_ozone) {
-@@ -670,6 +671,7 @@ viz_source_set("unit_tests") {
+@@ -671,6 +672,7 @@ viz_source_set("unit_tests") {
        "display_embedder/software_output_device_mac_unittest.mm",
      ]
      frameworks = [ "IOSurface.framework" ]
@@ -545,7 +545,7 @@ index dbf334caa3a6d10017b69ad76802e389a011436b..da828823e8195cc9e497866363c9af93
  
    void ForwardKeyboardEvent(const input::NativeWebKeyboardEvent& key_event,
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index df6ef6912d0ffad09f0c52d68d7b2e4b46c42c2b..ec95982654b0604883ea88141367837a7b861425 100644
+index 08186f30eaa97caf18ac2fe47655526e7733d9df..e4cd1f436ad1734f357429cb3ad6c85430bf1d76 100644
 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 @@ -35,6 +35,7 @@
@@ -579,22 +579,22 @@ index df6ef6912d0ffad09f0c52d68d7b2e4b46c42c2b..ec95982654b0604883ea88141367837a
    return kAttributes;
  }
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index 4504187d037a49ea3d3751dc57b997b06207b646..299e56b0f858d54565e1d1f0711002247ce5d790 100644
+index 6da224ff8aef4d9ede9fdfb84086fb798613aedb..634e4e79b090b3c88f4f60f7323a40c001435c32 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -330,6 +330,7 @@ source_set("browser") {
-     "//ui/touch_selection",
+@@ -332,6 +332,7 @@ source_set("browser") {
      "//ui/webui/resources",
+     "//v8",
      "//v8:v8_version",
 +    "//electron/build/config:generate_mas_config",
    ]
  
    public_deps = [
 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 bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d6c92c9e3 100644
+index b58722615ebd4012816ed3246145cb1a088bfe17..1fde1a7ae8a8885bc3210fe0298476acbb2c915d 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.h
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
-@@ -23,6 +23,7 @@
+@@ -24,6 +24,7 @@
  #include "content/browser/renderer_host/text_input_manager.h"
  #include "content/common/content_export.h"
  #include "content/common/render_widget_host_ns_view.mojom.h"
@@ -602,7 +602,7 @@ index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d
  #include "mojo/public/cpp/bindings/associated_receiver.h"
  #include "mojo/public/cpp/bindings/associated_remote.h"
  #include "third_party/blink/public/mojom/webshare/webshare.mojom.h"
-@@ -53,7 +54,9 @@ class CursorManager;
+@@ -54,7 +55,9 @@ class CursorManager;
  
  @protocol RenderWidgetHostViewMacDelegate;
  
@@ -612,7 +612,7 @@ index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d
  @class RenderWidgetHostViewCocoa;
  
  namespace content {
-@@ -691,9 +694,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
+@@ -693,9 +696,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
    // EnsureSurfaceSynchronizedForWebTest().
    uint32_t latest_capture_sequence_number_ = 0u;
  
@@ -625,10 +625,10 @@ index bea4e26ef8577e8e8bc60287cf1b94c7dfcc9478..eed42b0cbc3422b7fd59ae1b2550c53d
    // 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 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13273916f4 100644
+index 9924e2e37dc04b12cc08b3451769734267b600bf..943e3b8875c68178e84ae79c241c7a31e9305c6c 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -48,6 +48,7 @@
+@@ -49,6 +49,7 @@
  #include "content/public/browser/render_widget_host.h"
  #include "content/public/browser/web_contents.h"
  #include "content/public/common/page_visibility_state.h"
@@ -636,7 +636,7 @@ index 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13
  #include "media/base/media_switches.h"
  #include "skia/ext/platform_canvas.h"
  #include "skia/ext/skia_utils_mac.h"
-@@ -273,8 +274,10 @@
+@@ -274,8 +275,10 @@
  void RenderWidgetHostViewMac::MigrateNSViewBridge(
      remote_cocoa::mojom::Application* remote_cocoa_application,
      uint64_t parent_ns_view_id) {
@@ -647,7 +647,7 @@ index 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13
  
    // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
    // pointers. `ns_view_` gets reinitialized later in this method.
-@@ -1622,8 +1625,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1627,8 +1630,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -658,7 +658,7 @@ index 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13
    return [GetInProcessNSView() window];
  }
  
-@@ -1672,9 +1677,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1677,9 +1682,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -670,7 +670,7 @@ index 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -2201,20 +2208,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -2206,20 +2213,26 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  void RenderWidgetHostViewMac::GetRenderWidgetAccessibilityToken(
      GetRenderWidgetAccessibilityTokenCallback callback) {
    base::ProcessId pid = getpid();
@@ -698,7 +698,7 @@ index 430426a0123508a45bf48dcbfb46d1c4dc9d9347..efa697b7c4d428200d14e436ab062c13
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
-index 804e0934004a465b610fb9b83692adea15808d87..486dffeffc1637af3a4eba4d037e71628573c6ac 100644
+index 9de0d44a70c4c2587a7e4283783b614174393819..87dfae661a98819118d48cd973862d8fabc7bfa6 100644
 --- a/content/common/BUILD.gn
 +++ b/content/common/BUILD.gn
 @@ -285,6 +285,7 @@ source_set("common") {
@@ -792,10 +792,10 @@ index a1068589ad844518038ee7bc15a3de9bc5cba525..1ff781c49f086ec8015c7d3c44567dbe
  
  }  // namespace content
 diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
-index b703520ad916428f73272fba8e435d0e0107434a..7686163233e8c7956d37c08a98acd862577a4bf6 100644
+index b2bf9da029a9376376e2e7aecafd8b1ce7f169ed..85413670b3caf7f7aff4b6f1bc22b0149ea9b612 100644
 --- a/content/test/BUILD.gn
 +++ b/content/test/BUILD.gn
-@@ -652,6 +652,7 @@ static_library("test_support") {
+@@ -658,6 +658,7 @@ static_library("test_support") {
      "//url",
      "//url/mojom:url_mojom_gurl",
      "//v8",
@@ -803,7 +803,7 @@ index b703520ad916428f73272fba8e435d0e0107434a..7686163233e8c7956d37c08a98acd862
    ]
  
    data_deps = [
-@@ -1107,6 +1108,7 @@ static_library("browsertest_support") {
+@@ -1111,6 +1112,7 @@ static_library("browsertest_support") {
    }
  
    configs += [ "//v8:external_startup_data" ]
@@ -811,7 +811,7 @@ index b703520ad916428f73272fba8e435d0e0107434a..7686163233e8c7956d37c08a98acd862
  }
  
  mojom("content_test_mojo_bindings") {
-@@ -1934,6 +1936,7 @@ test("content_browsertests") {
+@@ -1945,6 +1947,7 @@ test("content_browsertests") {
      "//ui/shell_dialogs",
      "//ui/snapshot",
      "//ui/webui:test_support",
@@ -819,7 +819,7 @@ index b703520ad916428f73272fba8e435d0e0107434a..7686163233e8c7956d37c08a98acd862
    ]
  
    if (!(is_chromeos && target_cpu == "arm64" && current_cpu == "arm")) {
-@@ -3227,6 +3230,7 @@ test("content_unittests") {
+@@ -3246,6 +3249,7 @@ test("content_unittests") {
      "//ui/latency:test_support",
      "//ui/shell_dialogs:shell_dialogs",
      "//ui/webui:test_support",
@@ -910,7 +910,7 @@ index 973cd337f2781271b4ca3e29db07939ec6917327..90658a336138e4e50f93c38f1c1f465c
    if (is_ios) {
      sources += [ "image_transport_surface_ios.mm" ]
 diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
-index 36322ddd3047f96569f35807541a37d3c6672b09..0121a780cf3b79fc1120c1b85cd5cd30c14968ef 100644
+index 93665e7ec19efa8d94fe0bb4f195642f43432c24..23c25ce53e4e630e173777943770a09ee736cc3d 100644
 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
 +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
 @@ -8,6 +8,7 @@
@@ -921,8 +921,8 @@ index 36322ddd3047f96569f35807541a37d3c6672b09..0121a780cf3b79fc1120c1b85cd5cd30
  #include "gpu/ipc/service/command_buffer_stub.h"
  #include "gpu/ipc/service/image_transport_surface.h"
  #include "ui/gfx/ca_layer_result.h"
-@@ -23,7 +24,9 @@
- #include "ui/display/types/display_constants.h"
+@@ -27,7 +28,9 @@
+ #include <BrowserEngineKit/BrowserEngineKit.h>
  #endif
  
 +#if !IS_MAS_BUILD()
@@ -1431,7 +1431,7 @@ index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..9921ccb10d3455600eddd85f77f10228
  
  }  // namespace sandbox
 diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
-index 17b3ddd66513a01a631d77535cfeb1ae94881e0e..bde6c61489fe4f88abba79fd2fb809c292a3f99a 100644
+index 6ac98727ed852dc0a801dfbb997b5c87719cf57c..837b92ae18307772e12869a0a62bfa3067061418 100644
 --- a/third_party/blink/renderer/core/BUILD.gn
 +++ b/third_party/blink/renderer/core/BUILD.gn
 @@ -409,6 +409,7 @@ component("core") {
@@ -1463,10 +1463,10 @@ index d38e951cdbf1ab9b367273ad0fb8f962155a7f3b..e39ee0414cb54004096dbfffc4f768e8
    blink_core_sources_editing += [ "kill_ring_none.cc" ]
  }
 diff --git a/ui/accelerated_widget_mac/BUILD.gn b/ui/accelerated_widget_mac/BUILD.gn
-index 79501bed8f5853d5dacaaaf08af833b81f3babb7..d3d2759e0b6512ab01d1ef386f43468fe83408c2 100644
+index 47e88da13d22b60e27b458f2fd33f10829b31fc0..b32ad8cd5af69c835ecfdbf50329347fb700f9b3 100644
 --- a/ui/accelerated_widget_mac/BUILD.gn
 +++ b/ui/accelerated_widget_mac/BUILD.gn
-@@ -67,6 +67,7 @@ component("accelerated_widget_mac") {
+@@ -68,6 +68,7 @@ component("accelerated_widget_mac") {
      "//ui/gfx",
      "//ui/gfx/geometry",
      "//ui/gl",
@@ -1475,7 +1475,7 @@ index 79501bed8f5853d5dacaaaf08af833b81f3babb7..d3d2759e0b6512ab01d1ef386f43468f
  }
  
 diff --git a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
-index 4cbd3fc082ead782e64a950dd5314b1de7e550d5..0f4be1fa6b78c2340ebadb57a62cd47f9b10cebf 100644
+index a615405dac100a08234b43f5ec354fb829bb5222..3cf40179700a4d5b69e18993b923f8f14919f9fa 100644
 --- a/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
 +++ b/ui/accelerated_widget_mac/ca_layer_tree_coordinator.h
 @@ -7,6 +7,7 @@
@@ -1496,7 +1496,7 @@ index 4cbd3fc082ead782e64a950dd5314b1de7e550d5..0f4be1fa6b78c2340ebadb57a62cd47f
  @class CALayer;
  
  namespace ui {
-@@ -108,7 +111,9 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
+@@ -110,7 +113,9 @@ class ACCELERATED_WIDGET_MAC_EXPORT CALayerTreeCoordinator {
    // both the current tree and the pending trees.
    size_t presented_ca_layer_trees_max_length_ = 2;
  
@@ -1898,7 +1898,7 @@ index fe3f85073e31de487a08e57d7f9b07aa4eccf8f3..cf5b07203c8bd559a404600cc98cc8ec
      // enough.
      return PlatformFontMac::SystemFontType::kGeneral;
 diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
-index ee47ca61db4c321edce0d6ae49f9f6a21f01918a..c8fcad4a3af57cfb993018f0ad457c271bdefe0e 100644
+index c19f5affab933815b6848f4a8b17d3ae03cdb8b5..8436286778bf6f267de7c08887e4b44ff01fb434 100644
 --- a/ui/views/BUILD.gn
 +++ b/ui/views/BUILD.gn
 @@ -718,6 +718,8 @@ component("views") {
@@ -1910,7 +1910,7 @@ index ee47ca61db4c321edce0d6ae49f9f6a21f01918a..c8fcad4a3af57cfb993018f0ad457c27
    }
  
    if (is_win) {
-@@ -1138,6 +1140,8 @@ source_set("test_support") {
+@@ -1140,6 +1142,8 @@ source_set("test_support") {
      "//ui/base/mojom:ui_base_types",
    ]
  

+ 6 - 6
patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
 session.setCertificateVerifyCallback.
 
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index a26102c62765825a7f94487ea72ca8d3c770060e..014012457bbda884ae6c9eaf46deb7f41e203351 100644
+index 4ebe50a989edc12592357e289c582aa8ef3c47f3..64dede12549790b8ce9e50b3de2a62154f5acf79 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 @@ -159,6 +159,11 @@
@@ -136,7 +136,7 @@ index a26102c62765825a7f94487ea72ca8d3c770060e..014012457bbda884ae6c9eaf46deb7f4
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -2569,6 +2674,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -2583,6 +2688,10 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
      cert_verifier = std::make_unique<net::CachingCertVerifier>(
          std::make_unique<net::CoalescingCertVerifier>(
              std::move(cert_verifier)));
@@ -148,7 +148,7 @@ index a26102c62765825a7f94487ea72ca8d3c770060e..014012457bbda884ae6c9eaf46deb7f4
  
    builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index 8fb2adb43ea3d9a47f4f27ae11fcdd986636a132..cc94073bc278af202cd6bbb47882b56f48a2ebbe 100644
+index dea6260bc08d4edf93df4afd4d01252f638694c0..fe04f634b32e503f6e93ae6f20c8c7f7c85d02be 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -113,6 +113,7 @@ class URLMatcher;
@@ -168,7 +168,7 @@ index 8fb2adb43ea3d9a47f4f27ae11fcdd986636a132..cc94073bc278af202cd6bbb47882b56f
    void ResetURLLoaderFactories() override;
    void GetViaObliviousHttp(
        mojom::ObliviousHttpRequestPtr request,
-@@ -935,6 +938,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -932,6 +935,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::vector<base::OnceClosure> dismount_closures_;
  #endif  // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
  
@@ -178,7 +178,7 @@ index 8fb2adb43ea3d9a47f4f27ae11fcdd986636a132..cc94073bc278af202cd6bbb47882b56f
    std::unique_ptr<HostResolver> internal_host_resolver_;
    std::set<std::unique_ptr<HostResolver>, base::UniquePtrComparator>
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index c292e1472c724af3c07497c1f3a29e638a746829..029287034d13f7c2bffa60900ecbbaa980330bf4 100644
+index d2cc00a218d5cf01562fc9b1dc55cc2d2ca275db..e928d012d77ccffe16263fd0ee7c2769adfe4bac 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
 @@ -307,6 +307,17 @@ struct SocketBrokerRemotes {
@@ -210,7 +210,7 @@ index c292e1472c724af3c07497c1f3a29e638a746829..029287034d13f7c2bffa60900ecbbaa9
    CreateURLLoaderFactory(
        pending_receiver<URLLoaderFactory> url_loader_factory,
 diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
-index 342dbfa64b8be6ad1777b7425302d5bb99e127e0..6b09b32c3a6206310baf87da0a2b4025d488fd09 100644
+index fc22fd2d7fa864dc565c99b0d36b2d31a8e13eaf..97e8f9f145cecad9b0cd8b43a2de4af29cec7778 100644
 --- a/services/network/test/test_network_context.h
 +++ b/services/network/test/test_network_context.h
 @@ -63,6 +63,8 @@ class TestNetworkContext : public mojom::NetworkContext {

+ 5 - 5
patches/chromium/notification_provenance.patch

@@ -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 ec78c36d4541d9d34f2109b880109ebe3bc817f8..67d92005e53cccbc9a4ae8a0db9c2c6220a09d88 100644
+index fcc5767027f6b9f2675d954f532779fafb94fd3a..dae6c3a8a8e5f61852896e661e1b169a87e05cdf 100644
 --- a/chrome/browser/notifications/platform_notification_service_impl.cc
 +++ b/chrome/browser/notifications/platform_notification_service_impl.cc
-@@ -239,6 +239,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
+@@ -243,6 +243,7 @@ bool PlatformNotificationServiceImpl::WasClosedProgrammatically(
  
  // TODO(awdf): Rename to DisplayNonPersistentNotification (Similar for Close)
  void PlatformNotificationServiceImpl::DisplayNotification(
@@ -133,10 +133,10 @@ index 05d3a12dd84c7005d46cc73b312f97ef418d96f5..4765de982802541b3efc7211d106acc7
        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 37b40579b1c067e9d0412c0b4df7b2f854a76fe1..eeccad9cc76ac28579b3fdb4484e37890919b390 100644
+index 005b93c6be6a5f76b09511d8380ced24336f5120..4ad8c7d353ddaa597f053efeb2ac4969ce28a8a9 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2154,7 +2154,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2145,7 +2145,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
      case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index 37b40579b1c067e9d0412c0b4df7b2f854a76fe1..eeccad9cc76ac28579b3fdb4484e3789
            creator_type, std::move(receiver));
        break;
      }
-@@ -2162,7 +2162,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2153,7 +2153,7 @@ void RenderProcessHostImpl::CreateNotificationService(
        CHECK(rfh);
  
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

+ 2 - 2
patches/chromium/partially_revert_is_newly_created_to_allow_for_browser_initiated.patch

@@ -10,10 +10,10 @@ an about:blank check to this area.
 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
-index 17a55006539fa252f607755ec5f3e7ed77350c87..7925748c0d712665d05234d455374425340fadab 100644
+index e1cb61f400db73463d14e9ee65fed74ebed166a8..ed591b4ec83df0c7e0b590824370d898aacb23d8 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -799,8 +799,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
+@@ -802,8 +802,8 @@ void VerifyThatBrowserAndRendererCalculatedOriginsToCommitMatch(
    // TODO(crbug.com/40092527): Consider adding a separate boolean that
    // tracks this instead of piggybacking `origin_calculation_debug_info`.
    if (renderer_side_origin.opaque() &&

+ 1 - 1
patches/chromium/port_autofill_colors_to_the_color_pipeline.patch

@@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them.  This patch can be
 our autofill implementation to work like Chromium's.
 
 diff --git a/ui/color/color_id.h b/ui/color/color_id.h
-index f03ca262c4aac9f3e3565b29b6a277ed3dad6580..12a08a9ee0193724d4c88719f6d82692feb59c3b 100644
+index 4521cef41d441fcf6bd7889243598cab40d3d642..3dd279e6c35387e1f40c389d7dfccfa5497155e8 100644
 --- a/ui/color/color_id.h
 +++ b/ui/color/color_id.h
 @@ -405,6 +405,10 @@

+ 2 - 2
patches/chromium/printing.patch

@@ -881,10 +881,10 @@ index 97cb6458bc9eec767db89b56abfc5f4b4136ff7b..d9a0b343158b8464b5c9aa8e0e655c0b
    ScriptingThrottler scripting_throttler_;
  
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index 299e56b0f858d54565e1d1f0711002247ce5d790..3b07b0d4785f4dfc8922286c4e9b172842c0ce67 100644
+index 634e4e79b090b3c88f4f60f7323a40c001435c32..8b03cf5aadf255ba2d39790382ecea93d180b9f6 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -3089,8 +3089,9 @@ source_set("browser") {
+@@ -3099,8 +3099,9 @@ source_set("browser") {
        "//ppapi/shared_impl",
      ]
  

+ 8 - 8
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `
 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
 
 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
-index ecb007b668458da1f8db4fca75f9c4428221dfbf..063007699b5b09ef8e6dbb39e044e4a1b8e6d8ae 100644
+index 8ad5a5042355ce918ab13784fbc0d633b6f0efa9..7f7b86abf3e18501025a854000f0d9adc9ec9abc 100644
 --- a/content/browser/renderer_host/render_widget_host_delegate.h
 +++ b/content/browser/renderer_host/render_widget_host_delegate.h
 @@ -28,6 +28,7 @@
@@ -19,7 +19,7 @@ index ecb007b668458da1f8db4fca75f9c4428221dfbf..063007699b5b09ef8e6dbb39e044e4a1
  #include "ui/gfx/native_widget_types.h"
  
  namespace blink {
-@@ -295,6 +296,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
+@@ -301,6 +302,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
    // Returns the associated RenderViewHostDelegateView*, if possible.
    virtual RenderViewHostDelegateView* GetDelegateView();
  
@@ -30,10 +30,10 @@ index ecb007b668458da1f8db4fca75f9c4428221dfbf..063007699b5b09ef8e6dbb39e044e4a1
    // 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 6bf8d9100658d406bae3d5f346c7c904ea9a3874..e49341203f9de52d7adf3152400f424bde11b0e2 100644
+index 99d7fe568cecce44b68dfb896f4d2560d75b5556..e420ccfd374e1a6be1ab1e16752584413de23c63 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2024,6 +2024,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
+@@ -2037,6 +2037,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
    if (view_) {
      view_->UpdateCursor(cursor);
    }
@@ -44,10 +44,10 @@ index 6bf8d9100658d406bae3d5f346c7c904ea9a3874..e49341203f9de52d7adf3152400f424b
  
  void RenderWidgetHostImpl::ShowContextMenuAtPoint(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 104e06b584e9321bc1da4c0913fd36e6cee909ee..bb132ec61070beaae27d583282bc3e9f34f5357b 100644
+index 7200d6e7959c19cd461d894be3fb4c27caf0fb9c..9715736427fda7e0054ca45ba782b2326a8d01fe 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -5752,6 +5752,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
+@@ -5780,6 +5780,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
    return text_input_manager_.get();
  }
  
@@ -60,10 +60,10 @@ index 104e06b584e9321bc1da4c0913fd36e6cee909ee..bb132ec61070beaae27d583282bc3e9f
      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 e94f3da32abdb79f6461f55790f4a7474c108eb0..601146957f33f866583243942f7d18ce5a62f492 100644
+index 1e3a3a2330a3d2f8ac318fb3ba293c49376eecf1..f855d0a22e2fb7cbe32133ae94e57e7333512575 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -1167,6 +1167,7 @@ class CONTENT_EXPORT WebContentsImpl
+@@ -1169,6 +1169,7 @@ class CONTENT_EXPORT WebContentsImpl
    void SendScreenRects() override;
    void SendActiveState(bool active) override;
    TextInputManager* GetTextInputManager() override;

+ 1 - 1
patches/chromium/refactor_expose_file_system_access_blocklist.patch

@@ -8,7 +8,7 @@ it in Electron and prevent drift from Chrome's blocklist. We should look for a w
 to upstream this change to Chrome.
 
 diff --git a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
-index 4b91ec38094bad8255e34ae91bfc333183c76d74..9d6773509c41aa13e07e93132cfa524355a2d049 100644
+index 29b4d446653e95aedbefbb8f3c026a4bd84823de..8b4effa49e7aa9318e4eae122d3a48d32c93343d 100644
 --- a/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 +++ b/chrome/browser/file_system_access/chrome_file_system_access_permission_context.cc
 @@ -45,7 +45,6 @@

+ 2 - 2
patches/chromium/refactor_unfilter_unresponsive_events.patch

@@ -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.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 43476fbb3621ac3a1ca61bed9c5115443f6e255d..50235254ef579fd2851663a12abe6569d00c60c4 100644
+index b48b1e6e1c94abe5f64a7ac45194016ec27bd3b8..8dc2907a29b9fbc7c5972d44a48361b25757bf9b 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -9838,25 +9838,13 @@ void WebContentsImpl::RendererUnresponsive(
+@@ -9866,25 +9866,13 @@ void WebContentsImpl::RendererUnresponsive(
      base::RepeatingClosure hang_monitor_restarter) {
    OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RendererUnresponsive",
                          "render_widget_host", render_widget_host);

+ 7 - 7
patches/chromium/render_widget_host_view_base.patch

@@ -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 fc70d927f9692334607c178510c6181136c22a8c..04ac54d309e076124a672bbeace285626a0a56e4 100644
+index 818990fde902c8a0f360d2fd69c03c3a827fbde1..e48f04288a7dab39059b71e8071f6d0870c57b65 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
-@@ -643,6 +643,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
+@@ -654,6 +654,13 @@ void RenderWidgetHostViewBase::OnFrameTokenChangedForView(
      host()->DidProcessFrame(frame_token, activation_time);
  }
  
@@ -24,10 +24,10 @@ index fc70d927f9692334607c178510c6181136c22a8c..04ac54d309e076124a672bbeace28562
      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 581a829a37786f9e1bd0ec75bbcaa34efc7de64e..39069c8b2f0e0022812d5222a179762f3d04bb44 100644
+index 0840688b3bdae0b22aa186282a9dd8fbeb2bb4ca..d37d2ef3ea168b89b3a7d2621aaf44125a2ab1bd 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
-@@ -29,8 +29,11 @@
+@@ -30,8 +30,11 @@
  #include "components/viz/common/surfaces/scoped_surface_id_allocator.h"
  #include "components/viz/common/surfaces/surface_id.h"
  #include "content/browser/renderer_host/display_feature.h"
@@ -39,7 +39,7 @@ index 581a829a37786f9e1bd0ec75bbcaa34efc7de64e..39069c8b2f0e0022812d5222a179762f
  #include "content/public/browser/render_widget_host_view.h"
  #include "content/public/common/page_visibility_state.h"
  #include "content/public/common/widget_type.h"
-@@ -70,11 +73,13 @@ namespace content {
+@@ -71,11 +74,13 @@ namespace content {
  class DevicePosturePlatformProvider;
  class MouseWheelPhaseHandler;
  class RenderWidgetHostImpl;
@@ -53,7 +53,7 @@ index 581a829a37786f9e1bd0ec75bbcaa34efc7de64e..39069c8b2f0e0022812d5222a179762f
  class DelegatedFrameHost;
  class SyntheticGestureTarget;
  
-@@ -146,6 +151,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -149,6 +154,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
    void ProcessGestureEvent(const blink::WebGestureEvent& event,
                             const ui::LatencyInfo& latency) override;
    RenderWidgetHostViewBase* GetRootView() override;
@@ -64,7 +64,7 @@ index 581a829a37786f9e1bd0ec75bbcaa34efc7de64e..39069c8b2f0e0022812d5222a179762f
    void OnAutoscrollStart() override;
    const viz::DisplayHitTestQueryMap& GetDisplayHitTestQuery() const override;
  
-@@ -183,6 +192,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -194,6 +203,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
        const gfx::Rect& keyboard_rect) override {}
    bool IsHTMLFormPopup() const override;
  

+ 1 - 1
patches/chromium/render_widget_host_view_mac.patch

@@ -8,7 +8,7 @@ respond to the first mouse click in their window, which is desirable for some
 kinds of utility windows. Similarly for `disableAutoHideCursor`.
 
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index 788a11f06d3912cb50ffc6b493f7266a2eba617b..df6ef6912d0ffad09f0c52d68d7b2e4b46c42c2b 100644
+index d09df298697b909e09d057f439d3654110dce4ed..08186f30eaa97caf18ac2fe47655526e7733d9df 100644
 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 @@ -169,6 +169,15 @@ void ExtractUnderlines(NSAttributedString* string,

+ 6 - 6
patches/chromium/resource_file_conflict.patch

@@ -52,7 +52,7 @@ Some alternatives to this patch:
 None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index ac6836f90875bad6a09e1b1f071fe1e398471723..3973c5f5889b987410c116ac0f75b29df979d5b2 100644
+index 7bad6d2fe242bc71014d3fbd6be4481280297366..bdf6d5865fb0069f4df368613167069d2fb50c86 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -1546,7 +1546,7 @@ if (is_chrome_branded && !is_android) {
@@ -64,8 +64,8 @@ index ac6836f90875bad6a09e1b1f071fe1e398471723..3973c5f5889b987410c116ac0f75b29d
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1585,6 +1585,12 @@ if (!is_android) {
-   }
+@@ -1592,6 +1592,12 @@ repack("browser_tests_pak") {
+   deps = [ "//chrome/test/data/webui:resources" ]
  }
  
 +if (is_electron_build) {
@@ -74,6 +74,6 @@ index ac6836f90875bad6a09e1b1f071fe1e398471723..3973c5f5889b987410c116ac0f75b29d
 +  }
 +}
 +
- if (!is_android) {
-   repack("browser_tests_pak") {
-     testonly = true
+ group("strings") {
+   public_deps = [
+     "//chrome/app:branded_strings",

+ 6 - 6
patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch

@@ -15,10 +15,10 @@ short-circuit all the permissions checks in MSDC for now to allow us to
 unduplicate this code.
 
 diff --git a/components/webrtc/media_stream_devices_controller.cc b/components/webrtc/media_stream_devices_controller.cc
-index 13929e4f6c1997a9071a2d1e3982a8c8feac84e4..a9719f72b9994537665c7f6a433ea8499b42122d 100644
+index 5f1ca23a16474281a0b00b25ff8fc61c9bf4541f..bcf00895b6eb7345481143ea9b7ef49fc84262b5 100644
 --- a/components/webrtc/media_stream_devices_controller.cc
 +++ b/components/webrtc/media_stream_devices_controller.cc
-@@ -57,7 +57,8 @@ bool PermissionIsRequested(blink::PermissionType permission,
+@@ -56,7 +56,8 @@ bool PermissionIsRequested(blink::PermissionType permission,
  void MediaStreamDevicesController::RequestPermissions(
      const content::MediaStreamRequest& request,
      MediaStreamDeviceEnumerator* enumerator,
@@ -28,7 +28,7 @@ index 13929e4f6c1997a9071a2d1e3982a8c8feac84e4..a9719f72b9994537665c7f6a433ea849
    content::RenderFrameHost* rfh = content::RenderFrameHost::FromID(
        request.render_process_id, request.render_frame_id);
    // The RFH may have been destroyed by the time the request is processed.
-@@ -92,7 +93,7 @@ void MediaStreamDevicesController::RequestPermissions(
+@@ -91,7 +92,7 @@ void MediaStreamDevicesController::RequestPermissions(
                                         std::move(callback)));
  
    std::vector<blink::PermissionType> permission_types;
@@ -37,7 +37,7 @@ index 13929e4f6c1997a9071a2d1e3982a8c8feac84e4..a9719f72b9994537665c7f6a433ea849
    content::PermissionController* permission_controller =
        web_contents->GetBrowserContext()->GetPermissionController();
  
-@@ -165,19 +166,26 @@ void MediaStreamDevicesController::RequestPermissions(
+@@ -164,19 +165,26 @@ void MediaStreamDevicesController::RequestPermissions(
        requested_audio_capture_device_ids;
    permission_request_description.requested_video_capture_device_ids =
        requested_video_capture_device_ids;
@@ -72,7 +72,7 @@ index 13929e4f6c1997a9071a2d1e3982a8c8feac84e4..a9719f72b9994537665c7f6a433ea849
  }
  
  MediaStreamDevicesController::~MediaStreamDevicesController() {
-@@ -426,6 +434,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
+@@ -425,6 +433,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
      return false;
    }
  
@@ -80,7 +80,7 @@ index 13929e4f6c1997a9071a2d1e3982a8c8feac84e4..a9719f72b9994537665c7f6a433ea849
    // TODO(raymes): This function wouldn't be needed if
    // PermissionManager::RequestPermissions returned a denial reason.
    content::PermissionResult result =
-@@ -436,6 +445,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
+@@ -435,6 +444,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
      DCHECK_EQ(blink::mojom::PermissionStatus::DENIED, result.status);
      return true;
    }

+ 2 - 2
patches/chromium/support_mixed_sandbox_with_zygote.patch

@@ -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 eeccad9cc76ac28579b3fdb4484e37890919b390..5c16b2026dcfe1f091b7966a79a5b2498af7b50d 100644
+index 4ad8c7d353ddaa597f053efeb2ac4969ce28a8a9..765716fe954d1eb6f55e11b57102f3be1503050d 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -1762,6 +1762,10 @@ bool RenderProcessHostImpl::Init() {
+@@ -1753,6 +1753,10 @@ bool RenderProcessHostImpl::Init() {
      std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
          std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
              *cmd_line, IsPdf(), IsJitDisabled());

+ 3 - 3
patches/chromium/web_contents.patch

@@ -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 90ac881d8e9f534c875b5eb259b06ef1db1c71d3..08024a20a7c0a227cfaffc77c70874d0a01d6029 100644
+index 5f72ddb8d428d72ea22b0bb37dfe74b3ee056a49..1f6e09dce73ca286cd95d19c3c5fab338d163e5e 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3830,6 +3830,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3852,6 +3852,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 90ac881d8e9f534c875b5eb259b06ef1db1c71d3..08024a20a7c0a227cfaffc77c70874d0
    std::unique_ptr<WebContentsViewDelegate> delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -3840,6 +3847,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
+@@ -3862,6 +3869,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
      view_ = CreateWebContentsView(this, std::move(delegate),
                                    &render_view_host_delegate_view_);
    }

+ 6 - 6
patches/chromium/webview_fullscreen.patch

@@ -15,10 +15,10 @@ Note that we also need to manually update embedder's
 `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
-index 33088669c478d5b7f6bbaa7998e14479e539c5cc..17a55006539fa252f607755ec5f3e7ed77350c87 100644
+index e1e674944993234358fd8892dbe0074bc4b67409..e1cb61f400db73463d14e9ee65fed74ebed166a8 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -8710,6 +8710,17 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -8724,6 +8724,17 @@ void RenderFrameHostImpl::EnterFullscreen(
      }
    }
  
@@ -37,10 +37,10 @@ index 33088669c478d5b7f6bbaa7998e14479e539c5cc..17a55006539fa252f607755ec5f3e7ed
    if (had_fullscreen_token && !GetView()->HasFocus())
      GetView()->Focus();
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 08024a20a7c0a227cfaffc77c70874d0a01d6029..b3d5c5522ea1afb0a3d3ce076f5e05f34b4ea488 100644
+index 1f6e09dce73ca286cd95d19c3c5fab338d163e5e..ab1dc94b4c98913c20a0862dabfa15e3f1879f60 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4099,21 +4099,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
+@@ -4127,21 +4127,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
      const input::NativeWebKeyboardEvent& event) {
    OPTIONAL_TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("content.verbose"),
                          "WebContentsImpl::PreHandleKeyboardEvent");
@@ -78,7 +78,7 @@ index 08024a20a7c0a227cfaffc77c70874d0a01d6029..b3d5c5522ea1afb0a3d3ce076f5e05f3
  }
  
  bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
-@@ -4272,7 +4276,7 @@ void WebContentsImpl::EnterFullscreenMode(
+@@ -4300,7 +4304,7 @@ void WebContentsImpl::EnterFullscreenMode(
    OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
    DCHECK(CanEnterFullscreenMode(requesting_frame));
    DCHECK(requesting_frame->IsActive());
@@ -88,7 +88,7 @@ index 08024a20a7c0a227cfaffc77c70874d0a01d6029..b3d5c5522ea1afb0a3d3ce076f5e05f3
            features::kAutomaticFullscreenContentSetting)) {
      // Ensure the window is made active to take input focus. The user may have
 diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
-index ff00c91543259b5361a068e1b3cc409bea8a6db2..e27e8af9dfb9160167087d057f5bb0d49c287270 100644
+index 983f8a795725a097adf4e13f7d9c24b7c16d3467..75f1b9b60460713da6d832a803cfc03d7c90c9ca 100644
 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 @@ -110,7 +110,7 @@ void FullscreenElementChanged(Document& document,

+ 4 - 4
patches/chromium/worker_context_will_destroy.patch

@@ -26,10 +26,10 @@ index 7a2d251ba2d13d0a34df176111e6524a27b87f55..cbbe0fbdd25a0f7859b113fdb3dcd9ce
    // An empty URL is returned if the URL is not overriden.
    virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index 0e94e8aded089c12ee187855e4d07b77552b2b72..077223f6ff92c3787b25fc032c5e3b88e4a50ed3 100644
+index 30c79bff1b9665ea0186ec6437cda0804b1168d4..b933264fd21f689de436a832476ebbfef89b927e 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -890,6 +890,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -894,6 +894,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -55,10 +55,10 @@ index f726c03e34578032f5fc6c9a914ba72858efce89..9c5eeba6e24bb53fc112082c198a1032
        const blink::WebSecurityOrigin& script_origin) override;
    blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel(
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index 8b87ad1fbda13dccee37fd27b3bdec8060caf50a..fec29a007b548b63d5efd6ae40eb7900b99d0d8e 100644
+index 1e84e382f1f94607384e0a800f4a96daf5e8ba75..d19743d2d2a512a984d831f437adced81ae912dd 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -662,6 +662,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -676,6 +676,7 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

+ 4 - 4
patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch

@@ -35,10 +35,10 @@ index cbbe0fbdd25a0f7859b113fdb3dcd9ce57e597d6..1345bb5008e1b4fc3a450f7e353d52ec
    // from the worker thread.
    virtual void WillDestroyWorkerContextOnWorkerThread(
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index 077223f6ff92c3787b25fc032c5e3b88e4a50ed3..9188d84c92856fde03420fad39bc76cbcfbab8eb 100644
+index b933264fd21f689de436a832476ebbfef89b927e..e9a9cf8df3318331f69929437b91b11f9273aea0 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -902,6 +902,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
+@@ -906,6 +906,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
        worker);
  }
  
@@ -65,10 +65,10 @@ index 9c5eeba6e24bb53fc112082c198a103256b06e32..fad9cf104d62d4e19a2b27eff54d17f9
    bool AllowScriptExtensionForServiceWorker(
        const blink::WebSecurityOrigin& script_origin) override;
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index fec29a007b548b63d5efd6ae40eb7900b99d0d8e..dc892fbf142bfc93a2c3497d0ec0932fa69c38b1 100644
+index d19743d2d2a512a984d831f437adced81ae912dd..78267456cf2bccc4bc1120ea8107c950ead24c89 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -662,6 +662,8 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -676,6 +676,8 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}

+ 3 - 3
patches/devtools_frontend/chore_expose_ui_to_allow_electron_to_set_dock_side.patch

@@ -10,12 +10,12 @@ to handle this without patching, but this is fairly clean for now and no longer
 patching legacy devtools code.
 
 diff --git a/front_end/entrypoints/main/MainImpl.ts b/front_end/entrypoints/main/MainImpl.ts
-index f622eda941bc2d17cabce7b7e17d3c46e75b5d06..a0de3d8a46d5991c5878e70d0b46f90d3bd52f1c 100644
+index 1122bc10cd630f360debe53244647070c76d29b9..b3c704a2810eee191fbff9acacb56c6d8e39c864 100644
 --- a/front_end/entrypoints/main/MainImpl.ts
 +++ b/front_end/entrypoints/main/MainImpl.ts
-@@ -782,6 +782,8 @@ export class MainImpl {
+@@ -788,6 +788,8 @@ export class MainImpl {
  globalThis.Main = globalThis.Main || {};
- // @ts-ignore Exported for Tests.js
+ // @ts-expect-error Exported for Tests.js
  globalThis.Main.Main = MainImpl;
 +// @ts-ignore Exported for Electron
 +globalThis.EUI = UI || {};

+ 2 - 2
patches/v8/deps_add_v8_object_setinternalfieldfornodecore.patch

@@ -46,10 +46,10 @@ index 3e57ae8efe33f326ef0e5d609c311d4be5b8afd6..dc521d39c2280dfc3217e97c1e413b2b
    V8_INLINE static void* GetAlignedPointerFromInternalField(
        const BasicTracedReference<Object>& object, int index) {
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 78c7b9f49f30c0897f96b9a7d47e55f632e22715..9e17adc576e3a17a503d980b8219a708ff2f36e9 100644
+index 75718eafb17f7deb3eca94df67023bca0558e1c5..ce8ee239cc222253c6d7ce06e1ecd31befe27c68 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -6481,14 +6481,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
+@@ -6385,14 +6385,33 @@ Local<Data> v8::Object::SlowGetInternalField(int index) {
        i::Cast<i::JSObject>(*obj)->GetEmbedderField(index), isolate));
  }
  

+ 1 - 1
shell/browser/electron_browser_client.cc

@@ -1685,7 +1685,7 @@ ElectronBrowserClient::CreateLoginDelegate(
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     bool first_auth_attempt,
     content::GuestPageHolder* guest_page_holder,
-    LoginAuthRequiredCallback auth_required_callback) {
+    content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback) {
   return std::make_unique<LoginHandler>(
       auth_info, web_contents, is_request_for_primary_main_frame,
       is_request_for_navigation, base::kNullProcessId, url, response_headers,

+ 2 - 1
shell/browser/electron_browser_client.h

@@ -292,7 +292,8 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
       scoped_refptr<net::HttpResponseHeaders> response_headers,
       bool first_auth_attempt,
       content::GuestPageHolder* guest_page_holder,
-      LoginAuthRequiredCallback auth_required_callback) override;
+      content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback)
+      override;
   void SiteInstanceGotProcessAndSite(
       content::SiteInstance* site_instance) override;
   std::vector<std::unique_ptr<blink::URLLoaderThrottle>>

+ 0 - 11
shell/browser/extensions/electron_display_info_provider.cc

@@ -1,11 +0,0 @@
-// 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.
-
-#include "shell/browser/extensions/electron_display_info_provider.h"
-
-namespace extensions {
-
-ElectronDisplayInfoProvider::ElectronDisplayInfoProvider() = default;
-
-}  // namespace extensions

+ 0 - 24
shell/browser/extensions/electron_display_info_provider.h

@@ -1,24 +0,0 @@
-// 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.
-
-#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
-#define ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_
-
-#include "extensions/browser/api/system_display/display_info_provider.h"
-
-namespace extensions {
-
-class ElectronDisplayInfoProvider : public DisplayInfoProvider {
- public:
-  ElectronDisplayInfoProvider();
-
-  // disable copy
-  ElectronDisplayInfoProvider(const ElectronDisplayInfoProvider&) = delete;
-  ElectronDisplayInfoProvider& operator=(const ElectronDisplayInfoProvider&) =
-      delete;
-};
-
-}  // namespace extensions
-
-#endif  // ELECTRON_SHELL_BROWSER_EXTENSIONS_ELECTRON_DISPLAY_INFO_PROVIDER_H_

+ 8 - 5
shell/browser/extensions/electron_extension_loader.cc

@@ -94,7 +94,9 @@ std::pair<scoped_refptr<const Extension>, std::string> LoadUnpacked(
 ElectronExtensionLoader::ElectronExtensionLoader(
     content::BrowserContext* browser_context)
     : browser_context_(browser_context),
-      extension_registrar_(browser_context, this) {}
+      extension_registrar_(ExtensionRegistrar::Get(browser_context)) {
+  extension_registrar_->SetDelegate(this);
+}
 
 ElectronExtensionLoader::~ElectronExtensionLoader() = default;
 
@@ -119,7 +121,8 @@ void ElectronExtensionLoader::ReloadExtension(const ExtensionId& extension_id) {
   DCHECK_EQ(false, did_schedule_reload_);
   base::AutoReset<bool> reset_did_schedule_reload(&did_schedule_reload_, false);
 
-  extension_registrar_.ReloadExtension(extension_id, LoadErrorBehavior::kQuiet);
+  extension_registrar_->ReloadExtension(extension_id,
+                                        LoadErrorBehavior::kQuiet);
   if (did_schedule_reload_)
     return;
 }
@@ -127,7 +130,7 @@ void ElectronExtensionLoader::ReloadExtension(const ExtensionId& extension_id) {
 void ElectronExtensionLoader::UnloadExtension(
     const ExtensionId& extension_id,
     extensions::UnloadedExtensionReason reason) {
-  extension_registrar_.RemoveExtension(extension_id, reason);
+  extension_registrar_->RemoveExtension(extension_id, reason);
 }
 
 void ElectronExtensionLoader::FinishExtensionLoad(
@@ -135,7 +138,7 @@ void ElectronExtensionLoader::FinishExtensionLoad(
     std::pair<scoped_refptr<const Extension>, std::string> result) {
   scoped_refptr<const Extension> extension = result.first;
   if (extension) {
-    extension_registrar_.AddExtension(extension);
+    extension_registrar_->AddExtension(extension);
 
     // Write extension install time to ExtensionPrefs. This is required by
     // WebRequestAPI which calls extensions::ExtensionPrefs::GetInstallTime.
@@ -163,7 +166,7 @@ void ElectronExtensionLoader::FinishExtensionReload(
     std::pair<scoped_refptr<const Extension>, std::string> result) {
   scoped_refptr<const Extension> extension = result.first;
   if (extension) {
-    extension_registrar_.AddExtension(extension);
+    extension_registrar_->AddExtension(extension);
   }
 }
 

+ 2 - 2
shell/browser/extensions/electron_extension_loader.h

@@ -53,7 +53,7 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
   void UnloadExtension(const ExtensionId& extension_id,
                        extensions::UnloadedExtensionReason reason);
 
-  ExtensionRegistrar* registrar() { return &extension_registrar_; }
+  raw_ptr<ExtensionRegistrar> registrar() { return extension_registrar_; }
 
  private:
   // If the extension loaded successfully, enables it. If it's an app, launches
@@ -92,7 +92,7 @@ class ElectronExtensionLoader : public ExtensionRegistrar::Delegate {
   raw_ptr<content::BrowserContext> browser_context_;  // Not owned.
 
   // Registers and unregisters extensions.
-  ExtensionRegistrar extension_registrar_;
+  raw_ptr<ExtensionRegistrar> extension_registrar_;
 
   // Holds keep-alives for relaunching apps.
   //   ShellKeepAliveRequester keep_alive_requester_;

+ 1 - 1
shell/browser/login_handler.cc

@@ -30,7 +30,7 @@ LoginHandler::LoginHandler(
     const GURL& url,
     scoped_refptr<net::HttpResponseHeaders> response_headers,
     bool first_auth_attempt,
-    LoginAuthRequiredCallback auth_required_callback)
+    content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback)
     : auth_required_callback_(std::move(auth_required_callback)) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
 

+ 11 - 10
shell/browser/login_handler.h

@@ -22,15 +22,16 @@ namespace electron {
 // Handles HTTP basic auth.
 class LoginHandler : public content::LoginDelegate {
  public:
-  LoginHandler(const net::AuthChallengeInfo& auth_info,
-               content::WebContents* web_contents,
-               bool is_request_for_primary_main_frame,
-               bool is_request_for_navigation,
-               base::ProcessId process_id,
-               const GURL& url,
-               scoped_refptr<net::HttpResponseHeaders> response_headers,
-               bool first_auth_attempt,
-               LoginAuthRequiredCallback auth_required_callback);
+  LoginHandler(
+      const net::AuthChallengeInfo& auth_info,
+      content::WebContents* web_contents,
+      bool is_request_for_primary_main_frame,
+      bool is_request_for_navigation,
+      base::ProcessId process_id,
+      const GURL& url,
+      scoped_refptr<net::HttpResponseHeaders> response_headers,
+      bool first_auth_attempt,
+      content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback);
   ~LoginHandler() override;
 
   // disable copy
@@ -48,7 +49,7 @@ class LoginHandler : public content::LoginDelegate {
                  bool first_auth_attempt);
   void CallbackFromJS(gin::Arguments* args);
 
-  LoginAuthRequiredCallback auth_required_callback_;
+  content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback_;
 
   base::WeakPtrFactory<LoginHandler> weak_factory_{this};
 };

+ 5 - 0
shell/browser/net/url_loader_network_observer.h

@@ -70,6 +70,11 @@ class URLLoaderNetworkObserver
       const std::optional<std::string>& private_network_device_id,
       const std::optional<std::string>& private_network_device_name,
       OnPrivateNetworkAccessPermissionRequiredCallback callback) override {}
+  void OnUrlLoaderConnectedToPrivateNetwork(
+      const GURL& request_url,
+      network::mojom::IPAddressSpace response_address_space,
+      network::mojom::IPAddressSpace client_address_space,
+      network::mojom::IPAddressSpace target_address_space) override {}
   void Clone(
       mojo::PendingReceiver<network::mojom::URLLoaderNetworkServiceObserver>
           observer) override;

+ 8 - 0
shell/browser/ui/inspectable_web_contents.h

@@ -112,6 +112,12 @@ class InspectableWebContents
   void RemoveFileSystem(const std::string& file_system_path) override;
   void UpgradeDraggedFileSystemPermissions(
       const std::string& file_system_url) override {}
+  void ConnectAutomaticFileSystem(DispatchCallback callback,
+                                  const std::string& file_system_path,
+                                  const std::string& file_system_uuid,
+                                  bool add_if_missing) override {}
+  void DisconnectAutomaticFileSystem(
+      const std::string& file_system_path) override {}
   void IndexPath(int index_request_id,
                  const std::string& file_system_path,
                  const std::string& excluded_folders) override;
@@ -167,6 +173,8 @@ class InspectableWebContents
   void SetOpenNewWindowForPopups(bool value) override {}
   void RecordPerformanceHistogram(const std::string& name,
                                   double duration) override {}
+  void RecordPerformanceHistogramMedium(const std::string& name,
+                                        double duration) override {}
   void RecordUserMetricsAction(const std::string& name) override {}
   void RecordImpression(const ImpressionEvent& event) override {}
   void RecordResize(const ResizeEvent& event) override {}

+ 12 - 16
shell/browser/web_contents_zoom_controller.cc

@@ -72,9 +72,6 @@ void WebContentsZoomController::SetEmbedderZoomController(
 
 bool WebContentsZoomController::SetZoomLevel(double level) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
-  content::NavigationEntry* entry =
-      web_contents()->GetController().GetLastCommittedEntry();
-
   // Cannot zoom in disabled mode. Also, don't allow changing zoom level on
   // a crashed tab, an error page or an interstitial page.
   if (zoom_mode_ == ZOOM_MODE_DISABLED ||
@@ -116,14 +113,14 @@ bool WebContentsZoomController::SetZoomLevel(double level) {
     for (auto& observer : observers_)
       observer.OnZoomChanged(zoom_change_data);
   } else {
-    if (!entry) {
+    const GURL url = content::HostZoomMap::GetURLForRenderFrameHost(rfh_id);
+    if (url.is_empty()) {
       // If we exit without triggering an update, we should clear event_data_,
       // else we may later trigger a DCHECK(event_data_).
       event_data_.reset();
       return false;
     }
-    std::string host =
-        net::GetHostOrSpecFromURL(content::HostZoomMap::GetURLFromEntry(entry));
+    std::string host = net::GetHostOrSpecFromURL(url);
     zoom_map->SetZoomLevelForHost(host, level);
   }
 
@@ -181,11 +178,9 @@ void WebContentsZoomController::SetZoomMode(ZoomMode new_mode) {
 
   switch (new_mode) {
     case ZOOM_MODE_DEFAULT: {
-      content::NavigationEntry* entry =
-          web_contents()->GetController().GetLastCommittedEntry();
+      const GURL url = content::HostZoomMap::GetURLForRenderFrameHost(rfh_id);
 
-      if (entry) {
-        GURL url = content::HostZoomMap::GetURLFromEntry(entry);
+      if (!url.is_empty()) {
         const std::string host = net::GetHostOrSpecFromURL(url);
         const std::string scheme = url.scheme();
 
@@ -376,14 +371,15 @@ void WebContentsZoomController::OnZoomLevelChanged(
 
 void WebContentsZoomController::UpdateState(const std::string& host) {
   DCHECK_CURRENTLY_ON(BrowserThread::UI);
+  auto* rfh = web_contents()->GetPrimaryMainFrame();
   // If |host| is empty, all observers should be updated.
   if (!host.empty()) {
-    // Use the navigation entry's URL instead of the WebContents' so virtual
-    // URLs work (e.g. chrome://settings). http://crbug.com/153950
-    content::NavigationEntry* entry =
-        web_contents()->GetController().GetLastCommittedEntry();
-    if (!entry || host != net::GetHostOrSpecFromURL(
-                              content::HostZoomMap::GetURLFromEntry(entry))) {
+    // Get the (non-virtual) url to be tracked by the HostZoomMap. Getting urls
+    // directly from a WebContents may result in a virtual url, so prefer using
+    // the value from the `rfh` instead, per https://crbug.com/40290372.
+    const GURL url =
+        content::HostZoomMap::GetURLForRenderFrameHost(rfh->GetGlobalId());
+    if (url.is_empty() || host != net::GetHostOrSpecFromURL(url)) {
       return;
     }
   }

+ 5 - 0
shell/common/api/electron_api_url_loader.h

@@ -129,6 +129,11 @@ class SimpleURLLoaderWrapper final
   void Clone(
       mojo::PendingReceiver<network::mojom::URLLoaderNetworkServiceObserver>
           observer) override;
+  void OnUrlLoaderConnectedToPrivateNetwork(
+      const GURL& request_url,
+      network::mojom::IPAddressSpace response_address_space,
+      network::mojom::IPAddressSpace client_address_space,
+      network::mojom::IPAddressSpace target_address_space) override {}
 
   scoped_refptr<network::SharedURLLoaderFactory> GetURLLoaderFactoryForURL(
       const GURL& url);

+ 1 - 2
shell/common/gin_helper/callback.cc

@@ -75,8 +75,7 @@ struct DeleteOnUIThread {
   static void Destruct(const T* x) {
     if (electron::IsBrowserProcess() &&
         !content::BrowserThread::CurrentlyOn(content::BrowserThread::UI)) {
-      content::BrowserThread::DeleteSoon(content::BrowserThread::UI, FROM_HERE,
-                                         x);
+      content::GetUIThreadTaskRunner({})->DeleteSoon(FROM_HERE, x);
     } else {
       delete x;
     }

+ 1 - 0
shell/renderer/api/electron_api_web_frame.cc

@@ -40,6 +40,7 @@
 #include "third_party/blink/public/common/page/page_zoom.h"
 #include "third_party/blink/public/common/web_cache/web_cache_resource_type_stats.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
+#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
 #include "third_party/blink/public/platform/web_cache.h"
 #include "third_party/blink/public/platform/web_isolated_world_info.h"
 #include "third_party/blink/public/web/web_custom_element.h"