Browse Source

chore: bump chromium to 118.0.5993.5 (27-x-y) (#39542)

* chore: bump chromium in DEPS to 118.0.5951.0

* chore: bump chromium in DEPS to 118.0.5953.1

* chore: bump chromium in DEPS to 118.0.5955.1

* chore: bump chromium in DEPS to 118.0.5957.1

* chore: bump chromium in DEPS to 118.0.5959.1

* chore: bump chromium in DEPS to 118.0.5961.1

* chore: bump chromium in DEPS to 118.0.5963.1

* chore: bump chromium in DEPS to 118.0.5965.2

* chore: bump chromium in DEPS to 118.0.5967.1

* chore: bump chromium in DEPS to 118.0.5969.1

* chore: bump chromium in DEPS to 118.0.5971.1

* chore: bump chromium in DEPS to 118.0.5973.1

* chore: bump chromium in DEPS to 118.0.5975.1

* chore: bump chromium in DEPS to 118.0.5977.1

* chore: bump chromium in DEPS to 118.0.5979.1

* chore: bump chromium in DEPS to 118.0.5981.0

* chore: bump chromium in DEPS to 118.0.5981.1

* chore: bump chromium in DEPS to 118.0.5983.1

* chore: bump chromium in DEPS to 118.0.5985.1

* chore: bump chromium in DEPS to 118.0.5987.1

* chore: bump chromium in DEPS to 118.0.5989.1

* chore: bump chromium in DEPS to 118.0.5991.1

* chore: bump chromium in DEPS to 118.0.5993.1

* chore: bump chromium to 118.0.5975.0 (main) (#39531)

* chore: bump chromium in DEPS to 118.0.5951.0

* chore: update printing.patch

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4727894

No logic changes, but patch needed to be manually re-applied due to upstream code shear

* chore: update port_autofill_colors_to_the_color_pipeline.patch

No manual changes; patch applied with fuzz

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5953.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5955.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5957.0

* chore: update patches

* chore: include path of native_web_keyboard_event.h

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689

* chore: remove reference to eextensions/browser/notification-types.h

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4771627

* chore: update references to renamed upstream field NativeWebKeyboardEvent.skip_if_unhandled (formerly known as skip_in_browser

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4758689

Need a second pair of eyes on this commit. In particular the reference in content_converter.cc, skipInBrowser, seems to not be set or documented anywhere? Is this unused/vestigal code?

* chore: sync signature of ElectronExtensionsBrowserClient::IsValidContext() to upstream change

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4784198

* chore: add auto_pip_setting_helper.[cc,h] to chromium_src build

Xref: https://chromium-review.googlesource.com/c/chromium/src/+/4688277

Exiting upstream code used by chromium_src now depends on this new upstream class

* chore: bump chromium in DEPS to 118.0.5959.0

* chore: update add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

Xref: add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

manually adjust patch to minor upstream chagnes

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5961.0

* chore: bump chromium in DEPS to 118.0.5963.0

* chore: update patches

* 4780994: Rename various base files to "apple" since iOS uses them too
https://chromium-review.googlesource.com/c/chromium/src/+/4780994

* Many files moved from `mac` -> `apple`

This commit follows a handful of CLs that simply rename files/symbols to change `mac`
to `apple`
to signify their use across both macOS and iOS:
- 4784010: Move scoped_nsautorelease_pool to base/apple, leave a forwarding header
- 4790744: Move foundation_util to base/apple, leave a forwarding header
- 4790741: Move scoped_cftypreref to base/apple, leave a forwarding header
- 4787627: Move and rename macOS+iOS base/ files in PA to "apple"
- 4780399: Move OSStatus logging to base/apple
- 4787387: Remove forwarding headers
- 4781113: Rename message_pump_mac to "apple" because iOS uses it too

* fixup minor patch update error

A function param got dropped from this patch somewhere earlier

* chore: bump chromium in DEPS to 118.0.5965.2

* chore: update patches

* 4799213: Move ScopedTypeRef and ScopedCFTypeRef into base::apple::
https://chromium-review.googlesource.com/c/chromium/src/+/4799213

* Fix removed include to BrowserContext

In crrev.com/c/4767962 an include to BrowserContext was removed,
which was necessary for compilation. This broke only for us because
"chrome/browser/profiles/profile.h" includes that class, but we remove
all references to profiles.

* chore: bump chromium in DEPS to 118.0.5967.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5969.0

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5971.0

* chore: bump chromium in DEPS to 118.0.5973.0

* chore: update patches

* 4772121: [OOPIF PDF] Replace PDFWebContentsHelper with PDFDocumentHelper
https://chromium-review.googlesource.com/c/chromium/src/+/4772121

* 4811164: [Extensions] Do some cleanup in ChromeManagementAPIDelegate.
https://chromium-review.googlesource.com/c/chromium/src/+/4811164

* 4809488: Remove duplicate dnd functionality between Web and Renderer prefs
https://chromium-review.googlesource.com/c/chromium/src/+/4809488

Given that this is no longer an option of web preferences, we should
consider deprecating this option and then removing it.

* chore: bump chromium in DEPS to 118.0.5975.0

* chore: update patches

* fixup! chore: add auto_pip_settings_helper.{cc|h} to chromium_src build

* Reland "[windows] Remove RegKey::DeleteEmptyKey"

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

* Ensure StrCat means StrCat

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

* fixup! Remove RegKey::DeleteEmptyKey

* Consistently reject large p and large q in DH

Refs https://boringssl-review.googlesource.com/c/boringssl/+/62226

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Charles Kerr <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: clavin <[email protected]>
Co-authored-by: deepak1556 <[email protected]>
(cherry picked from commit 89117fdd999783091e019f7c6c06e7b5a45244d9)

* chore: bump chromium to 118.0.5991.0 (main) (#39714)

* chore: bump chromium in DEPS to 118.0.5982.0

* chore: bump chromium in DEPS to 118.0.5983.0

* chore: bump chromium in DEPS to 118.0.5985.0

* chore: bump chromium in DEPS to 118.0.5987.0

* chore: update v8 patches

* chore: update chromium patches

* chore: update patches

* [PEPC] Add new structs to contain permission request data

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

* Add ThumbnailCapturer interface

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

* Reland "[ChromeRefresh2023] Update document pip windows for Chrome Refresh"

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

* chore: bump chromium in DEPS to 118.0.5989.0

* chore: bump chromium in DEPS to 118.0.5991.0

* chore: update patches

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: deepak1556 <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
(cherry picked from commit d9ba26273ad3e7a34c905eccbd5dabda4eb7b402)

* fix: broken `chrome.scripting` compilation (#39725)

fix: broken chrome.scripting impl after roll
(cherry picked from commit 54d8402a6ca8a357d7695c1c6d01d5040e42926a)

* chore: bump chromium in DEPS to 118.0.5993.1

* chore: update patches

* chore: bump chromium in DEPS to 118.0.5993.5

* test: use default timeout

(cherry picked from commit cbc4980d690d627da41c018af9009b5a209dd578)

---------

Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <[email protected]>
electron-roller[bot] 1 year ago
parent
commit
568c16f994
100 changed files with 776 additions and 561 deletions
  1. 4 4
      BUILD.gn
  2. 1 1
      DEPS
  3. 4 0
      chromium_src/BUILD.gn
  4. 1 0
      patches/chromium/.patches
  5. 1 1
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  6. 11 11
      patches/chromium/add_didinstallconditionalfeatures.patch
  7. 2 2
      patches/chromium/add_electron_deps_to_license_credits_file.patch
  8. 22 20
      patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch
  9. 14 8
      patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch
  10. 10 10
      patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch
  11. 4 4
      patches/chromium/blink_local_frame.patch
  12. 3 3
      patches/chromium/boringssl_build_gn.patch
  13. 1 1
      patches/chromium/build_add_electron_tracing_category.patch
  14. 2 2
      patches/chromium/build_allow_electron_to_use_exec_script.patch
  15. 1 1
      patches/chromium/build_disable_print_content_analysis.patch
  16. 9 9
      patches/chromium/build_do_not_depend_on_packed_resource_integrity.patch
  17. 21 21
      patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch
  18. 2 2
      patches/chromium/build_remove_ent_content_analysis_assert.patch
  19. 14 14
      patches/chromium/can_create_window.patch
  20. 1 1
      patches/chromium/chore_add_buildflag_guard_around_new_include.patch
  21. 4 4
      patches/chromium/chore_add_electron_deps_to_gitignores.patch
  22. 7 7
      patches/chromium/chore_introduce_blocking_api_for_electron.patch
  23. 18 18
      patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch
  24. 1 1
      patches/chromium/command-ismediakey.patch
  25. 1 1
      patches/chromium/crash_allow_setting_more_options.patch
  26. 7 7
      patches/chromium/create_browser_v8_snapshot_file_name_fuse.patch
  27. 4 4
      patches/chromium/custom_protocols_plzserviceworker.patch
  28. 14 5
      patches/chromium/desktop_media_list.patch
  29. 14 14
      patches/chromium/disable_color_correct_rendering.patch
  30. 2 2
      patches/chromium/disable_compositor_recycling.patch
  31. 7 7
      patches/chromium/disable_hidden.patch
  32. 6 6
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  33. 4 4
      patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch
  34. 2 2
      patches/chromium/extend_apply_webpreferences.patch
  35. 3 3
      patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch
  36. 9 9
      patches/chromium/feat_configure_launch_options_for_service_process.patch
  37. 8 8
      patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch
  38. 2 2
      patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch
  39. 9 9
      patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch
  40. 1 1
      patches/chromium/feat_filter_out_non-shareable_windows_in_the_current_application_in.patch
  41. 8 8
      patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch
  42. 5 5
      patches/chromium/fix_crash_loading_non-standard_schemes_in_iframes.patch
  43. 3 3
      patches/chromium/fix_crash_when_saving_edited_pdf_files.patch
  44. 94 0
      patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch
  45. 6 6
      patches/chromium/fix_on-screen-keyboard_hides_on_input_blur_in_webview.patch
  46. 19 11
      patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch
  47. 5 5
      patches/chromium/fix_properly_honor_printing_page_ranges.patch
  48. 9 9
      patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch
  49. 6 6
      patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch
  50. 3 3
      patches/chromium/frame_host_manager.patch
  51. 3 3
      patches/chromium/gin_enable_disable_v8_platform.patch
  52. 3 3
      patches/chromium/gpu_notify_when_dxdiag_request_fails.patch
  53. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  54. 1 1
      patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch
  55. 2 2
      patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
  56. 2 2
      patches/chromium/introduce_ozoneplatform_electron_can_call_x11_property.patch
  57. 1 1
      patches/chromium/load_v8_snapshot_in_browser_process.patch
  58. 1 1
      patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch
  59. 1 1
      patches/chromium/mas-cgdisplayusesforcetogray.patch
  60. 5 5
      patches/chromium/mas_avoid_usage_of_private_macos_apis.patch
  61. 8 8
      patches/chromium/mas_disable_custom_window_frame.patch
  62. 23 23
      patches/chromium/mas_disable_remote_accessibility.patch
  63. 11 11
      patches/chromium/mas_disable_remote_layer.patch
  64. 3 3
      patches/chromium/mas_no_private_api.patch
  65. 2 2
      patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch
  66. 9 9
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  67. 3 3
      patches/chromium/notification_provenance.patch
  68. 31 0
      patches/chromium/picture-in-picture.patch
  69. 10 10
      patches/chromium/port_autofill_colors_to_the_color_pipeline.patch
  70. 63 63
      patches/chromium/printing.patch
  71. 7 7
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  72. 4 4
      patches/chromium/render_widget_host_view_base.patch
  73. 4 4
      patches/chromium/render_widget_host_view_mac.patch
  74. 3 3
      patches/chromium/resource_file_conflict.patch
  75. 2 2
      patches/chromium/scroll_bounce_flag.patch
  76. 15 11
      patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch
  77. 2 2
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  78. 2 2
      patches/chromium/web_contents.patch
  79. 1 1
      patches/chromium/webview_cross_drag.patch
  80. 4 4
      patches/chromium/webview_fullscreen.patch
  81. 4 4
      patches/chromium/worker_context_will_destroy.patch
  82. 2 2
      patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch
  83. 2 2
      patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch
  84. 47 7
      patches/node/fix_crypto_tests_to_run_with_bssl.patch
  85. 3 3
      patches/v8/build_gn.patch
  86. 2 2
      patches/v8/chore_allow_customizing_microtask_policy_per_context.patch
  87. 4 4
      patches/v8/do_not_export_private_v8_symbols_on_windows.patch
  88. 2 2
      shell/app/electron_library_main.mm
  89. 2 2
      shell/app/electron_main_delegate_mac.mm
  90. 1 1
      shell/app/electron_main_mac.cc
  91. 21 6
      shell/browser/api/electron_api_desktop_capturer.cc
  92. 3 3
      shell/browser/api/electron_api_system_preferences_mac.mm
  93. 4 10
      shell/browser/api/electron_api_web_contents.cc
  94. 1 1
      shell/browser/api/electron_api_web_contents_mac.mm
  95. 9 8
      shell/browser/browser_mac.mm
  96. 4 1
      shell/browser/browser_win.cc
  97. 11 5
      shell/browser/electron_browser_client.cc
  98. 1 1
      shell/browser/electron_browser_main_parts_mac.mm
  99. 8 10
      shell/browser/electron_pdf_document_helper_client.cc
  100. 8 9
      shell/browser/electron_pdf_document_helper_client.h

+ 4 - 4
BUILD.gn

@@ -730,8 +730,8 @@ source_set("electron_lib") {
       "//pdf",
     ]
     sources += [
-      "shell/browser/electron_pdf_web_contents_helper_client.cc",
-      "shell/browser/electron_pdf_web_contents_helper_client.h",
+      "shell/browser/electron_pdf_document_helper_client.cc",
+      "shell/browser/electron_pdf_document_helper_client.h",
       "shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc",
       "shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h",
     ]
@@ -962,7 +962,7 @@ if (is_mac) {
       output_name = electron_helper_name + invoker.helper_name_suffix
       deps = [
         ":electron_framework+link",
-        "//base/allocator:early_zone_registration_mac",
+        "//base/allocator:early_zone_registration_apple",
       ]
       if (!is_mas_build) {
         deps += [ "//sandbox/mac:seatbelt" ]
@@ -1124,7 +1124,7 @@ if (is_mac) {
       ":electron_app_plist",
       ":electron_app_resources",
       ":electron_fuses",
-      "//base/allocator:early_zone_registration_mac",
+      "//base/allocator:early_zone_registration_apple",
       "//electron/buildflags",
     ]
     if (is_mas_build) {

+ 1 - 1
DEPS

@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
 
 vars = {
   'chromium_version':
-    '118.0.5949.0',
+    '118.0.5993.5',
   'node_version':
     'v18.17.1',
   'nan_version':

+ 4 - 0
chromium_src/BUILD.gn

@@ -37,6 +37,8 @@ static_library("chrome") {
     "//chrome/browser/icon_loader.h",
     "//chrome/browser/icon_manager.cc",
     "//chrome/browser/icon_manager.h",
+    "//chrome/browser/media/webrtc/desktop_capturer_wrapper.cc",
+    "//chrome/browser/media/webrtc/desktop_capturer_wrapper.h",
     "//chrome/browser/media/webrtc/desktop_media_list.cc",
     "//chrome/browser/media/webrtc/desktop_media_list.h",
     "//chrome/browser/media/webrtc/desktop_media_list_base.cc",
@@ -44,6 +46,8 @@ static_library("chrome") {
     "//chrome/browser/media/webrtc/desktop_media_list_observer.h",
     "//chrome/browser/media/webrtc/native_desktop_media_list.cc",
     "//chrome/browser/media/webrtc/native_desktop_media_list.h",
+    "//chrome/browser/media/webrtc/thumbnail_capturer.cc",
+    "//chrome/browser/media/webrtc/thumbnail_capturer.h",
     "//chrome/browser/media/webrtc/window_icon_util.h",
     "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc",
     "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.h",

+ 1 - 0
patches/chromium/.patches

@@ -128,4 +128,5 @@ fix_harden_blink_scriptstate_maybefrom.patch
 chore_add_buildflag_guard_around_new_include.patch
 fix_use_delegated_generic_capturer_when_available.patch
 build_remove_ent_content_analysis_assert.patch
+fix_move_autopipsettingshelper_behind_branding_buildflag.patch
 revert_remove_the_allowaggressivethrottlingwithwebsocket_feature.patch

+ 1 - 1
patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch

@@ -10,7 +10,7 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
 This should be upstreamed.
 
 diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index a5a5cfcb4abda8c4642d2904728a882e1e85db23..f238d61c8e78ffdae82613133ba67b2a6a640b04 100644
+index d7909fb4a736fee3e94708d7d0d073b6260288b2..91cba6a04500f12085e66d0dc88b8785490f68d7 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
 @@ -260,6 +260,10 @@ int GpuMain(MainFunctionParams parameters) {

+ 11 - 11
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 103a9d9fb17e954ecaf0acecaa3eeafc23e39c94..de299316216dba204decba3b0eb57f5c277be835 100644
+index d1e9ad95891487b37e2e03cb2a220eb969e877ab..13bdc6cf7ba4221f0a3219975a0825eb62dd0b78 100644
 --- a/content/public/renderer/render_frame_observer.h
 +++ b/content/public/renderer/render_frame_observer.h
 @@ -139,6 +139,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,7 +23,7 @@ index 103a9d9fb17e954ecaf0acecaa3eeafc23e39c94..de299316216dba204decba3b0eb57f5c
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index ddc816dab4419088069ebc3b64d60f199505e427..b75866eb9ce086f9c52055a6fc65af2a027e442d 100644
+index 54368c4a6ae9e2fb40017ecb31228a035dacf4cb..dceea20dd2a53fa079da7263e3161e1bd86279fe 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
 @@ -4474,6 +4474,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -40,7 +40,7 @@ index ddc816dab4419088069ebc3b64d60f199505e427..b75866eb9ce086f9c52055a6fc65af2a
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index 91a8fdd2b9b931b21f725208cfc78a2fd4c0818e..26758f9fefd09ad75841b5fcba0c7aeabcbd3ce2 100644
+index bbca34db538e7fcfa54a845485e4c3e93507b754..988dafcd1f22c7e74386308825556f71e1b69ff1 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
 @@ -611,6 +611,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -53,10 +53,10 @@ index 91a8fdd2b9b931b21f725208cfc78a2fd4c0818e..26758f9fefd09ad75841b5fcba0c7aea
                                  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 93acf68fbb7ff9b3bfc414a33fa1cdda4fe73bb1..90ec3437c2c94e87cfd0b25b200729c14ff55683 100644
+index cb4cd28c051c3ac4f97981e44636a6ea7d311c39..8eb2fd06f694c2c390427a0e981960f9292e9659 100644
 --- a/third_party/blink/public/web/web_local_frame_client.h
 +++ b/third_party/blink/public/web/web_local_frame_client.h
-@@ -612,6 +612,9 @@ class BLINK_EXPORT WebLocalFrameClient {
+@@ -620,6 +620,9 @@ class BLINK_EXPORT WebLocalFrameClient {
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) {}
  
@@ -79,10 +79,10 @@ index fbd5c929b323ee9d943615ed8c890d869345165d..af11f266db8d626dfbba6f16d0a906e6
    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 62e611ec3ac95eac88d4665d2640429e9d833594..7bf646d6cd8eaf29267b6136de0952e2545ec503 100644
+index 61acd17afbe3ea1a6c2e40687709deee6b767df5..0413dda58f6de06f2dcd112b912c124626b19f85 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client.h
-@@ -319,6 +319,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
+@@ -321,6 +321,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
  
    virtual void DidCreateScriptContext(v8::Local<v8::Context>,
                                        int32_t world_id) = 0;
@@ -92,7 +92,7 @@ index 62e611ec3ac95eac88d4665d2640429e9d833594..7bf646d6cd8eaf29267b6136de0952e2
                                          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 89bb2bc3ed31070ebe70d7a9a0798923d17ebbe2..e0a76203690c61f00aaf2e01f27c0e0dd642e573 100644
+index 65642d9cc3b021acb6b0be310db782514379f627..cd0a381fbe6dc478c8c0779c351270b5b4d818f9 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
 @@ -282,6 +282,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -110,7 +110,7 @@ index 89bb2bc3ed31070ebe70d7a9a0798923d17ebbe2..e0a76203690c61f00aaf2e01f27c0e0d
      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 28e1c00e05e74d5a79f32897e57a854ff14ce7a9..1cd704b1bb53eaf226d1c72c97e3f765a4b1f10e 100644
+index ee4555b8ee7eab9b1ef7ef532fe94649f60c36b1..02b8bd5ce9579b4517f8188cfcb28f60012f6ce1 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
 +++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
 @@ -84,6 +84,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index 28e1c00e05e74d5a79f32897e57a854ff14ce7a9..1cd704b1bb53eaf226d1c72c97e3f765
                                  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 1934ca82e3e26e0f5c4f2f7b417df6bcd6e66abf..1277b858f2d5b4b0a0dd1c97282eff0d763cdc2b 100644
+index 507d02dc496a2324274e12501cb9ff080a0ed401..abcff9a4020578ef435bfa7c0dc0f9d8330bfa6b 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
-@@ -403,6 +403,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
+@@ -407,6 +407,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
  
    void DidCreateScriptContext(v8::Local<v8::Context>,
                                int32_t world_id) override {}

+ 2 - 2
patches/chromium/add_electron_deps_to_license_credits_file.patch

@@ -7,10 +7,10 @@ Ensure that licenses for the dependencies introduced by Electron
 are included in `LICENSES.chromium.html`
 
 diff --git a/tools/licenses/licenses.py b/tools/licenses/licenses.py
-index 15b461326e2ce4bd255cbe779b449261a7f63f09..ae6c83557dc3f299b33a5e42afb3d587c5c72100 100755
+index 9a34155c5066b5e8c08c205170d48afb0f4caa92..60a7ec8e7f8e9754e6f50df8bc3cbf8a502df0cf 100755
 --- a/tools/licenses/licenses.py
 +++ b/tools/licenses/licenses.py
-@@ -424,6 +424,31 @@ SPECIAL_CASES = {
+@@ -425,6 +425,31 @@ SPECIAL_CASES = {
          "License": "Apache 2.0",
          "License File": ["//third_party/selenium-atoms/LICENSE.closure"],
      },

+ 22 - 20
patches/chromium/add_maximized_parameter_to_linuxui_getwindowframeprovider.patch

@@ -8,10 +8,10 @@ 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 45958eda0794f21a55bf80806d9e17002d246a24..4980bf9d0e25f4fcd718216ca195b7e8d51d721b 100644
+index c830167862edc495fe0e5c040801441f1c62ea42..cf307567604f5ad456c0ce2c01ffef5450adbdb6 100644
 --- a/ui/gtk/gtk_ui.cc
 +++ b/ui/gtk/gtk_ui.cc
-@@ -509,12 +509,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
+@@ -517,12 +517,13 @@ std::unique_ptr<ui::NavButtonProvider> GtkUi::CreateNavButtonProvider() {
    return std::make_unique<gtk::NavButtonProviderGtk>();
  }
  
@@ -31,7 +31,7 @@ index 45958eda0794f21a55bf80806d9e17002d246a24..4980bf9d0e25f4fcd718216ca195b7e8
  }
  
 diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
-index 53c02c50dac536af3f235a9d8192a92449acb9a6..5df5c3fdb62b6aa5c20715fa1d07033d0f36a23e 100644
+index c257b869f0c790f8af1f29d42e5ceb9e40344d8a..5184aa47dda70beb2f66e6227b17b632970a5a33 100644
 --- a/ui/gtk/gtk_ui.h
 +++ b/ui/gtk/gtk_ui.h
 @@ -108,7 +108,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
@@ -43,7 +43,7 @@ index 53c02c50dac536af3f235a9d8192a92449acb9a6..5df5c3fdb62b6aa5c20715fa1d07033d
  
   private:
    using TintMap = std::map<int, color_utils::HSL>;
-@@ -200,6 +200,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
+@@ -208,6 +208,8 @@ class GtkUi : public ui::LinuxUiAndTheme {
    // while Chrome is running.
    std::unique_ptr<ui::WindowFrameProvider> solid_frame_provider_;
    std::unique_ptr<ui::WindowFrameProvider> transparent_frame_provider_;
@@ -53,10 +53,10 @@ index 53c02c50dac536af3f235a9d8192a92449acb9a6..5df5c3fdb62b6aa5c20715fa1d07033d
    // 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 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650d2972238 100644
+index 1f4eeebe54780a4927104d7cdaa4f7cfae6e7d2a..64d243287a367ff4201efebeda95f553c33f5d9b 100644
 --- a/ui/gtk/window_frame_provider_gtk.cc
 +++ b/ui/gtk/window_frame_provider_gtk.cc
-@@ -39,16 +39,18 @@ std::string GetThemeName() {
+@@ -39,17 +39,20 @@ std::string GetThemeName() {
    return theme_string;
  }
  
@@ -64,10 +64,12 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
 +GtkCssContext WindowContext(bool solid_frame, bool maximized, bool focused) {
    std::string selector = "window.background.";
    selector += solid_frame ? "solid-csd" : "csd";
-+  if (maximized)
++  if (maximized) {
 +    selector += ".maximized";
-   if (!focused)
++  }
+   if (!focused) {
      selector += ":inactive";
+   }
    return AppendCssNodeToStyleContext({}, selector);
  }
  
@@ -76,9 +78,9 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
 +GtkCssContext DecorationContext(bool solid_frame, bool maximized, bool focused) {
 +  auto context = WindowContext(solid_frame, maximized, focused);
    // GTK4 renders the decoration directly on the window.
-   if (!GtkCheckVersion(4))
+   if (!GtkCheckVersion(4)) {
      context = AppendCssNodeToStyleContext(context, "decoration");
-@@ -65,8 +67,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool focused) {
+@@ -68,8 +71,8 @@ GtkCssContext DecorationContext(bool solid_frame, bool focused) {
    return context;
  }
  
@@ -88,8 +90,8 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
 +  auto context = WindowContext(solid_frame, maximized, focused);
    context =
        AppendCssNodeToStyleContext(context, "headerbar.header-bar.titlebar");
-   if (!focused)
-@@ -121,8 +123,8 @@ int ComputeTopCornerRadius() {
+   if (!focused) {
+@@ -125,8 +128,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.
@@ -100,16 +102,16 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
    ApplyCssToContext(context, R"(window, headerbar {
      background-image: none;
      background-color: black;
-@@ -155,7 +157,7 @@ int ComputeTopCornerRadius() {
+@@ -159,7 +162,7 @@ int ComputeTopCornerRadius() {
  bool HeaderIsTranslucent() {
    // The arbitrary square size to render a sample header.
    constexpr int kHeaderSize = 32;
 -  auto context = HeaderContext(false, false);
 +  auto context = HeaderContext(false, false, false);
-   double opacity = 1.0f;
-   GtkStyleContextGet(context, "opacity", &opacity, nullptr);
-   if (opacity < 1.0f)
-@@ -211,8 +213,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom(
+   double opacity = GetOpacityFromContext(context);
+   if (opacity < 1.0) {
+     return true;
+@@ -216,8 +219,8 @@ void WindowFrameProviderGtk::Asset::CloneFrom(
    unfocused_bitmap = src.unfocused_bitmap;
  }
  
@@ -120,7 +122,7 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
  
  WindowFrameProviderGtk::~WindowFrameProviderGtk() = default;
  
-@@ -319,7 +321,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(
+@@ -325,7 +328,7 @@ void WindowFrameProviderGtk::PaintWindowFrame(
        top_area_height_dip * scale - effective_frame_thickness_px.top();
  
    auto header = PaintHeaderbar({client_bounds_px.width(), top_area_height_px},
@@ -129,7 +131,7 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
    image = gfx::ImageSkia::CreateFrom1xBitmap(header);
    // In GTK4, the headerbar gets clipped by the window.
    if (GtkCheckVersion(4)) {
-@@ -351,7 +353,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
+@@ -358,7 +361,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
  
    gfx::Rect frame_bounds_dip(kMaxFrameSizeDip, kMaxFrameSizeDip,
                               2 * kMaxFrameSizeDip, 2 * kMaxFrameSizeDip);
@@ -138,7 +140,7 @@ index 1925c1a2763b8dd720f5d0a630bc98ec5d16b9a0..a4986477b46aef555d526851cf191650
    frame_bounds_dip.Inset(-GtkStyleContextGetPadding(focused_context));
    frame_bounds_dip.Inset(-GtkStyleContextGetBorder(focused_context));
    gfx::Size bitmap_size(BitmapSizePx(asset), BitmapSizePx(asset));
-@@ -359,7 +361,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
+@@ -366,7 +369,7 @@ void WindowFrameProviderGtk::MaybeUpdateBitmaps(float scale) {
        PaintBitmap(bitmap_size, frame_bounds_dip, focused_context, scale);
    asset.unfocused_bitmap =
        PaintBitmap(bitmap_size, frame_bounds_dip,

+ 14 - 8
patches/chromium/allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -6,7 +6,7 @@ Subject: allow disabling blink scheduler throttling per RenderView
 This allows us to disable throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
-index df0c283413566e3a1bdfc8d12add7461eb65a8ee..14f3212aea671b07cf82067100e04f6840387ab3 100644
+index 8a8f88c0beed2afda87543b8933bde342ecb0588..2ed68bd47ccadea20acad67d6a106e257e2c7cd0 100644
 --- a/content/browser/renderer_host/render_view_host_impl.cc
 +++ b/content/browser/renderer_host/render_view_host_impl.cc
 @@ -716,6 +716,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -34,10 +34,10 @@ index d44652650891eff7cd6111bc6d6454a009942cb6..16522609163ba6bc422fc30a8d145a25
    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 10ee30af7650f67d4c27af4df357f2316b992abc..d35b2058d9584143cc76480e6bdf17f13a6eaad9 100644
+index 9b7814890a4f513e8b9e07fbac370a40af6dac15..ee2b3bc3aabf7f5a8e3d2ad57675537f21aafaa6 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -565,8 +565,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
+@@ -562,8 +562,8 @@ void RenderWidgetHostViewAura::ShowImpl(PageVisibilityState page_visibility) {
    // OnShowWithPageVisibility will not call NotifyHostAndDelegateOnWasShown,
    // which updates `visibility_`, unless the host is hidden. Make sure no update
    // is needed.
@@ -99,10 +99,10 @@ index 8a18ecf567cd3a6a2fb1627083a5544a93198bf4..6bb4074e033e045de164bc776f75f152
    // Visibility -----------------------------------------------------------
  
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index f4bd3d4fa8d85220557b3a2608f8ee5b808468d8..c724ee69385ae9817161a72f82a14c4ac9b5f835 100644
+index 1043f13dd1d47ba58e2cf5311d2ed2387ba97b14..fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -2406,6 +2406,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
+@@ -2407,6 +2407,10 @@ void WebViewImpl::SetPageLifecycleStateInternal(
    TRACE_EVENT2("navigation", "WebViewImpl::SetPageLifecycleStateInternal",
                 "old_state", old_state, "new_state", new_state);
  
@@ -113,7 +113,7 @@ index f4bd3d4fa8d85220557b3a2608f8ee5b808468d8..c724ee69385ae9817161a72f82a14c4a
    bool storing_in_bfcache = new_state->is_in_back_forward_cache &&
                              !old_state->is_in_back_forward_cache;
    bool restoring_from_bfcache = !new_state->is_in_back_forward_cache &&
-@@ -3870,17 +3874,31 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -3875,20 +3879,34 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
@@ -129,8 +129,11 @@ index f4bd3d4fa8d85220557b3a2608f8ee5b808468d8..c724ee69385ae9817161a72f82a14c4a
      bool is_initial_state) {
    DCHECK(GetPage());
 -  GetPage()->SetVisibilityState(visibility_state, is_initial_state);
+-  // Do not throttle if the page should be painting.
 -  GetPage()->GetPageScheduler()->SetPageVisible(
--      visibility_state == mojom::blink::PageVisibilityState::kVisible);
+-      visibility_state == mojom::blink::PageVisibilityState::kVisible ||
+-      visibility_state ==
+-          mojom::blink::PageVisibilityState::kHiddenButPainting);
 -  // Notify observers of the change.
 -  if (!is_initial_state) {
 -    for (auto& observer : observers_)
@@ -141,7 +144,10 @@ index f4bd3d4fa8d85220557b3a2608f8ee5b808468d8..c724ee69385ae9817161a72f82a14c4a
 +    GetPage()->SetVisibilityState(mojom::blink::PageVisibilityState::kVisible, is_initial_state);
 +    GetPage()->GetPageScheduler()->SetPageVisible(true);
 +  } else {
-+    bool is_visible = visibility_state == mojom::blink::PageVisibilityState::kVisible;
++    bool is_visible =
++        (visibility_state == mojom::blink::PageVisibilityState::kVisible ||
++         visibility_state ==
++            mojom::blink::PageVisibilityState::kHiddenButPainting);
 +    GetPage()->SetVisibilityState(visibility_state, is_initial_state);
 +    GetPage()->GetPageScheduler()->SetPageVisible(is_visible);
 +    // Notify observers of the change.

+ 10 - 10
patches/chromium/allow_in-process_windows_to_have_different_web_prefs.patch

@@ -8,10 +8,10 @@ WebPreferences of in-process child windows, rather than relying on
 process-level command line switches, as before.
 
 diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc
-index 4f332fd867bed29f084891e5f2b281f5c99c011b..f63fda73d2b3337de60d23caacd9a0f0ae77364e 100644
+index fa46daef1d7da536c434d41475d25ed8f8f933c6..37ae01f45d768afa4bfa538307cf2f08ba14b906 100644
 --- a/third_party/blink/common/web_preferences/web_preferences.cc
 +++ b/third_party/blink/common/web_preferences/web_preferences.cc
-@@ -146,6 +146,19 @@ WebPreferences::WebPreferences()
+@@ -144,6 +144,19 @@ WebPreferences::WebPreferences()
        v8_cache_options(blink::mojom::V8CacheOptions::kDefault),
        record_whole_document(false),
        stylus_handwriting_enabled(false),
@@ -32,10 +32,10 @@ index 4f332fd867bed29f084891e5f2b281f5c99c011b..f63fda73d2b3337de60d23caacd9a0f0
        accelerated_video_decode_enabled(false),
        animation_policy(
 diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
-index 62b6af4669061757f3f707859f0296fd6c49bade..cbeece7a75f8c7a7169ea6b768bf0a056c849ee6 100644
+index bd5d2f9ba30d847a44e70c1173eb49a5d3f4b6bb..3ef312b2e84427ec1bcc738e88d6425255a96b20 100644
 --- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
 +++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
-@@ -150,6 +150,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
+@@ -148,6 +148,19 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
    out->v8_cache_options = data.v8_cache_options();
    out->record_whole_document = data.record_whole_document();
    out->stylus_handwriting_enabled = data.stylus_handwriting_enabled();
@@ -56,7 +56,7 @@ index 62b6af4669061757f3f707859f0296fd6c49bade..cbeece7a75f8c7a7169ea6b768bf0a05
    out->accelerated_video_decode_enabled =
        data.accelerated_video_decode_enabled();
 diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
-index 8821fe095126feef49e50b87b84c29d1fa956a9b..61565991cc66a31e428cdf3fb0f457db08aaa901 100644
+index 65cf8211005546a8c527a679306e5ad6617cc046..0c08e298107d1aa0d0809691a98dd12b2c0aeb5a 100644
 --- a/third_party/blink/public/common/web_preferences/web_preferences.h
 +++ b/third_party/blink/public/common/web_preferences/web_preferences.h
 @@ -10,6 +10,7 @@
@@ -67,7 +67,7 @@ index 8821fe095126feef49e50b87b84c29d1fa956a9b..61565991cc66a31e428cdf3fb0f457db
  #include "net/nqe/effective_connection_type.h"
  #include "third_party/blink/public/common/common_export.h"
  #include "third_party/blink/public/mojom/css/preferred_color_scheme.mojom-shared.h"
-@@ -161,6 +162,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
+@@ -159,6 +160,19 @@ struct BLINK_COMMON_EXPORT WebPreferences {
    // If true, stylus handwriting recognition to text input will be available in
    // editable input fields which are non-password type.
    bool stylus_handwriting_enabled;
@@ -88,7 +88,7 @@ index 8821fe095126feef49e50b87b84c29d1fa956a9b..61565991cc66a31e428cdf3fb0f457db
    // This flags corresponds to a Page's Settings' setCookieEnabled state. It
    // only controls whether or not the "document.cookie" field is properly
 diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
-index 4e95e23afe936cb87b4390a977c69b1b8263335c..bec35f10856c982febf45dcc3a2ee651f5bf4fed 100644
+index c5cf0543740b47c12b0cd211a64152d8abee1d21..c1ffebd09f2547454bd1551cf5fc576dd384fac2 100644
 --- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
 +++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
 @@ -6,6 +6,7 @@
@@ -99,7 +99,7 @@ index 4e95e23afe936cb87b4390a977c69b1b8263335c..bec35f10856c982febf45dcc3a2ee651
  #include "mojo/public/cpp/bindings/struct_traits.h"
  #include "net/nqe/effective_connection_type.h"
  #include "third_party/blink/public/common/common_export.h"
-@@ -448,6 +449,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
+@@ -439,6 +440,52 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
      return r.stylus_handwriting_enabled;
    }
  
@@ -153,7 +153,7 @@ index 4e95e23afe936cb87b4390a977c69b1b8263335c..bec35f10856c982febf45dcc3a2ee651
      return r.cookie_enabled;
    }
 diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
-index fce47861fbbcba4a50870ff99ef1263b22a573d7..02d0118e94058047fe6fa1ae1e68bdbf6fe2d752 100644
+index d03fc2e4ccef645e31bab838dabf76ade7a35de8..ca35e4d6cf8fc49b8275a4b49bc4da8019282c3d 100644
 --- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
 +++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
 @@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
@@ -164,7 +164,7 @@ index fce47861fbbcba4a50870ff99ef1263b22a573d7..02d0118e94058047fe6fa1ae1e68bdbf
  
  enum PointerType {
    kPointerNone                              = 1,             // 1 << 0
-@@ -220,6 +221,19 @@ struct WebPreferences {
+@@ -218,6 +219,19 @@ struct WebPreferences {
    // If true, stylus handwriting recognition to text input will be available in
    // editable input fields which are non-password type.
    bool stylus_handwriting_enabled;

+ 4 - 4
patches/chromium/blink_local_frame.patch

@@ -15,7 +15,7 @@ Refs changes in:
 This patch reverts the changes to fix associated crashes in Electron.
 
 diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
-index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a08332a4ce 100644
+index e0ce2a1bcbef7ece6b320adf820ba49148a66fd7..6aefdcfc226089ab3ae149b75ebdc86ba7bce6fb 100644
 --- a/third_party/blink/renderer/core/frame/frame.cc
 +++ b/third_party/blink/renderer/core/frame/frame.cc
 @@ -125,14 +125,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -49,10 +49,10 @@ index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a0
    // its owning reference back to our owning LocalFrame.
    client_->Detached(type);
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index 83f126adc28e8109df8e234b5b3fe6c844d2f26c..d50985b2e3fa32c54c2dc8612878cc30dcb2c76a 100644
+index 2ad84b68ec6b000e385df02e6599c3c106137fbd..d9fc652cf843dd2d55b7a773fbad601b487a3464 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -665,10 +665,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -666,10 +666,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    }
    DCHECK(!view_ || !view_->IsAttached());
  
@@ -63,7 +63,7 @@ index 83f126adc28e8109df8e234b5b3fe6c844d2f26c..d50985b2e3fa32c54c2dc8612878cc30
    if (!Client())
      return false;
  
-@@ -716,6 +712,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -717,6 +713,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
    DCHECK(!view_->IsAttached());
    Client()->WillBeDetached();
  

+ 3 - 3
patches/chromium/boringssl_build_gn.patch

@@ -6,12 +6,12 @@ Subject: boringssl BUILD.gn
 Build BoringSSL with some extra functions that nodejs needs.
 
 diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
-index db3cf20b2951445986474e9f54981715ad3cd613..ab2bf2dbb35d6360a773881cb619507405222e81 100644
+index c4e792544775011671084cef9af8a3b62834265c..840f799fe03a48e29ef09c35be8c4ab3402974f3 100644
 --- a/third_party/boringssl/BUILD.gn
 +++ b/third_party/boringssl/BUILD.gn
-@@ -49,6 +49,20 @@ config("no_asm_config") {
+@@ -53,6 +53,20 @@ config("no_asm_config") {
  
- all_sources = crypto_sources + ssl_sources
+ all_sources = crypto_sources + ssl_sources + pki_sources
  all_headers = crypto_headers + ssl_headers
 +if (is_electron_build) {
 +  # Needed to build a nodejs-compatible boringssl.

+ 1 - 1
patches/chromium/build_add_electron_tracing_category.patch

@@ -8,7 +8,7 @@ categories in use are known / declared.  This patch is required for us
 to introduce a new Electron category for Electron-specific tracing.
 
 diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
-index c175e896868e99391ee8382d37fa08e17afb6768..d80b28386150f089ca48534d680759bcf0859b09 100644
+index 292e5ce4922b37a642233a70672d777f5ec6143a..2da2d79a05b0fbb4c53a21136cf47f51635afa03 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
 @@ -80,6 +80,8 @@

+ 2 - 2
patches/chromium/build_allow_electron_to_use_exec_script.patch

@@ -6,10 +6,10 @@ Subject: build: allow electron to use exec_script
 This is similar to the //build usecase so we're OK adding ourselves here
 
 diff --git a/.gn b/.gn
-index 16bf620b7c2ee2d2a850f892ad232f7c888f2649..8a428da676bfb993cf8f6c85cd966fa79925011d 100644
+index 628071cb9a46419307ba0a0b72a3fb137817a596..5e2b164ffa0903db09ac7e10576c0395af22f4ab 100644
 --- a/.gn
 +++ b/.gn
-@@ -159,4 +159,6 @@ exec_script_whitelist =
+@@ -158,4 +158,6 @@ exec_script_whitelist =
  
        "//tools/grit/grit_rule.gni",
        "//tools/gritsettings/BUILD.gn",

+ 1 - 1
patches/chromium/build_disable_print_content_analysis.patch

@@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more
 easily enabled or disabled by default with buildflags.
 
 diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
-index 5ceb96d63f948f94a44393337366bb68a2e0f31d..086f5e568cc6ae43c75477cfd3fac4c68f2a25b0 100644
+index fa9004e2ec3e3e785d0ea590ea8c632db7cbadda..da809d75f191fe0437cd783f8689b0b3866e343b 100644
 --- a/printing/buildflags/buildflags.gni
 +++ b/printing/buildflags/buildflags.gni
 @@ -48,7 +48,7 @@ declare_args() {

+ 9 - 9
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 07a98cf6892e7e1a81f15ccfd349012784ecf2b0..7a624d697cfe3627cc8f026d005132f17df8d433 100644
+index 41ce32113ec2679b76d5a4fd69a7109c832ac7a1..1cd35794bf78f3d92b42634d9494c85a98e93ea6 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
 @@ -199,11 +199,16 @@ if (!is_android && !is_mac) {
@@ -33,10 +33,10 @@ index 07a98cf6892e7e1a81f15ccfd349012784ecf2b0..7a624d697cfe3627cc8f026d005132f1
            "//base",
            "//build:branding_buildflags",
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 606f58f90759a270f35e0da9448dca1fc3c920ea..b45deb7d8d745ef08c0401a622c1b0beaa503a65 100644
+index 1a9bff4a3efb7fd802db7ae9696027ee318eb7eb..85d2bc48117c7e41cfa49ea204d2c46f79a1c117 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -4690,7 +4690,7 @@ static_library("browser") {
+@@ -4723,7 +4723,7 @@ static_library("browser") {
  
      # On Windows, the hashes are embedded in //chrome:chrome_initial rather
      # than here in :chrome_dll.
@@ -46,10 +46,10 @@ index 606f58f90759a270f35e0da9448dca1fc3c920ea..b45deb7d8d745ef08c0401a622c1b0be
        sources += [ "certificate_viewer_stub.cc" ]
      }
 diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
-index 9b97632ddba8343e90cc3f38c9a69f82ce1147e9..865c47f4a449f2930a3174f959e933c94a033f40 100644
+index 6a2501dde4552c2b0d96dd54fc1b94ba1e610b0c..8d3cb67ae6d4fe65cfbb907309af734906b49949 100644
 --- a/chrome/test/BUILD.gn
 +++ b/chrome/test/BUILD.gn
-@@ -6789,7 +6789,6 @@ test("unit_tests") {
+@@ -6838,7 +6838,6 @@ test("unit_tests") {
  
      deps += [
        "//chrome:other_version",
@@ -57,7 +57,7 @@ index 9b97632ddba8343e90cc3f38c9a69f82ce1147e9..865c47f4a449f2930a3174f959e933c9
        "//chrome//services/util_win:unit_tests",
        "//chrome/app:chrome_dll_resources",
        "//chrome/app:win_unit_tests",
-@@ -6815,6 +6814,10 @@ test("unit_tests") {
+@@ -6864,6 +6863,10 @@ test("unit_tests") {
        "//ui/resources",
      ]
  
@@ -68,15 +68,15 @@ index 9b97632ddba8343e90cc3f38c9a69f82ce1147e9..865c47f4a449f2930a3174f959e933c9
      ldflags = [
        "/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
        "/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
-@@ -7774,7 +7777,6 @@ test("unit_tests") {
+@@ -7831,7 +7834,6 @@ test("unit_tests") {
      }
  
      deps += [
 -      "//chrome:packed_resources_integrity_hash",
        "//chrome/browser/apps:icon_standardizer",
        "//chrome/browser/apps/app_service",
-       "//chrome/browser/apps/app_service:test_support",
-@@ -7860,6 +7862,10 @@ test("unit_tests") {
+       "//chrome/browser/apps/app_service:app_registry_cache_waiter",
+@@ -7918,6 +7920,10 @@ test("unit_tests") {
        "//ui/webui/resources/js/browser_command:mojo_bindings",
      ]
  

+ 21 - 21
patches/chromium/build_only_use_the_mas_build_config_in_the_required_components.patch

@@ -6,7 +6,7 @@ Subject: build: only use the mas build config in the required components
 Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
 
 diff --git a/base/BUILD.gn b/base/BUILD.gn
-index 87ffd0b51817838306f1d0d0eb8a7d3c04022b41..68f599f110cc78c49d04f8bb2a315375b5d909e3 100644
+index 82cb596dcbb369cf67addf856dfe8c0789449e78..149d429b8f80de9a16ef1459693b940f86710dc2 100644
 --- a/base/BUILD.gn
 +++ b/base/BUILD.gn
 @@ -1038,6 +1038,7 @@ component("base") {
@@ -54,10 +54,10 @@ index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6
      "alert.h",
      "alert.mm",
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index 440fa0b3ff9b08016ff19ab54c70a453dc8c5f86..2e2f358829bf0492fd3e44173eeb7d0b5507b388 100644
+index 729753a72edd761ec831f79828742a26f9dd2417..45858456c9c8c82870c41b0edd1359d16ed54537 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
-@@ -331,6 +331,7 @@ viz_component("service") {
+@@ -332,6 +332,7 @@ viz_component("service") {
          "frame_sinks/external_begin_frame_source_mac.h",
        ]
      }
@@ -65,7 +65,7 @@ index 440fa0b3ff9b08016ff19ab54c70a453dc8c5f86..2e2f358829bf0492fd3e44173eeb7d0b
    }
  
    if (is_android || use_ozone) {
-@@ -588,6 +589,7 @@ viz_source_set("unit_tests") {
+@@ -589,6 +590,7 @@ viz_source_set("unit_tests") {
        "display_embedder/software_output_device_mac_unittest.mm",
      ]
      frameworks = [ "IOSurface.framework" ]
@@ -74,7 +74,7 @@ index 440fa0b3ff9b08016ff19ab54c70a453dc8c5f86..2e2f358829bf0492fd3e44173eeb7d0b
  
    if (is_win) {
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index 2f165461b7326b4e426d4b2552766896bb273c29..c05a51a74e2f753b46d984930130e31cd9801542 100644
+index 718ad3e088f6730bb00f1e3674effae6c429b9b6..77af941f2dd2d3074f5596cee24be47dc8175434 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
 @@ -56,6 +56,7 @@ source_set("browser") {
@@ -86,10 +86,10 @@ index 2f165461b7326b4e426d4b2552766896bb273c29..c05a51a74e2f753b46d984930130e31c
    libs = []
    frameworks = []
 diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
-index dce27cfa39b52e39a95cee658584ed80ab1953ef..366edd2e86edcdbb30ae4c0fa952b5d9aab38f8a 100644
+index 9c9f6d58a8e5c1ed14eb60c722667d1a24d2c6fa..34979dbbd84da86db079b423967ab8b775b47c52 100644
 --- a/content/common/BUILD.gn
 +++ b/content/common/BUILD.gn
-@@ -174,6 +174,7 @@ source_set("common") {
+@@ -176,6 +176,7 @@ source_set("common") {
      "//content:content_implementation",
      "//build/config:precompiled_headers",
    ]
@@ -98,10 +98,10 @@ index dce27cfa39b52e39a95cee658584ed80ab1953ef..366edd2e86edcdbb30ae4c0fa952b5d9
    public_deps = [
      ":mojo_bindings",
 diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
-index 62117d9c83972003d0483ed9fc6efad6a4490a75..246d7289fd5727886054e182e17520c5ce5a7916 100644
+index b16be8f9992b23ce93d174531f2debd7f18bb436..119038743dc222907cb74c2c3ea34d23b5915a5e 100644
 --- a/content/renderer/BUILD.gn
 +++ b/content/renderer/BUILD.gn
-@@ -224,6 +224,7 @@ target(link_target_type, "renderer") {
+@@ -225,6 +225,7 @@ target(link_target_type, "renderer") {
    }
  
    configs += [ "//content:content_implementation" ]
@@ -110,10 +110,10 @@ index 62117d9c83972003d0483ed9fc6efad6a4490a75..246d7289fd5727886054e182e17520c5
  
    public_deps = [
 diff --git a/content/test/BUILD.gn b/content/test/BUILD.gn
-index 1ef02e527e7e3bc551b9a0a2a12259c34b4d5f0b..79fc4b4e888688126cce4483adbc9fd70d0d7377 100644
+index 581571b6bb1a655319b247d7cc85bb2a4dd7db1c..09779610326da207062a59ba572b2d7c13efd26f 100644
 --- a/content/test/BUILD.gn
 +++ b/content/test/BUILD.gn
-@@ -477,6 +477,7 @@ static_library("test_support") {
+@@ -480,6 +480,7 @@ static_library("test_support") {
    configs += [
      "//build/config:precompiled_headers",
      "//v8:external_startup_data",
@@ -147,10 +147,10 @@ index 4885f927ae2b871cf2911fb5bc5a2aac128b2aae..5f820bd6ef9f91f69e75065f08bd61a7
  
    if (is_mac) {
 diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
-index 550cf601dcb65e710e9dab6fb5023119b52b5278..18e60732057a3695858b17d6faef13927f869726 100644
+index 090bbd6f03c5749aaf763dac9e52c776f366c33d..5143231f5b3c95f55bf12aaedf253781eb59bb64 100644
 --- a/gpu/ipc/service/BUILD.gn
 +++ b/gpu/ipc/service/BUILD.gn
-@@ -138,6 +138,7 @@ component("service") {
+@@ -134,6 +134,7 @@ component("service") {
        "QuartzCore.framework",
      ]
      defines += [ "GL_SILENCE_DEPRECATION" ]
@@ -212,7 +212,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
  
  source_set("sandbox_unittests") {
 diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
-index 7b327be8a003ae01f79f71f00979ef0b2f45ac2a..ab84abb8c6ad1250de2beac0370427f84e1cbb41 100644
+index d06b485aebb64def0f082b4f1627c7b69b91a29c..7ed1e4a69ab09e2c1f328ab7bb7193d68404c63b 100644
 --- a/third_party/blink/renderer/core/BUILD.gn
 +++ b/third_party/blink/renderer/core/BUILD.gn
 @@ -308,6 +308,7 @@ component("core") {
@@ -249,10 +249,10 @@ index 4e23c38763184840a393589b3f55dcabb0db8121..e4ad30d0d7acecdca3a22fe05935a340
  
      if (use_atk) {
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index 22a11fe6cf0ee95e3535d46c80f77a25a5e550b3..4ea70349a2e72beb7db40c4ba7775dba806a48f2 100644
+index 9bb69e114fc6eed4db1921f2fa7b409013f9a4cd..418cf038fc46bf597e4d937f440ad64121fea341 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
-@@ -358,6 +358,7 @@ component("base") {
+@@ -360,6 +360,7 @@ component("base") {
        "interaction/element_tracker_mac.mm",
        "resource/resource_bundle_mac.mm",
      ]
@@ -276,10 +276,10 @@ index 7e17546f658ce0e6908f7dea499eac31e5295895..85c5fe7e25a84de5342d3d9b8cd20d19
  
    if (is_win) {
 diff --git a/ui/gfx/BUILD.gn b/ui/gfx/BUILD.gn
-index 0829ee9a58400dea171c99e0784607305092aa92..eaa938d159ed43539ca29c863318cd35b94a5531 100644
+index 98869537561ba6eaaa838601c9e0d1e71a016197..2141e6d3376042df7992f89119735c1b9b3cb236 100644
 --- a/ui/gfx/BUILD.gn
 +++ b/ui/gfx/BUILD.gn
-@@ -194,6 +194,7 @@ component("gfx") {
+@@ -192,6 +192,7 @@ component("gfx") {
        "scoped_ns_graphics_context_save_gstate_mac.h",
        "scoped_ns_graphics_context_save_gstate_mac.mm",
      ]
@@ -288,10 +288,10 @@ index 0829ee9a58400dea171c99e0784607305092aa92..eaa938d159ed43539ca29c863318cd35
    if (is_win) {
      sources += [
 diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
-index 4ea8e4f4636d555497759d8cf5f6181c4e7a649e..9556c2b11e1c0967fc04e61dba3321bd5020584b 100644
+index 2422a0cbcedbfadd58b7b55449b1a855b273a0e0..329fab443dba349a8e6da4448e103ab1c8bbbfab 100644
 --- a/ui/views/BUILD.gn
 +++ b/ui/views/BUILD.gn
-@@ -683,6 +683,7 @@ component("views") {
+@@ -684,6 +684,7 @@ component("views") {
        "IOSurface.framework",
        "QuartzCore.framework",
      ]
@@ -299,7 +299,7 @@ index 4ea8e4f4636d555497759d8cf5f6181c4e7a649e..9556c2b11e1c0967fc04e61dba3321bd
    }
  
    if (is_win) {
-@@ -1102,6 +1103,8 @@ source_set("test_support") {
+@@ -1108,6 +1109,8 @@ source_set("test_support") {
      "//testing/gtest",
    ]
  

+ 2 - 2
patches/chromium/build_remove_ent_content_analysis_assert.patch

@@ -9,10 +9,10 @@ This patch can be removed when we decide how we want to handle
 enterprise content analysis.
 
 diff --git a/components/enterprise/buildflags/buildflags.gni b/components/enterprise/buildflags/buildflags.gni
-index 7653c1c9e8fb18ce2c471af11468583d2da0cfb0..f63c1c7263b40d4344ef4b8468acb77d9718e19c 100644
+index b26c6ca3480f529b21cd4c7544de786baa995dfd..6509e0131bca73ab080b1e47878acf7fae72d112 100644
 --- a/components/enterprise/buildflags/buildflags.gni
 +++ b/components/enterprise/buildflags/buildflags.gni
-@@ -31,4 +31,4 @@ declare_args() {
+@@ -34,4 +34,4 @@ declare_args() {
  # These two flags are equivalent, but `enable_print_content_analysis` still
  # needs to exist separately as it lives under //printing which cannot depend
  # on //components.

+ 14 - 14
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 09c322c7a7c653befdb5dc0d974ebca4551296bc..01eb116b51037bff5da7a87d119b78387f5e72c6 100644
+index 50d873e238b04eb6d461dc929d98dfe171cc491c..586aa87098bd3db10440fe865a02c05e7b3be14f 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -8064,6 +8064,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -8206,6 +8206,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,7 +21,7 @@ index 09c322c7a7c653befdb5dc0d974ebca4551296bc..01eb116b51037bff5da7a87d119b7838
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index fe8d2992c67233e356d35b98fd28381b92709537..278e45752fe57ea81a4d825d9dd528ca67265808 100644
+index 6f1581c517bf6c4526d7831d50ce2ad0bc8d7531..9bb752da088be1fae748430c69c39b7fa86cab08 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -4315,6 +4315,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -51,10 +51,10 @@ index fe8d2992c67233e356d35b98fd28381b92709537..278e45752fe57ea81a4d825d9dd528ca
                               new_contents_impl, opener, params.target_url,
                               params.referrer.To<Referrer>(), params.disposition,
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index a1757960b139dea126e34776e9ec7768d9e3d89d..a3226c9a8080537daa2454b8014a691967bde058 100644
+index 3ddc93e18d353d5af31e28f8f8e682ea813db21c..2f1df452ce3617cf845409d01d8049325a1bd0a2 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -619,6 +619,10 @@ struct CreateNewWindowParams {
+@@ -611,6 +611,10 @@ struct CreateNewWindowParams {
    // The navigation initiator's user activation and ad status.
    blink.mojom.NavigationInitiatorActivationAndAdStatus
        initiator_activation_and_ad_status;
@@ -66,10 +66,10 @@ index a1757960b139dea126e34776e9ec7768d9e3d89d..a3226c9a8080537daa2454b8014a6919
  
  // 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 8727ca6878d50e538e94f13616ac7defb0da9521..1822d2961a6e9dafd6174f331f4e6bcc3a482049 100644
+index a0d56a9a24f22b1fd7a7e7a7ac82adf23a1e27ca..b006271eb9d4eb28aa8342a58d579716ed369281 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -677,6 +677,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -695,6 +695,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -79,7 +79,7 @@ index 8727ca6878d50e538e94f13616ac7defb0da9521..1822d2961a6e9dafd6174f331f4e6bcc
      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 7e7f12866a3ce0494dc059e0b6fcb3ed0f62227d..a5361ff2553c9e5c99a65a8f13eb3f5cded9fb78 100644
+index a6e922be7e68644ad1cfe64462712c0430c6749a..b3fb95c4bc6bfd5559c034ee5c946bd7d5a14050 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -173,6 +173,7 @@ class NetworkService;
@@ -90,7 +90,7 @@ index 7e7f12866a3ce0494dc059e0b6fcb3ed0f62227d..a5361ff2553c9e5c99a65a8f13eb3f5c
  }  // namespace network
  
  namespace sandbox {
-@@ -1093,6 +1094,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -1109,6 +1110,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -122,7 +122,7 @@ index 688fac1fd874438ad9bc6494691b0eadca7e5bb2..db12930a449b38966e63c2274275b115
                                                   const OpenURLParams& params) {
    return nullptr;
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index 34d3d2feb7d236d8f220da8e2aadda28b6eb4d26..39e142eedd051073a5f31b5455001a37b839a6bc 100644
+index 0fa12e6a5dd2eb2cd2102919f6127731e8500133..64ac8d677a9f7a723c46bbf0e74595b3c2866136 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -16,6 +16,7 @@
@@ -148,10 +148,10 @@ index 34d3d2feb7d236d8f220da8e2aadda28b6eb4d26..39e142eedd051073a5f31b5455001a37
    // 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 146e7d09a1a04512add2715c76d2b4d54d95753e..ddc816dab4419088069ebc3b64d60f199505e427 100644
+index ab92d5b8f710661d8b1c863423f0c0f7928646ba..54368c4a6ae9e2fb40017ecb31228a035dacf4cb 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -6371,6 +6371,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
+@@ -6391,6 +6391,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
            request.HasUserGesture(), GetWebFrame()->IsAdFrame(),
            GetWebFrame()->IsAdScriptInStack());
  
@@ -210,10 +210,10 @@ index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59
  
  }  // namespace blink
 diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
-index 7529a505b448d8773a4a5191ae19f8d0bf89bec5..714874042813178000321d27cdbfaaafba9a1c00 100644
+index 5005d4dd1169c45e44247ff96dafb29ee96680f1..9e79e9afd483b319a0ebc8707acdf5ab54edcd12 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -2164,6 +2164,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -2165,6 +2165,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
    WebWindowFeatures window_features =
        GetWindowFeaturesFromString(features, entered_window);
  

+ 1 - 1
patches/chromium/chore_add_buildflag_guard_around_new_include.patch

@@ -9,7 +9,7 @@ This is an experimental commit; but if it's successful,
 This patch should be upstreamed and then removed from electron's code.
 
 diff --git a/chrome/browser/ui/views/frame/browser_view.h b/chrome/browser/ui/views/frame/browser_view.h
-index f653d059664196a5015bbe53b8ca33e15efa0782..41a3a070b9070984ca980787041c88b03b00627d 100644
+index 8d0b8e65bb2697bb48c3f4ec2b85041d17b0590a..d3b4e01b6a6030166629f5f88f6226e00d94baf4 100644
 --- a/chrome/browser/ui/views/frame/browser_view.h
 +++ b/chrome/browser/ui/views/frame/browser_view.h
 @@ -43,7 +43,6 @@

+ 4 - 4
patches/chromium/chore_add_electron_deps_to_gitignores.patch

@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
 Makes things like "git status" quicker when developing electron locally
 
 diff --git a/.gitignore b/.gitignore
-index 6241dd501bd423350accd2a2f0b69b5d8b7e45bd..08befddc25e17bfde46bb11e94b646e8619edf54 100644
+index c71ddf7b2c50024d1d40f7a0a44bc0b48a0f80b1..96a4ba2253ec2870865f22c27676ea883ee0d928 100644
 --- a/.gitignore
 +++ b/.gitignore
-@@ -243,6 +243,7 @@ vs-chromium-project.txt
+@@ -244,6 +244,7 @@ vs-chromium-project.txt
  /delegate_execute
  /device/serial/device_serial_mojo.xml
  /docs/website
@@ -18,7 +18,7 @@ index 6241dd501bd423350accd2a2f0b69b5d8b7e45bd..08befddc25e17bfde46bb11e94b646e8
  /google_apis/internal
  /googleurl
 diff --git a/third_party/.gitignore b/third_party/.gitignore
-index feddae902ca6385741cdae48ab5d73b9563e717a..fd74ef103033ea17beb9d7d576fe19c7463a8233 100644
+index 628eed67792444b49985c28697dd02e592ca7c75..d4a034c8ee4e5ec669d0e9ad1759a83b5ed574cd 100644
 --- a/third_party/.gitignore
 +++ b/third_party/.gitignore
 @@ -96,6 +96,7 @@
@@ -37,7 +37,7 @@ index feddae902ca6385741cdae48ab5d73b9563e717a..fd74ef103033ea17beb9d7d576fe19c7
  /nasm
  /nearby/src
  /neon_2_sse/src
-@@ -276,6 +278,7 @@
+@@ -277,6 +279,7 @@
  /speex
  /sqlite/src
  /sqlite4java/lib/

+ 7 - 7
patches/chromium/chore_introduce_blocking_api_for_electron.patch

@@ -7,18 +7,18 @@ This patch comes after Chromium removed the ScopedAllowIO API in favor
 of explicitly adding ScopedAllowBlocking calls as friends.
 
 diff --git a/base/threading/thread_restrictions.h b/base/threading/thread_restrictions.h
-index b88010ec63528497fc2ae0b7b3fc04c0fdd2e539..51565cbfe42bf17881c13d12facb3d982bbab335 100644
+index 61ef504585b1347799be57205f1f7f87d01f5aec..d4ff2b0bd7342b46127ce1aa5d75993310cb7dcb 100644
 --- a/base/threading/thread_restrictions.h
 +++ b/base/threading/thread_restrictions.h
-@@ -133,6 +133,7 @@ class FirefoxProfileLock;
- class KeyStorageLinux;
+@@ -135,6 +135,7 @@ class KeyStorageLinux;
  class NativeBackendKWallet;
  class NativeDesktopMediaList;
+ class PartnerBookmarksReader;
 +class ProcessSingleton;
  class Profile;
  class ProfileImpl;
- class StartupTabProviderImpl;
-@@ -272,6 +273,9 @@ class BackendImpl;
+ class ScopedAllowBlockingForProfile;
+@@ -274,6 +275,9 @@ class BackendImpl;
  class InFlightIO;
  bool CleanupDirectorySync(const base::FilePath&);
  }  // namespace disk_cache
@@ -28,7 +28,7 @@ index b88010ec63528497fc2ae0b7b3fc04c0fdd2e539..51565cbfe42bf17881c13d12facb3d98
  namespace enterprise_connectors {
  class LinuxKeyRotationCommand;
  }  // namespace enterprise_connectors
-@@ -582,6 +586,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
+@@ -560,6 +564,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
    friend class ::DesktopNotificationBalloon;
    friend class ::FirefoxProfileLock;
    friend class ::GaiaConfig;
@@ -36,7 +36,7 @@ index b88010ec63528497fc2ae0b7b3fc04c0fdd2e539..51565cbfe42bf17881c13d12facb3d98
    friend class ::ProfileImpl;
    friend class ::ScopedAllowBlockingForProfile;
    friend class ::StartupTabProviderImpl;
-@@ -619,6 +624,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
+@@ -598,6 +603,7 @@ class BASE_EXPORT [[maybe_unused, nodiscard]] ScopedAllowBlocking {
    friend class crosapi::LacrosThreadTypeDelegate;
    friend class crypto::ScopedAllowBlockingForNSS;  // http://crbug.com/59847
    friend class drive::FakeDriveService;

+ 18 - 18
patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch

@@ -80,10 +80,10 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
    }
  
 diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
-index 3390eb25d8e648282591fd05b2cd6a0b86964d3a..b4e2f99c25ebce78a6346e5bedd6728a1c528911 100644
+index fdb96dee050670757ed4ce247bc0a12b01005d04..ceebc70bc445bfd417babc932e37d4c71215f195 100644
 --- a/chrome/browser/ui/browser.cc
 +++ b/chrome/browser/ui/browser.cc
-@@ -1868,12 +1868,11 @@ bool Browser::IsWebContentsCreationOverridden(
+@@ -1881,12 +1881,11 @@ bool Browser::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -99,10 +99,10 @@ index 3390eb25d8e648282591fd05b2cd6a0b86964d3a..b4e2f99c25ebce78a6346e5bedd6728a
  
  WebContents* Browser::CreateCustomWebContents(
 diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
-index 9fceed57deff55386fbabb1ce46c4ad725144a11..1dc104cc4cb80124050f892c586aab670a89e5a2 100644
+index ce9edb90a7ac7f16af1dcb3fda492315315ace7c..126ddd6068e6023d7e21aefcf87d81791a61d262 100644
 --- a/chrome/browser/ui/browser.h
 +++ b/chrome/browser/ui/browser.h
-@@ -883,8 +883,7 @@ class Browser : public TabStripModelObserver,
+@@ -886,8 +886,7 @@ class Browser : public TabStripModelObserver,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -155,7 +155,7 @@ index 69d39ab12f7a1895e1ca50914a4f8dc37e10e6cd..eaa9156721de98d19f6110e7b2ab55af
    }
    content::WebContents* CreateCustomWebContents(
 diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
-index eb2d28e7df5e4430f24799d051ba864b25a4da38..4af0e5792e875d9fcf55293707d2cdcdae5b5007 100644
+index ae7e7189cee9f033d528275fa27e1e5a0d4b4b49..02ee0c513babcac48fe8e0c9e8de483b3e1b2626 100644
 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
 +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
 @@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -176,7 +176,7 @@ index eb2d28e7df5e4430f24799d051ba864b25a4da38..4af0e5792e875d9fcf55293707d2cdcd
                                                                    java_gurl);
  }
 diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
-index d42e4b793677188c090593ad6aa612e48058dfbb..25aebc2aaffd1f43274ffc52a20b5979afc5aaec 100644
+index e5b1bd6bb831f9e1e17520015d09068464ecb098..f8094fb78f30d6f3145b6ee704305281a5b302df 100644
 --- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
 +++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
 @@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -218,7 +218,7 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
    void AddNewContents(content::WebContents* source,
                        std::unique_ptr<content::WebContents> new_contents,
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index e3d811b00c799fba8aa9d52a9b437618e579e169..2f2e089817f8b9392f0a793c3702d04f9ad5b97b 100644
+index 5bcd634f1bd29a58cae240274269d952ef6570e9..60d76d4ecf3bbda940f9a43d86259fcfd7d4a349 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -4222,8 +4222,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -246,7 +246,7 @@ index db12930a449b38966e63c2274275b1157f38bea7..2d770e9c0c88e5ad1fac15fd13b70e6b
  }
  
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index 39e142eedd051073a5f31b5455001a37b839a6bc..dcc4a956485b61514f0fa208d96083aaf53d563e 100644
+index 64ac8d677a9f7a723c46bbf0e74595b3c2866136..48098a18fda2461a0ef981023908ec86a41e4223 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -323,8 +323,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -288,10 +288,10 @@ index 583da1abe9cb405dc02806564b99a4619fc81473..8131afeee37a60ae3b10731bc708efd9
        content::RenderFrameHost* opener,
        content::SiteInstance* source_site_instance,
 diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
-index 1e1712fdf38ecbd41f998896cca98db14448fa18..d2cd1003c224f49338595dc91fe9cd05a4549f4a 100644
+index 0fc4a40faf0704f5a0115505de6ca730f9ec5b03..e2ebcdcdff27c6ca6c96367a7cbbd94121577e43 100644
 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
 +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
-@@ -380,8 +380,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
+@@ -379,8 +379,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -302,10 +302,10 @@ index 1e1712fdf38ecbd41f998896cca98db14448fa18..d2cd1003c224f49338595dc91fe9cd05
  }
  
 diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
-index 397bee1fc011be7d949f62c50f6acfb05c7251e1..165026320324c3295b7152731d19efd65fd90b07 100644
+index 2a2f0b6b44293e7a9b31598c8c5382c5618d71b5..6c87565980a28532eeb4a7b51ca1188c5c26378f 100644
 --- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
 +++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
-@@ -172,8 +172,7 @@ class MimeHandlerViewGuest
+@@ -173,8 +173,7 @@ class MimeHandlerViewGuest
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,
@@ -316,7 +316,7 @@ index 397bee1fc011be7d949f62c50f6acfb05c7251e1..165026320324c3295b7152731d19efd6
        content::RenderFrameHost* opener,
        content::SiteInstance* source_site_instance,
 diff --git a/fuchsia_web/webengine/browser/frame_impl.cc b/fuchsia_web/webengine/browser/frame_impl.cc
-index 109b251204ede578be1664a8935926c7b61d0419..a741be8feed5b7b6d322630bf494c0feaec38268 100644
+index 67ba5e236c9e244ab8f2564bdb66f320525f012e..ca16fe72485fe1f0ec6b05e1877b4d4de1cdad44 100644
 --- a/fuchsia_web/webengine/browser/frame_impl.cc
 +++ b/fuchsia_web/webengine/browser/frame_impl.cc
 @@ -567,8 +567,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -330,7 +330,7 @@ index 109b251204ede578be1664a8935926c7b61d0419..a741be8feed5b7b6d322630bf494c0fe
    // can catch bad client behavior while not interfering with normal operation.
    constexpr size_t kMaxPendingWebContentsCount = 10;
 diff --git a/fuchsia_web/webengine/browser/frame_impl.h b/fuchsia_web/webengine/browser/frame_impl.h
-index 0ba76ffa875efe29e576310cfb210e4e86cc3478..e565a89da74fe1b455a03ede05cb302ae81d6e21 100644
+index f0788870c01c4de281c8173da234616385f57131..2632d0d33d38973f8822d214b8bc91ef81b10460 100644
 --- a/fuchsia_web/webengine/browser/frame_impl.h
 +++ b/fuchsia_web/webengine/browser/frame_impl.h
 @@ -305,8 +305,7 @@ class WEB_ENGINE_EXPORT FrameImpl : public fuchsia::web::Frame,
@@ -358,10 +358,10 @@ index 60acb83c8d76f71db689f9d188bb6e8f64a74ffb..aa6cee708d1e451b443bc26528b56cc8
          ->options()
          ->block_new_web_contents();
 diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
-index aa3148852ff61323cb9bf20817c6677cffe34ded..82790630067f11da8c4eac785b242d5cd131d3e3 100644
+index e236e1ac647004c4a91c7098d38572e22d0312da..92c2b13acd54a8aaa14d0d0bab4f93bbd5bfe5ef 100644
 --- a/ui/views/controls/webview/web_dialog_view.cc
 +++ b/ui/views/controls/webview/web_dialog_view.cc
-@@ -428,8 +428,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
+@@ -433,8 +433,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
      content::SiteInstance* source_site_instance,
      content::mojom::WindowContainerType window_container_type,
      const GURL& opener_url,
@@ -372,10 +372,10 @@ index aa3148852ff61323cb9bf20817c6677cffe34ded..82790630067f11da8c4eac785b242d5c
      return delegate_->HandleShouldOverrideWebContentsCreation();
    return false;
 diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
-index 63a3eb7b4a73e8d28662ca1175008b7e4225ed36..df1fd8f901507854bc6fbed5ba8b94c15b58b56d 100644
+index e01b8206fe3661b157436c221eca6e6b6eef3f17..1828c2d1b80d772be734a6b2ab56aa71829c38e0 100644
 --- a/ui/views/controls/webview/web_dialog_view.h
 +++ b/ui/views/controls/webview/web_dialog_view.h
-@@ -155,8 +155,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
+@@ -156,8 +156,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
        content::SiteInstance* source_site_instance,
        content::mojom::WindowContainerType window_container_type,
        const GURL& opener_url,

+ 1 - 1
patches/chromium/command-ismediakey.patch

@@ -117,7 +117,7 @@ index db596585cbb44b3710636e3fc013f288966f604f..6d5557ee1a2c35ee15e695e024834184
  
  }  // namespace ui
 diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
-index 7eb89675a7bb3f22aefc1fb843d7e68554a165fd..bd783a0bfd92c3f9b5553a6480d258c2528ee740 100644
+index 3450e36ba7d80ad36d12fc4b85130d985c2f247a..e81a45c1f038cb43b19aa0225fbcf4c35f280442 100644
 --- a/ui/base/accelerators/media_keys_listener_mac.mm
 +++ b/ui/base/accelerators/media_keys_listener_mac.mm
 @@ -32,6 +32,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {

+ 1 - 1
patches/chromium/crash_allow_setting_more_options.patch

@@ -89,7 +89,7 @@ index 99efa6b245b9944710b76a342ec9a37947078a48..e55df93f17560a566e1dd2a63c560054
                                annotations, arguments, false, false));
    } else {
 diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm
-index e6c1805bfd52f0b855f6b7db4ceda9a5a78dea44..eb388b3af595d4db07c8d3e050b892a4093263c6 100644
+index eb5bcfe0234c39526d6d162434476fe9e32d8184..8480d07e2607eb3c8c16b54a02077c0454d11fce 100644
 --- a/components/crash/core/app/crashpad_mac.mm
 +++ b/components/crash/core/app/crashpad_mac.mm
 @@ -87,6 +87,8 @@

+ 7 - 7
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 a294093a5534d9602b76f8496e6d5f8d4b10c96e..22245a4c2204b9965fd39e93ed48fc3e32df463e 100644
+index 2c8a95ce169f9c322b545a4426b8bec2964de2e5..02b93bb09564ffacee638ccbd725c56855dbb6ab 100644
 --- a/content/app/content_main_runner_impl.cc
 +++ b/content/app/content_main_runner_impl.cc
 @@ -39,6 +39,7 @@
@@ -48,7 +48,7 @@ index a294093a5534d9602b76f8496e6d5f8d4b10c96e..22245a4c2204b9965fd39e93ed48fc3e
  #endif  // V8_USE_EXTERNAL_STARTUP_DATA
  }
  
-@@ -944,7 +951,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
+@@ -966,7 +973,7 @@ int ContentMainRunnerImpl::Initialize(ContentMainParams params) {
      return TerminateForFatalInitializationError();
  #endif  // BUILDFLAG(IS_ANDROID) && (ICU_UTIL_DATA_IMPL == ICU_UTIL_DATA_FILE)
  
@@ -81,7 +81,7 @@ index a687861c04b323102a8d2bfe22b24a964793cd9b..4a7a469111eaec3e1e76ee852bd5afbb
    return new ContentClient();
  }
 diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
-index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3cb033a99 100644
+index c891c5649a6ae76c9f0f988359649ece0e8ac1d9..54e30c4dd82042c283e36cae767dcdd716f94292 100644
 --- a/content/public/app/content_main_delegate.h
 +++ b/content/public/app/content_main_delegate.h
 @@ -9,6 +9,7 @@
@@ -92,7 +92,7 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3
  #include "build/build_config.h"
  #include "content/common/content_export.h"
  #include "content/public/common/main_function_params.h"
-@@ -165,6 +166,8 @@ class CONTENT_EXPORT ContentMainDelegate {
+@@ -168,6 +169,8 @@ class CONTENT_EXPORT ContentMainDelegate {
    virtual bool ShouldHandleConsoleControlEvents();
  #endif
  
@@ -102,10 +102,10 @@ index d4bb0e9a017a833b403916e1d6e64fb058f40f86..35ba35a95e39700824d6e0b480b99bc3
    friend class ContentClientCreator;
    friend class ContentClientInitializer;
 diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
-index b5f427fcb7239ad864c43d5df6730d564aadb414..a2c0b0f69e8b9f5d32e67e0d2bdc55ce459fb515 100644
+index ff5d9e16b3b33c6f2895691356b90c8210e927d9..75ce1de12c9a8bff5028d9e8c3aed87eee2d5f16 100644
 --- a/gin/v8_initializer.cc
 +++ b/gin/v8_initializer.cc
-@@ -536,8 +536,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
+@@ -540,8 +540,7 @@ void V8Initializer::GetV8ExternalSnapshotData(const char** snapshot_data_out,
  
  #if defined(V8_USE_EXTERNAL_STARTUP_DATA)
  
@@ -115,7 +115,7 @@ index b5f427fcb7239ad864c43d5df6730d564aadb414..a2c0b0f69e8b9f5d32e67e0d2bdc55ce
    if (g_mapped_snapshot) {
      // TODO(crbug.com/802962): Confirm not loading different type of snapshot
      // files in a process.
-@@ -546,10 +545,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
+@@ -550,10 +549,17 @@ void V8Initializer::LoadV8Snapshot(V8SnapshotFileType snapshot_file_type) {
  
    base::MemoryMappedFile::Region file_region;
    base::File file =

+ 4 - 4
patches/chromium/custom_protocols_plzserviceworker.patch

@@ -8,10 +8,10 @@ Allow registering custom protocols to handle service worker main script fetching
 Refs https://bugs.chromium.org/p/chromium/issues/detail?id=996511
 
 diff --git a/content/browser/service_worker/service_worker_context_wrapper.cc b/content/browser/service_worker/service_worker_context_wrapper.cc
-index 0d1a5e0874546d1ead5e84a3fa7b4cbac943d1b7..54a9ca8e45b2f935463f41b68617c959b88f1247 100644
+index 3267cdb340819ed36dceb7629ea414d87bfa292e..f5f1beb1fb8335378bc8cecacaff03f97f7a54e7 100644
 --- a/content/browser/service_worker/service_worker_context_wrapper.cc
 +++ b/content/browser/service_worker/service_worker_context_wrapper.cc
-@@ -1852,6 +1852,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1855,6 +1855,26 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
        loader_factory_bundle_info =
            context()->loader_factory_bundle_for_update_check()->Clone();
  
@@ -38,7 +38,7 @@ index 0d1a5e0874546d1ead5e84a3fa7b4cbac943d1b7..54a9ca8e45b2f935463f41b68617c959
    if (auto* config = content::WebUIConfigMap::GetInstance().GetConfig(
            browser_context(), scope)) {
      // If this is a Service Worker for a WebUI, the WebUI's URLDataSource
-@@ -1871,9 +1891,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1874,9 +1894,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
              features::kEnableServiceWorkersForChromeScheme) &&
          scope.scheme_piece() == kChromeUIScheme) {
        config->RegisterURLDataSource(browser_context());
@@ -49,7 +49,7 @@ index 0d1a5e0874546d1ead5e84a3fa7b4cbac943d1b7..54a9ca8e45b2f935463f41b68617c959
            .emplace(kChromeUIScheme, CreateWebUIServiceWorkerLoaderFactory(
                                          browser_context(), kChromeUIScheme,
                                          base::flat_set<std::string>()));
-@@ -1881,9 +1899,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
+@@ -1884,9 +1902,7 @@ ServiceWorkerContextWrapper::GetLoaderFactoryForBrowserInitiatedRequest(
                     features::kEnableServiceWorkersForChromeUntrusted) &&
                 scope.scheme_piece() == kChromeUIUntrustedScheme) {
        config->RegisterURLDataSource(browser_context());

+ 14 - 5
patches/chromium/desktop_media_list.patch

@@ -41,7 +41,7 @@ index 0389599ac786b6abd61ca921347fe12ddd5d0ee7..780927301744ea7312f230cec76a24a3
  
  int DesktopMediaListBase::GetSourceCount() const {
 diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
-index f25dede94beab46120194bd5450882fa30a2ad8d..e74071f9e82cb89d0f3eba8ff86e01d67207f1d3 100644
+index b65012985ff1797203160d9e26af17fefee5c244..9ee211fb487007bd37b57cfa7b4ffbe5307af637 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h
 +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
 @@ -39,7 +39,7 @@ class DesktopMediaListBase : public DesktopMediaList {
@@ -82,10 +82,10 @@ index 33ca7a53dfb6d2c9e3a33f0065a3acd806e82e01..9fdf2e8ff0056ff407015b914c6b03eb
    const Source& GetSource(int index) const override;
    DesktopMediaList::Type GetMediaListType() const override;
 diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab1869877a 100644
+index 81d4416e270e1a4548866a56222c47cb616385e3..22f55d22b0406f0d1aa642dcea44403ac1636057 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-@@ -147,7 +147,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
+@@ -159,7 +159,7 @@ BOOL CALLBACK AllHwndCollector(HWND hwnd, LPARAM param) {
  #if BUILDFLAG(IS_MAC)
  BASE_FEATURE(kWindowCaptureMacV2,
               "WindowCaptureMacV2",
@@ -94,7 +94,16 @@ index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab
  #endif
  
  }  // namespace
-@@ -457,6 +457,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
+@@ -235,7 +235,7 @@ class NativeDesktopMediaList::Worker
+   base::WeakPtr<NativeDesktopMediaList> media_list_;
+ 
+   DesktopMediaList::Type type_;
+-  const std::unique_ptr<ThumbnailCapturer> capturer_;
++  std::unique_ptr<ThumbnailCapturer> capturer_;
+   const ThumbnailCapturer::FrameDeliveryMethod frame_delivery_method_;
+   const bool add_current_process_windows_;
+ 
+@@ -529,6 +529,12 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
        FROM_HERE,
        base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
                       media_list_));
@@ -107,7 +116,7 @@ index b548c9fbd3c0bf425447b29dcd866cd27e96b14c..4de719510eaeaaf77cdbd46560f3b4ab
  }
  
  void NativeDesktopMediaList::Worker::OnCaptureResult(
-@@ -829,6 +835,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
+@@ -935,6 +941,11 @@ void NativeDesktopMediaList::RefreshForVizFrameSinkWindows(
          FROM_HERE, base::BindOnce(&Worker::RefreshThumbnails,
                                    base::Unretained(worker_.get()),
                                    std::move(native_ids), thumbnail_size_));

+ 14 - 14
patches/chromium/disable_color_correct_rendering.patch

@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
-index cc5461a832fedab9e862456df4751a456afb1b48..b5e4367ccd29042c32d6ee7d72aa08fa31eb395f 100644
+index 777465ab5bb311035f805f5eba49fae14fd6601c..30813d35bacedbff1494aeff5b481ccffc6af70d 100644
 --- a/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
-@@ -1873,6 +1873,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
+@@ -1869,6 +1869,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
  TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
      gfx::ContentColorUsage content_color_usage) const {
    TargetColorParams params;
@@ -35,7 +35,7 @@ index cc5461a832fedab9e862456df4751a456afb1b48..b5e4367ccd29042c32d6ee7d72aa08fa
    // If we are likely to software composite the resource, we use sRGB because
    // software compositing is unable to perform color conversion.
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index 46ea5b77442eb577de068ee90f06fe55733ee93e..f832306bc4a38b743cff2eb525badb7e383a8241 100644
+index c84d4536210f3671c9e98f0de7caeaba523d1959..62863927742375e10a5907496cca95058ae5eece 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
 @@ -102,6 +102,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -81,7 +81,7 @@ index e4deb71ea3afa1ef9d6ddac9c61f5916ff608514..d2e6854ac2aaa3cc83c0b72ebc03193b
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index 9d7e9780c3ae58b45b2f443e48175254dd3f480b..6a276759550e6f80740875df654a136cd89ef189 100644
+index 6b2f1af11e1480153dff4bd1f32527f87f18dc80..ef69c734878fcd9f8fa6dd61dada1729248c2b91 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
 @@ -228,6 +228,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -93,10 +93,10 @@ index 9d7e9780c3ae58b45b2f443e48175254dd3f480b..6a276759550e6f80740875df654a136c
      sandbox::policy::switches::kGpuSandboxAllowSysVShm,
      sandbox::policy::switches::kGpuSandboxFailuresFatal,
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index c240d818b3a8f93ccbf77cb74e48d271c82fa08a..f6ce53a6f38cac3e1381940614b91526da9283dc 100644
+index b549e5795621e5493db5d23407b6d040f32c38cf..f4ff150530694a38ce0de16ba0b05ca152c99b8b 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -3535,6 +3535,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -3284,6 +3284,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
    // Propagate the following switches to the renderer command line (along
    // with any associated values) if present in the browser command line.
    static const char* const kSwitchNames[] = {
@@ -148,7 +148,7 @@ index 6892376fa33d006453977c354734d880a7ef7c91..4cd7b762d5fe1c54f5b06cc0d8f50560
  }
  
 diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
-index 59c0bf7f6d4a7b4206d9e588b460ebe40ccbef11..f0c06b9cfb4febf4d80c6d22c2505ef20a263e26 100644
+index 368105b62e1650255e28cf71fcac2b956e811658..2dbbef93571ff5d41fc70a339d22470fdc5f5529 100644
 --- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
 +++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
 @@ -30,6 +30,7 @@
@@ -159,7 +159,7 @@ index 59c0bf7f6d4a7b4206d9e588b460ebe40ccbef11..f0c06b9cfb4febf4d80c6d22c2505ef2
  #include "ui/native_theme/native_theme_features.h"
  #include "ui/native_theme/overlay_scrollbar_constants_aura.h"
  
-@@ -240,6 +241,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
+@@ -332,6 +333,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  
@@ -170,7 +170,7 @@ index 59c0bf7f6d4a7b4206d9e588b460ebe40ccbef11..f0c06b9cfb4febf4d80c6d22c2505ef2
    // is what the renderer uses if its not threaded.
    settings.enable_checker_imaging =
 diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
-index 487e029c46d9b516740abf4f9b8acb4db4d8426f..038f3d77b18e98f8a328d79cd8a8197d20733f7a 100644
+index af19d04e043366a2db07bf6eddfd1fc260590a37..b981128498991ccd67a78bc255da53081ab1cdec 100644
 --- a/ui/gfx/mac/io_surface.cc
 +++ b/ui/gfx/mac/io_surface.cc
 @@ -20,6 +20,7 @@
@@ -187,7 +187,7 @@ index 487e029c46d9b516740abf4f9b8acb4db4d8426f..038f3d77b18e98f8a328d79cd8a8197d
                              const ColorSpace& color_space) {
 +  auto* cmd_line = base::CommandLine::ForCurrentProcess();
 +  if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) {
-+    base::ScopedCFTypeRef<CFDataRef> system_icc(
++    base::apple::ScopedCFTypeRef<CFDataRef> system_icc(
 +        CGColorSpaceCopyICCData(base::mac::GetSystemColorSpace()));
 +    IOSurfaceSetValue(io_surface, CFSTR("IOSurfaceColorSpace"), system_icc);
 +    return true;
@@ -196,14 +196,14 @@ index 487e029c46d9b516740abf4f9b8acb4db4d8426f..038f3d77b18e98f8a328d79cd8a8197d
    // Allow but ignore invalid color spaces.
    if (!color_space.IsValid())
      return true;
-@@ -317,6 +326,15 @@ base::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
+@@ -318,6 +327,15 @@ base::apple::ScopedCFTypeRef<IOSurfaceRef> CreateIOSurface(
      DCHECK_EQ(kIOReturnSuccess, r);
    }
  
 +  auto* cmd_line = base::CommandLine::ForCurrentProcess();
 +  if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) {
 +    CGColorSpaceRef color_space = base::mac::GetSystemColorSpace();
-+    base::ScopedCFTypeRef<CFDataRef> color_space_icc(
++    base::apple::ScopedCFTypeRef<CFDataRef> color_space_icc(
 +        CGColorSpaceCopyICCData(color_space));
 +    IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
 +    return surface;
@@ -213,7 +213,7 @@ index 487e029c46d9b516740abf4f9b8acb4db4d8426f..038f3d77b18e98f8a328d79cd8a8197d
    IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
  
 diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc
-index 7639d05f73b27a65b8c7cd41b526bc9308a98a31..f377eca18f90b1ae4aa85471a63f8e726f979ffb 100644
+index 9576188a9872f4c10448e7333cf5aa1577128b45..8b0be327bd496c70a7461d41eaf459af62816c20 100644
 --- a/ui/gfx/switches.cc
 +++ b/ui/gfx/switches.cc
 @@ -13,6 +13,8 @@ namespace switches {
@@ -226,7 +226,7 @@ index 7639d05f73b27a65b8c7cd41b526bc9308a98a31..f377eca18f90b1ae4aa85471a63f8e72
  // sharpness, kerning, hinting and layout.
  const char kDisableFontSubpixelPositioning[] =
 diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h
-index ebeb73e7f679280297a09332612a83181e24a4e1..79ec8deb0cab719b344a4964221c10725bd066e7 100644
+index 37011f67b3d33d5cb212b12ebdbaa0ae0671287e..845c30e4ac4b5d53fa638d3a609ac75848a72c68 100644
 --- a/ui/gfx/switches.h
 +++ b/ui/gfx/switches.h
 @@ -13,6 +13,7 @@

+ 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 701b2e4d9e91c138179fde12a21fccf53c02937b..09d45ce54763b65a9713e4f43ec3e07626937029 100644
+index 3fb6ed640ee9d857f19b4d60b12047133e68f920..0e035eae2094ef5351e4a35dc6ccc9866efe43ba 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -546,7 +546,11 @@
+@@ -557,7 +557,11 @@
      return;
  
    host()->WasHidden();

+ 7 - 7
patches/chromium/disable_hidden.patch

@@ -6,7 +6,7 @@ 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 2212b6575e885f60def207d7614114c72ac3ea9d..5e09ede19e2b54e806ae212cccb9c43c93439fbc 100644
+index 9e946e02bca276a877defacf6cf6cb54f882ceba..149ead7bbf52ad127747c5f80f0e35a13203502a 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
 @@ -801,6 +801,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -20,23 +20,23 @@ index 2212b6575e885f60def207d7614114c72ac3ea9d..5e09ede19e2b54e806ae212cccb9c43c
        blink::mojom::PointerLockResult::kWrongDocument);
  
 diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
-index 401123216fccc830a240b0b473e0426a65e630e6..2c205dd684340ddbed4fd301d5928ce6dad559fe 100644
+index cd75eee211a8ea7242420cc1ba47784d55c3fb5d..76956dd92fcde059f2c928d604d465997c6ff4f0 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -902,6 +902,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -907,6 +907,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
                                    cc::BrowserControlsState current,
                                    bool animate);
 +  // Electron: Prevents the widget from getting hidden.
 +  bool disable_hidden_ = false;
  
-  protected:
-   // |routing_id| must not be MSG_ROUTING_NONE.
+   void StartDragging(blink::mojom::DragDataPtr drag_data,
+                      blink::DragOperationsMask drag_operations_mask,
 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 8fc7b8a81ddf634efff0f1dfb49723ff44225d2a..10ee30af7650f67d4c27af4df357f2316b992abc 100644
+index d8345f942111fbdc6a5b2eb7f3e10842ea00baff..9b7814890a4f513e8b9e07fbac370a40af6dac15 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -617,7 +617,7 @@ void RenderWidgetHostViewAura::HideImpl() {
+@@ -623,7 +623,7 @@ void RenderWidgetHostViewAura::HideImpl() {
    DCHECK(visibility_ == Visibility::HIDDEN ||
           visibility_ == Visibility::OCCLUDED);
  

+ 6 - 6
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 46b6efb81e456d1f4543e21acbda669e89204e67..53accafded7b04df1d4593a36c4a2f817f1453de 100644
+index cb05975b622eee25217d9f2477c5e53ace017db8..e264713f4361a588e0ec8b4f6f37ab76ad642116 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1516,6 +1516,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1559,6 +1559,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,7 +51,7 @@ index 46b6efb81e456d1f4543e21acbda669e89204e67..53accafded7b04df1d4593a36c4a2f81
    // 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 8b232e22bdeb5fdcd1033889d041b42c2bc68f5a..24342e3d4637d386b888e01220457e8004f4288a 100644
+index 25f9dab24b27ad2b3d6ca01690e9f5c3fea96d32..b230036559cdc44b97b3a5ca5f359a0b4512ccd7 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -316,6 +316,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index 8b232e22bdeb5fdcd1033889d041b42c2bc68f5a..24342e3d4637d386b888e01220457e80
    void SetEnableReferrers(bool enable_referrers) override;
  #if BUILDFLAG(IS_CHROMEOS)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index e082a44bbeb6a99a6d1f0cbcc1be52646fc2c3b6..6d8df0eef71a2d6443c987bde148937cec552609 100644
+index 6ebade992b628fee18d23e5e29d2d7d6190261a7..21039664d38fb228a9319d296276c33de7a0a265 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -1213,6 +1213,9 @@ interface NetworkContext {
+@@ -1233,6 +1233,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  
@@ -77,7 +77,7 @@ index e082a44bbeb6a99a6d1f0cbcc1be52646fc2c3b6..6d8df0eef71a2d6443c987bde148937c
    SetAcceptLanguage(string new_accept_language);
  
 diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
-index 216e7780e0ec29298cd56e04f67697702072e2f3..d8f4a4a3f85efd54320121e335787696354c30af 100644
+index 9845739908daada58d620cacf95c2b0fbe80ccfb..40dba78ea2dc740c6f0edd7c896bf8bf16abc51e 100644
 --- a/services/network/test/test_network_context.h
 +++ b/services/network/test/test_network_context.h
 @@ -144,6 +144,7 @@ class TestNetworkContext : public mojom::NetworkContext {

+ 4 - 4
patches/chromium/expose_v8initializer_codegenerationcheckcallbackinmainthread.patch

@@ -6,10 +6,10 @@ Subject: expose V8Initializer::CodeGenerationCheckCallbackInMainThread
 This is needed to blend Blink and Node's policy for code generation policy.
 
 diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-index 60e8ed950dad31a220bbe8a9197fbe25f429fe83..b8b20d8c8340c63bd3039a0683446ef1eb4fdf0d 100644
+index 9bb1917278452e5b9d00dbb39b44416558987255..20d188f57d5425c5f704b3b03cd27034efb25ea7 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -439,8 +439,9 @@ TrustedTypesCodeGenerationCheck(v8::Local<v8::Context> context,
+@@ -411,8 +411,9 @@ TrustedTypesCodeGenerationCheck(v8::Local<v8::Context> context,
    return {true, V8String(context->GetIsolate(), stringified_source)};
  }
  
@@ -22,10 +22,10 @@ index 60e8ed950dad31a220bbe8a9197fbe25f429fe83..b8b20d8c8340c63bd3039a0683446ef1
                                          bool is_code_like) {
    // The TC39 "Dynamic Code Brand Check" feature is currently behind a flag.
 diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
-index 39d1351a4a8bbc95097640be54affec426abe73e..30a36cf16d4a8f4692ec6a13be1217212390172a 100644
+index 7a08647d69a31ff439bbef8c7b8cde8de2953ae7..9e628b96a845322d407f9da30a63c04ef5de9c24 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.h
-@@ -69,6 +69,10 @@ class CORE_EXPORT V8Initializer {
+@@ -68,6 +68,10 @@ class CORE_EXPORT V8Initializer {
                                           v8::Local<v8::Value>);
    static void MessageHandlerInWorker(v8::Local<v8::Message>,
                                       v8::Local<v8::Value>);

+ 2 - 2
patches/chromium/extend_apply_webpreferences.patch

@@ -12,7 +12,7 @@ Ideally we could add an embedder observer pattern here but that can be
 done in future work.
 
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
-index c724ee69385ae9817161a72f82a14c4ac9b5f835..625a40b764a1cc7eb6f89a7e30a6172861c41cc4 100644
+index fd48c793a0d447a4a6777f94c5b580fdf9b5b2d9..8c14bfc9f0a6ad2bd314b653d4f993eda1e87348 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
 @@ -165,6 +165,7 @@
@@ -23,7 +23,7 @@ index c724ee69385ae9817161a72f82a14c4ac9b5f835..625a40b764a1cc7eb6f89a7e30a61728
  #include "third_party/blink/renderer/platform/graphics/image.h"
  #include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
  #include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
-@@ -1785,6 +1786,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
+@@ -1786,6 +1787,7 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
  #if BUILDFLAG(IS_MAC)
    web_view_impl->SetMaximumLegibleScale(
        prefs.default_maximum_page_scale_factor);

+ 3 - 3
patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch

@@ -26,10 +26,10 @@ index f6556e141a76b0766f672bfa5819256e635c60af..06c7ac178cefc149732294ed790f2b7c
  }
  
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index c0a4e3a9f6cb29eead5b1a95da696c92277b3722..97d4db79bcb4a874d0f40f4f0ef0a466a3cfe3b1 100644
+index 6f51a8ffec973d6c2acacabb951c7cc4e36b639c..889e655fccc115faae932236cc28c6386cf19c1e 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
-@@ -421,6 +421,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -433,6 +433,23 @@ class NATIVE_THEME_EXPORT NativeTheme {
        scoped_refptr<ColorProviderKey::ThemeInitializerSupplier> custom_theme,
        bool use_custom_frame = true) const;
  
@@ -53,7 +53,7 @@ index c0a4e3a9f6cb29eead5b1a95da696c92277b3722..97d4db79bcb4a874d0f40f4f0ef0a466
    // Returns a shared instance of the native theme that should be used for web
    // rendering. Do not use it in a normal application context (i.e. browser).
    // The returned object should not be deleted by the caller. This function is
-@@ -631,6 +648,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
+@@ -643,6 +660,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
    bool inverted_colors_ = false;
    PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
    PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;

+ 9 - 9
patches/chromium/feat_configure_launch_options_for_service_process.patch

@@ -183,7 +183,7 @@ index 01e62d7e8df65efb900e9cd0d34bcd8e0ed3e7da..9af6784707f125046d9a734165fc2b08
    host->GetChildProcess()->BindServiceInterface(std::move(receiver));
  }
 diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
-index c54b0c7b80a95564a30672784ee3ba2edbbf0a87..0336b15775e3bb96f54c776d673601931cce7d8a 100644
+index 6b23ccfd3c7844c309228f1378100e474a6bbbc5..f3b4497cc453178ef46b294eae4ed280e65d8da0 100644
 --- a/content/browser/utility_process_host.cc
 +++ b/content/browser/utility_process_host.cc
 @@ -156,11 +156,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
@@ -227,7 +227,7 @@ index c54b0c7b80a95564a30672784ee3ba2edbbf0a87..0336b15775e3bb96f54c776d67360193
  mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
    return static_cast<ChildProcessHostImpl*>(process_->GetHost())
        ->child_process();
-@@ -443,9 +463,22 @@ bool UtilityProcessHost::StartProcess() {
+@@ -441,9 +461,22 @@ bool UtilityProcessHost::StartProcess() {
      }
  #endif  // BUILDFLAG(IS_LINUX)
  
@@ -627,10 +627,10 @@ index cb43aa14c9742f3788ae58c3e49b890cd532f327..6a738f7aade504f2ff3bb6647a0da8f8
  #if BUILDFLAG(IS_MAC)
    // Whether or not to disclaim TCC responsibility for the process, defaults to
 diff --git a/sandbox/policy/win/sandbox_win.cc b/sandbox/policy/win/sandbox_win.cc
-index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1af61a42c6 100644
+index 3add6ba6997a36738bd0421641c91c477936241a..8718b14fdd41ec3488cb2c10d8e2053101529701 100644
 --- a/sandbox/policy/win/sandbox_win.cc
 +++ b/sandbox/policy/win/sandbox_win.cc
-@@ -706,11 +706,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
+@@ -712,11 +712,9 @@ base::win::ScopedHandle CreateUnsandboxedJob() {
  // command line flag.
  ResultCode LaunchWithoutSandbox(
      const base::CommandLine& cmd_line,
@@ -643,7 +643,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a
    // Network process runs in a job even when unsandboxed. This is to ensure it
    // does not outlive the browser, which could happen if there is a lot of I/O
    // on process shutdown, in which case TerminateProcess can fail. See
-@@ -938,7 +936,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
+@@ -944,7 +942,7 @@ bool SandboxWin::InitTargetServices(TargetServices* target_services) {
  ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -652,7 +652,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a
      SandboxDelegate* delegate,
      TargetPolicy* policy) {
    const base::CommandLine& launcher_process_command_line =
-@@ -952,7 +950,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -958,7 +956,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
    }
  
    // Add any handles to be inherited to the policy.
@@ -661,7 +661,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a
      policy->AddHandleToShare(handle);
  
    if (!policy->GetConfig()->IsConfigured()) {
-@@ -967,6 +965,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -973,6 +971,13 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
    // have no effect. These calls can fail with SBOX_ERROR_BAD_PARAMS.
    policy->SetStdoutHandle(GetStdHandle(STD_OUTPUT_HANDLE));
    policy->SetStderrHandle(GetStdHandle(STD_ERROR_HANDLE));
@@ -675,7 +675,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a
  #endif
  
    if (!delegate->PreSpawnTarget(policy))
-@@ -979,7 +984,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
+@@ -985,7 +990,7 @@ ResultCode SandboxWin::GeneratePolicyForSandboxedProcess(
  ResultCode SandboxWin::StartSandboxedProcess(
      const base::CommandLine& cmd_line,
      const std::string& process_type,
@@ -684,7 +684,7 @@ index da5844e2ef28872d91f76ebbbaee3ca976304568..a4aaeaccb3cb73b7fc3244873d33af1a
      SandboxDelegate* delegate,
      base::Process* process) {
    const base::ElapsedTimer timer;
-@@ -987,13 +992,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
+@@ -993,13 +998,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
    // Avoid making a policy if we won't use it.
    if (IsUnsandboxedProcess(delegate->GetSandboxType(), cmd_line,
                             *base::CommandLine::ForCurrentProcess())) {

+ 8 - 8
patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

@@ -87,7 +87,7 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
   private:
    const HWND hwnd_;
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index ade4e4973a0e9bd47604262c76bfbd0ee3c9dc38..440fa0b3ff9b08016ff19ab54c70a453dc8c5f86 100644
+index 72d9d594a93700a35eadb3c2bc017fa7996bf10d..729753a72edd761ec831f79828742a26f9dd2417 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
 @@ -141,6 +141,8 @@ viz_component("service") {
@@ -197,7 +197,7 @@ index e82717d5167e13e2926bcaf6c0ad66c1502e66f6..783c4d6ed399120e026bbf18baab4092
    const raw_ptr<GpuServiceImpl> gpu_service_impl_;
  
 diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
-index 761eb3e14b5848463b8886a1d1ea2ac603e4f677..6e717449ca7b3b6cdb440f69f7d1c9565329eb1f 100644
+index 4ceb1a9d9f336f65e15831856d30b45af594dd0f..646ac22f074c3d1827e59170a93807bc10d83d0b 100644
 --- a/components/viz/service/display_embedder/software_output_device_mac.cc
 +++ b/components/viz/service/display_embedder/software_output_device_mac.cc
 @@ -106,6 +106,8 @@ void SoftwareOutputDeviceMac::UpdateAndCopyBufferDamage(
@@ -218,7 +218,7 @@ index 761eb3e14b5848463b8886a1d1ea2ac603e4f677..6e717449ca7b3b6cdb440f69f7d1c956
          IOSurfaceCreateMachPort(current_paint_buffer_->io_surface));
      client_->SoftwareDeviceUpdatedCALayerParams(ca_layer_params);
 diff --git a/components/viz/service/display_embedder/software_output_device_mac.h b/components/viz/service/display_embedder/software_output_device_mac.h
-index e12c1d87018a86d763f59e5ac62058cf815fce3a..01f8023811b49797674a0de6e32c358d965789d1 100644
+index 67d5ff67d74c107a867b39b306c6528425b87e05..5fd12a25c9e319e8e675955926271c9d1cd3a7ca 100644
 --- a/components/viz/service/display_embedder/software_output_device_mac.h
 +++ b/components/viz/service/display_embedder/software_output_device_mac.h
 @@ -62,6 +62,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceMac : public SoftwareOutputDevice {
@@ -514,10 +514,10 @@ index 796ae2688436eb07f19909641d1620dd02f10cdb..c9e0eee0b329caf46669b419b1cd10cf
    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 fe0cd60ba7d972ade4ba3cb0780117019ccea9cc..61ff833e649add942116371b012ec6b568bcfc44 100644
+index c70b0af70a68386c5d36833e621dd1b5cdc1522a..17e5c96cbb4ef2f575fd5ba7bd8b0c7bd58da5e7 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
-@@ -96,7 +96,8 @@ RootCompositorFrameSinkImpl::Create(
+@@ -97,7 +97,8 @@ RootCompositorFrameSinkImpl::Create(
        params->gpu_compositing, params->widget);
    auto output_surface = output_surface_provider->CreateOutputSurface(
        params->widget, params->gpu_compositing, display_client.get(),
@@ -556,10 +556,10 @@ index cc1ceb263a60b9bd743bd4166def23cd1c01b49f..d2c24bf0b674c5028e48c6b51f23d4a8
  
  }  // namespace viz
 diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
-index c86f1e090cb844fb555098d128391ae66de2d594..1f20ff61a66f9a269fe5d5257470ef99e11fa72c 100644
+index c34c0854efeec1ddddcd47fea40c9516f9c8dfaf..c27169973e2ac9b2faf802b9f35ed5c6d2b22543 100644
 --- a/content/browser/compositor/viz_process_transport_factory.cc
 +++ b/content/browser/compositor/viz_process_transport_factory.cc
-@@ -395,8 +395,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
+@@ -393,8 +393,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
    mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
    root_params->display_private =
        display_private.BindNewEndpointAndPassReceiver();
@@ -692,7 +692,7 @@ index 1944ef571b1f12fbee8dff553ad4de913c794efb..529296cbf858d2aaeb7b5fbe1ae8f36e
    float scale_factor;
  };
 diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
-index a4296b8e1084197830ca007bd91434607d766ec1..a93b7b04b538ccbba29a09aa2c3321d9a1835acd 100644
+index e1c6ed1b3a456b164945ee7eef34f9d4f0b80e07..87bff4350cdfcca97de6f66946b9cb6155e36634 100644
 --- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
 +++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
 @@ -52,6 +52,9 @@ bool StructTraits<gfx::mojom::CALayerParamsDataView, gfx::CALayerParams>::Read(

+ 2 - 2
patches/chromium/feat_ensure_mas_builds_of_the_same_application_can_use_safestorage.patch

@@ -12,7 +12,7 @@ We attempt to migrate the safe storage key from the old account, if that migrati
 Existing apps that aren't built for the app store should be unimpacted, there is one edge case where a user uses BOTH an AppStore and a darwin build of the same app only one will keep it's access to the safestorage key as during the migration we delete the old account.  This is an acceptable edge case as no one should be actively using two versions of the same app.
 
 diff --git a/components/os_crypt/sync/keychain_password_mac.mm b/components/os_crypt/sync/keychain_password_mac.mm
-index f6269925af68ce3ef9fb684bf4a1662874becae9..8c5e7cbb37b03e8c296590cd3b41aa6524f654ff 100644
+index a6b736f8be0fb24bd61f291ca60c1a9ccae30db7..edab197b5729c5b25599bba411c25bac6ed02827 100644
 --- a/components/os_crypt/sync/keychain_password_mac.mm
 +++ b/components/os_crypt/sync/keychain_password_mac.mm
 @@ -22,6 +22,12 @@
@@ -62,7 +62,7 @@ index f6269925af68ce3ef9fb684bf4a1662874becae9..8c5e7cbb37b03e8c296590cd3b41aa65
 +
 +  // If the suffixed account didn't exist, we should check if the legacy non-suffixed account
 +  // exists. If it does we can use that key and migrate it to the new account
-+  base::ScopedCFTypeRef<SecKeychainItemRef> item_ref;
++  base::apple::ScopedCFTypeRef<SecKeychainItemRef> item_ref;
 +  error = keychain_.FindGenericPassword(
 +      service_name.size(), service_name.c_str(),
 +      account_name.size(), account_name.c_str(), &password_length,

+ 9 - 9
patches/chromium/feat_expose_raw_response_headers_from_urlloader.patch

@@ -17,7 +17,7 @@ headers, moving forward we should find a way in upstream to provide
 access to these headers for loader clients created on the browser process.
 
 diff --git a/services/network/public/cpp/resource_request.cc b/services/network/public/cpp/resource_request.cc
-index d5239af9a83d408ed8e6e71daa3e2458318ed0df..2fdaf6813ccec6e7cba074ffd7e3c01ff7966cac 100644
+index 14049395fbc56fbb4b755da918cc82a9b3e024d4..c9db1f47dca8d166ec6b4391059c3ffbbeff31b4 100644
 --- a/services/network/public/cpp/resource_request.cc
 +++ b/services/network/public/cpp/resource_request.cc
 @@ -151,6 +151,7 @@ ResourceRequest::TrustedParams& ResourceRequest::TrustedParams::operator=(
@@ -37,7 +37,7 @@ index d5239af9a83d408ed8e6e71daa3e2458318ed0df..2fdaf6813ccec6e7cba074ffd7e3c01f
           allow_cookies_from_browser == other.allow_cookies_from_browser &&
           client_security_state == other.client_security_state;
 diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
-index bf16ec49862bd3c13e052a737ffd1a7f258cb124..5d7f4708b41bc40eacd3a1a6282cf62aa72c65f8 100644
+index facf69cab3dc0c21ca7eddb7f2828fa7765c5744..45d0bce5d469a977ae8dafe5129265dfd52beea5 100644
 --- a/services/network/public/cpp/resource_request.h
 +++ b/services/network/public/cpp/resource_request.h
 @@ -69,6 +69,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
@@ -49,7 +49,7 @@ index bf16ec49862bd3c13e052a737ffd1a7f258cb124..5d7f4708b41bc40eacd3a1a6282cf62a
      mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
      mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
 diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
-index f5e0f664fe4a1d90fc3667b40a61ba7234a21500..8a5c2902ab2614beb3a56db3f443bb264b7d311f 100644
+index a7fd270571a01ddaf2971ec1cdc845029bdf9a5e..fc567eeb9332ba7a4018bf51f2ef805e6a7bba71 100644
 --- a/services/network/public/cpp/url_request_mojom_traits.cc
 +++ b/services/network/public/cpp/url_request_mojom_traits.cc
 @@ -93,6 +93,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
@@ -61,7 +61,7 @@ index f5e0f664fe4a1d90fc3667b40a61ba7234a21500..8a5c2902ab2614beb3a56db3f443bb26
        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 f6c5b4ac1080322100271ab79cee1f0c91991842..532cdbf4275db4c8ccc7ddae8ef6b8338d85662c 100644
+index aa9a2bffeb7d5c318fe0a094e82ad43a78c8cc9a..97dfddac3d1b520f025a2b50f55519e0295fa612 100644
 --- a/services/network/public/cpp/url_request_mojom_traits.h
 +++ b/services/network/public/cpp/url_request_mojom_traits.h
 @@ -73,6 +73,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
@@ -76,7 +76,7 @@ index f6c5b4ac1080322100271ab79cee1f0c91991842..532cdbf4275db4c8ccc7ddae8ef6b833
    cookie_observer(
        const network::ResourceRequest::TrustedParams& trusted_params) {
 diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
-index f55d482a500ee65b8bb738032b6afd3201d26fb3..e6d21f25c63710f0615ec6dd29635173fd7b5dc9 100644
+index ce3b7cef16884a6689fea06907d346452e754925..41c7ae0e74b9dfc65c82141e64b4652d735465da 100644
 --- a/services/network/public/mojom/url_request.mojom
 +++ b/services/network/public/mojom/url_request.mojom
 @@ -74,6 +74,9 @@ struct TrustedUrlRequestParams {
@@ -112,7 +112,7 @@ index d0df2913c2e5102cfd1e1ff140e6c95d168900bd..830f90a83774e32116757f8a3b959849
    string mime_type;
  
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index 7cc60e316295ce475cd538c5524a2cfe6d7efbf7..df25568fa6445b10e46601b37392ec9b0ef58130 100644
+index c509cb5af0a15979ea8044367e7b19ba61d09179..4ad8c5476cbf00a4246ec524e5d95037b06a7151 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
 @@ -623,6 +623,7 @@ URLLoader::URLLoader(
@@ -132,7 +132,7 @@ index 7cc60e316295ce475cd538c5524a2cfe6d7efbf7..df25568fa6445b10e46601b37392ec9b
      url_request_->SetResponseHeadersCallback(base::BindRepeating(
          &URLLoader::SetRawResponseHeaders, base::Unretained(this)));
    }
-@@ -1597,6 +1598,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
+@@ -1596,6 +1597,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
    }
  
    response_ = BuildResponseHead();
@@ -153,10 +153,10 @@ index 7cc60e316295ce475cd538c5524a2cfe6d7efbf7..df25568fa6445b10e46601b37392ec9b
  
    // 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 c79154651df14a6bebeb69907577e3d66754ddd8..b3e980b51000fc9068d80feec523cab167364859 100644
+index 5ac365a6aa5a1b3832312fe335bd6f7cf4def18f..6970066e65c6e61a6fed1248127abd6550ddfec6 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
-@@ -632,6 +632,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
+@@ -631,6 +631,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
    std::unique_ptr<ResourceScheduler::ScheduledResourceRequest>
        resource_scheduler_request_handle_;
  

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

@@ -7,7 +7,7 @@ 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 2c2c43cd4bdd49fbd674cb530b311cee2f1bb248..9ecfa7b46d8ec59ac566bb247847394b4579515c 100644
+index 814eab6a5e8c83cae50da2491398edf329ca1ed4..9cacf36eae623c4787d5cccef4bed0202bfd5d35 100644
 --- a/content/browser/media/capture/screen_capture_kit_device_mac.mm
 +++ b/content/browser/media/capture/screen_capture_kit_device_mac.mm
 @@ -170,7 +170,15 @@ void OnShareableContentCreated(SCShareableContent* content) {

+ 8 - 8
patches/chromium/fix_adapt_exclusive_access_for_electron_needs.patch

@@ -16,10 +16,10 @@ Linux or Windows to un-fullscreen in some circumstances without this
 change.
 
 diff --git a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
-index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8e47c91b8 100644
+index 3d9ccff4a6a70e97d90f461a92c204af9a8e0a4f..e2a5a1751a6496a0ed7854737056564c2046d436 100644
 --- a/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
 +++ b/chrome/browser/ui/exclusive_access/fullscreen_controller.cc
-@@ -15,12 +15,16 @@
+@@ -16,12 +16,16 @@
  #include "build/build_config.h"
  #include "chrome/browser/app_mode/app_mode_utils.h"
  #include "chrome/browser/profiles/profile.h"
@@ -36,7 +36,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
  #include "chrome/common/chrome_switches.h"
  #include "content/public/browser/fullscreen_types.h"
  #include "content/public/browser/navigation_details.h"
-@@ -176,10 +180,12 @@ void FullscreenController::EnterFullscreenModeForTab(
+@@ -177,10 +181,12 @@ void FullscreenController::EnterFullscreenModeForTab(
      return;
    }
  
@@ -49,7 +49,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
  
    // Keep the current state. |SetTabWithExclusiveAccess| may change the return
    // value of |IsWindowFullscreenForTabOrPending|.
-@@ -229,11 +235,13 @@ void FullscreenController::EnterFullscreenModeForTab(
+@@ -237,11 +243,13 @@ void FullscreenController::EnterFullscreenModeForTab(
  }
  
  void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
@@ -63,7 +63,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
  
    if (MaybeToggleFullscreenWithinTab(web_contents, false)) {
      // During tab capture of fullscreen-within-tab views, the browser window
-@@ -291,12 +299,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
+@@ -299,12 +307,14 @@ void FullscreenController::ExitFullscreenModeForTab(WebContents* web_contents) {
  void FullscreenController::FullscreenTabOpeningPopup(
      content::WebContents* opener,
      content::WebContents* popup) {
@@ -78,7 +78,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
  }
  
  void FullscreenController::OnTabDeactivated(
-@@ -466,18 +476,17 @@ void FullscreenController::EnterFullscreenModeInternal(
+@@ -474,18 +484,17 @@ void FullscreenController::EnterFullscreenModeInternal(
    // Do not enter fullscreen mode if disallowed by pref. This prevents the user
    // from manually entering fullscreen mode and also disables kiosk mode on
    // desktop platforms.
@@ -102,7 +102,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
    if (option == TAB) {
      url = GetRequestingOrigin();
      tab_fullscreen_ = true;
-@@ -510,6 +519,7 @@ void FullscreenController::EnterFullscreenModeInternal(
+@@ -518,6 +527,7 @@ void FullscreenController::EnterFullscreenModeInternal(
      if (!extension_caused_fullscreen_.is_empty())
        url = extension_caused_fullscreen_;
    }
@@ -110,7 +110,7 @@ index 4bac72a51952764c72679ad3b991f2828ef308f4..785f8f166620cc71ca3e464110ff29b8
  
    if (option == BROWSER)
      base::RecordAction(base::UserMetricsAction("ToggleFullscreen"));
-@@ -530,12 +540,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
+@@ -538,12 +548,12 @@ void FullscreenController::ExitFullscreenModeInternal() {
  
    toggled_into_fullscreen_ = false;
    started_fullscreen_transition_ = true;

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

@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
 Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
 
 diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
-index 2bd49672ebb2765e6fe4bc062f872de94a6c0af9..4e352bca9a73f4be12cdd54952265d89f85e6d75 100644
+index e91fb6b203b55d4937e9f4b4ed8fd5e8efb5aa10..855cb90260de04b90b8bbf4a8733e0869cda551d 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -7456,10 +7456,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
+@@ -7543,10 +7543,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
    if (IsForMhtmlSubframe())
      return origin_with_debug_info;
  
@@ -37,10 +37,10 @@ index 2bd49672ebb2765e6fe4bc062f872de94a6c0af9..4e352bca9a73f4be12cdd54952265d89
  }
  
 diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
-index 3ea1aa4a27018aa9c36b15fbb9e34849bdafbd8e..5f2b1369a14e2e7c49ebf34e2535a847933296bf 100644
+index 10282bf7372a07937d3aa15af6f3f7e767321df6..ae5cfc9bc17c7e8e9d1ab9134c95ff6413fe2017 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.h
 +++ b/content/browser/renderer_host/render_frame_host_impl.h
-@@ -2953,6 +2953,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
+@@ -2968,6 +2968,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
    // last committed document.
    CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
  
@@ -58,7 +58,7 @@ index 3ea1aa4a27018aa9c36b15fbb9e34849bdafbd8e..5f2b1369a14e2e7c49ebf34e2535a847
    // Sets a ResourceCache in the renderer. `this` must be active and there must
    // be no pending navigation. `remote` must have the same and process
    // isolation policy.
-@@ -3344,17 +3355,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
+@@ -3391,17 +3402,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
    // relevant.
    void ResetWaitingState();
  

+ 3 - 3
patches/chromium/fix_crash_when_saving_edited_pdf_files.patch

@@ -13,10 +13,10 @@ This patch can be removed should we choose to support chrome.fileSystem
 or support it enough to fix the crash.
 
 diff --git a/chrome/browser/resources/pdf/pdf_viewer.ts b/chrome/browser/resources/pdf/pdf_viewer.ts
-index b68423ffe09246ec7ba2935873774c7c452b5952..936ab4b4e12546ca93da27f264559c97f51509ae 100644
+index b9d1652cfc2628d1f9f98698e8fddbfbae62b4de..bc93b2d47c061538d30bc886709abcda5f2d6eb0 100644
 --- a/chrome/browser/resources/pdf/pdf_viewer.ts
 +++ b/chrome/browser/resources/pdf/pdf_viewer.ts
-@@ -895,26 +895,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
+@@ -898,26 +898,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
        dataArray = [result.dataToSave];
      }
  
@@ -48,7 +48,7 @@ index b68423ffe09246ec7ba2935873774c7c452b5952..936ab4b4e12546ca93da27f264559c97
    }
  
    /**
-@@ -1022,30 +1008,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
+@@ -1025,30 +1011,12 @@ export class PdfViewerElement extends PdfViewerBaseElement {
        fileName = fileName + '.pdf';
      }
  

+ 94 - 0
patches/chromium/fix_move_autopipsettingshelper_behind_branding_buildflag.patch

@@ -0,0 +1,94 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: deepak1556 <[email protected]>
+Date: Wed, 30 Aug 2023 15:56:53 +0900
+Subject: fix: move AutoPipSettingsHelper behind branding buildflag
+
+The class was added in https://chromium-review.googlesource.com/c/chromium/src/+/4688277
+which is primarily used for providing an overlay view in a PIP window
+to support content settings UI. The support pulls in chrome content settings
+and UI code which are not valid in the scope of Electron.
+
+diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
+index 0a58771f77f9fab4bd660191a1b2c612f7951858..a25feb97dfa1f7f5c0378cdac256a8de542f3b7d 100644
+--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
++++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc
+@@ -18,8 +18,10 @@
+ #include "ui/gfx/geometry/size.h"
+ #if !BUILDFLAG(IS_ANDROID)
+ #include "base/task/sequenced_task_runner.h"
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #include "chrome/browser/picture_in_picture/auto_picture_in_picture_tab_helper.h"
+ #include "chrome/browser/picture_in_picture/auto_pip_setting_helper.h"
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #include "third_party/blink/public/common/features.h"
+ #include "ui/views/view.h"
+ #endif  // !BUILDFLAG(IS_ANDROID)
+@@ -288,7 +290,7 @@ void PictureInPictureWindowManager::CloseWindowInternal() {
+   video_web_contents_observer_.reset();
+   pip_window_controller_->Close(false /* should_pause_video */);
+   pip_window_controller_ = nullptr;
+-#if !BUILDFLAG(IS_ANDROID)
++#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   auto_pip_setting_helper_.reset();
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ }
+@@ -299,8 +301,10 @@ void PictureInPictureWindowManager::DocumentWebContentsDestroyed() {
+   // contents, so we only need to forget the controller here when user closes
+   // the parent web contents with the PiP window open.
+   document_web_contents_observer_.reset();
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   // `setting_helper_` depends on the opener's WebContents.
+   auto_pip_setting_helper_.reset();
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   if (pip_window_controller_)
+     pip_window_controller_ = nullptr;
+ }
+@@ -318,6 +322,7 @@ std::unique_ptr<views::View> PictureInPictureWindowManager::GetOverlayView() {
+     return nullptr;
+   }
+ 
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   auto* const web_contents = pip_window_controller_->GetWebContents();
+ 
+   auto* auto_pip_tab_helper =
+@@ -339,6 +344,8 @@ std::unique_ptr<views::View> PictureInPictureWindowManager::GetOverlayView() {
+   }
+ 
+   return overlay_view;
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
++  return nullptr;
+ }
+ #endif  // !BUILDFLAG(IS_ANDROID)
+ 
+diff --git a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
+index 560f2901ef6860811c783c1eed9277223072aabf..f5a5e3d883e0186961bd5560b4429e19abf0df49 100644
+--- a/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
++++ b/chrome/browser/picture_in_picture/picture_in_picture_window_manager.h
+@@ -9,6 +9,7 @@
+ #include "base/memory/singleton.h"
+ #include "base/observer_list.h"
+ #include "base/observer_list_types.h"
++#include "build/branding_buildflags.h"
+ #include "build/build_config.h"
+ #include "third_party/abseil-cpp/absl/types/optional.h"
+ #include "third_party/blink/public/mojom/picture_in_picture_window_options/picture_in_picture_window_options.mojom.h"
+@@ -25,7 +26,9 @@ class Display;
+ }  // namespace display
+ 
+ #if !BUILDFLAG(IS_ANDROID)
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ class AutoPipSettingHelper;
++#endif
+ 
+ namespace views {
+ class View;
+@@ -193,7 +196,9 @@ class PictureInPictureWindowManager {
+ #if !BUILDFLAG(IS_ANDROID)
+   std::unique_ptr<DocumentWebContentsObserver> document_web_contents_observer_;
+ 
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   std::unique_ptr<AutoPipSettingHelper> auto_pip_setting_helper_;
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #endif  //! BUILDFLAG(IS_ANDROID)
+ 
+   raw_ptr<content::PictureInPictureWindowController, DanglingUntriaged>

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

@@ -15,10 +15,10 @@ node does not change in this case.
 chromium-bug: https://crbug.com/1369605
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.cc b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
-index 7f713269d7234448a7e59c8d3acdeeb74cb6a412..fe042289beb7d0239521f580aff9478a79719477 100644
+index b190c86708d5ae7f207bae3e923609814bf68a52..16395c4b5fd5262885118095784db820508087dd 100644
 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.cc
-@@ -1006,6 +1006,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
+@@ -1041,6 +1041,12 @@ RenderWidgetHostViewChildFrame::DidUpdateVisualProperties(
    return viz::ScopedSurfaceIdAllocator(std::move(allocation_task));
  }
  
@@ -32,10 +32,10 @@ index 7f713269d7234448a7e59c8d3acdeeb74cb6a412..fe042289beb7d0239521f580aff9478a
    if (!text_input_manager_)
      return ui::TEXT_INPUT_TYPE_NONE;
 diff --git a/content/browser/renderer_host/render_widget_host_view_child_frame.h b/content/browser/renderer_host/render_widget_host_view_child_frame.h
-index 1e9dcbb9f0a5e401a50d63be490755bc3eeaa1a3..1e2e0a321df6fe9dea4401ed327c93730a4fea07 100644
+index 648896b13ad4f811fdd196bd2fe5bdf62e7154ab..e2e3b414e73052b2b5b8e443ded18ae3f18fd916 100644
 --- a/content/browser/renderer_host/render_widget_host_view_child_frame.h
 +++ b/content/browser/renderer_host/render_widget_host_view_child_frame.h
-@@ -182,6 +182,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
+@@ -184,6 +184,8 @@ class CONTENT_EXPORT RenderWidgetHostViewChildFrame
    void DisableAutoResize(const gfx::Size& new_size) override;
    viz::ScopedSurfaceIdAllocator DidUpdateVisualProperties(
        const cc::RenderFrameMetadata& metadata) override;
@@ -45,10 +45,10 @@ index 1e9dcbb9f0a5e401a50d63be490755bc3eeaa1a3..1e2e0a321df6fe9dea4401ed327c9373
    // RenderFrameMetadataProvider::Observer implementation.
    void OnRenderFrameMetadataChangedBeforeActivation(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 61d985829d54e2f98351f39d1b58e5702f10fa79..6ee703fc50459901068c364a3a0ccd3a60ce28bb 100644
+index e2e7b3e5cf8f581adee596903fc19886a23832c1..dd060f4207516af6b7db21593dcbed3848d47409 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -8323,7 +8323,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
+@@ -8336,7 +8336,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
                          "WebContentsImpl::OnFocusedElementChangedInFrame",
                          "render_frame_host", frame);
    RenderWidgetHostViewBase* root_view =

+ 19 - 11
patches/chromium/fix_patch_out_profile_refs_in_accessibility_ui.patch

@@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
 to make it usable from Electron by removing Profile references.
 
 diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
-index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040dca65a99 100644
+index 2c8687d0df72572b8c628519b370d21d5390df56..1c9e6711a43f2630f4b264dfdc5404b0e5e2f1e2 100644
 --- a/chrome/browser/accessibility/accessibility_ui.cc
 +++ b/chrome/browser/accessibility/accessibility_ui.cc
 @@ -21,7 +21,10 @@
@@ -21,7 +21,15 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
  #include "chrome/common/pref_names.h"
  #include "chrome/common/webui_url_constants.h"
  #include "chrome/grit/accessibility_resources.h"
-@@ -50,9 +53,11 @@
+@@ -31,6 +34,7 @@
+ #include "content/public/browser/ax_event_notification_details.h"
+ #include "content/public/browser/ax_inspect_factory.h"
+ #include "content/public/browser/browser_accessibility_state.h"
++#include "content/public/browser/browser_context.h"
+ #include "content/public/browser/browser_thread.h"
+ #include "content/public/browser/favicon_status.h"
+ #include "content/public/browser/navigation_entry.h"
+@@ -50,9 +54,11 @@
  #include "ui/views/accessibility/view_accessibility.h"
  
  #if !BUILDFLAG(IS_ANDROID)
@@ -33,7 +41,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
  #include "ui/views/accessibility/widget_ax_tree_id_map.h"
  #include "ui/views/widget/widget.h"
  #include "ui/views/widget/widget_delegate.h"
-@@ -163,7 +168,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
+@@ -163,7 +169,7 @@ base::Value::Dict BuildTargetDescriptor(content::RenderViewHost* rvh) {
                                 accessibility_mode);
  }
  
@@ -42,7 +50,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
  base::Value::Dict BuildTargetDescriptor(Browser* browser) {
    base::Value::Dict target_data;
    target_data.Set(kSessionIdField, browser->session_id().id());
-@@ -197,7 +202,9 @@ void HandleAccessibilityRequestCallback(
+@@ -197,7 +203,9 @@ void HandleAccessibilityRequestCallback(
    DCHECK(ShouldHandleAccessibilityRequestCallback(path));
  
    base::Value::Dict data;
@@ -52,7 +60,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
    ui::AXMode mode =
        content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
    bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
-@@ -229,7 +236,7 @@ void HandleAccessibilityRequestCallback(
+@@ -229,7 +237,7 @@ void HandleAccessibilityRequestCallback(
    // enabled.
    data.Set(kViewsAccessibility, features::IsAccessibilityTreeForViewsEnabled());
  
@@ -61,7 +69,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
    data.Set(kInternal, show_internal ? kOn : kOff);
  
    base::Value::List page_list;
-@@ -265,11 +272,11 @@ void HandleAccessibilityRequestCallback(
+@@ -265,11 +273,11 @@ void HandleAccessibilityRequestCallback(
    data.Set(kPagesField, std::move(page_list));
  
    base::Value::List browser_list;
@@ -75,7 +83,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
    data.Set(kBrowsersField, std::move(browser_list));
  
    base::Value::List widgets_list;
-@@ -486,8 +493,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(
+@@ -486,8 +494,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(
  
    AllowJavascript();
    if (flag_name_str == kInternal) {
@@ -86,7 +94,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
      return;
    }
  
-@@ -591,8 +600,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
+@@ -591,8 +601,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
                       AXPropertyFilter::ALLOW_EMPTY);
    AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
  
@@ -99,7 +107,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
    std::string accessibility_contents =
        web_contents->DumpAccessibilityTree(internal, property_filters);
    result.Set(kTreeField, accessibility_contents);
-@@ -617,6 +630,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
+@@ -617,6 +631,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
                       AXPropertyFilter::ALLOW_EMPTY);
    AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
  
@@ -107,7 +115,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
    for (Browser* browser : *BrowserList::GetInstance()) {
      if (browser->session_id().id() == session_id) {
        base::Value::Dict result = BuildTargetDescriptor(browser);
-@@ -629,6 +643,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
+@@ -629,6 +644,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
        return;
      }
    }
@@ -115,7 +123,7 @@ index 2c8687d0df72572b8c628519b370d21d5390df56..ef5f7f226ce4b8dc7fd0923255b13040
  #endif  // !BUILDFLAG(IS_ANDROID)
    // No browser with the specified |session_id| was found.
    base::Value::Dict result;
-@@ -741,5 +756,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
+@@ -741,5 +757,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
  // static
  void AccessibilityUIMessageHandler::RegisterProfilePrefs(
      user_prefs::PrefRegistrySyncable* registry) {

+ 5 - 5
patches/chromium/fix_properly_honor_printing_page_ranges.patch

@@ -25,10 +25,10 @@ index c9a13aee1e64f359cd1d5c2e440b4df204420997..7790c311400fc84bfda6c99e1ebd8da7
    // Returns true if duplex mode is set.
    bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
 diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
-index 010c7ed3025172e1e5a60fb7c89c3ea7a38c3ba5..ce13929c3b9205b71eeae32aad89c92f00d6c8c0 100644
+index ee900c7541af99c61844920433ae39e2648ae90b..59137008aeddc03d60c58a463206dc91a0ef5c1f 100644
 --- a/printing/printing_context_mac.mm
 +++ b/printing/printing_context_mac.mm
-@@ -209,7 +209,8 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
+@@ -464,7 +464,8 @@ void ApplySystemPrintDialogData(
          !SetCollateInPrintSettings(settings_->collate()) ||
          !SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
          !SetOutputColor(static_cast<int>(settings_->color())) ||
@@ -38,7 +38,7 @@ index 010c7ed3025172e1e5a60fb7c89c3ea7a38c3ba5..ce13929c3b9205b71eeae32aad89c92f
        return OnError();
      }
    }
-@@ -362,6 +363,22 @@ bool IsIppColorModelColorful(mojom::ColorModel color_model) {
+@@ -617,6 +618,22 @@ void ApplySystemPrintDialogData(
    return PMSetCopies(print_settings, copies, false) == noErr;
  }
  
@@ -100,10 +100,10 @@ index 07847521e7217c78480205812a73cc89503c00d2..586e866ca7ec0eb0b573d23e3bd95792
    } else {
      // No need to bother, we don't know how many pages are available.
 diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
-index afa936ce95602d5e66189303a73d7824611187b3..89371a4f0d3216f21761adc51bdd2accec0c74a1 100644
+index e270fa36d775333aaa30f1ff0104062c544d1058..e4a6213e19e4f23834802784a43db22c9d02d891 100644
 --- a/ui/gtk/printing/print_dialog_gtk.cc
 +++ b/ui/gtk/printing/print_dialog_gtk.cc
-@@ -247,6 +247,24 @@ void PrintDialogGtk::UpdateSettings(
+@@ -245,6 +245,24 @@ void PrintDialogGtk::UpdateSettings(
  
    gtk_print_settings_set_n_copies(gtk_settings_, settings->copies());
    gtk_print_settings_set_collate(gtk_settings_, settings->collate());

+ 9 - 9
patches/chromium/fix_return_v8_value_from_localframe_requestexecutescript.patch

@@ -20,7 +20,7 @@ index 34777e89362b14587979cef76d8cd71b634cca8c..3d5e44883bab30eebdfaba70f3933435
        injector_->ExpectsResults(), injector_->ShouldWaitForPromise());
  }
 diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
-index 665b3a5cc00ad2c706454449dc8150c4b78a908f..e0b7bc6bd4af79e27e7c7fbedb317b42974452d2 100644
+index f9567d5b4794a9822aef3cf70c7bb6ca9112b87f..eb8b57532ef5a4cf88426289b988b1d6504f0bac 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
 @@ -442,6 +442,7 @@ class BLINK_EXPORT WebLocalFrame : public WebFrame {
@@ -64,10 +64,10 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
  
  #endif  // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index d50985b2e3fa32c54c2dc8612878cc30dcb2c76a..7d16f6d3eaf53dbd61a7403bfc43ef6f367d0189 100644
+index d9fc652cf843dd2d55b7a773fbad601b487a3464..1c0aba8067f31cf9f04adfbd7ffc1683eb032494 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -2792,6 +2792,7 @@ void LocalFrame::RequestExecuteScript(
+@@ -2793,6 +2793,7 @@ void LocalFrame::RequestExecuteScript(
      mojom::blink::EvaluationTiming evaluation_timing,
      mojom::blink::LoadEventBlockingOption blocking_option,
      WebScriptExecutionCallback callback,
@@ -75,7 +75,7 @@ index d50985b2e3fa32c54c2dc8612878cc30dcb2c76a..7d16f6d3eaf53dbd61a7403bfc43ef6f
      BackForwardCacheAware back_forward_cache_aware,
      mojom::blink::WantResultOption want_result_option,
      mojom::blink::PromiseResultOption promise_behavior) {
-@@ -2825,7 +2826,7 @@ void LocalFrame::RequestExecuteScript(
+@@ -2826,7 +2827,7 @@ void LocalFrame::RequestExecuteScript(
    PausableScriptExecutor::CreateAndRun(
        script_state, std::move(script_sources), execute_script_policy,
        user_gesture, evaluation_timing, blocking_option, want_result_option,
@@ -97,10 +97,10 @@ index eb4ce179cb09e28b97ad167b5b6d0e1c25e53c5f..a9cde93321e1afd18e3f742777b31112
                              mojom::blink::WantResultOption,
                              mojom::blink::PromiseResultOption);
 diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-index 4729006029227265160abcc32722d0bac3883bc6..28e232423e3ab46eb205af87a461806003ce04c5 100644
+index 4c6ff1ffc67aa6f514fcabb453f404704a6ab024..6e6407125232bc9a8c0d80725a95a9e901cda009 100644
 --- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
-@@ -936,6 +936,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
+@@ -937,6 +937,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
              std::move(callback).Run(value ? std::move(*value) : base::Value());
            },
            std::move(callback)),
@@ -204,10 +204,10 @@ index 1e4d9e098463d61dcab787afcc46fea63b27e012..3f1ebf493ddd7d1c209acee2fb1255a0
    const mojom::blink::UserActivationOption user_activation_option_;
    const mojom::blink::LoadEventBlockingOption blocking_option_;
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
-index 1a237daf5f5427089c2f7e1f5dbdd40b451f6b76..727a9a19ded880da22f5bea177b4c13c01f00c68 100644
+index ccbf9e325d2aefe460800b1e515fd99c807a047c..24e810c757f3277b02d023c0f9937726b4242ffd 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
-@@ -1116,14 +1116,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
+@@ -1118,14 +1118,15 @@ void WebLocalFrameImpl::RequestExecuteScript(
      mojom::blink::EvaluationTiming evaluation_timing,
      mojom::blink::LoadEventBlockingOption blocking_option,
      WebScriptExecutionCallback callback,
@@ -226,7 +226,7 @@ index 1a237daf5f5427089c2f7e1f5dbdd40b451f6b76..727a9a19ded880da22f5bea177b4c13c
  
  v8::MaybeLocal<v8::Value> WebLocalFrameImpl::CallFunctionEvenIfScriptDisabled(
 diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
-index d90e588509d4828cf6e5e23d6c8c2abda1d78ac7..d534322270537fcd6356cf7691ad739bc237ac9b 100644
+index 26cea964db8d59780e39d16537d82a5a80c3c95f..94aa3254df5faaa4e9b0a504dc89d13cd97c3518 100644
 --- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 +++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
 @@ -196,6 +196,7 @@ class CORE_EXPORT WebLocalFrameImpl final

+ 6 - 6
patches/chromium/fix_select_the_first_menu_item_when_opened_via_keyboard.patch

@@ -6,10 +6,10 @@ Subject: fix: select the first menu item when opened via keyboard
 This fixes an accessibility issue where the root view is 'focused' to the screen reader instead of the first menu item as with all other native menus. This patch will be upstreamed.
 
 diff --git a/ui/views/controls/menu/menu_controller.cc b/ui/views/controls/menu/menu_controller.cc
-index 4f3ec48c9bc07473a4085dddce6c7b9de1afdefe..c4b7beb3d551130caf87280233161afa23f94c95 100644
+index b02f25526d9cb6983a68a35df8c0700624eb7eb5..04f3c2b9ae8d509a90eb83d074d7a887c4faef2b 100644
 --- a/ui/views/controls/menu/menu_controller.cc
 +++ b/ui/views/controls/menu/menu_controller.cc
-@@ -564,6 +564,7 @@ void MenuController::Run(Widget* parent,
+@@ -565,6 +565,7 @@ void MenuController::Run(Widget* parent,
                           MenuAnchorPosition position,
                           bool context_menu,
                           bool is_nested_drag,
@@ -17,7 +17,7 @@ index 4f3ec48c9bc07473a4085dddce6c7b9de1afdefe..c4b7beb3d551130caf87280233161afa
                           gfx::NativeView native_view_for_gestures) {
    exit_type_ = ExitType::kNone;
    possible_drag_ = false;
-@@ -628,6 +629,14 @@ void MenuController::Run(Widget* parent,
+@@ -629,6 +630,14 @@ void MenuController::Run(Widget* parent,
    // Set the selection, which opens the initial menu.
    SetSelection(root, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
  
@@ -32,7 +32,7 @@ index 4f3ec48c9bc07473a4085dddce6c7b9de1afdefe..c4b7beb3d551130caf87280233161afa
    if (button_controller) {
      pressed_lock_ = button_controller->TakeLock(
          false, ui::LocatedEvent::FromIfValid(event));
-@@ -2256,19 +2265,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
+@@ -2253,19 +2262,15 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
      }
      item->GetSubmenu()->ShowAt(params);
  
@@ -58,7 +58,7 @@ index 4f3ec48c9bc07473a4085dddce6c7b9de1afdefe..c4b7beb3d551130caf87280233161afa
  
      item->GetSubmenu()->GetWidget()->SetNativeWindowProperty(
 diff --git a/ui/views/controls/menu/menu_controller.h b/ui/views/controls/menu/menu_controller.h
-index 4c3cda2db04002c65d1a0055214f2775f5678134..3f11ce3d1f9d843b24aec3a028e5ea64ca402024 100644
+index 97c1f62da483bc629a795534849729c273768f27..3278dc846135e20816ce1c76137e8806249f771e 100644
 --- a/ui/views/controls/menu/menu_controller.h
 +++ b/ui/views/controls/menu/menu_controller.h
 @@ -138,6 +138,7 @@ class VIEWS_EXPORT MenuController
@@ -157,7 +157,7 @@ index 2056016df30982e24d4d99271f59e0edb261a16a..2876d3ccedf0e9f041d3f3310cd596de
        absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
    void Cancel() override;
 diff --git a/ui/views/controls/menu/menu_runner_impl_cocoa.mm b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
-index 9d148ed4bd5f13c4a7e266e9c2992a7d33dcc494..3d2c8dbe1a28e35640c6599810b82d2a5fb2fa25 100644
+index f137d6f86aba7227440b06160d072fcc0578a736..45d1eaf4cd73c00e9ddd79499b351517a12958cb 100644
 --- a/ui/views/controls/menu/menu_runner_impl_cocoa.mm
 +++ b/ui/views/controls/menu/menu_runner_impl_cocoa.mm
 @@ -189,6 +189,7 @@

+ 3 - 3
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 b482d14598859535508154b0ddac22a2e44cc2b5..131ecb24d5ec2af4e420357512c35c4c2de807da 100644
+index 802e0ab8073b0709bd723c4d08eafbefef575592..93a6e16a3fee99c9c9d8e85f2a8e43bf7f1cbd17 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -4162,6 +4162,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -4161,6 +4161,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -20,7 +20,7 @@ index b482d14598859535508154b0ddac22a2e44cc2b5..131ecb24d5ec2af4e420357512c35c4c
  }
  
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index a5361ff2553c9e5c99a65a8f13eb3f5cded9fb78..0a26db1b85f97a811fc6ff3cb2dfcde77ff0e07b 100644
+index b3fb95c4bc6bfd5559c034ee5c946bd7d5a14050..36f3b03d11aada28be45a75e90054c8996ad0f33 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -311,6 +311,11 @@ class CONTENT_EXPORT ContentBrowserClient {

+ 3 - 3
patches/chromium/gin_enable_disable_v8_platform.patch

@@ -38,10 +38,10 @@ index c19eb72e8d37fe8145b813d07875addf793e12dc..a5db8841773618814ac90f740201d4d7
    // Returns whether `Initialize` has already been invoked in the process.
    // Initialization is a one-way operation (i.e., this method cannot return
 diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
-index f280373f29263c2d3481e701a38f98ba6557e71a..b5f427fcb7239ad864c43d5df6730d564aadb414 100644
+index 3cdcb02e89c5ea6a6cfdf79e81c23d3d5b10b195..ff5d9e16b3b33c6f2895691356b90c8210e927d9 100644
 --- a/gin/v8_initializer.cc
 +++ b/gin/v8_initializer.cc
-@@ -424,7 +424,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
+@@ -428,7 +428,8 @@ void SetFlags(IsolateHolder::ScriptMode mode,
  // static
  void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
                                 const std::string js_command_line_flags,
@@ -51,7 +51,7 @@ index f280373f29263c2d3481e701a38f98ba6557e71a..b5f427fcb7239ad864c43d5df6730d56
    static bool v8_is_initialized = false;
    if (v8_is_initialized)
      return;
-@@ -434,7 +435,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
+@@ -438,7 +439,8 @@ void V8Initializer::Initialize(IsolateHolder::ScriptMode mode,
    // See https://crbug.com/v8/11043
    SetFlags(mode, js_command_line_flags);
  

+ 3 - 3
patches/chromium/gpu_notify_when_dxdiag_request_fails.patch

@@ -40,10 +40,10 @@ index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c403
    // Called from BrowserMainLoop::PostCreateThreads().
    // TODO(content/browser/gpu/OWNERS): This should probably use a
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
-index 019554cca7d25be443b75271278865e09a763a31..cc7e01260891c5d42ef590b040209f01943e1feb 100644
+index 6831a7207aa2e02ea88673cd69cfe50f31c1682c..2ebd7dcbffed67caa5b625fa57332904c7e443fc 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.cc
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
-@@ -1199,6 +1199,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
+@@ -1222,6 +1222,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
    if (host)
      host->ForceShutdown();
  }
@@ -57,7 +57,7 @@ index 019554cca7d25be443b75271278865e09a763a31..cc7e01260891c5d42ef590b040209f01
  
  void GpuDataManagerImplPrivate::PostCreateThreads() {
 diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
-index 790e72f12c7f1cf6e49d2a51949769a5d14bd4db..e02c3033231f93792fe2b456c08cfc2ac0f3d49e 100644
+index 6d5e9789ad9eab175087cc6bd30100d83d90a13b..d1946374205973cf2856acf4fe81fbe7c62c923e 100644
 --- a/content/browser/gpu/gpu_data_manager_impl_private.h
 +++ b/content/browser/gpu/gpu_data_manager_impl_private.h
 @@ -86,6 +86,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {

+ 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 85c7d3e22358d4aeae011f67b8113fe5b62f9ff9..45354344860b90b4a8ba09a30c761e8fe20e5431 100644
+index e65fe348a1b7eaed2871cc811cb8c7a40dc9f92b..d86e9e965b3e5b47faad4a2bae390aca98285b86 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -1205,6 +1205,11 @@
+@@ -1213,6 +1213,11 @@
      "includes": [7440],
    },
  

+ 1 - 1
patches/chromium/hack_plugin_response_interceptor_to_point_to_electron.patch

@@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
 implementation instead.
 
 diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
-index d8616c3d0e0f2c7a564521479d0013b5580b762d..44c3625a27a0cc4846cdec0e14b3cd0b0a42dfc4 100644
+index f55dc18e1870bf19c07d212dfdfb5d401046ae93..a426d68a65054cf2f0007c93100530bb75aeb558 100644
 --- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 +++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
 @@ -10,8 +10,8 @@

+ 2 - 2
patches/chromium/hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch

@@ -11,10 +11,10 @@ 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 033c425f5344b930735f91b3b4e0569d17eaf779..4a4c5f45b7e17815e170d88c98f24c1ac650c459 100755
+index 82f9c4f1b8638e6b89e433fc90aa615dbd173102..51bff03f80645781620335eb42146eb4b856f238 100755
 --- a/tools/clang/scripts/update.py
 +++ b/tools/clang/scripts/update.py
-@@ -306,6 +306,8 @@ def GetDefaultHostOs():
+@@ -307,6 +307,8 @@ def GetDefaultHostOs():
        'win32': 'win',
    }
    default_host_os = _PLATFORM_HOST_OS_MAP.get(sys.platform, sys.platform)

+ 2 - 2
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 fb665685e3539eb13cde9b213960156634f987b3..e95c5883df89ad119a7229198f628acd83386f70 100644
+index 348cf4c57ac478b6bd7fa34e526205314d6970bc..1e753b492b9ea186265d88d4dd589cc98b649e35 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,
+@@ -192,6 +192,7 @@ class OzonePlatformX11 : public OzonePlatform,
            base::MessagePumpType::UI;
        properties->supports_vulkan_swap_chain = true;
        properties->skia_can_fall_back_to_x11 = true;

+ 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 6cb42330a794c8cee18b65ef42c3b5388b61f8a0..a294093a5534d9602b76f8496e6d5f8d4b10c96e 100644
+index 11dcd5eaabaaba0e297ecb992d1290b3adaff1b1..2c8a95ce169f9c322b545a4426b8bec2964de2e5 100644
 --- a/content/app/content_main_runner_impl.cc
 +++ b/content/app/content_main_runner_impl.cc
 @@ -273,11 +273,8 @@ void LoadV8SnapshotFile(const base::CommandLine& command_line) {

+ 1 - 1
patches/chromium/logging_win32_only_create_a_console_if_logging_to_stderr.patch

@@ -9,7 +9,7 @@ be created for each child process, despite logs being redirected to a
 file.
 
 diff --git a/content/app/content_main.cc b/content/app/content_main.cc
-index 6c672cdc421bd1c5e49dab87dcf364625c522c72..0649533d9815d097fb7844c211826f7699488c89 100644
+index a3c00c974311753f1d308afef39ccda4fd8bf2ee..0ced0ad97f91e9217b1f5c8126bfb5746165afa6 100644
 --- a/content/app/content_main.cc
 +++ b/content/app/content_main.cc
 @@ -306,8 +306,12 @@ RunContentProcess(ContentMainParams params,

+ 1 - 1
patches/chromium/mas-cgdisplayusesforcetogray.patch

@@ -6,7 +6,7 @@ Subject: mas: avoid usage of CGDisplayUsesForceToGray
 Removes usage of the CGDisplayUsesForceToGray private API.
 
 diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
-index 370e0d24addbdd4989cac6dace70f1a9c6cea0fd..b647a2989911594a85a66b96ddca1533c96bd6e2 100644
+index 18d1dbbc6d15ea7191f8c48c30e692a59875df37..8997858f873901a7cc7fb922f322c0150a1716f3 100644
 --- a/ui/display/mac/screen_mac.mm
 +++ b/ui/display/mac/screen_mac.mm
 @@ -159,7 +159,17 @@ DisplayMac BuildDisplayForScreen(NSScreen* screen) {

+ 5 - 5
patches/chromium/mas_avoid_usage_of_private_macos_apis.patch

@@ -14,7 +14,7 @@ Disable usage of the following private APIs in MAS builds:
 * AudioDeviceDuck
 
 diff --git a/base/enterprise_util_mac.mm b/base/enterprise_util_mac.mm
-index fd14573e1617d397012e5bb54efb229415326cca..6d1f3ca0f81d8d79b0e6d436a3fdb741a2b8e7c3 100644
+index 1977180038a11c24b2d94f49be9f8cc42a9e4227..48c3f56946da59ea9d178fb6bd8df6cf4c798fbc 100644
 --- a/base/enterprise_util_mac.mm
 +++ b/base/enterprise_util_mac.mm
 @@ -113,6 +113,13 @@ MacDeviceManagementState IsDeviceRegisteredWithManagement() {
@@ -31,7 +31,7 @@ index fd14573e1617d397012e5bb54efb229415326cca..6d1f3ca0f81d8d79b0e6d436a3fdb741
  
      @autoreleasepool {
        ODSession* session = [ODSession defaultSession];
-@@ -219,5 +226,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
+@@ -221,5 +228,6 @@ DeviceUserDomainJoinState AreDeviceAndUserJoinedToDomain() {
  
    return state;
  }
@@ -99,7 +99,7 @@ index b267bc2272fa82334a70d897a900f1ea37b1a598..967e22699bf565368704972c021f9b42
      DPSXCHECK(responsibility_spawnattrs_setdisclaim(attr.get(), 1));
    }
 diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
-index 6e73be2bd964aa8cf743c1ae01ce8e188dbcac8e..58a7eb1e982a90d6197579ffdb9545340356a65c 100644
+index 9642854e237edff1020ec5cd54e2cbe6b9e85dd2..4e84d8b09787a8a4592b64622bb8a8ca78fbaf49 100644
 --- a/media/audio/mac/audio_low_latency_input_mac.cc
 +++ b/media/audio/mac/audio_low_latency_input_mac.cc
 @@ -31,19 +31,23 @@
@@ -155,12 +155,12 @@ index f52f1d1da4d431505b1a55df4764f37a70e0b29d..2406f5d4342dafc0d2c398f03ac23907
  
  // |error| is strerror(errno) when a P* logging function is called. Pass
 diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc
-index 175cbb4a23a4ab5f86c4bfa8158f8e0ada5454ed..ce44db60ba61394bbadacc4b85c94643a6e0261f 100644
+index eb81a70e4d5d5cd3e6ae9b45f8cd1c795ea76c51..dc30306f2c5d20503399fc3a8860773aa0044352 100644
 --- a/sandbox/mac/system_services.cc
 +++ b/sandbox/mac/system_services.cc
 @@ -9,6 +9,7 @@
  
- #include "base/mac/mac_logging.h"
+ #include "base/apple/osstatus_logging.h"
  
 +#if !IS_MAS_BUILD()
  extern "C" {

+ 8 - 8
patches/chromium/mas_disable_custom_window_frame.patch

@@ -7,10 +7,10 @@ Disable private window frame APIs (NSNextStepFrame and NSThemeFrame) for MAS
 build.
 
 diff --git a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
-index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3fb092f42 100644
+index 9db1a07aabdbc5ebcf5d971664a8783a3d4810a3..eed51d0af307a0bb1c6cbbcbe2dbd3c906d0999c 100644
 --- a/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
 +++ b/components/remote_cocoa/app_shim/browser_native_widget_window_mac.mm
-@@ -9,6 +9,7 @@
+@@ -10,6 +10,7 @@
  #include "components/remote_cocoa/app_shim/native_widget_ns_window_bridge.h"
  #include "components/remote_cocoa/common/native_widget_ns_window_host.mojom.h"
  
@@ -18,7 +18,7 @@ index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3
  @interface NSWindow (PrivateBrowserNativeWidgetAPI)
  + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
  @end
-@@ -69,10 +70,13 @@ - (BOOL)_shouldCenterTrafficLights {
+@@ -70,10 +71,13 @@ - (BOOL)_shouldCenterTrafficLights {
  
  @end
  
@@ -32,7 +32,7 @@ index b31c3be1895f7ca4a0f5c61f06a66eb1e1fbc5a6..ad4a1ecb02573bb5d34d134c61ec71f3
  + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
    // - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
    if ([BrowserWindowFrame class])
-@@ -87,6 +91,8 @@ - (BOOL)_usesCustomDrawing {
+@@ -120,6 +124,8 @@ - (BOOL)_usesCustomDrawing {
    return NO;
  }
  
@@ -75,7 +75,7 @@ index 3a815ebf505bd95fa7f6b61ba433d98fbfe20225..dbbebbdc1735bc14224dfcde0b7fe3a6
 +
  @end
 diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
-index 05a2f3730ea65510a9afc3522ededb1378232716..a5b4925530ce02d0f5bbe576a027d8dd893dd524 100644
+index 94ac4fa8db42cb70fa5032a0c1eeb10ad94b8d9a..048cfe7b16d74845492c9317f1ed9790fed36250 100644
 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
 +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.h
 @@ -17,6 +17,7 @@ class NativeWidgetNSWindowBridge;
@@ -95,7 +95,7 @@ index 05a2f3730ea65510a9afc3522ededb1378232716..a5b4925530ce02d0f5bbe576a027d8dd
  // The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
  // can only be accomplished by overriding methods.
 diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
-index a8c96509886c2b4c32b01524907edc9892709d9f..b5088a3217cb4a78c89526d3fc006431070ec959 100644
+index 517333705c9b68706159bff2396c3ba1f8dc1f55..f11ce18fb4d1567eb53e6b9272424eecb40e51e1 100644
 --- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
 +++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
 @@ -113,7 +113,9 @@ void OrderChildWindow(NSWindow* child_window,
@@ -126,7 +126,7 @@ index a8c96509886c2b4c32b01524907edc9892709d9f..b5088a3217cb4a78c89526d3fc006431
  @implementation NativeWidgetMacNSWindow {
   @private
    CommandDispatcher* __strong _commandDispatcher;
-@@ -401,6 +407,8 @@ - (NSAccessibilityRole)accessibilityRole {
+@@ -396,6 +402,8 @@ - (NSAccessibilityRole)accessibilityRole {
  
  // NSWindow overrides.
  
@@ -135,7 +135,7 @@ index a8c96509886c2b4c32b01524907edc9892709d9f..b5088a3217cb4a78c89526d3fc006431
  + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
    if (windowStyle & NSWindowStyleMaskTitled) {
      if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
-@@ -412,6 +420,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
+@@ -407,6 +415,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
    return [super frameViewClassForStyleMask:windowStyle];
  }
  

+ 23 - 23
patches/chromium/mas_disable_remote_accessibility.patch

@@ -43,10 +43,10 @@ index 5a096477c123a782341115f964c4975301ccaf9a..ecfbb3b405425af346a6ba6788fc1d8f
  
  }  // namespace
 diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
-index 40cc594101b8872b38b4c3bee31fcae5be5d9f3e..c9a73c823a8810daa140d88d6c36cc445f908a70 100644
+index 5855f1272c65fb5b6c0e6a5493aded657d2eb2e9..4b175b312907cce2b6ef8b6eaf05f84c2aefba5b 100644
 --- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
 +++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
-@@ -599,10 +599,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
+@@ -609,10 +609,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
    // this should be treated as an error and caught early.
    CHECK(bridged_view_);
  
@@ -60,7 +60,7 @@ index 40cc594101b8872b38b4c3bee31fcae5be5d9f3e..c9a73c823a8810daa140d88d6c36cc44
    // 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/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
-index 8fe41069ae9578a75469b40413b8e796792527cf..c5da46f4cc173eeb28c58bc464acd55ec9e4fc9e 100644
+index 76be676717e62c429319338c6115be89f2dfa424..18a5fd3c87b08c95d668b70c9b8f7a76413a75bb 100644
 --- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
 +++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
 @@ -86,8 +86,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -75,7 +75,7 @@ index 8fe41069ae9578a75469b40413b8e796792527cf..c5da46f4cc173eeb28c58bc464acd55e
  
    void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
 diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-index 45aeb6838a859f57287bec51f79a4eb77d69b619..6f5c28de251d4f6db9b07b37d0b513c2cc2826b3 100644
+index 5a6706495ed2a8f1cd781da9bde8572318bf6897..afd4d1f728a7f056e49b2ecb006c5a05388d3409 100644
 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
 +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
 @@ -21,7 +21,9 @@
@@ -104,27 +104,27 @@ index 45aeb6838a859f57287bec51f79a4eb77d69b619..6f5c28de251d4f6db9b07b37d0b513c2
  
        // Use native VoiceOver support for live regions.
        BrowserAccessibilityCocoa* retained_node = native_node;
-@@ -627,6 +631,7 @@ void PostAnnouncementNotification(NSString* announcement,
-   if ([NSApp isActive])
+@@ -632,6 +636,7 @@ void PostAnnouncementNotification(NSString* announcement,
      return window == [NSApp accessibilityFocusedWindow];
+   }
  
 +#if !IS_MAS_BUILD()
    // TODO(accessibility): We need a solution to the problem described below.
    // If the window is NSAccessibilityRemoteUIElement, there are some challenges:
    // 1. NSApp is the browser which spawned the PWA, and what it considers the
-@@ -654,6 +659,7 @@ void PostAnnouncementNotification(NSString* announcement,
-   // from within the app shim content.
-   if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]])
+@@ -660,6 +665,7 @@ void PostAnnouncementNotification(NSString* announcement,
+   if ([window isKindOfClass:[NSAccessibilityRemoteUIElement class]]) {
      return true;
+   }
 +#endif
  
    return false;
  }
 diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
-index 286881d3a0d369e4d4b2c8ef42eda410e1c41951..0e064b773319fbcc86bbc00df60b9919bf61a57c 100644
+index 3edad19a3ecbd27f54f1d17aca2e806fbbff05d4..1b4ed839f0d00334fd32a102be07be91516592d5 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.h
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
-@@ -49,7 +49,9 @@ class ScopedPasswordInputEnabler;
+@@ -50,7 +50,9 @@ class ScopedPasswordInputEnabler;
  
  @protocol RenderWidgetHostViewMacDelegate;
  
@@ -134,7 +134,7 @@ index 286881d3a0d369e4d4b2c8ef42eda410e1c41951..0e064b773319fbcc86bbc00df60b9919
  @class RenderWidgetHostViewCocoa;
  @class CursorAccessibilityScaleFactorObserver;
  
-@@ -672,9 +674,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
+@@ -675,9 +677,11 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
    // EnsureSurfaceSynchronizedForWebTest().
    uint32_t latest_capture_sequence_number_ = 0u;
  
@@ -147,10 +147,10 @@ index 286881d3a0d369e4d4b2c8ef42eda410e1c41951..0e064b773319fbcc86bbc00df60b9919
    // 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 a049d431b4657d17a23b2505666c84f94b20bc5e..701b2e4d9e91c138179fde12a21fccf53c02937b 100644
+index d7e190889ff678599410eef4c172f0a25e9837d0..3fb6ed640ee9d857f19b4d60b12047133e68f920 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -273,8 +273,10 @@
+@@ -278,8 +278,10 @@
  void RenderWidgetHostViewMac::MigrateNSViewBridge(
      remote_cocoa::mojom::Application* remote_cocoa_application,
      uint64_t parent_ns_view_id) {
@@ -161,7 +161,7 @@ index a049d431b4657d17a23b2505666c84f94b20bc5e..701b2e4d9e91c138179fde12a21fccf5
  
    // Reset `ns_view_` before resetting `remote_ns_view_` to avoid dangling
    // pointers. `ns_view_` gets reinitialized later in this method.
-@@ -1628,8 +1630,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1636,8 +1638,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -172,7 +172,7 @@ index a049d431b4657d17a23b2505666c84f94b20bc5e..701b2e4d9e91c138179fde12a21fccf5
    return [GetInProcessNSView() window];
  }
  
-@@ -1673,9 +1677,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1682,9 +1686,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -184,7 +184,7 @@ index a049d431b4657d17a23b2505666c84f94b20bc5e..701b2e4d9e91c138179fde12a21fccf5
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -2177,12 +2183,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -2186,12 +2192,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
      const std::vector<uint8_t>& window_token) {
@@ -200,10 +200,10 @@ index a049d431b4657d17a23b2505666c84f94b20bc5e..701b2e4d9e91c138179fde12a21fccf5
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index cda1666e0e360c3d92bfa84d9060b79760762915..22a11fe6cf0ee95e3535d46c80f77a25a5e550b3 100644
+index 323bd6f74158114f308a0daba06eec0c4ba15c14..9bb69e114fc6eed4db1921f2fa7b409013f9a4cd 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
-@@ -375,6 +375,13 @@ component("base") {
+@@ -377,6 +377,13 @@ component("base") {
      sources += [ "resource/resource_bundle_lacros.cc" ]
    }
  
@@ -238,7 +238,7 @@ index 835cce73b7ab8b38c37d3e2650e12303d9d918e3..4460a00497dfaee0ba90cd5d14888055
 +
  #endif  // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
 diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
-index 58f1b79111a0be5102976c3e257375c409c1c4be..be0306b98feb451fefeec70becbcf51612d22283 100644
+index 2daaf2b78b7a60d340c2ff1651f8b5450db4af0f..3080adea0402f9d57cbde5d4350605d463ee5c8e 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
 @@ -30,7 +30,9 @@
@@ -251,7 +251,7 @@ index 58f1b79111a0be5102976c3e257375c409c1c4be..be0306b98feb451fefeec70becbcf516
  @class NSView;
  
  namespace remote_cocoa {
-@@ -450,10 +452,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
+@@ -454,10 +456,12 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
    mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
        remote_ns_window_remote_;
  
@@ -265,7 +265,7 @@ index 58f1b79111a0be5102976c3e257375c409c1c4be..be0306b98feb451fefeec70becbcf516
    // Used to force the NSApplication's focused accessibility element to be the
    // views::Views accessibility tree when the NSView for this is focused.
 diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
-index 42b7016e880b26e2cc8b9da14917907d4826440c..f6b588c059d6706155144f3b0a9a8861d8f1146d 100644
+index 53bdb4d62294f128b8f4b7bdcddf1052e15f331f..d052f5bb619bf4092810c6d5dd489a38a60026b0 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 @@ -339,7 +339,11 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -292,7 +292,7 @@ index 42b7016e880b26e2cc8b9da14917907d4826440c..f6b588c059d6706155144f3b0a9a8861
  }
  
  remote_cocoa::mojom::NativeWidgetNSWindow*
-@@ -1326,20 +1334,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1353,20 +1361,24 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
      const std::vector<uint8_t>& window_token,
      const std::vector<uint8_t>& view_token) {

+ 11 - 11
patches/chromium/mas_disable_remote_layer.patch

@@ -16,11 +16,11 @@ cases where performance improves when disabling remote CoreAnimation (remote
 CoreAnimation is really only about battery usage).
 
 diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.h b/gpu/ipc/service/image_transport_surface_overlay_mac.h
-index ee83f9e5504eda6bd1ad80db7bd486934b7f3b6d..5db55a349f7eaf829d8458b279fd64f1f28a9a2c 100644
+index 655dca3b5628eae2d13bce22e24a517113701480..30b97c47b6804d5677f87a59d7d5c6028f6d4bf4 100644
 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.h
 +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.h
-@@ -24,7 +24,9 @@
- #include "gpu/ipc/service/gpu_vsync_mac.h"
+@@ -23,7 +23,9 @@
+ #include "ui/display/types/display_constants.h"
  #endif
  
 +#if !IS_MAS_BUILD()
@@ -41,10 +41,10 @@ index ee83f9e5504eda6bd1ad80db7bd486934b7f3b6d..5db55a349f7eaf829d8458b279fd64f1
  
    gfx::Size pixel_size_;
 diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
-index bd2f1d8a8d82456390a5efb641545e9177727542..c368baeb3b8141a84f461eff5bd84129dc26f0fd 100644
+index 40212e81a3c0303a9166426dd7349a95ffec39c4..b323a1f81f0e813b84ef98db9334d0c1992fbaa6 100644
 --- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
 +++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
-@@ -53,7 +53,9 @@
+@@ -54,7 +54,9 @@
  ImageTransportSurfaceOverlayMacEGL::ImageTransportSurfaceOverlayMacEGL(
      base::WeakPtr<ImageTransportSurfaceDelegate> delegate)
      : delegate_(delegate),
@@ -54,7 +54,7 @@ index bd2f1d8a8d82456390a5efb641545e9177727542..c368baeb3b8141a84f461eff5bd84129
        scale_factor_(1),
        weak_ptr_factory_(this) {
    static bool av_disabled_at_command_line =
-@@ -65,6 +67,7 @@
+@@ -66,6 +68,7 @@
             ->workarounds()
             .disable_av_sample_buffer_display_layer;
  
@@ -62,7 +62,7 @@ index bd2f1d8a8d82456390a5efb641545e9177727542..c368baeb3b8141a84f461eff5bd84129
    ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
        use_remote_layer_api_, allow_av_sample_buffer_display_layer);
  
-@@ -85,6 +88,10 @@
+@@ -86,6 +89,10 @@
  #endif
      ca_context_.layer = ca_layer_tree_coordinator_->GetCALayerForDisplay();
    }
@@ -70,10 +70,10 @@ index bd2f1d8a8d82456390a5efb641545e9177727542..c368baeb3b8141a84f461eff5bd84129
 +  ca_layer_tree_coordinator_ = std::make_unique<ui::CALayerTreeCoordinator>(
 +      /*allow_remote_layers=*/false, allow_av_sample_buffer_display_layer);
 +#endif
+ }
  
- #if BUILDFLAG(IS_MAC)
-   if (features::UseGpuVsync()) {
-@@ -176,9 +183,13 @@
+ ImageTransportSurfaceOverlayMacEGL::~ImageTransportSurfaceOverlayMacEGL() {
+@@ -203,9 +210,13 @@
      TRACE_EVENT_INSTANT2("test_gpu", "SwapBuffers", TRACE_EVENT_SCOPE_THREAD,
                           "GLImpl", static_cast<int>(gl::GetGLImplementation()),
                           "width", pixel_size_.width());
@@ -88,7 +88,7 @@ index bd2f1d8a8d82456390a5efb641545e9177727542..c368baeb3b8141a84f461eff5bd84129
            ca_layer_tree_coordinator_->GetIOSurfaceForDisplay();
        if (io_surface) {
 diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
-index cdcb1da0c11b07cce895369aba56b78623a0bef5..3765fb5106c8f2fbc1438ad759a173610b5db2aa 100644
+index 3ff04691217a6b3c9d7605c2e6b8f8a88959b271..0296ca57a4c51cb3e97c65d5aba46f33617cb799 100644
 --- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
 +++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
 @@ -120,6 +120,7 @@ - (void)setContentsChanged;

+ 3 - 3
patches/chromium/mas_no_private_api.patch

@@ -101,7 +101,7 @@ index a119b4439bfb9218c7aaf09dca8e78527da7f20d..faa813b003940280c6eeb87e70173019
  
  }  // namespace content
 diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
-index 4b1d57ef72d6a9235edc7a2591c8c3242c283235..680cf1ee57e0a9748a3b1efa93cb2d1569ac5655 100644
+index 82836fc5fe3a7279f4fd15f297969162bc63089a..4276251875612430d1b197578f659736dbd86925 100644
 --- a/device/bluetooth/bluetooth_adapter_mac.mm
 +++ b/device/bluetooth/bluetooth_adapter_mac.mm
 @@ -37,6 +37,7 @@
@@ -145,7 +145,7 @@ index 4b1d57ef72d6a9235edc7a2591c8c3242c283235..680cf1ee57e0a9748a3b1efa93cb2d15
  
  base::WeakPtr<BluetoothLowEnergyAdapterApple>
 diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
-index 2f7b9f4fb591f92fc570a271cf7e557f0dce00f7..209d356ea8562f5af4d64c9a7699a7c4f67526e2 100644
+index f834373f52a65b67fa0b601a18ac81044e66b0d2..5d7c4cf2fb323bdef2d5f671f96e2a4d6a7fff4f 100644
 --- a/media/audio/mac/audio_manager_mac.cc
 +++ b/media/audio/mac/audio_manager_mac.cc
 @@ -969,7 +969,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(
@@ -426,7 +426,7 @@ index 18479382a277cb2b25626ec8d31442bfd1377ee6..7d80d7fa8337523c3a70f317f883f0cc
        NOTREACHED();
        return nullptr;
 diff --git a/ui/accessibility/platform/inspect/ax_transform_mac.mm b/ui/accessibility/platform/inspect/ax_transform_mac.mm
-index 701b59231f2e5fbd31482775a248a0ff9755a480..271f9d1eebcf29aa7a8b98a0655038e75464a56b 100644
+index c737a2ca1afb44083aef33c6aa4518bea68d1aba..879f1357b5129849c5a1aa1731cf769712569e9e 100644
 --- a/ui/accessibility/platform/inspect/ax_transform_mac.mm
 +++ b/ui/accessibility/platform/inspect/ax_transform_mac.mm
 @@ -108,6 +108,7 @@

+ 2 - 2
patches/chromium/mas_use_public_apis_to_determine_if_a_font_is_a_system_font.patch

@@ -9,7 +9,7 @@ system font by checking if it's kCTFontPriorityAttribute is set to
 system priority.
 
 diff --git a/ui/gfx/platform_font_mac.mm b/ui/gfx/platform_font_mac.mm
-index 20abc5cbd3ab4a8a1a20390b1cfda49b6cf22f19..1e3deea10901f141a8672a5faad26a6a91fb19a8 100644
+index 342409c31eb73f4a13ac13a4740b32863f4ef0d6..a1b60a8f77fa4d32e07e6cda240447cf114e83cb 100644
 --- a/ui/gfx/platform_font_mac.mm
 +++ b/ui/gfx/platform_font_mac.mm
 @@ -28,9 +28,11 @@
@@ -26,7 +26,7 @@ index 20abc5cbd3ab4a8a1a20390b1cfda49b6cf22f19..1e3deea10901f141a8672a5faad26a6a
  
 @@ -245,7 +247,13 @@ CTFontRef SystemFontForConstructorOfType(PlatformFontMac::SystemFontType type) {
    // TODO(avi, etienneb): Figure out this font stuff.
-   base::ScopedCFTypeRef<CTFontDescriptorRef> descriptor(
+   base::apple::ScopedCFTypeRef<CTFontDescriptorRef> descriptor(
        CTFontCopyFontDescriptor(font));
 +#if IS_MAS_BUILD()
 +  CFNumberRef priority = (CFNumberRef)CTFontDescriptorCopyAttribute(descriptor.get(), (CFStringRef)kCTFontPriorityAttribute);

+ 9 - 9
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 c5f4244e73195a478be144fe02c11b19440521dd..46b6efb81e456d1f4543e21acbda669e89204e67 100644
+index f076c5dc62ca5975865e3966381257684503eeb8..cb05975b622eee25217d9f2477c5e53ace017db8 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 @@ -146,6 +146,11 @@
@@ -121,8 +121,8 @@ index c5f4244e73195a478be144fe02c11b19440521dd..46b6efb81e456d1f4543e21acbda669e
 +
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  
- NetworkContext::PendingCertVerify::PendingCertVerify() = default;
-@@ -781,6 +879,13 @@ void NetworkContext::SetClient(
+ NetworkContext::NetworkContextHttpAuthPreferences::
+@@ -824,6 +922,13 @@ void NetworkContext::SetClient(
    client_.Bind(std::move(client));
  }
  
@@ -136,7 +136,7 @@ index c5f4244e73195a478be144fe02c11b19440521dd..46b6efb81e456d1f4543e21acbda669e
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -2340,6 +2445,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -2383,6 +2488,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
          std::move(cert_verifier));
      cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_.get());
  #endif  // BUILDFLAG(IS_CHROMEOS)
@@ -147,7 +147,7 @@ index c5f4244e73195a478be144fe02c11b19440521dd..46b6efb81e456d1f4543e21acbda669e
  
    builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index b2b848b38840ba1205d376643735cedea77443a5..8b232e22bdeb5fdcd1033889d041b42c2bc68f5a 100644
+index d046d6909a9e648ddc86cbed9cb118d29223155e..25f9dab24b27ad2b3d6ca01690e9f5c3fea96d32 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -114,6 +114,7 @@ class URLMatcher;
@@ -167,7 +167,7 @@ index b2b848b38840ba1205d376643735cedea77443a5..8b232e22bdeb5fdcd1033889d041b42c
    void ResetURLLoaderFactories() override;
    void GetViaObliviousHttp(
        mojom::ObliviousHttpRequestPtr request,
-@@ -882,6 +885,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -896,6 +899,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::vector<base::OnceClosure> dismount_closures_;
  #endif  // BUILDFLAG(IS_DIRECTORY_TRANSFER_REQUIRED)
  
@@ -177,10 +177,10 @@ index b2b848b38840ba1205d376643735cedea77443a5..8b232e22bdeb5fdcd1033889d041b42c
    std::unique_ptr<HostResolver> internal_host_resolver_;
    // Map values set to non-null only if that HostResolver has its own private
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index e1385ffd429409aad74b73a1a7a1e7feea7181cd..e082a44bbeb6a99a6d1f0cbcc1be52646fc2c3b6 100644
+index 039407080ba9b234b0472afd7d56d44802fd3c0e..6ebade992b628fee18d23e5e29d2d7d6190261a7 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -311,6 +311,17 @@ struct NetworkContextFilePaths {
+@@ -317,6 +317,17 @@ struct NetworkContextFilePaths {
    bool trigger_migration = false;
  };
  
@@ -198,7 +198,7 @@ index e1385ffd429409aad74b73a1a7a1e7feea7181cd..e082a44bbeb6a99a6d1f0cbcc1be5264
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // The user agent string.
-@@ -922,6 +933,9 @@ interface NetworkContext {
+@@ -942,6 +953,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(pending_remote<NetworkContextClient> client);
  

+ 3 - 3
patches/chromium/notification_provenance.patch

@@ -133,10 +133,10 @@ index d0e0d10739b5daf99435a67e18dc51df8e670e09..704f3d6c2fdd27a84d1c4e1b7bf680f6
        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 e839fd0e67160d0b0c8ee9028e4b0200cc1f9647..3552da0688699735fdfb9ecab0d6adcfcc4061dd 100644
+index 522868ab9b0e6b26880d2b0cf9d446ffcccdbf94..d4532109047c928cbd69e042b020b334896c82d8 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2230,7 +2230,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -1967,7 +1967,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
      case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
@@ -145,7 +145,7 @@ index e839fd0e67160d0b0c8ee9028e4b0200cc1f9647..3552da0688699735fdfb9ecab0d6adcf
            creator_type, std::move(receiver));
        break;
      }
-@@ -2238,7 +2238,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -1975,7 +1975,7 @@ void RenderProcessHostImpl::CreateNotificationService(
        CHECK(rfh);
  
        storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

+ 31 - 0
patches/chromium/picture-in-picture.patch

@@ -8,6 +8,37 @@ chrome's generated resources for our own. This updates the #include so that we
 don't get errors for Chrome's generated resources, which are non-existent
 because we don't generate them in our build.
 
+diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
+index af0616d9ca466d146f3c41887857dd4720ebafbf..c088db193f5bd4b88aa42a3803571d2b87251b76 100644
+--- a/chrome/browser/ui/views/overlay/close_image_button.cc
++++ b/chrome/browser/ui/views/overlay/close_image_button.cc
+@@ -4,11 +4,14 @@
+ 
+ #include "chrome/browser/ui/views/overlay/close_image_button.h"
+ 
++#include "build/branding_buildflags.h"
+ #include "build/chromeos_buildflags.h"
+ #include "chrome/browser/ui/color/chrome_color_id.h"
+ #include "chrome/grit/generated_resources.h"
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #include "components/omnibox/browser/omnibox_field_trial.h"
+ #include "components/vector_icons/vector_icons.h"
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ #include "ui/base/l10n/l10n_util.h"
+ #include "ui/base/metadata/metadata_impl_macros.h"
+ #include "ui/base/models/image_model.h"
+@@ -28,9 +31,11 @@ CloseImageButton::CloseImageButton(PressedCallback callback)
+   SetSize(gfx::Size(kCloseButtonSize, kCloseButtonSize));
+ 
+   auto* icon = &views::kIcCloseIcon;
++#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   if (OmniboxFieldTrial::IsChromeRefreshIconsEnabled()) {
+     icon = &vector_icons::kCloseChromeRefreshIcon;
+   }
++#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+   SetImageModel(views::Button::STATE_NORMAL,
+                 ui::ImageModel::FromVectorIcon(*icon, kColorPipWindowForeground,
+                                                kCloseButtonIconSize));
 diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
 index 9e5e40c912c00b70d921d422ce141cd9d4a5bcd3..25b4b9cd6d4d9ff8c48fac7d04385963463d00f5 100644
 --- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc

+ 10 - 10
patches/chromium/port_autofill_colors_to_the_color_pipeline.patch

@@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them.  This patch can be
 our autofill implementation to work like Chromium's.
 
 diff --git a/ui/color/color_id.h b/ui/color/color_id.h
-index ddb9d4bc0822577a313fb160a3a0a584f1b41e07..f54024d355d24e1780f77314160220e1fe08de3c 100644
+index 8a74fba9a68fc15899542da777140a9e45ea469c..08828dad209510d715f711280cc8b2836e4e84e9 100644
 --- a/ui/color/color_id.h
 +++ b/ui/color/color_id.h
-@@ -387,6 +387,10 @@
+@@ -407,6 +407,10 @@
    E_CPONLY(kColorScrollbarThumbInactive) \
    E_CPONLY(kColorScrollbarThumbPressed) \
    E_CPONLY(kColorScrollbarTrack) \
@@ -22,7 +22,7 @@ index ddb9d4bc0822577a313fb160a3a0a584f1b41e07..f54024d355d24e1780f77314160220e1
    E_CPONLY(kColorSegmentedButtonBorder) \
    E_CPONLY(kColorSegmentedButtonFocus) \
    E_CPONLY(kColorSegmentedButtonForegroundChecked) \
-@@ -487,6 +491,7 @@
+@@ -511,6 +515,7 @@
    E_CPONLY(kColorTreeNodeForeground) \
    E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
    E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
@@ -31,7 +31,7 @@ index ddb9d4bc0822577a313fb160a3a0a584f1b41e07..f54024d355d24e1780f77314160220e1
  
  #if BUILDFLAG(IS_CHROMEOS)
 diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
-index 86be2b39a384b22fbd45ed4cbc7ab9f127563771..82cbaeee444d1c140bac70bc308c4d7ce096329b 100644
+index f1aadfefe2b35ff4f292a04d834679e1c3fe89e9..7cb39e4059719a4fc323586e83aba47d4e91838d 100644
 --- a/ui/color/ui_color_mixer.cc
 +++ b/ui/color/ui_color_mixer.cc
 @@ -224,6 +224,17 @@ void AddUiColorMixer(ColorProvider* provider, const ColorProviderKey& key) {
@@ -61,7 +61,7 @@ index 86be2b39a384b22fbd45ed4cbc7ab9f127563771..82cbaeee444d1c140bac70bc308c4d7c
  }
  
 diff --git a/ui/color/win/native_color_mixers_win.cc b/ui/color/win/native_color_mixers_win.cc
-index c698b842b496db488e9fd17a180d339ed5073a6c..8fc856f69cc6bbf06382c1873e9327255feeb8b6 100644
+index d9df0c0be6abf72c4756fb8e0f1e4b8c308a09f3..07ad3bf7e422272f017695c8b0e0aebedb8d8330 100644
 --- a/ui/color/win/native_color_mixers_win.cc
 +++ b/ui/color/win/native_color_mixers_win.cc
 @@ -202,6 +202,10 @@ void AddNativeUiColorMixer(ColorProvider* provider,
@@ -75,23 +75,23 @@ index c698b842b496db488e9fd17a180d339ed5073a6c..8fc856f69cc6bbf06382c1873e932725
  
    // Window Background
    mixer[kColorBubbleFooterBackground] = {kColorNativeWindow};
-@@ -210,6 +214,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
-   mixer[kColorFrameInactive] = {ui::kColorNativeWindow};
+@@ -211,6 +215,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+   mixer[kColorFrameInactive] = {kColorNativeWindow};
    mixer[kColorPrimaryBackground] = {kColorNativeWindow};
    mixer[kColorTooltipBackground] = {kColorNativeWindow};
 +  mixer[kColorResultsTableNormalBackground] = {kColorNativeWindow};
  
    // Window Text
    mixer[kColorAlertLowSeverity] = {kColorNativeWindowText};
-@@ -223,6 +228,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+@@ -225,6 +230,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
    mixer[kColorTableGroupingIndicator] = {kColorNativeWindowText};
    mixer[kColorThrobber] = {kColorNativeWindowText};
    mixer[kColorTooltipForeground] = {kColorNativeWindowText};
 +  mixer[kColorResultsTableNormalText] = {kColorNativeWindowText};
  
    // Hyperlinks
-   mixer[kColorLinkForegroundDefault] = {kColorNativeHotlight};
-@@ -265,6 +271,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
+   mixer[kColorForcedHotlight] = {kColorNativeHotlight};
+@@ -271,6 +277,7 @@ void AddNativeUiColorMixer(ColorProvider* provider,
    mixer[kColorTextfieldForeground] = {kColorNativeBtnText};
    mixer[kColorTextfieldForegroundPlaceholder] = {kColorNativeBtnText};
    mixer[kColorTextfieldForegroundDisabled] = {kColorNativeBtnText};

+ 63 - 63
patches/chromium/printing.patch

@@ -11,10 +11,10 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index dc86196ebcb7bb630dc3ca5b7e78244ae1e5ddd5..3e2cf78dc14a1d4b3d23ec9db4418a132c8b9df2 100644
+index e8c8a8450ff8325905a76addc262a6fd68f037be..e703690f0f0952d7f97cde04e7c2c786ab1747ec 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -966,7 +966,6 @@ if (is_win) {
+@@ -973,7 +973,6 @@ if (is_win) {
        "//media:media_unittests",
        "//media/midi:midi_unittests",
        "//net:net_unittests",
@@ -22,7 +22,7 @@ index dc86196ebcb7bb630dc3ca5b7e78244ae1e5ddd5..3e2cf78dc14a1d4b3d23ec9db4418a13
        "//sql:sql_unittests",
        "//third_party/breakpad:symupload($host_toolchain)",
        "//ui/base:ui_base_unittests",
-@@ -975,6 +974,10 @@ if (is_win) {
+@@ -982,6 +981,10 @@ if (is_win) {
        "//ui/views:views_unittests",
        "//url:url_unittests",
      ]
@@ -34,7 +34,7 @@ index dc86196ebcb7bb630dc3ca5b7e78244ae1e5ddd5..3e2cf78dc14a1d4b3d23ec9db4418a13
  }
  
 diff --git a/chrome/browser/printing/print_job.cc b/chrome/browser/printing/print_job.cc
-index c27e2d50aa6cd45484c222221c6a8dda50baf8ff..43c48b75806bb08f3a4ea45689fe2469368cca4a 100644
+index 819ea8a1902bd4cbf52f6e52622203b34a096aae..c7111b8814cc9260de2201febdcaeb2f588e5d6a 100644
 --- a/chrome/browser/printing/print_job.cc
 +++ b/chrome/browser/printing/print_job.cc
 @@ -93,6 +93,7 @@ bool PrintWithReducedRasterization(PrefService* prefs) {
@@ -66,7 +66,7 @@ index c27e2d50aa6cd45484c222221c6a8dda50baf8ff..43c48b75806bb08f3a4ea45689fe2469
  #endif
  
    auto new_doc = base::MakeRefCounted<PrintedDocument>(std::move(settings),
-@@ -381,8 +381,10 @@ void PrintJob::StartPdfToEmfConversion(
+@@ -387,8 +387,10 @@ void PrintJob::StartPdfToEmfConversion(
  
    const PrintSettings& settings = document()->settings();
  
@@ -78,7 +78,7 @@ index c27e2d50aa6cd45484c222221c6a8dda50baf8ff..43c48b75806bb08f3a4ea45689fe2469
  
    using RenderMode = PdfRenderSettings::Mode;
    RenderMode mode = print_with_reduced_rasterization
-@@ -472,8 +474,10 @@ void PrintJob::StartPdfToPostScriptConversion(
+@@ -480,8 +482,10 @@ void PrintJob::StartPdfToPostScriptConversion(
    if (ps_level2) {
      mode = PdfRenderSettings::Mode::POSTSCRIPT_LEVEL2;
    } else {
@@ -91,7 +91,7 @@ index c27e2d50aa6cd45484c222221c6a8dda50baf8ff..43c48b75806bb08f3a4ea45689fe2469
                 : PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
    }
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fae20e3b22 100644
+index 666ee7afbd6425bab3da68d2367db99121268758..4553693807136a7bc580e35b85c5445468cbda20 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -23,7 +23,9 @@
@@ -209,7 +209,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    return true;
  }
  
-@@ -342,12 +373,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
+@@ -343,12 +374,13 @@ void PrintViewManagerBase::OnDidUpdatePrintableArea(
    }
    PRINTER_LOG(EVENT) << "Paper printable area updated for vendor id "
                       << print_settings->requested_media().vendor_id;
@@ -224,7 +224,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
      base::Value::Dict job_settings,
      std::unique_ptr<PrintSettings> print_settings,
      UpdatePrintSettingsCallback callback) {
-@@ -355,7 +387,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
+@@ -356,7 +388,8 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
    settings->pages = GetPageRangesFromJobSettings(job_settings);
    settings->params = mojom::PrintParams::New();
    RenderParamsFromPrintSettings(*print_settings, settings->params.get());
@@ -234,7 +234,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    if (!PrintMsgPrintParamsIsValid(*settings->params)) {
      mojom::PrinterType printer_type = static_cast<mojom::PrinterType>(
          *job_settings.FindInt(kSettingPrinterType));
-@@ -367,6 +400,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
+@@ -368,6 +401,10 @@ void PrintViewManagerBase::CompleteUpdatePrintSettings(
      return;
    }
  
@@ -245,7 +245,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    set_cookie(settings->params->document_cookie);
    std::move(callback).Run(std::move(settings));
  }
-@@ -502,7 +539,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
+@@ -503,7 +540,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
  void PrintViewManagerBase::ScriptedPrintReply(
      ScriptedPrintCallback callback,
      int process_id,
@@ -255,7 +255,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
  
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
-@@ -517,12 +555,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
+@@ -518,12 +556,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
      return;
    }
  
@@ -273,7 +273,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    }
  }
  
-@@ -650,10 +691,12 @@ void PrintViewManagerBase::DidPrintDocument(
+@@ -651,10 +692,12 @@ void PrintViewManagerBase::DidPrintDocument(
  void PrintViewManagerBase::GetDefaultPrintSettings(
      GetDefaultPrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -286,7 +286,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  #if BUILDFLAG(ENABLE_OOP_PRINTING)
    if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
  #if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
-@@ -705,10 +748,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -706,10 +749,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
      base::Value::Dict job_settings,
      UpdatePrintSettingsCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -299,7 +299,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  
    absl::optional<int> printer_type_value =
        job_settings.FindInt(kSettingPrinterType);
-@@ -719,6 +764,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -720,6 +765,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
  
    mojom::PrinterType printer_type =
        static_cast<mojom::PrinterType>(*printer_type_value);
@@ -307,7 +307,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    if (printer_type != mojom::PrinterType::kExtension &&
        printer_type != mojom::PrinterType::kPdf &&
        printer_type != mojom::PrinterType::kLocal) {
-@@ -738,6 +784,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -739,6 +785,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
      if (value > 0)
        job_settings.Set(kSettingRasterizePdfDpi, value);
    }
@@ -315,7 +315,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  
    std::unique_ptr<PrintSettings> print_settings =
        PrintSettingsFromJobSettings(job_settings);
-@@ -757,7 +804,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -758,7 +805,21 @@ void PrintViewManagerBase::UpdatePrintSettings(
      }
    }
  
@@ -338,7 +338,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    // TODO(crbug.com/1424368):  Remove this if the printable areas can be made
    // fully available from `PrintBackend::GetPrinterSemanticCapsAndDefaults()`
    // for in-browser queries.
-@@ -779,8 +840,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
+@@ -780,8 +841,6 @@ void PrintViewManagerBase::UpdatePrintSettings(
    }
  #endif
  
@@ -347,7 +347,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  }
  
  void PrintViewManagerBase::SetAccessibilityTree(
-@@ -796,7 +855,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
+@@ -797,7 +856,7 @@ void PrintViewManagerBase::SetAccessibilityTree(
  void PrintViewManagerBase::IsPrintingEnabled(
      IsPrintingEnabledCallback callback) {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -356,7 +356,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  }
  
  void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
-@@ -812,14 +871,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
+@@ -813,14 +872,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
      // didn't happen for some reason.
      bad_message::ReceivedBadMessage(
          render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
@@ -373,7 +373,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
      return;
    }
  #endif
-@@ -861,6 +920,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
+@@ -862,6 +921,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
  
    PrintManager::PrintingFailed(cookie, reason);
  
@@ -381,7 +381,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    // `PrintingFailed()` can occur because asynchronous compositing results
    // don't complete until after a print job has already failed and been
    // destroyed.  In such cases the error notification to the user will
-@@ -870,7 +930,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
+@@ -871,7 +931,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
        print_job_->document()->cookie() == cookie) {
      ShowPrintErrorDialogForGenericError();
    }
@@ -390,7 +390,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    ReleasePrinterQuery();
  }
  
-@@ -882,15 +942,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
+@@ -883,15 +943,24 @@ void PrintViewManagerBase::RemoveTestObserver(TestObserver& observer) {
    test_observers_.RemoveObserver(&observer);
  }
  
@@ -415,7 +415,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  }
  
  void PrintViewManagerBase::RenderFrameDeleted(
-@@ -942,7 +1011,12 @@ void PrintViewManagerBase::OnJobDone() {
+@@ -943,7 +1012,12 @@ void PrintViewManagerBase::OnJobDone() {
    // Printing is done, we don't need it anymore.
    // print_job_->is_job_pending() may still be true, depending on the order
    // of object registration.
@@ -429,7 +429,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    ReleasePrintJob();
  }
  
-@@ -951,9 +1025,10 @@ void PrintViewManagerBase::OnCanceling() {
+@@ -952,9 +1026,10 @@ void PrintViewManagerBase::OnCanceling() {
  }
  
  void PrintViewManagerBase::OnFailed() {
@@ -441,7 +441,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    TerminatePrintJob(true);
  }
  
-@@ -963,7 +1038,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
+@@ -964,7 +1039,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
  
    // Is the document already complete?
    if (print_job_->document() && print_job_->document()->IsComplete()) {
@@ -450,7 +450,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
      return true;
    }
  
-@@ -1011,7 +1086,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -1017,7 +1092,10 @@ bool PrintViewManagerBase::SetupNewPrintJob(
  
    // Disconnect the current `print_job_`.
    auto weak_this = weak_ptr_factory_.GetWeakPtr();
@@ -462,7 +462,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    if (!weak_this)
      return false;
  
-@@ -1032,7 +1110,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -1037,7 +1115,7 @@ bool PrintViewManagerBase::SetupNewPrintJob(
  #endif
    print_job_->AddObserver(*this);
  
@@ -471,7 +471,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    return true;
  }
  
-@@ -1100,6 +1178,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -1105,6 +1183,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
    }
  #endif
  
@@ -483,7 +483,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    if (!print_job_)
      return;
  
-@@ -1107,7 +1190,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -1112,7 +1195,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
      // printing_rfh_ should only ever point to a RenderFrameHost with a live
      // RenderFrame.
      DCHECK(rfh->IsRenderFrameLive());
@@ -492,7 +492,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    }
  
    print_job_->RemoveObserver(*this);
-@@ -1149,7 +1232,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
+@@ -1154,7 +1237,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
  }
  
  bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
@@ -501,7 +501,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
      return true;
  
    if (!cookie) {
-@@ -1295,7 +1378,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
+@@ -1300,7 +1383,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
  }
  
  void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
@@ -510,7 +510,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
  
    for (auto& observer : GetTestObservers()) {
      observer.OnPrintNow(rfh);
-@@ -1345,7 +1428,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
+@@ -1350,7 +1433,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
    set_analyzing_content(/*analyzing=*/false);
    if (!allowed || !printing_rfh_ || IsCrashed() ||
        !printing_rfh_->IsRenderFrameLive()) {
@@ -520,7 +520,7 @@ index 040a37a9eab2af1491f7f8f4dc2e6ed78ac1d20e..fe4b29c905d89d96e3abf163eb25d7fa
    }
    CompleteScriptedPrint(printing_rfh_, std::move(params), std::move(callback));
 diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
-index 9f62238a3f5a73219a604061e434c2a0400fba44..e46800600d53b3f0d1357eaa2fccd7d2e7c59251 100644
+index ae2339d1ab82bd7cfa971ed03a188cfc26d6e1c0..186414ee72c6b431b87b02623abd4d1903de812b 100644
 --- a/chrome/browser/printing/print_view_manager_base.h
 +++ b/chrome/browser/printing/print_view_manager_base.h
 @@ -44,6 +44,8 @@ namespace printing {
@@ -570,7 +570,7 @@ index 9f62238a3f5a73219a604061e434c2a0400fba44..e46800600d53b3f0d1357eaa2fccd7d2
   protected:
    explicit PrintViewManagerBase(content::WebContents* web_contents);
  
-@@ -277,6 +292,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
+@@ -281,6 +296,7 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
                                  bool success);
  #endif
    void CompleteUpdatePrintSettings(
@@ -578,7 +578,7 @@ index 9f62238a3f5a73219a604061e434c2a0400fba44..e46800600d53b3f0d1357eaa2fccd7d2
        base::Value::Dict job_settings,
        std::unique_ptr<PrintSettings> print_settings,
        UpdatePrintSettingsCallback callback);
-@@ -306,7 +322,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
+@@ -310,7 +326,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
    // Runs `callback` with `params` to reply to ScriptedPrint().
    void ScriptedPrintReply(ScriptedPrintCallback callback,
                            int process_id,
@@ -588,7 +588,7 @@ index 9f62238a3f5a73219a604061e434c2a0400fba44..e46800600d53b3f0d1357eaa2fccd7d2
  
    // Requests the RenderView to render all the missing pages for the print job.
    // No-op if no print job is pending. Returns true if at least one page has
-@@ -387,8 +404,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
+@@ -391,8 +408,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
    // The current RFH that is printing with a system printing dialog.
    raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
  
@@ -681,10 +681,10 @@ index ca71560874a0189068dd11fbc039f5673bf6bd96..a8551d95e64da2afbc1685b2df8f1fc3
                        mojom::PrintFailureReason reason) override;
  
 diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
-index 0f535d5dd1db2e538382a91a0cf06f37d6b4961f..8156c74ad9ffeabfc0d87570a2d2ae1304f1ffa7 100644
+index 3f9a514fb41d72c5d06de6ac989f9d7c0513a4e7..0e7ada9df962808dad7caf074a08ebdedbd45604 100644
 --- a/components/printing/common/print.mojom
 +++ b/components/printing/common/print.mojom
-@@ -302,7 +302,7 @@ union PrintWithParamsResult {
+@@ -300,7 +300,7 @@ union PrintWithParamsResult {
  interface PrintRenderFrame {
    // Tells the RenderFrame to switch the CSS to print media type, render every
    // requested page, and then switch back the CSS to display media type.
@@ -693,7 +693,7 @@ index 0f535d5dd1db2e538382a91a0cf06f37d6b4961f..8156c74ad9ffeabfc0d87570a2d2ae13
  
    // Requests the frame to be printed with specified parameters. This is used
    // to programmatically produce PDF by request from the browser (e.g. over
-@@ -396,7 +396,10 @@ interface PrintManagerHost {
+@@ -394,7 +394,10 @@ interface PrintManagerHost {
    // UI to the user to select the final print settings. If the user cancels or
    // an error occurs, return null.
    [Sync]
@@ -706,7 +706,7 @@ index 0f535d5dd1db2e538382a91a0cf06f37d6b4961f..8156c74ad9ffeabfc0d87570a2d2ae13
    // Tells the browser printing failed.
    PrintingFailed(int32 cookie, PrintFailureReason reason);
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e61dd25c0 100644
+index 658a3c59993ac30feaea4d86148ed5adc9dcbdb1..afa788bbefc8f814af9b70ff5b5ebbc86a1777cd 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -45,6 +45,7 @@
@@ -717,7 +717,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
  #include "printing/units.h"
  #include "services/metrics/public/cpp/ukm_source_id.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
-@@ -1318,14 +1319,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1322,14 +1323,14 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
    }
  
    print_in_progress_ = true;
@@ -734,7 +734,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
    if (!weak_this) {
      return;
    }
-@@ -1356,7 +1357,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
+@@ -1360,7 +1361,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
    receivers_.Add(this, std::move(receiver));
  }
  
@@ -743,16 +743,16 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
    ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
    if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
-@@ -1371,7 +1372,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+@@ -1375,7 +1376,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
    // plugin node and print that instead.
    auto plugin = delegate_->GetPdfElement(frame);
  
 -  Print(frame, plugin, PrintRequestType::kRegular);
 +  Print(frame, plugin, PrintRequestType::kRegular, silent, std::move(settings));
  
-   if (!render_frame_gone_) {
-     frame->DispatchAfterPrintEvent();
-@@ -1452,7 +1453,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
+   if (render_frame_gone_) {
+     return;
+@@ -1462,7 +1463,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
    }
  
    Print(frame, print_preview_context_.source_node(),
@@ -762,7 +762,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
    if (render_frame_gone_) {
      return;
    }
-@@ -1515,6 +1517,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
+@@ -1525,6 +1527,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value::Dict settings) {
    if (ipc_nesting_level_ > kAllowedIpcDepthForPrint)
      return;
  
@@ -771,17 +771,17 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
    print_preview_context_.OnPrintPreview();
  
  #if BUILDFLAG(IS_CHROMEOS_ASH)
-@@ -2145,7 +2149,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -2158,7 +2162,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
    }
  
    Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
 -        PrintRequestType::kRegular);
 +        PrintRequestType::kRegular, false /* silent */,
 +        base::Value::Dict() /* new_settings */);
-   // Check if |this| is still valid.
+   // Check if `this` is still valid.
    if (!weak_this) {
      return;
-@@ -2161,7 +2166,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -2174,7 +2179,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -792,7 +792,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -2169,7 +2176,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -2182,7 +2189,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    uint32_t expected_page_count = 0;
@@ -801,7 +801,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
      DidFinishPrinting(PrintingResult::kFailPrintInit);
      return;  // Failed to init print page settings.
    }
-@@ -2188,8 +2195,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -2201,8 +2208,15 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
          print_pages_params_->params->print_scaling_option;
  
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -815,10 +815,10 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
 +      print_settings = GetPrintSettingsFromUser(
          frame_ref.GetFrame(), node, expected_page_count, print_request_type);
 +    }
-     // Check if |this| is still valid.
+     // Check if `this` is still valid.
      if (!self)
        return;
-@@ -2433,35 +2447,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2446,35 +2460,47 @@ void PrintRenderFrameHelper::IPCProcessed() {
    }
  }
  
@@ -876,7 +876,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
      return false;
    }
  
-@@ -2566,7 +2592,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
+@@ -2579,7 +2605,7 @@ mojom::PrintPagesParamsPtr PrintRenderFrameHelper::GetPrintSettingsFromUser(
        std::move(params),
        base::BindOnce(
            [](base::OnceClosure quit_closure, mojom::PrintPagesParamsPtr* output,
@@ -886,7 +886,7 @@ index 8a510d66964572fab9facf34339239ba14028423..73ba3030b38af91e53fa2ac878fbcb5e
              std::move(quit_closure).Run();
            },
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index 731b0fa4c0e1b3a5b4ce73d5bf2322767c70f9be..58921e7fdb9c33e21694186f436f409f74c81c3a 100644
+index 8d65b7b6440c8e653eb1b3f9c50b40944b7ae61b..eb6b4a42d507ff216fc07328c1907815a082ef19 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
 @@ -247,7 +247,7 @@ class PrintRenderFrameHelper
@@ -927,10 +927,10 @@ index 731b0fa4c0e1b3a5b4ce73d5bf2322767c70f9be..58921e7fdb9c33e21694186f436f409f
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    // Set options for print preset from source PDF document.
 diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
-index aeda95912420895271ecdf1883f04da07b32296e..2f165461b7326b4e426d4b2552766896bb273c29 100644
+index 89b2e2bd7d6091501756b4d31726c49b00ffd0c7..718ad3e088f6730bb00f1e3674effae6c429b9b6 100644
 --- a/content/browser/BUILD.gn
 +++ b/content/browser/BUILD.gn
-@@ -2914,8 +2914,9 @@ source_set("browser") {
+@@ -2953,8 +2953,9 @@ source_set("browser") {
        "//ppapi/shared_impl",
      ]
  
@@ -943,7 +943,7 @@ index aeda95912420895271ecdf1883f04da07b32296e..2f165461b7326b4e426d4b2552766896
      if (is_chromeos) {
        sources += [
 diff --git a/printing/printing_context.cc b/printing/printing_context.cc
-index 370dedfb4b4649f85a02b3a50ee16f525f57f44a..256666b64d8ffb5b50c9424c40ae1bb4050da6fb 100644
+index 6aae8700c36346edfb44db0cec569efb3702cafe..75a5c89b8e0c916239b5f4fc1f062df4cd22733b 100644
 --- a/printing/printing_context.cc
 +++ b/printing/printing_context.cc
 @@ -143,7 +143,6 @@ void PrintingContext::UsePdfSettings() {
@@ -955,10 +955,10 @@ index 370dedfb4b4649f85a02b3a50ee16f525f57f44a..256666b64d8ffb5b50c9424c40ae1bb4
      std::unique_ptr<PrintSettings> settings =
          PrintSettingsFromJobSettings(job_settings);
 diff --git a/printing/printing_context.h b/printing/printing_context.h
-index 2fb3aef0797f204f08c20e48987cd8c2703185de..75a70e331f8b539027748dad3252912cb85e8797 100644
+index c753f04d8b73a51cb7e05dcdb86afc0e981e7a71..7ec1729e08bf42a51f80885b3838eee95c8bc953 100644
 --- a/printing/printing_context.h
 +++ b/printing/printing_context.h
-@@ -178,6 +178,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
+@@ -174,6 +174,9 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
  
    bool PrintingAborted() const { return abort_printing_; }
  
@@ -968,7 +968,7 @@ index 2fb3aef0797f204f08c20e48987cd8c2703185de..75a70e331f8b539027748dad3252912c
    int job_id() const { return job_id_; }
  
   protected:
-@@ -188,9 +191,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
+@@ -184,9 +187,6 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
    static std::unique_ptr<PrintingContext> CreateImpl(Delegate* delegate,
                                                       bool skip_system_calls);
  

+ 7 - 7
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -30,10 +30,10 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0
    // RenderWidgetHost on the primary main frame, and false otherwise.
    virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index 5e09ede19e2b54e806ae212cccb9c43c93439fbc..23bb2e702405d25df08d3c3bd194cca9f4857757 100644
+index 149ead7bbf52ad127747c5f80f0e35a13203502a..0f2a73f990fd41112d18ab6a9ed5bc43b90c235a 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -2120,6 +2120,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
+@@ -2121,6 +2121,9 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
    if (view_) {
      view_->UpdateCursor(cursor);
    }
@@ -44,7 +44,7 @@ index 5e09ede19e2b54e806ae212cccb9c43c93439fbc..23bb2e702405d25df08d3c3bd194cca9
  
  void RenderWidgetHostImpl::ShowContextMenuAtPoint(
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 278e45752fe57ea81a4d825d9dd528ca67265808..e3d811b00c799fba8aa9d52a9b437618e579e169 100644
+index 9bb752da088be1fae748430c69c39b7fa86cab08..5bcd634f1bd29a58cae240274269d952ef6570e9 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -4916,6 +4916,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
@@ -60,10 +60,10 @@ index 278e45752fe57ea81a4d825d9dd528ca67265808..e3d811b00c799fba8aa9d52a9b437618
      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 f4057f0dcbae2b0049267d27ac76f4ade77ce8dc..bb37b5101b6318b7b5c30097b501960399c77bb3 100644
+index 0af66596fac23874121745412e86e6e3231b5b68..79fdf08e7b434ca2dff16fd54207b5d20f5e1f9f 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -994,6 +994,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
+@@ -996,6 +996,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
    void SendScreenRects() override;
    void SendActiveState(bool active) override;
    TextInputManager* GetTextInputManager() override;
@@ -72,7 +72,7 @@ index f4057f0dcbae2b0049267d27ac76f4ade77ce8dc..bb37b5101b6318b7b5c30097b5019603
        RenderWidgetHostImpl* render_widget_host) override;
    bool IsShowingContextMenuOnPage() const override;
 diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
-index 73efe4a951d560e0f7a3d1271b6b7b18fb87b49c..952a56513e7c3f4db019964d8a90f604deaa498e 100644
+index c3d701fc68db0c02209b19598ffbf1c1bffe2a6d..615a31c3116c9c23a719f601764097a1442045a5 100644
 --- a/content/public/browser/web_contents_observer.h
 +++ b/content/public/browser/web_contents_observer.h
 @@ -30,6 +30,7 @@
@@ -83,7 +83,7 @@ index 73efe4a951d560e0f7a3d1271b6b7b18fb87b49c..952a56513e7c3f4db019964d8a90f604
  #include "ui/base/page_transition_types.h"
  #include "ui/base/window_open_disposition.h"
  
-@@ -571,6 +572,9 @@ class CONTENT_EXPORT WebContentsObserver {
+@@ -568,6 +569,9 @@ class CONTENT_EXPORT WebContentsObserver {
    // Invoked when the primary main frame changes size.
    virtual void PrimaryMainFrameWasResized(bool width_changed) {}
  

+ 4 - 4
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 c099a8701b7e0451207c21e6ebbe26eac65f0164..8a61b858c0c8a3fdd8522821a14fe369cea2d2fc 100644
+index 9dd7439e8c1c03c7dbc06045e11f73146bd087b4..1fc7bc9f735ec8820f4cd5db1ab5948f81ffa62e 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
-@@ -690,6 +690,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
+@@ -695,6 +695,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableForIOv2For(
    return false;
  }
  
@@ -24,7 +24,7 @@ index c099a8701b7e0451207c21e6ebbe26eac65f0164..8a61b858c0c8a3fdd8522821a14fe369
      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 22e67e69dc33a9372530783a3fd26523a4cdff01..24937e4173605c6e0802b7e37a0472704da6d99a 100644
+index 3b4461acc2fc65c539477dc75602e55282aaf77b..d23bb83bb2e4f0061d529b64f970acc220c8fb98 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -25,8 +25,11 @@
@@ -70,7 +70,7 @@ index 22e67e69dc33a9372530783a3fd26523a4cdff01..24937e4173605c6e0802b7e37a047270
    // This only needs to be overridden by RenderWidgetHostViewBase subclasses
    // that handle content embedded within other RenderWidgetHostViews.
    gfx::PointF TransformPointToRootCoordSpaceF(
-@@ -330,6 +338,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
+@@ -334,6 +342,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
    virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
                                     const ui::LatencyInfo& latency);
  

+ 4 - 4
patches/chromium/render_widget_host_view_mac.patch

@@ -10,7 +10,7 @@ kinds of utility windows. Similarly for `disableAutoHideCursor`.
 Additionally, disables usage of some private APIs in MAS builds.
 
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index 0bdd7c7813fdbbf148fe1fba2c38ef78d2923efc..c11453b8e3ce6345eead3b80c4f9036a1d07f5c7 100644
+index ecd17200be6a50c26642daa8964c526454414335..0e66bac2dce5ae1b30b782702e15b387b73b04b4 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
 @@ -157,6 +157,15 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -39,7 +39,7 @@ index 0bdd7c7813fdbbf148fe1fba2c38ef78d2923efc..c11453b8e3ce6345eead3b80c4f9036a
    return [self acceptsMouseEventsWhenInactive];
  }
  
-@@ -820,6 +832,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
+@@ -828,6 +840,10 @@ - (BOOL)shouldIgnoreMouseEvent:(NSEvent*)theEvent {
    // its parent view.
    BOOL hitSelf = NO;
    while (view) {
@@ -50,7 +50,7 @@ index 0bdd7c7813fdbbf148fe1fba2c38ef78d2923efc..c11453b8e3ce6345eead3b80c4f9036a
      if (view == self)
        hitSelf = YES;
      if ([view isKindOfClass:[self class]] && ![view isEqual:self] &&
-@@ -1139,6 +1155,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
+@@ -1157,6 +1173,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
                                eventType == NSEventTypeKeyDown &&
                                !(modifierFlags & NSEventModifierFlagCommand);
  
@@ -61,7 +61,7 @@ index 0bdd7c7813fdbbf148fe1fba2c38ef78d2923efc..c11453b8e3ce6345eead3b80c4f9036a
    // We only handle key down events and just simply forward other events.
    if (eventType != NSEventTypeKeyDown) {
      _hostHelper->ForwardKeyboardEvent(event, latency_info);
-@@ -1970,15 +1990,21 @@ - (NSAccessibilityRole)accessibilityRole {
+@@ -1987,15 +2007,21 @@ - (NSAccessibilityRole)accessibilityRole {
  // Since this implementation doesn't have to wait any IPC calls, this doesn't
  // make any key-typing jank. --hbono 7/23/09
  //

+ 3 - 3
patches/chromium/resource_file_conflict.patch

@@ -52,10 +52,10 @@ Some alternatives to this patch:
 None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
 
 diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
-index 4e128467f4e2e7ff17909d5d5176b867c188aa0b..07a98cf6892e7e1a81f15ccfd349012784ecf2b0 100644
+index bc54ace77cade8c2e2439af6d0c18984cfdaf5c6..41ce32113ec2679b76d5a4fd69a7109c832ac7a1 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1613,7 +1613,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1612,7 +1612,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 4e128467f4e2e7ff17909d5d5176b867c188aa0b..07a98cf6892e7e1a81f15ccfd3490127
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1642,6 +1642,12 @@ if (!is_android) {
+@@ -1641,6 +1641,12 @@ if (!is_android) {
    }
  }
  

+ 2 - 2
patches/chromium/scroll_bounce_flag.patch

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
 Patch to make scrollBounce option work.
 
 diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
-index d1f8638d390858b0872c56a62168acb7eef04db4..6193cefd3e98ca550dc3a5ac7b78925b89aebd71 100644
+index 328ed025f6b71c34f2855a5a2983dee7e7081c11..1ec54e2cdd24e5510d1081524554dbc05c256281 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1334,7 +1334,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
+@@ -1331,7 +1331,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 15 - 11
patches/chromium/short-circuit_permissions_checks_in_mediastreamdevicescontroller.patch

@@ -15,7 +15,7 @@ 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 efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032dfdc8285b5 100644
+index be66cc8226fa719645701d5cf708ae91c2bf823d..6cf82318db3cc74b2387cb76583284df5ddaed4a 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,
@@ -36,7 +36,7 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df
    content::PermissionController* permission_controller =
        web_contents->GetBrowserContext()->GetPermissionController();
  
-@@ -153,19 +155,25 @@ void MediaStreamDevicesController::RequestPermissions(
+@@ -153,21 +155,27 @@ void MediaStreamDevicesController::RequestPermissions(
        permission_types.push_back(blink::PermissionType::CAMERA_PAN_TILT_ZOOM);
      }
    }
@@ -50,7 +50,9 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df
 -  rfh->GetBrowserContext()
 -      ->GetPermissionController()
 -      ->RequestPermissionsFromCurrentDocument(
--          permission_types, rfh, request.user_gesture,
+-          rfh,
+-          content::PermissionRequestDescription(permission_types,
+-                                                request.user_gesture),
 -          base::BindOnce(
 -              &MediaStreamDevicesController::PromptAnsweredGroupedRequest,
 -              std::move(controller)));
@@ -59,17 +61,19 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df
 +                                              blink::mojom::PermissionStatus::GRANTED /*video*/});
 +  } else {
 +    rfh->GetBrowserContext()
-+    ->GetPermissionController()
-+    ->RequestPermissionsFromCurrentDocument(
-+        permission_types, rfh, request.user_gesture,
-+        base::BindOnce(
-+            &MediaStreamDevicesController::PromptAnsweredGroupedRequest,
-+            std::move(controller)));
++        ->GetPermissionController()
++        ->RequestPermissionsFromCurrentDocument(
++            rfh,
++            content::PermissionRequestDescription(permission_types,
++                                                  request.user_gesture),
++            base::BindOnce(
++                &MediaStreamDevicesController::PromptAnsweredGroupedRequest,
++                std::move(controller)));
 +  }
  }
  
  MediaStreamDevicesController::~MediaStreamDevicesController() {
-@@ -435,6 +443,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
+@@ -437,6 +445,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
      return false;
    }
  
@@ -77,7 +81,7 @@ index efbea8c15b096344b0cc65cc337a9cdbd727cb55..ca31bba7fc6daf68e6862554a70032df
    // TODO(raymes): This function wouldn't be needed if
    // PermissionManager::RequestPermissions returned a denial reason.
    content::PermissionResult result =
-@@ -445,6 +454,7 @@ bool MediaStreamDevicesController::PermissionIsBlockedForReason(
+@@ -447,6 +456,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 3552da0688699735fdfb9ecab0d6adcfcc4061dd..c240d818b3a8f93ccbf77cb74e48d271c82fa08a 100644
+index d4532109047c928cbd69e042b020b334896c82d8..b549e5795621e5493db5d23407b6d040f32c38cf 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -1915,9 +1915,15 @@ bool RenderProcessHostImpl::Init() {
+@@ -1652,9 +1652,15 @@ bool RenderProcessHostImpl::Init() {
      std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
          std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
              *cmd_line, IsPdf(), IsJitDisabled());

+ 2 - 2
patches/chromium/web_contents.patch

@@ -9,7 +9,7 @@ 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 2f2e089817f8b9392f0a793c3702d04f9ad5b97b..8d5a0e6aa6ea3a0965ed6abb76368d1f8e3ea91e 100644
+index 60d76d4ecf3bbda940f9a43d86259fcfd7d4a349..d4fc5a92413234196a531edc90aae66d3131b5fb 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -3324,6 +3324,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -35,7 +35,7 @@ index 2f2e089817f8b9392f0a793c3702d04f9ad5b97b..8d5a0e6aa6ea3a0965ed6abb76368d1f
    CHECK(view_.get());
  
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index f80a1a82e14a0c9f6c43897e649b60a87f5f5aa6..a58eb20fdd278fac7f89862a4817cbf57c6a0381 100644
+index f02cd75e7ad4c841e026309ec7ff35f242bffe16..ba00ce434e23aa899e048d388f4d67ec8ee6c0bb 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
 @@ -98,10 +98,13 @@ class BrowserContext;

+ 1 - 1
patches/chromium/webview_cross_drag.patch

@@ -8,7 +8,7 @@ This allows dragging and dropping between <webview>s.
 Originally landed in https://github.com/electron/libchromiumcontent/pull/267
 
 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
-index 8a6fd2e52b81f1f541d88c795fbc2697a58f0ea9..9d3efca9c19c9c97c636258017cc16c8bf94b5b1 100644
+index 7223c6518cc746cfc7d3ac0d9152321540fbd32c..1c23355d08f40055bae3ed90a46fb7241a71d7b1 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
 @@ -884,10 +884,7 @@ bool WebContentsViewAura::IsValidDragTarget(

+ 4 - 4
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 01eb116b51037bff5da7a87d119b78387f5e72c6..7ab5609215ce352b2595b4953e1b9ca027c62b47 100644
+index 586aa87098bd3db10440fe865a02c05e7b3be14f..cb372df065f83614ff6c2954035795e67eb69d0c 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -7281,6 +7281,17 @@ void RenderFrameHostImpl::EnterFullscreen(
+@@ -7417,6 +7417,17 @@ void RenderFrameHostImpl::EnterFullscreen(
      }
    }
  
@@ -37,7 +37,7 @@ index 01eb116b51037bff5da7a87d119b78387f5e72c6..7ab5609215ce352b2595b4953e1b9ca0
    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 8d5a0e6aa6ea3a0965ed6abb76368d1f8e3ea91e..61d985829d54e2f98351f39d1b58e5702f10fa79 100644
+index d4fc5a92413234196a531edc90aae66d3131b5fb..e2e7b3e5cf8f581adee596903fc19886a23832c1 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -3569,21 +3569,25 @@ KeyboardEventProcessingResult WebContentsImpl::PreHandleKeyboardEvent(
@@ -88,7 +88,7 @@ index 8d5a0e6aa6ea3a0965ed6abb76368d1f8e3ea91e..61d985829d54e2f98351f39d1b58e570
    // When WebView is the `delegate_` we can end up with VisualProperties changes
    // synchronously. Notify the view ahead so it can handle the transition.
 diff --git a/third_party/blink/renderer/core/fullscreen/fullscreen.cc b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
-index f58ade7ed652ea0d97c123dc78715c049cb5e500..6619207f2f8731a7d8e88d6c1613e77ca4abc558 100644
+index 32b4f5d0c0e75fc94d95298ef127c113330896b0..ae1b2ebef7c9620f465506a38855a585fd79ce48 100644
 --- a/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 +++ b/third_party/blink/renderer/core/fullscreen/fullscreen.cc
 @@ -99,7 +99,7 @@ void FullscreenElementChanged(Document& document,

+ 4 - 4
patches/chromium/worker_context_will_destroy.patch

@@ -26,10 +26,10 @@ index a4130ad4dc8158f8256b55fdd87f577687135626..3139aa65807cee23f0e8dbc85243566e
    // 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 321cfcb54a8dd80b12c741c9a8f20394aa004402..6f548767407d2e56ec259edf6d5103306e36233d 100644
+index 3206463a734a864e98a2ccdec14fa1f9a8df776a..8bc668a443fb33cb560e4c9592f53920869166c4 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -794,6 +794,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -795,6 +795,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -67,10 +67,10 @@ index 132096c44cf32d32f630a3d3ec941b1d79e4bb0e..f927a042a98cc4a94fa1a7c82346625f
        const WebSecurityOrigin& script_origin) {
      return false;
 diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
-index b52cbc1f1393551e95f885b415ae12a1c2d58ab0..3fbdd5054881fef201158a8b71279fadf1f87fe9 100644
+index 1073865e634bb5a435ec638a4abc14462e4b16cb..33408c339c21704c433377ed3c7462c7f4b0b8f3 100644
 --- a/third_party/blink/renderer/core/workers/worker_thread.cc
 +++ b/third_party/blink/renderer/core/workers/worker_thread.cc
-@@ -767,6 +767,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
+@@ -754,6 +754,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
    }
    pause_handle_.reset();
  

+ 2 - 2
patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch

@@ -35,10 +35,10 @@ index 3139aa65807cee23f0e8dbc85243566ef9de89b9..19707edb1283f2432f3c0059f80fabd5
    // 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 6f548767407d2e56ec259edf6d5103306e36233d..c4b490868e5c941461d422bbea3047438d6b476a 100644
+index 8bc668a443fb33cb560e4c9592f53920869166c4..8dbadf5b2dc233ea1f298c5ad26d5bf1ed0acc64 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -806,6 +806,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
+@@ -807,6 +807,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
        worker);
  }
  

+ 2 - 2
patches/devtools_frontend/fix_expose_globals_to_allow_patching_devtools_dock.patch

@@ -12,7 +12,7 @@ upstream a more durable approach to allowing us to do this, at which
 point this patch can be removed.
 
 diff --git a/front_end/entrypoints/shell/BUILD.gn b/front_end/entrypoints/shell/BUILD.gn
-index 72617d7036162ab3ab86c85df3f81b6e5a8c685d..aab471b56d785b372e5aa9aaddc792584700d16e 100644
+index 9b7c4251dde44c7e2ce76637515bb193a63427d8..76c2f924967df85d01ed41616609273adfad1342 100644
 --- a/front_end/entrypoints/shell/BUILD.gn
 +++ b/front_end/entrypoints/shell/BUILD.gn
 @@ -30,6 +30,7 @@ devtools_entrypoint("shell") {
@@ -24,7 +24,7 @@ index 72617d7036162ab3ab86c85df3f81b6e5a8c685d..aab471b56d785b372e5aa9aaddc79258
  
    visibility = [
 diff --git a/front_end/entrypoints/shell/shell.ts b/front_end/entrypoints/shell/shell.ts
-index b22591ee606ef449817aef1f9bd5ff0c024d1c05..a14c0e0a381ae838d44d4c7f2cc252c24380b602 100644
+index b1f0db6afb29188e4e69c5dd899523e836f9d253..4290e626fd875a50740bbd668ca11a4fef6ef8b5 100644
 --- a/front_end/entrypoints/shell/shell.ts
 +++ b/front_end/entrypoints/shell/shell.ts
 @@ -18,6 +18,7 @@ import '../../models/logs/logs-meta.js';

+ 47 - 7
patches/node/fix_crypto_tests_to_run_with_bssl.patch

@@ -419,20 +419,48 @@ index dd073274aef765e8f1e403aa2c8baf9694b521cb..fc6339e040debe61ecc61a3eb5b26823
    TEST_CASES.DiffieHellman = [common.hasOpenSSL3 ? 1024 : 256];
  }
  
+diff --git a/test/parallel/test-crypto-dh-curves.js b/test/parallel/test-crypto-dh-curves.js
+index 81a469c226c261564dee1e0b06b6571b18a41f1f..58b66045dba4201b7ebedd78b129420ffc316051 100644
+--- a/test/parallel/test-crypto-dh-curves.js
++++ b/test/parallel/test-crypto-dh-curves.js
+@@ -16,7 +16,7 @@ const p = 'FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74' +
+ crypto.createDiffieHellman(p, 'hex');
+ 
+ // Confirm DH_check() results are exposed for optional examination.
+-const bad_dh = crypto.createDiffieHellman('02', 'hex');
++const bad_dh = crypto.createDiffieHellman('abcd', 'hex', 0);
+ assert.notStrictEqual(bad_dh.verifyError, 0);
+ 
+ const availableCurves = new Set(crypto.getCurves());
 diff --git a/test/parallel/test-crypto-dh.js b/test/parallel/test-crypto-dh.js
-index c730eac4ce76dde880fe2b36b17414b0c311ac0b..ec5510778f4aa77c68d10d7cc56fd3a45091121c 100644
+index c730eac4ce76dde880fe2b36b17414b0c311ac0b..416cfa0ac019fe5eab696df36f6cc65e311bf20f 100644
 --- a/test/parallel/test-crypto-dh.js
 +++ b/test/parallel/test-crypto-dh.js
-@@ -49,7 +49,7 @@ for (const bits of [-1, 0, 1]) {
+@@ -47,17 +47,19 @@ for (const bits of [-1, 0, 1]) {
+     });
+   } else {
      assert.throws(() => crypto.createDiffieHellman(bits), {
-       code: 'ERR_OSSL_BN_BITS_TOO_SMALL',
+-      code: 'ERR_OSSL_BN_BITS_TOO_SMALL',
++      code: /ERR_OSSL_BN_BITS_TOO_SMALL|ERR_OSSL_DH_MODULUS_TOO_LARGE/,
        name: 'Error',
 -      message: /bits too small/,
-+      message: /bits too small|BITS_TOO_SMALL/,
++      message: /bits too small|BITS_TOO_SMALL|MODULUS_TOO_LARGE/,
      });
    }
  }
-@@ -65,7 +65,7 @@ for (const g of [-1, 1]) {
+ 
+-// Through a fluke of history, g=0 defaults to DH_GENERATOR (2).
+ {
+   const g = 0;
+-  crypto.createDiffieHellman('abcdef', g);
++  assert.throws(() => crypto.createDiffieHellman('abcdef', g), {
++    code: /INVALID_PARAMETERS/,
++    name: 'Error'
++  });
+   crypto.createDiffieHellman('abcdef', 'hex', g);
+ }
+ 
+@@ -65,13 +67,18 @@ for (const g of [-1, 1]) {
    const ex = {
      code: 'ERR_OSSL_DH_BAD_GENERATOR',
      name: 'Error',
@@ -441,7 +469,19 @@ index c730eac4ce76dde880fe2b36b17414b0c311ac0b..ec5510778f4aa77c68d10d7cc56fd3a4
    };
    assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
    assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
-@@ -79,7 +79,7 @@ for (const g of [Buffer.from([]),
+ }
+ 
+-crypto.createDiffieHellman('abcdef', Buffer.from([2]));  // OK
++{
++  assert.throws(() => crypto.createDiffieHellman('abcdef', Buffer.from([2])), {
++    code: /INVALID_PARAMETERS/,
++    name: 'Error'
++  });
++}
+ 
+ for (const g of [Buffer.from([]),
+                  Buffer.from([0]),
+@@ -79,7 +86,7 @@ for (const g of [Buffer.from([]),
    const ex = {
      code: 'ERR_OSSL_DH_BAD_GENERATOR',
      name: 'Error',
@@ -450,7 +490,7 @@ index c730eac4ce76dde880fe2b36b17414b0c311ac0b..ec5510778f4aa77c68d10d7cc56fd3a4
    };
    assert.throws(() => crypto.createDiffieHellman('abcdef', g), ex);
    assert.throws(() => crypto.createDiffieHellman('abcdef', 'hex', g), ex);
-@@ -133,18 +133,17 @@ assert.strictEqual(secret1, secret4);
+@@ -133,18 +140,17 @@ assert.strictEqual(secret1, secret4);
  let wrongBlockLength;
  if (common.hasOpenSSL3) {
    wrongBlockLength = {

+ 3 - 3
patches/v8/build_gn.patch

@@ -9,7 +9,7 @@ necessary for native modules to load.
 Also change visibility on mksnapshot in order to target mksnapshot for mksnapshot zip.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 46118001c123334c68e852a809f3e15338a40684..7a62143f763434c7f11b5fdd2d1ee682e99e400c 100644
+index dd97c4f922c81a65bdc401e251612333ca63ee78..0509b89bee4ff47ba9e55c244a50b7470b3ea1c3 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -747,7 +747,7 @@ config("internal_config") {
@@ -21,7 +21,7 @@ index 46118001c123334c68e852a809f3e15338a40684..7a62143f763434c7f11b5fdd2d1ee682
      defines += [ "BUILDING_V8_SHARED" ]
    }
  
-@@ -6727,7 +6727,7 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -6741,7 +6741,7 @@ if (current_toolchain == v8_generator_toolchain) {
        "src/interpreter/bytecodes.h",
      ]
  
@@ -30,7 +30,7 @@ index 46118001c123334c68e852a809f3e15338a40684..7a62143f763434c7f11b5fdd2d1ee682
  
      deps = [
        ":v8_libbase",
-@@ -6739,7 +6739,6 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -6753,7 +6753,6 @@ if (current_toolchain == v8_generator_toolchain) {
  
  if (current_toolchain == v8_snapshot_toolchain) {
    v8_executable("mksnapshot") {

+ 2 - 2
patches/v8/chore_allow_customizing_microtask_policy_per_context.patch

@@ -23,10 +23,10 @@ index 85d227fa3fdce6fc29bc4927e30a0171987578ac..1a61190ed3a2aeb440aa774788a46907
    MicrotaskQueue& operator=(const MicrotaskQueue&) = delete;
  
 diff --git a/src/execution/microtask-queue.h b/src/execution/microtask-queue.h
-index 6091fa3575cf82ea532e88747c753040045cc9a0..55eee1dcede4daeed53bdc0447cfb714763d0d32 100644
+index 8ef62824d475d7c669e08b8d11e9d91af3c8e5a3..b64c7f603c67420aa09029dead063bfb12ba863b 100644
 --- a/src/execution/microtask-queue.h
 +++ b/src/execution/microtask-queue.h
-@@ -91,10 +91,10 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue {
+@@ -93,10 +93,10 @@ class V8_EXPORT_PRIVATE MicrotaskQueue final : public v8::MicrotaskQueue {
    }
  #endif
  

+ 4 - 4
patches/v8/do_not_export_private_v8_symbols_on_windows.patch

@@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
 contain any standard C++ library exports (e.g. `std::ostringstream`).
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 7a62143f763434c7f11b5fdd2d1ee682e99e400c..5dd9b3315dd82a8417fdd492ecd0b1fdc6970914 100644
+index 0509b89bee4ff47ba9e55c244a50b7470b3ea1c3..e5a30137ccb2051f43e2bdfc276052e1e9114669 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -747,6 +747,10 @@ config("internal_config") {
@@ -27,13 +27,13 @@ index 7a62143f763434c7f11b5fdd2d1ee682e99e400c..5dd9b3315dd82a8417fdd492ecd0b1fd
      defines += [ "BUILDING_V8_SHARED" ]
    }
 diff --git a/src/base/macros.h b/src/base/macros.h
-index 25a533c5a4a4a7b9395615e9742b823dfde5856f..8079d2f49066dfc0c63a28b8d3964aaaceb017fc 100644
+index f812583633b8d8b7efdf67deeb8a1190350d52c2..bb035f25ee60d9fd9a0e8af9751a84397221fb1a 100644
 --- a/src/base/macros.h
 +++ b/src/base/macros.h
-@@ -387,13 +387,17 @@ bool is_inbounds(float_t v) {
- #ifdef V8_OS_WIN
+@@ -388,13 +388,17 @@ bool is_inbounds(float_t v) {
  
  // Setup for Windows shared library export.
+ #define V8_EXPORT_ENUM
 +#if defined(HIDE_PRIVATE_SYMBOLS)
 +#define V8_EXPORT_PRIVATE
 +#else //if !defined(HIDE_PRIVATE_SYMBOLS)

+ 2 - 2
shell/app/electron_library_main.mm

@@ -7,9 +7,9 @@
 #include "shell/app/electron_library_main.h"
 
 #include "base/apple/bundle_locations.h"
+#include "base/apple/scoped_nsautorelease_pool.h"
 #include "base/at_exit.h"
 #include "base/i18n/icu_util.h"
-#include "base/mac/scoped_nsautorelease_pool.h"
 #include "content/public/app/content_main.h"
 #include "electron/fuses.h"
 #include "shell/app/electron_main_delegate.h"
@@ -33,7 +33,7 @@ int ElectronInitializeICUandStartNode(int argc, char* argv[]) {
   }
 
   base::AtExitManager atexit_manager;
-  base::mac::ScopedNSAutoreleasePool pool;
+  base::apple::ScopedNSAutoreleasePool pool;
   base::apple::SetOverrideFrameworkBundlePath(
       electron::MainApplicationBundlePath()
           .Append("Contents")

+ 2 - 2
shell/app/electron_main_delegate_mac.mm

@@ -7,9 +7,9 @@
 #include <string>
 
 #include "base/apple/bundle_locations.h"
+#include "base/apple/foundation_util.h"
 #include "base/files/file_path.h"
 #include "base/files/file_util.h"
-#include "base/mac/foundation_util.h"
 #include "base/path_service.h"
 #include "base/strings/sys_string_conversions.h"
 #include "content/browser/mac_helpers.h"
@@ -82,7 +82,7 @@ void ElectronMainDelegate::SetUpBundleOverrides() {
     NSString* team_id = [bundle objectForInfoDictionaryKey:@"ElectronTeamID"];
     if (team_id)
       base_bundle_id = base::SysNSStringToUTF8(team_id) + "." + base_bundle_id;
-    base::mac::SetBaseBundleID(base_bundle_id.c_str());
+    base::apple::SetBaseBundleID(base_bundle_id.c_str());
   }
 }
 

+ 1 - 1
shell/app/electron_main_mac.cc

@@ -5,7 +5,7 @@
 #include <cstdlib>
 #include <memory>
 
-#include "base/allocator/early_zone_registration_mac.h"
+#include "base/allocator/early_zone_registration_apple.h"
 #include "electron/buildflags/buildflags.h"
 #include "electron/fuses.h"
 #include "shell/app/electron_library_main.h"

+ 21 - 6
shell/browser/api/electron_api_desktop_capturer.cc

@@ -12,6 +12,7 @@
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/utf_string_conversions.h"
 #include "base/threading/thread_restrictions.h"
+#include "chrome/browser/media/webrtc/desktop_capturer_wrapper.h"
 #include "chrome/browser/media/webrtc/desktop_media_list.h"
 #include "chrome/browser/media/webrtc/window_icon_util.h"
 #include "content/public/browser/desktop_capture.h"
@@ -237,9 +238,13 @@ void DesktopCapturer::StartHandling(bool capture_window,
   if (capture_window && capture_screen) {
     // Some capturers like PipeWire suppport a single capturer for both screens
     // and windows. Use it if possible, treating both as window capture
-    if (auto capturer = webrtc::DesktopCapturer::CreateGenericCapturer(
+    std::unique_ptr<webrtc::DesktopCapturer> desktop_capturer =
+        webrtc::DesktopCapturer::CreateGenericCapturer(
             content::desktop_capture::CreateDesktopCaptureOptions());
-        capturer && capturer->GetDelegatedSourceListController()) {
+    auto capturer = desktop_capturer ? std::make_unique<DesktopCapturerWrapper>(
+                                           std::move(desktop_capturer))
+                                     : nullptr;
+    if (capturer && capturer->GetDelegatedSourceListController()) {
       capture_screen_ = false;
       capture_window_ = capture_window;
       window_capturer_ = std::make_unique<NativeDesktopMediaList>(
@@ -269,8 +274,13 @@ void DesktopCapturer::StartHandling(bool capture_window,
     // Initialize the source list.
     // Apply the new thumbnail size and restart capture.
     if (capture_window) {
-      if (auto capturer = content::desktop_capture::CreateWindowCapturer();
-          capturer) {
+      std::unique_ptr<webrtc::DesktopCapturer> window_capturer =
+          content::desktop_capture::CreateWindowCapturer();
+      auto capturer = window_capturer
+                          ? std::make_unique<DesktopCapturerWrapper>(
+                                std::move(window_capturer))
+                          : nullptr;
+      if (capturer) {
         window_capturer_ = std::make_unique<NativeDesktopMediaList>(
             DesktopMediaList::Type::kWindow, std::move(capturer));
         window_capturer_->SetThumbnailSize(thumbnail_size);
@@ -294,8 +304,13 @@ void DesktopCapturer::StartHandling(bool capture_window,
     }
 
     if (capture_screen) {
-      if (auto capturer = content::desktop_capture::CreateScreenCapturer();
-          capturer) {
+      std::unique_ptr<webrtc::DesktopCapturer> screen_capturer =
+          content::desktop_capture::CreateScreenCapturer();
+      auto capturer = screen_capturer
+                          ? std::make_unique<DesktopCapturerWrapper>(
+                                std::move(screen_capturer))
+                          : nullptr;
+      if (capturer) {
         screen_capturer_ = std::make_unique<NativeDesktopMediaList>(
             DesktopMediaList::Type::kScreen, std::move(capturer));
         screen_capturer_->SetThumbnailSize(thumbnail_size);

+ 3 - 3
shell/browser/api/electron_api_system_preferences_mac.mm

@@ -13,7 +13,7 @@
 #import <LocalAuthentication/LocalAuthentication.h>
 #import <Security/Security.h>
 
-#include "base/mac/scoped_cftyperef.h"
+#include "base/apple/scoped_cftyperef.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/sys_string_conversions.h"
 #include "base/task/sequenced_task_runner.h"
@@ -427,8 +427,8 @@ v8::Local<v8::Promise> SystemPreferences::PromptTouchID(
   v8::Local<v8::Promise> handle = promise.GetHandle();
 
   LAContext* context = [[LAContext alloc] init];
-  base::ScopedCFTypeRef<SecAccessControlRef> access_control =
-      base::ScopedCFTypeRef<SecAccessControlRef>(
+  base::apple::ScopedCFTypeRef<SecAccessControlRef> access_control =
+      base::apple::ScopedCFTypeRef<SecAccessControlRef>(
           SecAccessControlCreateWithFlags(
               kCFAllocatorDefault, kSecAttrAccessibleWhenUnlockedThisDeviceOnly,
               kSecAccessControlPrivateKeyUsage | kSecAccessControlUserPresence,

+ 4 - 10
shell/browser/api/electron_api_web_contents.cc

@@ -43,7 +43,6 @@
 #include "content/public/browser/download_request_utils.h"
 #include "content/public/browser/favicon_status.h"
 #include "content/public/browser/file_select_listener.h"
-#include "content/public/browser/native_web_keyboard_event.h"
 #include "content/public/browser/navigation_details.h"
 #include "content/public/browser/navigation_entry.h"
 #include "content/public/browser/navigation_handle.h"
@@ -56,6 +55,7 @@
 #include "content/public/browser/site_instance.h"
 #include "content/public/browser/storage_partition.h"
 #include "content/public/browser/web_contents.h"
+#include "content/public/common/input/native_web_keyboard_event.h"
 #include "content/public/common/referrer_type_converters.h"
 #include "content/public/common/result_codes.h"
 #include "content/public/common/webplugininfo.h"
@@ -183,8 +183,8 @@
 #endif  // BUILDFLAG(ENABLE_PRINTING)
 
 #if BUILDFLAG(ENABLE_PDF_VIEWER)
-#include "components/pdf/browser/pdf_web_contents_helper.h"  // nogncheck
-#include "shell/browser/electron_pdf_web_contents_helper_client.h"
+#include "components/pdf/browser/pdf_document_helper.h"  // nogncheck
+#include "shell/browser/electron_pdf_document_helper_client.h"
 #endif
 
 #if BUILDFLAG(ENABLE_PLUGINS)
@@ -499,7 +499,7 @@ absl::optional<base::TimeDelta> GetCursorBlinkInterval() {
 // sanity checking of device_name validity and so will crash on invalid names.
 bool IsDeviceNameValid(const std::u16string& device_name) {
 #if BUILDFLAG(IS_MAC)
-  base::ScopedCFTypeRef<CFStringRef> new_printer_id(
+  base::apple::ScopedCFTypeRef<CFStringRef> new_printer_id(
       base::SysUTF16ToCFStringRef(device_name));
   PMPrinter new_printer = PMPrinterCreateFromPrinterID(new_printer_id.get());
   bool printer_exists = new_printer != nullptr;
@@ -1018,12 +1018,6 @@ void WebContents::InitWithWebContents(
   PrintViewManagerElectron::CreateForWebContents(web_contents.get());
 #endif
 
-#if BUILDFLAG(ENABLE_PDF_VIEWER)
-  pdf::PDFWebContentsHelper::CreateForWebContentsWithClient(
-      web_contents.get(),
-      std::make_unique<ElectronPDFWebContentsHelperClient>());
-#endif
-
   // Determine whether the WebContents is offscreen.
   auto* web_preferences = WebContentsPreferences::From(web_contents.get());
   offscreen_ = web_preferences && web_preferences->IsOffscreen();

+ 1 - 1
shell/browser/api/electron_api_web_contents_mac.mm

@@ -38,7 +38,7 @@ bool WebContents::IsFocused() const {
 bool WebContents::PlatformHandleKeyboardEvent(
     content::WebContents* source,
     const content::NativeWebKeyboardEvent& event) {
-  if (event.skip_in_browser ||
+  if (event.skip_if_unhandled ||
       event.GetType() == content::NativeWebKeyboardEvent::Type::kChar)
     return false;
 

+ 9 - 8
shell/browser/browser_mac.mm

@@ -10,10 +10,10 @@
 
 #include "base/apple/bridging.h"
 #include "base/apple/bundle_locations.h"
+#include "base/apple/scoped_cftyperef.h"
 #include "base/i18n/rtl.h"
 #include "base/mac/mac_util.h"
 #include "base/mac/mac_util.mm"
-#include "base/mac/scoped_cftyperef.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/sys_string_conversions.h"
 #include "chrome/browser/browser_process.h"
@@ -47,9 +47,9 @@ namespace {
 NSString* GetAppPathForProtocol(const GURL& url) {
   NSURL* ns_url = [NSURL
       URLWithString:base::SysUTF8ToNSString(url.possibly_invalid_spec())];
-  base::ScopedCFTypeRef<CFErrorRef> out_err;
+  base::apple::ScopedCFTypeRef<CFErrorRef> out_err;
 
-  base::ScopedCFTypeRef<CFURLRef> openingApp(
+  base::apple::ScopedCFTypeRef<CFURLRef> openingApp(
       LSCopyDefaultApplicationURLForURL(base::apple::NSToCFPtrCast(ns_url),
                                         kLSRolesAll, out_err.InitializeInto()));
 
@@ -79,7 +79,7 @@ bool CheckLoginItemStatus(bool* is_hidden) {
   if (!login_items.Initialize())
     return false;
 
-  base::ScopedCFTypeRef<LSSharedFileListItemRef> item(
+  base::apple::ScopedCFTypeRef<LSSharedFileListItemRef> item(
       login_items.GetLoginItemForMainApp());
   if (!item.get())
     return false;
@@ -153,7 +153,7 @@ void Browser::Show() {
 }
 
 void Browser::AddRecentDocument(const base::FilePath& path) {
-  NSString* path_string = base::mac::FilePathToNSString(path);
+  NSString* path_string = base::apple::FilePathToNSString(path);
   if (!path_string)
     return;
   NSURL* u = [NSURL fileURLWithPath:path_string];
@@ -190,7 +190,7 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
   CFStringRef other = nil;
   for (CFIndex i = 0; i < CFArrayGetCount(bundleList); ++i) {
     other =
-        base::mac::CFCast<CFStringRef>(CFArrayGetValueAtIndex(bundleList, i));
+        base::apple::CFCast<CFStringRef>(CFArrayGetValueAtIndex(bundleList, i));
     if (![identifier isEqualToString:(__bridge NSString*)other]) {
       break;
     }
@@ -235,8 +235,9 @@ bool Browser::IsDefaultProtocolClient(const std::string& protocol,
 // TODO(codebytere): Use -[NSWorkspace URLForApplicationToOpenURL:] instead
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
-  base::ScopedCFTypeRef<CFStringRef> bundleId(LSCopyDefaultHandlerForURLScheme(
-      base::apple::NSToCFPtrCast(protocol_ns)));
+  base::apple::ScopedCFTypeRef<CFStringRef> bundleId(
+      LSCopyDefaultHandlerForURLScheme(
+          base::apple::NSToCFPtrCast(protocol_ns)));
 #pragma clang diagnostic pop
   if (!bundleId)
     return false;

+ 4 - 1
shell/browser/browser_win.cc

@@ -411,7 +411,10 @@ bool Browser::RemoveAsDefaultProtocolClient(const std::string& protocol,
     }
 
     // If now empty, delete the whole key
-    classesKey.DeleteEmptyKey(wprotocol.c_str());
+    if (protocolKey.GetValueCount().value_or(1) == 0) {
+      classesKey.DeleteKey(wprotocol.c_str(),
+                           base::win::RegKey::RecursiveDelete(false));
+    }
 
     return true;
   } else {

+ 11 - 5
shell/browser/electron_browser_client.cc

@@ -115,6 +115,7 @@
 #include "shell/common/platform_util.h"
 #include "shell/common/thread_restrictions.h"
 #include "third_party/blink/public/common/loader/url_loader_throttle.h"
+#include "third_party/blink/public/common/renderer_preferences/renderer_preferences.h"
 #include "third_party/blink/public/common/tokens/tokens.h"
 #include "third_party/blink/public/common/web_preferences/web_preferences.h"
 #include "third_party/blink/public/mojom/badging/badging.mojom.h"
@@ -205,10 +206,11 @@
 #if BUILDFLAG(ENABLE_PDF_VIEWER)
 #include "chrome/browser/pdf/chrome_pdf_stream_delegate.h"
 #include "chrome/browser/plugins/pdf_iframe_navigation_throttle.h"  // nogncheck
+#include "components/pdf/browser/pdf_document_helper.h"             // nogncheck
 #include "components/pdf/browser/pdf_navigation_throttle.h"
 #include "components/pdf/browser/pdf_url_loader_request_interceptor.h"
-#include "components/pdf/browser/pdf_web_contents_helper.h"  // nogncheck
 #include "components/pdf/common/internal_plugin_helpers.h"
+#include "shell/browser/electron_pdf_document_helper_client.h"
 #endif
 
 using content::BrowserThread;
@@ -424,7 +426,10 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
   prefs->allow_running_insecure_content = false;
   prefs->default_minimum_page_scale_factor = 1.f;
   prefs->default_maximum_page_scale_factor = 1.f;
-  prefs->navigate_on_drag_drop = false;
+
+  blink::RendererPreferences* renderer_prefs =
+      web_contents->GetMutableRendererPrefs();
+  renderer_prefs->can_accept_load_drops = false;
 
   ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi();
   prefs->preferred_color_scheme =
@@ -437,7 +442,7 @@ void ElectronBrowserClient::OverrideWebkitPrefs(
   // Custom preferences of guest page.
   auto* web_preferences = WebContentsPreferences::From(web_contents);
   if (web_preferences) {
-    web_preferences->OverrideWebkitPrefs(prefs);
+    web_preferences->OverrideWebkitPrefs(prefs, renderer_prefs);
   }
 }
 
@@ -1483,8 +1488,9 @@ void ElectronBrowserClient::
   associated_registry.AddInterface<pdf::mojom::PdfService>(base::BindRepeating(
       [](content::RenderFrameHost* render_frame_host,
          mojo::PendingAssociatedReceiver<pdf::mojom::PdfService> receiver) {
-        pdf::PDFWebContentsHelper::BindPdfService(std::move(receiver),
-                                                  render_frame_host);
+        pdf::PDFDocumentHelper::BindPdfService(
+            std::move(receiver), render_frame_host,
+            std::make_unique<ElectronPDFDocumentHelperClient>());
       },
       &render_frame_host));
 #endif

+ 1 - 1
shell/browser/electron_browser_main_parts_mac.mm

@@ -7,7 +7,7 @@
 #include <string>
 
 #include "base/apple/bundle_locations.h"
-#include "base/mac/foundation_util.h"
+#include "base/apple/foundation_util.h"
 #include "base/path_service.h"
 #include "services/device/public/cpp/geolocation/geolocation_manager.h"
 #include "services/device/public/cpp/geolocation/system_geolocation_source_mac.h"

+ 8 - 10
shell/browser/electron_pdf_web_contents_helper_client.cc → shell/browser/electron_pdf_document_helper_client.cc

@@ -2,17 +2,15 @@
 // Use of this source code is governed by the MIT license that can be
 // found in the LICENSE file.
 
-#include "shell/browser/electron_pdf_web_contents_helper_client.h"
+#include "shell/browser/electron_pdf_document_helper_client.h"
 
 #include "chrome/browser/pdf/pdf_frame_util.h"
 #include "content/public/browser/web_contents.h"
 
-ElectronPDFWebContentsHelperClient::ElectronPDFWebContentsHelperClient() =
-    default;
-ElectronPDFWebContentsHelperClient::~ElectronPDFWebContentsHelperClient() =
-    default;
+ElectronPDFDocumentHelperClient::ElectronPDFDocumentHelperClient() = default;
+ElectronPDFDocumentHelperClient::~ElectronPDFDocumentHelperClient() = default;
 
-content::RenderFrameHost* ElectronPDFWebContentsHelperClient::FindPdfFrame(
+content::RenderFrameHost* ElectronPDFDocumentHelperClient::FindPdfFrame(
     content::WebContents* contents) {
   content::RenderFrameHost* main_frame = contents->GetPrimaryMainFrame();
   content::RenderFrameHost* pdf_frame =
@@ -20,13 +18,13 @@ content::RenderFrameHost* ElectronPDFWebContentsHelperClient::FindPdfFrame(
   return pdf_frame ? pdf_frame : main_frame;
 }
 
-void ElectronPDFWebContentsHelperClient::UpdateContentRestrictions(
+void ElectronPDFDocumentHelperClient::UpdateContentRestrictions(
     content::RenderFrameHost* render_frame_host,
     int content_restrictions) {}
-void ElectronPDFWebContentsHelperClient::OnPDFHasUnsupportedFeature(
+void ElectronPDFDocumentHelperClient::OnPDFHasUnsupportedFeature(
     content::WebContents* contents) {}
-void ElectronPDFWebContentsHelperClient::OnSaveURL(
+void ElectronPDFDocumentHelperClient::OnSaveURL(
     content::WebContents* contents) {}
-void ElectronPDFWebContentsHelperClient::SetPluginCanSave(
+void ElectronPDFDocumentHelperClient::SetPluginCanSave(
     content::RenderFrameHost* render_frame_host,
     bool can_save) {}

+ 8 - 9
shell/browser/electron_pdf_web_contents_helper_client.h → shell/browser/electron_pdf_document_helper_client.h

@@ -1,23 +1,22 @@
 // Copyright (c) 2015 Slack Technologies, Inc.
 // Use of this source code is governed by the MIT license that can be
 // found in the LICENSE file.
-#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
-#define ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
+#ifndef ELECTRON_SHELL_BROWSER_ELECTRON_PDF_DOCUMENT_HELPER_CLIENT_H_
+#define ELECTRON_SHELL_BROWSER_ELECTRON_PDF_DOCUMENT_HELPER_CLIENT_H_
 
-#include "components/pdf/browser/pdf_web_contents_helper_client.h"
+#include "components/pdf/browser/pdf_document_helper_client.h"
 
 namespace content {
 class WebContents;
 }
 
-class ElectronPDFWebContentsHelperClient
-    : public pdf::PDFWebContentsHelperClient {
+class ElectronPDFDocumentHelperClient : public pdf::PDFDocumentHelperClient {
  public:
-  ElectronPDFWebContentsHelperClient();
-  ~ElectronPDFWebContentsHelperClient() override;
+  ElectronPDFDocumentHelperClient();
+  ~ElectronPDFDocumentHelperClient() override;
 
  private:
-  // pdf::PDFWebContentsHelperClient
+  // pdf::PDFDocumentHelperClient
   content::RenderFrameHost* FindPdfFrame(
       content::WebContents* contents) override;
   void UpdateContentRestrictions(content::RenderFrameHost* render_frame_host,
@@ -28,4 +27,4 @@ class ElectronPDFWebContentsHelperClient
                         bool can_save) override;
 };
 
-#endif  // ELECTRON_SHELL_BROWSER_ELECTRON_PDF_WEB_CONTENTS_HELPER_CLIENT_H_
+#endif  // ELECTRON_SHELL_BROWSER_ELECTRON_PDF_DOCUMENT_HELPER_CLIENT_H_

Some files were not shown because too many files changed in this diff