Browse Source

chore: bump chromium to 79eae5b7b2d9dac441ac0182ee160 (master) (#19166)

Electron Bot 5 years ago
parent
commit
bd526f97a5
92 changed files with 507 additions and 461 deletions
  1. 1 1
      BUILD.gn
  2. 1 1
      DEPS
  3. 4 0
      build/args/all.gn
  4. 1 1
      chromium_src/BUILD.gn
  5. 1 1
      patches/boringssl/expose_ripemd160.patch
  6. 3 2
      patches/chromium/.patches
  7. 4 4
      patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch
  8. 2 2
      patches/chromium/add_realloc.patch
  9. 2 2
      patches/chromium/allow_webview_file_url.patch
  10. 2 2
      patches/chromium/blink_initialization_order.patch
  11. 1 1
      patches/chromium/blink_local_frame.patch
  12. 5 5
      patches/chromium/blink_world_context.patch
  13. 1 1
      patches/chromium/build_add_electron_tracing_category.patch
  14. 1 1
      patches/chromium/build_gn.patch
  15. 36 0
      patches/chromium/build_win_disable_zc_twophase.patch
  16. 14 14
      patches/chromium/can_create_window.patch
  17. 2 2
      patches/chromium/content_browser_main_loop.patch
  18. 5 5
      patches/chromium/cross_site_document_resource_handler.patch
  19. 6 6
      patches/chromium/dcheck.patch
  20. 3 3
      patches/chromium/desktop_media_list.patch
  21. 6 6
      patches/chromium/disable-redraw-lock.patch
  22. 33 34
      patches/chromium/disable_color_correct_rendering.patch
  23. 4 4
      patches/chromium/disable_hidden.patch
  24. 1 1
      patches/chromium/disable_network_services_by_default.patch
  25. 2 2
      patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  26. 1 1
      patches/chromium/dom_storage_limits.patch
  27. 2 2
      patches/chromium/exclude-a-few-test-files-from-build.patch
  28. 20 12
      patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch
  29. 2 2
      patches/chromium/fix_disable_usage_of_setapplicationisdaemon_and.patch
  30. 10 10
      patches/chromium/frame_host_manager.patch
  31. 2 2
      patches/chromium/gritsettings_resource_ids.patch
  32. 1 1
      patches/chromium/mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
  33. 24 24
      patches/chromium/mas_no_private_api.patch
  34. 9 9
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  35. 1 1
      patches/chromium/no_cache_storage_check.patch
  36. 26 28
      patches/chromium/notification_provenance.patch
  37. 2 2
      patches/chromium/out_of_process_instance.patch
  38. 3 3
      patches/chromium/patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
  39. 18 18
      patches/chromium/pepper_flash.patch
  40. 30 30
      patches/chromium/printing.patch
  41. 4 4
      patches/chromium/put_back_deleted_colors_for_autofill.patch
  42. 2 2
      patches/chromium/render_widget_host_view_base.patch
  43. 6 6
      patches/chromium/render_widget_host_view_mac.patch
  44. 3 3
      patches/chromium/resource_file_conflict.patch
  45. 2 2
      patches/chromium/scroll_bounce_flag.patch
  46. 5 5
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  47. 1 1
      patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch
  48. 6 6
      patches/chromium/web_contents.patch
  49. 2 2
      patches/chromium/webview_cross_drag.patch
  50. 7 7
      patches/chromium/worker_context_will_destroy.patch
  51. 0 2
      patches/config.json
  52. 0 0
      patches/swiftshader/.patches
  53. 4 4
      patches/v8/add_realloc.patch
  54. 3 3
      patches/v8/build_gn.patch
  55. 4 4
      patches/v8/dcheck.patch
  56. 24 24
      patches/v8/deps_provide_more_v8_backwards_compatibility.patch
  57. 1 1
      patches/v8/do_not_export_private_v8_symbols_on_windows.patch
  58. 1 1
      patches/v8/export_symbols_needed_for_windows_build.patch
  59. 3 3
      patches/v8/expose_mksnapshot.patch
  60. 2 2
      patches/v8/workaround_an_undefined_symbol_error.patch
  61. 6 0
      script/zip_manifests/dist_zip.mac.x64.manifest
  62. 6 0
      script/zip_manifests/dist_zip.mac_mas.x64.manifest
  63. 0 4
      shell/app/atom_main_delegate.cc
  64. 0 1
      shell/app/atom_main_delegate.h
  65. 3 0
      shell/app/atom_main_delegate_mac.mm
  66. 0 3
      shell/app/manifests.cc
  67. 1 1
      shell/browser/api/atom_api_net_log.cc
  68. 4 2
      shell/browser/api/atom_api_top_level_window.cc
  69. 5 4
      shell/browser/api/atom_api_url_request_ns.cc
  70. 2 2
      shell/browser/api/atom_api_url_request_ns.h
  71. 22 20
      shell/browser/atom_browser_client.cc
  72. 9 12
      shell/browser/atom_browser_client.h
  73. 4 4
      shell/browser/io_thread.cc
  74. 1 1
      shell/browser/native_window.cc
  75. 2 2
      shell/browser/native_window.h
  76. 2 2
      shell/browser/native_window_mac.h
  77. 4 4
      shell/browser/native_window_mac.mm
  78. 6 6
      shell/browser/native_window_views.cc
  79. 2 2
      shell/browser/native_window_views.h
  80. 8 5
      shell/browser/net/asar/asar_url_loader.cc
  81. 9 7
      shell/browser/net/atom_url_loader_factory.cc
  82. 7 6
      shell/browser/net/node_stream_loader.cc
  83. 2 2
      shell/browser/net/node_stream_loader.h
  84. 5 5
      shell/browser/net/url_pipe_loader.cc
  85. 2 2
      shell/browser/net/url_pipe_loader.h
  86. 1 1
      shell/browser/printing/print_preview_message_handler.h
  87. 4 4
      shell/browser/ui/drag_util_views.cc
  88. 1 0
      shell/browser/ui/views/autofill_popup_view.cc
  89. 1 0
      shell/browser/ui/win/notify_icon.cc
  90. 2 0
      shell/common/mac/main_application_bundle.mm
  91. 13 31
      shell/utility/atom_content_utility_client.cc
  92. 1 0
      shell/utility/atom_content_utility_client.h

+ 1 - 1
BUILD.gn

@@ -298,7 +298,6 @@ source_set("manifests") {
   deps = [
     "//electron/shell/common/api:mojo",
     "//printing/buildflags",
-    "//services/proxy_resolver/public/cpp:manifest",
     "//services/service_manager/public/cpp",
   ]
 
@@ -369,6 +368,7 @@ source_set("electron_lib") {
     "//content/public/renderer",
     "//content/public/utility",
     "//device/bluetooth",
+    "//device/bluetooth/public/cpp",
     "//gin",
     "//media/capture/mojom:video_capture",
     "//media/mojo/interfaces",

+ 1 - 1
DEPS

@@ -10,7 +10,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '5a48e127c8cb8ae827f4fead0b527079194b9899',
+    'b781cb24dc079eae5b7b2d9dac441ac0182ee160',
   'node_version':
     'v12.6.0',
   'nan_version':

+ 4 - 0
build/args/all.gn

@@ -20,3 +20,7 @@ enable_basic_printing = true
 angle_enable_vulkan_validation_layers = false
 
 is_cfi = false
+
+# TODO: Remove this and update CI to contain 10.14 SDK once
+# crbug.com/986701 is fixed.
+mac_sdk_min = "10.13"

+ 1 - 1
chromium_src/BUILD.gn

@@ -165,7 +165,7 @@ static_library("chrome") {
       "//components/printing/browser",
       "//components/printing/renderer",
       "//components/services/pdf_compositor/public/cpp:factory",
-      "//components/services/pdf_compositor/public/interfaces",
+      "//components/services/pdf_compositor/public/mojom",
     ]
     deps += [
       "//components/printing/common",

+ 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 1a1ca29732afae317c8e8740c629e8922fc83093..48ebdd1eb93b3febecddbc2545b7aae583f21525 100644
+index c7c679760a30329311b4a6c0db475b2375537028..991fa00b8330a663625719436075bcc8ae32e17a 100644
 --- a/include/openssl/digest.h
 +++ b/include/openssl/digest.h
 @@ -88,6 +88,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_sha512(void);

+ 3 - 2
patches/chromium/.patches

@@ -56,7 +56,6 @@ tts.patch
 printing.patch
 verbose_generate_breakpad_symbols.patch
 support_mixed_sandbox_with_zygote.patch
-disable_color_correct_rendering.patch
 autofill_size_calculation.patch
 fix_disable_usage_of_abort_report_np_in_mas_builds.patch
 fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
@@ -65,7 +64,6 @@ disable_network_services_by_default.patch
 unsandboxed_ppapi_processes_skip_zygote.patch
 patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
 build_add_electron_tracing_category.patch
-add_contentgpuclient_precreatemessageloop_callback.patch
 disable_custom_libcxx_on_windows.patch
 feat_offscreen_rendering_with_viz_compositor.patch
 worker_context_will_destroy.patch
@@ -76,3 +74,6 @@ crashpad_pid_check.patch
 chore_add_debounce_on_the_updatewebcontentsvisibility_method_to.patch
 network_service_allow_remote_certificate_verification_logic.patch
 put_back_deleted_colors_for_autofill.patch
+build_win_disable_zc_twophase.patch
+disable_color_correct_rendering.patch
+add_contentgpuclient_precreatemessageloop_callback.patch

+ 4 - 4
patches/chromium/add_contentgpuclient_precreatemessageloop_callback.patch

@@ -9,10 +9,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
 This should be upstreamed
 
 diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index 877495568fddbc7dae5835ead41faf37be77208a..362c01039826ee5764d170da17cc7111617a8de2 100644
+index 69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5..7d1d9f871f7a0676b040651cf5a7122ee6cf2732 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
-@@ -236,6 +236,10 @@ int GpuMain(const MainFunctionParams& parameters) {
+@@ -235,6 +235,10 @@ int GpuMain(const MainFunctionParams& parameters) {
  
    logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
  
@@ -23,9 +23,9 @@ index 877495568fddbc7dae5835ead41faf37be77208a..362c01039826ee5764d170da17cc7111
    // We are experiencing what appear to be memory-stomp issues in the GPU
    // process. These issues seem to be impacting the task executor and listeners
    // registered to it. Create the task executor on the heap to guard against
-@@ -339,7 +343,6 @@ int GpuMain(const MainFunctionParams& parameters) {
-           : base::ThreadPriority::NORMAL;
+@@ -348,7 +352,6 @@ int GpuMain(const MainFunctionParams& parameters) {
    GpuProcess gpu_process(io_thread_priority);
+ #endif
  
 -  auto* client = GetContentClient()->gpu();
    if (client)

+ 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 d4fcac361f99e52a4a0e9e90abe639816cf51fc1..8d7c531de5e9016da6cd2d823f7d7f3270b9abf6 100644
+index fc77a1d2c717cbf6a4066082c4e941d73e707847..cde4f969cb799b9ede05f29148fba32d32309cc2 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -632,6 +632,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+@@ -643,6 +643,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
          size, WTF::ArrayBufferContents::kDontInitialize);
    }
  

+ 2 - 2
patches/chromium/allow_webview_file_url.patch

@@ -6,10 +6,10 @@ Subject: allow_webview_file_url.patch
 Allow webview to load non-web URLs.
 
 diff --git a/content/browser/loader/resource_dispatcher_host_impl.cc b/content/browser/loader/resource_dispatcher_host_impl.cc
-index c4db9c98e4e909cea8ba000402afdb32ff57cb4e..28325e6f6f64922c4ba0daf2c94dcae34d5b4855 100644
+index 76bcf34f58ef62dc42927a94d1e4410c1a0bde2e..008d89fe6b46facb7b3f8ca908c76c36d19c396b 100644
 --- a/content/browser/loader/resource_dispatcher_host_impl.cc
 +++ b/content/browser/loader/resource_dispatcher_host_impl.cc
-@@ -1429,6 +1429,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
+@@ -1426,6 +1426,8 @@ void ResourceDispatcherHostImpl::BeginNavigationRequest(
        !policy->IsWebSafeScheme(info.common_params.url.scheme()) &&
        !is_external_protocol;
  

+ 2 - 2
patches/chromium/blink_initialization_order.patch

@@ -10,10 +10,10 @@ to fix electron/electron#13787.  The backport landed in Chromium 67 but the
 DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
 
 diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-index 59af62ece264de7f392f8b13ae373700d6aafc56..2d547910eaef8ba2194a012f8a6c9a444b7de741 100644
+index 50c06fddeff3647dc99f8ab9f1538723f91ec2a9..fa4b6c3c8081af03055ddeadc53606fcc9030d5c 100644
 --- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
-@@ -191,11 +191,10 @@ void LocalWindowProxy::Initialize() {
+@@ -203,11 +203,10 @@ void LocalWindowProxy::Initialize() {
                   GetFrame()->IsMainFrame());
      MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(),
                                                     origin);

+ 1 - 1
patches/chromium/blink_local_frame.patch

@@ -14,7 +14,7 @@ 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 b4e75c8bc63c30c4d0dde96912aee87260662103..3a61f37a05fb5e626a0898b53600b79ab3c20f88 100644
+index 164617045cd6a6474ea6ecad0fea268645959e37..548a2ae1305d9b409ad76cb1869eeeee109150d9 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
 @@ -332,10 +332,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {

+ 5 - 5
patches/chromium/blink_world_context.patch

@@ -5,7 +5,7 @@ Subject: blink_world_context.patch
 
 
 diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
-index c41afd046ee882cdb4c9f706c4d08cd05bd133ec..a52f1a86e6aeecb0d704b01746de550125e4358f 100644
+index c3c23c35aab3f9bead8b13b8b540412e6f124c1b..3924632936bd972f1a904163a29a634ea1dfda72 100644
 --- a/third_party/blink/public/web/web_local_frame.h
 +++ b/third_party/blink/public/web/web_local_frame.h
 @@ -357,6 +357,9 @@ class WebLocalFrame : public WebFrame {
@@ -19,10 +19,10 @@ index c41afd046ee882cdb4c9f706c4d08cd05bd133ec..a52f1a86e6aeecb0d704b01746de5501
    // that the script evaluated to with callback. Script execution can be
    // suspend.
 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 e55ac9152cfdd35e0d5e0cc99ec8d8abe5bac5f1..cb1881473d452e3454977d9277551ad693f3a90c 100644
+index a0e9ad3581fbd7ed748bc551931c89f13015d9ce..1683e16cb4f507fd75d4525a516568e69efac861 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
-@@ -867,6 +867,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
+@@ -868,6 +868,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
    return MainWorldScriptContext()->Global();
  }
  
@@ -37,10 +37,10 @@ index e55ac9152cfdd35e0d5e0cc99ec8d8abe5bac5f1..cb1881473d452e3454977d9277551ad6
    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 043afe0005af3e4271f2b0c8e490e4e4141fc1b5..3a937e1a451ddf1e99ef4322ebc21044d48ad537 100644
+index 744a3f1befcf47c268db347e8e6dd3b000a10b9a..0e24471373395ad91832a4922d2666cf995340ce 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
-@@ -148,6 +148,8 @@ class CORE_EXPORT WebLocalFrameImpl final
+@@ -149,6 +149,8 @@ class CORE_EXPORT WebLocalFrameImpl final
        int argc,
        v8::Local<v8::Value> argv[]) override;
    v8::Local<v8::Context> MainWorldScriptContext() const override;

+ 1 - 1
patches/chromium/build_add_electron_tracing_category.patch

@@ -8,7 +8,7 @@ categories in use are known / declared.  This patch is required for us
 to introduce a new Electron category.
 
 diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
-index 2225bfcbb9a2bf8ee0082304adf6528522964e65..151f7fe91fc53b3069ce892607e4e6f9c91b40f7 100644
+index 7c0723ffd4934300fed249e2d3c98532e9382885..b0e5e3f30c2235e4bbe0bd3dc324e99d7f505e79 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
 @@ -61,6 +61,7 @@

+ 1 - 1
patches/chromium/build_gn.patch

@@ -5,7 +5,7 @@ Subject: build_gn.patch
 
 
 diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
-index 7063da0f26c5691f01214c2dc014128d7c8c5e09..b45c5adade6f68d5ba90ddbdf39755b53431b6f6 100644
+index db7ab0255b482d4e1fd20a31cfec86a24546602a..bb3f8efa2340d6c19a1bc51a5d12c5cd9449664a 100644
 --- a/build/config/BUILDCONFIG.gn
 +++ b/build/config/BUILDCONFIG.gn
 @@ -123,6 +123,9 @@ if (current_os == "") {

+ 36 - 0
patches/chromium/build_win_disable_zc_twophase.patch

@@ -0,0 +1,36 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: deepak1556 <[email protected]>
+Date: Tue, 16 Jul 2019 14:38:52 -0700
+Subject: build: Temporarily disable /Zc:twoPhase when libcxx is not used on
+ windows.
+
+This is to workaround the bug in crbug.com/969698#c10
+until fixes have landed in upstream.
+
+diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
+index a6c0aeaf98f7a860c131dc52161f52f308432a91..7b490d07d0f8383db5cea2703d7451db0108d252 100644
+--- a/build/config/win/BUILD.gn
++++ b/build/config/win/BUILD.gn
+@@ -2,6 +2,7 @@
+ # Use of this source code is governed by a BSD-style license that can be
+ # found in the LICENSE file.
+ 
++import("//build/config/c++/c++.gni")
+ import("//build/config/chrome_build.gni")
+ import("//build/config/clang/clang.gni")
+ import("//build/config/compiler/compiler.gni")
+@@ -67,9 +68,13 @@ config("compiler") {
+     "/FS",  # Preserve previous PDB behavior.
+     "/bigobj",  # Some of our files are bigger than the regular limits.
+     "/utf-8",  # Assume UTF-8 by default to avoid code page dependencies.
+-    "/Zc:twoPhase",
+   ]
+ 
++  if (use_custom_libcxx) {
++    # Work around crbug.com/969698#c6, bug in MSSTL <xxatomic>.
++    cflags += [ "/Zc:twoPhase" ]
++  }
++
+   # Force C/C++ mode for the given GN detected file type. This is necessary
+   # for precompiled headers where the same source file is compiled in both
+   # modes.

+ 14 - 14
patches/chromium/can_create_window.patch

@@ -5,10 +5,10 @@ Subject: can_create_window.patch
 
 
 diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
-index ee3bf9edbd615fb238d541f1baab5bcda1897d56..045b136fd6659f746affcd3ace85092111fec602 100644
+index 0774bc243cf83cbec60b0d1c0a93d56538676354..44a85b814e305e158d58e615901a7d188b813d43 100644
 --- a/content/browser/frame_host/render_frame_host_impl.cc
 +++ b/content/browser/frame_host/render_frame_host_impl.cc
-@@ -3814,6 +3814,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -3834,6 +3834,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,
@@ -17,10 +17,10 @@ index ee3bf9edbd615fb238d541f1baab5bcda1897d56..045b136fd6659f746affcd3ace850921
            &no_javascript_access);
  
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index c5078d23ace270e1e7f479a827712f24aaf729a4..4dab0367f1280b2c9374309c3803436df2929ef0 100644
+index a2fe2dbd0d1c91a0bf5047b5c93f30758a0db277..d9f44fecaae883d861eea94c6cc16727967f0baa 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
-@@ -303,6 +303,10 @@ struct CreateNewWindowParams {
+@@ -305,6 +305,10 @@ struct CreateNewWindowParams {
  
    // The window features to use for the new window.
    blink.mojom.WindowFeatures features;
@@ -32,10 +32,10 @@ index c5078d23ace270e1e7f479a827712f24aaf729a4..4dab0367f1280b2c9374309c3803436d
  
  // 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 d7d2b18dbded3b1041ac8bd93ee5a5161d220aed..b7a903ae979f56e79603af1a6edf395d67e0e982 100644
+index 546ad19cd1e76474136492076b1d016d02338c42..06984e1da1512c3d8577716432920a1755524cf8 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
-@@ -517,6 +517,8 @@ bool ContentBrowserClient::CanCreateWindow(
+@@ -512,6 +512,8 @@ bool ContentBrowserClient::CanCreateWindow(
      const std::string& frame_name,
      WindowOpenDisposition disposition,
      const blink::mojom::WindowFeatures& features,
@@ -45,10 +45,10 @@ index d7d2b18dbded3b1041ac8bd93ee5a5161d220aed..b7a903ae979f56e79603af1a6edf395d
      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 b422bbf7baa6252ce97670c0b8c16e1eb526f627..86755824ccbaef2d5eeea63166d2243228bd5a4a 100644
+index cc45848df84b5be9b20d9e60f6f605dbc32f36e7..52cf099889768bbc14acc3f32fcfba5ab7640a1d 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -177,6 +177,7 @@ class RenderFrameHost;
+@@ -176,6 +176,7 @@ class RenderFrameHost;
  class RenderProcessHost;
  class RenderViewHost;
  class ResourceContext;
@@ -56,7 +56,7 @@ index b422bbf7baa6252ce97670c0b8c16e1eb526f627..86755824ccbaef2d5eeea63166d22432
  class SerialDelegate;
  class SiteInstance;
  class SpeechRecognitionManagerDelegate;
-@@ -807,6 +808,8 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -797,6 +798,8 @@ class CONTENT_EXPORT ContentBrowserClient {
        const std::string& frame_name,
        WindowOpenDisposition disposition,
        const blink::mojom::WindowFeatures& features,
@@ -66,10 +66,10 @@ index b422bbf7baa6252ce97670c0b8c16e1eb526f627..86755824ccbaef2d5eeea63166d22432
        bool opener_suppressed,
        bool* no_javascript_access);
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index dae2f5a0dfedc5f7cd81c479cfab383730e61d9c..960fe49cab461b2f34793959bde0bbd829fe56bd 100644
+index d0ca81590d2b5688022ca6045869dcae0ecd778e..7752c1e49dbee49c64a552ec249cabdb4d073109 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
-@@ -76,6 +76,7 @@
+@@ -75,6 +75,7 @@
  #include "content/renderer/ime_event_guard.h"
  #include "content/renderer/internal_document_state_data.h"
  #include "content/renderer/loader/request_extra_data.h"
@@ -77,7 +77,7 @@ index dae2f5a0dfedc5f7cd81c479cfab383730e61d9c..960fe49cab461b2f34793959bde0bbd8
  #include "content/renderer/media/audio/audio_device_factory.h"
  #include "content/renderer/media/stream/media_stream_device_observer.h"
  #include "content/renderer/media/video_capture/video_capture_impl_manager.h"
-@@ -1359,6 +1360,8 @@ WebView* RenderViewImpl::CreateView(
+@@ -1366,6 +1367,8 @@ WebView* RenderViewImpl::CreateView(
    }
    params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
  
@@ -87,7 +87,7 @@ index dae2f5a0dfedc5f7cd81c479cfab383730e61d9c..960fe49cab461b2f34793959bde0bbd8
    // moved on send.
    bool is_background_tab =
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
-index c8aa2f99f40d038b73d0c9dbec2d941b1c652a6f..b8c17c44f3884e1f60ffd42dbae433392dde6307 100644
+index dacecdd4d0195e999f11fd2e1dfaabe95a639263..c5b88ee2561561c0b8a8032d32255645ce30c450 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.cc
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
 @@ -308,6 +308,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -100,7 +100,7 @@ index c8aa2f99f40d038b73d0c9dbec2d941b1c652a6f..b8c17c44f3884e1f60ffd42dbae43339
      bool opener_suppressed,
      bool* no_javascript_access) {
 diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
-index c07734ff32037fe4de7a5082d3409ee99ae19870..f0b47cc56ba5565d142e5b38efcefe333ce89e2f 100644
+index 4f00217da5a4f6f3d7410b82352fcb94e7f4a8fd..33e30d6a816e87dade0a26710a8f71fc6f630f34 100644
 --- a/content/shell/browser/web_test/web_test_content_browser_client.h
 +++ b/content/shell/browser/web_test/web_test_content_browser_client.h
 @@ -69,6 +69,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {

+ 2 - 2
patches/chromium/content_browser_main_loop.patch

@@ -8,10 +8,10 @@ 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 777e9ccf6da4da4924b2e35bff8e7b84fb18a9aa..f04fd728df749100a4699dd922f7a4b17f1fd98c 100644
+index 5b9d42a924bdd121a3eab7145d3f62679e44b09e..78d3ce1ab15ffd1fba2a4a4c1d6447c7627ddb50 100644
 --- a/content/browser/browser_main_loop.cc
 +++ b/content/browser/browser_main_loop.cc
-@@ -1501,7 +1501,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
+@@ -1508,7 +1508,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
    NOTREACHED();
  #else
    base::RunLoop run_loop;

+ 5 - 5
patches/chromium/cross_site_document_resource_handler.patch

@@ -8,10 +8,10 @@ this patch can be removed once we switch to network service,
 where the embedders have a chance to design their URLLoaders.
 
 diff --git a/content/browser/loader/cross_site_document_resource_handler.cc b/content/browser/loader/cross_site_document_resource_handler.cc
-index 8bbfacaa267dd0fac51593c0f8d6ba6b6ccfe5ee..caf8357a86182996bffbd3ee394c026189709e18 100644
+index b74bbef56038e29ca35403affd284a7a8868c201..d6887e576ac197f80a7e5261bd251cd761d1d814 100644
 --- a/content/browser/loader/cross_site_document_resource_handler.cc
 +++ b/content/browser/loader/cross_site_document_resource_handler.cc
-@@ -578,6 +578,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
+@@ -582,6 +582,9 @@ bool CrossSiteDocumentResourceHandler::ShouldBlockBasedOnHeaders(
        request()->initiator()->scheme() == url::kFileScheme)
      return false;
  
@@ -22,7 +22,7 @@ index 8bbfacaa267dd0fac51593c0f8d6ba6b6ccfe5ee..caf8357a86182996bffbd3ee394c0261
  }
  
 diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
-index 090eaa070e56d84255f570af3d9f0ea56d02cb69..682b2156f40326ebad00231c0e8bb472fdaf1bbb 100644
+index 87140030f883a0149e5c373f2c6391020974dcfc..700b35aff4e31ec5ad6250941d3f7c2fac8acf74 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -71,6 +71,10 @@ std::unique_ptr<BrowserMainParts> ContentBrowserClient::CreateBrowserMainParts(
@@ -37,10 +37,10 @@ index 090eaa070e56d84255f570af3d9f0ea56d02cb69..682b2156f40326ebad00231c0e8bb472
      const base::Location& from_here,
      const scoped_refptr<base::TaskRunner>& task_runner,
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index e67ab701d608f87cfaf259d44b17605467181fea..0127e41aaadf18effcc66e1743ef1ab6223b1d10 100644
+index b62c08de3ee8efc3090876531a80ea43e4ac6a07..f9239957f9b6bf8184da2a958263d901e1501640 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -252,6 +252,9 @@ class CONTENT_EXPORT ContentBrowserClient {
+@@ -250,6 +250,9 @@ class CONTENT_EXPORT ContentBrowserClient {
    virtual std::unique_ptr<BrowserMainParts> CreateBrowserMainParts(
        const MainFunctionParams& parameters);
  

+ 6 - 6
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/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
-index 818e8e456c4767987bbe0dbb3ee16669ec09620d..cdce8646f2c6c574aa1258917b77a9657c2dbf0d 100644
+index 6a3cca0f846c944f23afe91ca149a0aa28bc18aa..20b3f2ef31d2f036fb0a08d5d7678bb9e67532e6 100644
 --- a/content/browser/frame_host/navigation_controller_impl.cc
 +++ b/content/browser/frame_host/navigation_controller_impl.cc
-@@ -1206,8 +1206,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
+@@ -1211,8 +1211,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
      return NAVIGATION_TYPE_NEW_SUBFRAME;
    }
  
@@ -33,7 +33,7 @@ index 818e8e456c4767987bbe0dbb3ee16669ec09620d..cdce8646f2c6c574aa1258917b77a965
  
    if (rfh->GetParent()) {
      // All manual subframes would be did_create_new_entry and handled above, so
-@@ -1452,7 +1454,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
+@@ -1464,7 +1466,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
      new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
    }
  
@@ -46,15 +46,15 @@ index 818e8e456c4767987bbe0dbb3ee16669ec09620d..cdce8646f2c6c574aa1258917b77a965
    // 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 7ed451db1a95409492f231d6cdde0da4fe2d6123..51dd41bd85bdbbf125747d514ff52ca5debe3638 100644
+index 82bdc4eccf06b7c636dd48cfffebe2606c2cff38..c4385984ebc23bc0a89e7e6ae7d42715a707177d 100644
 --- a/ui/base/clipboard/clipboard_win.cc
 +++ b/ui/base/clipboard/clipboard_win.cc
 @@ -729,9 +729,9 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
  }
  
  void ClipboardWin::WriteToClipboard(unsigned int format, HANDLE handle) {
--  DCHECK(clipboard_owner_->hwnd() != NULL);
-+  // DCHECK(clipboard_owner_->hwnd() != NULL);
+-  DCHECK(clipboard_owner_->hwnd() != nullptr);
++  // DCHECK(clipboard_owner_->hwnd() != nullptr);
    if (handle && !::SetClipboardData(format, handle)) {
 -    DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());
 +    // DCHECK(ERROR_CLIPBOARD_NOT_OPEN != GetLastError());

+ 3 - 3
patches/chromium/desktop_media_list.patch

@@ -36,7 +36,7 @@ index 8e02a8a95eb07516162eacdf5b361231d3a02975..3497b85428a52c6019cfb5d30229071f
    virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
  };
 diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
-index a68d5d774489fe95968046001b8540d74f36dc97..ca1077801ae18862618964a9675a4101b9c3a393 100644
+index 983a8303b11527cdab449d03485653b8c27102de..1362161da462be4eb70f9e698eb274c1890ac0ab 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
 +++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
 @@ -21,6 +21,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@@ -98,7 +98,7 @@ index a68d5d774489fe95968046001b8540d74f36dc97..ca1077801ae18862618964a9675a4101
                                    base::BindOnce(&DesktopMediaListBase::Refresh,
                                                   weak_factory_.GetWeakPtr()),
 diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
-index 746df1210aa92af5c9d4703112b4bd6c09b94fdf..461e0edf8509569d05c86f466c02b5035183d0df 100644
+index 29ef83096f7a7c69c67e9ad1bee2c45723e58f3f..ec228a826b298eb590f15c843e3346460ae13321 100644
 --- a/chrome/browser/media/webrtc/desktop_media_list_base.h
 +++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
 @@ -24,12 +24,14 @@ class DesktopMediaListBase : public DesktopMediaList {
@@ -133,7 +133,7 @@ index 47401abc984e6fe26c7f4c5399aa565c687060b0..ca6a527ffac877c27aac94337ec5a7b5
   protected:
    virtual ~DesktopMediaListObserver() {}
 diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
-index e8f454aa3ae7f5646a2158b84c2281f5bbfdca4a..01ffcc13ff0bdc626e7518aeb4993f0403ab41e8 100644
+index 872152cededb29ca3c04b2deb3fe6491be001af9..4ca62f03abf11bf9d0a48c85a79e098fb6758a30 100644
 --- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
 +++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
 @@ -7,14 +7,15 @@

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

@@ -15,10 +15,10 @@ 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 da11a3dec58470e59a95e6f07d37972414c56b01..2d54c1b1243e25676ee988bcafe0ee24b69e31a5 100644
+index 9b683f301913f85b6849439dd230cc4cf32eca1d..44dbae9b1ed1486a0119666eae8a531b7d9c50d3 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
-@@ -287,6 +287,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
+@@ -331,6 +331,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
  
  }  // namespace
  
@@ -29,7 +29,7 @@ index da11a3dec58470e59a95e6f07d37972414c56b01..2d54c1b1243e25676ee988bcafe0ee24
  // A scoping class that prevents a window from being able to redraw in response
  // to invalidations that may occur within it for the lifetime of the object.
  //
-@@ -338,6 +342,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
+@@ -382,6 +386,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
          cancel_unlock_(false),
          should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
                       ::IsWindow(hwnd_) &&
@@ -37,7 +37,7 @@ index da11a3dec58470e59a95e6f07d37972414c56b01..2d54c1b1243e25676ee988bcafe0ee24
                       (!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
                        !ui::win::IsAeroGlassEnabled())) {
      if (should_lock_)
-@@ -948,6 +953,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
+@@ -989,6 +994,10 @@ bool HWNDMessageHandler::HasChildRenderingWindow() {
        hwnd());
  }
  
@@ -49,10 +49,10 @@ index da11a3dec58470e59a95e6f07d37972414c56b01..2d54c1b1243e25676ee988bcafe0ee24
  // HWNDMessageHandler, gfx::WindowImpl overrides:
  
 diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
-index d918f23a8797323093f196a5d992c3d9df32542f..728a0481bd674f9b224695fde5b17472dc840613 100644
+index 9f0a1a8698838cd797f22cbc4fb100b024758927..2733d8d0220ef92458ca295484525006ddb9d5e8 100644
 --- a/ui/views/win/hwnd_message_handler.h
 +++ b/ui/views/win/hwnd_message_handler.h
-@@ -194,6 +194,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
+@@ -193,6 +193,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
    using TouchIDs = std::set<DWORD>;
    enum class DwmFrameState { OFF, ON };
  

+ 33 - 34
patches/chromium/disable_color_correct_rendering.patch

@@ -19,10 +19,10 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index e2db0f24f90c44c7bf796308c126276472308dd9..8e064f130458d1fc00e499182e0de10d6026a2ee 100644
+index d62c52b53268b4ffab702a0dac3652edc472ccb9..f1ed520f123802469d94c98c418b9f5c5d2032e0 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
-@@ -97,6 +97,8 @@ class CC_EXPORT LayerTreeSettings {
+@@ -95,6 +95,8 @@ class CC_EXPORT LayerTreeSettings {
    bool use_rgba_4444 = false;
    bool unpremultiply_and_dither_low_bit_depth_tiles = false;
  
@@ -32,7 +32,7 @@ index e2db0f24f90c44c7bf796308c126276472308dd9..8e064f130458d1fc00e499182e0de10d
    // 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 d433fb208d4a00cd62534823c95c3f85d286c893..1a098810fe8985dddfc65a602ad6db03fc02c55a 100644
+index e33255364c18298192cf26a783204235f2daedb5..eec7c487ce0bf2d36a48402773c35556c7fddb67 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 {
@@ -44,7 +44,7 @@ index d433fb208d4a00cd62534823c95c3f85d286c893..1a098810fe8985dddfc65a602ad6db03
    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 3b99fdc36afc5c5bb97bc8570da39b8edfed70e0..2143644bd748c1390f362fa7f4d8b24a08f83fe8 100644
+index cf3b10af046e7ac0607b1935369e963d969c0b82..6a6c3520fe11511ee3855944091deeb882240d0f 100644
 --- a/components/viz/host/renderer_settings_creation.cc
 +++ b/components/viz/host/renderer_settings_creation.cc
 @@ -12,6 +12,7 @@
@@ -65,10 +65,10 @@ index 3b99fdc36afc5c5bb97bc8570da39b8edfed70e0..2143644bd748c1390f362fa7f4d8b24a
        !command_line->HasSwitch(switches::kUIDisablePartialSwap);
  #if defined(OS_MACOSX)
 diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
-index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c21714194afea647 100644
+index e2c5be9ed5bad3649770c1f0049e01de6494b4eb..303c41757bcc80d3fb21feae6a5a71a4366de0c7 100644
 --- a/components/viz/service/display/gl_renderer.cc
 +++ b/components/viz/service/display/gl_renderer.cc
-@@ -80,6 +80,9 @@
+@@ -81,6 +81,9 @@
  
  using gpu::gles2::GLES2Interface;
  
@@ -78,7 +78,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  namespace viz {
  namespace {
  
-@@ -555,8 +558,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
+@@ -557,8 +560,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
  void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
    SetBlendEnabled(quad->ShouldDrawWithBlending());
  
@@ -90,17 +90,17 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  
    // Use the full quad_rect for debug quads to not move the edges based on
    // partial swaps.
-@@ -1371,7 +1375,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
-           params->use_aa ? USE_AA : NO_AA, mask_mode, mask_for_background,
+@@ -1406,7 +1410,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
            params->use_color_matrix, tint_gl_composited_content_,
-           ShouldApplyRoundedCorner(params->quad)),
+           params->apply_shader_based_rounded_corner &&
+               ShouldApplyRoundedCorner(params->quad)),
 -      params->contents_and_bypass_color_space, target_color_space);
-+      PATCH_CS(params->contents_and_bypass_color_space),
-+      PATCH_CS(target_color_space));
++          PATCH_CS(params->contents_and_bypass_color_space),
++          PATCH_CS(target_color_space));
  }
  
  void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
-@@ -1842,8 +1847,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
+@@ -1877,8 +1882,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
    SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
                                         tint_gl_composited_content_,
                                         ShouldApplyRoundedCorner(quad)),
@@ -111,7 +111,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
    SetShaderColor(color, opacity);
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -1998,8 +2003,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
+@@ -2033,8 +2038,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
                                                : NON_PREMULTIPLIED_ALPHA,
                         false, false, tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -122,7 +122,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2095,8 +2100,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
+@@ -2130,8 +2135,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
                         !quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
                         tint_gl_composited_content_,
                         ShouldApplyRoundedCorner(quad)),
@@ -133,7 +133,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  
    if (current_program_->tint_color_matrix_location() != -1) {
      auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
-@@ -2199,7 +2204,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
+@@ -2234,7 +2239,7 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
    DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
  
    gfx::ColorSpace dst_color_space =
@@ -142,7 +142,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
    // Force sRGB output on Windows for overlay candidate video quads to match
    // DirectComposition behavior in case these switch between overlays and
    // compositing. See https://crbug.com/811118 for details.
-@@ -2355,8 +2360,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
+@@ -2390,8 +2395,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
  
    SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
                                          ShouldApplyRoundedCorner(quad)),
@@ -153,7 +153,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  
    DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
    gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
-@@ -2413,8 +2418,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
+@@ -2448,8 +2453,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
        draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
  
    // Bind the program to the GL state.
@@ -164,7 +164,7 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
  
    if (current_program_->rounded_corner_rect_location() != -1) {
      SetShaderRoundedCorner(
-@@ -3107,7 +3112,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
+@@ -3142,7 +3147,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
  void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
                                 const gfx::ColorSpace& src_color_space,
                                 const gfx::ColorSpace& dst_color_space) {
@@ -173,9 +173,9 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
 +    DCHECK(dst_color_space.IsValid());
 +  }
  
-   ProgramKey program_key = program_key_no_color;
-   const gfx::ColorTransform* color_transform =
-@@ -3463,7 +3470,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
+   gfx::ColorSpace adjusted_color_space = src_color_space;
+   float sdr_white_level = current_frame()->sdr_white_level;
+@@ -3511,7 +3518,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
  
    *overlay_texture = FindOrCreateOverlayTexture(
        params.quad->render_pass_id, iosurface_width, iosurface_height,
@@ -184,29 +184,28 @@ index c48e95b2a6f5d0f35cc85bf25fb8bef3644ef36f..2ba05e863b682ee2f2ffb707c2171419
    *new_bounds = gfx::RectF(updated_dst_rect.origin(),
                             gfx::SizeF((*overlay_texture)->texture.size()));
  
-@@ -3670,8 +3677,9 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
+@@ -3729,8 +3736,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
  
    PrepareGeometry(SHARED_BINDING);
  
 -  SetUseProgram(ProgramKey::DebugBorder(), gfx::ColorSpace::CreateSRGB(),
 -                current_frame()->root_render_pass->color_space);
-+  SetUseProgram(ProgramKey::DebugBorder(),
-+                PATCH_CS(gfx::ColorSpace::CreateSRGB()),
++  SetUseProgram(ProgramKey::DebugBorder(), PATCH_CS(gfx::ColorSpace::CreateSRGB()),
 +                PATCH_CS(current_frame()->root_render_pass->color_space));
  
    gfx::Transform render_matrix;
    render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
-@@ -3831,3 +3839,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
+@@ -3890,3 +3897,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
  }
  
  }  // namespace viz
 +
 +#undef PATCH_CS
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index 4165ba000223c6d13e112a6a9861f015bb9ebbbb..70a9d11bdd1f836215724af18df18876d860ba05 100644
+index a22390afced20c3a898aa5e84c403f90b1eb0fe2..d15b9978f6e9a2e0b51d1cf4c57a7fc5472b2b0c 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
-@@ -191,6 +191,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
+@@ -192,6 +192,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
  
  // Command-line switches to propagate to the GPU process.
  static const char* const kSwitchNames[] = {
@@ -215,10 +214,10 @@ index 4165ba000223c6d13e112a6a9861f015bb9ebbbb..70a9d11bdd1f836215724af18df18876
      service_manager::switches::kGpuSandboxAllowSysVShm,
      service_manager::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 44ebbd3cafad0cdb26affe92c56377ca5b668094..3c53ff3ae2cb2cf7890d929c49fb64cb8ab3523f 100644
+index 9d2dde7a83502e660498f466ad9c042990ece783..e3627db9d67228a3880a36399e21c4952c8d0e2f 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -218,6 +218,7 @@
+@@ -219,6 +219,7 @@
  #include "ui/base/ui_base_switches.h"
  #include "ui/base/ui_base_switches_util.h"
  #include "ui/display/display_switches.h"
@@ -226,7 +225,7 @@ index 44ebbd3cafad0cdb26affe92c56377ca5b668094..3c53ff3ae2cb2cf7890d929c49fb64cb
  #include "ui/gl/gl_switches.h"
  #include "ui/native_theme/native_theme_features.h"
  #include "url/url_constants.h"
-@@ -2926,6 +2927,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
+@@ -2932,6 +2933,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
    // Propagate the following switches to the renderer command line (along
    // with any associated values) if present in the browser command line.
    static const char* const kSwitchNames[] = {
@@ -235,10 +234,10 @@ index 44ebbd3cafad0cdb26affe92c56377ca5b668094..3c53ff3ae2cb2cf7890d929c49fb64cb
      network::switches::kExplicitlyAllowedPorts,
      service_manager::switches::kDisableInProcessStackTraces,
 diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
-index 5af098309d377a78822d8ecd6e637553b965d968..fb81bb77bbc722623fd79fe34bab99fe462893c7 100644
+index 734c561001cc625c60851590d69bc7485928538a..1f56e138ae967e8f7c39a4629f6cb7dc590cf42c 100644
 --- a/content/renderer/render_widget.cc
 +++ b/content/renderer/render_widget.cc
-@@ -2837,6 +2837,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
+@@ -2854,6 +2854,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  
@@ -249,7 +248,7 @@ index 5af098309d377a78822d8ecd6e637553b965d968..fb81bb77bbc722623fd79fe34bab99fe
    // is what the renderer uses if its not threaded.
    settings.enable_checker_imaging =
 diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
-index 5bcfb34a98957315d0b9bb42a4d18e73f0b9a84a..66802e6806f35fc3761a2e6adf3c72e0fa6c06fc 100644
+index 3d936357343e9829768891a45b6459d6a1bbb4f1..55062c91722b900bbbc775c0c88cfc6e57ddc04b 100644
 --- a/ui/gfx/mac/io_surface.cc
 +++ b/ui/gfx/mac/io_surface.cc
 @@ -16,6 +16,7 @@

+ 4 - 4
patches/chromium/disable_hidden.patch

@@ -5,10 +5,10 @@ Subject: disable_hidden.patch
 
 
 diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
-index b29833193ac1da474ead4b25b99c603d605a3677..d74ed90f6e3ebf03027d00c480594546d07dd87e 100644
+index 8278ff4f07e5a18941521c92c819d099636b96b4..8606461c0422460e5d2d6adab0fea4ad8060ece5 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -673,6 +673,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -670,6 +670,9 @@ void RenderWidgetHostImpl::WasHidden() {
    if (is_hidden_)
      return;
  
@@ -19,10 +19,10 @@ index b29833193ac1da474ead4b25b99c603d605a3677..d74ed90f6e3ebf03027d00c480594546
  
    TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
 diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
-index ec657e64ca317647fd0c36983be1477142bdc64e..65a1ac7caa5abbbd32cc0840e5bddaaef2c706bb 100644
+index 350770092301beffa86a658a5c42276b238d0800..9296c0ad7f83cd4a5dce041de2fb97a537e44858 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
-@@ -155,6 +155,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
+@@ -156,6 +156,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
    // RenderWidgetHostImpl.
    static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
  

+ 1 - 1
patches/chromium/disable_network_services_by_default.patch

@@ -12,7 +12,7 @@ We should remove this patch after all Electron's code has been migrated to the
 NetworkService.
 
 diff --git a/services/network/public/cpp/features.cc b/services/network/public/cpp/features.cc
-index c4c3a32a9aa6ff379f7c8666de17f9dc057c1d77..bb956ddd8338ccdd83aa678b29f10d1dcbf7706a 100644
+index d10016967b1ac607166e593fbddf39a8fc533fe0..2f8d69091a3eeb46e52d48c015d76df9fe41e350 100644
 --- a/services/network/public/cpp/features.cc
 +++ b/services/network/public/cpp/features.cc
 @@ -23,7 +23,7 @@ const base::Feature kNetworkService {

+ 2 - 2
patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch

@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
 See https://github.com/electron/electron/issues/10754
 
 diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
-index d1234581f0379b5e4c1182ee893056d44bb6bd42..54984dd1b4bdd638fbf31226c16f0a2ead631b33 100644
+index a1cecb00374bdc06d8256d5e4e0ad0223d3f1a95..d8a970430878209b19fafa4cf6f4775de5480a5e 100644
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -3992,7 +3992,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
+@@ -4025,7 +4025,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
          "frame that never had a user gesture since its load. "
          "https://www.chromestatus.com/feature/5082396709879808";
      Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

+ 1 - 1
patches/chromium/dom_storage_limits.patch

@@ -61,7 +61,7 @@ index e87afe5b8ee07f7038a7cc9c40832b6cd27884da..61c9a0dfff60f79c7b36ff5c7d741c06
  
  // In the browser process we allow some overage to
 diff --git a/third_party/blink/renderer/modules/storage/cached_storage_area.cc b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
-index 980bb8d7bb5e8a440337f34076dc0d8005a72847..2df47b80f6b7de4ae314e85d36d63c2cc4ddf73c 100644
+index 4b976b74490234cd9ad5ac7a0a63708b6edbbae3..183ed46369dc0f0026c53521d19209011d2d0eea 100644
 --- a/third_party/blink/renderer/modules/storage/cached_storage_area.cc
 +++ b/third_party/blink/renderer/modules/storage/cached_storage_area.cc
 @@ -107,11 +107,13 @@ bool CachedStorageArea::SetItem(const String& key,

+ 2 - 2
patches/chromium/exclude-a-few-test-files-from-build.patch

@@ -7,10 +7,10 @@ Compilation of those files fails with the Chromium 68.
 Remove the patch during the Chromium 69 upgrade.
 
 diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
-index 1f179eceda6b35dc79dab526f21aa40ca40b3b63..2db5346d51cc1f9ae6736cd4511940433191f6f9 100644
+index a764b5e1a0e7b3f3c306ba99ffd407ecf1e414d8..5a55f102d149e303a2f0a3a0a0f7fd361003f8d3 100644
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1711,7 +1711,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
+@@ -1707,7 +1707,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
      "graphics/paint/drawing_display_item_test.cc",
      "graphics/paint/drawing_recorder_test.cc",
      "graphics/paint/float_clip_rect_test.cc",

+ 20 - 12
patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch

@@ -98,7 +98,7 @@ index d9a9730a78b9aec833c64282ca868dbba5594d82..d98426e9f78931bd43061ec994559d59
   private:
    const HWND hwnd_;
 diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
-index f1754d4d13898805bdc3550b69a6d32e67ec284f..9559a9d027bc4d41c3014cba6cfe42253d78d022 100644
+index 16ef26aa48160cff3d71cbf0ef2074e19507445e..e368d21778b304d0283e2f18f4f5aa80aaa22175 100644
 --- a/components/viz/service/BUILD.gn
 +++ b/components/viz/service/BUILD.gn
 @@ -117,6 +117,8 @@ viz_component("service") {
@@ -111,18 +111,26 @@ index f1754d4d13898805bdc3550b69a6d32e67ec284f..9559a9d027bc4d41c3014cba6cfe4225
      "display_embedder/software_output_surface.h",
      "display_embedder/viz_process_context_provider.cc",
 diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
-index a7915a8517aae29ec07b525c008bd324eb2381ca..52f118f7989048535f2f0bfaa767cba3cf7e35f9 100644
+index 7f61cb7c847bae88b50f2c32bbe9be6525a4c587..f059762b2c39c927b6bc6e40ad1c0641913082f2 100644
 --- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
 +++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
-@@ -21,6 +21,7 @@
+@@ -20,6 +20,7 @@
+ #include "components/viz/service/display_embedder/server_shared_bitmap_manager.h"
  #include "components/viz/service/display_embedder/skia_output_surface_dependency_impl.h"
  #include "components/viz/service/display_embedder/skia_output_surface_impl.h"
- #include "components/viz/service/display_embedder/skia_output_surface_impl_non_ddl.h"
 +#include "components/viz/service/display_embedder/software_output_device_proxy.h"
  #include "components/viz/service/display_embedder/software_output_surface.h"
  #include "components/viz/service/display_embedder/viz_process_context_provider.h"
  #include "components/viz/service/gl/gpu_service_impl.h"
-@@ -229,6 +230,19 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
+@@ -32,6 +33,7 @@
+ #include "gpu/ipc/common/surface_handle.h"
+ #include "gpu/ipc/service/gpu_channel_manager_delegate.h"
+ #include "gpu/ipc/service/image_transport_surface.h"
++#include "services/viz/privileged/interfaces/compositing/layered_window_updater.mojom.h"
+ #include "ui/base/ui_base_switches.h"
+ #include "ui/gl/gl_context.h"
+ #include "ui/gl/init/gl_factory.h"
+@@ -219,6 +221,19 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
    if (headless_)
      return std::make_unique<SoftwareOutputDevice>();
  
@@ -469,10 +477,10 @@ index 73ea1986b2140a3ffb87c5e23c7ab2174bac0a10..3ba3657ba12ec47cc3db3fec218496ff
      return std::make_unique<SoftwareOutputDeviceWinDirect>(hwnd, backing);
    }
 diff --git a/services/viz/privileged/interfaces/compositing/display_private.mojom b/services/viz/privileged/interfaces/compositing/display_private.mojom
-index cd8dd80230d199eb05c70710aa681c491ead1646..7b61f33156a4e182ee6ddffc267be798af335989 100644
+index 8898b9162a65e043e8b95237b8874e48ea71744e..a455df870ece25fc6e5e46688a1c6b5b396b841a 100644
 --- a/services/viz/privileged/interfaces/compositing/display_private.mojom
 +++ b/services/viz/privileged/interfaces/compositing/display_private.mojom
-@@ -77,12 +77,14 @@ interface DisplayPrivate {
+@@ -79,12 +79,14 @@ interface DisplayPrivate {
  };
  
  interface DisplayClient {
@@ -500,7 +508,7 @@ index 58a7e221eaabd9e21196496d220c77babe07c56d..dd141b16eace2999380ed137b4adf1f3
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index 04e153e9d96c900385e1430561599b6e8496b62d..108453e11a7f296c03c73cdc54746181150641b1 100644
+index 5158731bd8512fcd2ee859b1e5eeff3a9a32ca9a..4d3592e939c45eec86cd4c7e328de247e9374419 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
 @@ -23,6 +23,7 @@
@@ -511,7 +519,7 @@ index 04e153e9d96c900385e1430561599b6e8496b62d..108453e11a7f296c03c73cdc54746181
  #include "components/viz/host/host_frame_sink_client.h"
  #include "services/viz/privileged/interfaces/compositing/vsync_parameter_observer.mojom-forward.h"
  #include "third_party/skia/include/core/SkColor.h"
-@@ -199,6 +200,15 @@ class COMPOSITOR_EXPORT ContextFactory {
+@@ -194,6 +195,15 @@ class COMPOSITOR_EXPORT ContextFactory {
    virtual bool SyncTokensRequiredForDisplayCompositor() = 0;
  };
  
@@ -527,7 +535,7 @@ index 04e153e9d96c900385e1430561599b6e8496b62d..108453e11a7f296c03c73cdc54746181
  // Compositor object to take care of GPU painting.
  // A Browser compositor object is responsible for generating the final
  // displayable form of pixels comprising a single widget's contents. It draws an
-@@ -238,6 +248,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -233,6 +243,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
    // Schedules a redraw of the layer tree associated with this compositor.
    void ScheduleDraw();
  
@@ -537,7 +545,7 @@ index 04e153e9d96c900385e1430561599b6e8496b62d..108453e11a7f296c03c73cdc54746181
    // 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
-@@ -453,6 +466,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -448,6 +461,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
    ui::ContextFactory* context_factory_;
    ui::ContextFactoryPrivate* context_factory_private_;
  
@@ -547,7 +555,7 @@ index 04e153e9d96c900385e1430561599b6e8496b62d..108453e11a7f296c03c73cdc54746181
    Layer* root_layer_ = nullptr;
  
 diff --git a/ui/compositor/host/host_context_factory_private.cc b/ui/compositor/host/host_context_factory_private.cc
-index 0ff1e05244e0e64bc2456dc3d53dd2378dce1a3c..7ca7f5e0cb73c8f6560ff9730d3880a07befe663 100644
+index 1c84de621781d0d7cf41866fc033b78881c5e972..112a1a6c2a0f24ee9ace05d7c38247b22fb4ed4c 100644
 --- a/ui/compositor/host/host_context_factory_private.cc
 +++ b/ui/compositor/host/host_context_factory_private.cc
 @@ -99,8 +99,12 @@ void HostContextFactoryPrivate::ConfigureCompositor(

+ 2 - 2
patches/chromium/fix_disable_usage_of_setapplicationisdaemon_and.patch

@@ -5,10 +5,10 @@ Subject: fix: disable usage of SetApplicationIsDaemon and
  _LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
 
 diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
-index 35b8382b0215dfc17c67d7215a1a096ffa3cd503..62ac2aa93f4778e029232334729d084ee3c2f6b1 100644
+index e4c8405fb17e37fd843eb9a962e0c5360524a693..1d5ee0a13a837efd0befe2ec02b38fbf4dcbc572 100644
 --- a/content/utility/utility_service_factory.cc
 +++ b/content/utility/utility_service_factory.cc
-@@ -207,7 +207,7 @@ void UtilityServiceFactory::RunService(
+@@ -198,7 +198,7 @@ void UtilityServiceFactory::RunService(
  std::unique_ptr<service_manager::Service>
  UtilityServiceFactory::CreateAudioService(
      mojo::PendingReceiver<service_manager::mojom::Service> receiver) {

+ 10 - 10
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 0d40acea7c2c69003c54cf3ae1e1d15adcb6deee..ba28c8f315b4b89a08659b45eaff485dcb65fc39 100644
+index 0726c4fbc873e40991262b2951557b7be169e624..7520514de6f56d84afee6c612584f0be1ec41227 100644
 --- a/content/browser/browsing_instance.cc
 +++ b/content/browser/browsing_instance.cc
 @@ -83,6 +83,13 @@ scoped_refptr<SiteInstanceImpl> BrowsingInstance::GetSiteInstanceForURL(
@@ -42,10 +42,10 @@ index acbf074f6e408cdc3817580b9601ee40c036c4dd..e56456c5b6024b92dbd025a8f25d4bde
    // another SiteInstance for the same site.
    void RegisterSiteInstance(SiteInstanceImpl* site_instance);
 diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
-index 6ed970857351aed119dc95a8d0f3828c4278a2c9..0111785bcafd0ba83781edac2fc8b74b5f960e0e 100644
+index 8ca7df4cc21892d9769527df717ab5fd3945e9c7..dbaf878eaf5259697469e06d5ae15fbc463aa7c6 100644
 --- a/content/browser/frame_host/render_frame_host_manager.cc
 +++ b/content/browser/frame_host/render_frame_host_manager.cc
-@@ -2176,6 +2176,21 @@ bool RenderFrameHostManager::InitRenderView(
+@@ -2180,6 +2180,21 @@ bool RenderFrameHostManager::InitRenderView(
  scoped_refptr<SiteInstance>
  RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
      const NavigationRequest& request) {
@@ -67,7 +67,7 @@ index 6ed970857351aed119dc95a8d0f3828c4278a2c9..0111785bcafd0ba83781edac2fc8b74b
    SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
  
    // All children of MHTML documents must be MHTML documents. They all live in
-@@ -2213,6 +2228,53 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2217,6 +2232,53 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
                                                request.common_params().url);
      no_renderer_swap_allowed |=
          request.from_begin_navigation() && !can_renderer_initiate_transfer;
@@ -121,7 +121,7 @@ index 6ed970857351aed119dc95a8d0f3828c4278a2c9..0111785bcafd0ba83781edac2fc8b74b
    } else {
      // Subframe navigations will use the current renderer, unless specifically
      // allowed to swap processes.
-@@ -2224,23 +2286,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2228,23 +2290,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
    if (no_renderer_swap_allowed && !should_swap_for_error_isolation)
      return scoped_refptr<SiteInstance>(current_site_instance);
  
@@ -153,7 +153,7 @@ index 6ed970857351aed119dc95a8d0f3828c4278a2c9..0111785bcafd0ba83781edac2fc8b74b
  }
  
 diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
-index c6bc3bf3ea5fd936c8d14f07efbf2453da881342..08d0fa5c6dfe3ff46f206f7983d47e9c445c63da 100644
+index b29e2479caed43a3ace1f0e5ce923fd6c7fb760e..4999c89b3a8e54ab6030b85fbf172af3fedd0836 100644
 --- a/content/browser/site_instance_impl.cc
 +++ b/content/browser/site_instance_impl.cc
 @@ -356,6 +356,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
@@ -168,7 +168,7 @@ index c6bc3bf3ea5fd936c8d14f07efbf2453da881342..08d0fa5c6dfe3ff46f206f7983d47e9c
      const GURL& url) {
    return browsing_instance_->GetSiteInstanceForURL(
 diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
-index 5f57cd47108b85c0e884c1855af2c74b7fd02b9b..6b755ec0f9f76fa91bec975fdcf7094b4d43cea6 100644
+index 17b08b2749a93a3f4e8c0409fc292c76331bfbb3..bec401c170b68f416cefde4ad309b9c3aa255243 100644
 --- a/content/browser/site_instance_impl.h
 +++ b/content/browser/site_instance_impl.h
 @@ -83,6 +83,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -180,7 +180,7 @@ index 5f57cd47108b85c0e884c1855af2c74b7fd02b9b..6b755ec0f9f76fa91bec975fdcf7094b
    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 b7a903ae979f56e79603af1a6edf395d67e0e982..090eaa070e56d84255f570af3d9f0ea56d02cb69 100644
+index 06984e1da1512c3d8577716432920a1755524cf8..87140030f883a0149e5c373f2c6391020974dcfc 100644
 --- a/content/public/browser/content_browser_client.cc
 +++ b/content/public/browser/content_browser_client.cc
 @@ -52,6 +52,20 @@ void OverrideOnBindInterface(const service_manager::BindSourceInfo& remote_info,
@@ -205,10 +205,10 @@ index b7a903ae979f56e79603af1a6edf395d67e0e982..090eaa070e56d84255f570af3d9f0ea5
      const MainFunctionParams& parameters) {
    return nullptr;
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 86755824ccbaef2d5eeea63166d2243228bd5a4a..e67ab701d608f87cfaf259d44b17605467181fea 100644
+index 52cf099889768bbc14acc3f32fcfba5ab7640a1d..b62c08de3ee8efc3090876531a80ea43e4ac6a07 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
-@@ -211,8 +211,41 @@ CONTENT_EXPORT void OverrideOnBindInterface(
+@@ -209,8 +209,41 @@ CONTENT_EXPORT void OverrideOnBindInterface(
  // the observer interfaces.)
  class CONTENT_EXPORT ContentBrowserClient {
   public:

+ 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 b/tools/gritsettings/resource_ids
-index 0182eedbeefe97c65299d6bb3c705d2fb59d1e44..540457a76abdb9f1dc703e30b7cde138f27b0ea3 100644
+index 3f80aad45ed09d6e625f5875e290e9365401945b..96fb380f5064957f4fdfbad7474865d8af95c2b3 100644
 --- a/tools/gritsettings/resource_ids
 +++ b/tools/gritsettings/resource_ids
-@@ -449,6 +449,11 @@
+@@ -459,6 +459,11 @@
      "includes": [28880],
    },
  

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

@@ -7,7 +7,7 @@ Removes usage of the _LSSetApplicationLaunchServicesServerConnectionStatus
 private API.
 
 diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
-index 5433738c34d60f07d17567a24448f9147bf18adc..877495568fddbc7dae5835ead41faf37be77208a 100644
+index de80e1023c948a347440eeb960079f498e43fb87..69cb584e3b99a6989dbb2906bfa5bdf1c5cd3df5 100644
 --- a/content/gpu/gpu_main.cc
 +++ b/content/gpu/gpu_main.cc
 @@ -285,8 +285,10 @@ int GpuMain(const MainFunctionParams& parameters) {

+ 24 - 24
patches/chromium/mas_no_private_api.patch

@@ -38,7 +38,7 @@ index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a7e81072194c00baa0aa3159a6bfe374
  // is concerned.
  @property(nonatomic, readonly) NSString* subrole;
 diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
-index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d73ecd9122 100644
+index 6e97b6750cad46a8a8096c199c3a2f5386e0ae3b..3cfbb34bf6426d575c7affb9f4f9503948665d8d 100644
 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm
 +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
 @@ -141,6 +141,7 @@
@@ -49,7 +49,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  extern "C" {
  
  // The following are private accessibility APIs required for cursor navigation
-@@ -321,6 +322,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
+@@ -342,6 +343,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
    AddMisspelledTextAttributes(ax_range, attributed_text);
    return attributed_text;
  }
@@ -57,7 +57,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  
  // Returns an autoreleased copy of the AXNodeData's attribute.
  NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
-@@ -588,7 +590,9 @@ + (void)initialize {
+@@ -609,7 +611,9 @@ + (void)initialize {
        {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
        {NSAccessibilityElementBusyAttribute, @"elementBusy"},
        {NSAccessibilityEnabledAttribute, @"enabled"},
@@ -67,7 +67,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
        {NSAccessibilityExpandedAttribute, @"expanded"},
        {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
        {NSAccessibilityFocusedAttribute, @"focused"},
-@@ -623,13 +627,17 @@ + (void)initialize {
+@@ -644,13 +648,17 @@ + (void)initialize {
        {NSAccessibilityRowsAttribute, @"rows"},
        // TODO(aboxhall): expose
        // NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -85,7 +85,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
        {NSAccessibilitySizeAttribute, @"size"},
        {NSAccessibilitySortDirectionAttribute, @"sortDirection"},
        {NSAccessibilitySubroleAttribute, @"subrole"},
-@@ -1127,6 +1135,7 @@ - (NSNumber*)enabled {
+@@ -1148,6 +1156,7 @@ - (NSNumber*)enabled {
                                    ax::mojom::Restriction::kDisabled];
  }
  
@@ -93,7 +93,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  // Returns a text marker that points to the last character in the document that
  // can be selected with VoiceOver.
  - (id)endTextMarker {
-@@ -1137,6 +1146,7 @@ - (id)endTextMarker {
+@@ -1158,6 +1167,7 @@ - (id)endTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
  }
@@ -101,7 +101,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  
  - (NSNumber*)expanded {
    if (![self instanceActive])
-@@ -2009,6 +2019,7 @@ - (NSValue*)selectedTextRange {
+@@ -2029,6 +2039,7 @@ - (NSValue*)selectedTextRange {
    return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
  }
  
@@ -109,15 +109,15 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  - (id)selectedTextMarkerRange {
    if (![self instanceActive])
      return nil;
-@@ -2041,6 +2052,7 @@ - (id)selectedTextMarkerRange {
-                                                anchorAffinity, *focusObject,
-                                                focusOffset, focusAffinity));
+@@ -2064,6 +2075,7 @@ - (id)selectedTextMarkerRange {
+       CreateAXPlatformRange(*anchorObject, anchorOffset, anchorAffinity,
+                             *focusObject, focusOffset, focusAffinity));
  }
 +#endif
  
  - (NSValue*)size {
    if (![self instanceActive])
-@@ -2073,6 +2085,7 @@ - (NSString*)sortDirection {
+@@ -2096,6 +2108,7 @@ - (NSString*)sortDirection {
    return nil;
  }
  
@@ -125,7 +125,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  // Returns a text marker that points to the first character in the document that
  // can be selected with VoiceOver.
  - (id)startTextMarker {
-@@ -2083,6 +2096,7 @@ - (id)startTextMarker {
+@@ -2106,6 +2119,7 @@ - (id)startTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
  }
@@ -133,7 +133,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  
  // Returns a subrole based upon the role.
  - (NSString*)subrole {
-@@ -2386,11 +2400,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
+@@ -2409,11 +2423,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
    NSMutableAttributedString* attributedValue =
        [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
  
@@ -147,7 +147,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  
    return [attributedValue attributedSubstringFromRange:range];
  }
-@@ -2473,6 +2489,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2496,6 +2512,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
        return ToBrowserAccessibilityCocoa(cell);
    }
  
@@ -155,7 +155,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
    if ([attribute isEqualToString:@"AXUIElementForTextMarker"]) {
      BrowserAccessibilityPositionInstance position =
          CreatePositionFromTextMarker(parameter);
-@@ -2650,6 +2667,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2673,6 +2690,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
      NSString* text = GetTextForTextMarkerRange(parameter);
      return [NSNumber numberWithInt:[text length]];
    }
@@ -163,7 +163,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
  
    if ([attribute isEqualToString:
                       NSAccessibilityBoundsForRangeParameterizedAttribute]) {
-@@ -2683,6 +2701,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2706,6 +2724,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
      return nil;
    }
  
@@ -171,7 +171,7 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
    if ([attribute
            isEqualToString:
                NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
-@@ -2763,6 +2782,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
+@@ -2786,6 +2805,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
  
      return @(child->GetIndexInParent());
    }
@@ -180,10 +180,10 @@ index eee18607118ba4be6d5be9d343d7af8d0f5b270b..21c417f461f13387d5fdace51600f3d7
    return nil;
  }
 diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-index ff366b2691c6d72e196b20f224ef0c77f932c301..80de4d4127c723655c0ed62700fdf6e22019815f 100644
+index cd447453b5a8877a9b1da7eab28130a795e3015b..9ef9a7aa5733b8591ed96511e9cdbc8f51875d04 100644
 --- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
 +++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
-@@ -492,6 +492,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -493,6 +493,7 @@ void PostAnnouncementNotification(NSString* announcement) {
        [user_info setObject:native_focus_object
                      forKey:NSAccessibilityTextChangeElement];
  
@@ -191,7 +191,7 @@ index ff366b2691c6d72e196b20f224ef0c77f932c301..80de4d4127c723655c0ed62700fdf6e2
        id selected_text = [native_focus_object selectedTextMarkerRange];
        if (selected_text) {
          NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
-@@ -499,6 +500,7 @@ void PostAnnouncementNotification(NSString* announcement) {
+@@ -500,6 +501,7 @@ void PostAnnouncementNotification(NSString* announcement) {
          [user_info setObject:selected_text
                        forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
        }
@@ -276,7 +276,7 @@ index b6bea74d9f9c2fcfba381477895e4c15741318fc..4a02e5659e85c507d480d7fb9b63ee10
  
  void BluetoothAdapterMac::RemovePairingDelegateInternal(
 diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
-index cb7a5305c2d6cbe7b3aa13efdfe6dcc6dfd857e9..e3f3ee7fee0a8f9cf7b3c1b6bed7c2a6cf443954 100644
+index d8ae83ce63aafdd0fcd1994a144465791e94ba4a..d19096f9afd606bb7bfd6c377f8a976417d3bff2 100644
 --- a/media/audio/BUILD.gn
 +++ b/media/audio/BUILD.gn
 @@ -180,6 +180,12 @@ source_set("audio") {
@@ -306,10 +306,10 @@ index 7ec6dab821b542cb0096e7f8875ba21703463087..3e26c9dd0a296b8d9c99ca1ee9d9faba
  }
  
 diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
-index 21852feee1ae251f7c0693d26ca4e23ebaa2739c..acaf99c718895bae548b2e4960aa96cfc8dc3494 100644
+index c1b8d1aeb6340821d66ddd8bc9416a86e7a35384..0250e16cbe24d184c04331473be192f93ee05e8b 100644
 --- a/net/dns/dns_config_service_posix.cc
 +++ b/net/dns/dns_config_service_posix.cc
-@@ -245,6 +245,7 @@ class DnsConfigServicePosix::Watcher {
+@@ -244,6 +244,7 @@ class DnsConfigServicePosix::Watcher {
  
    bool Watch() {
      bool success = true;
@@ -317,7 +317,7 @@ index 21852feee1ae251f7c0693d26ca4e23ebaa2739c..acaf99c718895bae548b2e4960aa96cf
      if (!config_watcher_.Watch(base::Bind(&Watcher::OnConfigChanged,
                                            base::Unretained(this)))) {
        LOG(ERROR) << "DNS config watch failed to start.";
-@@ -266,6 +267,7 @@ class DnsConfigServicePosix::Watcher {
+@@ -265,6 +266,7 @@ class DnsConfigServicePosix::Watcher {
                                  DNS_CONFIG_WATCH_MAX);
      }
  #endif  // !defined(OS_ANDROID) && !defined(OS_IOS)

+ 9 - 9
patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

@@ -5,7 +5,7 @@ Subject: network service: allow remote certificate verification logic
 
 
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index d61991d8157d55016457798c631c1ea3f805450a..a425c663a7e82aa079cf6c6b7c54c27688b5805d 100644
+index 0e3fb93f6cdc3d39ac1b9161e45eeee347f6f42d..41776e89086491d12d7062c80ddcf81e9454f29e 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
 @@ -91,6 +91,11 @@
@@ -20,7 +20,7 @@ index d61991d8157d55016457798c631c1ea3f805450a..a425c663a7e82aa079cf6c6b7c54c276
  #if BUILDFLAG(IS_CT_SUPPORTED)
  #include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
  #include "components/certificate_transparency/chrome_require_ct_delegate.h"
-@@ -316,6 +321,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
+@@ -319,6 +324,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
  
  }  // namespace
  
@@ -109,7 +109,7 @@ index d61991d8157d55016457798c631c1ea3f805450a..a425c663a7e82aa079cf6c6b7c54c276
  void NetworkContext::CreateURLLoaderFactory(
      mojom::URLLoaderFactoryRequest request,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -2144,12 +2224,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -2150,12 +2230,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
                    cert_net_fetcher_, /*system_trust_store_provider=*/nullptr)));
      }
  #endif
@@ -134,10 +134,10 @@ index d61991d8157d55016457798c631c1ea3f805450a..a425c663a7e82aa079cf6c6b7c54c276
    std::unique_ptr<net::NetworkDelegate> network_delegate =
        std::make_unique<NetworkServiceNetworkDelegate>(this);
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index 8b45ddce818911d3e65ab2fdb2d86ea4d510d9f6..5bdf8ae6c0c5f2df2fd62b1dfd50fa2b9eb1505d 100644
+index c0b660103389e532ca672ea40ecafa4de6111f82..36ccccbb32549c60ffcebac612a222fccf1c3115 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
-@@ -74,6 +74,7 @@ class DomainReliabilityMonitor;
+@@ -80,6 +80,7 @@ class DomainReliabilityMonitor;
  
  namespace network {
  class CertVerifierWithTrustAnchors;
@@ -145,7 +145,7 @@ index 8b45ddce818911d3e65ab2fdb2d86ea4d510d9f6..5bdf8ae6c0c5f2df2fd62b1dfd50fa2b
  class CookieManager;
  class ExpectCTReporter;
  class HostResolver;
-@@ -176,6 +177,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -182,6 +183,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
  
    // mojom::NetworkContext implementation:
    void SetClient(mojom::NetworkContextClientPtr client) override;
@@ -153,7 +153,7 @@ index 8b45ddce818911d3e65ab2fdb2d86ea4d510d9f6..5bdf8ae6c0c5f2df2fd62b1dfd50fa2b
    void CreateURLLoaderFactory(mojom::URLLoaderFactoryRequest request,
                                mojom::URLLoaderFactoryParamsPtr params) override;
    void ResetURLLoaderFactories() override;
-@@ -561,6 +563,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -575,6 +577,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
  #endif
  
@@ -163,7 +163,7 @@ index 8b45ddce818911d3e65ab2fdb2d86ea4d510d9f6..5bdf8ae6c0c5f2df2fd62b1dfd50fa2b
    // CertNetFetcher is not used by the current platform.
    scoped_refptr<net::CertNetFetcherImpl> cert_net_fetcher_;
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 52ed232f4fe1fbffeffcbc64bc49e460544862e8..5f4ec3d0f427ae7c2b0ee34fd005ef69ffd60cf5 100644
+index 75dc07c5e66c362d9e363ffc55644de84ab71411..6c021f1317df1cf3789af27adc08efe512004736 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
 @@ -161,6 +161,17 @@ interface TrustedURLLoaderHeaderClient {
@@ -184,7 +184,7 @@ index 52ed232f4fe1fbffeffcbc64bc49e460544862e8..5f4ec3d0f427ae7c2b0ee34fd005ef69
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -560,6 +571,9 @@ interface NetworkContext {
+@@ -576,6 +587,9 @@ interface NetworkContext {
    // Sets a client for this network context.
    SetClient(NetworkContextClient client);
  

+ 1 - 1
patches/chromium/no_cache_storage_check.patch

@@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have
 scripts running without an origin.
 
 diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
-index b085b463b104849ea98d0dc306ff6bae24710be5..265b8bf187f5adead105aed86d059ddeff27c4e7 100644
+index b30684d55ba81637536af9622de5fefeeaf4dbd6..060b99e56c113169a6113614d8adfda9a4f0070e 100644
 --- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
 +++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
 @@ -104,7 +104,7 @@ class LegacyCacheStorage::CacheLoader {

+ 26 - 28
patches/chromium/notification_provenance.patch

@@ -6,7 +6,7 @@ Subject: pass RenderProcessHost through to PlatformNotificationService
 this is so Electron can identify which renderer a notification came from
 
 diff --git a/content/browser/notifications/blink_notification_service_impl.cc b/content/browser/notifications/blink_notification_service_impl.cc
-index 63a1fe8ebd1a59973748cf12d7a914c91a8e27f1..d2f7d4bdf41c71874849ccaeca13f2b8f9cfa483 100644
+index ceb4bc6248a961bd907e35e9f758cebdbd0ae62b..c85acbb33b7b467716b717159816a00e67d46119 100644
 --- a/content/browser/notifications/blink_notification_service_impl.cc
 +++ b/content/browser/notifications/blink_notification_service_impl.cc
 @@ -88,9 +88,11 @@ BlinkNotificationServiceImpl::BlinkNotificationServiceImpl(
@@ -15,14 +15,14 @@ index 63a1fe8ebd1a59973748cf12d7a914c91a8e27f1..d2f7d4bdf41c71874849ccaeca13f2b8
      scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
 +    RenderProcessHost* render_process_host,
      const url::Origin& origin,
-     mojo::InterfaceRequest<blink::mojom::NotificationService> request)
+     mojo::PendingReceiver<blink::mojom::NotificationService> receiver)
      : notification_context_(notification_context),
 +      render_process_host_(render_process_host),
        browser_context_(browser_context),
        service_worker_context_(std::move(service_worker_context)),
        origin_(origin),
-@@ -150,8 +152,9 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
-       notification_id, std::move(event_listener_ptr));
+@@ -151,8 +153,9 @@ void BlinkNotificationServiceImpl::DisplayNonPersistentNotification(
+       notification_id, std::move(event_listener_remote));
  
    GetNotificationService(browser_context_)
 -      ->DisplayNotification(notification_id, origin_.GetURL(),
@@ -34,18 +34,18 @@ index 63a1fe8ebd1a59973748cf12d7a914c91a8e27f1..d2f7d4bdf41c71874849ccaeca13f2b8
  
  void BlinkNotificationServiceImpl::CloseNonPersistentNotification(
 diff --git a/content/browser/notifications/blink_notification_service_impl.h b/content/browser/notifications/blink_notification_service_impl.h
-index 3b7875f0df1f96f98a6088a8899d86d9d19d8a42..097607d267d55675ab91ad21f126acb827dcc50f 100644
+index 5253f6be778cc78571b3df0a33d364a9b1e6ef52..dc5307e6500b0bfb5da83e8d8ff8886b91133522 100644
 --- a/content/browser/notifications/blink_notification_service_impl.h
 +++ b/content/browser/notifications/blink_notification_service_impl.h
-@@ -36,6 +36,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
+@@ -40,6 +40,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
        PlatformNotificationContextImpl* notification_context,
        BrowserContext* browser_context,
        scoped_refptr<ServiceWorkerContextWrapper> service_worker_context,
 +      RenderProcessHost* render_process_host,
        const url::Origin& origin,
-       mojo::InterfaceRequest<blink::mojom::NotificationService> request);
+       mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
    ~BlinkNotificationServiceImpl() override;
-@@ -94,6 +95,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
+@@ -99,6 +100,7 @@ class CONTENT_EXPORT BlinkNotificationServiceImpl
    // The notification context that owns this service instance.
    PlatformNotificationContextImpl* notification_context_;
  
@@ -54,20 +54,20 @@ index 3b7875f0df1f96f98a6088a8899d86d9d19d8a42..097607d267d55675ab91ad21f126acb8
  
    scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
 diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
-index cbac30fa7a12db927ba6a15173ba1181e03e0723..4d26fd795a7ce1ffd046c4a0f2ec17793bf33e6a 100644
+index f64eb733ede38501c34b2af89f42255189abd982..3c2dfad7ac9ba64b0b49ebef41a303edd1470cb1 100644
 --- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
 +++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
-@@ -135,7 +135,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
+@@ -138,7 +138,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
  
      notification_service_ = std::make_unique<BlinkNotificationServiceImpl>(
          notification_context_.get(), &browser_context_,
 -        embedded_worker_helper_->context_wrapper(),
 +        embedded_worker_helper_->context_wrapper(), nullptr,
          url::Origin::Create(GURL(kTestOrigin)),
-         mojo::MakeRequest(&notification_service_ptr_));
+         notification_service_remote_.BindNewPipeAndPassReceiver());
  
 diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
-index 6ae821791660dfbda93430a937ba75b596332091..a17515d29eb5ed643e684d33a8ecd92b28902c13 100644
+index 564d4fdb4d414bdb49d74dc8066dd3de86339dda..32d0ab7f8049dc13e83deac925ef9d10fc1554c1 100644
 --- a/content/browser/notifications/platform_notification_context_impl.cc
 +++ b/content/browser/notifications/platform_notification_context_impl.cc
 @@ -207,12 +207,13 @@ void PlatformNotificationContextImpl::Shutdown() {
@@ -76,18 +76,18 @@ index 6ae821791660dfbda93430a937ba75b596332091..a17515d29eb5ed643e684d33a8ecd92b
  void PlatformNotificationContextImpl::CreateService(
 +    RenderProcessHost* render_process_host,
      const url::Origin& origin,
-     blink::mojom::NotificationServiceRequest request) {
+     mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
    DCHECK_CURRENTLY_ON(BrowserThread::UI);
    services_.push_back(std::make_unique<BlinkNotificationServiceImpl>(
 -      this, browser_context_, service_worker_context_, origin,
--      std::move(request)));
+-      std::move(receiver)));
 +      this, browser_context_, service_worker_context_, render_process_host,
-+      origin, std::move(request)));
++      origin, std::move(receiver)));
  }
  
  void PlatformNotificationContextImpl::RemoveService(
 diff --git a/content/browser/notifications/platform_notification_context_impl.h b/content/browser/notifications/platform_notification_context_impl.h
-index f1710b69a91931021ba56db544fce551fad52f46..b116b89114a431f8e67a68e7f7cc1c65d33985c7 100644
+index 83d7c93482bf68ca98ee58de537711dad5844699..edd488efa643e80659cceab476cf53e12f10a1fb 100644
 --- a/content/browser/notifications/platform_notification_context_impl.h
 +++ b/content/browser/notifications/platform_notification_context_impl.h
 @@ -24,6 +24,7 @@
@@ -95,25 +95,23 @@ index f1710b69a91931021ba56db544fce551fad52f46..b116b89114a431f8e67a68e7f7cc1c65
  #include "content/public/browser/browser_thread.h"
  #include "content/public/browser/platform_notification_context.h"
 +#include "content/public/browser/render_process_host.h"
+ #include "mojo/public/cpp/bindings/pending_receiver.h"
  #include "third_party/blink/public/mojom/notifications/notification_service.mojom.h"
  
- class GURL;
-@@ -65,7 +66,8 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
-   void Shutdown();
+@@ -67,6 +68,7 @@ class CONTENT_EXPORT PlatformNotificationContextImpl
  
    // Creates a BlinkNotificationServiceImpl that is owned by this context.
--  void CreateService(const url::Origin& origin,
-+  void CreateService(RenderProcessHost* render_process_host,
-+                     const url::Origin& origin,
-                      blink::mojom::NotificationServiceRequest request);
+   void CreateService(
++      RenderProcessHost* render_process_host,
+       const url::Origin& origin,
+       mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
  
-   // Removes |service| from the list of owned services, for example because the
 diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
-index 442280a24beccf6c20c6d40af9c9258ccfa93b43..347c4e4c6ccba2e16ef12b95ce93ee6336fb1a70 100644
+index cfdfae7e861ca6d5025f9478363e063afae326ef..b5dacb158e01091228aa97bb85db1efb24ceb6f7 100644
 --- a/content/browser/renderer_interface_binders.cc
 +++ b/content/browser/renderer_interface_binders.cc
-@@ -200,7 +200,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
-                     RenderProcessHost* host, const url::Origin& origin) {
+@@ -196,7 +196,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
+          RenderProcessHost* host, const url::Origin& origin) {
          static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
              ->GetPlatformNotificationContext()
 -            ->CreateService(origin, std::move(request));
@@ -143,7 +141,7 @@ index ca61088079c4150fcf389504ddcf26bcf6bf69cd..d9c034c39890eef1fe3d95c6d7c0ae68
        const GURL& origin,
        const blink::PlatformNotificationData& notification_data,
 diff --git a/content/test/mock_platform_notification_service.cc b/content/test/mock_platform_notification_service.cc
-index be4638a9a8c355353424c07b73583e01c5422192..92383a54a9f86f92846b34e15a3d4a5a4f9624d3 100644
+index faa8e541d9cb530f9212420a4dfd0318069320db..0a244000e60daf8e6bd8e783b41124528a117026 100644
 --- a/content/test/mock_platform_notification_service.cc
 +++ b/content/test/mock_platform_notification_service.cc
 @@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(

+ 2 - 2
patches/chromium/out_of_process_instance.patch

@@ -5,10 +5,10 @@ Subject: out_of_process_instance.patch
 
 
 diff --git a/pdf/out_of_process_instance.cc b/pdf/out_of_process_instance.cc
-index 5caf9abe451504ebf4f2cd9b770af188534f13d7..37cc07c74cd046d67ac53891dcf3c7003300549b 100644
+index fa1ad2c48fac29d2f5ca93c83943878b3fc1a33f..1e97399067dcb8da735f70b1351ea1d08fb2e0e0 100644
 --- a/pdf/out_of_process_instance.cc
 +++ b/pdf/out_of_process_instance.cc
-@@ -471,7 +471,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
+@@ -466,7 +466,9 @@ bool OutOfProcessInstance::Init(uint32_t argc,
    std::string document_url = document_url_var.AsString();
    base::StringPiece document_url_piece(document_url);
    is_print_preview_ = IsPrintPreviewUrl(document_url_piece);

+ 3 - 3
patches/chromium/patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch

@@ -8,11 +8,11 @@ patch it because on mac CI, we check out the source code on Linux, which
 confuses the script.
 
 diff --git a/buildtools/ensure_gn_version.py b/buildtools/ensure_gn_version.py
-index 9c01f58b44991cf8b48ef8c68ca17946e73e1c3d..a4618353f722e04ea54f84c6eb1f193d3bb97dee 100755
+index cfc75a37792a93f209a0e7543d577a18d004a615..dd8c3468a914f44050b19002cb2c2df312038398 100755
 --- a/buildtools/ensure_gn_version.py
 +++ b/buildtools/ensure_gn_version.py
-@@ -38,6 +38,11 @@ SRC_DIR = os.path.dirname(BUILDTOOLS_DIR)
- 
+@@ -45,6 +45,11 @@ def ChmodGnFile(path_to_exe):
+            stat.S_IROTH | stat.S_IXOTH)
  
  def main():
 +  # NB. on Electron's CI we check out the macOS source on Linux. Bypass this

+ 18 - 18
patches/chromium/pepper_flash.patch

@@ -61,7 +61,7 @@ index 83cedb4c9e1323259afd041e571240cd971e1241..3686ae2fab5f400cf119a54aea547a72
 +  return PP_OK;
  }
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
-index 016007f0edad06739a8ad1f9874d5dd5d49e0780..c4ae6ae33d552952e2277255015396cd758344aa 100644
+index 9d28e920676edd065f735b8939854468321e99ca..6c086a792e343cf537e46f2c97c21b6257d7268e 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
 @@ -8,9 +8,11 @@
@@ -99,10 +99,10 @@ index 016007f0edad06739a8ad1f9874d5dd5d49e0780..c4ae6ae33d552952e2277255015396cd
 +#if 0
        host_(host),
 +#endif
-       delay_timer_(FROM_HERE, base::TimeDelta::FromSeconds(45), this,
-                    &PepperFlashBrowserHost::OnDelayTimerFired),
-       weak_factory_(this) {
-@@ -122,6 +128,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
+       delay_timer_(FROM_HERE,
+                    base::TimeDelta::FromSeconds(45),
+                    this,
+@@ -123,6 +129,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
  
  int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
      ppapi::host::HostMessageContext* context) {
@@ -110,7 +110,7 @@ index 016007f0edad06739a8ad1f9874d5dd5d49e0780..c4ae6ae33d552952e2277255015396cd
    // Getting the Flash LSO settings requires using the CookieSettings which
    // belong to the profile which lives on the UI thread. We lazily initialize
    // |cookie_settings_| by grabbing the reference from the UI thread and then
-@@ -142,9 +149,11 @@ int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
+@@ -143,9 +150,11 @@ int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
                     context->MakeReplyMessageContext(), document_url,
                     plugin_url));
    }
@@ -123,7 +123,7 @@ index 016007f0edad06739a8ad1f9874d5dd5d49e0780..c4ae6ae33d552952e2277255015396cd
  void PepperFlashBrowserHost::GetLocalDataRestrictions(
      ppapi::host::ReplyMessageContext reply_context,
      const GURL& document_url,
-@@ -173,6 +182,7 @@ void PepperFlashBrowserHost::GetLocalDataRestrictions(
+@@ -174,6 +183,7 @@ void PepperFlashBrowserHost::GetLocalDataRestrictions(
              PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply(
                  static_cast<int32_t>(restrictions)));
  }
@@ -132,7 +132,7 @@ index 016007f0edad06739a8ad1f9874d5dd5d49e0780..c4ae6ae33d552952e2277255015396cd
  device::mojom::WakeLock* PepperFlashBrowserHost::GetWakeLock() {
    // Here is a lazy binding, and will not reconnect after connection error.
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
-index 154120ce5156d77dd302b85cb17e2f14fb69cc2d..5152fd847c012fc2f40017687db426fab955a905 100644
+index f2f40b636a41649199a38c663f03e6182df82520..41d11d1f1f9921d4b4deaaf4b2d8ab4be910e8fe 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.h
 @@ -23,9 +23,11 @@ namespace content {
@@ -175,11 +175,11 @@ index 154120ce5156d77dd302b85cb17e2f14fb69cc2d..5152fd847c012fc2f40017687db426fa
    // For fetching the Flash LSO settings.
    scoped_refptr<content_settings::CookieSettings> cookie_settings_;
 +#endif
-   base::WeakPtrFactory<PepperFlashBrowserHost> weak_factory_;
+   base::WeakPtrFactory<PepperFlashBrowserHost> weak_factory_{this};
  
    DISALLOW_COPY_AND_ASSIGN(PepperFlashBrowserHost);
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
-index b007195efb9202f2cc8aeeb20821afbf5e8af74d..50b50a5eb48cc4efb71ffa0719bcd1f0363853e1 100644
+index 0a727e8c438462a293db629da07d5aef2b25a9ee..b49303e2c19329715f72d8926cb765289224d000 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.cc
 @@ -20,6 +20,7 @@
@@ -190,7 +190,7 @@ index b007195efb9202f2cc8aeeb20821afbf5e8af74d..50b50a5eb48cc4efb71ffa0719bcd1f0
  #include "ppapi/c/pp_errors.h"
  #include "ppapi/host/dispatch_host_message.h"
  #include "ppapi/host/host_message_context.h"
-@@ -128,7 +129,9 @@ PepperFlashDRMHost::PepperFlashDRMHost(BrowserPpapiHost* host,
+@@ -127,7 +128,9 @@ PepperFlashDRMHost::PepperFlashDRMHost(BrowserPpapiHost* host,
    content::ChildProcessSecurityPolicy::GetInstance()->GrantReadFile(
        render_process_id, voucher_file);
  
@@ -200,7 +200,7 @@ index b007195efb9202f2cc8aeeb20821afbf5e8af74d..50b50a5eb48cc4efb71ffa0719bcd1f0
    monitor_finder_ = new MonitorFinder(render_process_id, render_frame_id);
    monitor_finder_->GetMonitor();
  }
-@@ -151,12 +154,18 @@ int32_t PepperFlashDRMHost::OnResourceMessageReceived(
+@@ -150,12 +153,18 @@ int32_t PepperFlashDRMHost::OnResourceMessageReceived(
  
  int32_t PepperFlashDRMHost::OnHostMsgGetDeviceID(
      ppapi::host::HostMessageContext* context) {
@@ -220,7 +220,7 @@ index b007195efb9202f2cc8aeeb20821afbf5e8af74d..50b50a5eb48cc4efb71ffa0719bcd1f0
  }
  
  int32_t PepperFlashDRMHost::OnHostMsgGetHmonitor(
-@@ -185,6 +194,7 @@ int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
+@@ -184,6 +193,7 @@ int32_t PepperFlashDRMHost::OnHostMsgMonitorIsExternal(
    return PP_OK;
  }
  
@@ -228,13 +228,13 @@ index b007195efb9202f2cc8aeeb20821afbf5e8af74d..50b50a5eb48cc4efb71ffa0719bcd1f0
  void PepperFlashDRMHost::GotDeviceID(
      ppapi::host::ReplyMessageContext reply_context,
      const std::string& id,
-@@ -197,3 +207,4 @@ void PepperFlashDRMHost::GotDeviceID(
+@@ -196,3 +206,4 @@ void PepperFlashDRMHost::GotDeviceID(
    host()->SendReply(reply_context,
                      PpapiPluginMsg_FlashDRM_GetDeviceIDReply(id));
  }
 +#endif
 diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
-index aa4433cccff4bc637ce5e71039de3c4352e7cd6b..d9630fdf6b87e11fb9657814895dff36b04ccea8 100644
+index b9d2ce7f7f6837ee7b304daac82d21a3147c6faf..4d4b023d62d12b4d119acbfdee64f4157494ccb3 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
 +++ b/chrome/browser/renderer_host/pepper/pepper_flash_drm_host.h
 @@ -11,7 +11,9 @@
@@ -256,7 +256,7 @@ index aa4433cccff4bc637ce5e71039de3c4352e7cd6b..d9630fdf6b87e11fb9657814895dff36
 +#endif
    scoped_refptr<MonitorFinder> monitor_finder_;
  
-   base::WeakPtrFactory<PepperFlashDRMHost> weak_factory_;
+   base::WeakPtrFactory<PepperFlashDRMHost> weak_factory_{this};
 diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
 index 0d083bb09ff17a691c6399d2a5746b44e3196873..2023dc0240220362a1b503da07aa9fab4cb4b434 100644
 --- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
@@ -436,7 +436,7 @@ index d63e90b6c5079ab3237c4bad3d5e63ce2f99c657..c98a7bd07ddd9527fc67b05b24463ed4
    return nullptr;
  }
 diff --git a/chrome/renderer/pepper/pepper_flash_renderer_host.cc b/chrome/renderer/pepper/pepper_flash_renderer_host.cc
-index 36edbfd997d0dfaa998a4e288caf29af418a28f5..7f4012a4a5b8194a1e44f35f458612099e09fbe4 100644
+index fc3ef9c9888d84c993fe7682afef0a188da12894..fb5782894ed8aa9fd7ccff09cff8d7f5520af8dd 100644
 --- a/chrome/renderer/pepper/pepper_flash_renderer_host.cc
 +++ b/chrome/renderer/pepper/pepper_flash_renderer_host.cc
 @@ -13,7 +13,9 @@
@@ -461,7 +461,7 @@ index 36edbfd997d0dfaa998a4e288caf29af418a28f5..7f4012a4a5b8194a1e44f35f45861209
  }
  
  }  // namespace
-@@ -376,6 +380,8 @@ int32_t PepperFlashRendererHost::OnIsRectTopmost(
+@@ -374,6 +378,8 @@ int32_t PepperFlashRendererHost::OnIsRectTopmost(
  
  int32_t PepperFlashRendererHost::OnInvokePrinting(
      ppapi::host::HostMessageContext* host_context) {

+ 30 - 30
patches/chromium/printing.patch

@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
 This patch also fixes callback for manual user cancellation and success.
 
 diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
-index 88a6142eea4c7a219c08fe3463c44711f5c9fada..81db315a0036a123658697aa677e2356d1e56dfb 100644
+index 63f432b58371cfa0f8079fa78a51c8865a00c183..7b39523e0b8b840191ea517d5f5e8eda701995bc 100644
 --- a/chrome/browser/printing/print_job_worker.cc
 +++ b/chrome/browser/printing/print_job_worker.cc
 @@ -21,12 +21,12 @@
@@ -28,7 +28,7 @@ index 88a6142eea4c7a219c08fe3463c44711f5c9fada..81db315a0036a123658697aa677e2356
  #include "printing/print_job_constants.h"
  #include "printing/printed_document.h"
  #include "printing/printing_utils.h"
-@@ -225,7 +225,15 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
+@@ -224,7 +224,15 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
  
  void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
                                       PrintingContext::Result result) {
@@ -46,7 +46,7 @@ index 88a6142eea4c7a219c08fe3463c44711f5c9fada..81db315a0036a123658697aa677e2356
  
  void PrintJobWorker::GetSettingsWithUI(int document_page_count,
 diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
-index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4fbb2bb75c 100644
+index c4e0992f6265b34659514ef5f15eb8d78645161c..e95f62c0761d1a5829cc4403434fd643e45a0a69 100644
 --- a/chrome/browser/printing/print_view_manager_base.cc
 +++ b/chrome/browser/printing/print_view_manager_base.cc
 @@ -27,10 +27,7 @@
@@ -85,9 +85,9 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  }
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
-@@ -111,12 +112,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
-       queue_(g_browser_process->print_job_manager()->queue()),
-       weak_ptr_factory_(this) {
+@@ -110,12 +111,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
+       printing_succeeded_(false),
+       queue_(g_browser_process->print_job_manager()->queue()) {
    DCHECK(queue_);
 +#if 0
    Profile* profile =
@@ -100,7 +100,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  }
  
  PrintViewManagerBase::~PrintViewManagerBase() {
-@@ -124,12 +127,14 @@ PrintViewManagerBase::~PrintViewManagerBase() {
+@@ -123,12 +126,14 @@ PrintViewManagerBase::~PrintViewManagerBase() {
    DisconnectFromCurrentPrintJob();
  }
  
@@ -118,7 +118,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  }
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
-@@ -245,9 +250,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
+@@ -244,9 +249,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
  void PrintViewManagerBase::UpdatePrintingEnabled() {
    DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
    // The Unretained() is safe because ForEachFrame() is synchronous.
@@ -131,7 +131,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  }
  
  void PrintViewManagerBase::NavigationStopped() {
-@@ -339,7 +344,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
+@@ -338,7 +343,7 @@ void PrintViewManagerBase::OnPrintingFailed(int cookie) {
    PrintManager::OnPrintingFailed(cookie);
  
  #if BUILDFLAG(ENABLE_PRINT_PREVIEW)
@@ -140,7 +140,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  #endif
  
    ReleasePrinterQuery();
-@@ -439,9 +444,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
+@@ -438,9 +443,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
            content::NotificationService::NoDetails());
        break;
      }
@@ -156,7 +156,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
        NOTREACHED();
        break;
      }
-@@ -536,8 +545,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -535,8 +544,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
    DCHECK(!quit_inner_loop_);
    DCHECK(query);
  
@@ -165,7 +165,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  
    // We can't print if there is no renderer.
    if (!web_contents()->GetRenderViewHost() ||
-@@ -548,8 +555,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
+@@ -547,8 +554,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
    DCHECK(!print_job_);
    print_job_ = base::MakeRefCounted<PrintJob>();
    print_job_->Initialize(std::move(query), RenderSourceName(), number_pages_);
@@ -174,7 +174,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
    printing_succeeded_ = false;
    return true;
  }
-@@ -598,6 +603,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -597,6 +602,13 @@ void PrintViewManagerBase::ReleasePrintJob() {
    content::RenderFrameHost* rfh = printing_rfh_;
    printing_rfh_ = nullptr;
  
@@ -188,7 +188,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
    if (!print_job_)
      return;
  
-@@ -608,7 +620,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
+@@ -607,7 +619,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
    }
  
    registrar_.Remove(this, chrome::NOTIFICATION_PRINT_JOB_EVENT,
@@ -197,7 +197,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
    // Don't close the worker thread.
    print_job_ = nullptr;
  }
-@@ -678,6 +690,9 @@ bool PrintViewManagerBase::PrintNowInternal(
+@@ -677,6 +689,9 @@ bool PrintViewManagerBase::PrintNowInternal(
    // Don't print / print preview interstitials or crashed tabs.
    if (web_contents()->ShowingInterstitialPage() || web_contents()->IsCrashed())
      return false;
@@ -208,7 +208,7 @@ index a8502fdff8d39b7215f92a393a66d096bd302e25..38f213b0f6d6872d08981d265105cd4f
  }
  
 diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
-index f3e23125001c0eebebdb2e211d069cd3feb523d8..345b1925a7b29152206c6784a2a56f4b96bb89ab 100644
+index 925736d379c34ac7ddc07032305d24e1ae65e4b3..a8b2b31ec8bcb04d83df368b12d124dcdbb8b55d 100644
 --- a/chrome/browser/printing/print_view_manager_base.h
 +++ b/chrome/browser/printing/print_view_manager_base.h
 @@ -39,6 +39,8 @@ class PrintJob;
@@ -365,7 +365,7 @@ index 1802034a6e15a6ad8b0d9591cfb79ba5873dc982..a827091facdb4f6b1d74ce826c3492ce
  // Like PrintMsg_PrintPages, but using the print preview document's frame/node.
  IPC_MESSAGE_ROUTED0(PrintMsg_PrintForSystemDialog)
 diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
-index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e1740b31637 100644
+index ef580254bd8feba84ac02924b77b9b4feaf14d96..57a8264a7174b440ed1d6bfe9c2c3e21552d950b 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
 @@ -37,6 +37,7 @@
@@ -376,7 +376,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
  #include "printing/units.h"
  #include "third_party/blink/public/common/frame/frame_owner_element_type.h"
  #include "third_party/blink/public/common/frame/sandbox_flags.h"
-@@ -1118,7 +1119,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1116,7 +1117,9 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
      web_frame->DispatchBeforePrintEvent();
      if (!weak_this)
        return;
@@ -387,7 +387,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      if (weak_this)
        web_frame->DispatchAfterPrintEvent();
    }
-@@ -1166,7 +1169,10 @@ void PrintRenderFrameHelper::OnDestruct() {
+@@ -1164,7 +1167,10 @@ void PrintRenderFrameHelper::OnDestruct() {
    delete this;
  }
  
@@ -399,7 +399,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    if (ipc_nesting_level_ > 1)
      return;
  
-@@ -1179,7 +1185,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
+@@ -1177,7 +1183,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
    // If we are printing a PDF extension frame, find the plugin node and print
    // that instead.
    auto plugin = delegate_->GetPdfElement(frame);
@@ -409,7 +409,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1196,7 +1203,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
+@@ -1194,7 +1201,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
    }
    auto weak_this = weak_ptr_factory_.GetWeakPtr();
    Print(frame, print_preview_context_.source_node(),
@@ -418,7 +418,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1232,6 +1239,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
+@@ -1230,6 +1237,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
    if (ipc_nesting_level_ > 1)
      return;
  
@@ -427,7 +427,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    print_preview_context_.OnPrintPreview();
  
    UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
-@@ -1624,7 +1633,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1622,7 +1631,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
      auto self = weak_ptr_factory_.GetWeakPtr();
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -439,7 +439,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1635,7 +1647,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1633,7 +1645,10 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -451,7 +451,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -1643,7 +1658,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1641,7 +1656,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    int expected_page_count = 0;
@@ -460,7 +460,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1663,8 +1678,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1661,8 +1676,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
  
      PrintMsg_PrintPages_Params print_settings;
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -474,7 +474,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1674,6 +1692,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1672,6 +1690,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
              ? blink::kWebPrintScalingOptionSourceSize
              : scaling_option;
      SetPrintPagesParams(print_settings);
@@ -482,7 +482,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      if (print_settings.params.dpi.IsEmpty() ||
          !print_settings.params.document_cookie) {
        DidFinishPrinting(OK);  // Release resources and fail silently on failure.
-@@ -1862,10 +1881,24 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
+@@ -1867,10 +1886,24 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
    return printed_pages;
  }
  
@@ -510,7 +510,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
    // 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
    // terminate.
-@@ -1885,12 +1918,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -1890,12 +1923,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  
@@ -530,7 +530,7 @@ index a462682154a33d0a20c07d4d7b6d5a584c553d47..96efa4b2f977f090de426c61268d6e17
      Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
      return false;
 diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
-index ebe927ebd50270e2a49bf43aeb8ddfcdf99c6b94..4a790772cfb6c1fa911d3fd18e665dcb7e2bd0c1 100644
+index 71c0c15217b62cd7a6087c6d9ae50481f9041d5f..e2250a66517dbd909cd3b5407173ad91c11ec32f 100644
 --- a/components/printing/renderer/print_render_frame_helper.h
 +++ b/components/printing/renderer/print_render_frame_helper.h
 @@ -193,7 +193,9 @@ class PrintRenderFrameHelper

+ 4 - 4
patches/chromium/put_back_deleted_colors_for_autofill.patch

@@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them.  This patch can be
 our autofill implementation to work like chromium.
 
 diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk.cc b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
-index c72e78bdc7c1535d48bc13e18c1cc784051eaea8..fe07c0ac7d94cdbb7bef56f651266e63ec06f767 100644
+index 3044d7b1829397a97b9a1ef9f115587bab74339d..c578d16c995c11daf90484593b5f9649d37b7041 100644
 --- a/chrome/browser/ui/libgtkui/native_theme_gtk.cc
 +++ b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
 @@ -280,6 +280,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
@@ -78,7 +78,7 @@ index 489369300d48dbfacb8c5489e06b77218f526bf4..340026b3dac4e833d3448d83db7b92c1
      case NativeTheme::kColorId_ThrobberSpinningColor:
        return gfx::kGoogleBlue600;
 diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
-index 68d9f2a26a8616d5f4d18c89fa0f8ec7650b8c10..b624f3df1162e0f6ad4ee72bf2bb8bd071744fae 100644
+index 97ced9d2495c33aad710d8ec5208b8107cd94ed9..62dc2fdad120e0cee44b15848d1ebb813ccb8559 100644
 --- a/ui/native_theme/native_theme.h
 +++ b/ui/native_theme/native_theme.h
 @@ -367,6 +367,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -94,10 +94,10 @@ index 68d9f2a26a8616d5f4d18c89fa0f8ec7650b8c10..b624f3df1162e0f6ad4ee72bf2bb8bd0
      kColorId_ThrobberSpinningColor,
      kColorId_ThrobberWaitingColor,
 diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
-index e74d07035ccdb1f54ce85775ac96d8a1be40e6c6..798b96799871aea80301c3b242bc575314cb698c 100644
+index c6a0c1b9775f9d7e7a9be15d6f15ce84acf68b68..3b3a909bd920a7bf8f54fac4c00f29ce9556c20c 100644
 --- a/ui/native_theme/native_theme_win.cc
 +++ b/ui/native_theme/native_theme_win.cc
-@@ -539,6 +539,17 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
+@@ -548,6 +548,17 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
      case kColorId_TableGroupingIndicatorColor:
        return system_colors_[COLOR_GRAYTEXT];
  

+ 2 - 2
patches/chromium/render_widget_host_view_base.patch

@@ -5,7 +5,7 @@ Subject: render_widget_host_view_base.patch
 
 
 diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
-index cd8d45ce9c70e3e1836580f29a28228aaf7ff19f..533fb6a26d445d81a16967c5e3fedfdba146c44b 100644
+index f41270e262784602c90b79b7aefbcd1a7af43dd8..a28ea7ee72fbf596b2b1d10cacaad4068d62e4d4 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.cc
 +++ b/content/browser/renderer_host/render_widget_host_view_base.cc
 @@ -627,6 +627,15 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@@ -25,7 +25,7 @@ index cd8d45ce9c70e3e1836580f29a28228aaf7ff19f..533fb6a26d445d81a16967c5e3fedfdb
      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 5bac450f680b839a3636adef6cb9f53dae6a6f5e..f336561be067af75cd5cb6328b75b4ec77c66b7a 100644
+index 8e523d78e7655262b18e1b52d8365120df387908..cf9e284267d767ed35013a7aa5f675cebb3c68bb 100644
 --- a/content/browser/renderer_host/render_widget_host_view_base.h
 +++ b/content/browser/renderer_host/render_widget_host_view_base.h
 @@ -24,9 +24,11 @@

+ 6 - 6
patches/chromium/render_widget_host_view_mac.patch

@@ -5,10 +5,10 @@ Subject: render_widget_host_view_mac.patch
 
 
 diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-index b7b9ee725214ef3a7adc25c5d542d1ad2f0eec17..2218cc5cc37c3566efd107f56ee794288678931e 100644
+index 5d8727b36c015c5136a3a24c463821ff6ae46994..fa73828627fcea54d12fd6eb6c489248bf2af8d7 100644
 --- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
 +++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
-@@ -145,6 +145,11 @@ void ExtractUnderlines(NSAttributedString* string,
+@@ -152,6 +152,11 @@ void ExtractUnderlines(NSAttributedString* string,
  
  }  // namespace
  
@@ -20,7 +20,7 @@ index b7b9ee725214ef3a7adc25c5d542d1ad2f0eec17..2218cc5cc37c3566efd107f56ee79428
  // These are not documented, so use only after checking -respondsToSelector:.
  @interface NSApplication (UndocumentedSpeechMethods)
  - (void)speakString:(NSString*)string;
-@@ -563,6 +568,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
+@@ -569,6 +574,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
  }
  
  - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -30,7 +30,7 @@ index b7b9ee725214ef3a7adc25c5d542d1ad2f0eec17..2218cc5cc37c3566efd107f56ee79428
    return [self acceptsMouseEventsWhenInactive];
  }
  
-@@ -982,6 +990,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
+@@ -988,6 +996,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
                                eventType == NSKeyDown &&
                                !(modifierFlags & NSCommandKeyMask);
  
@@ -41,7 +41,7 @@ index b7b9ee725214ef3a7adc25c5d542d1ad2f0eec17..2218cc5cc37c3566efd107f56ee79428
    // We only handle key down events and just simply forward other events.
    if (eventType != NSKeyDown) {
      hostHelper_->ForwardKeyboardEvent(event, latency_info);
-@@ -1737,9 +1749,11 @@ - (NSAccessibilityRole)accessibilityRole {
+@@ -1767,9 +1779,11 @@ - (NSAccessibilityRole)accessibilityRole {
  // Since this implementation doesn't have to wait any IPC calls, this doesn't
  // make any key-typing jank. --hbono 7/23/09
  //
@@ -53,7 +53,7 @@ index b7b9ee725214ef3a7adc25c5d542d1ad2f0eec17..2218cc5cc37c3566efd107f56ee79428
  
  - (NSArray*)validAttributesForMarkedText {
    // This code is just copied from WebKit except renaming variables.
-@@ -1748,7 +1762,10 @@ - (NSArray*)validAttributesForMarkedText {
+@@ -1778,7 +1792,10 @@ - (NSArray*)validAttributesForMarkedText {
          initWithObjects:NSUnderlineStyleAttributeName,
                          NSUnderlineColorAttributeName,
                          NSMarkedClauseSegmentAttributeName,

+ 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 515cc0e0bad7795489e1a3c09887008f6ada2216..3c4191304b48c43999aebc8d96ebbbc01873f2d2 100644
+index e5b48fd4d4e431e9a54b73856214e9e48d248940..dc6b98dee8f34873ba4bb0aae771fdf6af43b9eb 100644
 --- a/chrome/BUILD.gn
 +++ b/chrome/BUILD.gn
-@@ -1709,7 +1709,7 @@ if (is_chrome_branded && !is_android) {
+@@ -1716,7 +1716,7 @@ if (is_chrome_branded && !is_android) {
    }
  }
  
@@ -64,7 +64,7 @@ index 515cc0e0bad7795489e1a3c09887008f6ada2216..3c4191304b48c43999aebc8d96ebbbc0
    chrome_paks("packed_resources") {
      if (is_mac) {
        output_dir = "$root_gen_dir/repack"
-@@ -1733,6 +1733,12 @@ if (!is_android) {
+@@ -1740,6 +1740,12 @@ if (!is_android) {
    }
  }
  

+ 2 - 2
patches/chromium/scroll_bounce_flag.patch

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
 Patch to make scrollBounce option work.
 
 diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
-index b37f47d3e7b8711b4f8226a83b37934686e0ad9a..ef3ccd1b592e30db88055cc827659562e989d08a 100644
+index f04773f4e4e8888762b51289304ca598ee9c2827..e7fe8cfe8a47058d364d43db018cc9158928a86d 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1499,7 +1499,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
+@@ -1498,7 +1498,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
  }
  
  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 10344f304cafca39603e1c3aa0438daf70b58ecd..44ebbd3cafad0cdb26affe92c56377ca5b668094 100644
+index c49bdcea4b6481bbd2c2ec29a6e61a981886be8e..9d2dde7a83502e660498f466ad9c042990ece783 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
-@@ -398,6 +398,10 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -399,6 +399,10 @@ class RendererSandboxedProcessLauncherDelegate
      : public SandboxedProcessLauncherDelegate {
   public:
    RendererSandboxedProcessLauncherDelegate() {}
@@ -36,7 +36,7 @@ index 10344f304cafca39603e1c3aa0438daf70b58ecd..44ebbd3cafad0cdb26affe92c56377ca
  
    ~RendererSandboxedProcessLauncherDelegate() override {}
  
-@@ -417,6 +421,9 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -418,6 +422,9 @@ class RendererSandboxedProcessLauncherDelegate
  
  #if BUILDFLAG(USE_ZYGOTE_HANDLE)
    service_manager::ZygoteHandle GetZygote() override {
@@ -46,7 +46,7 @@ index 10344f304cafca39603e1c3aa0438daf70b58ecd..44ebbd3cafad0cdb26affe92c56377ca
      const base::CommandLine& browser_command_line =
          *base::CommandLine::ForCurrentProcess();
      base::CommandLine::StringType renderer_prefix =
-@@ -430,6 +437,11 @@ class RendererSandboxedProcessLauncherDelegate
+@@ -431,6 +438,11 @@ class RendererSandboxedProcessLauncherDelegate
    service_manager::SandboxType GetSandboxType() override {
      return service_manager::SANDBOX_TYPE_RENDERER;
    }
@@ -58,7 +58,7 @@ index 10344f304cafca39603e1c3aa0438daf70b58ecd..44ebbd3cafad0cdb26affe92c56377ca
  };
  
  const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
-@@ -1751,11 +1763,18 @@ bool RenderProcessHostImpl::Init() {
+@@ -1745,11 +1757,18 @@ bool RenderProcessHostImpl::Init() {
        cmd_line->PrependWrapper(renderer_prefix);
      AppendRendererCommandLine(cmd_line.get());
  

+ 1 - 1
patches/chromium/unsandboxed_ppapi_processes_skip_zygote.patch

@@ -5,7 +5,7 @@ Subject: unsandboxed ppapi processes skip zygote
 
 
 diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
-index 56a1b68a0d03f2a5ea7fc809e383a82579ef01a2..70d083de6b6db96c6a2ce8a412f59b824656b29e 100644
+index 68a9f8568d242fafd104c47ad67a7fb1d0b593e7..fa6492acd3d4c12fbebbef94540c675aeda99cdc 100644
 --- a/content/browser/ppapi_plugin_process_host.cc
 +++ b/content/browser/ppapi_plugin_process_host.cc
 @@ -121,6 +121,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate

+ 6 - 6
patches/chromium/web_contents.patch

@@ -5,10 +5,10 @@ Subject: web_contents.patch
 
 
 diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
-index 37e9397ccf47519fd4a5867034df8513d8532366..e427908b3d284ae56f8592d3e7c5dc0d9a6a7684 100644
+index ae1bcfa7db7ddd09f59d9ecae61a504d0f325b3b..b691f5868c5b363a34df2627dec801d8942dd77f 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
-@@ -2090,6 +2090,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2131,6 +2131,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
    std::string unique_name;
    frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
  
@@ -21,7 +21,7 @@ index 37e9397ccf47519fd4a5867034df8513d8532366..e427908b3d284ae56f8592d3e7c5dc0d
    WebContentsViewDelegate* delegate =
        GetContentClient()->browser()->GetWebContentsViewDelegate(this);
  
-@@ -2105,6 +2111,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
+@@ -2146,6 +2152,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
            &render_view_host_delegate_view_);
      }
    }
@@ -92,10 +92,10 @@ index ecaf30bcb7b916a92a69641dd7b96a3633d407c0..0af625928ca6227a21cd4263a14a42b7
  
  RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget(
 diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
-index 06536cf612f149dd6de7cd1b9105e2aa8da1d633..fbbf3d0023ae5900a3c51987e52d18645e5207e3 100644
+index 50236e972100b41d55f0d8acb03fbcb5ce8520c6..4b855a7af4b7ef34d0d8a1c76f8485e565a523b9 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
-@@ -75,9 +75,12 @@ class BrowserPluginGuestDelegate;
+@@ -76,9 +76,12 @@ class BrowserPluginGuestDelegate;
  class InterstitialPage;
  class RenderFrameHost;
  class RenderViewHost;
@@ -108,7 +108,7 @@ index 06536cf612f149dd6de7cd1b9105e2aa8da1d633..fbbf3d0023ae5900a3c51987e52d1864
  struct CustomContextMenuContext;
  struct DropData;
  struct MHTMLGenerationParams;
-@@ -213,6 +216,10 @@ class WebContents : public PageNavigator,
+@@ -214,6 +217,10 @@ class WebContents : public PageNavigator,
        kInitializeAndWarmupRendererProcess,
      } desired_renderer_state;
  

+ 2 - 2
patches/chromium/webview_cross_drag.patch

@@ -5,10 +5,10 @@ Subject: webview_cross_drag.patch
 
 
 diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
-index ee5760ecbe0f836d0e49f53527252a48f4344b03..a413be0448816152f99d234a4e409bf0e9816be7 100644
+index ab27502c3509d0827b09bcb84c7921b432749dce..515ef47bcfc22b74e9f05c9db885e92f773ec84c 100644
 --- a/content/browser/web_contents/web_contents_view_aura.cc
 +++ b/content/browser/web_contents/web_contents_view_aura.cc
-@@ -775,6 +775,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
+@@ -776,6 +776,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
  
  bool WebContentsViewAura::IsValidDragTarget(
      RenderWidgetHostImpl* target_rwh) const {

+ 7 - 7
patches/chromium/worker_context_will_destroy.patch

@@ -21,10 +21,10 @@ index bfc62d1766686981ded5e62ad7da466d3afb9bab..5fa60ba975561626ae3ccecd9968278c
    // An empty URL is returned if the URL is not overriden.
    virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
 diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
-index 461008f4e95e6e80df54b2b80a651f2fafe08f1d..13dc0cd3153c4509aa9bf408d42a2c31b6fa8cf3 100644
+index a89a61d35a4b9cdde896f8a1d8acfa5c17baec02..4547b0146ae3d03844a5c73a3b4eed97fdbc89c1 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -903,6 +903,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -914,6 +914,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -38,10 +38,10 @@ index 461008f4e95e6e80df54b2b80a651f2fafe08f1d..13dc0cd3153c4509aa9bf408d42a2c31
      const v8::Local<v8::Context>& worker) {
    GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
 diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
-index 0fbb6ee6303d022828baacae36a5f9cac2434165..cf3dfc037a689bbe40c91206556c8df298903736 100644
+index f1bc21b53606d4133440c72c9dea6de1a3a9544f..2c58ea10e04bb1ee337f12a2fcc4db77a071510d 100644
 --- a/content/renderer/renderer_blink_platform_impl.h
 +++ b/content/renderer/renderer_blink_platform_impl.h
-@@ -184,6 +184,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
+@@ -186,6 +186,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
    void DidStartWorkerThread() override;
    void WillStopWorkerThread() override;
    void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -50,10 +50,10 @@ index 0fbb6ee6303d022828baacae36a5f9cac2434165..cf3dfc037a689bbe40c91206556c8df2
        const blink::WebString& header_name) override;
  
 diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
-index 5b29bbefa812d2b64bd769d45481fc2ac9c4e3d6..a87ecadc2fcb2f5102d2861b28ab28a27d85318f 100644
+index 9ae02783be95b1748b931c2f75eb79b038947b7f..eb99295295613fe044b27c401a4b4a77b084255d 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -626,6 +626,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -636,6 +636,7 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -62,7 +62,7 @@ index 5b29bbefa812d2b64bd769d45481fc2ac9c4e3d6..a87ecadc2fcb2f5102d2861b28ab28a2
        const WebSecurityOrigin& script_origin) {
      return false;
 diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
-index 14f6f3f5cce4ee0cb444b271bc4c98868f33d51a..1fbd785e48b5cd885c310861f916150a3e41ee61 100644
+index 9f4f4a72f59dbaa98d8219b7f0c391ce2a426e73..98c672c85bc64e1c8b98b7b5e24662aac80bfebc 100644
 --- a/third_party/blink/renderer/core/workers/worker_thread.cc
 +++ b/third_party/blink/renderer/core/workers/worker_thread.cc
 @@ -640,6 +640,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {

+ 0 - 2
patches/config.json

@@ -3,8 +3,6 @@
 
   "src/electron/patches/boringssl": "src/third_party/boringssl/src",
 
-  "src/electron/patches/swiftshader": "src/third_party/swiftshader",
-
   "src/electron/patches/v8":  "src/v8",
 
   "src/electron/patches/node": "src/third_party/electron_node"

+ 0 - 0
patches/swiftshader/.patches


+ 4 - 4
patches/v8/add_realloc.patch

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
 Realloc on the v8 side.
 
 diff --git a/include/v8.h b/include/v8.h
-index 64c428036a916c5755b20ff461f57a74f1cb51d3..6d5a9a08a6d5fb98893f996e1f0b9432e3899853 100644
+index 170d8d4012fa487435cb01eacd00dd0efa25fb44..4e64c9503751cf538bae3aaa0783d2eadd2dec65 100644
 --- a/include/v8.h
 +++ b/include/v8.h
-@@ -4646,6 +4646,13 @@ class V8_EXPORT ArrayBuffer : public Object {
+@@ -4651,6 +4651,13 @@ class V8_EXPORT ArrayBuffer : public Object {
       */
      virtual void* AllocateUninitialized(size_t length) = 0;
  
@@ -30,10 +30,10 @@ index 64c428036a916c5755b20ff461f57a74f1cb51d3..6d5a9a08a6d5fb98893f996e1f0b9432
       * Free the memory block of size |length|, pointed to by |data|.
       * That memory is guaranteed to be previously allocated by |Allocate|.
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 948ff9ef2768385074f5013f64de29422d0a617a..9f115276c549429e2f9a9e7b3289e8ac79e8e766 100644
+index c9ec430e45d88a138d590fdcd7c716af5e40b3be..334bd0ef39e86b07ca2fde01a3e3aa70e83a1aaf 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -507,6 +507,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
+@@ -509,6 +509,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {
    i::V8::SetSnapshotBlob(snapshot_blob);
  }
  

+ 3 - 3
patches/v8/build_gn.patch

@@ -5,7 +5,7 @@ Subject: build_gn.patch
 
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 43b93c4a9244acf16ea172349d0696d403e1b1f1..912e8cd4955a0f677870ea3784dd35d0a2ee88c8 100644
+index e4ae587558a9bb86398b296a56845910d2c110bf..7ca8f5b1a597e34eb2b6364c37197839941898ae 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -271,7 +271,7 @@ config("internal_config") {
@@ -17,7 +17,7 @@ index 43b93c4a9244acf16ea172349d0696d403e1b1f1..912e8cd4955a0f677870ea3784dd35d0
      defines += [ "BUILDING_V8_SHARED" ]
    }
  }
-@@ -3801,7 +3801,7 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -3784,7 +3784,7 @@ if (current_toolchain == v8_generator_toolchain) {
        "src/interpreter/bytecodes.h",
      ]
  
@@ -26,7 +26,7 @@ index 43b93c4a9244acf16ea172349d0696d403e1b1f1..912e8cd4955a0f677870ea3784dd35d0
  
      deps = [
        ":v8_libbase",
-@@ -3833,6 +3833,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
+@@ -3815,6 +3815,8 @@ if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
  
      configs = [ ":internal_config" ]
  

+ 4 - 4
patches/v8/dcheck.patch

@@ -5,10 +5,10 @@ Subject: dcheck.patch
 
 
 diff --git a/src/api/api.cc b/src/api/api.cc
-index e934f1452c83a57066f21ebd007b9283acaa40aa..4b5af0a6e466aef10c4fe1fa909757db87808038 100644
+index 35ae45e3ef0446d6d68b68b8d66bf1d27d59ece6..2fbdda21100066d21544d435c6e2391e49542dd8 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -8296,7 +8296,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
+@@ -8444,7 +8444,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
  }
  
  void Isolate::RunMicrotasks() {
@@ -18,10 +18,10 @@ index e934f1452c83a57066f21ebd007b9283acaa40aa..4b5af0a6e466aef10c4fe1fa909757db
    isolate->default_microtask_queue()->RunMicrotasks(isolate);
  }
 diff --git a/src/heap/heap.cc b/src/heap/heap.cc
-index 9456c341e673da104f645b2b515451844ddc1fde..0d9750a748fb239faab14344fa9a18dc07b48498 100644
+index 2b3db58399e5d01b74a2e787873363daca8b05f8..1f95a4fe95b3a3267ec4a5cabcf25bee24451dce 100644
 --- a/src/heap/heap.cc
 +++ b/src/heap/heap.cc
-@@ -5260,9 +5260,9 @@ void Heap::TearDown() {
+@@ -5317,9 +5317,9 @@ void Heap::TearDown() {
  void Heap::AddGCPrologueCallback(v8::Isolate::GCCallbackWithData callback,
                                   GCType gc_type, void* data) {
    DCHECK_NOT_NULL(callback);

+ 24 - 24
patches/v8/deps_provide_more_v8_backwards_compatibility.patch

@@ -22,7 +22,7 @@ Reviewed-By: Yang Guo <[email protected]>
 Reviewed-By: Michaël Zasso <[email protected]>
 
 diff --git a/include/v8.h b/include/v8.h
-index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51bdcf45cb7 100644
+index 4e64c9503751cf538bae3aaa0783d2eadd2dec65..2cfe67273ae4683f26a8003b8836d0d07399576c 100644
 --- a/include/v8.h
 +++ b/include/v8.h
 @@ -1108,6 +1108,10 @@ class V8_EXPORT PrimitiveArray {
@@ -36,7 +36,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
    void Set(Isolate* isolate, int index, Local<Primitive> item);
    Local<Primitive> Get(Isolate* isolate, int index);
  };
-@@ -1844,6 +1848,8 @@ class V8_EXPORT StackTrace {
+@@ -1848,6 +1852,8 @@ class V8_EXPORT StackTrace {
    /**
     * Returns a StackFrame at a particular index.
     */
@@ -45,7 +45,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
    Local<StackFrame> GetFrame(Isolate* isolate, uint32_t index) const;
  
    /**
-@@ -2537,6 +2543,13 @@ class V8_EXPORT Value : public Data {
+@@ -2541,6 +2547,13 @@ class V8_EXPORT Value : public Data {
  
    Local<Boolean> ToBoolean(Isolate* isolate) const;
  
@@ -59,7 +59,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
    /**
     * Attempts to convert a string to an array index.
     * Returns an empty handle if the conversion fails.
-@@ -2553,7 +2566,14 @@ class V8_EXPORT Value : public Data {
+@@ -2557,7 +2570,14 @@ class V8_EXPORT Value : public Data {
        Local<Context> context) const;
    V8_WARN_UNUSED_RESULT Maybe<int32_t> Int32Value(Local<Context> context) const;
  
@@ -74,7 +74,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
    V8_WARN_UNUSED_RESULT Maybe<bool> Equals(Local<Context> context,
                                             Local<Value> that) const;
    bool StrictEquals(Local<Value> that) const;
-@@ -2660,6 +2680,8 @@ class V8_EXPORT String : public Name {
+@@ -2664,6 +2684,8 @@ class V8_EXPORT String : public Name {
     * Returns the number of bytes in the UTF-8 encoded
     * representation of this string.
     */
@@ -83,7 +83,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
    int Utf8Length(Isolate* isolate) const;
  
    /**
-@@ -2716,12 +2738,23 @@ class V8_EXPORT String : public Name {
+@@ -2720,12 +2742,23 @@ class V8_EXPORT String : public Name {
    // 16-bit character codes.
    int Write(Isolate* isolate, uint16_t* buffer, int start = 0, int length = -1,
              int options = NO_OPTIONS) const;
@@ -107,7 +107,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
  
    /**
     * A zero length string.
-@@ -2889,6 +2922,9 @@ class V8_EXPORT String : public Name {
+@@ -2893,6 +2926,9 @@ class V8_EXPORT String : public Name {
     */
    static Local<String> Concat(Isolate* isolate, Local<String> left,
                                Local<String> right);
@@ -117,7 +117,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
  
    /**
     * Creates a new external string using the data defined in the given
-@@ -2953,6 +2989,8 @@ class V8_EXPORT String : public Name {
+@@ -2957,6 +2993,8 @@ class V8_EXPORT String : public Name {
     */
    class V8_EXPORT Utf8Value {
     public:
@@ -126,7 +126,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
      Utf8Value(Isolate* isolate, Local<v8::Value> obj);
      ~Utf8Value();
      char* operator*() { return str_; }
-@@ -2976,6 +3014,7 @@ class V8_EXPORT String : public Name {
+@@ -2980,6 +3018,7 @@ class V8_EXPORT String : public Name {
     */
    class V8_EXPORT Value {
     public:
@@ -134,7 +134,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
      Value(Isolate* isolate, Local<v8::Value> obj);
      ~Value();
      uint16_t* operator*() { return str_; }
-@@ -5303,6 +5342,8 @@ class V8_EXPORT BooleanObject : public Object {
+@@ -5310,6 +5349,8 @@ class V8_EXPORT BooleanObject : public Object {
  class V8_EXPORT StringObject : public Object {
   public:
    static Local<Value> New(Isolate* isolate, Local<String> value);
@@ -143,7 +143,7 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
  
    Local<String> ValueOf() const;
  
-@@ -10491,6 +10532,29 @@ template <class T> Value* Value::Cast(T* value) {
+@@ -10498,6 +10539,29 @@ template <class T> Value* Value::Cast(T* value) {
  }
  
  
@@ -174,10 +174,10 @@ index 6d5a9a08a6d5fb98893f996e1f0b9432e3899853..dc5d3ba4c06d19948b5610ce830ab51b
  #ifdef V8_ENABLE_CHECKS
    CheckCast(value);
 diff --git a/src/api/api.cc b/src/api/api.cc
-index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283acaa40aa 100644
+index 334bd0ef39e86b07ca2fde01a3e3aa70e83a1aaf..35ae45e3ef0446d6d68b68b8d66bf1d27d59ece6 100644
 --- a/src/api/api.cc
 +++ b/src/api/api.cc
-@@ -2182,6 +2182,10 @@ int PrimitiveArray::Length() const {
+@@ -2184,6 +2184,10 @@ int PrimitiveArray::Length() const {
    return array->length();
  }
  
@@ -188,7 +188,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  void PrimitiveArray::Set(Isolate* v8_isolate, int index,
                           Local<Primitive> item) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -2195,6 +2199,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
+@@ -2197,6 +2201,10 @@ void PrimitiveArray::Set(Isolate* v8_isolate, int index,
    array->set(index, *i_item);
  }
  
@@ -199,7 +199,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  Local<Primitive> PrimitiveArray::Get(Isolate* v8_isolate, int index) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
    i::Handle<i::FixedArray> array = Utils::OpenHandle(this);
-@@ -2922,6 +2930,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
+@@ -2937,6 +2945,10 @@ void Message::PrintCurrentStackTrace(Isolate* isolate, FILE* out) {
  
  // --- S t a c k T r a c e ---
  
@@ -210,7 +210,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  Local<StackFrame> StackTrace::GetFrame(Isolate* v8_isolate,
                                         uint32_t index) const {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -3509,6 +3521,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
+@@ -3524,6 +3536,34 @@ MaybeLocal<BigInt> Value::ToBigInt(Local<Context> context) const {
    RETURN_ESCAPED(result);
  }
  
@@ -245,7 +245,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  bool Value::BooleanValue(Isolate* v8_isolate) const {
    return Utils::OpenHandle(this)->BooleanValue(
        reinterpret_cast<i::Isolate*>(v8_isolate));
-@@ -3856,6 +3896,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
+@@ -3871,6 +3911,11 @@ MaybeLocal<Uint32> Value::ToArrayIndex(Local<Context> context) const {
    return Local<Uint32>();
  }
  
@@ -257,7 +257,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  Maybe<bool> Value::Equals(Local<Context> context, Local<Value> that) const {
    i::Isolate* isolate = Utils::OpenHandle(*context)->GetIsolate();
    auto self = Utils::OpenHandle(this);
-@@ -5068,6 +5113,10 @@ bool String::ContainsOnlyOneByte() const {
+@@ -5083,6 +5128,10 @@ bool String::ContainsOnlyOneByte() const {
    return helper.Check(*str);
  }
  
@@ -268,7 +268,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  int String::Utf8Length(Isolate* isolate) const {
    i::Handle<i::String> str = Utils::OpenHandle(this);
    str = i::String::Flatten(reinterpret_cast<i::Isolate*>(isolate), str);
-@@ -5220,6 +5269,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
+@@ -5235,6 +5284,14 @@ static int WriteUtf8Impl(i::Vector<const Char> string, char* write_start,
  }
  }  // anonymous namespace
  
@@ -283,7 +283,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  int String::WriteUtf8(Isolate* v8_isolate, char* buffer, int capacity,
                        int* nchars_ref, int options) const {
    i::Handle<i::String> str = Utils::OpenHandle(this);
-@@ -5258,6 +5315,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
+@@ -5273,6 +5330,17 @@ static inline int WriteHelper(i::Isolate* isolate, const String* string,
    return end - start;
  }
  
@@ -301,7 +301,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  int String::WriteOneByte(Isolate* isolate, uint8_t* buffer, int start,
                           int length, int options) const {
    return WriteHelper(reinterpret_cast<i::Isolate*>(isolate), this, buffer,
-@@ -6175,6 +6243,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
+@@ -6190,6 +6258,11 @@ MaybeLocal<String> String::NewFromTwoByte(Isolate* isolate,
    return result;
  }
  
@@ -313,7 +313,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  Local<String> v8::String::Concat(Isolate* v8_isolate, Local<String> left,
                                   Local<String> right) {
    i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
-@@ -6445,6 +6518,10 @@ bool v8::BooleanObject::ValueOf() const {
+@@ -6460,6 +6533,10 @@ bool v8::BooleanObject::ValueOf() const {
    return js_primitive_wrapper->value().IsTrue(isolate);
  }
  
@@ -324,7 +324,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  Local<v8::Value> v8::StringObject::New(Isolate* v8_isolate,
                                         Local<String> value) {
    i::Handle<i::String> string = Utils::OpenHandle(*value);
-@@ -8652,6 +8729,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
+@@ -8805,6 +8882,9 @@ bool MicrotasksScope::IsRunningMicrotasks(Isolate* v8_isolate) {
    return microtask_queue->IsRunningMicrotasks();
  }
  
@@ -334,7 +334,7 @@ index 9f115276c549429e2f9a9e7b3289e8ac79e8e766..e934f1452c83a57066f21ebd007b9283
  String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
      : str_(nullptr), length_(0) {
    if (obj.IsEmpty()) return;
-@@ -8669,6 +8749,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
+@@ -8822,6 +8902,9 @@ String::Utf8Value::Utf8Value(v8::Isolate* isolate, v8::Local<v8::Value> obj)
  
  String::Utf8Value::~Utf8Value() { i::DeleteArray(str_); }
  

+ 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 5469e62e81a8c2390397b0e053499238ee37752d..5260a0b18337ee516d77bf39070a72398a907e30 100644
+index e980fd0d716d6bdef601d4a93d86cb625a289cf5..2c3f036c3c84de89e7c244550a46ff360306b688 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
 @@ -271,6 +271,10 @@ config("internal_config") {

+ 1 - 1
patches/v8/export_symbols_needed_for_windows_build.patch

@@ -6,7 +6,7 @@ Subject: Export symbols needed for Windows build
 These symbols are required to build v8 with BUILD_V8_SHARED on Windows.
 
 diff --git a/src/objects/objects.h b/src/objects/objects.h
-index 100feabee95d629f92a31f20fccab25355512097..5e62b55db904976362c5eb4b565741a14b36f4e6 100644
+index d706b2dfb7b51adcc3e8d85e17e9e7376af52ba6..c2889dc332c6de4f41eb02d1d91198edad4f79a8 100644
 --- a/src/objects/objects.h
 +++ b/src/objects/objects.h
 @@ -794,7 +794,7 @@ enum class KeyCollectionMode {

+ 3 - 3
patches/v8/expose_mksnapshot.patch

@@ -6,14 +6,14 @@ Subject: expose_mksnapshot.patch
 Needed in order to target mksnapshot for mksnapshot zip.
 
 diff --git a/BUILD.gn b/BUILD.gn
-index 912e8cd4955a0f677870ea3784dd35d0a2ee88c8..5469e62e81a8c2390397b0e053499238ee37752d 100644
+index 7ca8f5b1a597e34eb2b6364c37197839941898ae..e980fd0d716d6bdef601d4a93d86cb625a289cf5 100644
 --- a/BUILD.gn
 +++ b/BUILD.gn
-@@ -3812,7 +3812,6 @@ if (current_toolchain == v8_generator_toolchain) {
+@@ -3795,7 +3795,6 @@ if (current_toolchain == v8_generator_toolchain) {
  
  if (v8_use_snapshot && current_toolchain == v8_snapshot_toolchain) {
    v8_executable("mksnapshot") {
 -    visibility = [ ":*" ]  # Only targets in this file can depend on this.
  
      sources = [
-       "src/diagnostics/crash-key-noop.cc",
+       "src/snapshot/embedded/embedded-file-writer.cc",

+ 2 - 2
patches/v8/workaround_an_undefined_symbol_error.patch

@@ -12,10 +12,10 @@ By moving some functions out of the the arm64-assembler header file,
 this error no longer seems to happen.
 
 diff --git a/src/codegen/arm64/assembler-arm64.cc b/src/codegen/arm64/assembler-arm64.cc
-index 8d121db69a54bafd02d4d8594b5cfc3b927b6e3c..440b2635e6bb2b5036d9f1b55eaeca0c3bb82073 100644
+index 159e763ba2602639b4499af7b7869ead58b267d4..ac529e78a8a6ae8cffb0fef26e4bce9f258517ee 100644
 --- a/src/codegen/arm64/assembler-arm64.cc
 +++ b/src/codegen/arm64/assembler-arm64.cc
-@@ -3563,6 +3563,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
+@@ -3564,6 +3564,22 @@ void Assembler::MoveWide(const Register& rd, uint64_t imm, int shift,
         ImmMoveWide(static_cast<int>(imm)) | ShiftMoveWide(shift));
  }
  

+ 6 - 0
script/zip_manifests/dist_zip.mac.x64.manifest

@@ -136,6 +136,12 @@ Electron.app/Contents/Frameworks/Electron Helper.app/Contents/Info.plist
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/PkgInfo
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/Info.plist
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/MacOS/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/MacOS/Electron Helper (GPU)
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/PkgInfo
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/Contents/
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/Contents/Info.plist

+ 6 - 0
script/zip_manifests/dist_zip.mac_mas.x64.manifest

@@ -135,6 +135,12 @@ Electron.app/Contents/Frameworks/Electron Helper.app/Contents/Info.plist
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/MacOS/Electron Helper
 Electron.app/Contents/Frameworks/Electron Helper.app/Contents/PkgInfo
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/Info.plist
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/MacOS/
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/MacOS/Electron Helper (GPU)
+Electron.app/Contents/Frameworks/Electron Helper (GPU).app/Contents/PkgInfo
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/Contents/
 Electron.app/Contents/Frameworks/Electron Helper (Plugin).app/Contents/Info.plist

+ 0 - 4
shell/app/atom_main_delegate.cc

@@ -320,10 +320,6 @@ int AtomMainDelegate::RunProcess(
 }
 
 #if defined(OS_MACOSX)
-bool AtomMainDelegate::ShouldSendMachPort(const std::string& process_type) {
-  return process_type != kRelauncherProcess;
-}
-
 bool AtomMainDelegate::DelaySandboxInitialization(
     const std::string& process_type) {
   return process_type == kRelauncherProcess;

+ 0 - 1
shell/app/atom_main_delegate.h

@@ -34,7 +34,6 @@ class AtomMainDelegate : public content::ContentMainDelegate {
       const std::string& process_type,
       const content::MainFunctionParams& main_function_params) override;
 #if defined(OS_MACOSX)
-  bool ShouldSendMachPort(const std::string& process_type) override;
   bool DelaySandboxInitialization(const std::string& process_type) override;
 #endif
   bool ShouldLockSchemeRegistry() override;

+ 3 - 0
shell/app/atom_main_delegate_mac.mm

@@ -37,6 +37,9 @@ base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
   if (base::EndsWith(path.value(), content::kMacHelperSuffix_renderer,
                      base::CompareCase::SENSITIVE)) {
     helper_name += content::kMacHelperSuffix_renderer;
+  } else if (base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
+                            base::CompareCase::SENSITIVE)) {
+    helper_name += content::kMacHelperSuffix_gpu;
   } else if (base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
                             base::CompareCase::SENSITIVE)) {
     helper_name += content::kMacHelperSuffix_plugin;

+ 0 - 3
shell/app/manifests.cc

@@ -7,7 +7,6 @@
 #include "base/no_destructor.h"
 #include "electron/shell/common/api/api.mojom.h"
 #include "printing/buildflags/buildflags.h"
-#include "services/proxy_resolver/public/cpp/manifest.h"
 #include "services/service_manager/public/cpp/manifest_builder.h"
 
 #if BUILDFLAG(ENABLE_PRINTING)
@@ -39,7 +38,6 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
       service_manager::ManifestBuilder()
           .WithDisplayName("Electron (browser process)")
           .RequireCapability("device", "device:geolocation_control")
-          .RequireCapability("proxy_resolver", "factory")
           .RequireCapability("chrome_printing", "converter")
           .RequireCapability("pdf_compositor", "compositor")
           .ExposeInterfaceFilterCapability_Deprecated(
@@ -53,7 +51,6 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() {
 const std::vector<service_manager::Manifest>&
 GetElectronBuiltinServiceManifests() {
   static base::NoDestructor<std::vector<service_manager::Manifest>> manifests{{
-      MakeOutOfProcess(proxy_resolver::GetManifest()),
 #if BUILDFLAG(ENABLE_PRINTING)
       MakeOutOfProcess(printing::GetPdfCompositorManifest()),
 #endif

+ 1 - 1
shell/browser/api/atom_api_net_log.cc

@@ -92,7 +92,7 @@ v8::Local<v8::Promise> NetLog::StartLogging(mate::Arguments* args) {
 
   // TODO(deepak1556): Provide more flexibility to this module
   // by allowing customizations on the capturing options.
-  auto capture_mode = net::NetLogCaptureMode::Default();
+  auto capture_mode = net::NetLogCaptureMode::kDefault;
   auto max_file_size = network::mojom::NetLogExporter::kUnlimitedFileSize;
 
   base::PostTaskAndReplyWithResult(

+ 4 - 2
shell/browser/api/atom_api_top_level_window.cc

@@ -523,14 +523,16 @@ void TopLevelWindow::SetAlwaysOnTop(bool top, mate::Arguments* args) {
   args->GetNext(&relative_level);
 
   std::string error;
-  window_->SetAlwaysOnTop(top, level, relative_level, &error);
+  ui::ZOrderLevel z_order =
+      top ? ui::ZOrderLevel::kFloatingWindow : ui::ZOrderLevel::kNormal;
+  window_->SetAlwaysOnTop(z_order, level, relative_level, &error);
 
   if (!error.empty())
     args->ThrowError(error);
 }
 
 bool TopLevelWindow::IsAlwaysOnTop() {
-  return window_->IsAlwaysOnTop();
+  return window_->GetZOrderLevel() != ui::ZOrderLevel::kNormal;
 }
 
 void TopLevelWindow::Center() {

+ 5 - 4
shell/browser/api/atom_api_url_request_ns.cc

@@ -7,6 +7,7 @@
 #include <utility>
 
 #include "content/public/browser/storage_partition.h"
+#include "mojo/public/cpp/system/string_data_source.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "shell/browser/api/atom_api_session.h"
@@ -91,7 +92,7 @@ class UploadDataPipeGetter {
 
   void SetPipe(mojo::ScopedDataPipeProducerHandle pipe) {
     request_->producer_ =
-        std::make_unique<mojo::StringDataPipeProducer>(std::move(pipe));
+        std::make_unique<mojo::DataPipeProducer>(std::move(pipe));
     request_->StartWriting();
   }
 
@@ -467,9 +468,9 @@ void URLRequestNS::DoWrite() {
   DCHECK(producer_);
   DCHECK(!pending_writes_.empty());
   producer_->Write(
-      pending_writes_.front(),
-      mojo::StringDataPipeProducer::AsyncWritingMode::
-          STRING_STAYS_VALID_UNTIL_COMPLETION,
+      std::make_unique<mojo::StringDataSource>(
+          pending_writes_.front(), mojo::StringDataSource::AsyncWritingMode::
+                                       STRING_STAYS_VALID_UNTIL_COMPLETION),
       base::BindOnce(&URLRequestNS::OnWrite, weak_factory_.GetWeakPtr()));
 }
 

+ 2 - 2
shell/browser/api/atom_api_url_request_ns.h

@@ -10,7 +10,7 @@
 #include <string>
 #include <vector>
 
-#include "mojo/public/cpp/system/string_data_pipe_producer.h"
+#include "mojo/public/cpp/system/data_pipe_producer.h"
 #include "native_mate/dictionary.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 #include "services/network/public/cpp/simple_url_loader.h"
@@ -109,7 +109,7 @@ class URLRequestNS : public mate::EventEmitter<URLRequestNS>,
 
   // Passed from DataPipeGetter for streaming data.
   network::mojom::DataPipeGetter::ReadCallback size_callback_;
-  std::unique_ptr<mojo::StringDataPipeProducer> producer_;
+  std::unique_ptr<mojo::DataPipeProducer> producer_;
 
   // Whether request.end() has been called.
   bool last_chunk_written_ = false;

+ 22 - 20
shell/browser/atom_browser_client.cc

@@ -93,7 +93,6 @@
 #elif defined(OS_MACOSX)
 #include "net/ssl/client_cert_store_mac.h"
 #include "services/audio/public/mojom/constants.mojom.h"
-#include "services/video_capture/public/mojom/constants.mojom.h"
 #elif defined(USE_OPENSSL)
 #include "net/ssl/client_cert_store.h"
 #endif
@@ -496,21 +495,28 @@ void AtomBrowserClient::AppendExtraCommandLineSwitches(
     int process_id) {
   // Make sure we're about to launch a known executable
   {
+    base::ThreadRestrictions::ScopedAllowIO allow_io;
     base::FilePath child_path;
+    base::FilePath program =
+        base::MakeAbsoluteFilePath(command_line->GetProgram());
 #if defined(OS_MACOSX)
-    int flags = content::ChildProcessHost::CHILD_NORMAL;
-    if (base::EndsWith(command_line->GetProgram().value(),
-                       content::kMacHelperSuffix_renderer,
-                       base::CompareCase::SENSITIVE)) {
-      flags = content::ChildProcessHost::CHILD_RENDERER;
+    auto renderer_child_path = content::ChildProcessHost::GetChildPath(
+        content::ChildProcessHost::CHILD_RENDERER);
+    auto gpu_child_path = content::ChildProcessHost::GetChildPath(
+        content::ChildProcessHost::CHILD_GPU);
+    auto plugin_child_path = content::ChildProcessHost::GetChildPath(
+        content::ChildProcessHost::CHILD_PLUGIN);
+    if (program != renderer_child_path && program != gpu_child_path &&
+        program != plugin_child_path) {
+      child_path = content::ChildProcessHost::GetChildPath(
+          content::ChildProcessHost::CHILD_NORMAL);
+      CHECK_EQ(program, child_path)
+          << "Aborted from launching unexpected helper executable";
     }
-    child_path = content::ChildProcessHost::GetChildPath(flags);
 #else
     base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path);
+    CHECK_EQ(program, child_path);
 #endif
-
-    base::ThreadRestrictions::ScopedAllowIO allow_io;
-    CHECK(base::MakeAbsoluteFilePath(command_line->GetProgram()) == child_path);
   }
 
   std::string process_type =
@@ -568,8 +574,7 @@ void AtomBrowserClient::AdjustUtilityServiceProcessCommandLine(
     const service_manager::Identity& identity,
     base::CommandLine* command_line) {
 #if defined(OS_MACOSX)
-  if (identity.name() == video_capture::mojom::kServiceName ||
-      identity.name() == audio::mojom::kServiceName)
+  if (identity.name() == audio::mojom::kServiceName)
     command_line->AppendSwitch(::switches::kMessageLoopTypeUi);
 #endif
 }
@@ -849,10 +854,7 @@ bool AtomBrowserClient::HandleExternalProtocol(
     bool is_main_frame,
     ui::PageTransition page_transition,
     bool has_user_gesture,
-    network::mojom::URLLoaderFactoryRequest* factory_request,
-    // clang-format off
-    network::mojom::URLLoaderFactory*& out_factory) {  // NOLINT
-  // clang-format on
+    network::mojom::URLLoaderFactoryPtr* out_factory) {
   base::PostTaskWithTraits(
       FROM_HERE, {BrowserThread::UI},
       base::BindOnce(&HandleExternalProtocolInUI, url, web_contents_getter,
@@ -985,7 +987,7 @@ bool AtomBrowserClient::WillCreateURLLoaderFactory(
     bool is_navigation,
     bool is_download,
     const url::Origin& request_initiator,
-    network::mojom::URLLoaderFactoryRequest* factory_request,
+    mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
     network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
     bool* bypass_redirect_checks) {
   content::WebContents* web_contents =
@@ -995,16 +997,16 @@ bool AtomBrowserClient::WillCreateURLLoaderFactory(
   if (!protocol)
     return false;
 
-  auto proxied_request = std::move(*factory_request);
+  auto proxied_receiver = std::move(*factory_receiver);
   network::mojom::URLLoaderFactoryPtrInfo target_factory_info;
-  *factory_request = mojo::MakeRequest(&target_factory_info);
+  *factory_receiver = mojo::MakeRequest(&target_factory_info);
 
   network::mojom::TrustedURLLoaderHeaderClientRequest header_client_request;
   if (header_client)
     header_client_request = mojo::MakeRequest(header_client);
 
   new ProxyingURLLoaderFactory(
-      protocol->intercept_handlers(), std::move(proxied_request),
+      protocol->intercept_handlers(), std::move(proxied_receiver),
       std::move(target_factory_info), std::move(header_client_request));
 
   *bypass_redirect_checks = true;

+ 9 - 12
shell/browser/atom_browser_client.h

@@ -174,19 +174,13 @@ class AtomBrowserClient : public content::ContentBrowserClient,
       bool is_navigation,
       bool is_download,
       const url::Origin& request_initiator,
-      network::mojom::URLLoaderFactoryRequest* factory_request,
+      mojo::PendingReceiver<network::mojom::URLLoaderFactory>* factory_receiver,
       network::mojom::TrustedURLLoaderHeaderClientPtrInfo* header_client,
       bool* bypass_redirect_checks) override;
 #if defined(OS_WIN)
   bool PreSpawnRenderer(sandbox::TargetPolicy* policy) override;
 #endif
 
-  // content::RenderProcessHostObserver:
-  void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
-  void RenderProcessReady(content::RenderProcessHost* host) override;
-  void RenderProcessExited(
-      content::RenderProcessHost* host,
-      const content::ChildProcessTerminationInfo& info) override;
   bool HandleExternalProtocol(
       const GURL& url,
       content::ResourceRequestInfo::WebContentsGetter web_contents_getter,
@@ -195,11 +189,14 @@ class AtomBrowserClient : public content::ContentBrowserClient,
       bool is_main_frame,
       ui::PageTransition page_transition,
       bool has_user_gesture,
-      network::mojom::URLLoaderFactoryRequest* factory_request,
-      // clang-format off
-      network::mojom::URLLoaderFactory*& out_factory)  // NOLINT
-      // clang-format on
-      override;
+      network::mojom::URLLoaderFactoryPtr* out_factory) override;
+
+  // content::RenderProcessHostObserver:
+  void RenderProcessHostDestroyed(content::RenderProcessHost* host) override;
+  void RenderProcessReady(content::RenderProcessHost* host) override;
+  void RenderProcessExited(
+      content::RenderProcessHost* host,
+      const content::ChildProcessTerminationInfo& info) override;
 
  private:
   struct ProcessPreferences {

+ 4 - 4
shell/browser/io_thread.cc

@@ -38,16 +38,16 @@ net::NetLogCaptureMode GetNetCaptureModeFromCommandLine(
     std::string value = command_line.GetSwitchValueASCII(switch_name);
 
     if (value == "Default")
-      return net::NetLogCaptureMode::Default();
+      return net::NetLogCaptureMode::kDefault;
     if (value == "IncludeCookiesAndCredentials")
-      return net::NetLogCaptureMode::IncludeCookiesAndCredentials();
+      return net::NetLogCaptureMode::kIncludeSensitive;
     if (value == "IncludeSocketBytes")
-      return net::NetLogCaptureMode::IncludeSocketBytes();
+      return net::NetLogCaptureMode::kEverything;
 
     LOG(ERROR) << "Unrecognized value for --" << switch_name;
   }
 
-  return net::NetLogCaptureMode::Default();
+  return net::NetLogCaptureMode::kDefault;
 }
 
 }  // namespace

+ 1 - 1
shell/browser/native_window.cc

@@ -128,7 +128,7 @@ void NativeWindow::InitFromOptions(const mate::Dictionary& options) {
   }
   bool top;
   if (options.Get(options::kAlwaysOnTop, &top) && top) {
-    SetAlwaysOnTop(true);
+    SetAlwaysOnTop(ui::ZOrderLevel::kFloatingWindow);
   }
   bool fullscreenable = true;
   bool fullscreen = false;

+ 2 - 2
shell/browser/native_window.h

@@ -123,11 +123,11 @@ class NativeWindow : public base::SupportsUserData,
   virtual bool IsFullScreenable() = 0;
   virtual void SetClosable(bool closable) = 0;
   virtual bool IsClosable() = 0;
-  virtual void SetAlwaysOnTop(bool top,
+  virtual void SetAlwaysOnTop(ui::ZOrderLevel z_order,
                               const std::string& level = "floating",
                               int relativeLevel = 0,
                               std::string* error = nullptr) = 0;
-  virtual bool IsAlwaysOnTop() = 0;
+  virtual ui::ZOrderLevel GetZOrderLevel() = 0;
   virtual void Center() = 0;
   virtual void Invalidate() = 0;
   virtual void SetTitle(const std::string& title) = 0;

+ 2 - 2
shell/browser/native_window_mac.h

@@ -76,11 +76,11 @@ class NativeWindowMac : public NativeWindow {
   bool IsFullScreenable() override;
   void SetClosable(bool closable) override;
   bool IsClosable() override;
-  void SetAlwaysOnTop(bool top,
+  void SetAlwaysOnTop(ui::ZOrderLevel z_order,
                       const std::string& level,
                       int relativeLevel,
                       std::string* error) override;
-  bool IsAlwaysOnTop() override;
+  ui::ZOrderLevel GetZOrderLevel() override;
   void Center() override;
   void Invalidate() override;
   void SetTitle(const std::string& title) override;

+ 4 - 4
shell/browser/native_window_mac.mm

@@ -822,7 +822,7 @@ bool NativeWindowMac::IsClosable() {
   return [window_ styleMask] & NSWindowStyleMaskClosable;
 }
 
-void NativeWindowMac::SetAlwaysOnTop(bool top,
+void NativeWindowMac::SetAlwaysOnTop(ui::ZOrderLevel z_order,
                                      const std::string& level,
                                      int relativeLevel,
                                      std::string* error) {
@@ -830,7 +830,7 @@ void NativeWindowMac::SetAlwaysOnTop(bool top,
   CGWindowLevel maxWindowLevel = CGWindowLevelForKey(kCGMaximumWindowLevelKey);
   CGWindowLevel minWindowLevel = CGWindowLevelForKey(kCGMinimumWindowLevelKey);
 
-  if (top) {
+  if (z_order != ui::ZOrderLevel::kNormal) {
     if (level == "floating") {
       windowLevel = NSFloatingWindowLevel;
     } else if (level == "torn-off-menu") {
@@ -866,8 +866,8 @@ void NativeWindowMac::SetAlwaysOnTop(bool top,
   }
 }
 
-bool NativeWindowMac::IsAlwaysOnTop() {
-  return [window_ level] != NSNormalWindowLevel;
+ui::ZOrderLevel NativeWindowMac::GetZOrderLevel() {
+  return widget()->GetZOrderLevel();
 }
 
 void NativeWindowMac::Center() {

+ 6 - 6
shell/browser/native_window_views.cc

@@ -752,19 +752,19 @@ bool NativeWindowViews::IsClosable() {
 #endif
 }
 
-void NativeWindowViews::SetAlwaysOnTop(bool top,
+void NativeWindowViews::SetAlwaysOnTop(ui::ZOrderLevel z_order,
                                        const std::string& level,
                                        int relativeLevel,
                                        std::string* error) {
-  if (top != widget()->IsAlwaysOnTop())
+  if (z_order != widget()->GetZOrderLevel())
     NativeWindow::NotifyWindowAlwaysOnTopChanged();
 
-  widget()->SetAlwaysOnTop(top);
+  widget()->SetZOrderLevel(z_order);
 
 #if defined(OS_WIN)
   // Reset the placement flag.
   behind_task_bar_ = false;
-  if (top) {
+  if (z_order != ui::ZOrderLevel::kNormal) {
     // On macOS the window is placed behind the Dock for the following levels.
     // Re-use the same names on Windows to make it easier for the user.
     static const std::vector<std::string> levels = {
@@ -775,8 +775,8 @@ void NativeWindowViews::SetAlwaysOnTop(bool top,
   MoveBehindTaskBarIfNeeded();
 }
 
-bool NativeWindowViews::IsAlwaysOnTop() {
-  return widget()->IsAlwaysOnTop();
+ui::ZOrderLevel NativeWindowViews::GetZOrderLevel() {
+  return widget()->GetZOrderLevel();
 }
 
 void NativeWindowViews::Center() {

+ 2 - 2
shell/browser/native_window_views.h

@@ -80,11 +80,11 @@ class NativeWindowViews : public NativeWindow,
   bool IsFullScreenable() override;
   void SetClosable(bool closable) override;
   bool IsClosable() override;
-  void SetAlwaysOnTop(bool top,
+  void SetAlwaysOnTop(ui::ZOrderLevel z_order,
                       const std::string& level,
                       int relativeLevel,
                       std::string* error) override;
-  bool IsAlwaysOnTop() override;
+  ui::ZOrderLevel GetZOrderLevel() override;
   void Center() override;
   void Invalidate() override;
   void SetTitle(const std::string& title) override;

+ 8 - 5
shell/browser/net/asar/asar_url_loader.cc

@@ -13,6 +13,8 @@
 #include "base/task/post_task.h"
 #include "content/public/browser/file_url_loader.h"
 #include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/public/cpp/system/data_pipe_producer.h"
+#include "mojo/public/cpp/system/file_data_source.h"
 #include "net/base/filename_util.h"
 #include "net/base/mime_sniffer.h"
 #include "net/base/mime_util.h"
@@ -226,10 +228,11 @@ class AsarURLLoader : public network::mojom::URLLoader {
     file.Seek(base::File::FROM_BEGIN,
               static_cast<int64_t>(first_byte_to_send) + info.offset);
 
-    data_producer_ = std::make_unique<mojo::FileDataPipeProducer>(
-        std::move(pipe.producer_handle), nullptr);
-    data_producer_->WriteFromFile(
-        std::move(file), total_bytes_to_send,
+    data_producer_ = std::make_unique<mojo::DataPipeProducer>(
+        std::move(pipe.producer_handle));
+    data_producer_->Write(
+        std::make_unique<mojo::FileDataSource>(std::move(file),
+                                               total_bytes_to_send),
         base::BindOnce(&AsarURLLoader::OnFileWritten, base::Unretained(this)));
   }
 
@@ -267,7 +270,7 @@ class AsarURLLoader : public network::mojom::URLLoader {
     MaybeDeleteSelf();
   }
 
-  std::unique_ptr<mojo::FileDataPipeProducer> data_producer_;
+  std::unique_ptr<mojo::DataPipeProducer> data_producer_;
   mojo::Binding<network::mojom::URLLoader> binding_;
   network::mojom::URLLoaderClientPtr client_;
 

+ 9 - 7
shell/browser/net/atom_url_loader_factory.cc

@@ -11,7 +11,8 @@
 #include "base/guid.h"
 #include "content/public/browser/browser_thread.h"
 #include "content/public/browser/storage_partition.h"
-#include "mojo/public/cpp/system/string_data_pipe_producer.h"
+#include "mojo/public/cpp/system/data_pipe_producer.h"
+#include "mojo/public/cpp/system/string_data_source.h"
 #include "net/base/filename_util.h"
 #include "net/http/http_status_code.h"
 #include "services/network/public/cpp/url_loader_completion_status.h"
@@ -141,7 +142,7 @@ network::ResourceResponseHead ToResponseHead(const mate::Dictionary& dict) {
 struct WriteData {
   network::mojom::URLLoaderClientPtr client;
   std::string data;
-  std::unique_ptr<mojo::StringDataPipeProducer> producer;
+  std::unique_ptr<mojo::DataPipeProducer> producer;
 };
 
 void OnWrite(std::unique_ptr<WriteData> write_data, MojoResult result) {
@@ -469,13 +470,14 @@ void AtomURLLoaderFactory::SendContents(
   write_data->client = std::move(client);
   write_data->data = std::move(data);
   write_data->producer =
-      std::make_unique<mojo::StringDataPipeProducer>(std::move(producer));
+      std::make_unique<mojo::DataPipeProducer>(std::move(producer));
 
   base::StringPiece string_piece(write_data->data);
-  write_data->producer->Write(string_piece,
-                              mojo::StringDataPipeProducer::AsyncWritingMode::
-                                  STRING_STAYS_VALID_UNTIL_COMPLETION,
-                              base::BindOnce(OnWrite, std::move(write_data)));
+  write_data->producer->Write(
+      std::make_unique<mojo::StringDataSource>(
+          string_piece, mojo::StringDataSource::AsyncWritingMode::
+                            STRING_STAYS_VALID_UNTIL_COMPLETION),
+      base::BindOnce(OnWrite, std::move(write_data)));
 }
 
 }  // namespace electron

+ 7 - 6
shell/browser/net/node_stream_loader.cc

@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "mojo/public/cpp/system/string_data_source.h"
 #include "shell/common/api/event_emitter_caller.h"
 #include "shell/common/native_mate_converters/callback.h"
 
@@ -60,8 +61,7 @@ void NodeStreamLoader::Start(network::ResourceResponseHead head) {
     return;
   }
 
-  producer_ =
-      std::make_unique<mojo::StringDataPipeProducer>(std::move(producer));
+  producer_ = std::make_unique<mojo::DataPipeProducer>(std::move(producer));
 
   client_->OnReceiveResponse(head);
   client_->OnStartLoadingResponseBody(std::move(consumer));
@@ -102,10 +102,11 @@ void NodeStreamLoader::ReadMore() {
   // Write buffer to mojo pipe asyncronously.
   is_writing_ = true;
   producer_->Write(
-      base::StringPiece(node::Buffer::Data(buffer),
-                        node::Buffer::Length(buffer)),
-      mojo::StringDataPipeProducer::AsyncWritingMode::
-          STRING_STAYS_VALID_UNTIL_COMPLETION,
+      std::make_unique<mojo::StringDataSource>(
+          base::StringPiece(node::Buffer::Data(buffer),
+                            node::Buffer::Length(buffer)),
+          mojo::StringDataSource::AsyncWritingMode::
+              STRING_STAYS_VALID_UNTIL_COMPLETION),
       base::BindOnce(&NodeStreamLoader::DidWrite, weak_factory_.GetWeakPtr()));
 }
 

+ 2 - 2
shell/browser/net/node_stream_loader.h

@@ -11,7 +11,7 @@
 #include <vector>
 
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/system/string_data_pipe_producer.h"
+#include "mojo/public/cpp/system/data_pipe_producer.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "v8/include/v8.h"
 
@@ -64,7 +64,7 @@ class NodeStreamLoader : public network::mojom::URLLoader {
   v8::Global<v8::Value> buffer_;
 
   // Mojo data pipe where the data that is being read is written to.
-  std::unique_ptr<mojo::StringDataPipeProducer> producer_;
+  std::unique_ptr<mojo::DataPipeProducer> producer_;
 
   // Whether we are in the middle of write.
   bool is_writing_ = false;

+ 5 - 5
shell/browser/net/url_pipe_loader.cc

@@ -6,6 +6,7 @@
 
 #include <utility>
 
+#include "mojo/public/cpp/system/string_data_source.h"
 #include "services/network/public/cpp/shared_url_loader_factory.h"
 
 namespace electron {
@@ -67,8 +68,7 @@ void URLPipeLoader::OnResponseStarted(
     return;
   }
 
-  producer_ =
-      std::make_unique<mojo::StringDataPipeProducer>(std::move(producer));
+  producer_ = std::make_unique<mojo::DataPipeProducer>(std::move(producer));
 
   client_->OnReceiveResponse(response_head);
   client_->OnStartLoadingResponseBody(std::move(consumer));
@@ -84,9 +84,9 @@ void URLPipeLoader::OnWrite(base::OnceClosure resume, MojoResult result) {
 void URLPipeLoader::OnDataReceived(base::StringPiece string_piece,
                                    base::OnceClosure resume) {
   producer_->Write(
-      string_piece,
-      mojo::StringDataPipeProducer::AsyncWritingMode::
-          STRING_STAYS_VALID_UNTIL_COMPLETION,
+      std::make_unique<mojo::StringDataSource>(
+          string_piece, mojo::StringDataSource::AsyncWritingMode::
+                            STRING_STAYS_VALID_UNTIL_COMPLETION),
       base::BindOnce(&URLPipeLoader::OnWrite, weak_factory_.GetWeakPtr(),
                      std::move(resume)));
 }

+ 2 - 2
shell/browser/net/url_pipe_loader.h

@@ -10,7 +10,7 @@
 #include <vector>
 
 #include "mojo/public/cpp/bindings/strong_binding.h"
-#include "mojo/public/cpp/system/string_data_pipe_producer.h"
+#include "mojo/public/cpp/system/data_pipe_producer.h"
 #include "services/network/public/cpp/simple_url_loader.h"
 #include "services/network/public/cpp/simple_url_loader_stream_consumer.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
@@ -69,7 +69,7 @@ class URLPipeLoader : public network::mojom::URLLoader,
   mojo::Binding<network::mojom::URLLoader> binding_;
   network::mojom::URLLoaderClientPtr client_;
 
-  std::unique_ptr<mojo::StringDataPipeProducer> producer_;
+  std::unique_ptr<mojo::DataPipeProducer> producer_;
   std::unique_ptr<network::SimpleURLLoader> loader_;
 
   base::WeakPtrFactory<URLPipeLoader> weak_factory_;

+ 1 - 1
shell/browser/printing/print_preview_message_handler.h

@@ -9,7 +9,7 @@
 
 #include "base/memory/ref_counted_memory.h"
 #include "base/memory/weak_ptr.h"
-#include "components/services/pdf_compositor/public/interfaces/pdf_compositor.mojom.h"
+#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
 #include "content/public/browser/web_contents_observer.h"
 #include "content/public/browser/web_contents_user_data.h"
 #include "shell/common/promise_util.h"

+ 4 - 4
shell/browser/ui/drag_util_views.cc

@@ -21,17 +21,17 @@ void DragFileItems(const std::vector<base::FilePath>& files,
                    const gfx::Image& icon,
                    gfx::NativeView view) {
   // Set up our OLE machinery
-  ui::OSExchangeData data;
+  auto data = std::make_unique<ui::OSExchangeData>();
 
   button_drag_utils::SetDragImage(
       GURL(), files[0].LossyDisplayName(), icon.AsImageSkia(), nullptr,
-      *views::Widget::GetTopLevelWidgetForNativeView(view), &data);
+      *views::Widget::GetTopLevelWidgetForNativeView(view), data.get());
 
   std::vector<ui::FileInfo> file_infos;
   for (const base::FilePath& file : files) {
     file_infos.push_back(ui::FileInfo(file, base::FilePath()));
   }
-  data.SetFilenames(file_infos);
+  data->SetFilenames(file_infos);
 
   aura::Window* root_window = view->GetRootWindow();
   if (!root_window || !aura::client::GetDragDropClient(root_window))
@@ -41,7 +41,7 @@ void DragFileItems(const std::vector<base::FilePath>& files,
   // TODO(varunjain): Properly determine and send DRAG_EVENT_SOURCE below.
   aura::client::GetDragDropClient(root_window)
       ->StartDragAndDrop(
-          data, root_window, view, location,
+          std::move(data), root_window, view, location,
           ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_LINK,
           ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE);
 }

+ 1 - 0
shell/browser/ui/views/autofill_popup_view.cc

@@ -74,6 +74,7 @@ void AutofillPopupView::Show() {
     views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
     params.delegate = this;
     params.parent = parent_widget_->GetNativeView();
+    params.z_order = ui::ZOrderLevel::kFloatingUIElement;
     widget->Init(params);
 
     // No animation for popup appearance (too distracting).

+ 1 - 0
shell/browser/ui/win/notify_icon.cc

@@ -166,6 +166,7 @@ void NotifyIcon::PopUpContextMenu(const gfx::Point& pos,
       views::Widget::InitParams::Ownership::WIDGET_OWNS_NATIVE_WIDGET;
   params.bounds = gfx::Rect(0, 0, 0, 0);
   params.force_software_compositing = true;
+  params.z_order = ui::ZOrderLevel::kFloatingUIElement;
 
   widget_->Init(params);
 

+ 2 - 0
shell/common/mac/main_application_bundle.mm

@@ -34,6 +34,8 @@ base::FilePath MainApplicationBundlePath() {
       (base::EndsWith(path.value(), " Helper", base::CompareCase::SENSITIVE) ||
        base::EndsWith(path.value(), content::kMacHelperSuffix_renderer,
                       base::CompareCase::SENSITIVE) ||
+       base::EndsWith(path.value(), content::kMacHelperSuffix_gpu,
+                      base::CompareCase::SENSITIVE) ||
        base::EndsWith(path.value(), content::kMacHelperSuffix_plugin,
                       base::CompareCase::SENSITIVE))) {
     // The running executable is the helper. Go up five steps:

+ 13 - 31
shell/utility/atom_content_utility_client.cc

@@ -7,12 +7,13 @@
 #include <utility>
 
 #include "base/command_line.h"
+#include "base/no_destructor.h"
 #include "base/threading/sequenced_task_runner_handle.h"
 #include "content/public/child/child_thread.h"
 #include "content/public/common/service_manager_connection.h"
 #include "content/public/common/simple_connection_filter.h"
 #include "content/public/utility/utility_thread.h"
-#include "services/proxy_resolver/proxy_resolver_service.h"
+#include "services/proxy_resolver/proxy_resolver_factory_impl.h"
 #include "services/proxy_resolver/public/mojom/proxy_resolver.mojom.h"
 #include "services/service_manager/public/cpp/service.h"
 #include "services/service_manager/sandbox/switches.h"
@@ -21,7 +22,7 @@
 #include "chrome/services/printing/printing_service.h"
 #include "chrome/services/printing/public/mojom/constants.mojom.h"
 #include "components/services/pdf_compositor/public/cpp/pdf_compositor_service_factory.h"
-#include "components/services/pdf_compositor/public/interfaces/pdf_compositor.mojom.h"
+#include "components/services/pdf_compositor/public/mojom/pdf_compositor.mojom.h"
 
 #if defined(OS_WIN)
 #include "chrome/services/printing/pdf_to_emf_converter_factory.h"
@@ -41,29 +42,6 @@ void RunServiceAsyncThenTerminateProcess(
       base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
 }
 
-std::unique_ptr<service_manager::Service> CreateProxyResolverService(
-    service_manager::mojom::ServiceRequest request) {
-  return std::make_unique<proxy_resolver::ProxyResolverService>(
-      std::move(request));
-}
-
-using ServiceFactory =
-    base::OnceCallback<std::unique_ptr<service_manager::Service>()>;
-void RunServiceOnIOThread(ServiceFactory factory) {
-  base::OnceClosure terminate_process = base::BindOnce(
-      base::IgnoreResult(&base::SequencedTaskRunner::PostTask),
-      base::SequencedTaskRunnerHandle::Get(), FROM_HERE,
-      base::BindOnce([] { content::UtilityThread::Get()->ReleaseProcess(); }));
-  content::ChildThread::Get()->GetIOTaskRunner()->PostTask(
-      FROM_HERE,
-      base::BindOnce(
-          [](ServiceFactory factory, base::OnceClosure terminate_process) {
-            service_manager::Service::RunAsyncUntilTermination(
-                std::move(factory).Run(), std::move(terminate_process));
-          },
-          std::move(factory), std::move(terminate_process)));
-}
-
 }  // namespace
 
 AtomContentUtilityClient::AtomContentUtilityClient() : elevated_(false) {
@@ -124,12 +102,6 @@ bool AtomContentUtilityClient::OnMessageReceived(const IPC::Message& message) {
 bool AtomContentUtilityClient::HandleServiceRequest(
     const std::string& service_name,
     service_manager::mojom::ServiceRequest request) {
-  if (service_name == proxy_resolver::mojom::kProxyResolverServiceName) {
-    RunServiceOnIOThread(
-        base::BindOnce(&CreateProxyResolverService, std::move(request)));
-    return true;
-  }
-
   auto service = MaybeCreateMainThreadService(service_name, std::move(request));
   if (service) {
     RunServiceAsyncThenTerminateProcess(std::move(service));
@@ -139,6 +111,16 @@ bool AtomContentUtilityClient::HandleServiceRequest(
   return false;
 }
 
+void AtomContentUtilityClient::RunIOThreadService(
+    mojo::GenericPendingReceiver* receiver) {
+  if (auto factory_receiver =
+          receiver->As<proxy_resolver::mojom::ProxyResolverFactory>()) {
+    static base::NoDestructor<proxy_resolver::ProxyResolverFactoryImpl> factory(
+        std::move(factory_receiver));
+    return;
+  }
+}
+
 std::unique_ptr<service_manager::Service>
 AtomContentUtilityClient::MaybeCreateMainThreadService(
     const std::string& service_name,

+ 1 - 0
shell/utility/atom_content_utility_client.h

@@ -29,6 +29,7 @@ class AtomContentUtilityClient : public content::ContentUtilityClient {
   bool HandleServiceRequest(
       const std::string& service_name,
       service_manager::mojom::ServiceRequest request) override;
+  void RunIOThreadService(mojo::GenericPendingReceiver* receiver) override;
 
  private:
   std::unique_ptr<service_manager::Service> MaybeCreateMainThreadService(