Browse Source

chore: bump chromium to 87.0.4280.11 (11-x-y) (#25802)

* chore: bump chromium in DEPS to 87.0.4280.6

* chore: bump chromium in DEPS to 87.0.4280.11

* chore: update patches

* Add deprecated_default_sources_assignment_filter variable

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

* 2426564: Remove global sources assignment filter value

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

* Remove set_sources_filter import

* chore: fixup printing patch

* Add DragOperation and AllowedDragOperations Mojo types

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

* Add DragOperation and AllowedDragOperations Mojo types

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

* Remove several references to BrowserPlugin from content

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

* Remove SurfaceEmbeddingTime and LocalSurfaceIdAllocation

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

* Remove several references to BrowserPlugin from content

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

* Service Manager embedders switches have been removed or moved

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

* Remove SurfaceEmbeddingTime and LocalSurfaceIdAllocation

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

* [XProto] Remove usage of Xlib Visuals

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

* Implement tabs.removeCSS in electrons TabsExecuteScriptFunction

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

* Remove lossy ConvertSizeToPixel() methods

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

* Remove all keyboard related usage of Xlib

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

* fix: use parent namespace for zygote switches

* ConvertRectToPixel methods have been removed

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

* impl SortingLSH service

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

* chore: update patches

* chore: fix servicemanager removed namespace

* chore: revert removed methods

* chore: update patches

* ExtensionURLLoaderFactory is now owned by its receivers

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

* chore: fix linting

* Skip Angle manifest file

https://chromium-review.googlesource.com/c/angle/angle/+/2425197

Co-authored-by: Samuel Attard <[email protected]>
Co-authored-by: Shelley Vohr <[email protected]>
Co-authored-by: Jeremy Rose <[email protected]>
Electron Bot 4 years ago
parent
commit
a4cb3e2af9
82 changed files with 658 additions and 703 deletions
  1. 21 35
      BUILD.gn
  2. 1 1
      DEPS
  3. 12 9
      build/zip.py
  4. 22 12
      chromium_src/BUILD.gn
  5. 207 192
      filenames.gni
  6. 2 2
      patches/boringssl/expose_aes-cfb.patch
  7. 1 1
      patches/boringssl/expose_ripemd160.patch
  8. 0 1
      patches/chromium/.patches
  9. 2 2
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  10. 8 8
      patches/chromium/add_didinstallconditionalfeatures.patch
  11. 2 2
      patches/chromium/add_realloc.patch
  12. 9 9
      patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch
  13. 1 1
      patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch
  14. 2 2
      patches/chromium/blink-worker-enable-csp-in-file-scheme.patch
  15. 5 5
      patches/chromium/blink_local_frame.patch
  16. 6 6
      patches/chromium/blink_world_context.patch
  17. 2 2
      patches/chromium/build_gn.patch
  18. 17 17
      patches/chromium/can_create_window.patch
  19. 2 2
      patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch
  20. 10 8
      patches/chromium/command-ismediakey.patch
  21. 1 1
      patches/chromium/content_browser_main_loop.patch
  22. 5 5
      patches/chromium/dcheck.patch
  23. 1 1
      patches/chromium/delay_lock_the_protocol_scheme_registry.patch
  24. 1 1
      patches/chromium/disable-redraw-lock.patch
  25. 8 8
      patches/chromium/disable_color_correct_rendering.patch
  26. 2 2
      patches/chromium/disable_compositor_recycling.patch
  27. 5 5
      patches/chromium/disable_hidden.patch
  28. 5 5
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  29. 2 2
      patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch
  30. 24 24
      patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch
  31. 3 3
      patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch
  32. 2 2
      patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
  33. 25 25
      patches/chromium/frame_host_manager.patch
  34. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  35. 4 4
      patches/chromium/mas-cfisobjc.patch
  36. 12 12
      patches/chromium/mas_disable_remote_accessibility.patch
  37. 15 15
      patches/chromium/mas_no_private_api.patch
  38. 9 9
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  39. 2 2
      patches/chromium/notification_provenance.patch
  40. 53 42
      patches/chromium/printing.patch
  41. 8 8
      patches/chromium/put_back_deleted_colors_for_autofill.patch
  42. 7 7
      patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch
  43. 0 47
      patches/chromium/remove_deprecated_factory_parameter_for_worker_resource_loader.patch
  44. 2 2
      patches/chromium/render_widget_host_view_base.patch
  45. 3 3
      patches/chromium/resource_file_conflict.patch
  46. 10 10
      patches/chromium/revert_remove_contentrendererclient_shouldfork.patch
  47. 2 2
      patches/chromium/scroll_bounce_flag.patch
  48. 5 5
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  49. 1 1
      patches/chromium/use_electron_resources_in_pdf_util.patch
  50. 5 5
      patches/chromium/web_contents.patch
  51. 3 3
      patches/chromium/webview_cross_drag.patch
  52. 2 2
      patches/chromium/worker_context_will_destroy.patch
  53. 3 3
      patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch
  54. 3 3
      patches/v8/build_gn.patch
  55. 8 8
      patches/v8/chore_add_v8_apple_silicon_patches.patch
  56. 1 1
      patches/v8/do_not_export_private_v8_symbols_on_windows.patch
  57. 2 2
      patches/v8/expose_mksnapshot.patch
  58. 1 1
      patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch
  59. 3 3
      patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch
  60. 1 2
      shell/app/electron_crash_reporter_client.cc
  61. 2 4
      shell/app/electron_main_delegate.cc
  62. 0 1
      shell/browser/api/electron_api_crash_reporter.cc
  63. 5 0
      shell/browser/browser_process_impl.cc
  64. 2 0
      shell/browser/browser_process_impl.h
  65. 2 3
      shell/browser/electron_browser_client.cc
  66. 1 1
      shell/browser/electron_browser_main_parts.cc
  67. 4 0
      shell/browser/extensions/api/tabs/tabs_api.cc
  68. 1 0
      shell/browser/extensions/api/tabs/tabs_api.h
  69. 24 26
      shell/browser/osr/osr_render_widget_host_view.cc
  70. 3 4
      shell/browser/osr/osr_render_widget_host_view.h
  71. 2 2
      shell/browser/osr/osr_web_contents_view.cc
  72. 3 3
      shell/browser/osr/osr_web_contents_view.h
  73. 10 4
      shell/browser/ui/views/global_menu_bar_x11.cc
  74. 2 3
      shell/browser/ui/x/x_window_utils.cc
  75. 0 12
      shell/browser/web_view_guest_delegate.cc
  76. 0 3
      shell/browser/web_view_guest_delegate.h
  77. 0 15
      shell/browser/web_view_manager.cc
  78. 0 2
      shell/browser/web_view_manager.h
  79. 0 4
      shell/renderer/guest_view_container.cc
  80. 4 8
      shell/renderer/guest_view_container.h
  81. 1 1
      shell/renderer/renderer_client_base.cc
  82. 9 2
      shell/renderer/renderer_client_base.h

+ 21 - 35
BUILD.gn

@@ -405,44 +405,26 @@ source_set("electron_lib") {
     defines += [ "GDK_DISABLE_DEPRECATION_WARNINGS" ]
   }
 
-  extra_source_filters = []
-  if (!is_linux) {
-    extra_source_filters += [
-      "*\bx/*",
-      "*_x11.h",
-      "*_x11.cc",
-      "*_gtk.h",
-      "*_gtk.cc",
-      "*\blibrary_loaders/*",
-    ]
-  }
-  if (!is_win) {
-    extra_source_filters += [
-      "*\bwin_*.h",
-      "*\bwin_*.cc",
-    ]
-  }
-  if (!is_posix) {
-    extra_source_filters += [
-      "*_posix.cc",
-      "*_posix.h",
-    ]
-  }
-  if (is_mac) {
-    extra_source_filters += [
-      "*_views.cc",
-      "*_views.h",
-      "*\bviews/*",
-    ]
-  }
   if (!is_mas_build) {
     deps += [ "//components/crash/core/app" ]
   }
 
-  set_sources_assignment_filter(
-      sources_assignment_filter + extra_source_filters)
   sources = filenames.lib_sources
-  set_sources_assignment_filter(sources_assignment_filter)
+  if (is_win) {
+    sources += filenames.lib_sources_win
+  }
+  if (is_mac) {
+    sources += filenames.lib_sources_mac
+  }
+  if (is_posix) {
+    sources += filenames.lib_sources_posix
+  }
+  if (is_linux) {
+    sources += filenames.lib_sources_linux
+  }
+  if (!is_mac) {
+    sources += filenames.lib_sources_views
+  }
 
   if (is_component_build) {
     defines += [ "NODE_SHARED_MODE" ]
@@ -589,7 +571,6 @@ source_set("electron_lib") {
     sources += [
       "shell/browser/osr/osr_host_display_client.cc",
       "shell/browser/osr/osr_host_display_client.h",
-      "shell/browser/osr/osr_host_display_client_mac.mm",
       "shell/browser/osr/osr_render_widget_host_view.cc",
       "shell/browser/osr/osr_render_widget_host_view.h",
       "shell/browser/osr/osr_video_consumer.cc",
@@ -598,8 +579,13 @@ source_set("electron_lib") {
       "shell/browser/osr/osr_view_proxy.h",
       "shell/browser/osr/osr_web_contents_view.cc",
       "shell/browser/osr/osr_web_contents_view.h",
-      "shell/browser/osr/osr_web_contents_view_mac.mm",
     ]
+    if (is_mac) {
+      sources += [
+        "shell/browser/osr/osr_host_display_client_mac.mm",
+        "shell/browser/osr/osr_web_contents_view_mac.mm",
+      ]
+    }
     deps += [
       "//components/viz/service",
       "//services/viz/public/mojom",

+ 1 - 1
DEPS

@@ -14,7 +14,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '87.0.4274.2',
+    '87.0.4280.11',
   'node_version':
     'v12.18.3',
   'nan_version':

+ 12 - 9
build/zip.py

@@ -13,27 +13,30 @@ EXTENSIONS_TO_SKIP = [
 ]
 
 PATHS_TO_SKIP = [
-  'angledata', #Skipping because it is an output of //ui/gl that we don't need
-  './libVkICD_mock_', #Skipping because these are outputs that we don't need
-  './VkICD_mock_', #Skipping because these are outputs that we don't need
-
-  # Skipping because its an output of create_bundle from //build/config/mac/rules.gni
+  # Skip because it is an output of //ui/gl that we don't need.
+  'angledata',
+  # Skip because these are outputs that we don't need.
+  './libVkICD_mock_',
+  # Skip because these are outputs that we don't need.
+  './VkICD_mock_',
+  # Skip because its an output of create_bundle from //build/config/mac/rules.gni
   # that we don't need
   'Electron.dSYM',
-
+  # Refs https://chromium-review.googlesource.com/c/angle/angle/+/2425197.
+  # Remove this when Angle themselves remove the file: https://issuetracker.google.com/issues/168736059
+  'gen/angle/angle_commit.h',
   # //chrome/browser:resources depends on this via
   # //chrome/browser/resources/ssl/ssl_error_assistant, but we don't need to
   # ship it.
   'pyproto',
-
   # On Windows, this binary doesn't exist (the crashpad handler is built-in).
   # On MacOS, the binary is called 'chrome_crashpad_handler' and is inside the
   # app bundle.
   # On Linux, we don't use crashpad, but this binary is still built for some
   # reason. Exclude it from the zip.
   './crashpad_handler',
-
-  'resources/inspector', #Skipping because these are outputs that we don't need
+  # Skip because these are outputs that we don't need.
+  'resources/inspector',
 ]
 
 def skip_path(dep, dist_zip, target_cpu):

+ 22 - 12
chromium_src/BUILD.gn

@@ -26,18 +26,10 @@ static_library("chrome") {
     "//chrome/browser/devtools/devtools_file_system_indexer.h",
     "//chrome/browser/extensions/global_shortcut_listener.cc",
     "//chrome/browser/extensions/global_shortcut_listener.h",
-    "//chrome/browser/extensions/global_shortcut_listener_mac.h",
-    "//chrome/browser/extensions/global_shortcut_listener_mac.mm",
-    "//chrome/browser/extensions/global_shortcut_listener_win.cc",
-    "//chrome/browser/extensions/global_shortcut_listener_win.h",
     "//chrome/browser/icon_loader.cc",
     "//chrome/browser/icon_loader.h",
-    "//chrome/browser/icon_loader_mac.mm",
-    "//chrome/browser/icon_loader_win.cc",
     "//chrome/browser/icon_manager.cc",
     "//chrome/browser/icon_manager.h",
-    "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
-    "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
     "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.cc",
     "//chrome/browser/net/chrome_mojo_proxy_resolver_factory.h",
     "//chrome/browser/net/proxy_config_monitor.cc",
@@ -57,14 +49,32 @@ static_library("chrome") {
     "//chrome/browser/ssl/tls_deprecation_config.cc",
     "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc",
     "//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h",
-    "//chrome/browser/win/chrome_process_finder.cc",
-    "//chrome/browser/win/chrome_process_finder.h",
-    "//chrome/child/v8_crashpad_support_win.cc",
-    "//chrome/child/v8_crashpad_support_win.h",
     "//extensions/browser/app_window/size_constraints.cc",
     "//extensions/browser/app_window/size_constraints.h",
   ]
 
+  if (is_mac) {
+    sources += [
+      "//chrome/browser/extensions/global_shortcut_listener_mac.h",
+      "//chrome/browser/extensions/global_shortcut_listener_mac.mm",
+      "//chrome/browser/icon_loader_mac.mm",
+      "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
+      "//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
+    ]
+  }
+
+  if (is_win) {
+    sources += [
+      "//chrome/browser/extensions/global_shortcut_listener_win.cc",
+      "//chrome/browser/extensions/global_shortcut_listener_win.h",
+      "//chrome/browser/icon_loader_win.cc",
+      "//chrome/browser/win/chrome_process_finder.cc",
+      "//chrome/browser/win/chrome_process_finder.h",
+      "//chrome/child/v8_crashpad_support_win.cc",
+      "//chrome/child/v8_crashpad_support_win.h",
+    ]
+  }
+
   public_deps = [
     "//chrome/common",
     "//chrome/common:version_header",

+ 207 - 192
filenames.gni

@@ -21,12 +21,215 @@ filenames = {
     "node_modules/@primer/octicons/build/svg/star-fill-24.svg",
   ]
 
-  lib_sources = [
-    "chromium_src/chrome/browser/process_singleton.h",
-    "chromium_src/chrome/browser/process_singleton_posix.cc",
-    "chromium_src/chrome/browser/process_singleton_win.cc",
+  lib_sources_linux = [
     "chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc",
     "chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h",
+    "shell/browser/ui/file_dialog_gtk.cc",
+    "shell/browser/ui/message_box_gtk.cc",
+    "shell/browser/ui/tray_icon_gtk.cc",
+    "shell/browser/ui/tray_icon_gtk.h",
+    "shell/browser/ui/views/global_menu_bar_x11.cc",
+    "shell/browser/ui/views/global_menu_bar_x11.h",
+    "shell/browser/ui/x/event_disabler.cc",
+    "shell/browser/ui/x/event_disabler.h",
+    "shell/browser/ui/x/window_state_watcher.cc",
+    "shell/browser/ui/x/window_state_watcher.h",
+    "shell/browser/ui/x/x_window_utils.cc",
+    "shell/browser/ui/x/x_window_utils.h",
+    "shell/browser/browser_linux.cc",
+    "shell/browser/lib/power_observer_linux.cc",
+    "shell/browser/lib/power_observer_linux.h",
+    "shell/browser/notifications/linux/notification_presenter_linux.cc",
+    "shell/browser/notifications/linux/notification_presenter_linux.h",
+    "shell/browser/relauncher_linux.cc",
+    "shell/common/application_info_linux.cc",
+    "shell/common/language_util_linux.cc",
+    "shell/common/node_bindings_linux.cc",
+    "shell/common/node_bindings_linux.h",
+    "shell/common/platform_util_linux.cc",
+    "shell/browser/linux/unity_service.h",
+    "shell/browser/notifications/linux/libnotify_notification.cc",
+    "shell/browser/notifications/linux/libnotify_notification.h",
+    "shell/browser/linux/unity_service.cc",
+  ]
+
+  lib_sources_posix = [
+    "chromium_src/chrome/browser/process_singleton_posix.cc",
+    "shell/browser/electron_browser_main_parts_posix.cc",
+  ]
+
+  lib_sources_win = [
+    "chromium_src/chrome/browser/process_singleton_win.cc",
+    "shell/browser/api/electron_api_power_monitor_win.cc",
+    "shell/browser/api/electron_api_system_preferences_win.cc",
+    "shell/browser/browser_win.cc",
+    "shell/browser/native_window_views_win.cc",
+    "shell/browser/notifications/win/notification_presenter_win.cc",
+    "shell/browser/notifications/win/notification_presenter_win.h",
+    "shell/browser/notifications/win/notification_presenter_win7.cc",
+    "shell/browser/notifications/win/notification_presenter_win7.h",
+    "shell/browser/relauncher_win.cc",
+    "shell/browser/ui/certificate_trust_win.cc",
+    "shell/browser/ui/file_dialog_win.cc",
+    "shell/browser/ui/message_box_win.cc",
+    "shell/browser/ui/tray_icon_win.cc",
+    "shell/browser/ui/views/electron_views_delegate_win.cc",
+    "shell/browser/ui/views/win_frame_view.cc",
+    "shell/browser/ui/views/win_frame_view.h",
+    "shell/browser/ui/win/electron_desktop_window_tree_host_win.cc",
+    "shell/browser/ui/win/electron_desktop_window_tree_host_win.h",
+    "shell/common/api/electron_api_native_image_win.cc",
+    "shell/common/application_info_win.cc",
+    "shell/common/language_util_win.cc",
+    "shell/common/node_bindings_win.cc",
+    "shell/common/node_bindings_win.h",
+    "shell/common/platform_util_win.cc",
+    "shell/browser/notifications/win/win32_desktop_notifications/common.h",
+    "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc",
+    "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h",
+    "shell/browser/notifications/win/win32_desktop_notifications/toast.cc",
+    "shell/browser/notifications/win/win32_desktop_notifications/toast.h",
+    "shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc",
+    "shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h",
+    "shell/browser/notifications/win/win32_notification.cc",
+    "shell/browser/notifications/win/win32_notification.h",
+    "shell/browser/notifications/win/windows_toast_notification.cc",
+    "shell/browser/notifications/win/windows_toast_notification.h",
+    "shell/browser/ui/win/dialog_thread.cc",
+    "shell/browser/ui/win/dialog_thread.h",
+    "shell/browser/ui/win/electron_desktop_native_widget_aura.cc",
+    "shell/browser/ui/win/electron_desktop_native_widget_aura.h",
+    "shell/browser/ui/win/jump_list.cc",
+    "shell/browser/ui/win/jump_list.h",
+    "shell/browser/ui/win/notify_icon.cc",
+    "shell/browser/ui/win/notify_icon.h",
+    "shell/browser/ui/win/notify_icon_host.cc",
+    "shell/browser/ui/win/notify_icon_host.h",
+    "shell/browser/ui/win/taskbar_host.cc",
+    "shell/browser/ui/win/taskbar_host.h",
+    "shell/browser/win/scoped_hstring.cc",
+    "shell/browser/win/scoped_hstring.h",
+  ]
+
+  lib_sources_mac = [
+    "shell/app/electron_main_delegate_mac.h",
+    "shell/app/electron_main_delegate_mac.mm",
+    "shell/browser/api/electron_api_app_mac.mm",
+    "shell/browser/api/electron_api_browser_window_mac.mm",
+    "shell/browser/api/electron_api_menu_mac.h",
+    "shell/browser/api/electron_api_menu_mac.mm",
+    "shell/browser/api/electron_api_native_theme_mac.mm",
+    "shell/browser/api/electron_api_power_monitor_mac.mm",
+    "shell/browser/api/electron_api_system_preferences_mac.mm",
+    "shell/browser/api/electron_api_web_contents_mac.mm",
+    "shell/browser/auto_updater_mac.mm",
+    "shell/browser/browser_mac.mm",
+    "shell/browser/notifications/mac/notification_center_delegate.h",
+    "shell/browser/notifications/mac/notification_center_delegate.mm",
+    "shell/common/mac/main_application_bundle.h",
+    "shell/common/mac/main_application_bundle.mm",
+    "shell/browser/common_web_contents_delegate_mac.mm",
+    "shell/browser/electron_browser_main_parts_mac.mm",
+    "shell/browser/native_browser_view_mac.h",
+    "shell/browser/native_browser_view_mac.mm",
+    "shell/browser/native_window_mac.h",
+    "shell/browser/native_window_mac.mm",
+    "shell/browser/notifications/mac/notification_presenter_mac.h",
+    "shell/browser/notifications/mac/notification_presenter_mac.mm",
+    "shell/browser/relauncher_mac.cc",
+    "shell/browser/ui/certificate_trust_mac.mm",
+    "shell/browser/ui/cocoa/electron_native_widget_mac.h",
+    "shell/browser/ui/cocoa/electron_native_widget_mac.mm",
+    "shell/browser/ui/cocoa/root_view_mac.h",
+    "shell/browser/ui/cocoa/root_view_mac.mm",
+    "shell/browser/ui/cocoa/views_delegate_mac.h",
+    "shell/browser/ui/cocoa/views_delegate_mac.mm",
+    "shell/browser/ui/drag_util_mac.mm",
+    "shell/browser/ui/file_dialog_mac.mm",
+    "shell/browser/ui/inspectable_web_contents_view_mac.h",
+    "shell/browser/ui/inspectable_web_contents_view_mac.mm",
+    "shell/browser/ui/message_box_mac.mm",
+    "shell/common/api/electron_api_clipboard_mac.mm",
+    "shell/common/api/electron_api_native_image_mac.mm",
+    "shell/common/application_info_mac.mm",
+    "shell/common/language_util_mac.mm",
+    "shell/common/node_bindings_mac.cc",
+    "shell/common/node_bindings_mac.h",
+    "shell/common/platform_util_mac.mm",
+    "shell/browser/notifications/mac/cocoa_notification.h",
+    "shell/browser/notifications/mac/cocoa_notification.mm",
+    "shell/browser/ui/cocoa/NSColor+Hex.h",
+    "shell/browser/ui/cocoa/NSColor+Hex.mm",
+    "shell/browser/ui/cocoa/NSString+ANSI.h",
+    "shell/browser/ui/cocoa/NSString+ANSI.mm",
+    "shell/browser/ui/cocoa/delayed_native_view_host.cc",
+    "shell/browser/ui/cocoa/delayed_native_view_host.h",
+    "shell/browser/ui/cocoa/electron_bundle_mover.h",
+    "shell/browser/ui/cocoa/electron_bundle_mover.mm",
+    "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h",
+    "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm",
+    "shell/browser/ui/cocoa/electron_menu_controller.h",
+    "shell/browser/ui/cocoa/electron_menu_controller.mm",
+    "shell/browser/ui/cocoa/electron_ns_window.h",
+    "shell/browser/ui/cocoa/electron_ns_window.mm",
+    "shell/browser/ui/cocoa/electron_ns_window_delegate.h",
+    "shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
+    "shell/browser/ui/cocoa/electron_preview_item.h",
+    "shell/browser/ui/cocoa/electron_preview_item.mm",
+    "shell/browser/ui/cocoa/electron_touch_bar.h",
+    "shell/browser/ui/cocoa/electron_touch_bar.mm",
+    "shell/browser/ui/cocoa/event_dispatching_window.h",
+    "shell/browser/ui/cocoa/event_dispatching_window.mm",
+    "shell/browser/ui/tray_icon_cocoa.h",
+    "shell/browser/ui/tray_icon_cocoa.mm",
+    "shell/browser/mac/dict_util.h",
+    "shell/browser/mac/dict_util.mm",
+    "shell/browser/mac/electron_application.h",
+    "shell/browser/mac/electron_application.mm",
+    "shell/browser/mac/electron_application_delegate.h",
+    "shell/browser/mac/electron_application_delegate.mm",
+    "shell/browser/mac/in_app_purchase.h",
+    "shell/browser/mac/in_app_purchase.mm",
+    "shell/browser/mac/in_app_purchase_observer.h",
+    "shell/browser/mac/in_app_purchase_observer.mm",
+    "shell/browser/mac/in_app_purchase_product.h",
+    "shell/browser/mac/in_app_purchase_product.mm",
+  ]
+
+  lib_sources_views = [
+    "shell/browser/api/electron_api_browser_window_views.cc",
+    "shell/browser/api/electron_api_menu_views.cc",
+    "shell/browser/api/electron_api_menu_views.h",
+    "shell/browser/common_web_contents_delegate_views.cc",
+    "shell/browser/native_browser_view_views.cc",
+    "shell/browser/native_browser_view_views.h",
+    "shell/browser/native_window_views.cc",
+    "shell/browser/native_window_views.h",
+    "shell/browser/ui/drag_util_views.cc",
+    "shell/browser/ui/views/inspectable_web_contents_view_views.cc",
+    "shell/browser/ui/views/inspectable_web_contents_view_views.h",
+    "shell/browser/ui/views/autofill_popup_view.cc",
+    "shell/browser/ui/views/autofill_popup_view.h",
+    "shell/browser/ui/views/electron_views_delegate.cc",
+    "shell/browser/ui/views/electron_views_delegate.h",
+    "shell/browser/ui/views/frameless_view.cc",
+    "shell/browser/ui/views/frameless_view.h",
+    "shell/browser/ui/views/menu_bar.cc",
+    "shell/browser/ui/views/menu_bar.h",
+    "shell/browser/ui/views/menu_delegate.cc",
+    "shell/browser/ui/views/menu_delegate.h",
+    "shell/browser/ui/views/menu_model_adapter.cc",
+    "shell/browser/ui/views/menu_model_adapter.h",
+    "shell/browser/ui/views/native_frame_view.cc",
+    "shell/browser/ui/views/native_frame_view.h",
+    "shell/browser/ui/views/root_view.cc",
+    "shell/browser/ui/views/root_view.h",
+    "shell/browser/ui/views/submenu_button.cc",
+    "shell/browser/ui/views/submenu_button.h",
+  ]
+
+  lib_sources = [
+    "chromium_src/chrome/browser/process_singleton.h",
     "shell/app/command_line_args.cc",
     "shell/app/command_line_args.h",
     "shell/app/electron_content_client.cc",
@@ -35,13 +238,10 @@ filenames = {
     "shell/app/electron_crash_reporter_client.h",
     "shell/app/electron_main_delegate.cc",
     "shell/app/electron_main_delegate.h",
-    "shell/app/electron_main_delegate_mac.h",
-    "shell/app/electron_main_delegate_mac.mm",
     "shell/app/uv_task_runner.cc",
     "shell/app/uv_task_runner.h",
     "shell/browser/api/electron_api_app.cc",
     "shell/browser/api/electron_api_app.h",
-    "shell/browser/api/electron_api_app_mac.mm",
     "shell/browser/api/electron_api_auto_updater.cc",
     "shell/browser/api/electron_api_auto_updater.h",
     "shell/browser/api/electron_api_base_window.cc",
@@ -50,8 +250,6 @@ filenames = {
     "shell/browser/api/electron_api_browser_view.h",
     "shell/browser/api/electron_api_browser_window.cc",
     "shell/browser/api/electron_api_browser_window.h",
-    "shell/browser/api/electron_api_browser_window_mac.mm",
-    "shell/browser/api/electron_api_browser_window_views.cc",
     "shell/browser/api/electron_api_content_tracing.cc",
     "shell/browser/api/electron_api_cookies.cc",
     "shell/browser/api/electron_api_cookies.h",
@@ -73,13 +271,8 @@ filenames = {
     "shell/browser/api/electron_api_in_app_purchase.h",
     "shell/browser/api/electron_api_menu.cc",
     "shell/browser/api/electron_api_menu.h",
-    "shell/browser/api/electron_api_menu_mac.h",
-    "shell/browser/api/electron_api_menu_mac.mm",
-    "shell/browser/api/electron_api_menu_views.cc",
-    "shell/browser/api/electron_api_menu_views.h",
     "shell/browser/api/electron_api_native_theme.cc",
     "shell/browser/api/electron_api_native_theme.h",
-    "shell/browser/api/electron_api_native_theme_mac.mm",
     "shell/browser/api/electron_api_net.cc",
     "shell/browser/api/electron_api_net_log.cc",
     "shell/browser/api/electron_api_net_log.h",
@@ -87,8 +280,6 @@ filenames = {
     "shell/browser/api/electron_api_notification.h",
     "shell/browser/api/electron_api_power_monitor.cc",
     "shell/browser/api/electron_api_power_monitor.h",
-    "shell/browser/api/electron_api_power_monitor_mac.mm",
-    "shell/browser/api/electron_api_power_monitor_win.cc",
     "shell/browser/api/electron_api_power_save_blocker.cc",
     "shell/browser/api/electron_api_power_save_blocker.h",
     "shell/browser/api/electron_api_protocol.cc",
@@ -101,8 +292,6 @@ filenames = {
     "shell/browser/api/electron_api_session.h",
     "shell/browser/api/electron_api_system_preferences.cc",
     "shell/browser/api/electron_api_system_preferences.h",
-    "shell/browser/api/electron_api_system_preferences_mac.mm",
-    "shell/browser/api/electron_api_system_preferences_win.cc",
     "shell/browser/api/electron_api_tray.cc",
     "shell/browser/api/electron_api_tray.h",
     "shell/browser/api/electron_api_url_loader.cc",
@@ -112,7 +301,6 @@ filenames = {
     "shell/browser/api/electron_api_web_contents.cc",
     "shell/browser/api/electron_api_web_contents.h",
     "shell/browser/api/electron_api_web_contents_impl.cc",
-    "shell/browser/api/electron_api_web_contents_mac.mm",
     "shell/browser/api/electron_api_web_contents_view.cc",
     "shell/browser/api/electron_api_web_contents_view.h",
     "shell/browser/api/electron_api_web_request.cc",
@@ -136,21 +324,15 @@ filenames = {
     "shell/browser/api/ui_event.h",
     "shell/browser/auto_updater.cc",
     "shell/browser/auto_updater.h",
-    "shell/browser/auto_updater_mac.mm",
     "shell/browser/browser.cc",
     "shell/browser/browser.h",
-    "shell/browser/browser_linux.cc",
-    "shell/browser/browser_mac.mm",
     "shell/browser/browser_observer.h",
     "shell/browser/browser_process_impl.cc",
     "shell/browser/browser_process_impl.h",
-    "shell/browser/browser_win.cc",
     "shell/browser/child_web_contents_tracker.cc",
     "shell/browser/child_web_contents_tracker.h",
     "shell/browser/common_web_contents_delegate.cc",
     "shell/browser/common_web_contents_delegate.h",
-    "shell/browser/common_web_contents_delegate_mac.mm",
-    "shell/browser/common_web_contents_delegate_views.cc",
     "shell/browser/cookie_change_notifier.cc",
     "shell/browser/cookie_change_notifier.h",
     "shell/browser/electron_autofill_driver.cc",
@@ -163,8 +345,6 @@ filenames = {
     "shell/browser/electron_browser_context.h",
     "shell/browser/electron_browser_main_parts.cc",
     "shell/browser/electron_browser_main_parts.h",
-    "shell/browser/electron_browser_main_parts_mac.mm",
-    "shell/browser/electron_browser_main_parts_posix.cc",
     "shell/browser/electron_download_manager_delegate.cc",
     "shell/browser/electron_download_manager_delegate.h",
     "shell/browser/electron_gpu_client.cc",
@@ -191,24 +371,8 @@ filenames = {
     "shell/browser/javascript_environment.h",
     "shell/browser/lib/bluetooth_chooser.cc",
     "shell/browser/lib/bluetooth_chooser.h",
-    "shell/browser/lib/power_observer_linux.cc",
-    "shell/browser/lib/power_observer_linux.h",
-    "shell/browser/linux/unity_service.cc",
-    "shell/browser/linux/unity_service.h",
     "shell/browser/login_handler.cc",
     "shell/browser/login_handler.h",
-    "shell/browser/mac/dict_util.h",
-    "shell/browser/mac/dict_util.mm",
-    "shell/browser/mac/electron_application.h",
-    "shell/browser/mac/electron_application.mm",
-    "shell/browser/mac/electron_application_delegate.h",
-    "shell/browser/mac/electron_application_delegate.mm",
-    "shell/browser/mac/in_app_purchase.h",
-    "shell/browser/mac/in_app_purchase.mm",
-    "shell/browser/mac/in_app_purchase_observer.h",
-    "shell/browser/mac/in_app_purchase_observer.mm",
-    "shell/browser/mac/in_app_purchase_product.h",
-    "shell/browser/mac/in_app_purchase_product.mm",
     "shell/browser/media/media_capture_devices_dispatcher.cc",
     "shell/browser/media/media_capture_devices_dispatcher.h",
     "shell/browser/media/media_device_id_salt.cc",
@@ -219,18 +383,9 @@ filenames = {
     "shell/browser/microtasks_runner.h",
     "shell/browser/native_browser_view.cc",
     "shell/browser/native_browser_view.h",
-    "shell/browser/native_browser_view_mac.h",
-    "shell/browser/native_browser_view_mac.mm",
-    "shell/browser/native_browser_view_views.cc",
-    "shell/browser/native_browser_view_views.h",
     "shell/browser/native_window.cc",
     "shell/browser/native_window.h",
-    "shell/browser/native_window_mac.h",
-    "shell/browser/native_window_mac.mm",
     "shell/browser/native_window_observer.h",
-    "shell/browser/native_window_views.cc",
-    "shell/browser/native_window_views.h",
-    "shell/browser/native_window_views_win.cc",
     "shell/browser/net/asar/asar_url_loader.cc",
     "shell/browser/net/asar/asar_url_loader.h",
     "shell/browser/net/cert_verifier_client.cc",
@@ -258,16 +413,6 @@ filenames = {
     "shell/browser/network_hints_handler_impl.h",
     "shell/browser/node_debugger.cc",
     "shell/browser/node_debugger.h",
-    "shell/browser/notifications/linux/libnotify_notification.cc",
-    "shell/browser/notifications/linux/libnotify_notification.h",
-    "shell/browser/notifications/linux/notification_presenter_linux.cc",
-    "shell/browser/notifications/linux/notification_presenter_linux.h",
-    "shell/browser/notifications/mac/cocoa_notification.h",
-    "shell/browser/notifications/mac/cocoa_notification.mm",
-    "shell/browser/notifications/mac/notification_center_delegate.h",
-    "shell/browser/notifications/mac/notification_center_delegate.mm",
-    "shell/browser/notifications/mac/notification_presenter_mac.h",
-    "shell/browser/notifications/mac/notification_presenter_mac.mm",
     "shell/browser/notifications/notification.cc",
     "shell/browser/notifications/notification.h",
     "shell/browser/notifications/notification_delegate.h",
@@ -275,21 +420,6 @@ filenames = {
     "shell/browser/notifications/notification_presenter.h",
     "shell/browser/notifications/platform_notification_service.cc",
     "shell/browser/notifications/platform_notification_service.h",
-    "shell/browser/notifications/win/notification_presenter_win.cc",
-    "shell/browser/notifications/win/notification_presenter_win.h",
-    "shell/browser/notifications/win/notification_presenter_win7.cc",
-    "shell/browser/notifications/win/notification_presenter_win7.h",
-    "shell/browser/notifications/win/win32_desktop_notifications/common.h",
-    "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc",
-    "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h",
-    "shell/browser/notifications/win/win32_desktop_notifications/toast.cc",
-    "shell/browser/notifications/win/win32_desktop_notifications/toast.h",
-    "shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc",
-    "shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h",
-    "shell/browser/notifications/win/win32_notification.cc",
-    "shell/browser/notifications/win/win32_notification.h",
-    "shell/browser/notifications/win/windows_toast_notification.cc",
-    "shell/browser/notifications/win/windows_toast_notification.h",
     "shell/browser/plugins/plugin_utils.cc",
     "shell/browser/plugins/plugin_utils.h",
     "shell/browser/pref_store_delegate.cc",
@@ -298,9 +428,6 @@ filenames = {
     "shell/browser/protocol_registry.h",
     "shell/browser/relauncher.cc",
     "shell/browser/relauncher.h",
-    "shell/browser/relauncher_linux.cc",
-    "shell/browser/relauncher_mac.cc",
-    "shell/browser/relauncher_win.cc",
     "shell/browser/session_preferences.cc",
     "shell/browser/session_preferences.h",
     "shell/browser/special_storage_policy.cc",
@@ -310,116 +437,26 @@ filenames = {
     "shell/browser/ui/autofill_popup.cc",
     "shell/browser/ui/autofill_popup.h",
     "shell/browser/ui/certificate_trust.h",
-    "shell/browser/ui/certificate_trust_mac.mm",
-    "shell/browser/ui/certificate_trust_win.cc",
-    "shell/browser/ui/cocoa/NSColor+Hex.h",
-    "shell/browser/ui/cocoa/NSColor+Hex.mm",
-    "shell/browser/ui/cocoa/NSString+ANSI.h",
-    "shell/browser/ui/cocoa/NSString+ANSI.mm",
-    "shell/browser/ui/cocoa/delayed_native_view_host.cc",
-    "shell/browser/ui/cocoa/delayed_native_view_host.h",
-    "shell/browser/ui/cocoa/electron_bundle_mover.h",
-    "shell/browser/ui/cocoa/electron_bundle_mover.mm",
-    "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h",
-    "shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm",
-    "shell/browser/ui/cocoa/electron_menu_controller.h",
-    "shell/browser/ui/cocoa/electron_menu_controller.mm",
-    "shell/browser/ui/cocoa/electron_native_widget_mac.h",
-    "shell/browser/ui/cocoa/electron_native_widget_mac.mm",
-    "shell/browser/ui/cocoa/electron_ns_window.h",
-    "shell/browser/ui/cocoa/electron_ns_window.mm",
-    "shell/browser/ui/cocoa/electron_ns_window_delegate.h",
-    "shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
-    "shell/browser/ui/cocoa/electron_preview_item.h",
-    "shell/browser/ui/cocoa/electron_preview_item.mm",
-    "shell/browser/ui/cocoa/electron_touch_bar.h",
-    "shell/browser/ui/cocoa/electron_touch_bar.mm",
-    "shell/browser/ui/cocoa/event_dispatching_window.h",
-    "shell/browser/ui/cocoa/event_dispatching_window.mm",
-    "shell/browser/ui/cocoa/root_view_mac.h",
-    "shell/browser/ui/cocoa/root_view_mac.mm",
-    "shell/browser/ui/cocoa/views_delegate_mac.h",
-    "shell/browser/ui/cocoa/views_delegate_mac.mm",
     "shell/browser/ui/devtools_manager_delegate.cc",
     "shell/browser/ui/devtools_manager_delegate.h",
     "shell/browser/ui/devtools_ui.cc",
     "shell/browser/ui/devtools_ui.h",
     "shell/browser/ui/drag_util.h",
-    "shell/browser/ui/drag_util_mac.mm",
-    "shell/browser/ui/drag_util_views.cc",
     "shell/browser/ui/electron_menu_model.cc",
     "shell/browser/ui/electron_menu_model.h",
     "shell/browser/ui/file_dialog.h",
-    "shell/browser/ui/file_dialog_gtk.cc",
-    "shell/browser/ui/file_dialog_mac.mm",
-    "shell/browser/ui/file_dialog_win.cc",
     "shell/browser/ui/inspectable_web_contents.cc",
     "shell/browser/ui/inspectable_web_contents.h",
     "shell/browser/ui/inspectable_web_contents_delegate.h",
     "shell/browser/ui/inspectable_web_contents_view.h",
     "shell/browser/ui/inspectable_web_contents_view_delegate.cc",
     "shell/browser/ui/inspectable_web_contents_view_delegate.h",
-    "shell/browser/ui/inspectable_web_contents_view_mac.h",
-    "shell/browser/ui/inspectable_web_contents_view_mac.mm",
     "shell/browser/ui/message_box.h",
-    "shell/browser/ui/message_box_gtk.cc",
-    "shell/browser/ui/message_box_mac.mm",
-    "shell/browser/ui/message_box_win.cc",
     "shell/browser/ui/tray_icon.cc",
     "shell/browser/ui/tray_icon.h",
-    "shell/browser/ui/tray_icon_cocoa.h",
-    "shell/browser/ui/tray_icon_cocoa.mm",
-    "shell/browser/ui/tray_icon_gtk.cc",
-    "shell/browser/ui/tray_icon_gtk.h",
     "shell/browser/ui/tray_icon_observer.h",
-    "shell/browser/ui/tray_icon_win.cc",
-    "shell/browser/ui/views/autofill_popup_view.cc",
-    "shell/browser/ui/views/autofill_popup_view.h",
-    "shell/browser/ui/views/electron_views_delegate.cc",
-    "shell/browser/ui/views/electron_views_delegate.h",
-    "shell/browser/ui/views/electron_views_delegate_win.cc",
-    "shell/browser/ui/views/frameless_view.cc",
-    "shell/browser/ui/views/frameless_view.h",
-    "shell/browser/ui/views/global_menu_bar_x11.cc",
-    "shell/browser/ui/views/global_menu_bar_x11.h",
-    "shell/browser/ui/views/inspectable_web_contents_view_views.cc",
-    "shell/browser/ui/views/inspectable_web_contents_view_views.h",
-    "shell/browser/ui/views/menu_bar.cc",
-    "shell/browser/ui/views/menu_bar.h",
-    "shell/browser/ui/views/menu_delegate.cc",
-    "shell/browser/ui/views/menu_delegate.h",
-    "shell/browser/ui/views/menu_model_adapter.cc",
-    "shell/browser/ui/views/menu_model_adapter.h",
-    "shell/browser/ui/views/native_frame_view.cc",
-    "shell/browser/ui/views/native_frame_view.h",
-    "shell/browser/ui/views/root_view.cc",
-    "shell/browser/ui/views/root_view.h",
-    "shell/browser/ui/views/submenu_button.cc",
-    "shell/browser/ui/views/submenu_button.h",
-    "shell/browser/ui/views/win_frame_view.cc",
-    "shell/browser/ui/views/win_frame_view.h",
     "shell/browser/ui/webui/accessibility_ui.cc",
     "shell/browser/ui/webui/accessibility_ui.h",
-    "shell/browser/ui/win/dialog_thread.cc",
-    "shell/browser/ui/win/dialog_thread.h",
-    "shell/browser/ui/win/electron_desktop_native_widget_aura.cc",
-    "shell/browser/ui/win/electron_desktop_native_widget_aura.h",
-    "shell/browser/ui/win/electron_desktop_window_tree_host_win.cc",
-    "shell/browser/ui/win/electron_desktop_window_tree_host_win.h",
-    "shell/browser/ui/win/jump_list.cc",
-    "shell/browser/ui/win/jump_list.h",
-    "shell/browser/ui/win/notify_icon.cc",
-    "shell/browser/ui/win/notify_icon.h",
-    "shell/browser/ui/win/notify_icon_host.cc",
-    "shell/browser/ui/win/notify_icon_host.h",
-    "shell/browser/ui/win/taskbar_host.cc",
-    "shell/browser/ui/win/taskbar_host.h",
-    "shell/browser/ui/x/event_disabler.cc",
-    "shell/browser/ui/x/event_disabler.h",
-    "shell/browser/ui/x/window_state_watcher.cc",
-    "shell/browser/ui/x/window_state_watcher.h",
-    "shell/browser/ui/x/x_window_utils.cc",
-    "shell/browser/ui/x/x_window_utils.h",
     "shell/browser/unresponsive_suppressor.cc",
     "shell/browser/unresponsive_suppressor.h",
     "shell/browser/web_contents_permission_helper.cc",
@@ -434,8 +471,6 @@ filenames = {
     "shell/browser/web_view_guest_delegate.h",
     "shell/browser/web_view_manager.cc",
     "shell/browser/web_view_manager.h",
-    "shell/browser/win/scoped_hstring.cc",
-    "shell/browser/win/scoped_hstring.h",
     "shell/browser/window_list.cc",
     "shell/browser/window_list.h",
     "shell/browser/window_list_observer.h",
@@ -444,13 +479,10 @@ filenames = {
     "shell/common/api/electron_api_asar.cc",
     "shell/common/api/electron_api_clipboard.cc",
     "shell/common/api/electron_api_clipboard.h",
-    "shell/common/api/electron_api_clipboard_mac.mm",
     "shell/common/api/electron_api_command_line.cc",
     "shell/common/api/electron_api_key_weak_map.h",
     "shell/common/api/electron_api_native_image.cc",
     "shell/common/api/electron_api_native_image.h",
-    "shell/common/api/electron_api_native_image_mac.mm",
-    "shell/common/api/electron_api_native_image_win.cc",
     "shell/common/api/electron_api_shell.cc",
     "shell/common/api/electron_api_v8_util.cc",
     "shell/common/api/electron_bindings.cc",
@@ -460,9 +492,6 @@ filenames = {
     "shell/common/api/object_life_monitor.h",
     "shell/common/application_info.cc",
     "shell/common/application_info.h",
-    "shell/common/application_info_linux.cc",
-    "shell/common/application_info_mac.mm",
-    "shell/common/application_info_win.cc",
     "shell/common/asar/archive.cc",
     "shell/common/asar/archive.h",
     "shell/common/asar/asar_util.cc",
@@ -545,30 +574,16 @@ filenames = {
     "shell/common/keyboard_util.cc",
     "shell/common/keyboard_util.h",
     "shell/common/language_util.h",
-    "shell/common/language_util_linux.cc",
-    "shell/common/language_util_mac.mm",
-    "shell/common/language_util_win.cc",
-    "shell/common/mac/main_application_bundle.h",
-    "shell/common/mac/main_application_bundle.mm",
     "shell/common/mouse_util.cc",
     "shell/common/mouse_util.h",
     "shell/common/node_bindings.cc",
     "shell/common/node_bindings.h",
-    "shell/common/node_bindings_linux.cc",
-    "shell/common/node_bindings_linux.h",
-    "shell/common/node_bindings_mac.cc",
-    "shell/common/node_bindings_mac.h",
-    "shell/common/node_bindings_win.cc",
-    "shell/common/node_bindings_win.h",
     "shell/common/node_includes.h",
     "shell/common/node_util.cc",
     "shell/common/node_util.h",
     "shell/common/options_switches.cc",
     "shell/common/options_switches.h",
     "shell/common/platform_util.h",
-    "shell/common/platform_util_linux.cc",
-    "shell/common/platform_util_mac.mm",
-    "shell/common/platform_util_win.cc",
     "shell/common/process_util.cc",
     "shell/common/process_util.h",
     "shell/common/skia_util.cc",

+ 2 - 2
patches/boringssl/expose_aes-cfb.patch

@@ -57,10 +57,10 @@ index 53cb9d2dc8f1962a70dc12b648d27c32be8aca4b..84af06fc56e4aa72d4d48801d7c037ad
    callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
    callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
 diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
-index d22a6c216a2afe29f9507c90a190a4c6992c06a5..0bde0af4b25fbc24ee479b0ffffa037481c71e53 100644
+index 31390a3f63a1e88d50c22fa8c0d3b53610ebda68..792ae8feaa53229e3f6f9130269b268f43ded8d6 100644
 --- a/include/openssl/cipher.h
 +++ b/include/openssl/cipher.h
-@@ -424,6 +424,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
+@@ -430,6 +430,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
  
  // EVP_aes_128_cfb128 is only available in decrepit.
  OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);

+ 1 - 1
patches/boringssl/expose_ripemd160.patch

@@ -80,7 +80,7 @@ index d540144b293297791c087e0b968a47d368a73695..53cb9d2dc8f1962a70dc12b648d27c32
 +  callback(EVP_ripemd160(), "ripemd160", NULL, arg);
  }
 diff --git a/include/openssl/digest.h b/include/openssl/digest.h
-index 7b0ed06cb352718a972be875d03d7c7c89489701..7072457224af3a66d1862f0028cb0ae17847f237 100644
+index 8e398e8b87f199cf947e097cf99e175bfc9870da..6c0ce559681817cae3273a50e6533468f17177ee 100644
 --- a/include/openssl/digest.h
 +++ b/include/openssl/digest.h
 @@ -89,6 +89,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_sha512_256(void);

+ 0 - 1
patches/chromium/.patches

@@ -99,4 +99,3 @@ remove_some_deps_that_do_not_work_on_arm64.patch
 fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
 skip_atk_toolchain_check.patch
 worker_feat_add_hook_to_notify_script_ready.patch
-remove_deprecated_factory_parameter_for_worker_resource_loader.patch

+ 2 - 2
patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch

@@ -33,10 +33,10 @@ index 1bb696ec5a89fd2215e523a9e320c6d74bd79a42..c0cbe3a2920b0cb453b847be7a0dc8a1
      client->PostIOThreadCreated(gpu_process.io_task_runner());
  
 diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
-index 88e80bdaecbdd9000109f638c6d79d8102d0e537..a0c0f17e6642dcd2690c095b95ff2c2de9b6ae4f 100644
+index 2231ce937692f567fd2d4661e4feea389e12203e..a281c7bd40dac0acf350d08683e7c71282a83e9a 100644
 --- a/content/public/gpu/content_gpu_client.h
 +++ b/content/public/gpu/content_gpu_client.h
-@@ -30,6 +30,10 @@ class CONTENT_EXPORT ContentGpuClient {
+@@ -31,6 +31,10 @@ class CONTENT_EXPORT ContentGpuClient {
   public:
    virtual ~ContentGpuClient() {}
  

+ 8 - 8
patches/chromium/add_didinstallconditionalfeatures.patch

@@ -10,10 +10,10 @@ 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 ae8a3e0613183d67d91081d21f2844e1e6e596e6..2b04c710bab425280727e282ca3d3131b515ee14 100644
+index f63b17435218d0d67bba044da67c1c80015fc996..d0fe24182f2cb48a1333054ce44b6a7f49b2f053 100644
 --- a/content/public/renderer/render_frame_observer.h
 +++ b/content/public/renderer/render_frame_observer.h
-@@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
+@@ -116,6 +116,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
    virtual void DidHandleOnloadEvents() {}
    virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
                                        int32_t world_id) {}
@@ -23,10 +23,10 @@ index ae8a3e0613183d67d91081d21f2844e1e6e596e6..2b04c710bab425280727e282ca3d3131
                                          int32_t world_id) {}
    virtual void DidClearWindowObject() {}
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index 6073d26739ae07eadcadc9f1a553211fb3161867..c7fa94ee18d094f4674cecf5c5cb746a2ded7ae9 100644
+index 3b2626c3ef9dab2aedddd09d24901e892605cf01..ca83a9317d0a0136de39aa9af467580e9268cd30 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -4948,6 +4948,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
+@@ -5032,6 +5032,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
      observer.DidCreateScriptContext(context, world_id);
  }
  
@@ -40,10 +40,10 @@ index 6073d26739ae07eadcadc9f1a553211fb3161867..c7fa94ee18d094f4674cecf5c5cb746a
                                                 int world_id) {
    for (auto& observer : observers_)
 diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
-index 034d40122eabb738859867acde81e3245c7e2f2d..9208d8f1ae2ed515542dc13b7b7a8cce0b67108b 100644
+index 7c18f07de49c422a35a38e96aca6bc52c85050cb..0cb91fc8369f8a7b602b1f249c897a11014ad3ac 100644
 --- a/content/renderer/render_frame_impl.h
 +++ b/content/renderer/render_frame_impl.h
-@@ -698,6 +698,8 @@ class CONTENT_EXPORT RenderFrameImpl
+@@ -710,6 +710,8 @@ class CONTENT_EXPORT RenderFrameImpl
    bool ShouldTrackUseCounter(const blink::WebURL& url) override;
    void DidCreateScriptContext(v8::Local<v8::Context> context,
                                int world_id) override;
@@ -53,7 +53,7 @@ index 034d40122eabb738859867acde81e3245c7e2f2d..9208d8f1ae2ed515542dc13b7b7a8cce
                                  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 08804afc647cf898d7301ba8c34c6da14d5aa8f2..13ed1e5af2bbd9cdba42c2eb8619e521adf3d8be 100644
+index 069ebc8bc53c4c0b27f99f13199b406c29dee3f5..e96d6b9454229339b93a20c2117f58f2ce746777 100644
 --- a/third_party/blink/public/web/web_local_frame_client.h
 +++ b/third_party/blink/public/web/web_local_frame_client.h
 @@ -535,6 +535,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -123,7 +123,7 @@ index 831ce5ccc32676790307d49416a3a40e7e3652bc..8898a6162a759a3a4d313d8956051b62
                                          int32_t world_id) = 0;
    virtual bool AllowScriptExtensions() = 0;
 diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
-index 8080a1b3c4efe3854bd12dc4d714838a4e135689..d16d2572a37b46028dfa8d7554f97289918bf792 100644
+index 50beea038e1cf928ea18cac3e0a4071ca7686cc4..d47a028bdcdf67b892ce82a9d9660e1fb8ddb760 100644
 --- a/third_party/blink/renderer/core/loader/empty_clients.h
 +++ b/third_party/blink/renderer/core/loader/empty_clients.h
 @@ -325,6 +325,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

+ 2 - 2
patches/chromium/add_realloc.patch

@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
  
    GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
 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 211ea701aba4935ed5641914493fd90e277f18f5..7c2ae147254dad017214d2535203a18719294768 100644
+index 3c7a7a5675fce7ba4065f8b2f52e29dc083551a6..85ac9d5d95856470707d320d382743673cd1451a 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -689,6 +689,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+@@ -685,6 +685,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
      return result;
    }
  

+ 9 - 9
patches/chromium/add_trustedauthclient_to_urlloaderfactory.patch

@@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
 available, which there isn't in the case of the 'net' module.
 
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index b4d200164829d0d34c2511a07eb0cc3d046d6fa3..e15635d66859211ac91b5beff36beffd4dfe4807 100644
+index 0f9d88529021db245fb498dfa339e5327450256a..962dc2d3e8c3976f5088146c9edc0516e41ebeb4 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -214,6 +214,25 @@ struct CTPolicy {
+@@ -215,6 +215,25 @@ struct CTPolicy {
    array<string> excluded_legacy_spkis;
  };
  
@@ -39,7 +39,7 @@ index b4d200164829d0d34c2511a07eb0cc3d046d6fa3..e15635d66859211ac91b5beff36beffd
  interface CertVerifierClient {
    Verify(
      int32 default_error,
-@@ -652,6 +671,8 @@ struct URLLoaderFactoryParams {
+@@ -641,6 +660,8 @@ struct URLLoaderFactoryParams {
    // impact because of the extra process hops, so use should be minimized.
    pending_remote<TrustedURLLoaderHeaderClient>? header_client;
  
@@ -49,10 +49,10 @@ index b4d200164829d0d34c2511a07eb0cc3d046d6fa3..e15635d66859211ac91b5beff36beffd
    // the per-context allow patterns that is managed via NetworkContext
    // interface. This still respects the per-context block lists.
 diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
-index 7e2819f3748ee89698a2d64987f1fd167bdef1f5..6743a8c99d4ccd590ba8f7c459ccbdd80f17b661 100644
+index e13745d859ca82ec313c25e1958945a3efeaaa62..0f6ec93b55fcc263f69157d650b20bf34d6a586f 100644
 --- a/services/network/url_loader.cc
 +++ b/services/network/url_loader.cc
-@@ -492,6 +492,7 @@ URLLoader::URLLoader(
+@@ -463,6 +463,7 @@ URLLoader::URLLoader(
      base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
      base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
      mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
@@ -60,7 +60,7 @@ index 7e2819f3748ee89698a2d64987f1fd167bdef1f5..6743a8c99d4ccd590ba8f7c459ccbdd8
      mojom::OriginPolicyManager* origin_policy_manager,
      std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
      mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer)
-@@ -554,6 +555,11 @@ URLLoader::URLLoader(
+@@ -525,6 +526,11 @@ URLLoader::URLLoader(
      header_client_.set_disconnect_handler(
          base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
    }
@@ -72,7 +72,7 @@ index 7e2819f3748ee89698a2d64987f1fd167bdef1f5..6743a8c99d4ccd590ba8f7c459ccbdd8
    if (want_raw_headers_) {
      options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
                  mojom::kURLLoadOptionSendSSLInfoForCertificateError;
-@@ -1127,7 +1133,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
+@@ -1130,7 +1136,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
      // |this| may have been deleted.
      return;
    }
@@ -81,7 +81,7 @@ index 7e2819f3748ee89698a2d64987f1fd167bdef1f5..6743a8c99d4ccd590ba8f7c459ccbdd8
      OnAuthCredentials(base::nullopt);
      return;
    }
-@@ -1143,11 +1149,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
+@@ -1146,11 +1152,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
    if (url_request->response_headers())
      head->headers = url_request->response_headers();
    head->auth_challenge_info = auth_info;
@@ -108,7 +108,7 @@ index 7e2819f3748ee89698a2d64987f1fd167bdef1f5..6743a8c99d4ccd590ba8f7c459ccbdd8
    auth_challenge_responder_receiver_.set_disconnect_handler(
        base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
 diff --git a/services/network/url_loader.h b/services/network/url_loader.h
-index ed6dfca8e0afe6697759e54d78f65d896be24347..619d025c1c0f192c7d3f7107f5aab7791b9843b4 100644
+index 70518f42849e5d1d6e1dd0faf4cae866ba39ef09..b081be5d939b17ecaffa85e75ebb012444bb2bf1 100644
 --- a/services/network/url_loader.h
 +++ b/services/network/url_loader.h
 @@ -118,6 +118,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader

+ 1 - 1
patches/chromium/allow_new_privileges_in_unsandboxed_child_processes.patch

@@ -6,7 +6,7 @@ Subject: allow new privileges in unsandboxed child processes
 This allows unsandboxed renderers to launch setuid processes on Linux.
 
 diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
-index c1b5d30fd927feaeb3e068adc72edafa871ae8cd..7534eef2cfe57044be038632ab040b4df1e7ef9e 100644
+index f3d40b628ec20c140fb36d139bad55cb2b1bc30e..9b5b8166987dd82383984391893ca3f2c978aee6 100644
 --- a/content/browser/child_process_launcher_helper_linux.cc
 +++ b/content/browser/child_process_launcher_helper_linux.cc
 @@ -53,6 +53,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(

+ 2 - 2
patches/chromium/blink-worker-enable-csp-in-file-scheme.patch

@@ -6,10 +6,10 @@ Subject: blink-worker-enable-csp-in-file-scheme.patch
 This allows file:// URLs in workers to have a CSP.
 
 diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
-index 0d31933076d65aae063c01514f77deec1724c159..def9d2d52f41d09ea2d5291df2749f93a0b3f9fc 100644
+index 9c697793db98ddaaece76f7f8a7890ca0773f936..d264acf0173de6f2ebbf600187d4ceeea4625e42 100644
 --- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
 +++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
-@@ -373,7 +373,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
+@@ -367,7 +367,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
    // document (which is implemented in WorkerMessagingProxy, and
    // m_contentSecurityPolicy should be left as nullptr to inherit the policy).
    if (!response.CurrentRequestUrl().ProtocolIs("blob") &&

+ 5 - 5
patches/chromium/blink_local_frame.patch

@@ -14,10 +14,10 @@ when there is code doing that.
 This patch reverts the change to fix the crash in Electron.
 
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index e35eb49ce8ecccb2d7231bd3d6bd24bcc0a2fd9e..4db6561c0885ab394b17189aa4ba1eeb4ddecf57 100644
+index c00d6f81db121f57aa6fc0443a9c27daa4973024..8b8121a9291781515d2cea6a832ad0c29b0e846e 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -582,10 +582,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -580,10 +580,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
    }
    DCHECK(!view_ || !view_->IsAttached());
  
@@ -28,10 +28,10 @@ index e35eb49ce8ecccb2d7231bd3d6bd24bcc0a2fd9e..4db6561c0885ab394b17189aa4ba1eeb
    if (!Client())
      return;
  
-@@ -602,6 +598,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
-   // Notify ScriptController that the frame is closing, since its cleanup ends
+@@ -600,6 +596,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+   // Notify WindowProxyManager that the frame is closing, since its cleanup ends
    // up calling back to LocalFrameClient via WindowProxy.
-   GetScriptController().ClearForClose();
+   GetWindowProxyManager()->ClearForClose();
 +  // This is the earliest that scripting can be disabled:
 +  // - FrameLoader::Detach() can fire XHR abort events
 +  // - Document::Shutdown() can dispose plugins which can run script.

+ 6 - 6
patches/chromium/blink_world_context.patch

@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
 otherwise not available in the Blink API.
 
 diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
-index fa36160318d21df55bbd31b3e5417433aad8cdc1..146d160cbee8da41731c26891ea04d703d337885 100644
+index 8dc04d131c188e4b14cd09ab90b5b44a213ddbe3..0db04331e317bbcab1c5d98f55ae76f9e0d48ebd 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
-@@ -358,6 +358,8 @@ class WebLocalFrame : public WebFrame {
+@@ -365,6 +365,8 @@ class WebLocalFrame : public WebFrame {
    // Returns the world ID associated with |script_context|.
    virtual int32_t GetScriptContextWorldId(
        v8::Local<v8::Context> script_context) const = 0;
@@ -20,10 +20,10 @@ index fa36160318d21df55bbd31b3e5417433aad8cdc1..146d160cbee8da41731c26891ea04d70
    // Executes script in the context of the current page and returns the value
    // that the script evaluated to with callback. Script execution can be
 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 4d3aed3e3db66b669a3a04f91eca2260a9d40d58..0ed99247499a3cfcc424f47bfa4c4c908ac6b3ee 100644
+index 1bb42b8fc49d420767a2dbe4893d8594b7eda6d1..3f47067c3a4be48155771f0c1d25f614ad73b4e8 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
-@@ -980,6 +980,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
+@@ -992,6 +992,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
    return MainWorldScriptContext()->Global();
  }
  
@@ -38,10 +38,10 @@ index 4d3aed3e3db66b669a3a04f91eca2260a9d40d58..0ed99247499a3cfcc424f47bfa4c4c90
    return BindingSecurity::ShouldAllowAccessToFrame(
        CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
 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 46e977ab9fedbfd58d425fe4bf3b85762517fae4..85e66b66472bf83140d6652eaead2326b4c7c3dc 100644
+index 61e0033bf150bb7f3e28a24e7ac300563447bfa7..415483e3436ee9cf05059ff5195d91e09fac57d4 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
-@@ -163,6 +163,8 @@ class CORE_EXPORT WebLocalFrameImpl final
+@@ -169,6 +169,8 @@ class CORE_EXPORT WebLocalFrameImpl final
    v8::Local<v8::Context> MainWorldScriptContext() const override;
    int32_t GetScriptContextWorldId(
        v8::Local<v8::Context> script_context) const override;

+ 2 - 2
patches/chromium/build_gn.patch

@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
 rebuild the entire tree.
 
 diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
-index bb656fa19ff32fa407a01f302ea989ffcacc45f8..7b1c24f17c44e60a2274798546cae5b8f1018327 100644
+index 3082046a91da5fe400d8405da61f55ad66fa5e74..e0e90bcd7bb4741dfe792336d59028c500f59b39 100644
 --- a/build/config/BUILDCONFIG.gn
 +++ b/build/config/BUILDCONFIG.gn
 @@ -123,6 +123,9 @@ if (current_os == "") {
@@ -27,7 +27,7 @@ index bb656fa19ff32fa407a01f302ea989ffcacc45f8..7b1c24f17c44e60a2274798546cae5b8
    # Set to enable the official build level of optimization. This has nothing
    # to do with branding, but enables an additional level of optimization above
    # release (!is_debug). This might be better expressed as a tri-state
-@@ -348,6 +351,7 @@ default_compiler_configs = [
+@@ -335,6 +338,7 @@ default_compiler_configs = [
    "//build/config/compiler/pgo:default_pgo_flags",
    "//build/config/coverage:default_coverage",
    "//build/config/sanitizers:default_sanitizer_flags",

+ 17 - 17
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 8da4a2c699b6e5574e04891695cb39e952a04e4e..92e2064577aee673b72ae9cc7716e49d103f59a6 100644
+index 0c57f1004ffab022df99670a13bfc2fadc514437..a0bc43f68cda2d4fe77f9348d0c4402eeb6313c7 100644
 --- a/content/browser/renderer_host/render_frame_host_impl.cc
 +++ b/content/browser/renderer_host/render_frame_host_impl.cc
-@@ -4881,6 +4881,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -4911,6 +4911,7 @@ void RenderFrameHostImpl::CreateNewWindow(
            last_committed_origin_, params->window_container_type,
            params->target_url, params->referrer.To<Referrer>(),
            params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index 8da4a2c699b6e5574e04891695cb39e952a04e4e..92e2064577aee673b72ae9cc7716e49d
            &no_javascript_access);
  
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 6ff42afff78f62f37c21ea1d09c796ce16708612..022e4a2aa0442939ef7bd5fde67470c2847f116f 100644
+index c3a2e5c241e36ea1417ea37580d872f0154f714b..06fbfdc22bd7cc11117783fd37bc4562ff490b64 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3695,9 +3695,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
+@@ -3697,9 +3697,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
    }
  
    if (delegate_) {
@@ -38,10 +38,10 @@ index 6ff42afff78f62f37c21ea1d09c796ce16708612..022e4a2aa0442939ef7bd5fde67470c2
  
    observers_.ForEachObserver([&](WebContentsObserver* observer) {
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index c969ed9b17b915f713d9b82114c7b637c8fd90df..9530a1936b0a801a4c6152dd53ec5105d5d712e0 100644
+index e769df393c1e89cdf04519b82d75f7f1542ad26b..752818c2791343a5c574a96f0e0aa672a7ef3726 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -264,6 +264,10 @@ struct CreateNewWindowParams {
+@@ -282,6 +282,10 @@ struct CreateNewWindowParams {
  
    // The window features to use for the new window.
    blink.mojom.WindowFeatures features;
@@ -53,7 +53,7 @@ index c969ed9b17b915f713d9b82114c7b637c8fd90df..9530a1936b0a801a4c6152dd53ec5105
  
  // 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 68566f0bf7ac45724fe1fa771d735c8304114f01..0c15d9a28e9b54f7adbe303c341cda42a6cffb73 100644
+index da3aceed75b10087a86bcb8427c241fe647cdcfe..cafd45df059293bc1cf31e1d7b798e67578f3e9d 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -544,6 +544,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -66,7 +66,7 @@ index 68566f0bf7ac45724fe1fa771d735c8304114f01..0c15d9a28e9b54f7adbe303c341cda42
      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 601e19be9da5fe33c8f11b2cd33193973c62a0b1..2b8c354a39677e91d25451044cc06d6343a510f9 100644
+index 27b7e117b531bb370ea948e56b33d1a07eef11c6..9953cc472c04c2dc6ae0f70b64ea2b8d6ac86a05 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -153,6 +153,7 @@ class NetworkService;
@@ -77,7 +77,7 @@ index 601e19be9da5fe33c8f11b2cd33193973c62a0b1..2b8c354a39677e91d25451044cc06d63
  }  // namespace network
  
  namespace sandbox {
-@@ -872,6 +873,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -868,6 +869,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -87,7 +87,7 @@ index 601e19be9da5fe33c8f11b2cd33193973c62a0b1..2b8c354a39677e91d25451044cc06d63
        bool opener_suppressed,
        bool* no_javascript_access);
 diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
-index 7ac50fbbe16b057d7263c7850a62b01d3dfae095..90d315d815bb269ee47cef7fb5e0b0e2edd578c4 100644
+index 12ce66464a416262767c126d0600fed60f5b106a..f60cf6064fdf279b26f0d11125e2ffa5bbb36c78 100644
 --- a/content/public/browser/web_contents_delegate.cc
 +++ b/content/public/browser/web_contents_delegate.cc
 @@ -26,6 +26,17 @@ namespace content {
@@ -109,7 +109,7 @@ index 7ac50fbbe16b057d7263c7850a62b01d3dfae095..90d315d815bb269ee47cef7fb5e0b0e2
                                                   const OpenURLParams& params) {
    return nullptr;
 diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
-index a10c5caf5a4b7a30b7338c8b10ffa038e13dfd6a..938b6e622b52a05e6b7d626c4824e76121d807c5 100644
+index ee6b87d40496591935cef789bab9c1de8e60cee9..dd7f018be164b250f0b2408ce309219d61c50caa 100644
 --- a/content/public/browser/web_contents_delegate.h
 +++ b/content/public/browser/web_contents_delegate.h
 @@ -17,6 +17,7 @@
@@ -135,10 +135,10 @@ index a10c5caf5a4b7a30b7338c8b10ffa038e13dfd6a..938b6e622b52a05e6b7d626c4824e761
    // typically happens when popups are created.
    virtual void WebContentsCreated(WebContents* source_contents,
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index 39794bbcdca8a5a1b3ab6b49493a81371384262c..554e4800766a8ca087ba32dfea9fa1c61bca5cd7 100644
+index fec5e2312b716436e96d5c57b2a5203ca2b1e423..f6697538b5717a12a6d29704bc49de0b6e632417 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
-@@ -65,6 +65,7 @@
+@@ -66,6 +66,7 @@
  #include "content/renderer/history_serialization.h"
  #include "content/renderer/internal_document_state_data.h"
  #include "content/renderer/loader/request_extra_data.h"
@@ -146,7 +146,7 @@ index 39794bbcdca8a5a1b3ab6b49493a81371384262c..554e4800766a8ca087ba32dfea9fa1c6
  #include "content/renderer/render_frame_impl.h"
  #include "content/renderer/render_frame_proxy.h"
  #include "content/renderer/render_process.h"
-@@ -635,6 +636,10 @@ WebView* RenderViewImpl::CreateView(
+@@ -644,6 +645,10 @@ WebView* RenderViewImpl::CreateView(
    }
    params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
  
@@ -158,7 +158,7 @@ index 39794bbcdca8a5a1b3ab6b49493a81371384262c..554e4800766a8ca087ba32dfea9fa1c6
    // moved on send.
    bool is_background_tab =
 diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
-index 53e938ec4b6515cabea5b7da8c5c9e7168f2d2ee..2e20931edeeca271f620128f5abd1ed4ddf75e1e 100644
+index f0c53c0945d76ce4482ce4c24acb75c3eccb59e9..458919350048f02d07695bef1c4d4e41b0ce043e 100644
 --- a/content/web_test/browser/web_test_content_browser_client.cc
 +++ b/content/web_test/browser/web_test_content_browser_client.cc
 @@ -377,6 +377,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -206,10 +206,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
  
  }  // 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 af08a5041570403b4054bb4e1dedf2af6a9d9c88..23d4aa7b35db6a21ce5ecae5b831262fd65b1805 100644
+index 58c922f8da2a85f4354df61cf1ac7c454fd12359..d7903ef7b6e8dd458b14d13a24d7f9423a55707f 100644
 --- a/third_party/blink/renderer/core/frame/local_dom_window.cc
 +++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
-@@ -1953,6 +1953,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
+@@ -1957,6 +1957,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
    }
  
    WebWindowFeatures window_features = GetWindowFeaturesFromString(features);

+ 2 - 2
patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch

@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources.  We need to load these from
 Electrons grit header instead of Chromes
 
 diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
-index 282ed5514c85064ff3c63edbeb3a9e52b7c35b67..aac56ed6ae7b7b2bb09da782b642c2274c76bef0 100644
+index e462f7d8bef19577547cacc76fc794ab6fa17dcf..5fae70dc1c035596099eedf49b9eb27f0fd21e07 100644
 --- a/chrome/browser/BUILD.gn
 +++ b/chrome/browser/BUILD.gn
-@@ -5937,6 +5937,7 @@ static_library("browser") {
+@@ -5944,6 +5944,7 @@ static_library("browser") {
      deps += [
        "//components/spellcheck/browser",
        "//components/spellcheck/common",

+ 10 - 8
patches/chromium/command-ismediakey.patch

@@ -32,17 +32,19 @@ index c5125495b4d178ffb18be4d2d9670f7556412cbd..cddb321abb938c667a4a2089f87eab99
    // Create an observer that registers a hot key for |accelerator|.
    std::unique_ptr<gfx::SingletonHwndHotKeyObserver> observer =
 diff --git a/chrome/browser/extensions/global_shortcut_listener_x11.cc b/chrome/browser/extensions/global_shortcut_listener_x11.cc
-index 45e3cf52684d8ce58a33f61c32a2fdfff40d5a4f..b0a34b13cd521754ce8ff630d2fdd15ddbda35f9 100644
+index f43494af6f5ef89917b2c088a533ad1dabbf3b2b..a9506c394cdeff36dd03b50cd19c4ffe5a1ed249 100644
 --- a/chrome/browser/extensions/global_shortcut_listener_x11.cc
 +++ b/chrome/browser/extensions/global_shortcut_listener_x11.cc
-@@ -38,6 +38,7 @@ int GetNativeModifiers(const ui::Accelerator& accelerator) {
-   modifiers |= accelerator.IsShiftDown() ? ShiftMask : 0;
-   modifiers |= accelerator.IsCtrlDown() ? ControlMask : 0;
-   modifiers |= accelerator.IsAltDown() ? Mod1Mask : 0;
-+  modifiers |= accelerator.IsCmdDown() ? Mod4Mask : 0;
- 
-   return modifiers;
+@@ -39,7 +39,8 @@ x11::ModMask GetNativeModifiers(const ui::Accelerator& accelerator) {
+   constexpr auto kNoMods = x11::ModMask{};
+   return (accelerator.IsShiftDown() ? x11::ModMask::Shift : kNoMods) |
+          (accelerator.IsCtrlDown() ? x11::ModMask::Control : kNoMods) |
+-         (accelerator.IsAltDown() ? x11::ModMask::c_1 : kNoMods);
++         (accelerator.IsAltDown() ? x11::ModMask::c_1 : kNoMods) |
++         (accelerator.IsCmdDown() ? x11::ModMask::c_4 : kNoMods);
  }
+ 
+ }  // namespace
 diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
 index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc7951d372 100644
 --- a/ui/base/accelerators/media_keys_listener.cc

+ 1 - 1
patches/chromium/content_browser_main_loop.patch

@@ -8,7 +8,7 @@ run before shutdown. This is required to cleanup WebContents asynchronously
 in atom::CommonWebContentsDelegate::ResetManageWebContents.
 
 diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
-index 0c286cd8ade5835991d773b94e49ea0a34817cd0..e509c717c6ecd43cc9d1fd563792e0ab3e5522aa 100644
+index 7242f26441f93cab50a1fc7d79b086d5ffc63468..75dff99ae3b4803831331c10cd72650713de7e60 100644
 --- a/content/browser/browser_main_loop.cc
 +++ b/content/browser/browser_main_loop.cc
 @@ -1453,7 +1453,7 @@ void BrowserMainLoop::MainMessageLoopRun() {

+ 5 - 5
patches/chromium/dcheck.patch

@@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the
 failing checks and allow the rest of the target to have them enabled.
 
 diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
-index d50253cb9c4de436ac4ac4b5316834814aef248d..e1543e396a15abdbe4736ccb736bfb81294bbee5 100644
+index 18f5da7bc5953282e72933fffd7e37bbf77bfb31..b164f15fa7506caf82f0f5f450d90dbbd88a116e 100644
 --- a/content/browser/renderer_host/navigation_controller_impl.cc
 +++ b/content/browser/renderer_host/navigation_controller_impl.cc
-@@ -1274,8 +1274,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
+@@ -1275,8 +1275,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
      return NAVIGATION_TYPE_NEW_SUBFRAME;
    }
  
@@ -33,7 +33,7 @@ index d50253cb9c4de436ac4ac4b5316834814aef248d..e1543e396a15abdbe4736ccb736bfb81
  
    if (rfh->GetParent()) {
      // All manual subframes would be did_create_new_entry and handled above, so
-@@ -1550,7 +1552,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
+@@ -1551,7 +1553,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
      new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
    }
  
@@ -46,10 +46,10 @@ index d50253cb9c4de436ac4ac4b5316834814aef248d..e1543e396a15abdbe4736ccb736bfb81
    // navigation. Now we know that the renderer has updated its state accordingly
    // and it is safe to also clear the browser side history.
 diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
-index 59963787b07a313c490eacc68659a6e8d82f7446..d14687bf175e0957c7e1376065ece95cbc0cbdc2 100644
+index 8d0e981720bb4a0ec4c42f389275fd375c1b1e43..9473f4f7819667d7cc4bfa514955b4e65d69c1c9 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
-@@ -861,10 +861,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
+@@ -850,10 +850,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
  
  void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
    UINT cf_format = format.ToFormatEtc().cfFormat;

+ 1 - 1
patches/chromium/delay_lock_the_protocol_scheme_registry.patch

@@ -19,7 +19,7 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
 re-submitting the patch.
 
 diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
-index b44cfe23beadd7085f3b13f6aab2cc5393f6db5a..a42268219b9a3a83b2f6da47580cfdfd69adacdb 100644
+index a85c25303dfc00f862615f0c6e84135d1d8e175c..27951d85338f81406813a9bfddf402fb1aa81f9d 100644
 --- a/content/app/content_main_runner_impl.cc
 +++ b/content/app/content_main_runner_impl.cc
 @@ -642,7 +642,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {

+ 1 - 1
patches/chromium/disable-redraw-lock.patch

@@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
 can be found at https://github.com/electron/electron/issues/1821
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 5e8d267d868d4a8d90b7c4652c3be4d4df87d500..6838a9bb1b17d66f3653dd81dca616fee7c2ba41 100644
+index 754528f7d280a0b588c491fd928a26e9f32dda76..42eeb16a3d59de7e37eb858a982cc3534ab7cc51 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
 @@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;

+ 8 - 8
patches/chromium/disable_color_correct_rendering.patch

@@ -20,7 +20,7 @@ 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 e6a662a3963fa0a8186e52ef540a6e4babe4c20f..9ed8442978553ff554eef7ba342970f7a705febb 100644
+index c0bdb8cf65f6162911135e11ef58943e7d20716f..b26cd1a4572bdd0c0dfbf343c64c9fde21054304 100644
 --- a/cc/trees/layer_tree_host_impl.cc
 +++ b/cc/trees/layer_tree_host_impl.cc
 @@ -1760,6 +1760,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -35,10 +35,10 @@ index e6a662a3963fa0a8186e52ef540a6e4babe4c20f..9ed8442978553ff554eef7ba342970f7
  
    // If we are likely to software composite the resource, we use sRGB because
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index e5a58655788be3bd1c86e238e34bbadf8012bc48..2a2de85e89a8a0f803b7c987620a259b26281d8d 100644
+index 64fe3c1c3f60758c25f9bc88daedf35633508aa7..a2e9ebb3dc31b4e8665376ffb1f805c6093bce5c 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
-@@ -99,6 +99,8 @@ class CC_EXPORT LayerTreeSettings {
+@@ -98,6 +98,8 @@ class CC_EXPORT LayerTreeSettings {
    bool use_rgba_4444 = false;
    bool unpremultiply_and_dither_low_bit_depth_tiles = false;
  
@@ -48,7 +48,7 @@ index e5a58655788be3bd1c86e238e34bbadf8012bc48..2a2de85e89a8a0f803b7c987620a259b
    // Image Decode Service and raster tiles without images until the decode is
    // ready.
 diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
-index 733d83e802b0c99d5d237ab5d0deea2385c4e899..f3dc39b3bd3e85cd7f68b81210b3bd64b8ae37ee 100644
+index 2e32385af86c6156c4197393248d70c470cdd4b5..350f56238e1c01cc6073555933f57df8cafca050 100644
 --- a/components/viz/common/display/renderer_settings.h
 +++ b/components/viz/common/display/renderer_settings.h
 @@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
@@ -60,7 +60,7 @@ index 733d83e802b0c99d5d237ab5d0deea2385c4e899..f3dc39b3bd3e85cd7f68b81210b3bd64
    bool force_antialiasing = false;
    bool force_blending_with_shaders = false;
 diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
-index b06ea5f9fe36162dc9bcec32f604b1a8fc10f825..d53e7a0055dbdfe937a51939a312272317749f2a 100644
+index 5575c90cf05ec43bc787711f1d44b8dd58ead99c..a544d836159522751c1262370d8c156220662c0f 100644
 --- a/components/viz/host/renderer_settings_creation.cc
 +++ b/components/viz/host/renderer_settings_creation.cc
 @@ -16,6 +16,7 @@
@@ -241,10 +241,10 @@ index de4eadaf7be8be95fc0ad454d66c8ec397cfc20a..d4c451ea992490befb34b3690a98d968
      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 616cf2720a1c5bd496dcaa3d6e93f6b5443bf84d..dde0c4aa87f334dc6ca68b6a2843d33f485221ca 100644
+index 74f19cb9c196510c19daffcd98c1577ec541ea54..0a65b9be576a437cc036af211230292d2c2c3c03 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -226,6 +226,7 @@
+@@ -225,6 +225,7 @@
  #include "ui/accessibility/accessibility_switches.h"
  #include "ui/base/ui_base_switches.h"
  #include "ui/display/display_switches.h"
@@ -258,7 +258,7 @@ index 616cf2720a1c5bd496dcaa3d6e93f6b5443bf84d..dde0c4aa87f334dc6ca68b6a2843d33f
    static const char* const kSwitchNames[] = {
 +    switches::kDisableColorCorrectRendering,
      network::switches::kExplicitlyAllowedPorts,
-     service_manager::switches::kDisableInProcessStackTraces,
+     switches::kDisableInProcessStackTraces,
      sandbox::policy::switches::kDisableSeccompFilterSandbox,
 diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
 index 0501709a855b9fae82ab06c4e143b42058ddc12e..e0a457aab29acda134d1da9c798b5472c9bdb627 100644

+ 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 2fde2824d4eeb6c4ce5e95a175183fa3f5061fbb..f388b66fbd3182c58ced63476b002f2d3a44b5d8 100644
+index 0a0784d4ba5c409eb2dbd370cace906a63fbbc05..42b8addaecb58e53fe0d5d684ccb3c110919a3ba 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
-@@ -482,7 +482,11 @@
+@@ -481,7 +481,11 @@
      return;
  
    host()->WasHidden();

+ 5 - 5
patches/chromium/disable_hidden.patch

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
 Electron uses this to disable background throttling for hidden windows.
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index ac1771ff9c3a99ef475ed549d5e29865ddec36af..92353f412ba6d4c25e93f22b9a43442db974b31f 100644
+index 529a5b71b9987be21bfb1494b420ef88bbd17f7a..19d7421e1de9680a8b1364f010e19cc95ef7325a 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -693,6 +693,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -692,6 +692,9 @@ void RenderWidgetHostImpl::WasHidden() {
    if (is_hidden_)
      return;
  
@@ -20,7 +20,7 @@ index ac1771ff9c3a99ef475ed549d5e29865ddec36af..92353f412ba6d4c25e93f22b9a43442d
        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 e6cef26a861b3c2404a1e2ed9e06cc1d89459b90..5bda74c18abecd08f471d8735f88d2c59415a13e 100644
+index 9d7d10136a683620d6fb67246aae51df982930d0..c119dd8916fe2fbde97ce91cce6f788fc62f3534 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
 @@ -173,6 +173,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -34,10 +34,10 @@ index e6cef26a861b3c2404a1e2ed9e06cc1d89459b90..5bda74c18abecd08f471d8735f88d2c5
        const base::TimeDelta& delay) {
      new_content_rendering_delay_ = delay;
 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 934ab262a5785872a8a389dc5fec1a898fe1e7f7..b2b095e2b5ddead325351fadb16a9ab0b361cd32 100644
+index f6cd4515bf8ffb750a7499ee81b213cf964b4491..5a5f32e94e17bcd82e1e1a86d970ea0b4ea1e8dc 100644
 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
-@@ -627,7 +627,7 @@ void RenderWidgetHostViewAura::HideImpl() {
+@@ -625,7 +625,7 @@ void RenderWidgetHostViewAura::HideImpl() {
    DCHECK(visibility_ == Visibility::HIDDEN ||
           visibility_ == Visibility::OCCLUDED);
  

+ 5 - 5
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
    DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
  };
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index fe30fc94f752e08839913868b8464a349fe541fe..0c2c48ef148adaba81b16e6354e4098100afbca6 100644
+index f67b3159bb13d4892e656c18b5120c4901666344..7661dfc65295cdea2ee554a086c68cea4d8c4e9e 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1081,6 +1081,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1082,6 +1082,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,7 +51,7 @@ index fe30fc94f752e08839913868b8464a349fe541fe..0c2c48ef148adaba81b16e6354e40981
    // 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 e2a565663abea1b13beaaa33e83d8102da693e35..407e89a436905f562464536a4cd353346a8a4cce 100644
+index 1372f6f6ca4899cc7b230a3cd1b26db4c16325b5..0e2c067837cd180ad9b99c082487199d72e5a0ed 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -244,6 +244,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index e2a565663abea1b13beaaa33e83d8102da693e35..407e89a436905f562464536a4cd35334
    void SetEnableReferrers(bool enable_referrers) override;
  #if defined(OS_CHROMEOS)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 2163ef65ae5faec671f4f3ad93c36d069f598ac6..b4d200164829d0d34c2511a07eb0cc3d046d6fa3 100644
+index e45dff2ab8abd378da7886b5becfcb673f5dc642..0f9d88529021db245fb498dfa339e5327450256a 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -1072,6 +1072,9 @@ interface NetworkContext {
+@@ -1057,6 +1057,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  

+ 2 - 2
patches/chromium/feat_add_set_theme_source_to_allow_apps_to.patch

@@ -62,10 +62,10 @@ index e2ca7dd198390ebc923facd690904faeb8300e62..f2f53775abb0ba2954cbb3ec431d84c3
  };
  
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index 74afe95ebec7f14836b4a5f4c3689f5acc5774cb..349a61a4ea8e6d84f120cfb0a0cd5b608475fe1e 100644
+index eaf817b4b5400fa4d2b6af7c86ac69aabf030a38..0f702be38f8e015c4e61677db5cf566259650dc6 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -736,6 +736,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
+@@ -737,6 +737,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
    // ...unless --force-dark-mode was specified in which case caveat emptor.
    if (UsesHighContrastColors() && !IsForcedDarkMode())
      return false;

+ 24 - 24
patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch

@@ -6,7 +6,7 @@ Subject: feat: 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 aeb9f114b7306a54813584d9c074a0569ad10039..56aeaa5a8182551ead6418009c5687161fbc158c 100644
+index 5326b36457f2494dd729843d5c4dfdd0fed1db6c..f2f8af757a3023b097a7ebf582aae73552456ae4 100644
 --- a/content/browser/renderer_host/render_view_host_impl.cc
 +++ b/content/browser/renderer_host/render_view_host_impl.cc
 @@ -587,6 +587,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -21,7 +21,7 @@ index aeb9f114b7306a54813584d9c074a0569ad10039..56aeaa5a8182551ead6418009c568716
    return is_active();
  }
 diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
-index 1f01a5e961e8659b9fa3cbf7198dcff98d52c010..460fb0b3e4b8747b5673c2b9e692d7d48a5ef082 100644
+index a696cf25461ccf82570c459f3497df5e5913b401..41993d7f69e2bb91c06f379d4cbe9e2ed62da669 100644
 --- a/content/browser/renderer_host/render_view_host_impl.h
 +++ b/content/browser/renderer_host/render_view_host_impl.h
 @@ -126,6 +126,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -33,7 +33,7 @@ index 1f01a5e961e8659b9fa3cbf7198dcff98d52c010..460fb0b3e4b8747b5673c2b9e692d7d4
    void SendWebPreferencesToRenderer();
  
 diff --git a/content/common/view_messages.h b/content/common/view_messages.h
-index 3f7794f80f67cfdf410d3cef6a30ff5ebd451c89..f83ee36f0031807dddb80e48121e6382a85280e9 100644
+index e89e812135749179ca63807fd2655074609d1a1c..596e83f9e74fd2f2ab0d49fba857acbc1b27da2c 100644
 --- a/content/common/view_messages.h
 +++ b/content/common/view_messages.h
 @@ -94,6 +94,9 @@ IPC_STRUCT_TRAITS_END()
@@ -43,11 +43,11 @@ index 3f7794f80f67cfdf410d3cef6a30ff5ebd451c89..f83ee36f0031807dddb80e48121e6382
 +// Whether to enable the Renderer scheduler background throttling.
 +IPC_MESSAGE_ROUTED1(ViewMsg_SetSchedulerThrottling, bool /* allowed */)
 +
- // This passes a set of webkit preferences down to the renderer.
- IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
-                     blink::web_pref::WebPreferences)
+ // Notification that a move or resize renderer's containing window has
+ // started.
+ IPC_MESSAGE_ROUTED0(ViewMsg_MoveOrResizeStarted)
 diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
-index 50601f801e08a90d8556007617a0310bc3bfe2e3..f1f03eb2eb91567cbda2f8b9abe9979ec7ba3e57 100644
+index 8a0e60f3a783fd9e21c0d03e23ba421b94fc1ecd..577bf986f9efa45d432ce017663daeb8e9369729 100644
 --- a/content/public/browser/render_view_host.h
 +++ b/content/public/browser/render_view_host.h
 @@ -95,6 +95,9 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
@@ -61,19 +61,19 @@ index 50601f801e08a90d8556007617a0310bc3bfe2e3..f1f03eb2eb91567cbda2f8b9abe9979e
    // This interface should only be implemented inside content.
    friend class RenderViewHostImpl;
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index 554e4800766a8ca087ba32dfea9fa1c61bca5cd7..712ad04658c7e0018e4eca57426531611642da85 100644
+index f6697538b5717a12a6d29704bc49de0b6e632417..1962b245ef84156a2c74700f277370d6be4a1fa5 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
-@@ -575,6 +575,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
+@@ -585,6 +585,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
  
    bool handled = true;
    IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
 +    IPC_MESSAGE_HANDLER(ViewMsg_SetSchedulerThrottling,
 +                        OnSetSchedulerThrottling)
-     IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
      IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
  
-@@ -976,6 +978,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
+     // Page messages.
+@@ -988,6 +990,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
    return send_content_state_immediately_;
  }
  
@@ -83,23 +83,23 @@ index 554e4800766a8ca087ba32dfea9fa1c61bca5cd7..712ad04658c7e0018e4eca5742653161
 +  GetWebView()->SetSchedulerThrottling(allowed);
 +}
 +
- void RenderViewImpl::OnUpdateWebPreferences(
-     const blink::web_pref::WebPreferences& prefs) {
-   webview_->SetWebPreferences(prefs);
+ void RenderViewImpl::OnSetRendererPrefs(
+     const blink::mojom::RendererPreferences& renderer_prefs) {
+   std::string old_accept_languages = renderer_preferences_.accept_languages;
 diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
-index 7ac886eb51cb5c2ea46c46aeb529450b544b5579..87db09d180f7f6c0cfe027da0c53fc089b58dfa2 100644
+index f5d2a7ad743ff96660310de9fe63cc486eef8040..1a142ebfb9d6a1f9b1e2112f41ad49c697833228 100644
 --- a/content/renderer/render_view_impl.h
 +++ b/content/renderer/render_view_impl.h
-@@ -363,6 +363,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
+@@ -367,6 +367,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
    void OnExitFullscreen();
    void OnSetRendererPrefs(
        const blink::mojom::RendererPreferences& renderer_prefs);
 +  void OnSetSchedulerThrottling(bool allowed);
    void OnSuppressDialogsUntilSwapOut();
-   void OnUpdateWebPreferences(const blink::web_pref::WebPreferences& prefs);
  
+   // Page message handlers -----------------------------------------------------
 diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
-index 3f3814b3a50b6d49d67b6a991273e8759ec9a6db..a5c51053b976353c6305cbddb59a83887f46d4b6 100644
+index 3bcd1065f3dc01fa3b437a5e1b53c416b2db7b4e..a54d0865da4d2022308b8ca9f4b3311f4fb6df78 100644
 --- a/third_party/blink/public/web/web_view.h
 +++ b/third_party/blink/public/web/web_view.h
 @@ -415,6 +415,7 @@ class WebView {
@@ -111,10 +111,10 @@ index 3f3814b3a50b6d49d67b6a991273e8759ec9a6db..a5c51053b976353c6305cbddb59a8388
    // 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 cf0cef2ba297fab21f63086349d47c5b51f9688a..b63db8290623c90b4493c62aeaa0e46abd54d99e 100644
+index 9c1a8efc3516893cd161673a3ba95ed9f7cfdff1..858b5faeb709d4defe39dbc519e37232cb17eeb2 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.cc
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
-@@ -4176,6 +4176,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
+@@ -4171,6 +4171,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
    return GetPage()->GetPageScheduler();
  }
  
@@ -128,7 +128,7 @@ index cf0cef2ba297fab21f63086349d47c5b51f9688a..b63db8290623c90b4493c62aeaa0e46a
  void WebViewImpl::SetVisibilityState(
      mojom::blink::PageVisibilityState visibility_state,
      bool is_initial_state) {
-@@ -4186,7 +4193,8 @@ void WebViewImpl::SetVisibilityState(
+@@ -4181,7 +4188,8 @@ void WebViewImpl::SetVisibilityState(
    }
    GetPage()->SetVisibilityState(visibility_state, is_initial_state);
    GetPage()->GetPageScheduler()->SetPageVisible(
@@ -139,10 +139,10 @@ index cf0cef2ba297fab21f63086349d47c5b51f9688a..b63db8290623c90b4493c62aeaa0e46a
  
  mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
 diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
-index 0ecf3ca2bd69868a0e950ec83140a0a230e96914..741cfc5f8736f0b417222a99220543418d865a4a 100644
+index 64c52801dbfcd2c98df4ef25b51fe271cba9d22a..61e72e405bffd4707edd35b89690b83e85f60021 100644
 --- a/third_party/blink/renderer/core/exported/web_view_impl.h
 +++ b/third_party/blink/renderer/core/exported/web_view_impl.h
-@@ -352,6 +352,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -354,6 +354,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    LocalDOMWindow* PagePopupWindow() const;
  
    PageScheduler* Scheduler() const override;
@@ -150,7 +150,7 @@ index 0ecf3ca2bd69868a0e950ec83140a0a230e96914..741cfc5f8736f0b417222a9922054341
    void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
                            bool is_initial_state) override;
    mojom::blink::PageVisibilityState GetVisibilityState() override;
-@@ -763,6 +764,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
+@@ -762,6 +763,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
    // WebViewImpl::Close while handling an input event.
    bool debug_inside_input_handling_ = false;
  

+ 3 - 3
patches/chromium/feat_enable_offscreen_rendering_with_viz_compositor.patch

@@ -527,7 +527,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index 706c9cf26cb65b7874b88ed1015c18a1ef3f0ea7..e28267802a3349920e417cf31f588bc9827230e0 100644
+index 32cdffd116b768fe20f556a1cebd90e269754bd1..eab5ccc8239e0a5ae84a3bcb97bdfdaee4236801 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
 @@ -75,6 +75,7 @@ class ExternalBeginFrameController;
@@ -536,7 +536,7 @@ index 706c9cf26cb65b7874b88ed1015c18a1ef3f0ea7..e28267802a3349920e417cf31f588bc9
  class ContextProvider;
 +class HostDisplayClient;
  class HostFrameSinkManager;
- class LocalSurfaceIdAllocation;
+ class LocalSurfaceId;
  class RasterContextProvider;
 @@ -128,6 +129,15 @@ class COMPOSITOR_EXPORT ContextFactory {
    virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
@@ -564,7 +564,7 @@ index 706c9cf26cb65b7874b88ed1015c18a1ef3f0ea7..e28267802a3349920e417cf31f588bc9
    // Sets the root of the layer tree drawn by this Compositor. The root layer
    // must have no parent. The compositor's root layer is reset if the root layer
    // is destroyed. NULL can be passed to reset the root layer, in which case the
-@@ -431,6 +444,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -430,6 +443,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
  
    std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
  

+ 2 - 2
patches/chromium/fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch

@@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
 to true as then Chromiums assumptions around processes become correct.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 022e4a2aa0442939ef7bd5fde67470c2847f116f..60394e536151d928e7a067c9e0bb98946bb94ff2 100644
+index 06fbfdc22bd7cc11117783fd37bc4562ff490b64..859998ef6f7893600d3471c18870d065623d9832 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -3068,11 +3068,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
+@@ -3069,11 +3069,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
      WebContentsImpl* outermost = GetOutermostWebContents();
      if (event.button == blink::WebPointerProperties::Button::kBack &&
          outermost->controller_.CanGoBack()) {

+ 25 - 25
patches/chromium/frame_host_manager.patch

@@ -8,7 +8,7 @@ and respond with custom instance. Also allows for us to at-runtime
 enable or disable this patch.
 
 diff --git a/content/browser/browsing_instance.cc b/content/browser/browsing_instance.cc
-index b5a6cce52d5a49d52e40f4806adc58704f186a3e..e9d94fe452b655382db62125758f9f73b10c29a0 100644
+index 732f2711719621ce42a0b13a6035954bada67ab9..62775b566d6e11a06a2516f9c1097b5ad5725247 100644
 --- a/content/browser/browsing_instance.cc
 +++ b/content/browser/browsing_instance.cc
 @@ -91,6 +91,13 @@ scoped_refptr<SiteInstanceImpl> BrowsingInstance::GetSiteInstanceForURL(
@@ -18,19 +18,19 @@ index b5a6cce52d5a49d52e40f4806adc58704f186a3e..e9d94fe452b655382db62125758f9f73
 +scoped_refptr<SiteInstanceImpl> BrowsingInstance::CreateSiteInstanceForURL(
 +    const GURL& url) {
 +  scoped_refptr<SiteInstanceImpl> instance = new SiteInstanceImpl(this);
-+  instance->SetSite(url);
++  instance->SetSite(UrlInfo(url, false));
 +  return instance;
 +}
 +
- SiteInfo BrowsingInstance::GetSiteInfoForURL(const GURL& url,
+ SiteInfo BrowsingInstance::GetSiteInfoForURL(const UrlInfo& url_info,
                                               bool allow_default_instance) {
    scoped_refptr<SiteInstanceImpl> site_instance =
 diff --git a/content/browser/browsing_instance.h b/content/browser/browsing_instance.h
-index bc0c8821f6a871a5d09f6e9fd97f52abe126370b..06a6b7805f710be51c84a3882922d9602cd7d80d 100644
+index 75a58c7f56ef990e340ef271aa2d057f3541c47d..ab2679680111cfdc260c8d8dafbfae004f35b8b7 100644
 --- a/content/browser/browsing_instance.h
 +++ b/content/browser/browsing_instance.h
-@@ -148,6 +148,11 @@ class CONTENT_EXPORT BrowsingInstance final
-       const GURL& url,
+@@ -150,6 +150,11 @@ class CONTENT_EXPORT BrowsingInstance final
+       const UrlInfo& url_info,
        bool allow_default_instance);
  
 +  // Create a new SiteInstance for the given URL bound the current
@@ -42,10 +42,10 @@ index bc0c8821f6a871a5d09f6e9fd97f52abe126370b..06a6b7805f710be51c84a3882922d960
    // another SiteInstance for the same site.
    void RegisterSiteInstance(SiteInstanceImpl* site_instance);
 diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
-index 9e83a156d7e1341054817765c347a9f91e31c669..071dc64c664d07796c420483813fd9bd36c8e170 100644
+index 7253ef9c4e55ff6a0122d20ea3fd25c70141b284..b5e83b64acab066fcb42451334071a72442465d1 100644
 --- a/content/browser/renderer_host/navigation_request.cc
 +++ b/content/browser/renderer_host/navigation_request.cc
-@@ -1394,6 +1394,21 @@ void NavigationRequest::BeginNavigation() {
+@@ -1396,6 +1396,21 @@ void NavigationRequest::BeginNavigation() {
      // it immediately.
      EnterChildTraceEvent("ResponseStarted", this);
  
@@ -67,7 +67,7 @@ index 9e83a156d7e1341054817765c347a9f91e31c669..071dc64c664d07796c420483813fd9bd
      // Select an appropriate RenderFrameHost.
      render_frame_host_ =
          frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
-@@ -5041,6 +5056,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
+@@ -5058,6 +5073,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
            {WILL_START_REQUEST, {
                WILL_REDIRECT_REQUEST,
                WILL_PROCESS_RESPONSE,
@@ -75,7 +75,7 @@ index 9e83a156d7e1341054817765c347a9f91e31c669..071dc64c664d07796c420483813fd9bd
                READY_TO_COMMIT,
                DID_COMMIT,
                CANCELING,
-@@ -5054,10 +5070,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
+@@ -5071,10 +5087,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
                WILL_FAIL_REQUEST,
            }},
            {WILL_PROCESS_RESPONSE, {
@@ -91,7 +91,7 @@ index 9e83a156d7e1341054817765c347a9f91e31c669..071dc64c664d07796c420483813fd9bd
                NOT_STARTED,
                DID_COMMIT,
 diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h
-index 8d82710542bce9cd7491221c59071b1b9f32c24b..1c6e0d8ed3798be6ad0bd70d719c9c88cef475e3 100644
+index 8ed463f9f7255bdd74471d3d06c17044c68bc953..c31a9e5a4a14e2c3f745b297ebe7355383c2b8bb 100644
 --- a/content/browser/renderer_host/navigation_request.h
 +++ b/content/browser/renderer_host/navigation_request.h
 @@ -129,6 +129,10 @@ class CONTENT_EXPORT NavigationRequest
@@ -106,10 +106,10 @@ index 8d82710542bce9cd7491221c59071b1b9f32c24b..1c6e0d8ed3798be6ad0bd70d719c9c88
      READY_TO_COMMIT,
  
 diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
-index abe9ae05e7b505c8c0cddbee7bf3d5e186548458..bf58d0f65e161e61d8303f5652f2d348ba2cbd6a 100644
+index 0e0e806b54dc8eae7db6193ccde5cc9181f53c23..0597be2ec564b89e330bfa33bea771a042922c5d 100644
 --- a/content/browser/renderer_host/render_frame_host_manager.cc
 +++ b/content/browser/renderer_host/render_frame_host_manager.cc
-@@ -2550,6 +2550,16 @@ void RenderFrameHostManager::GetCoopCoepCrossOriginIsolationInfo(
+@@ -2563,6 +2563,16 @@ void RenderFrameHostManager::GetCoopCoepCrossOriginIsolationInfo(
  scoped_refptr<SiteInstance>
  RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      NavigationRequest* request) {
@@ -126,7 +126,7 @@ index abe9ae05e7b505c8c0cddbee7bf3d5e186548458..bf58d0f65e161e61d8303f5652f2d348
    SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
  
    // All children of MHTML documents must be MHTML documents. They all live in
-@@ -2569,10 +2579,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2582,10 +2592,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
    //
    // TODO(clamy): We should also consider as a candidate SiteInstance the
    // speculative SiteInstance that was computed on redirects.
@@ -191,7 +191,7 @@ index abe9ae05e7b505c8c0cddbee7bf3d5e186548458..bf58d0f65e161e61d8303f5652f2d348
  
    // Account for renderer-initiated reload as well.
    // Needed as a workaround for https://crbug.com/1045524, remove it when it is
-@@ -2615,6 +2675,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2628,6 +2688,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      request->ResetStateForSiteInstanceChange();
    }
  
@@ -202,10 +202,10 @@ index abe9ae05e7b505c8c0cddbee7bf3d5e186548458..bf58d0f65e161e61d8303f5652f2d348
  }
  
 diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
-index ed973ac9ee40abc70ead81fba83573592dfd3efc..40c57cadaae712495bf28f0065ff4751c06629db 100644
+index 55f8ac07069b4a138354648debae5a8733b9e2fa..29c9cdb4fe7a33f664fcdefdcd834b12b8719e06 100644
 --- a/content/browser/site_instance_impl.cc
 +++ b/content/browser/site_instance_impl.cc
-@@ -600,6 +600,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
+@@ -610,6 +610,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
    return browsing_instance_->HasSiteInstance(site_info);
  }
  
@@ -215,12 +215,12 @@ index ed973ac9ee40abc70ead81fba83573592dfd3efc..40c57cadaae712495bf28f0065ff4751
 +
  scoped_refptr<SiteInstance> SiteInstanceImpl::GetRelatedSiteInstance(
      const GURL& url) {
-   return browsing_instance_->GetSiteInstanceForURL(
+   return GetRelatedSiteInstanceImpl(
 diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
-index ecebcc5d30f66ef30325bb3cc0b367d3d9de2c82..f1a27bf06e416d876efe095f6f81acf26183fb83 100644
+index 6b317deaf6ecf0932116d93a5ffd5180a12d87c8..6a098f45d69e77ea9cf63fa1c6310cd26f7d8057 100644
 --- a/content/browser/site_instance_impl.h
 +++ b/content/browser/site_instance_impl.h
-@@ -231,6 +231,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
+@@ -287,6 +287,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
    BrowserContext* GetBrowserContext() override;
    const GURL& GetSiteURL() override;
    scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
@@ -229,7 +229,7 @@ index ecebcc5d30f66ef30325bb3cc0b367d3d9de2c82..f1a27bf06e416d876efe095f6f81acf2
    size_t GetRelatedActiveContentsCount() override;
    bool RequiresDedicatedProcess() override;
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 0c15d9a28e9b54f7adbe303c341cda42a6cffb73..2d2c8e61063ed3c34e4eb40a31ec62affcbe1f66 100644
+index cafd45df059293bc1cf31e1d7b798e67578f3e9d..c196b783fe0a43bfee98253afe8461a0be18438f 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -63,6 +63,21 @@
@@ -255,10 +255,10 @@ index 0c15d9a28e9b54f7adbe303c341cda42a6cffb73..2d2c8e61063ed3c34e4eb40a31ec62af
      const MainFunctionParams& parameters) {
    return nullptr;
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 2b8c354a39677e91d25451044cc06d6343a510f9..464df770f76bacd7556dae52c7d59aa07d19762e 100644
+index 9953cc472c04c2dc6ae0f70b64ea2b8d6ac86a05..5200555594d41f52bcf208b55c346323d7017b81 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -252,8 +252,45 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -253,8 +253,45 @@ class CONTENT_EXPORT ContentBrowserClient {
    using IsClipboardPasteAllowedCallback =
        base::OnceCallback<void(ClipboardPasteAllowed)>;
  
@@ -305,10 +305,10 @@ index 2b8c354a39677e91d25451044cc06d6343a510f9..464df770f76bacd7556dae52c7d59aa0
    // implementations for the browser startup code. See comments in
    // browser_main_parts.h.
 diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h
-index 0e6c3d076a02cd1b356745e514b9de9d32e4b00c..76647f1c5e9ee401fbf3def6ccfe73372f622548 100644
+index a721f2fbab6e621085a8c7806abd92b8077340a8..e9b936e05e1d6ac8ea6eb5eb4d412b37ae4acc86 100644
 --- a/content/public/browser/site_instance.h
 +++ b/content/public/browser/site_instance.h
-@@ -134,6 +134,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {
+@@ -135,6 +135,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {
    //   corresponds to a site URL with the host "example.com".
    virtual const GURL& GetSiteURL() = 0;
  

+ 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 9ee0acf3ade8dd4789f40a2b17bfeabbfa5e3cf8..edd5b3858cdcb40e0aeb0b35cd711ed0a1652e5f 100644
+index a411c2a5788df546764d5c4493dff876a8c93156..d545578f54e238277b574c57c2da9e7b972ae607 100644
 --- a/tools/gritsettings/resource_ids.spec
 +++ b/tools/gritsettings/resource_ids.spec
-@@ -675,6 +675,11 @@
+@@ -678,6 +678,11 @@
      "includes": [3880],
    },
  

+ 4 - 4
patches/chromium/mas-cfisobjc.patch

@@ -6,10 +6,10 @@ Subject: mas-cfisobjc.patch
 Removes usage of the _CFIsObjC private API.
 
 diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
-index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a91027bf05 100644
+index e63f0ec0e2e618a4b280a08d14a619e1186e0466..225c6b83515c7b530ac59b1af7ac2194483f0311 100644
 --- a/base/mac/foundation_util.mm
 +++ b/base/mac/foundation_util.mm
-@@ -28,12 +28,6 @@
+@@ -29,12 +29,6 @@
  #if !defined(OS_IOS)
  CFTypeID SecACLGetTypeID();
  CFTypeID SecTrustedApplicationGetTypeID();
@@ -22,7 +22,7 @@ index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a9
  #endif
  }  // extern "C"
  
-@@ -326,8 +320,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
+@@ -327,8 +321,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
        const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
    DCHECK(!cf_val ||
           CTFontGetTypeID() == CFGetTypeID(cf_val) ||
@@ -32,7 +32,7 @@ index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a9
    return ns_val;
  }
  
-@@ -398,9 +391,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
+@@ -399,9 +392,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
      return (CTFontRef)(cf_val);
    }
  

+ 12 - 12
patches/chromium/mas_disable_remote_accessibility.patch

@@ -90,7 +90,7 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a
    DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
  };
 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 76a552ec5c9db4f2ffade1a809fa6d719105295a..b432685a5c4dc99618663c13e43ee971a5c8b542 100644
+index c46876b6533c8cfb8b59449e4029b7e20a551bdd..9a2d070791020d86ea5ee0164068037d1ca7bf37 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.h
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.h
 @@ -47,7 +47,9 @@ class ScopedPasswordInputEnabler;
@@ -103,7 +103,7 @@ index 76a552ec5c9db4f2ffade1a809fa6d719105295a..b432685a5c4dc99618663c13e43ee971
  @class RenderWidgetHostViewCocoa;
  
  namespace content {
-@@ -647,10 +649,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
+@@ -646,10 +648,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
    // EnsureSurfaceSynchronizedForWebTest().
    uint32_t latest_capture_sequence_number_ = 0u;
  
@@ -117,7 +117,7 @@ index 76a552ec5c9db4f2ffade1a809fa6d719105295a..b432685a5c4dc99618663c13e43ee971
    // 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 338811a3c01f2adac24f851e6952a5562965afaf..2fde2824d4eeb6c4ce5e95a175183fa3f5061fbb 100644
+index b9b67b25e1eba3a1a3ed720e5f2f898fc04bbc5d..0a0784d4ba5c409eb2dbd370cace906a63fbbc05 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -235,8 +235,10 @@
@@ -131,7 +131,7 @@ index 338811a3c01f2adac24f851e6952a5562965afaf..2fde2824d4eeb6c4ce5e95a175183fa3
  
    // Disconnect from the previous bridge (this will have the effect of
    // destroying the associated bridge), and close the receiver (to allow it
-@@ -1388,8 +1390,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1385,8 +1387,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  gfx::NativeViewAccessible
  RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -142,7 +142,7 @@ index 338811a3c01f2adac24f851e6952a5562965afaf..2fde2824d4eeb6c4ce5e95a175183fa3
    return [GetInProcessNSView() window];
  }
  
-@@ -1421,9 +1425,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1418,9 +1422,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  }
  
  void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -154,7 +154,7 @@ index 338811a3c01f2adac24f851e6952a5562965afaf..2fde2824d4eeb6c4ce5e95a175183fa3
  }
  
  bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
-@@ -1910,12 +1916,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
+@@ -1907,12 +1913,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
  
  void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
      const std::vector<uint8_t>& window_token) {
@@ -170,10 +170,10 @@ index 338811a3c01f2adac24f851e6952a5562965afaf..2fde2824d4eeb6c4ce5e95a175183fa3
  
  ///////////////////////////////////////////////////////////////////////////////
 diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
-index 7f993aa14fc1f179f4fa952241761bb826c787e9..fa6d313fb4e061dc34409696945241c9be0a0dfa 100644
+index 60d58740ef212431f9e3125ae5dff627bec4efc2..de44c307c2261f88bca6b35b3f6948b59007669b 100644
 --- a/ui/base/BUILD.gn
 +++ b/ui/base/BUILD.gn
-@@ -313,6 +313,13 @@ component("base") {
+@@ -307,6 +307,13 @@ component("base") {
      ]
    }
  
@@ -236,10 +236,10 @@ index 492386c61ac6701fc38c5e90976b4e5f638189de..6050916081ebeb426ee6cf5dd67962f0
    // 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 39c39c1585e71e276cbbd073c81eac2b3f0ed655..ae5bd658ed21d03710fe3aa7d9f19cce9476fac4 100644
+index 20e8cb0b4aec5a71f496feb6069ac68e03f9f47a..3ea70bea36f8660779d06dfb12eda3aa65675bd4 100644
 --- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
 +++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
-@@ -283,14 +283,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -284,14 +284,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
    if (in_process_ns_window_bridge_)
      return in_process_ns_window_bridge_->ns_view();
@@ -262,7 +262,7 @@ index 39c39c1585e71e276cbbd073c81eac2b3f0ed655..ae5bd658ed21d03710fe3aa7d9f19cce
  }
  
  remote_cocoa::mojom::NativeWidgetNSWindow*
-@@ -1121,6 +1129,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1130,6 +1138,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
  void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
      const std::vector<uint8_t>& window_token,
      const std::vector<uint8_t>& view_token) {
@@ -270,7 +270,7 @@ index 39c39c1585e71e276cbbd073c81eac2b3f0ed655..ae5bd658ed21d03710fe3aa7d9f19cce
    remote_window_accessible_ =
        ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
    remote_view_accessible_ =
-@@ -1128,14 +1137,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
+@@ -1137,14 +1146,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
    [remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
    [remote_view_accessible_
        setTopLevelUIElement:remote_window_accessible_.get()];

+ 15 - 15
patches/chromium/mas_no_private_api.patch

@@ -7,10 +7,10 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
 excluded for people who want to submit their apps to the Mac App store.
 
 diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
-index 12aa59f04809f8092f2f0e9640bd6fe2b4c68ac2..34c1a25f8bedafd96effcca60d36bb7f95433e52 100644
+index cf5658313ec9a1b771ebc445610979750d63b021..0bcdb66f8e5dd408729454bececad4dc2e15a971 100644
 --- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
 +++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
-@@ -379,7 +379,7 @@ OptionalNSObject InvokeAttributeFor(
+@@ -312,7 +312,7 @@ OptionalNSObject InvokeAttributeFor(
        0 == strcmp([value objCType], @encode(NSRange))) {
      return PopulateRange([value rangeValue]);
    }
@@ -19,7 +19,7 @@ index 12aa59f04809f8092f2f0e9640bd6fe2b4c68ac2..34c1a25f8bedafd96effcca60d36bb7f
    // AXTextMarker
    if (content::IsAXTextMarker(value)) {
      return PopulateTextPosition(content::AXTextMarkerToPosition(value).get(),
-@@ -390,7 +390,7 @@ OptionalNSObject InvokeAttributeFor(
+@@ -323,7 +323,7 @@ OptionalNSObject InvokeAttributeFor(
    if (content::IsAXTextMarkerRange(value)) {
      return PopulateTextMarkerRange(value, line_indexer);
    }
@@ -28,7 +28,7 @@ index 12aa59f04809f8092f2f0e9640bd6fe2b4c68ac2..34c1a25f8bedafd96effcca60d36bb7f
    // AXValue
    if (CFGetTypeID(value) == AXValueGetTypeID()) {
      AXValueType type = AXValueGetType(static_cast<AXValueRef>(value));
-@@ -500,7 +500,7 @@ OptionalNSObject InvokeAttributeFor(
+@@ -433,7 +433,7 @@ OptionalNSObject InvokeAttributeFor(
                      kConstValuePrefix + affinity);
    return set;
  }
@@ -37,7 +37,7 @@ index 12aa59f04809f8092f2f0e9640bd6fe2b4c68ac2..34c1a25f8bedafd96effcca60d36bb7f
  base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
      id object,
      const LineIndexer* line_indexer) const {
-@@ -514,7 +514,7 @@ OptionalNSObject InvokeAttributeFor(
+@@ -447,7 +447,7 @@ OptionalNSObject InvokeAttributeFor(
    dict.SetPath("focus", PopulateTextPosition(range.focus(), line_indexer));
    return dict;
  }
@@ -47,10 +47,10 @@ index 12aa59f04809f8092f2f0e9640bd6fe2b4c68ac2..34c1a25f8bedafd96effcca60d36bb7f
      NSArray* node_array,
      const LineIndexer* line_indexer) const {
 diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
-index 540afa34eb0ab6597f799767988b3d8cb8f4bb9c..feb109c62708d107cc475d8332cd1f969969733b 100644
+index 320751d301f7cebe40e59127a1a631a010009385..11fabe50abd47d0b0a7ff24a3b979067452f53db 100644
 --- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
 +++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
-@@ -267,6 +267,7 @@ id ParameterizedAttributeValueOf(const id node,
+@@ -156,6 +156,7 @@
    if (property_name == "AXIndexForChildUIElement") {  // UIElement
      return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
    }
@@ -58,7 +58,7 @@ index 540afa34eb0ab6597f799767988b3d8cb8f4bb9c..feb109c62708d107cc475d8332cd1f96
    if (property_name == "AXIndexForTextMarker") {  // TextMarker
      return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node));
    }
-@@ -274,6 +275,7 @@ id ParameterizedAttributeValueOf(const id node,
+@@ -163,6 +164,7 @@
      return OptionalNSObject::NotNilOrError(
          PropertyNodeToTextMarkerRange(arg_node));
    }
@@ -66,7 +66,7 @@ index 540afa34eb0ab6597f799767988b3d8cb8f4bb9c..feb109c62708d107cc475d8332cd1f96
  
    return OptionalNSObject::NotApplicable();
  }
-@@ -339,6 +341,7 @@ id ParameterizedAttributeValueOf(const id node,
+@@ -228,6 +230,7 @@
    return uielement;
  }
  
@@ -74,7 +74,7 @@ index 540afa34eb0ab6597f799767988b3d8cb8f4bb9c..feb109c62708d107cc475d8332cd1f96
  id AttributeInvoker::DictNodeToTextMarker(const PropertyNode& dictnode) const {
    if (!dictnode.IsDict()) {
      TEXTMARKER_FAIL(dictnode, "dictionary is expected")
-@@ -406,6 +409,7 @@ id ParameterizedAttributeValueOf(const id node,
+@@ -295,6 +298,7 @@
  
    return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker);
  }
@@ -369,10 +369,10 @@ index cf856f59f0e1990cb9b249ab264a87c27f452525..96b6fa030c2a36ab5c4217ad19f0bfe4
    return nil;
  }
 diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-index f77433fff5426dd174865aad3d290d787764174c..d64e4fbcf44590e9132c2338819d2aa76612db95 100644
+index 8c1c60ee5e9e12378644f693bbaba5ace85c5fbc..68b8ccd88fb4ad6e4793a54869d5424f2a860d8a 100644
 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
 +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-@@ -529,6 +529,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -536,6 +536,7 @@ void PostAnnouncementNotification(NSString* announcement) {
        [user_info setObject:native_focus_object
                      forKey:NSAccessibilityTextChangeElement];
  
@@ -380,7 +380,7 @@ index f77433fff5426dd174865aad3d290d787764174c..d64e4fbcf44590e9132c2338819d2aa7
        id selected_text = [native_focus_object selectedTextMarkerRange];
        if (selected_text) {
          NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
-@@ -536,6 +537,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -543,6 +544,7 @@ void PostAnnouncementNotification(NSString* announcement) {
          [user_info setObject:selected_text
                        forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
        }
@@ -503,10 +503,10 @@ index 933483c36d94336c8e9cc56a53bc86aee01e12d0..a48b4af66fb4edcf74caef5bec68c53b
  
  void BluetoothAdapterMac::RemovePairingDelegateInternal(
 diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
-index f5279e1f51e9fcb5f700311153b67044ddc81497..2aad6e02ef356765b80141702c21bb03dc2eb977 100644
+index 5e4dc90597d093d1763b09f4c46f385f0c120ca9..58846d3cdd8e712ed2302a1772ecfb2538d8538d 100644
 --- a/media/audio/BUILD.gn
 +++ b/media/audio/BUILD.gn
-@@ -171,6 +171,12 @@ source_set("audio") {
+@@ -175,6 +175,12 @@ source_set("audio") {
        "mac/scoped_audio_unit.cc",
        "mac/scoped_audio_unit.h",
      ]

+ 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 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a349fe541fe 100644
+index 4de2f631d4d6538ae775b4fc2afa10617449a2c5..f67b3159bb13d4892e656c18b5120c4901666344 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 @@ -115,6 +115,11 @@
@@ -102,7 +102,7 @@ index 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a34
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  
  NetworkContext::PendingCertVerify::PendingCertVerify() = default;
-@@ -561,6 +639,13 @@ void NetworkContext::SetClient(
+@@ -562,6 +640,13 @@ void NetworkContext::SetClient(
    client_.Bind(std::move(client));
  }
  
@@ -116,7 +116,7 @@ index 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a34
  void NetworkContext::CreateURLLoaderFactory(
      mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -1819,8 +1904,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -1820,8 +1905,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
           "NetworkContext should pass CertVerifierServiceRemoteParams.";
  
    std::unique_ptr<net::CertVerifier> cert_verifier;
@@ -127,7 +127,7 @@ index 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a34
    } else {
      if (params_->cert_verifier_params &&
          params_->cert_verifier_params->is_remote_params()) {
-@@ -1848,14 +1934,14 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -1849,14 +1935,14 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
          cert_net_fetcher_ =
              base::MakeRefCounted<net::CertNetFetcherURLRequest>();
  
@@ -145,7 +145,7 @@ index 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a34
  
  #if defined(OS_CHROMEOS)
      cert_verifier_with_trust_anchors_ =
-@@ -1864,13 +1950,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
+@@ -1865,13 +1951,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
      UpdateAdditionalCertificates(
          std::move(params_->initial_additional_certificates));
      cert_verifier_with_trust_anchors_->InitializeOnIOThread(
@@ -178,7 +178,7 @@ index 591c018e1e7b1f859c9871785371c60afdff89a7..fe30fc94f752e08839913868b8464a34
    std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
        std::make_unique<NetworkServiceNetworkDelegate>(
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index 615d42ea815743b264adb6615cff89c7677819a4..e2a565663abea1b13beaaa33e83d8102da693e35 100644
+index e1a8746bcdaf61c181566369b380af5ead3a7796..1372f6f6ca4899cc7b230a3cd1b26db4c16325b5 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -86,6 +86,7 @@ class DomainReliabilityMonitor;
@@ -208,10 +208,10 @@ index 615d42ea815743b264adb6615cff89c7677819a4..e2a565663abea1b13beaaa33e83d8102
    // CertNetFetcher is not used by the current platform, or if the actual
    // net::CertVerifier is instantiated outside of the network service.
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 4e4731bf930e66644a77870f69e98b3197de12ac..2163ef65ae5faec671f4f3ad93c36d069f598ac6 100644
+index dfeaf3c49e33e20bba1f7ccc10729a3b01882813..e45dff2ab8abd378da7886b5becfcb673f5dc642 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -214,6 +214,17 @@ struct CTPolicy {
+@@ -215,6 +215,17 @@ struct CTPolicy {
    array<string> excluded_legacy_spkis;
  };
  
@@ -229,7 +229,7 @@ index 4e4731bf930e66644a77870f69e98b3197de12ac..2163ef65ae5faec671f4f3ad93c36d06
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -876,6 +887,9 @@ interface NetworkContext {
+@@ -861,6 +872,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(pending_remote<NetworkContextClient> client);
  

+ 2 - 2
patches/chromium/notification_provenance.patch

@@ -108,10 +108,10 @@ index f9b6a18aa73968506ddeca13de69b368f4ca8606..d45cb1c32be1b5c76840dafcd96fd06c
        mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
  
 diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
-index d4aa55854634b69f63bb947edf288a1b984e3a6e..68f5eac06290558e7072bf84d6471d316455c068 100644
+index 2e94f3753adf9e951d776f744b339a9682bcb891..d0dc12e50a830e2305879e6094cc4aabc8401f54 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -2148,7 +2148,7 @@ void RenderProcessHostImpl::CreateNotificationService(
+@@ -2147,7 +2147,7 @@ void RenderProcessHostImpl::CreateNotificationService(
      mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

+ 53 - 42
patches/chromium/printing.patch

@@ -441,7 +441,7 @@ index 4b140a2a0f431cd7b06a8d1b6f9e84981f4ce7e7..14779debdacc7b5f78aa0799f197241d
    // Tells the RenderFrame to switch the CSS to print media type, render every
    // requested page using the print preview document's frame/node, and then
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c478d839381 100644
+index 959aa103a15d197f5a9d2abbbe69b78afad2e73f..109a8324fe4206f9ee93d13b015ca5a5c822cdcf 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -38,6 +38,7 @@
@@ -452,15 +452,16 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
  #include "printing/units.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
  #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
-@@ -1152,6 +1153,7 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
-     // Pause between onbeforeprint and onafterprint events.
-     // https://html.spec.whatwg.org/C/#printing-steps
-     Print(web_frame, blink::WebNode(), PrintRequestType::kScripted,
-+          false /* silent */, base::DictionaryValue() /* new_settings */,
-           blink::WebScopedPagePauser::Create());
+@@ -1143,7 +1144,7 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+     if (!weak_this)
+       return;
+ 
+-    Print(web_frame, blink::WebNode(), PrintRequestType::kScripted);
++    Print(web_frame, blink::WebNode(), PrintRequestType::kScripted, false, base::DictionaryValue());
  
      if (weak_this)
-@@ -1180,7 +1182,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
+       web_frame->DispatchAfterPrintEvent();
+@@ -1170,7 +1171,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
    receivers_.Add(this, std::move(receiver));
  }
  
@@ -469,25 +470,27 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
    ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
    if (ipc_nesting_level_ > 1)
      return;
-@@ -1197,7 +1199,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+@@ -1185,7 +1186,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
+   // that instead.
+   auto plugin = delegate_->GetPdfElement(frame);
  
-   // Pause between onbeforeprint and onafterprint events.
-   // https://html.spec.whatwg.org/C/#printing-steps
--  Print(frame, plugin, PrintRequestType::kRegular,
-+  Print(frame, plugin, PrintRequestType::kRegular, silent, std::move(settings),
-         blink::WebScopedPagePauser::Create());
+-  Print(frame, plugin, PrintRequestType::kRegular);
++  Print(frame, plugin, PrintRequestType::kRegular, silent, std::move(settings));
  
    if (!render_frame_gone_)
-@@ -1219,7 +1221,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
-   // Hand over control, including Print Preview's WebScopedPagePauser, to the
-   // system print dialog.
-   Print(frame, print_preview_context_.source_node(), PrintRequestType::kRegular,
--        print_preview_context_.TakePauser());
-+        false, base::DictionaryValue(), print_preview_context_.TakePauser());
+     frame->DispatchAfterPrintEvent();
+@@ -1203,8 +1204,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
+     return;
+   }
+ 
+-  Print(frame, print_preview_context_.source_node(),
+-        PrintRequestType::kRegular);
++  Print(frame, print_preview_context_.source_node(), PrintRequestType::kRegular,
++        false, base::DictionaryValue());
    if (!render_frame_gone_)
      print_preview_context_.DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1267,6 +1269,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
+@@ -1252,6 +1253,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
    if (ipc_nesting_level_ > 1)
      return;
  
@@ -496,27 +499,33 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
    print_preview_context_.OnPrintPreview();
  
    if (print_preview_context_.IsForArc()) {
-@@ -1819,7 +1823,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1788,7 +1791,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
        return;
  
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
--          PrintRequestType::kRegular, blink::WebScopedPagePauser::Create());
+-          PrintRequestType::kRegular);
 +          PrintRequestType::kRegular, false /* silent */,
-+          base::DictionaryValue() /* new_settings */,
-+          blink::WebScopedPagePauser::Create());
++          base::DictionaryValue() /* new_settings */);
      // Check if |this| is still valid.
      if (!weak_this)
        return;
-@@ -1836,6 +1842,8 @@ void PrintRenderFrameHelper::Print(
-     blink::WebLocalFrame* frame,
-     const blink::WebNode& node,
-     PrintRequestType print_request_type,
+@@ -1801,9 +1805,12 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+   print_node_in_progress_ = false;
+ }
+ 
+-void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+-                                   const blink::WebNode& node,
+-                                   PrintRequestType print_request_type) {
++void PrintRenderFrameHelper::Print(
++    blink::WebLocalFrame* frame,
++    const blink::WebNode& node,
++    PrintRequestType print_request_type,
 +    bool silent,
-+    base::Value settings,
-     std::unique_ptr<blink::WebScopedPagePauser> pauser) {
++    base::Value settings) {
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
-@@ -1844,7 +1852,7 @@ void PrintRenderFrameHelper::Print(
+     return;
+@@ -1811,7 +1818,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    uint32_t expected_page_count = 0;
@@ -525,7 +534,7 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1863,10 +1871,41 @@ void PrintRenderFrameHelper::Print(
+@@ -1830,10 +1837,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
          print_pages_params_->params->print_scaling_option;
  
      mojom::PrintPagesParams print_settings;
@@ -570,7 +579,7 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -2113,10 +2152,22 @@ void PrintRenderFrameHelper::IPCProcessed() {
+@@ -2075,10 +2113,22 @@ void PrintRenderFrameHelper::IPCProcessed() {
      base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
  }
  
@@ -595,7 +604,7 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
  
    // Check if the printer returned any settings, if the settings is empty, we
    // can safely assume there are no printer drivers configured. So we safely
-@@ -2137,12 +2188,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -2099,12 +2149,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  
@@ -615,10 +624,10 @@ index fa1e26c76a2b74be723832a7388eea187aeb6d8d..7ee8ce155e650f96f87857047be57c47
      GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
      return false;
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index 00393383967e0c542edbd7ef2798ef6ddd6c6291..f06149f97b5a91b7e2c3d1aa5d80d46283e8a882 100644
+index 9cc2c01cb3e2ffce0253c01be84b9619ac6d7f85..d7d316df470300bd99559e6f5aaaf0f196b06cb1 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
-@@ -231,7 +231,7 @@ class PrintRenderFrameHelper
+@@ -230,7 +230,7 @@ class PrintRenderFrameHelper
        mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
  
    // printing::mojom::PrintRenderFrame:
@@ -627,16 +636,18 @@ index 00393383967e0c542edbd7ef2798ef6ddd6c6291..f06149f97b5a91b7e2c3d1aa5d80d462
    void PrintForSystemDialog() override;
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
    void SetPrintPreviewUI(
-@@ -299,6 +299,8 @@ class PrintRenderFrameHelper
+@@ -297,7 +297,9 @@ class PrintRenderFrameHelper
+   // WARNING: |this| may be gone after this method returns.
    void Print(blink::WebLocalFrame* frame,
               const blink::WebNode& node,
-              PrintRequestType print_request_type,
+-             PrintRequestType print_request_type);
++             PrintRequestType print_request_type,
 +             bool silent,
-+             base::Value settings,
-              std::unique_ptr<blink::WebScopedPagePauser> pauser);
++             base::Value settings);
  
    // Notification when printing is done - signal tear-down/free resources.
-@@ -308,12 +310,14 @@ class PrintRenderFrameHelper
+   void DidFinishPrinting(PrintingResult result);
+@@ -306,12 +308,14 @@ class PrintRenderFrameHelper
  
    // Initialize print page settings with default settings.
    // Used only for native printing workflow.

+ 8 - 8
patches/chromium/put_back_deleted_colors_for_autofill.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/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc
-index e4b9c5e52d6f8408f8ab5ab7c4f8b28466e04626..9c32aaaa0d88a692632a2e888250c6fd04a46fef 100644
+index a77c5718649d8703a1c8423f6a6e2cf196720526..cb4fdb40a7ec0eada94ac53aba22e8bba06d4c05 100644
 --- a/ui/gtk/native_theme_gtk.cc
 +++ b/ui/gtk/native_theme_gtk.cc
-@@ -353,6 +353,29 @@ base::Optional<SkColor> SkColorFromColorId(
+@@ -355,6 +355,29 @@ base::Optional<SkColor> SkColorFromColorId(
      case ui::NativeTheme::kColorId_TableHeaderSeparator:
        return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
  
@@ -42,7 +42,7 @@ index e4b9c5e52d6f8408f8ab5ab7c4f8b28466e04626..9c32aaaa0d88a692632a2e888250c6fd
      // TODO(thomasanderson): Render GtkSpinner directly.
      case ui::NativeTheme::kColorId_ThrobberSpinningColor:
 diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
-index 977cefd87de616ac97c687f7fbe350cc703b84b3..286768de5756b446fafe9a9af33364270cf0e583 100644
+index 35301a2fd7fc53c940bcda47f85527f17af64248..c78bdfb3643f8a310e0ee4c788af4f09fe876d7e 100644
 --- a/ui/native_theme/common_theme.cc
 +++ b/ui/native_theme/common_theme.cc
 @@ -63,7 +63,8 @@ base::Optional<SkColor> GetHighContrastColor(
@@ -55,7 +55,7 @@ index 977cefd87de616ac97c687f7fbe350cc703b84b3..286768de5756b446fafe9a9af3336427
    switch (color_id) {
      // Dialogs
      case NativeTheme::kColorId_WindowBackground:
-@@ -78,6 +79,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
+@@ -79,6 +80,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
      case NativeTheme::kColorId_BubbleFooterBackground:
        return SkColorSetRGB(0x32, 0x36, 0x39);
  
@@ -70,7 +70,7 @@ index 977cefd87de616ac97c687f7fbe350cc703b84b3..286768de5756b446fafe9a9af3336427
      // FocusableBorder
      case NativeTheme::kColorId_FocusedBorderColor:
        return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
-@@ -564,6 +573,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
+@@ -572,6 +581,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
      case NativeTheme::kColorId_UnfocusedBorderColor:
        return gfx::kGoogleGrey300;
  
@@ -89,7 +89,7 @@ index 977cefd87de616ac97c687f7fbe350cc703b84b3..286768de5756b446fafe9a9af3336427
      // Material spinner/throbber
      case NativeTheme::kColorId_ThrobberSpinningColor:
        return gfx::kGoogleBlue600;
-@@ -667,7 +688,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
+@@ -675,7 +696,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
    }
  
    if (color_scheme == NativeTheme::ColorScheme::kDark) {
@@ -115,10 +115,10 @@ index dde0f977c676b6914f206ca7022290887257622b..67fe14f482dcbdf884711e3b283f9d61
    OP(kColorId_ThrobberSpinningColor),                                          \
    OP(kColorId_ThrobberWaitingColor),                                           \
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index d6fa761fafbc7cfea744a34b1101fb33a5ac1ba2..74afe95ebec7f14836b4a5f4c3689f5acc5774cb 100644
+index 950956142148d2127135386dd2b9d0076b7aa148..eaf817b4b5400fa4d2b6af7c86ac69aabf030a38 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -647,6 +647,18 @@ base::Optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
+@@ -648,6 +648,18 @@ base::Optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
      case kColorId_ThrobberWaitingColor:
        return system_colors_[SystemThemeColor::kGrayText];
  

+ 7 - 7
patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch

@@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `
 Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
 
 diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
-index f56e27d3b0def3c4b58acd8d12a544f4912f78a5..682dba8763df58e6a6a2d52b5c46e6b82344a196 100644
+index c44d658372805f0695044c6647c641fbb3fda270..b48dc3c5c435d439b0dbca8fed5a9dd88e1fbf76 100644
 --- a/content/browser/renderer_host/render_widget_host_delegate.h
 +++ b/content/browser/renderer_host/render_widget_host_delegate.h
 @@ -14,6 +14,7 @@
@@ -30,10 +30,10 @@ index f56e27d3b0def3c4b58acd8d12a544f4912f78a5..682dba8763df58e6a6a2d52b5c46e6b8
    // RenderWidgetHost on the main frame, and false otherwise.
    virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index 92353f412ba6d4c25e93f22b9a43442db974b31f..991cbec859c7c005aab75c30fb2a9cb841d2cd7d 100644
+index 19d7421e1de9680a8b1364f010e19cc95ef7325a..b213e28a6a475d003892117c0a64c70b556fcdca 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -1690,6 +1690,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) {
+@@ -1684,6 +1684,8 @@ void RenderWidgetHostImpl::SetCursor(const WebCursor& cursor) {
    if (!view_)
      return;
    view_->UpdateCursor(cursor);
@@ -43,10 +43,10 @@ index 92353f412ba6d4c25e93f22b9a43442db974b31f..991cbec859c7c005aab75c30fb2a9cb8
  
  void RenderWidgetHostImpl::OnCursorVisibilityStateChanged(bool is_visible) {
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 07ae134c8f6ba5aa03b9db35b4cea9e8e1668b5a..4b65b5aabf7481102493e20cde9ca17d901eceaa 100644
+index 5e3983bb7d4b5e4cc336866ca008b807f2c3d0d1..177ebe4c6a70e49fe29a927a1c64d3868b6d3e8e 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -4280,6 +4280,12 @@ bool WebContentsImpl::OnUpdateDragCursor() {
+@@ -4264,6 +4264,12 @@ bool WebContentsImpl::OnUpdateDragCursor() {
           browser_plugin_embedder_->OnUpdateDragCursor();
  }
  
@@ -60,10 +60,10 @@ index 07ae134c8f6ba5aa03b9db35b4cea9e8e1668b5a..4b65b5aabf7481102493e20cde9ca17d
      RenderWidgetHostImpl* render_widget_host) {
    return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
 diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
-index d2f3048bca219770a5c0606e4cb8fc0591a5a981..938dd84593f9aa445a3842b8af39941a5264d61e 100644
+index 4021af32b75edae9d1cf8d7cc5bd78dfd172076e..51b82c42eaa134966310ba71209de5277c125202 100644
 --- a/content/browser/web_contents/web_contents_impl.h
 +++ b/content/browser/web_contents/web_contents_impl.h
-@@ -945,6 +945,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
+@@ -942,6 +942,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
    void SendScreenRects() override;
    TextInputManager* GetTextInputManager() override;
    bool OnUpdateDragCursor() override;

+ 0 - 47
patches/chromium/remove_deprecated_factory_parameter_for_worker_resource_loader.patch

@@ -1,47 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: deepak1556 <[email protected]>
-Date: Sat, 12 Sep 2020 20:15:43 -0700
-Subject: Remove deprecated factory parameter for worker resource loader
-
-This can be removed once https://chromium-review.googlesource.com/c/chromium/src/+/2357523 lands.
-
-diff --git a/content/browser/worker_host/worker_script_fetch_initiator.cc b/content/browser/worker_host/worker_script_fetch_initiator.cc
-index 6ca1bf4c7e5c489ea3f170c350c4660a1763918a..b9b73f0d04c2e176ea7f52306eb5f562ac04d608 100644
---- a/content/browser/worker_host/worker_script_fetch_initiator.cc
-+++ b/content/browser/worker_host/worker_script_fetch_initiator.cc
-@@ -226,8 +226,7 @@ WorkerScriptFetchInitiator::CreateFactoryBundle(
-       GetContentClient()
-           ->browser()
-           ->RegisterNonNetworkWorkerMainResourceURLLoaderFactories(
--              storage_partition->browser_context(),
--              &non_network_uniquely_owned_factories);
-+              storage_partition->browser_context(), &non_network_factories);
-       break;
-     case LoaderType::kSubResource:
-       GetContentClient()
-diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 2d2c8e61063ed3c34e4eb40a31ec62affcbe1f66..33e4c10b4b984cb49ec960cf257b866c738ec020 100644
---- a/content/public/browser/content_browser_client.cc
-+++ b/content/public/browser/content_browser_client.cc
-@@ -777,7 +777,7 @@ void ContentBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
- void ContentBrowserClient::
-     RegisterNonNetworkWorkerMainResourceURLLoaderFactories(
-         BrowserContext* browser_context,
--        NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories) {}
-+        NonNetworkURLLoaderFactoryMap* factories) {}
- 
- void ContentBrowserClient::
-     RegisterNonNetworkServiceWorkerUpdateURLLoaderFactories(
-diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 464df770f76bacd7556dae52c7d59aa07d19762e..5ba93c6008cd92d31d0d064422c23e8087281788 100644
---- a/content/public/browser/content_browser_client.h
-+++ b/content/public/browser/content_browser_client.h
-@@ -1316,7 +1316,7 @@ class CONTENT_EXPORT ContentBrowserClient {
-   // lifetimes.
-   virtual void RegisterNonNetworkWorkerMainResourceURLLoaderFactories(
-       BrowserContext* browser_context,
--      NonNetworkURLLoaderFactoryDeprecatedMap* uniquely_owned_factories);
-+      NonNetworkURLLoaderFactoryMap* factories);
- 
-   // Allows the embedder to register per-scheme URLLoaderFactory
-   // implementations to handle service worker main/imported script requests

+ 2 - 2
patches/chromium/render_widget_host_view_base.patch

@@ -24,7 +24,7 @@ index b2139c2e9ee84f7e20feeedfd686f59a85c124b9..534c5ccece65ea2aee52240ee941630a
      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 6ad97d23d771e1494fcfa0a56d70626048c86cfb..a1fdaf65e6fbfad5e61af4e5bc6d5829bc2d84cf 100644
+index 5b2aa87a53fa12266e03d8625060dcba6df02a78..a1569cfbc939e9f0fa703240542f124f47074aec 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,10 @@
@@ -60,7 +60,7 @@ index 6ad97d23d771e1494fcfa0a56d70626048c86cfb..a1fdaf65e6fbfad5e61af4e5bc6d5829
    // This only needs to be overridden by RenderWidgetHostViewBase subclasses
    // that handle content embedded within other RenderWidgetHostViews.
    gfx::PointF TransformPointToRootCoordSpaceF(
-@@ -288,6 +295,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
+@@ -287,6 +294,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
    virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
                                     const ui::LatencyInfo& latency);
  

+ 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 d629218f01eeb1cc442643da7b6aca21b989498e..f47d3ffa467e0df6f162eaf0affb37d9a46aebad 100644
+index bfaf61fe2622812724617267bfe099bb9608dfff..56f5ff4c628daa7f42f4c84c9a4b98f3f250a2b0 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1403,7 +1403,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1434,7 +1434,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index d629218f01eeb1cc442643da7b6aca21b989498e..f47d3ffa467e0df6f162eaf0affb37d9
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1423,6 +1423,12 @@ if (!is_android) {
+@@ -1454,6 +1454,12 @@ if (!is_android) {
    }
  }
  

+ 10 - 10
patches/chromium/revert_remove_contentrendererclient_shouldfork.patch

@@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
 are required to be NAPI or context aware (Electron v11), this patch can be removed.
 
 diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
-index 87243e716262b31c49a2bf18fc3b3b8c38b29c53..76d5e9f82d8db1c2212db79fb2116a2a1695b0d1 100644
+index c9852764a59cb37f312978d8aa14ec51c308502b..a20d30ae6dea56a4a55c9377a6957ce8247eeb89 100644
 --- a/chrome/renderer/chrome_content_renderer_client.cc
 +++ b/chrome/renderer/chrome_content_renderer_client.cc
-@@ -1281,6 +1281,25 @@ bool ChromeContentRendererClient::AllowPopup() {
+@@ -1269,6 +1269,25 @@ bool ChromeContentRendererClient::AllowPopup() {
  #endif
  }
  
@@ -39,10 +39,10 @@ index 87243e716262b31c49a2bf18fc3b3b8c38b29c53..76d5e9f82d8db1c2212db79fb2116a2a
      WebLocalFrame* frame,
      ui::PageTransition transition_type,
 diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
-index 04d63a82dde7b1ec4259ec90e0733f3536e97ad0..e335dfbfabe643d15e78c691750aed3aab4a006a 100644
+index b5f29c1f2193dfd0f72ab238c9474dc5a20ee235..771637be7ca510e24e16914d2a3565729f3da301 100644
 --- a/chrome/renderer/chrome_content_renderer_client.h
 +++ b/chrome/renderer/chrome_content_renderer_client.h
-@@ -127,6 +127,11 @@ class ChromeContentRendererClient
+@@ -123,6 +123,11 @@ class ChromeContentRendererClient
        base::SingleThreadTaskRunner* compositor_thread_task_runner) override;
    bool RunIdleHandlerWhenWidgetsHidden() override;
    bool AllowPopup() override;
@@ -55,10 +55,10 @@ index 04d63a82dde7b1ec4259ec90e0733f3536e97ad0..e335dfbfabe643d15e78c691750aed3a
                         ui::PageTransition transition_type,
                         const blink::WebURL& url,
 diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
-index 889362f4bf241c88c7228b7bef029383211ef826..b83f2a91d993e3a086b63c5f01a8960df7f4780f 100644
+index 37f552964f5443188ac813713e06d4a7cf960384..1aa65b17d65211a4528db242e22453cbd287865a 100644
 --- a/content/public/renderer/content_renderer_client.cc
 +++ b/content/public/renderer/content_renderer_client.cc
-@@ -114,6 +114,14 @@ bool ContentRendererClient::HandleNavigation(
+@@ -108,6 +108,14 @@ bool ContentRendererClient::HandleNavigation(
  }
  #endif
  
@@ -74,10 +74,10 @@ index 889362f4bf241c88c7228b7bef029383211ef826..b83f2a91d993e3a086b63c5f01a8960d
      blink::WebLocalFrame* frame,
      ui::PageTransition transition_type,
 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
-index 9349a3755f824630904bcd044a6ba403d639f490..5097d3f812f8ad0a583042ba332855c8b3fda222 100644
+index 541fb915a2096a6ea56860662fff9f1dec9929cf..e4637fc393bafcdeac62cd4257f42451306dbeed 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -229,6 +229,13 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -214,6 +214,13 @@ class CONTENT_EXPORT ContentRendererClient {
                                  bool is_redirect);
  #endif
  
@@ -92,10 +92,10 @@ index 9349a3755f824630904bcd044a6ba403d639f490..5097d3f812f8ad0a583042ba332855c8
    // |url|. If the function returns a valid |new_url|, the request must be
    // updated to use it. The |force_ignore_site_for_cookies| output parameter
 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
-index c7fa94ee18d094f4674cecf5c5cb746a2ded7ae9..e7b73fabeb1979144039826679419ec73fb83355 100644
+index ca83a9317d0a0136de39aa9af467580e9268cd30..90cffd9aa50789db8af931693272df2a860d08bf 100644
 --- a/content/renderer/render_frame_impl.cc
 +++ b/content/renderer/render_frame_impl.cc
-@@ -5707,6 +5707,23 @@ void RenderFrameImpl::BeginNavigation(
+@@ -5795,6 +5795,23 @@ void RenderFrameImpl::BeginNavigation(
      // we can do a per-frame check here rather than a process-wide check.
      bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
                         (enabled_bindings_ & kWebUIBindingsPolicyMask);

+ 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 73dd6d06e13a7c44acc79bf06e2d9e8d93344bc6..90262611c0d813a709b4fa8bbb1c480793861c58 100644
+index 91daa69bf55a0e3bcc0b67699b975efcba91aaa9..78b72a1a138077fea7555e960f84bce706b22352 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1295,7 +1295,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
+@@ -1318,7 +1318,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 5 - 5
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 68f5eac06290558e7072bf84d6471d316455c068..616cf2720a1c5bd496dcaa3d6e93f6b5443bf84d 100644
+index d0dc12e50a830e2305879e6094cc4aabc8401f54..74f19cb9c196510c19daffcd98c1577ec541ea54 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -411,6 +411,11 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -410,6 +410,11 @@ class RendererSandboxedProcessLauncherDelegate
    {
    }
  
@@ -37,7 +37,7 @@ index 68f5eac06290558e7072bf84d6471d316455c068..616cf2720a1c5bd496dcaa3d6e93f6b5
    ~RendererSandboxedProcessLauncherDelegate() override {}
  
  #if defined(OS_WIN)
-@@ -432,6 +437,9 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -431,6 +436,9 @@ class RendererSandboxedProcessLauncherDelegate
  
  #if BUILDFLAG(USE_ZYGOTE_HANDLE)
    ZygoteHandle GetZygote() override {
@@ -47,7 +47,7 @@ index 68f5eac06290558e7072bf84d6471d316455c068..616cf2720a1c5bd496dcaa3d6e93f6b5
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
      base::CommandLine::StringType renderer_prefix =
-@@ -446,10 +454,13 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -445,10 +453,13 @@ class RendererSandboxedProcessLauncherDelegate
      return sandbox::policy::SandboxType::kRenderer;
    }
  
@@ -62,7 +62,7 @@ index 68f5eac06290558e7072bf84d6471d316455c068..616cf2720a1c5bd496dcaa3d6e93f6b5
  };
  
  const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
-@@ -1854,11 +1865,18 @@ bool RenderProcessHostImpl::Init() {
+@@ -1853,11 +1864,18 @@ bool RenderProcessHostImpl::Init() {
        cmd_line->PrependWrapper(renderer_prefix);
      AppendRendererCommandLine(cmd_line.get());
  

+ 1 - 1
patches/chromium/use_electron_resources_in_pdf_util.patch

@@ -8,7 +8,7 @@ and cause a DCHECK(), since the resource will be loaded as an empty
 string.
 
 diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
-index b1252ff0c7caa0916e5655e54b06965a982a7f06..03713a90d884153634535ef363943939c7e823a8 100644
+index b471f462c1a79be50497e72bfe672bb8fad7e85b..986351b7b0f9fd62c90a2c6c134119f41412b291 100644
 --- a/chrome/browser/pdf/pdf_extension_util.cc
 +++ b/chrome/browser/pdf/pdf_extension_util.cc
 @@ -8,8 +8,7 @@

+ 5 - 5
patches/chromium/web_contents.patch

@@ -9,10 +9,10 @@ is needed for OSR.
 Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 60394e536151d928e7a067c9e0bb98946bb94ff2..07ae134c8f6ba5aa03b9db35b4cea9e8e1668b5a 100644
+index 859998ef6f7893600d3471c18870d065623d9832..5e3983bb7d4b5e4cc336866ca008b807f2c3d0d1 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2763,6 +2763,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2764,6 +2764,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    std::string unique_name;
    frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
  
@@ -25,7 +25,7 @@ index 60394e536151d928e7a067c9e0bb98946bb94ff2..07ae134c8f6ba5aa03b9db35b4cea9e8
    WebContentsViewDelegate* delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -2773,6 +2779,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2774,6 +2780,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
      view_.reset(CreateWebContentsView(this, delegate,
                                        &render_view_host_delegate_view_));
    }
@@ -34,7 +34,7 @@ index 60394e536151d928e7a067c9e0bb98946bb94ff2..07ae134c8f6ba5aa03b9db35b4cea9e8
    CHECK(view_.get());
  
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index b879df2f24227184972f3ac584bce57ab6b29ed0..6d6e5e1009afd5fed509b857ba5f8b919712c882 100644
+index 0426cc1550f11bbe978fd8a98462b3899a627c74..a43c9972377f6365c3fe0e33f0d29700f597bd2d 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
 @@ -86,8 +86,11 @@ class BrowserContext;
@@ -49,7 +49,7 @@ index b879df2f24227184972f3ac584bce57ab6b29ed0..6d6e5e1009afd5fed509b857ba5f8b91
  class WebUI;
  struct CustomContextMenuContext;
  struct DropData;
-@@ -215,6 +218,10 @@ class WebContents : public PageNavigator,
+@@ -221,6 +224,10 @@ class WebContents : public PageNavigator,
      // Sandboxing flags set on the new WebContents.
      network::mojom::WebSandboxFlags starting_sandbox_flags;
  

+ 3 - 3
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 aaa41c7906b1cba938f669a8c1bfe99ff55eb90e..94320f40dc50fe316f3db5ff49f93ba4303fdd02 100644
+index bb458ee5abdb5379896da1f06fdabf78cebd3b90..b535b58f4adcfa19731c63d9c29d94aab673045d 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
 @@ -790,9 +790,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
@@ -23,10 +23,10 @@ index aaa41c7906b1cba938f669a8c1bfe99ff55eb90e..94320f40dc50fe316f3db5ff49f93ba4
  
  ////////////////////////////////////////////////////////////////////////////////
 diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
-index a964f38b830f62bf694646033e1c24e0cf4557c5..61e69fdebaca038d09b5ebab71fd20e2e13188f0 100644
+index 623179b59639da685c8d43a0a7fe10045ede5ebd..20a17f90d9da070438471726e048ba3cf49d8fdf 100644
 --- a/content/browser/web_contents/web_drag_dest_mac.mm
 +++ b/content/browser/web_contents/web_drag_dest_mac.mm
-@@ -384,9 +384,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
+@@ -382,9 +382,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
  }
  
  - (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {

+ 2 - 2
patches/chromium/worker_context_will_destroy.patch

@@ -10,10 +10,10 @@ An attempt to upstream this was made, but rejected:
 https://chromium-review.googlesource.com/c/chromium/src/+/1954347
 
 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
-index 04e4329a5886e782422258c0713bd48bac1bcf4e..9349a3755f824630904bcd044a6ba403d639f490 100644
+index 12e091c7c13d1ce80f435d5c243864dff3c16d44..541fb915a2096a6ea56860662fff9f1dec9929cf 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -400,6 +400,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -385,6 +385,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  

+ 3 - 3
patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch

@@ -19,10 +19,10 @@ that clearly establishes the worker script is ready for evaluation with the scop
 initialized.
 
 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
-index 5097d3f812f8ad0a583042ba332855c8b3fda222..343a423e393b985fefdc28e80eccb17e471f18f6 100644
+index e4637fc393bafcdeac62cd4257f42451306dbeed..999288da0fdc7bb584469530d97638e0811b339d 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -407,6 +407,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -392,6 +392,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  
@@ -78,7 +78,7 @@ index 27cefad2c07d604acfdcb23181b3b8b14b3228c1..3d5b69a75656b159352920bb0bfaee8c
    virtual bool AllowScriptExtensionForServiceWorker(
        const WebSecurityOrigin& script_origin) {
 diff --git a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
-index 4443d8286c140887770c29ed8de09bd7193c3ee6..30498af4739628742efd58635f16294f0bec480c 100644
+index 5103c2860f57f26c778a4383c037c8a2aed410b9..2416783199c0d34082c6b9acd544e524f33b9a56 100644
 --- a/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.cc
 @@ -272,6 +272,7 @@ void WorkerOrWorkletScriptController::PrepareForEvaluation() {

+ 3 - 3
patches/v8/build_gn.patch

@@ -9,7 +9,7 @@ necessary for native modules to load.
 Also, some fixes relating to mksnapshot on ARM.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 920ad3b81007c4b48f199a5dd37d6626cadf0a7c..4226f4d1b27e486ae1899f7a88ff4e00b73084ea 100644
+index 67d82c7524f1585e3ff2b1724a9b6b4f642dd360..ab19f452d0ec592402181c74becdfaf67705b635 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -411,7 +411,7 @@ config("internal_config") {
@@ -21,7 +21,7 @@ index 920ad3b81007c4b48f199a5dd37d6626cadf0a7c..4226f4d1b27e486ae1899f7a88ff4e00
      defines += [ "BUILDING_V8_SHARED" ]
    }
  }
-@@ -4477,7 +4477,7 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -4478,7 +4478,7 @@ if (current_toolchain == v8_generator_toolchain) {
        "src/interpreter/bytecodes.h",
      ]
  
@@ -30,7 +30,7 @@ index 920ad3b81007c4b48f199a5dd37d6626cadf0a7c..4226f4d1b27e486ae1899f7a88ff4e00
  
      deps = [
        ":v8_libbase",
-@@ -4514,6 +4514,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
+@@ -4515,6 +4515,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
  
      configs = [ ":internal_config" ]
  

+ 8 - 8
patches/v8/chore_add_v8_apple_silicon_patches.patch

@@ -66,7 +66,7 @@ index fef1758aaa81a85009461839ec9aa816e7d196a6..c0f7a1cf5fd4787896b06bce911aabf1
  
  void TurboAssembler::CallPrintf(int arg_count, const CPURegister* args) {
 diff --git a/src/compiler/backend/arm64/instruction-selector-arm64.cc b/src/compiler/backend/arm64/instruction-selector-arm64.cc
-index dc4fdb4d2ef1a327dab529a5aa5990f6705bbd43..2a11ac9e6ab70cc3556cefc95f38b2cec72a2304 100644
+index fac7f9c1d1146b36b57aa70565fc86a1604887c8..6c13a0747009e38fd574ba94d38b6654fdd70edf 100644
 --- a/src/compiler/backend/arm64/instruction-selector-arm64.cc
 +++ b/src/compiler/backend/arm64/instruction-selector-arm64.cc
 @@ -1898,6 +1898,7 @@ void InstructionSelector::EmitPrepareArguments(
@@ -78,10 +78,10 @@ index dc4fdb4d2ef1a327dab529a5aa5990f6705bbd43..2a11ac9e6ab70cc3556cefc95f38b2ce
      PushParameter input1 = slot > 0 ? (*arguments)[slot - 1] : PushParameter();
      // Emit a poke-pair if consecutive parameters have the same type.
 diff --git a/src/flags/flag-definitions.h b/src/flags/flag-definitions.h
-index d7fbd96fb9f255e6cc110d15289281922e238387..4befa19700c44625ccaa4fca90f6a9cc432feaaf 100644
+index ab689283e970a79bc02dbeee7a4a74720265fcd7..12e54765d316f97297ad0a999ca32c5d07872580 100644
 --- a/src/flags/flag-definitions.h
 +++ b/src/flags/flag-definitions.h
-@@ -758,7 +758,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128,
+@@ -763,7 +763,12 @@ DEFINE_INT(wasm_num_compilation_tasks, 128,
             "maximum number of parallel compilation tasks for wasm")
  DEFINE_DEBUG_BOOL(trace_wasm_native_heap, false,
                    "trace wasm native heap events")
@@ -96,7 +96,7 @@ index d7fbd96fb9f255e6cc110d15289281922e238387..4befa19700c44625ccaa4fca90f6a9cc
  DEFINE_DEBUG_BOOL(trace_wasm_serialization, false,
                    "trace serialization/deserialization")
 diff --git a/src/wasm/function-compiler.cc b/src/wasm/function-compiler.cc
-index a37d11db2fb8ee162152d62d7cca0130eacbf3fa..edaabf588c0fdf0d693b32ee2410f677afc20e74 100644
+index 8b41a90992f58c535df285e7fa569b51ae31f85d..1ff813abf44d25e8f2fd84b236623b74913684fb 100644
 --- a/src/wasm/function-compiler.cc
 +++ b/src/wasm/function-compiler.cc
 @@ -258,6 +258,7 @@ void WasmCompilationUnit::CompileWasmFunction(Isolate* isolate,
@@ -108,10 +108,10 @@ index a37d11db2fb8ee162152d62d7cca0130eacbf3fa..edaabf588c0fdf0d693b32ee2410f677
          native_module->AddCompiledCode(std::move(result)));
    } else {
 diff --git a/src/wasm/wasm-code-manager.h b/src/wasm/wasm-code-manager.h
-index 5d8abca5abb6f958b61b9922ce0e6eac80bde244..040f8cfd31a1f9f971fc866ab34657ad3f7c003a 100644
+index 5e8ed5475bb064cb657069242ce7517de7f5f8e2..5652bb407da3646e55c42492b3e9facec4556367 100644
 --- a/src/wasm/wasm-code-manager.h
 +++ b/src/wasm/wasm-code-manager.h
-@@ -880,7 +880,7 @@ class V8_EXPORT_PRIVATE WasmCodeManager final {
+@@ -886,7 +886,7 @@ class V8_EXPORT_PRIVATE WasmCodeManager final {
  //    and even if we did, the resulting set of pages may be fragmented.
  //    Currently, we try and keep the number of syscalls low.
  // -  similar argument for debug time.
@@ -121,10 +121,10 @@ index 5d8abca5abb6f958b61b9922ce0e6eac80bde244..040f8cfd31a1f9f971fc866ab34657ad
    explicit NativeModuleModificationScope(NativeModule* native_module);
    ~NativeModuleModificationScope();
 diff --git a/src/wasm/wasm-objects.cc b/src/wasm/wasm-objects.cc
-index e0202b98d138b55d1f953655fedef5717d9fb2c3..d69bf0a5be8f3ffb58ca7bf962891d95566e67ff 100644
+index cf78ab5ff3286d6c07527a323eac4213255fe825..b89433d445f46110ba6cacfc6ec930d31171fd1f 100644
 --- a/src/wasm/wasm-objects.cc
 +++ b/src/wasm/wasm-objects.cc
-@@ -1504,6 +1504,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable(
+@@ -1512,6 +1512,7 @@ void WasmInstanceObject::ImportWasmJSFunctionIntoTable(
      wasm::WasmCompilationResult result = compiler::CompileWasmImportCallWrapper(
          isolate->wasm_engine(), &env, kind, sig, false,
          shared.internal_formal_parameter_count());

+ 1 - 1
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 d0c872a965d6a77a2483d590f5d956cca00197e9..a3ae70aa0e5965aa19f7eeb13e882955d42d618f 100644
+index 2ca4110710216d0e624faa0df26f200b2d2daf81..4feee743983420f5d1bc4debb3aea9fab3d47872 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -411,6 +411,10 @@ config("internal_config") {

+ 2 - 2
patches/v8/expose_mksnapshot.patch

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
 Needed in order to target mksnapshot for mksnapshot zip.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 4226f4d1b27e486ae1899f7a88ff4e00b73084ea..d0c872a965d6a77a2483d590f5d956cca00197e9 100644
+index ab19f452d0ec592402181c74becdfaf67705b635..2ca4110710216d0e624faa0df26f200b2d2daf81 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -4488,7 +4488,6 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -4489,7 +4489,6 @@ if (current_toolchain == v8_generator_toolchain) {
  
  if (current_toolchain == v8_snapshot_toolchain) {
    v8_executable("mksnapshot") {

+ 1 - 1
patches/v8/fix_build_deprecated_attirbute_for_older_msvc_versions.patch

@@ -9,7 +9,7 @@ higher versions, but native module compiling with this version
 will have an issue.
 
 diff --git a/include/v8config.h b/include/v8config.h
-index ae89edb2c9b791abd0aa2662fc7b4f3bc431b146..fdf2a690d50bb7835ce584b3b8940ed919b29b75 100644
+index a047874c4064f651d4dda64e15fc1507990fcab4..52546a0b74c9a7d8d2df6afe7ac61987f67b130c 100644
 --- a/include/v8config.h
 +++ b/include/v8config.h
 @@ -391,10 +391,13 @@

+ 3 - 3
patches/v8/revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch

@@ -6,10 +6,10 @@ Subject: Revert "[cleanup] Switch {OFFSET_OF} to {offsetof} where possible."
 This reverts commit d287e4bc46243841c77cf9798516ee4dcc54bf43.
 
 diff --git a/src/deoptimizer/deoptimizer.h b/src/deoptimizer/deoptimizer.h
-index e69fd090de709687ce78fa987f6113775953ceac..e029a0d3b928983778eb60cd532793901de4837a 100644
+index 152e5e510e9bb030a0c4ab489750573488bac7a6..1adc3f1eeb856ca5cee9acc4723e9003d069fe3a 100644
 --- a/src/deoptimizer/deoptimizer.h
 +++ b/src/deoptimizer/deoptimizer.h
-@@ -506,14 +506,14 @@ class Deoptimizer : public Malloced {
+@@ -508,14 +508,14 @@ class Deoptimizer : public Malloced {
                                      DeoptimizeKind* type);
  
    // Code generation support.
@@ -28,7 +28,7 @@ index e69fd090de709687ce78fa987f6113775953ceac..e029a0d3b928983778eb60cd53279390
    }
  
    V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate);
-@@ -772,11 +772,11 @@ class FrameDescription {
+@@ -776,11 +776,11 @@ class FrameDescription {
    int parameter_count() { return parameter_count_; }
  
    static int registers_offset() {

+ 1 - 2
shell/app/electron_crash_reporter_client.cc

@@ -23,7 +23,6 @@
 #include "components/upload_list/crash_upload_list.h"
 #include "content/public/common/content_switches.h"
 #include "electron/electron_version.h"
-#include "services/service_manager/embedder/switches.h"
 #include "shell/common/electron_paths.h"
 
 #if defined(OS_POSIX) && !defined(OS_MAC)
@@ -210,7 +209,7 @@ bool ElectronCrashReporterClient::EnableBreakpadForProcess(
     const std::string& process_type) {
   return process_type == switches::kRendererProcess ||
          process_type == switches::kPpapiPluginProcess ||
-         process_type == service_manager::switches::kZygoteProcess ||
+         process_type == switches::kZygoteProcess ||
          process_type == switches::kGpuProcess ||
          process_type == switches::kUtilityProcess || process_type == "node";
 }

+ 2 - 4
shell/app/electron_main_delegate.cc

@@ -27,7 +27,6 @@
 #include "extensions/common/constants.h"
 #include "ipc/ipc_buildflags.h"
 #include "sandbox/policy/switches.h"
-#include "services/service_manager/embedder/switches.h"
 #include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
 #include "shell/app/electron_content_client.h"
 #include "shell/browser/electron_browser_client.h"
@@ -89,7 +88,7 @@ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
   return
 #if defined(OS_LINUX)
       // The zygote process opens the resources for the renderers.
-      process_type == service_manager::switches::kZygoteProcess ||
+      process_type == ::switches::kZygoteProcess ||
 #endif
 #if defined(OS_MAC)
       // Mac needs them too for scrollbar related images and for sandbox
@@ -346,8 +345,7 @@ void ElectronMainDelegate::PreSandboxStartup() {
 #endif
 
 #if defined(OS_LINUX)
-  if (process_type != service_manager::switches::kZygoteProcess &&
-      !process_type.empty()) {
+  if (process_type != ::switches::kZygoteProcess && !process_type.empty()) {
     ElectronCrashReporterClient::Create();
     breakpad::InitCrashReporter(process_type);
   }

+ 0 - 1
shell/browser/api/electron_api_crash_reporter.cc

@@ -22,7 +22,6 @@
 #include "content/public/common/content_switches.h"
 #include "gin/arguments.h"
 #include "gin/data_object_builder.h"
-#include "services/service_manager/embedder/switches.h"
 #include "shell/common/electron_paths.h"
 #include "shell/common/gin_converters/callback_converter.h"
 #include "shell/common/gin_converters/file_path_converter.h"

+ 5 - 0
shell/browser/browser_process_impl.cc

@@ -244,6 +244,11 @@ BrowserProcessImpl::floc_blocklist_service() {
   return nullptr;
 }
 
+federated_learning::FlocSortingLshClustersService*
+BrowserProcessImpl::floc_sorting_lsh_clusters_service() {
+  return nullptr;
+}
+
 optimization_guide::OptimizationGuideService*
 BrowserProcessImpl::optimization_guide_service() {
   return nullptr;

+ 2 - 0
shell/browser/browser_process_impl.h

@@ -80,6 +80,8 @@ class BrowserProcessImpl : public BrowserProcess {
   subresource_filter::RulesetService* subresource_filter_ruleset_service()
       override;
   federated_learning::FlocBlocklistService* floc_blocklist_service() override;
+  federated_learning::FlocSortingLshClustersService*
+  floc_sorting_lsh_clusters_service() override;
   optimization_guide::OptimizationGuideService* optimization_guide_service()
       override;
   component_updater::ComponentUpdateService* component_updater() override;

+ 2 - 3
shell/browser/electron_browser_client.cc

@@ -1299,7 +1299,7 @@ void ElectronBrowserClient::RegisterNonNetworkNavigationURLLoaderFactories(
       content::WebContents::FromFrameTreeNodeId(frame_tree_node_id);
   content::BrowserContext* context = web_contents->GetBrowserContext();
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
-  uniquely_owned_factories->emplace(
+  factories->emplace(
       extensions::kExtensionScheme,
       extensions::CreateExtensionNavigationURLLoaderFactory(
           context, ukm_source_id,
@@ -1397,8 +1397,7 @@ void ElectronBrowserClient::RegisterNonNetworkSubresourceURLLoaderFactories(
   auto factory = extensions::CreateExtensionURLLoaderFactory(render_process_id,
                                                              render_frame_id);
   if (factory)
-    uniquely_owned_factories->emplace(extensions::kExtensionScheme,
-                                      std::move(factory));
+    factories->emplace(extensions::kExtensionScheme, std::move(factory));
 
   if (!web_contents)
     return;

+ 1 - 1
shell/browser/electron_browser_main_parts.cc

@@ -302,7 +302,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() {
   HandleSIGCHLD();
 #endif
 
-  return service_manager::RESULT_CODE_NORMAL_EXIT;
+  return content::RESULT_CODE_NORMAL_EXIT;
 }
 
 void ElectronBrowserMainParts::PostEarlyInitialization() {

+ 4 - 0
shell/browser/extensions/api/tabs/tabs_api.cc

@@ -163,6 +163,10 @@ bool TabsExecuteScriptFunction::ShouldInsertCSS() const {
   return false;
 }
 
+bool TabsExecuteScriptFunction::ShouldRemoveCSS() const {
+  return false;
+}
+
 ExtensionFunction::ResponseAction TabsGetFunction::Run() {
   std::unique_ptr<tabs::Get::Params> params(tabs::Get::Params::Create(*args_));
   EXTENSION_FUNCTION_VALIDATE(params.get());

+ 1 - 0
shell/browser/extensions/api/tabs/tabs_api.h

@@ -37,6 +37,7 @@ class ExecuteCodeInTabFunction : public ExecuteCodeFunction {
 class TabsExecuteScriptFunction : public ExecuteCodeInTabFunction {
  protected:
   bool ShouldInsertCSS() const override;
+  bool ShouldRemoveCSS() const override;
 
  private:
   ~TabsExecuteScriptFunction() override {}

+ 24 - 26
shell/browser/osr/osr_render_widget_host_view.cc

@@ -43,6 +43,7 @@
 #include "ui/events/event_constants.h"
 #include "ui/gfx/canvas.h"
 #include "ui/gfx/geometry/dip_util.h"
+#include "ui/gfx/geometry/size_conversions.h"
 #include "ui/gfx/image/image_skia.h"
 #include "ui/gfx/native_widget_types.h"
 #include "ui/gfx/skbitmap_operations.h"
@@ -193,11 +194,10 @@ OffScreenRenderWidgetHostView::OffScreenRenderWidgetHostView(
   current_device_scale_factor_ = kDefaultScaleFactor;
 
   delegated_frame_host_allocator_.GenerateId();
-  delegated_frame_host_allocation_ =
-      delegated_frame_host_allocator_.GetCurrentLocalSurfaceIdAllocation();
+  delegated_frame_host_surface_id_ =
+      delegated_frame_host_allocator_.GetCurrentLocalSurfaceId();
   compositor_allocator_.GenerateId();
-  compositor_allocation_ =
-      compositor_allocator_.GetCurrentLocalSurfaceIdAllocation();
+  compositor_surface_id_ = compositor_allocator_.GetCurrentLocalSurfaceId();
 
   delegated_frame_host_client_ =
       std::make_unique<ElectronDelegatedFrameHostClient>(this);
@@ -305,9 +305,8 @@ void OffScreenRenderWidgetHostView::Show() {
   is_showing_ = true;
 
   delegated_frame_host_->AttachToCompositor(compositor_.get());
-  delegated_frame_host_->WasShown(
-      GetLocalSurfaceIdAllocation().local_surface_id(),
-      GetRootLayer()->bounds().size(), {});
+  delegated_frame_host_->WasShown(GetLocalSurfaceId(),
+                                  GetRootLayer()->bounds().size(), {});
 
   if (render_widget_host_)
     render_widget_host_->WasShown({});
@@ -669,11 +668,11 @@ void OffScreenRenderWidgetHostView::OnPaint(const gfx::Rect& damage_rect,
 
 gfx::Size OffScreenRenderWidgetHostView::SizeInPixels() {
   if (IsPopupWidget()) {
-    return gfx::ConvertSizeToPixel(current_device_scale_factor_,
-                                   popup_position_.size());
+    return gfx::ToFlooredSize(gfx::ConvertSizeToPixels(
+        popup_position_.size(), current_device_scale_factor_));
   } else {
-    return gfx::ConvertSizeToPixel(current_device_scale_factor_,
-                                   GetViewBounds().size());
+    return gfx::ToFlooredSize(gfx::ConvertSizeToPixels(
+        GetViewBounds().size(), current_device_scale_factor_));
   }
 }
 
@@ -724,14 +723,14 @@ void OffScreenRenderWidgetHostView::CompositeFrame(
 }
 
 void OffScreenRenderWidgetHostView::OnPopupPaint(const gfx::Rect& damage_rect) {
-  InvalidateBounds(
-      gfx::ConvertRectToPixel(current_device_scale_factor_, damage_rect));
+  InvalidateBounds(gfx::ToEnclosingRect(
+      gfx::ConvertRectToPixels(damage_rect, current_device_scale_factor_)));
 }
 
 void OffScreenRenderWidgetHostView::OnProxyViewPaint(
     const gfx::Rect& damage_rect) {
-  InvalidateBounds(
-      gfx::ConvertRectToPixel(current_device_scale_factor_, damage_rect));
+  InvalidateBounds(gfx::ToEnclosingRect(
+      gfx::ConvertRectToPixels(damage_rect, current_device_scale_factor_)));
 }
 
 void OffScreenRenderWidgetHostView::HoldResize() {
@@ -943,9 +942,9 @@ ui::Layer* OffScreenRenderWidgetHostView::GetRootLayer() const {
   return root_layer_.get();
 }
 
-const viz::LocalSurfaceIdAllocation&
-OffScreenRenderWidgetHostView::GetLocalSurfaceIdAllocation() const {
-  return delegated_frame_host_allocation_;
+const viz::LocalSurfaceId& OffScreenRenderWidgetHostView::GetLocalSurfaceId()
+    const {
+  return delegated_frame_host_surface_id_;
 }
 
 content::DelegatedFrameHost*
@@ -997,23 +996,22 @@ void OffScreenRenderWidgetHostView::ResizeRootLayer(bool force) {
 
   GetRootLayer()->SetBounds(gfx::Rect(size));
 
-  const gfx::Size& size_in_pixels =
-      gfx::ConvertSizeToPixel(current_device_scale_factor_, size);
+  const gfx::Size& size_in_pixels = gfx::ToFlooredSize(
+      gfx::ConvertSizeToPixels(size, current_device_scale_factor_));
 
   if (compositor_) {
     compositor_allocator_.GenerateId();
-    compositor_allocation_ =
-        compositor_allocator_.GetCurrentLocalSurfaceIdAllocation();
+    compositor_surface_id_ = compositor_allocator_.GetCurrentLocalSurfaceId();
     compositor_->SetScaleAndSize(current_device_scale_factor_, size_in_pixels,
-                                 compositor_allocation_);
+                                 compositor_surface_id_);
   }
 
   delegated_frame_host_allocator_.GenerateId();
-  delegated_frame_host_allocation_ =
-      delegated_frame_host_allocator_.GetCurrentLocalSurfaceIdAllocation();
+  delegated_frame_host_surface_id_ =
+      delegated_frame_host_allocator_.GetCurrentLocalSurfaceId();
 
   GetDelegatedFrameHost()->EmbedSurface(
-      delegated_frame_host_allocation_.local_surface_id(), size,
+      delegated_frame_host_surface_id_, size,
       cc::DeadlinePolicy::UseDefaultDeadline());
 
   // Note that |render_widget_host_| will retrieve resize parameters from the

+ 3 - 4
shell/browser/osr/osr_render_widget_host_view.h

@@ -140,8 +140,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
       content::RenderWidgetHost*,
       content::WebContentsView*) override;
 
-  const viz::LocalSurfaceIdAllocation& GetLocalSurfaceIdAllocation()
-      const override;
+  const viz::LocalSurfaceId& GetLocalSurfaceId() const override;
   const viz::FrameSinkId& GetFrameSinkId() const override;
 
   void DidNavigate() override;
@@ -254,10 +253,10 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
 
   bool paint_callback_running_ = false;
 
-  viz::LocalSurfaceIdAllocation delegated_frame_host_allocation_;
+  viz::LocalSurfaceId delegated_frame_host_surface_id_;
   viz::ParentLocalSurfaceIdAllocator delegated_frame_host_allocator_;
 
-  viz::LocalSurfaceIdAllocation compositor_allocation_;
+  viz::LocalSurfaceId compositor_surface_id_;
   viz::ParentLocalSurfaceIdAllocator compositor_allocator_;
 
   std::unique_ptr<ui::Layer> root_layer_;

+ 2 - 2
shell/browser/osr/osr_web_contents_view.cc

@@ -162,7 +162,7 @@ bool OffScreenWebContentsView::CloseTabAfterEventTrackingIfNeeded() {
 
 void OffScreenWebContentsView::StartDragging(
     const content::DropData& drop_data,
-    blink::WebDragOperationsMask allowed_ops,
+    blink::DragOperationsMask allowed_ops,
     const gfx::ImageSkia& image,
     const gfx::Vector2d& image_offset,
     const blink::mojom::DragEventSourceInfo& event_info,
@@ -173,7 +173,7 @@ void OffScreenWebContentsView::StartDragging(
 }
 
 void OffScreenWebContentsView::UpdateDragCursor(
-    blink::WebDragOperation operation) {}
+    blink::DragOperation operation) {}
 
 void OffScreenWebContentsView::SetPainting(bool painting) {
   auto* view = GetView();

+ 3 - 3
shell/browser/osr/osr_web_contents_view.h

@@ -12,6 +12,7 @@
 #include "content/browser/web_contents/web_contents_view.h"  // nogncheck
 #include "content/public/browser/web_contents.h"
 #include "shell/browser/osr/osr_render_widget_host_view.h"
+#include "third_party/blink/public/common/page/drag_mojom_traits.h"
 
 #if defined(OS_MAC)
 #ifdef __OBJC__
@@ -68,13 +69,12 @@ class OffScreenWebContentsView : public content::WebContentsView,
 
   // content::RenderViewHostDelegateView
   void StartDragging(const content::DropData& drop_data,
-                     blink::WebDragOperationsMask allowed_ops,
+                     blink::DragOperationsMask allowed_ops,
                      const gfx::ImageSkia& image,
                      const gfx::Vector2d& image_offset,
                      const blink::mojom::DragEventSourceInfo& event_info,
                      content::RenderWidgetHostImpl* source_rwh) override;
-  void UpdateDragCursor(blink::WebDragOperation operation) override;
-
+  void UpdateDragCursor(blink::DragOperation operation) override;
   void SetPainting(bool painting);
   bool IsPainting() const;
   void SetFrameRate(int frame_rate);

+ 10 - 4
shell/browser/ui/views/global_menu_bar_x11.cc

@@ -8,6 +8,7 @@
 #include <glib-object.h>
 
 #include "base/logging.h"
+#include "base/strings/string16.h"
 #include "base/strings/stringprintf.h"
 #include "base/strings/utf_string_conversions.h"
 #include "chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h"
@@ -17,7 +18,11 @@
 #include "ui/aura/window_tree_host.h"
 #include "ui/base/accelerators/menu_label_accelerator_util_linux.h"
 #include "ui/events/keycodes/keyboard_code_conversion_x.h"
+#include "ui/events/keycodes/keysym_to_unicode.h"
+#include "ui/gfx/x/connection.h"
+#include "ui/gfx/x/keysyms/keysyms.h"
 #include "ui/gfx/x/x11.h"
+#include "ui/gfx/x/xproto.h"
 
 // libdbusmenu-glib types
 typedef struct _DbusmenuMenuitem DbusmenuMenuitem;
@@ -286,13 +291,14 @@ void GlobalMenuBarX11::RegisterAccelerator(DbusmenuMenuitem* item,
   if (accelerator.IsShiftDown())
     g_variant_builder_add(&builder, "s", "Shift");
 
-  char* name =
-      XKeysymToString(XKeysymForWindowsKeyCode(accelerator.key_code(), false));
-  if (!name) {
+  uint16_t keysym = ui::GetUnicodeCharacterFromXKeySym(
+      XKeysymForWindowsKeyCode(accelerator.key_code(), false));
+  if (!keysym) {
     NOTIMPLEMENTED();
     return;
   }
-  g_variant_builder_add(&builder, "s", name);
+  std::string name = base::UTF16ToUTF8(base::string16(1, keysym));
+  g_variant_builder_add(&builder, "s", name.c_str());
 
   GVariant* inside_array = g_variant_builder_end(&builder);
   g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);

+ 2 - 3
shell/browser/ui/x/x_window_utils.cc

@@ -80,9 +80,8 @@ void MoveWindowAbove(x11::Window window, x11::Window other_window) {
 }
 
 bool IsWindowValid(x11::Window window) {
-  XWindowAttributes attrs;
-  return XGetWindowAttributes(gfx::GetXDisplay(), static_cast<uint32_t>(window),
-                              &attrs);
+  auto* conn = x11::Connection::Get();
+  return conn->GetWindowAttributes({window}).Sync();
 }
 
 }  // namespace electron

+ 0 - 12
shell/browser/web_view_guest_delegate.cc

@@ -62,10 +62,6 @@ void WebViewGuestDelegate::WillDestroy() {
   ResetZoomController();
 }
 
-void WebViewGuestDelegate::DidDetach() {
-  ResetZoomController();
-}
-
 content::WebContents* WebViewGuestDelegate::GetOwnerWebContents() {
   return embedder_web_contents_;
 }
@@ -97,14 +93,6 @@ void WebViewGuestDelegate::ResetZoomController() {
   }
 }
 
-content::RenderWidgetHost* WebViewGuestDelegate::GetOwnerRenderWidgetHost() {
-  return embedder_web_contents_->GetRenderViewHost()->GetWidget();
-}
-
-content::SiteInstance* WebViewGuestDelegate::GetOwnerSiteInstance() {
-  return embedder_web_contents_->GetSiteInstance();
-}
-
 content::WebContents* WebViewGuestDelegate::CreateNewGuestWindow(
     const content::WebContents::CreateParams& create_params) {
   // Code below mirrors what content::WebContentsImpl::CreateNewWindow

+ 0 - 3
shell/browser/web_view_guest_delegate.h

@@ -28,10 +28,7 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate,
 
  protected:
   // content::BrowserPluginGuestDelegate:
-  void DidDetach() final;
   content::WebContents* GetOwnerWebContents() final;
-  content::RenderWidgetHost* GetOwnerRenderWidgetHost() final;
-  content::SiteInstance* GetOwnerSiteInstance() final;
   content::WebContents* CreateNewGuestWindow(
       const content::WebContents::CreateParams& create_params) final;
 

+ 0 - 15
shell/browser/web_view_manager.cc

@@ -45,21 +45,6 @@ content::WebContents* WebViewManager::GetEmbedder(int guest_instance_id) {
                                                       : iter->second.embedder;
 }
 
-content::WebContents* WebViewManager::GetGuestByInstanceID(
-    int owner_process_id,
-    int element_instance_id) {
-  const ElementInstanceKey key(owner_process_id, element_instance_id);
-  const auto guest_iter = element_instance_id_to_guest_map_.find(key);
-  if (guest_iter == std::end(element_instance_id_to_guest_map_))
-    return nullptr;
-
-  const int guest_instance_id = guest_iter->second;
-  const auto iter = web_contents_embedder_map_.find(guest_instance_id);
-  return iter == std::end(web_contents_embedder_map_)
-             ? nullptr
-             : iter->second.web_contents;
-}
-
 bool WebViewManager::ForEachGuest(content::WebContents* embedder_web_contents,
                                   const GuestCallback& callback) {
   for (auto& item : web_contents_embedder_map_) {

+ 0 - 2
shell/browser/web_view_manager.h

@@ -27,8 +27,6 @@ class WebViewManager : public content::BrowserPluginGuestManager {
 
  protected:
   // content::BrowserPluginGuestManager:
-  content::WebContents* GetGuestByInstanceID(int owner_process_id,
-                                             int element_instance_id) override;
   bool ForEachGuest(content::WebContents* embedder,
                     const GuestCallback& callback) override;
 

+ 0 - 4
shell/renderer/guest_view_container.cc

@@ -57,8 +57,4 @@ void GuestViewContainer::DidResizeElement(const gfx::Size& new_size) {
       FROM_HERE, base::BindOnce(element_resize_callback_, new_size));
 }
 
-base::WeakPtr<content::BrowserPluginDelegate> GuestViewContainer::GetWeakPtr() {
-  return weak_ptr_factory_.GetWeakPtr();
-}
-
 }  // namespace electron

+ 4 - 8
shell/renderer/guest_view_container.h

@@ -6,7 +6,6 @@
 #define SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_
 
 #include "base/callback.h"
-#include "content/public/renderer/browser_plugin_delegate.h"
 #include "content/public/renderer/render_frame.h"
 
 namespace gfx {
@@ -15,21 +14,18 @@ class Size;
 
 namespace electron {
 
-class GuestViewContainer : public content::BrowserPluginDelegate {
+class GuestViewContainer {
  public:
   typedef base::Callback<void(const gfx::Size&)> ResizeCallback;
 
   explicit GuestViewContainer(content::RenderFrame* render_frame);
-  ~GuestViewContainer() override;
+  virtual ~GuestViewContainer();
 
   static GuestViewContainer* FromID(int element_instance_id);
 
   void RegisterElementResizeCallback(const ResizeCallback& callback);
-
-  // content::BrowserPluginDelegate:
-  void SetElementInstanceID(int element_instance_id) final;
-  void DidResizeElement(const gfx::Size& new_size) final;
-  base::WeakPtr<BrowserPluginDelegate> GetWeakPtr() final;
+  void SetElementInstanceID(int element_instance_id);
+  void DidResizeElement(const gfx::Size& new_size);
 
  private:
   int element_instance_id_;

+ 1 - 1
shell/renderer/renderer_client_base.cc

@@ -363,7 +363,7 @@ void RendererClientBase::DidSetUserAgent(const std::string& user_agent) {
 #endif
 }
 
-content::BrowserPluginDelegate* RendererClientBase::CreateBrowserPluginDelegate(
+guest_view::GuestViewContainer* RendererClientBase::CreateBrowserPluginDelegate(
     content::RenderFrame* render_frame,
     const content::WebPluginInfo& info,
     const std::string& mime_type,

+ 9 - 2
shell/renderer/renderer_client_base.h

@@ -30,8 +30,15 @@ class SpellCheck;
 namespace extensions {
 class ExtensionsClient;
 }
+namespace content {
+struct WebPluginInfo;
+}
 #endif
 
+namespace guest_view {
+class GuestViewContainer;
+}
+
 namespace electron {
 
 #if BUILDFLAG(ENABLE_ELECTRON_EXTENSIONS)
@@ -100,11 +107,11 @@ class RendererClientBase : public content::ContentRendererClient
       override;
   bool IsKeySystemsUpdateNeeded() override;
   void DidSetUserAgent(const std::string& user_agent) override;
-  content::BrowserPluginDelegate* CreateBrowserPluginDelegate(
+  guest_view::GuestViewContainer* CreateBrowserPluginDelegate(
       content::RenderFrame* render_frame,
       const content::WebPluginInfo& info,
       const std::string& mime_type,
-      const GURL& original_url) override;
+      const GURL& original_url);
   bool IsPluginHandledExternally(content::RenderFrame* render_frame,
                                  const blink::WebElement& plugin_element,
                                  const GURL& original_url,