Browse Source

chore: bump chromium to 78.0.3905.1 (7-0-x) (#20062)

* chore: bump chromium in DEPS to 78.0.3899.1

* chore: bump chromium in DEPS to 78.0.3900.1

* chore: bump chromium in DEPS to 78.0.3900.2

* chore: bump chromium in DEPS to 78.0.3901.1

* chore: bump chromium in DEPS to 78.0.3902.1

* chore: remove tts.patch

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

* build: disable widevine cdm component

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

* chore: bump chromium in DEPS to 78.0.3903.1

* build: redo network_context.h mojification

https://chromium.googlesource.com/chromium/src/+/187df411f2d636fe373764c7cf6b79f2aa50fa13%5E%21/#F7

* build: disable widevine

Disable widevine, atleast for the moment by deleting the patch and removing
the build argument.

> At the moment its horribly broken, we would have to look into fixing on all
> three platforms now that upstream also supports linux.

* chore: bump chromium in DEPS to 78.0.3904.1

* update pepper_flash.patch

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

* chore: bump chromium in DEPS to 78.0.3905.1

* Update patches

* Convert Web Speech Synthesis API over to Mojo

https://chromium-review.googlesource.com/c/chromium/src/+/1717595
(cherry picked from commit e0163b0185cb49a523d6dd55612934b906717624)

* Update patches

* CookieInclusionStatus: Support warnings and multiple exclusion reasons

https://chromium-review.googlesource.com/c/chromium/src/+/1756157
(cherry picked from commit ab2f5ac40ba28e74dc15df2f13a599017749807d)

* Pass request_unadjusted_movement to lock mouse

https://chromium-review.googlesource.com/c/chromium/src/+/1767098
(cherry picked from commit a17daff6f1371ff5bd7671a2492bfdd99b5437f3)

* chore: rename thread_pool to thread_pool_instance

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/1773663
(cherry picked from commit 8547b09de8cb45777324a6348878dd922a51b2c0)

* Remove the typemap from network::mojom::URLResponseHead.

https://chromium-review.googlesource.com/c/chromium/src/+/1758653
(cherry picked from commit a768ad210dd9d56dc870a95b14d8b5531872960c)

* ServiceWorker: Make Extension WebRequestAPI aware of service worker update check script requests

https://chromium-review.googlesource.com/c/chromium/src/+/1782230
(cherry picked from commit 615d33517aeb2ec2218176f33f97474a8f695c67)

* Convert CertVerifierClient to new Mojo types

https://bugs.chromium.org/p/chromium/issues/detail?id=955171
(cherry picked from commit ac5e8dbce57ddc5d25a0c0b4c3000863dfe104b5)

* Convert DataPipeGetterPtr and DataPipeGetterRequest to new Mojo types

https://chromium-review.googlesource.com/c/chromium/src/+/1787760
https://chromium-review.googlesource.com/c/chromium/src/+/1787659
(cherry picked from commit 8611783898e9b2a6b989bbc68c6aa940c9287f74)

* Add tts patch

* build: fix compilation with MSSTL

(cherry picked from commit 4d8cb7de9bc8b7ea5982b6277ea16e6c3e09ecdb)
Electron Bot 5 years ago
parent
commit
0a0d7a8202
47 changed files with 274 additions and 379 deletions
  1. 1 1
      DEPS
  2. 0 4
      chromium_src/BUILD.gn
  3. 1 1
      patches/chromium/.patches
  4. 2 2
      patches/chromium/add_realloc.patch
  5. 3 3
      patches/chromium/blink_local_frame.patch
  6. 2 2
      patches/chromium/blink_world_context.patch
  7. 2 2
      patches/chromium/build_add_electron_tracing_category.patch
  8. 3 3
      patches/chromium/build_gn.patch
  9. 5 5
      patches/chromium/can_create_window.patch
  10. 2 2
      patches/chromium/content_browser_main_loop.patch
  11. 1 1
      patches/chromium/dcheck.patch
  12. 1 1
      patches/chromium/disable-redraw-lock.patch
  13. 5 5
      patches/chromium/disable_color_correct_rendering.patch
  14. 3 3
      patches/chromium/disable_hidden.patch
  15. 2 2
      patches/chromium/disable_user_gesture_requirement_for_beforeunload_dialogs.patch
  16. 0 22
      patches/chromium/enable_widevine.patch
  17. 2 2
      patches/chromium/exclude-a-few-test-files-from-build.patch
  18. 8 8
      patches/chromium/expose_setuseragent_on_networkcontext.patch
  19. 3 3
      patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch
  20. 4 4
      patches/chromium/frame_host_manager.patch
  21. 16 16
      patches/chromium/mas_no_private_api.patch
  22. 53 0
      patches/chromium/net_avoid_vector_const_elements.patch
  23. 28 22
      patches/chromium/network_service_allow_remote_certificate_verification_logic.patch
  24. 4 4
      patches/chromium/notification_provenance.patch
  25. 6 6
      patches/chromium/pepper_flash.patch
  26. 13 13
      patches/chromium/printing.patch
  27. 5 5
      patches/chromium/render_widget_host_view_base.patch
  28. 6 6
      patches/chromium/render_widget_host_view_mac.patch
  29. 2 2
      patches/chromium/scroll_bounce_flag.patch
  30. 3 3
      patches/chromium/ssl_security_state_tab_helper.patch
  31. 2 2
      patches/chromium/support_mixed_sandbox_with_zygote.patch
  32. 1 1
      patches/chromium/sysroot.patch
  33. 1 143
      patches/chromium/tts.patch
  34. 4 4
      patches/chromium/web_contents.patch
  35. 10 10
      patches/chromium/worker_context_will_destroy.patch
  36. 1 1
      shell/app/node_main.cc
  37. 33 28
      shell/browser/api/atom_api_cookies.cc
  38. 8 5
      shell/browser/api/atom_api_session.cc
  39. 1 6
      shell/browser/atom_browser_client.cc
  40. 1 0
      shell/browser/net/asar/asar_url_loader.cc
  41. 1 0
      shell/browser/net/node_stream_loader.h
  42. 13 5
      shell/browser/net/proxying_url_loader_factory.cc
  43. 9 3
      shell/browser/net/proxying_url_loader_factory.h
  44. 2 1
      shell/browser/osr/osr_render_widget_host_view.cc
  45. 1 1
      shell/browser/osr/osr_render_widget_host_view.h
  46. 0 14
      shell/renderer/renderer_client_base.cc
  47. 0 2
      shell/renderer/renderer_client_base.h

+ 1 - 1
DEPS

@@ -11,7 +11,7 @@ gclient_gn_args = [
 
 vars = {
   'chromium_version':
-    '78.0.3896.6',
+    '78.0.3905.1',
   'node_version':
     'v12.8.1',
   'nan_version':

+ 0 - 4
chromium_src/BUILD.gn

@@ -135,10 +135,6 @@ static_library("chrome") {
     sources += [
       "//chrome/browser/speech/tts_controller_delegate_impl.cc",
       "//chrome/browser/speech/tts_controller_delegate_impl.h",
-      "//chrome/browser/speech/tts_message_filter.cc",
-      "//chrome/browser/speech/tts_message_filter.h",
-      "//chrome/renderer/tts_dispatcher.cc",
-      "//chrome/renderer/tts_dispatcher.h",
     ]
   }
 

+ 1 - 1
patches/chromium/.patches

@@ -36,7 +36,6 @@ mas-cgdisplayusesforcetogray.patch
 mas-audiodeviceduck.patch
 mas-lssetapplicationlaunchservicesserverconnectionstatus.patch
 ignore_rc_check.patch
-enable_widevine.patch
 chrome_key_systems.patch
 allow_nested_error_trackers.patch
 blink_initialization_order.patch
@@ -78,3 +77,4 @@ allow_new_privileges_in_unsandboxed_child_processes.patch
 ssl_security_state_tab_helper.patch
 revert_cleanup_remove_menu_subtitles_sublabels.patch
 expose_setuseragent_on_networkcontext.patch
+net_avoid_vector_const_elements.patch

+ 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 b747d8afba334747787485582d89cd5599b7b8ae..581c2ffce679dd131e8b8af86f3d3a9a89485e78 100644
+index 3eeafca490b1fbbedc2c16f203a4ac28b23da675..fee684296357c2c3af7395bdd17ac8b8445f55c4 100644
 --- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
 +++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
-@@ -641,6 +641,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
+@@ -647,6 +647,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
          size, WTF::ArrayBufferContents::kDontInitialize);
    }
  

+ 3 - 3
patches/chromium/blink_local_frame.patch

@@ -14,10 +14,10 @@ when there is code doing that.
 This patch reverts the change to fix the crash in Electron.
 
 diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
-index 1673685187012698768445d38dcda90e084f8cde..00edb7945956ff7ce62da73499fd85d3ebac4d95 100644
+index 52f56794f2ed1cd027bccf0f1c284b138052fe99..13029678e052af1a6c7a8d0f8655fc9852eedf84 100644
 --- a/third_party/blink/renderer/core/frame/local_frame.cc
 +++ b/third_party/blink/renderer/core/frame/local_frame.cc
-@@ -335,10 +335,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -338,10 +338,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
    }
    CHECK(!view_ || !view_->IsAttached());
  
@@ -28,7 +28,7 @@ index 1673685187012698768445d38dcda90e084f8cde..00edb7945956ff7ce62da73499fd85d3
    if (!Client())
      return;
  
-@@ -356,6 +352,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
+@@ -359,6 +355,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
    // Notify ScriptController that the frame is closing, since its cleanup ends
    // up calling back to LocalFrameClient via WindowProxy.
    GetScriptController().ClearForClose();

+ 2 - 2
patches/chromium/blink_world_context.patch

@@ -19,10 +19,10 @@ index a781a44399a31f048419311d2317229c912752c2..131c0dcb125b00215e3ad469c11c4b47
    // 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 cb07cda4464d3d5a2ad59bf9fb03921e4bdedae2..6278cf7ee5d404de40114dbe87350eb8acc08289 100644
+index d1f07949b2049924ca34d07ac9384da6d5f790ad..ad66990c0389ffb5306d2f3c847b78d190d113c0 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
-@@ -874,6 +874,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
+@@ -877,6 +877,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
    return MainWorldScriptContext()->Global();
  }
  

+ 2 - 2
patches/chromium/build_add_electron_tracing_category.patch

@@ -8,10 +8,10 @@ categories in use are known / declared.  This patch is required for us
 to introduce a new Electron category for Electron-specific tracing.
 
 diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
-index b50d4123e44ddee34af0b07bfe5d067c4ccc5809..3e2c639a067fb76848783f35ec112a380da2353e 100644
+index 6717a2bd93b7bec89934bb3e70cdfb5461dcc29b..ca2bd030d1f46b1a7294883e30274cd0da2e7f49 100644
 --- a/base/trace_event/builtin_categories.h
 +++ b/base/trace_event/builtin_categories.h
-@@ -61,6 +61,7 @@
+@@ -62,6 +62,7 @@
    X("dwrite")                                                            \
    X("DXVA Decoding")                                                     \
    X("EarlyJava")                                                         \

+ 3 - 3
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 59ab7810e71916e8f0f2d69f06e3c2c3ebc99030..b144e800c94956429ca85fc0aefe6539a6246e4b 100644
+index f89e7e831b79f82bd11a5dd8cee6ab49d8de724e..f8a611bf0676ce323cdbb5d639333df9875dd0ca 100644
 --- a/build/config/BUILDCONFIG.gn
 +++ b/build/config/BUILDCONFIG.gn
 @@ -123,6 +123,9 @@ if (current_os == "") {
@@ -18,8 +18,8 @@ index 59ab7810e71916e8f0f2d69f06e3c2c3ebc99030..b144e800c94956429ca85fc0aefe6539
    # Set to enable the official build level of optimization. This has nothing
    # to do with branding, but enables an additional level of optimization above
    # release (!is_debug). This might be better expressed as a tri-state
-@@ -437,6 +440,7 @@ default_compiler_configs = [
-   "//build/config/compiler:thin_archive",
+@@ -438,6 +441,7 @@ default_compiler_configs = [
+   "//build/config/compiler:default_init_stack_vars",
    "//build/config/coverage:default_coverage",
    "//build/config/sanitizers:default_sanitizer_flags",
 +  "//electron/build/config:mas_build",

+ 5 - 5
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 f55a98595f30f718d238e0a873c9ec82610b8a41..d1369e7dbf71414905531a0b49eb9459772951e8 100644
+index 54be9df87a81f517ed9d324d261caffed36f0a36..88f8ced32c79ca7a6b173636002f3e2d1b1e491f 100644
 --- a/content/browser/frame_host/render_frame_host_impl.cc
 +++ b/content/browser/frame_host/render_frame_host_impl.cc
-@@ -3947,6 +3947,7 @@ void RenderFrameHostImpl::CreateNewWindow(
+@@ -3963,6 +3963,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,7 +17,7 @@ index f55a98595f30f718d238e0a873c9ec82610b8a41..d1369e7dbf71414905531a0b49eb9459
            &no_javascript_access);
  
 diff --git a/content/common/frame.mojom b/content/common/frame.mojom
-index e227f780d720a80a13699f475757142571094cd1..6984f69e6f9a0d3058b0054df8a3aa9d46f14dbd 100644
+index 79660bebe2f881293983498fd800feae568da086..2ef392a25d34275ce083aaf88319faeb5a198700 100644
 --- a/content/common/frame.mojom
 +++ b/content/common/frame.mojom
 @@ -299,6 +299,10 @@ struct CreateNewWindowParams {
@@ -45,7 +45,7 @@ index 3e5ebb5c71ba2b6a3cc0f914e10c64dce06d6088..d51d21fbd09cfa2c017f85ab96c1156a
      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 0c80d202fe984fc8b799571a288ad7005c75afeb..6767853c179179c546bbaa6fd07ade7db9c40a82 100644
+index dcb77c78114699a0017a305f140f4322d271ff83..aeb22701d036c54cb495540847e333b380350e8a 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -178,6 +178,7 @@ class RenderFrameHost;
@@ -66,7 +66,7 @@ index 0c80d202fe984fc8b799571a288ad7005c75afeb..6767853c179179c546bbaa6fd07ade7d
        bool opener_suppressed,
        bool* no_javascript_access);
 diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
-index cc63d162b378f328e1799d69c6762363f3227457..2e8eea0451b16125a75b2b3dc14be807e4413070 100644
+index b48225c1a805fcdcdea656a638407b154fa29b37..98e60cd94ce13130b81d1553c8ee4f9bbfea76ed 100644
 --- a/content/renderer/render_view_impl.cc
 +++ b/content/renderer/render_view_impl.cc
 @@ -73,6 +73,7 @@

+ 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 d97e75b486252348deb30a14f95f668728fab15b..0700cb7ef1eefdb661e46652e239f3aef86d29ea 100644
+index 3f0931ad906f4a3431ab78c9a11eaf7e32cbdebb..6da438a20802e290d5c3ef5593e2c1eed2b0db5f 100644
 --- a/content/browser/browser_main_loop.cc
 +++ b/content/browser/browser_main_loop.cc
-@@ -1483,7 +1483,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
+@@ -1505,7 +1505,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
    NOTREACHED();
  #else
    base::RunLoop run_loop;

+ 1 - 1
patches/chromium/dcheck.patch

@@ -17,7 +17,7 @@ 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 cb86fa407c6f084070841ef65db9b31f264706d3..5d5ddcb77ba102489182c44e9580d750450f899f 100644
+index 3f207fcfce857692febe79df7b9ba4afb594270d..fe40d01779685ab86d5ddb3e4f5193ad89305f87 100644
 --- a/content/browser/frame_host/navigation_controller_impl.cc
 +++ b/content/browser/frame_host/navigation_controller_impl.cc
 @@ -1210,8 +1210,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(

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

@@ -15,7 +15,7 @@ the redraw locking mechanism, which fixes these issues. The electron issue
 can be found at https://github.com/electron/electron/issues/1821
 
 diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
-index 8cde33ad0e4e81534f3e808aa37f7135fb994719..743c7d2ae18cc17e509ffa253dc25c64762d8902 100644
+index 67202004ea3a765dcbe92385abac8d5bd17e15b0..77b9204e6bd50fd25fdf0edb276489fe67e4fcac 100644
 --- a/ui/views/win/hwnd_message_handler.cc
 +++ b/ui/views/win/hwnd_message_handler.cc
 @@ -331,6 +331,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;

+ 5 - 5
patches/chromium/disable_color_correct_rendering.patch

@@ -20,7 +20,7 @@ to deal with color spaces. That is being tracked at
 https://crbug.com/634542 and https://crbug.com/711107.
 
 diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
-index 8fdcc4194291910c42c103b77cf4e8267b81f566..1ad01316f2e5aca2bdd3c2ce752bd5a478a920ee 100644
+index ea0dfd54283746e84f2a14108d50b5203bc6f6d8..b1d82cb13c78b1a9e0049ba73fc36aa1bfdd874b 100644
 --- a/cc/trees/layer_tree_settings.h
 +++ b/cc/trees/layer_tree_settings.h
 @@ -95,6 +95,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -203,7 +203,7 @@ index 8c67161c4a4b970fb9393a9a73a239b5aecb95cf..99ea5a9832aca67030e92e4761209872
 +
 +#undef PATCH_CS
 diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
-index 350e8aa2ed6cb7b5725b23795a25edc710b3c6be..4c6e78f9dba1e607bee61842a884201ad085cfbe 100644
+index 8ecb551119ccdbe8e8582c7005824073187cb600..f31208b13bf2e30656bf5696f507e3ac2cb25229 100644
 --- a/content/browser/gpu/gpu_process_host.cc
 +++ b/content/browser/gpu/gpu_process_host.cc
 @@ -193,6 +193,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -215,7 +215,7 @@ index 350e8aa2ed6cb7b5725b23795a25edc710b3c6be..4c6e78f9dba1e607bee61842a884201a
      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 299acbb8973f8b603575b006cfd1d296869f7c2a..32e4c105256e5d1a8930766433f8c1b28d88166d 100644
+index 2336db9feacf5d96107155659611f64297040eac..7f89c9e3141dfa5fe88410b138d138108b8ec6ff 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 @@
@@ -235,10 +235,10 @@ index 299acbb8973f8b603575b006cfd1d296869f7c2a..32e4c105256e5d1a8930766433f8c1b2
      network::switches::kExplicitlyAllowedPorts,
      service_manager::switches::kDisableInProcessStackTraces,
 diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
-index f15823dd27ae8f91257afd8ae81a9c3915c50059..c8d239ff9a5a66f02248ef6b9e202e7c347c356c 100644
+index 1598494eb013868e2ad8b6ce8aa32742e5819ae3..0fcd5dd582ffaea0b4c3867809529c4ab900f1be 100644
 --- a/content/renderer/render_widget.cc
 +++ b/content/renderer/render_widget.cc
-@@ -2861,6 +2861,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
+@@ -2846,6 +2846,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
    settings.main_frame_before_activation_enabled =
        cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
  

+ 3 - 3
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 3925586d55cb79a26b231781a821c510dfe17bd4..1ccff96eccde8dbff2b972d53c05486fb160c5db 100644
+index cfa68bf03b9934c8d83b7d81932a21300884345e..29603fc302f32765deaebbd6199a9e460372cbb9 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.cc
 +++ b/content/browser/renderer_host/render_widget_host_impl.cc
-@@ -675,6 +675,9 @@ void RenderWidgetHostImpl::WasHidden() {
+@@ -676,6 +676,9 @@ void RenderWidgetHostImpl::WasHidden() {
    if (is_hidden_)
      return;
  
@@ -19,7 +19,7 @@ index 3925586d55cb79a26b231781a821c510dfe17bd4..1ccff96eccde8dbff2b972d53c05486f
  
    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 ef6276238004ff6e12de90d03be1f720c1ac266c..b8d981a45edb22a60cc439e881a4bc81854b35cd 100644
+index a3f9a2d865cc9b81806e03388a82f9bc9c22ee9d..960946f6e32cf60827e38961681c104363163046 100644
 --- a/content/browser/renderer_host/render_widget_host_impl.h
 +++ b/content/browser/renderer_host/render_widget_host_impl.h
 @@ -183,6 +183,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl

+ 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 6a99225ce1f53582c1ce578f9ae7f5eb40544b95..05f9d5da2b819b0f15fe021dccaeff9480aaa827 100644
+index 5635284986003f6abb288f0dcf04c333ecd0f146..4c048f1af5a96cfdcaa64452feff5d3dacdce06a 100644
 --- a/third_party/blink/renderer/core/dom/document.cc
 +++ b/third_party/blink/renderer/core/dom/document.cc
-@@ -4139,7 +4139,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
+@@ -4197,7 +4197,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);

+ 0 - 22
patches/chromium/enable_widevine.patch

@@ -1,22 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Aleksei Kuzmin <[email protected]>
-Date: Thu, 20 Sep 2018 17:50:03 -0700
-Subject: enable_widevine.patch
-
-Turns `enable_widevine` flag on by default on Mac and Windows.
-Electron needs that flag to be enabled on those paltforms,
-but there's no way to conditionally set it during a `gn gen` call.
-
-diff --git a/third_party/widevine/cdm/widevine.gni b/third_party/widevine/cdm/widevine.gni
-index 1fe47e92ffb1442159ead7b696884bc8cc4bda83..72b39b83789cd1f67e10c743a3e729420c9b72ed 100644
---- a/third_party/widevine/cdm/widevine.gni
-+++ b/third_party/widevine/cdm/widevine.gni
-@@ -10,7 +10,7 @@ declare_args() {
-   # on Android.
-   # Can be optionally enabled in Chromium on non-Android platforms. Please see
-   # //src/third_party/widevine/LICENSE file for details.
--  enable_widevine = is_chrome_branded || is_android
-+  enable_widevine = is_chrome_branded || is_android || is_mac || is_win
- }
- 
- # Widevine CDM is available as a library CDM on the following platforms and

+ 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 a4d738446b0cc23397adc4cf9518ff96f378e35a..4d643c011d17c63db33a39d0b4e5aa4c2ee435fa 100644
+index f579983f844c07e4feb52ebab1b26ad2cee4bc43..cd08db785ffa8f8df5e4a558ae93ef0451289245 100644
 --- a/third_party/blink/renderer/platform/BUILD.gn
 +++ b/third_party/blink/renderer/platform/BUILD.gn
-@@ -1746,7 +1746,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
+@@ -1758,7 +1758,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",

+ 8 - 8
patches/chromium/expose_setuseragent_on_networkcontext.patch

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
    DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
  };
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index 13fcd399516c7c26cf89a15dda083faea97ea969..7feed6ef9374d37430584f58272790e0e801f148 100644
+index 96f99d73d7043a6fe98569aa7b8deddeb2ac9b6c..79a37775ecba02c137bb9842e285185d6fc8dbc0 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -1095,6 +1095,13 @@ void NetworkContext::SetNetworkConditions(
+@@ -1103,6 +1103,13 @@ void NetworkContext::SetNetworkConditions(
                                        std::move(network_conditions));
  }
  
@@ -51,10 +51,10 @@ index 13fcd399516c7c26cf89a15dda083faea97ea969..7feed6ef9374d37430584f58272790e0
    // This may only be called on NetworkContexts created with the constructor
    // that calls MakeURLRequestContext().
 diff --git a/services/network/network_context.h b/services/network/network_context.h
-index f765e5e232de56f070d404e16149abd6627159cd..ce9955126f84f0cd7c7b7961c6dc6f0709359b17 100644
+index 8e140617acc891ad51bf98c80d49a1255cb08af6..a662dfc7104df48cdb71d91a9227ddeb8cf81590 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
-@@ -214,6 +214,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -218,6 +218,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
    void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
                              mojom::NetworkConditionsPtr conditions) override;
@@ -63,10 +63,10 @@ index f765e5e232de56f070d404e16149abd6627159cd..ce9955126f84f0cd7c7b7961c6dc6f07
    void SetEnableReferrers(bool enable_referrers) override;
  #if defined(OS_CHROMEOS)
 diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
-index 4e21a1276d83ce0154aa06e169e4b4394d215164..79b2088852fc9d930935e86de029d654749e7d6a 100644
+index 99ad77ca1b97b9e618bb2ad4b108bb892ed5e9d7..289fb533afe44475ee4236bd6e61301eb978a358 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -859,6 +859,9 @@ interface NetworkContext {
+@@ -886,6 +886,9 @@ interface NetworkContext {
    SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
                         NetworkConditions? conditions);
  
@@ -77,10 +77,10 @@ index 4e21a1276d83ce0154aa06e169e4b4394d215164..79b2088852fc9d930935e86de029d654
    SetAcceptLanguage(string new_accept_language);
  
 diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
-index 0608e512432bc3426714d78bddd87bf537ddebae..7bed7ebc5e52660fff7cb6b93a618e0a16376ab8 100644
+index 34a8050d5900534663c285028eb42720a5bc8621..e5e361cd197d5080761d07a18f8af6727b395015 100644
 --- a/services/network/test/test_network_context.h
 +++ b/services/network/test/test_network_context.h
-@@ -94,6 +94,7 @@ class TestNetworkContext : public mojom::NetworkContext {
+@@ -95,6 +95,7 @@ class TestNetworkContext : public mojom::NetworkContext {
    void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
    void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
                              mojom::NetworkConditionsPtr conditions) override {}

+ 3 - 3
patches/chromium/feat_offscreen_rendering_with_viz_compositor.patch

@@ -508,7 +508,7 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
 +  Draw(gfx.mojom.Rect damage_rect) => ();
  };
 diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
-index 359e7d21a4a5e7acaed9bd7f42f40019e650a182..cd90aab9d3a7b5335c829d964d92e3fa62401408 100644
+index ff4562c024be6bc6eb2b975b3a13c6139b89f88e..22ed4f873266143310bf5ef55df3df2a8b9aea93 100644
 --- a/ui/compositor/compositor.h
 +++ b/ui/compositor/compositor.h
 @@ -23,6 +23,7 @@
@@ -545,7 +545,7 @@ index 359e7d21a4a5e7acaed9bd7f42f40019e650a182..cd90aab9d3a7b5335c829d964d92e3fa
    // 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
-@@ -448,6 +461,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
+@@ -450,6 +463,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
    ui::ContextFactory* context_factory_;
    ui::ContextFactoryPrivate* context_factory_private_;
  
@@ -555,7 +555,7 @@ index 359e7d21a4a5e7acaed9bd7f42f40019e650a182..cd90aab9d3a7b5335c829d964d92e3fa
    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 747d01865657b0bd055c7bb1515dfc84ddbe92aa..0453999f6513176bd8e835741292ecf3ad51f5b1 100644
+index d32c154b965bf9fa90f8ebb2a8dd395302efc57d..f63efc91890af45c5a767bfb892ef252b22c253e 100644
 --- a/ui/compositor/host/host_context_factory_private.cc
 +++ b/ui/compositor/host/host_context_factory_private.cc
 @@ -98,8 +98,12 @@ void HostContextFactoryPrivate::ConfigureCompositor(

+ 4 - 4
patches/chromium/frame_host_manager.patch

@@ -42,7 +42,7 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
    // 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 ba10b76c4cdec0137aeb39c7edbfed723ed7426f..eadf6a06d22a345776fd832827ba9b3d44738ce4 100644
+index eecfdbd9aa067f912c0d1c6feb6217b5fb6efa8a..d7fed5faea2a1096efc299bd222738d453dec3a7 100644
 --- a/content/browser/frame_host/render_frame_host_manager.cc
 +++ b/content/browser/frame_host/render_frame_host_manager.cc
 @@ -2228,6 +2228,21 @@ bool RenderFrameHostManager::InitRenderView(
@@ -67,7 +67,7 @@ index ba10b76c4cdec0137aeb39c7edbfed723ed7426f..eadf6a06d22a345776fd832827ba9b3d
    SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
  
    // All children of MHTML documents must be MHTML documents. They all live in
-@@ -2265,6 +2280,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2272,6 +2287,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
                                                request.common_params().url);
      no_renderer_swap_allowed |=
          request.from_begin_navigation() && !can_renderer_initiate_transfer;
@@ -127,7 +127,7 @@ index ba10b76c4cdec0137aeb39c7edbfed723ed7426f..eadf6a06d22a345776fd832827ba9b3d
    } else {
      // Subframe navigations will use the current renderer, unless specifically
      // allowed to swap processes.
-@@ -2276,23 +2344,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
+@@ -2283,23 +2351,28 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
    if (no_renderer_swap_allowed && !should_swap_for_error_isolation)
      return scoped_refptr<SiteInstance>(current_site_instance);
  
@@ -212,7 +212,7 @@ index d51d21fbd09cfa2c017f85ab96c1156a6a4f74f9..5459d566e37866f247452a7f88d88476
      const MainFunctionParams& parameters) {
    return nullptr;
 diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
-index 6767853c179179c546bbaa6fd07ade7db9c40a82..4ef8220f88c13b4c19a885245d1f0fa91d293f2a 100644
+index aeb22701d036c54cb495540847e333b380350e8a..189cfd7b916e26e7a3f72e867f22471a87d0bcab 100644
 --- a/content/public/browser/content_browser_client.h
 +++ b/content/public/browser/content_browser_client.h
 @@ -205,8 +205,45 @@ struct WebPreferences;

+ 16 - 16
patches/chromium/mas_no_private_api.patch

@@ -38,10 +38,10 @@ 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 aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c7012e53122 100644
+index bc2344332d2b8899628cd7c01d7b66eedbd1b4d0..08b3b94153624f36035f98d387530a0daf398447 100644
 --- a/content/browser/accessibility/browser_accessibility_cocoa.mm
 +++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
-@@ -219,6 +219,7 @@
+@@ -225,6 +225,7 @@
  // VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
  const int kAXResultsLimitNoLimit = -1;
  
@@ -49,7 +49,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  extern "C" {
  
  // The following are private accessibility APIs required for cursor navigation
-@@ -420,6 +421,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
+@@ -422,6 +423,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
    AddMisspelledTextAttributes(ax_range, attributed_text);
    return attributed_text;
  }
@@ -57,7 +57,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
  // Returns an autoreleased copy of the AXNodeData's attribute.
  NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
-@@ -687,7 +689,9 @@ + (void)initialize {
+@@ -689,7 +691,9 @@ + (void)initialize {
        {NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
        {NSAccessibilityElementBusyAttribute, @"elementBusy"},
        {NSAccessibilityEnabledAttribute, @"enabled"},
@@ -67,7 +67,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
        {NSAccessibilityExpandedAttribute, @"expanded"},
        {NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
        {NSAccessibilityFocusedAttribute, @"focused"},
-@@ -722,13 +726,17 @@ + (void)initialize {
+@@ -724,13 +728,17 @@ + (void)initialize {
        {NSAccessibilityRowsAttribute, @"rows"},
        // TODO(aboxhall): expose
        // NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -85,7 +85,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
        {NSAccessibilitySizeAttribute, @"size"},
        {NSAccessibilitySortDirectionAttribute, @"sortDirection"},
        {NSAccessibilitySubroleAttribute, @"subrole"},
-@@ -1226,6 +1234,7 @@ - (NSNumber*)enabled {
+@@ -1228,6 +1236,7 @@ - (NSNumber*)enabled {
                                    ax::mojom::Restriction::kDisabled];
  }
  
@@ -93,7 +93,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  // Returns a text marker that points to the last character in the document that
  // can be selected with VoiceOver.
  - (id)endTextMarker {
-@@ -1236,6 +1245,7 @@ - (id)endTextMarker {
+@@ -1238,6 +1247,7 @@ - (id)endTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
  }
@@ -101,7 +101,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
  - (NSNumber*)expanded {
    if (![self instanceActive])
-@@ -2107,6 +2117,7 @@ - (NSValue*)selectedTextRange {
+@@ -2109,6 +2119,7 @@ - (NSValue*)selectedTextRange {
    return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
  }
  
@@ -109,7 +109,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  - (id)selectedTextMarkerRange {
    if (![self instanceActive])
      return nil;
-@@ -2142,6 +2153,7 @@ - (id)selectedTextMarkerRange {
+@@ -2144,6 +2155,7 @@ - (id)selectedTextMarkerRange {
        CreateAXPlatformRange(*anchorObject, anchorOffset, anchorAffinity,
                              *focusObject, focusOffset, focusAffinity));
  }
@@ -117,7 +117,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
  - (NSValue*)size {
    if (![self instanceActive])
-@@ -2174,6 +2186,7 @@ - (NSString*)sortDirection {
+@@ -2176,6 +2188,7 @@ - (NSString*)sortDirection {
    return nil;
  }
  
@@ -125,7 +125,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  // Returns a text marker that points to the first character in the document that
  // can be selected with VoiceOver.
  - (id)startTextMarker {
-@@ -2184,6 +2197,7 @@ - (id)startTextMarker {
+@@ -2186,6 +2199,7 @@ - (id)startTextMarker {
    BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
    return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
  }
@@ -133,7 +133,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
  // Returns a subrole based upon the role.
  - (NSString*)subrole {
-@@ -2475,11 +2489,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
+@@ -2477,11 +2491,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
    NSMutableAttributedString* attributedValue =
        [[[NSMutableAttributedString alloc] initWithString:value] autorelease];
  
@@ -147,7 +147,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
    return [attributedValue attributedSubstringFromRange:range];
  }
-@@ -2562,9 +2578,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2564,9 +2580,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
        return ToBrowserAccessibilityCocoa(cell);
    }
  
@@ -159,7 +159,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
      BrowserAccessibilityPositionInstance position =
          CreatePositionFromTextMarker(parameter);
      if (!position->IsNullPosition())
-@@ -2854,6 +2869,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2856,6 +2871,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
  
      return CreateTextMarker(root->CreatePositionAt(index));
    }
@@ -167,7 +167,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
  
    if ([attribute isEqualToString:
                       NSAccessibilityBoundsForRangeParameterizedAttribute]) {
-@@ -2887,6 +2903,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
+@@ -2889,6 +2905,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
      return nil;
    }
  
@@ -175,7 +175,7 @@ index aef51e0f959e4e7706a87f17226dd4f17bfc7ba3..71bf5bef235ff33c2405ed13cdad1c70
    if ([attribute
            isEqualToString:
                NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
-@@ -2967,6 +2984,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
+@@ -2969,6 +2986,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
  
      return @(child->GetIndexInParent());
    }

+ 53 - 0
patches/chromium/net_avoid_vector_const_elements.patch

@@ -0,0 +1,53 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Deepak Mohan <[email protected]>
+Date: Tue, 10 Sep 2019 14:34:52 -0700
+Subject: net: avoid vector<const T>, since it doesn't build with MSSTL yet.
+
+Fixes build for embedders using `use_custom_libcxx=false` on windows.
+This was introduced with https://chromium-review.googlesource.com/c/chromium/src/+/1638928
+
+diff --git a/net/dns/dns_util.cc b/net/dns/dns_util.cc
+index d83ff7c15024bd8b7e674f480f8ffd91527dabb9..d5ee744b2a92fcb0c42a43b41796e4f1debb489e 100644
+--- a/net/dns/dns_util.cc
++++ b/net/dns/dns_util.cc
+@@ -139,11 +139,11 @@ struct DohUpgradeEntry {
+   const DnsConfig::DnsOverHttpsServerConfig dns_over_https_config;
+ };
+ 
+-const std::vector<const DohUpgradeEntry>& GetDohUpgradeList() {
++const std::vector<DohUpgradeEntry>& GetDohUpgradeList() {
+   // The provider names in these entries should be kept in sync with the
+   // DohProviderId histogram suffix list in
+   // tools/metrics/histograms/histograms.xml.
+-  static const base::NoDestructor<std::vector<const DohUpgradeEntry>>
++  static const base::NoDestructor<std::vector<DohUpgradeEntry>>
+       upgradable_servers({
+           DohUpgradeEntry(
+               "CleanBrowsingAdult",
+@@ -222,7 +222,7 @@ const std::vector<const DohUpgradeEntry>& GetDohUpgradeList() {
+ std::vector<const DohUpgradeEntry*> GetDohUpgradeEntriesFromNameservers(
+     const std::vector<IPEndPoint>& dns_servers,
+     const std::vector<std::string>& excluded_providers) {
+-  const std::vector<const DohUpgradeEntry>& upgradable_servers =
++  const std::vector<DohUpgradeEntry>& upgradable_servers =
+       GetDohUpgradeList();
+   std::vector<const DohUpgradeEntry*> entries;
+ 
+@@ -417,7 +417,7 @@ std::vector<DnsConfig::DnsOverHttpsServerConfig>
+ GetDohUpgradeServersFromDotHostname(
+     const std::string& dot_server,
+     const std::vector<std::string>& excluded_providers) {
+-  const std::vector<const DohUpgradeEntry>& upgradable_servers =
++  const std::vector<DohUpgradeEntry>& upgradable_servers =
+       GetDohUpgradeList();
+   std::vector<DnsConfig::DnsOverHttpsServerConfig> doh_servers;
+ 
+@@ -451,7 +451,7 @@ GetDohUpgradeServersFromNameservers(
+ 
+ std::string GetDohProviderIdForHistogramFromDohConfig(
+     const DnsConfig::DnsOverHttpsServerConfig& doh_server) {
+-  const std::vector<const DohUpgradeEntry>& upgradable_servers =
++  const std::vector<DohUpgradeEntry>& upgradable_servers =
+       GetDohUpgradeList();
+   for (const auto& upgrade_entry : upgradable_servers) {
+     if (doh_server.server_template ==

+ 28 - 22
patches/chromium/network_service_allow_remote_certificate_verification_logic.patch

@@ -5,10 +5,10 @@ Subject: network_service_allow_remote_certificate_verification_logic.patch
 
 
 diff --git a/services/network/network_context.cc b/services/network/network_context.cc
-index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083faea97ea969 100644
+index 3a0e058eaefbff034e279d85007a91e874bd716c..96f99d73d7043a6fe98569aa7b8deddeb2ac9b6c 100644
 --- a/services/network/network_context.cc
 +++ b/services/network/network_context.cc
-@@ -90,6 +90,11 @@
+@@ -91,6 +91,11 @@
  #include "services/network/url_loader.h"
  #include "services/network/url_request_context_builder_mojo.h"
  
@@ -20,7 +20,7 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
  #if BUILDFLAG(IS_CT_SUPPORTED)
  #include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
  #include "components/certificate_transparency/chrome_require_ct_delegate.h"
-@@ -318,6 +323,75 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
+@@ -319,6 +324,79 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
  
  }  // namespace
  
@@ -30,8 +30,12 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
 +  }
 +  ~RemoteCertVerifier() override = default;
 +
-+  void Bind(mojom::CertVerifierClientPtr client_info) {
-+    client_ = std::move(client_info);
++  void Bind(
++      mojo::PendingRemote<mojom::CertVerifierClient> client_info) {
++    client_.reset();
++    if (client_info.is_valid()) {
++      client_.Bind(std::move(client_info));
++    }
 +  }
 +
 +  // CertVerifier implementation
@@ -60,7 +64,7 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
 +  }
 +
 +  void OnRequestFinished(const RequestParams& params, net::CompletionOnceCallback callback, net::CertVerifyResult* verify_result, int error) {
-+    if (client_) {
++    if (client_.is_bound()) {
 +      client_->Verify(error, *verify_result, params.certificate(),
 +          params.hostname(), params.flags(), params.ocsp_response(),
 +          base::BindOnce(&RemoteCertVerifier::OnRemoteResponse,
@@ -90,17 +94,18 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
 +  }
 + private:
 +  std::unique_ptr<net::CertVerifier> upstream_;
-+  mojom::CertVerifierClientPtr client_;
++  mojo::Remote<mojom::CertVerifierClient> client_;
 +};
 +
  constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
  constexpr bool NetworkContext::enable_resource_scheduler_;
  
-@@ -649,6 +723,12 @@ void NetworkContext::SetClient(mojom::NetworkContextClientPtr client) {
-   client_ = std::move(client);
+@@ -652,6 +730,13 @@ void NetworkContext::SetClient(
+   client_.Bind(std::move(client));
  }
  
-+void NetworkContext::SetCertVerifierClient(mojom::CertVerifierClientPtr client) {
++void NetworkContext::SetCertVerifierClient(
++    mojo::PendingRemote<mojom::CertVerifierClient> client) {
 +  if (remote_cert_verifier_) {
 +    remote_cert_verifier_->Bind(std::move(client));
 +  }
@@ -109,7 +114,7 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
  void NetworkContext::CreateURLLoaderFactory(
      mojom::URLLoaderFactoryRequest request,
      mojom::URLLoaderFactoryParamsPtr params) {
-@@ -1723,12 +1803,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
+@@ -1726,12 +1811,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
                    cert_net_fetcher_, /*system_trust_store_provider=*/nullptr)));
      }
  #endif
@@ -134,7 +139,7 @@ index ace1397d74dc49d730fd635aed0206febf8711f4..13fcd399516c7c26cf89a15dda083fae
    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 936ed0637758cb8b0b39d04dc0bf84a80b38eeec..f765e5e232de56f070d404e16149abd6627159cd 100644
+index 608553fccbc393ab819517b16c124c062d3c9597..8e140617acc891ad51bf98c80d49a1255cb08af6 100644
 --- a/services/network/network_context.h
 +++ b/services/network/network_context.h
 @@ -80,6 +80,7 @@ class DomainReliabilityMonitor;
@@ -145,15 +150,16 @@ index 936ed0637758cb8b0b39d04dc0bf84a80b38eeec..f765e5e232de56f070d404e16149abd6
  class CookieManager;
  class ExpectCTReporter;
  class HostResolver;
-@@ -165,6 +166,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
- 
+@@ -168,6 +169,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    // mojom::NetworkContext implementation:
-   void SetClient(mojom::NetworkContextClientPtr client) override;
-+  void SetCertVerifierClient(mojom::CertVerifierClientPtr client) override;
+   void SetClient(
+       mojo::PendingRemote<mojom::NetworkContextClient> client) override;
++  void SetCertVerifierClient(
++      mojo::PendingRemote<mojom::CertVerifierClient> client) override;
    void CreateURLLoaderFactory(mojom::URLLoaderFactoryRequest request,
                                mojom::URLLoaderFactoryParamsPtr params) override;
    void ResetURLLoaderFactories() override;
-@@ -557,6 +559,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
+@@ -560,6 +563,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
    std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
  #endif
  
@@ -163,10 +169,10 @@ index 936ed0637758cb8b0b39d04dc0bf84a80b38eeec..f765e5e232de56f070d404e16149abd6
    // 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 bd03a47acefb77d0271f58ba28866f689ac21ad3..4e21a1276d83ce0154aa06e169e4b4394d215164 100644
+index bc748d27288fd5df283cc01ecf688e62dfaee78a..99ad77ca1b97b9e618bb2ad4b108bb892ed5e9d7 100644
 --- a/services/network/public/mojom/network_context.mojom
 +++ b/services/network/public/mojom/network_context.mojom
-@@ -164,6 +164,17 @@ interface TrustedURLLoaderHeaderClient {
+@@ -165,6 +165,17 @@ interface TrustedURLLoaderHeaderClient {
                    pending_receiver<TrustedHeaderClient> header_client);
  };
  
@@ -184,12 +190,12 @@ index bd03a47acefb77d0271f58ba28866f689ac21ad3..4e21a1276d83ce0154aa06e169e4b439
  // Parameters for constructing a network context.
  struct NetworkContextParams {
    // Name used by memory tools to identify the context.
-@@ -697,6 +708,9 @@ interface NetworkContext {
+@@ -724,6 +735,9 @@ interface NetworkContext {
    // Sets a client for this network context.
-   SetClient(NetworkContextClient client);
+   SetClient(pending_remote<NetworkContextClient> client);
  
 +  // Sets a certificate verifier client for this network context.
-+  SetCertVerifierClient(CertVerifierClient? client);
++  SetCertVerifierClient(pending_remote<CertVerifierClient>? client);
 +
    // Creates a new URLLoaderFactory with the given |params|.
    CreateURLLoaderFactory(URLLoaderFactory& url_loader_factory,

+ 4 - 4
patches/chromium/notification_provenance.patch

@@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
        mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
  
 diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
-index 39321f13c6b906ab9a3dab1f62d2eaa951a763a8..ac15adcd060fd2dfc7a1fc472ca617cac6319227 100644
+index 8f30cab87545594340fcb6fc86753223f5ffe5a6..ef011c50f62f281f61b5c8003e776390269add89 100644
 --- a/content/browser/renderer_interface_binders.cc
 +++ b/content/browser/renderer_interface_binders.cc
-@@ -253,7 +253,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
+@@ -246,7 +246,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
           RenderProcessHost* host, const url::Origin& origin) {
          static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
              ->GetPlatformNotificationContext()
@@ -142,10 +142,10 @@ 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 ba5982883a3821b42c47c80187af2e4d1b3f0ffb..720965aa1df6b415e12a85dd2b2e4475facab019 100644
+index 73a1af201b12bf818af2eafadad478b8c422826c..fc7e74c0bf900d475fc134a7b606c5f9e404f934 100644
 --- a/content/test/mock_platform_notification_service.cc
 +++ b/content/test/mock_platform_notification_service.cc
-@@ -29,6 +29,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
+@@ -31,6 +31,7 @@ MockPlatformNotificationService::MockPlatformNotificationService(
  MockPlatformNotificationService::~MockPlatformNotificationService() = default;
  
  void MockPlatformNotificationService::DisplayNotification(

+ 6 - 6
patches/chromium/pepper_flash.patch

@@ -61,7 +61,7 @@ index 37245c48cacbc5db164c61e4499f34ee83e0fce7..0fef12892e965e319e45f5dd1a9c5c9f
 +  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 c6c2ac11fd5551fe03978b947d2dda4c016e59ae..2dc392a6eab17b048df730e294398a3a0fb2eb8d 100644
+index 91c1562d9894e57fd5c3abfde157127144b31a91..8f4caca848d649db9bd26a4ce37509b29865f3c1 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 @@
@@ -132,10 +132,10 @@ index c6c2ac11fd5551fe03978b947d2dda4c016e59ae..2dc392a6eab17b048df730e294398a3a
  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 f2f40b636a41649199a38c663f03e6182df82520..41d11d1f1f9921d4b4deaaf4b2d8ab4be910e8fe 100644
+index 6b13bae8def62d9a26d68ac8396b4bf6f7439c1a..d92b5a5855c0cebf94922a31f686e15e3a6cd833 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 {
+@@ -24,9 +24,11 @@ namespace content {
  class BrowserPpapiHost;
  }
  
@@ -147,7 +147,7 @@ index f2f40b636a41649199a38c663f03e6182df82520..41d11d1f1f9921d4b4deaaf4b2d8ab4b
  
  class GURL;
  
-@@ -49,15 +51,19 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
+@@ -50,15 +52,19 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
        const base::Time& t);
    int32_t OnGetLocalDataRestrictions(ppapi::host::HostMessageContext* context);
  
@@ -167,8 +167,8 @@ index f2f40b636a41649199a38c663f03e6182df82520..41d11d1f1f9921d4b4deaaf4b2d8ab4b
    int render_process_id_;
  
    // Requests a wake lock to prevent going to sleep, and a timer to cancel it
-@@ -65,8 +71,10 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
-   device::mojom::WakeLockPtr wake_lock_;
+@@ -66,8 +72,10 @@ class PepperFlashBrowserHost : public ppapi::host::ResourceHost {
+   mojo::Remote<device::mojom::WakeLock> wake_lock_;
    base::DelayTimer delay_timer_;
  
 +#if 0

+ 13 - 13
patches/chromium/printing.patch

@@ -394,10 +394,10 @@ index a134a000bd3ccb229a26b3e2cb3425f91a85618e..fd768d372ac15be9b0553fd7d98ce5e2
  // 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 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708eeea0a4aa 100644
+index 626edef2b046ad72e0a3b80cb7831be80fab3d89..6b7ca8e6132f4e5647a0e7164ffcca106a904746 100644
 --- a/components/printing/renderer/print_render_frame_helper.cc
 +++ b/components/printing/renderer/print_render_frame_helper.cc
-@@ -37,6 +37,7 @@
+@@ -38,6 +38,7 @@
  #include "net/base/registry_controlled_domains/registry_controlled_domain.h"
  #include "printing/buildflags/buildflags.h"
  #include "printing/metafile_skia.h"
@@ -405,7 +405,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
  #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"
-@@ -1122,7 +1123,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
+@@ -1129,7 +1130,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
      web_frame->DispatchBeforePrintEvent();
      if (!weak_this)
        return;
@@ -415,7 +415,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
      if (weak_this)
        web_frame->DispatchAfterPrintEvent();
    }
-@@ -1170,7 +1172,9 @@ void PrintRenderFrameHelper::OnDestruct() {
+@@ -1177,7 +1179,9 @@ void PrintRenderFrameHelper::OnDestruct() {
    delete this;
  }
  
@@ -426,7 +426,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    if (ipc_nesting_level_ > 1)
      return;
  
-@@ -1183,7 +1187,8 @@ void PrintRenderFrameHelper::OnPrintPages() {
+@@ -1190,7 +1194,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);
@@ -436,7 +436,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1200,7 +1205,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
+@@ -1207,7 +1212,7 @@ void PrintRenderFrameHelper::OnPrintForSystemDialog() {
    }
    auto weak_this = weak_ptr_factory_.GetWeakPtr();
    Print(frame, print_preview_context_.source_node(),
@@ -445,7 +445,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    if (weak_this)
      frame->DispatchAfterPrintEvent();
    // WARNING: |this| may be gone at this point. Do not do any more work here and
-@@ -1236,6 +1241,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
+@@ -1243,6 +1248,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
    if (ipc_nesting_level_ > 1)
      return;
  
@@ -454,7 +454,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    print_preview_context_.OnPrintPreview();
  
    UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
-@@ -1628,7 +1635,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1635,7 +1642,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
      auto self = weak_ptr_factory_.GetWeakPtr();
      Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -465,7 +465,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1639,7 +1648,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
+@@ -1646,7 +1655,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
  
  void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
                                     const blink::WebNode& node,
@@ -476,7 +476,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    // If still not finished with earlier print request simply ignore.
    if (prep_frame_view_)
      return;
-@@ -1647,7 +1658,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1654,7 +1665,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
    FrameReference frame_ref(frame);
  
    int expected_page_count = 0;
@@ -485,7 +485,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
      DidFinishPrinting(FAIL_PRINT_INIT);
      return;  // Failed to init print page settings.
    }
-@@ -1667,8 +1678,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
+@@ -1674,8 +1685,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
  
      PrintMsg_PrintPages_Params print_settings;
      auto self = weak_ptr_factory_.GetWeakPtr();
@@ -499,7 +499,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
      // Check if |this| is still valid.
      if (!self)
        return;
-@@ -1875,10 +1889,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
+@@ -1882,10 +1896,23 @@ std::vector<int> PrintRenderFrameHelper::GetPrintedPages(
    return printed_pages;
  }
  
@@ -526,7 +526,7 @@ index 4ab51f37a2f0739d355760b9cf6b3afeee6e2c8e..0f31d964e11e08dd7a1bf33302ed708e
    // 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.
-@@ -1898,12 +1925,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
+@@ -1905,12 +1932,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
    return result;
  }
  

+ 5 - 5
patches/chromium/render_widget_host_view_base.patch

@@ -5,10 +5,10 @@ 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 f41270e262784602c90b79b7aefbcd1a7af43dd8..a28ea7ee72fbf596b2b1d10cacaad4068d62e4d4 100644
+index dbfcd1da5c853a396b6a44c1a2968cc317d10125..3dc776ac982fdd5d4d15bd3afdf208810340db4e 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(
+@@ -631,6 +631,15 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
    return false;
  }
  
@@ -25,7 +25,7 @@ index f41270e262784602c90b79b7aefbcd1a7af43dd8..a28ea7ee72fbf596b2b1d10cacaad406
      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 41288f633262f49ed7fb174c1af4e1834061c940..7fac11ee38f50165a0089473de5be601b1edf040 100644
+index 2bd5d56bc37daa97e32cb2be20f9d1b49abd91a2..77674ba193fa3fee3ff0dc5c83cc36c50fbcba68 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 @@
@@ -52,7 +52,7 @@ index 41288f633262f49ed7fb174c1af4e1834061c940..7fac11ee38f50165a0089473de5be601
  class WebCursor;
  class DelegatedFrameHost;
  struct TextInputState;
-@@ -131,6 +135,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -132,6 +136,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
                                       bool destination_is_loaded,
                                       bool destination_is_frozen) final;
  
@@ -62,7 +62,7 @@ index 41288f633262f49ed7fb174c1af4e1834061c940..7fac11ee38f50165a0089473de5be601
    // This only needs to be overridden by RenderWidgetHostViewBase subclasses
    // that handle content embedded within other RenderWidgetHostViews.
    gfx::PointF TransformPointToRootCoordSpaceF(
-@@ -348,6 +355,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
+@@ -349,6 +356,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
    virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
                                     const ui::LatencyInfo& latency);
  

+ 6 - 6
patches/chromium/render_widget_host_view_mac.patch

@@ -5,7 +5,7 @@ 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 a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653de1c70c7 100644
+index e692286b9c15cbbde03f7dff3f98f54c3f0e9365..9113fb00d144d6cee789f608f8b3761b93ca7ae8 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
 @@ -152,6 +152,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -20,7 +20,7 @@ index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653
  // These are not documented, so use only after checking -respondsToSelector:.
  @interface NSApplication (UndocumentedSpeechMethods)
  - (void)speakString:(NSString*)string;
-@@ -569,6 +574,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
+@@ -571,6 +576,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
  }
  
  - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -30,7 +30,7 @@ index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653
    return [self acceptsMouseEventsWhenInactive];
  }
  
-@@ -988,6 +996,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
+@@ -990,6 +998,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
                                eventType == NSKeyDown &&
                                !(modifierFlags & NSCommandKeyMask);
  
@@ -41,7 +41,7 @@ index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653
    // We only handle key down events and just simply forward other events.
    if (eventType != NSKeyDown) {
      hostHelper_->ForwardKeyboardEvent(event, latency_info);
-@@ -1767,9 +1779,11 @@ - (NSAccessibilityRole)accessibilityRole {
+@@ -1769,9 +1781,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 a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653
  
  - (NSArray*)validAttributesForMarkedText {
    // This code is just copied from WebKit except renaming variables.
-@@ -1778,7 +1792,10 @@ - (NSArray*)validAttributesForMarkedText {
+@@ -1780,7 +1794,10 @@ - (NSArray*)validAttributesForMarkedText {
          initWithObjects:NSUnderlineStyleAttributeName,
                          NSUnderlineColorAttributeName,
                          NSMarkedClauseSegmentAttributeName,
@@ -66,7 +66,7 @@ index a9654d8c1a9e15a3f90ec54a0b8e1bc61ce1f803..6c1e802fda70968cbcbea157fc982653
    return validAttributesForMarkedText_.get();
  }
 diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
-index f52e0750f337dde0a1f3e7d6d36bac8a62094316..0aac157ae84f975acd6a944c63194bf2ed233188 100644
+index 7a3503fc687bc1877d8940cf6a3ec1bbeca83716..9f36053c15a9895677c791e1578d16bc867c4265 100644
 --- a/content/browser/renderer_host/render_widget_host_view_mac.mm
 +++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
 @@ -63,6 +63,7 @@

+ 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 fd8be9bfe830e40c1c1ad3c718d8c48182691c14..8633aa335e42f3cb9d19a47d961fa31895bbc4e3 100644
+index 03615f48d5c11932ee496da942fbc3ee193c6fa0..1219939cd51db9e4a7b260258ec371b4a01d3a15 100644
 --- a/content/renderer/render_thread_impl.cc
 +++ b/content/renderer/render_thread_impl.cc
-@@ -1509,7 +1509,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
+@@ -1526,7 +1526,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
  }
  
  bool RenderThreadImpl::IsElasticOverscrollEnabled() {

+ 3 - 3
patches/chromium/ssl_security_state_tab_helper.patch

@@ -6,7 +6,7 @@ Subject: ssl_security_state_tab_helper.patch
 Allows populating security tab info for devtools in Electron.
 
 diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
-index 17a01036811666c92e066d5b5cbe8cd9068f2d2c..ecbf7530d405e399a2421b2855126a3be070ad14 100644
+index 887cdd11fbbd9df44edef1548a89891c5cf23cee..04f83473143661972d94c3d06fa5ada3c422ca51 100644
 --- a/chrome/browser/ssl/security_state_tab_helper.cc
 +++ b/chrome/browser/ssl/security_state_tab_helper.cc
 @@ -13,16 +13,20 @@
@@ -67,7 +67,7 @@ index 17a01036811666c92e066d5b5cbe8cd9068f2d2c..ecbf7530d405e399a2421b2855126a3b
    return state;
  }
  
-@@ -165,6 +174,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
+@@ -164,6 +173,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
        web_contents()->GetController().GetVisibleEntry();
    if (!entry)
      return security_state::MALICIOUS_CONTENT_STATUS_NONE;
@@ -75,7 +75,7 @@ index 17a01036811666c92e066d5b5cbe8cd9068f2d2c..ecbf7530d405e399a2421b2855126a3b
    safe_browsing::SafeBrowsingService* sb_service =
        g_browser_process->safe_browsing_service();
    if (!sb_service)
-@@ -243,6 +253,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
+@@ -242,6 +252,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
          break;
      }
    }

+ 2 - 2
patches/chromium/support_mixed_sandbox_with_zygote.patch

@@ -22,7 +22,7 @@ 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 cbdff071f830cf31f4ed985e3c202b0fcb46f68c..299acbb8973f8b603575b006cfd1d296869f7c2a 100644
+index 111796d24ceece54d7664954005b8fe3d86ed4e2..2336db9feacf5d96107155659611f64297040eac 100644
 --- a/content/browser/renderer_host/render_process_host_impl.cc
 +++ b/content/browser/renderer_host/render_process_host_impl.cc
 @@ -389,6 +389,17 @@ class RendererSandboxedProcessLauncherDelegate
@@ -68,7 +68,7 @@ index cbdff071f830cf31f4ed985e3c202b0fcb46f68c..299acbb8973f8b603575b006cfd1d296
  };
  
  const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
-@@ -1688,11 +1705,18 @@ bool RenderProcessHostImpl::Init() {
+@@ -1687,11 +1704,18 @@ bool RenderProcessHostImpl::Init() {
        cmd_line->PrependWrapper(renderer_prefix);
      AppendRendererCommandLine(cmd_line.get());
  

+ 1 - 1
patches/chromium/sysroot.patch

@@ -7,7 +7,7 @@ Make chrome's install-sysroot scripts point to our custom sysroot builds,
 which include extra deps that Electron needs (e.g. libnotify)
 
 diff --git a/build/linux/sysroot_scripts/install-sysroot.py b/build/linux/sysroot_scripts/install-sysroot.py
-index 2e756f75d243c558c03c720a1a9c90911f2bb121..5b8cc02c3cb9b257bbe9c93cf7ce329272403607 100755
+index 165551a2948b74c024459be42d1a9a3d96878a10..5c9272a512e22dfe2e90f6665083f53f0fa8979e 100755
 --- a/build/linux/sysroot_scripts/install-sysroot.py
 +++ b/build/linux/sysroot_scripts/install-sysroot.py
 @@ -37,9 +37,11 @@ except ImportError:

+ 1 - 143
patches/chromium/tts.patch

@@ -10,7 +10,7 @@ Subject: tts.patch
   destruction from content layer.
 
 diff --git a/chrome/browser/speech/tts_controller_delegate_impl.cc b/chrome/browser/speech/tts_controller_delegate_impl.cc
-index e96b0cef21bec8925d4adf1e8692dc00f5ec6f5f..7ec07534aa3628873c9fe784fa0235f3c5c7f15f 100644
+index cce8cad71b9f620a3d26946a7df937a1336d741e..ea5db4e66f1cbbb2728558091dc07a413a536e1f 100644
 --- a/chrome/browser/speech/tts_controller_delegate_impl.cc
 +++ b/chrome/browser/speech/tts_controller_delegate_impl.cc
 @@ -213,6 +213,7 @@ void TtsControllerDelegateImpl::UpdateUtteranceDefaultsFromPrefs(
@@ -29,145 +29,3 @@ index e96b0cef21bec8925d4adf1e8692dc00f5ec6f5f..7ec07534aa3628873c9fe784fa0235f3
    return prefs;
  }
  
-diff --git a/chrome/browser/speech/tts_message_filter.cc b/chrome/browser/speech/tts_message_filter.cc
-index cf0841622b99ad6637314284bcdbd83060a404cc..779b51992c180a76ed8a2c492297416aa557d214 100644
---- a/chrome/browser/speech/tts_message_filter.cc
-+++ b/chrome/browser/speech/tts_message_filter.cc
-@@ -10,8 +10,11 @@
- #include "base/logging.h"
- #include "base/task/post_task.h"
- #include "chrome/browser/chrome_notification_types.h"
-+#if 0
- #include "chrome/browser/profiles/profile.h"
-+#endif
- #include "chrome/common/tts_messages.h"
-+#include "components/keyed_service/content/browser_context_keyed_service_shutdown_notifier_factory.h"
- #include "content/public/browser/browser_context.h"
- #include "content/public/browser/browser_task_traits.h"
- #include "content/public/browser/notification_service.h"
-@@ -19,6 +22,29 @@
- 
- using content::BrowserThread;
- 
-+namespace {
-+
-+class TtsMessageFilterShutdownNotifierFactory
-+    : public BrowserContextKeyedServiceShutdownNotifierFactory {
-+ public:
-+  static TtsMessageFilterShutdownNotifierFactory* GetInstance() {
-+    return base::Singleton<TtsMessageFilterShutdownNotifierFactory>::get();
-+  }
-+
-+ private:
-+  friend struct base::DefaultSingletonTraits<
-+      TtsMessageFilterShutdownNotifierFactory>;
-+
-+  TtsMessageFilterShutdownNotifierFactory()
-+      : BrowserContextKeyedServiceShutdownNotifierFactory("TtsMessageFilter") {}
-+
-+  ~TtsMessageFilterShutdownNotifierFactory() override {}
-+
-+  DISALLOW_COPY_AND_ASSIGN(TtsMessageFilterShutdownNotifierFactory);
-+};
-+
-+}  // namespace
-+
- TtsMessageFilter::TtsMessageFilter(content::BrowserContext* browser_context)
-     : BrowserMessageFilter(TtsMsgStart),
-       browser_context_(browser_context),
-@@ -26,28 +52,27 @@ TtsMessageFilter::TtsMessageFilter(content::BrowserContext* browser_context)
-   CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-   content::TtsController::GetInstance()->AddVoicesChangedDelegate(this);
- 
--  // TODO(dmazzoni): make it so that we can listen for a BrowserContext
--  // being destroyed rather than a Profile.  http://crbug.com/444668
--  Profile* profile = Profile::FromBrowserContext(browser_context);
--  notification_registrar_.Add(this,
--                              chrome::NOTIFICATION_PROFILE_DESTROYED,
--                              content::Source<Profile>(profile));
-+  browser_context_shutdown_notifier_ =
-+      TtsMessageFilterShutdownNotifierFactory::GetInstance()
-+          ->Get(browser_context)
-+          ->Subscribe(base::Bind(&TtsMessageFilter::BrowserContextDestroyed,
-+                                 base::RetainedRef(this)));
- 
-   // Balanced in OnChannelClosingInUIThread() to keep the ref-count be non-zero
-   // until all pointers to this class are invalidated.
-   AddRef();
- }
- 
--void TtsMessageFilter::OverrideThreadForMessage(
--    const IPC::Message& message, BrowserThread::ID* thread) {
-+void TtsMessageFilter::OverrideThreadForMessage(const IPC::Message& message,
-+                                                BrowserThread::ID* thread) {
-   switch (message.type()) {
--  case TtsHostMsg_InitializeVoiceList::ID:
--  case TtsHostMsg_Speak::ID:
--  case TtsHostMsg_Pause::ID:
--  case TtsHostMsg_Resume::ID:
--  case TtsHostMsg_Cancel::ID:
--    *thread = BrowserThread::UI;
--    break;
-+    case TtsHostMsg_InitializeVoiceList::ID:
-+    case TtsHostMsg_Speak::ID:
-+    case TtsHostMsg_Pause::ID:
-+    case TtsHostMsg_Resume::ID:
-+    case TtsHostMsg_Cancel::ID:
-+      *thread = BrowserThread::UI;
-+      break;
-   }
- }
- 
-@@ -211,10 +236,8 @@ void TtsMessageFilter::Cleanup() {
-   content::TtsController::GetInstance()->RemoveUtteranceEventDelegate(this);
- }
- 
--void TtsMessageFilter::Observe(
--    int type,
--    const content::NotificationSource& source,
--    const content::NotificationDetails& details) {
-+void TtsMessageFilter::BrowserContextDestroyed() {
-+  CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
-   browser_context_ = nullptr;
--  notification_registrar_.RemoveAll();
-+  browser_context_shutdown_notifier_.reset();
- }
-diff --git a/chrome/browser/speech/tts_message_filter.h b/chrome/browser/speech/tts_message_filter.h
-index ffb607fbb275b0a75dba592f2f5f5afb881214e2..99780e56674af749a231f0e85b89e6a6ed3743d6 100644
---- a/chrome/browser/speech/tts_message_filter.h
-+++ b/chrome/browser/speech/tts_message_filter.h
-@@ -8,6 +8,7 @@
- #include "base/macros.h"
- #include "base/memory/weak_ptr.h"
- #include "base/synchronization/lock.h"
-+#include "components/keyed_service/core/keyed_service_shutdown_notifier.h"
- #include "content/public/browser/browser_message_filter.h"
- #include "content/public/browser/browser_thread.h"
- #include "content/public/browser/notification_observer.h"
-@@ -21,7 +22,6 @@ class BrowserContext;
- struct TtsUtteranceRequest;
- 
- class TtsMessageFilter : public content::BrowserMessageFilter,
--                         public content::NotificationObserver,
-                          public content::UtteranceEventDelegate,
-                          public content::VoicesChangedDelegate {
-  public:
-@@ -64,15 +64,13 @@ class TtsMessageFilter : public content::BrowserMessageFilter,
-   // about to be deleted.
-   bool Valid();
- 
--  // content::NotificationObserver implementation.
--  void Observe(int type,
--               const content::NotificationSource& source,
--               const content::NotificationDetails& details) override;
-+  void BrowserContextDestroyed();
- 
-+  std::unique_ptr<KeyedServiceShutdownNotifier::Subscription>
-+      browser_context_shutdown_notifier_;
-   content::BrowserContext* browser_context_;
-   mutable base::Lock mutex_;
-   mutable bool valid_;
--  content::NotificationRegistrar notification_registrar_;
- 
-   DISALLOW_COPY_AND_ASSIGN(TtsMessageFilter);
- };

+ 4 - 4
patches/chromium/web_contents.patch

@@ -5,7 +5,7 @@ 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 f504a515efe294355de2c436f8dce4a677525346..773139f63090ee0ccc7578040093e5cc5c0e2551 100644
+index a4e4a612d82c856c1e02e2d04c3dd210ffa0da9f..5613811d4a41694a6ff53f289c9b95210bd04c23 100644
 --- a/content/browser/web_contents/web_contents_impl.cc
 +++ b/content/browser/web_contents/web_contents_impl.cc
 @@ -2137,6 +2137,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -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 a8b79ba4e6604d829939fc960fae3b20210b70cc..118728ee9144bbf67695ec780be11611ab5723c5 100644
+index b5ff1cc5d6f60d22839b9bc06ab4e2c55d9cc6c7..d22f0dcefa2a8ccb13d4d993bc37241beb664757 100644
 --- a/content/public/browser/web_contents.h
 +++ b/content/public/browser/web_contents.h
-@@ -77,9 +77,12 @@ class BrowserPluginGuestDelegate;
+@@ -78,9 +78,12 @@ class BrowserPluginGuestDelegate;
  class InterstitialPage;
  class RenderFrameHost;
  class RenderViewHost;
@@ -108,7 +108,7 @@ index a8b79ba4e6604d829939fc960fae3b20210b70cc..118728ee9144bbf67695ec780be11611
  struct CustomContextMenuContext;
  struct DropData;
  struct MHTMLGenerationParams;
-@@ -215,6 +218,10 @@ class WebContents : public PageNavigator,
+@@ -216,6 +219,10 @@ class WebContents : public PageNavigator,
        kInitializeAndWarmupRendererProcess,
      } desired_renderer_state;
  

+ 10 - 10
patches/chromium/worker_context_will_destroy.patch

@@ -5,10 +5,10 @@ Subject: worker_context_will_destroy.patch
 
 
 diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
-index 76d775b20307a3c9a779489e754c6849a0f21d64..533a1621e82461d8611ba1d8f2ed2fc527085a03 100644
+index f4d048c6ae7887bea203a3bf65c11ad56c0f26ac..b9f347f8ce3e7580592ee24591d85751d06a30cd 100644
 --- a/content/public/renderer/content_renderer_client.h
 +++ b/content/public/renderer/content_renderer_client.h
-@@ -384,6 +384,11 @@ class CONTENT_EXPORT ContentRendererClient {
+@@ -386,6 +386,11 @@ class CONTENT_EXPORT ContentRendererClient {
    virtual void DidInitializeWorkerContextOnWorkerThread(
        v8::Local<v8::Context> context) {}
  
@@ -21,10 +21,10 @@ index 76d775b20307a3c9a779489e754c6849a0f21d64..533a1621e82461d8611ba1d8f2ed2fc5
    // 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 944011afc9acf8ed9b46d9a1c6ccfe052d3536c0..43fa87dcfa985f5a63a1205bb1e3f4b2b7d9b19f 100644
+index 2a4eca9797a59f2c3f71c8cf646426b025cc05de..b9175d2fd166cdb9e43c226c1e98b02433e832cc 100644
 --- a/content/renderer/renderer_blink_platform_impl.cc
 +++ b/content/renderer/renderer_blink_platform_impl.cc
-@@ -934,6 +934,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
+@@ -922,6 +922,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
    WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
  }
  
@@ -38,10 +38,10 @@ index 944011afc9acf8ed9b46d9a1c6ccfe052d3536c0..43fa87dcfa985f5a63a1205bb1e3f4b2
      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 b772dfa6a64827253d63c922259cbc3c213daeb1..52fa6521b95974380ef2a5028c2875a9b88f01c6 100644
+index 10052275d638059754c1a75b1a262f0a2a852fb4..4d6b95c0224c73ef09222374caf7fee59f580f79 100644
 --- a/content/renderer/renderer_blink_platform_impl.h
 +++ b/content/renderer/renderer_blink_platform_impl.h
-@@ -189,6 +189,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
+@@ -190,6 +190,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 b772dfa6a64827253d63c922259cbc3c213daeb1..52fa6521b95974380ef2a5028c2875a9
        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 00724bc9b4fdc8b4507818683aaf2e1c9b923cdb..190b177ab5bec090ae90c56bea915f826449e93f 100644
+index 10eab390307b8991608a2e3daa0c0fc867d93683..fbc766418b546b774fe31ce387e657735717d542 100644
 --- a/third_party/blink/public/platform/platform.h
 +++ b/third_party/blink/public/platform/platform.h
-@@ -679,6 +679,7 @@ class BLINK_PLATFORM_EXPORT Platform {
+@@ -672,6 +672,7 @@ class BLINK_PLATFORM_EXPORT Platform {
    virtual void DidStartWorkerThread() {}
    virtual void WillStopWorkerThread() {}
    virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -62,10 +62,10 @@ index 00724bc9b4fdc8b4507818683aaf2e1c9b923cdb..190b177ab5bec090ae90c56bea915f82
        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 391a9d1099ac3226c6c0d42e74e672f958e5a58b..3d66c80a190a533fade36d452f8093116a0d6c1b 100644
+index b4785ee3f50f3e4f6f9335e405ff6be4ac916c62..40f829e18212ec5bffdc52f9f953f8e74e25a53d 100644
 --- a/third_party/blink/renderer/core/workers/worker_thread.cc
 +++ b/third_party/blink/renderer/core/workers/worker_thread.cc
-@@ -658,6 +658,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
+@@ -663,6 +663,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
      nested_runner_->QuitNow();
    }
  

+ 1 - 1
shell/app/node_main.cc

@@ -10,7 +10,7 @@
 
 #include "base/command_line.h"
 #include "base/feature_list.h"
-#include "base/task/thread_pool/thread_pool.h"
+#include "base/task/thread_pool/thread_pool_instance.h"
 #include "base/threading/thread_task_runner_handle.h"
 #include "electron/electron_version.h"
 #include "gin/array_buffer.h"

+ 33 - 28
shell/browser/api/atom_api_cookies.cc

@@ -136,25 +136,25 @@ void FilterCookies(const base::Value& filter,
 
 std::string InclusionStatusToString(
     net::CanonicalCookie::CookieInclusionStatus status) {
-  switch (status) {
-    case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_HTTP_ONLY:
-      return "Failed to create httponly cookie";
-    case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_SECURE_ONLY:
-      return "Cannot create a secure cookie from an insecure URL";
-    case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE:
-      return "Failed to parse cookie";
-    case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN:
-      return "Failed to get cookie domain";
-    case net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX:
-      return "Failed because the cookie violated prefix rules.";
-    case net::CanonicalCookie::CookieInclusionStatus::
-        EXCLUDE_NONCOOKIEABLE_SCHEME:
-      return "Cannot set cookie for current scheme";
-    case net::CanonicalCookie::CookieInclusionStatus::INCLUDE:
-      return "";
-    default:
-      return "Setting cookie failed";
-  }
+  if (status.HasExclusionReason(
+          net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_HTTP_ONLY))
+    return "Failed to create httponly cookie";
+  if (status.HasExclusionReason(
+          net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_SECURE_ONLY))
+    return "Cannot create a secure cookie from an insecure URL";
+  if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
+                                    EXCLUDE_FAILURE_TO_STORE))
+    return "Failed to parse cookie";
+  if (status.HasExclusionReason(
+          net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN))
+    return "Failed to get cookie domain";
+  if (status.HasExclusionReason(
+          net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_PREFIX))
+    return "Failed because the cookie violated prefix rules.";
+  if (status.HasExclusionReason(net::CanonicalCookie::CookieInclusionStatus::
+                                    EXCLUDE_NONCOOKIEABLE_SCHEME))
+    return "Cannot set cookie for current scheme";
+  return "Setting cookie failed";
 }
 
 }  // namespace
@@ -249,14 +249,18 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
 
   GURL url(url_string ? *url_string : "");
   if (!url.is_valid()) {
-    promise.RejectWithErrorMessage(InclusionStatusToString(
-        net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_INVALID_DOMAIN));
+    promise.RejectWithErrorMessage(
+        InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
+            net::CanonicalCookie::CookieInclusionStatus::
+                EXCLUDE_INVALID_DOMAIN)));
     return handle;
   }
 
   if (!name || name->empty()) {
-    promise.RejectWithErrorMessage(InclusionStatusToString(
-        net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE));
+    promise.RejectWithErrorMessage(
+        InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
+            net::CanonicalCookie::CookieInclusionStatus::
+                EXCLUDE_FAILURE_TO_STORE)));
     return handle;
   }
 
@@ -265,8 +269,10 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
       creation_time, expiration_time, last_access_time, secure, http_only,
       net::CookieSameSite::NO_RESTRICTION, net::COOKIE_PRIORITY_DEFAULT);
   if (!canonical_cookie || !canonical_cookie->IsCanonical()) {
-    promise.RejectWithErrorMessage(InclusionStatusToString(
-        net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_FAILURE_TO_STORE));
+    promise.RejectWithErrorMessage(
+        InclusionStatusToString(net::CanonicalCookie::CookieInclusionStatus(
+            net::CanonicalCookie::CookieInclusionStatus::
+                EXCLUDE_FAILURE_TO_STORE)));
     return handle;
   }
   net::CookieOptions options;
@@ -282,11 +288,10 @@ v8::Local<v8::Promise> Cookies::Set(const base::DictionaryValue& details) {
       base::BindOnce(
           [](util::Promise promise,
              net::CanonicalCookie::CookieInclusionStatus status) {
-            auto errmsg = InclusionStatusToString(status);
-            if (errmsg.empty()) {
+            if (status.IsInclude()) {
               promise.Resolve();
             } else {
-              promise.RejectWithErrorMessage(errmsg);
+              promise.RejectWithErrorMessage(InclusionStatusToString(status));
             }
           },
           std::move(promise)));

+ 8 - 5
shell/browser/api/atom_api_session.cc

@@ -29,7 +29,8 @@
 #include "content/public/browser/download_manager_delegate.h"
 #include "content/public/browser/network_service_instance.h"
 #include "content/public/browser/storage_partition.h"
-#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/public/cpp/bindings/pending_remote.h"
+#include "mojo/public/cpp/bindings/self_owned_receiver.h"
 #include "native_mate/dictionary.h"
 #include "native_mate/object_template_builder.h"
 #include "net/base/completion_repeating_callback.h"
@@ -397,14 +398,16 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
     return;
   }
 
-  network::mojom::CertVerifierClientPtr cert_verifier_client;
+  mojo::PendingRemote<network::mojom::CertVerifierClient>
+      cert_verifier_client_remote;
   if (proc) {
-    mojo::MakeStrongBinding(std::make_unique<CertVerifierClient>(proc),
-                            mojo::MakeRequest(&cert_verifier_client));
+    mojo::MakeSelfOwnedReceiver(
+        std::make_unique<CertVerifierClient>(proc),
+        cert_verifier_client_remote.InitWithNewPipeAndPassReceiver());
   }
   content::BrowserContext::GetDefaultStoragePartition(browser_context_.get())
       ->GetNetworkContext()
-      ->SetCertVerifierClient(std::move(cert_verifier_client));
+      ->SetCertVerifierClient(std::move(cert_verifier_client_remote));
 
   // This causes the cert verifier cache to be cleared.
   content::GetNetworkService()->OnCertDBChanged();

+ 1 - 6
shell/browser/atom_browser_client.cc

@@ -109,7 +109,6 @@
 
 #if BUILDFLAG(ENABLE_TTS)
 #include "chrome/browser/speech/tts_controller_delegate_impl.h"
-#include "chrome/browser/speech/tts_message_filter.h"
 #endif  // BUILDFLAG(ENABLE_TTS)
 
 #if BUILDFLAG(ENABLE_PRINTING)
@@ -350,10 +349,6 @@ void AtomBrowserClient::RenderProcessWillLaunch(
       process_id, host->GetBrowserContext()));
 #endif
 
-#if BUILDFLAG(ENABLE_TTS)
-  host->AddFilter(new TtsMessageFilter(host->GetBrowserContext()));
-#endif
-
   ProcessPreferences prefs;
   auto* web_preferences =
       WebContentsPreferences::From(GetWebContentsFromProcessID(process_id));
@@ -1006,7 +1001,7 @@ bool AtomBrowserClient::WillCreateURLLoaderFactory(
   new ProxyingURLLoaderFactory(
       web_request.get(), protocol->intercept_handlers(), render_process_id,
       std::move(proxied_receiver), std::move(target_factory_info),
-      std::move(header_client_receiver));
+      std::move(header_client_receiver), type);
 
   if (bypass_redirect_checks)
     *bypass_redirect_checks = true;

+ 1 - 0
shell/browser/net/asar/asar_url_loader.cc

@@ -20,6 +20,7 @@
 #include "net/base/mime_util.h"
 #include "net/http/http_byte_range.h"
 #include "net/http/http_util.h"
+#include "services/network/public/cpp/resource_response.h"
 #include "shell/common/asar/archive.h"
 #include "shell/common/asar/asar_util.h"
 

+ 1 - 0
shell/browser/net/node_stream_loader.h

@@ -12,6 +12,7 @@
 
 #include "mojo/public/cpp/bindings/strong_binding.h"
 #include "mojo/public/cpp/system/data_pipe_producer.h"
+#include "services/network/public/cpp/resource_response.h"
 #include "services/network/public/mojom/url_loader.mojom.h"
 #include "v8/include/v8.h"
 

+ 13 - 5
shell/browser/net/proxying_url_loader_factory.cc

@@ -77,7 +77,8 @@ void ProxyingURLLoaderFactory::InProgressRequest::UpdateRequestInfo() {
   info_.emplace(extensions::WebRequestInfoInitParams(
       request_id_, factory_->render_process_id_, request_.render_frame_id,
       nullptr, routing_id_, request_for_info, false,
-      !(options_ & network::mojom::kURLLoadOptionSynchronous)));
+      !(options_ & network::mojom::kURLLoadOptionSynchronous),
+      factory_->IsForServiceWorkerScript()));
 
   current_request_uses_header_client_ =
       factory_->url_loader_header_client_receiver_.is_bound() &&
@@ -187,7 +188,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::ResumeReadingBodyFromNet() {
 }
 
 void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveResponse(
-    const network::ResourceResponseHead& head) {
+    network::mojom::URLResponseHeadPtr head) {
   if (current_request_uses_header_client_) {
     // Use the headers we got from OnHeadersReceived as that'll contain
     // Set-Cookie if it existed.
@@ -205,7 +206,7 @@ void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveResponse(
 
 void ProxyingURLLoaderFactory::InProgressRequest::OnReceiveRedirect(
     const net::RedirectInfo& redirect_info,
-    const network::ResourceResponseHead& head) {
+    network::mojom::URLResponseHeadPtr head) {
   // Note: In Electron we don't check IsRedirectSafe.
 
   if (current_request_uses_header_client_) {
@@ -654,10 +655,12 @@ ProxyingURLLoaderFactory::ProxyingURLLoaderFactory(
     network::mojom::URLLoaderFactoryRequest loader_request,
     network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
     mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
-        header_client_receiver)
+        header_client_receiver,
+    content::ContentBrowserClient::URLLoaderFactoryType loader_factory_type)
     : web_request_api_(web_request_api),
       intercepted_handlers_(intercepted_handlers),
-      render_process_id_(render_process_id) {
+      render_process_id_(render_process_id),
+      loader_factory_type_(loader_factory_type) {
   target_factory_.Bind(std::move(target_factory_info));
   target_factory_.set_connection_error_handler(base::BindOnce(
       &ProxyingURLLoaderFactory::OnTargetFactoryError, base::Unretained(this)));
@@ -740,6 +743,11 @@ void ProxyingURLLoaderFactory::OnLoaderCreated(
   request_it->second->OnLoaderCreated(std::move(receiver));
 }
 
+bool ProxyingURLLoaderFactory::IsForServiceWorkerScript() const {
+  return loader_factory_type_ == content::ContentBrowserClient::
+                                     URLLoaderFactoryType::kServiceWorkerScript;
+}
+
 void ProxyingURLLoaderFactory::OnTargetFactoryError() {
   target_factory_.reset();
   proxy_bindings_.CloseAllBindings();

+ 9 - 3
shell/browser/net/proxying_url_loader_factory.h

@@ -12,6 +12,7 @@
 #include <vector>
 
 #include "base/optional.h"
+#include "content/public/browser/content_browser_client.h"
 #include "extensions/browser/api/web_request/web_request_info.h"
 #include "mojo/public/cpp/bindings/receiver.h"
 #include "services/network/public/cpp/resource_request.h"
@@ -102,9 +103,9 @@ class ProxyingURLLoaderFactory
     void ResumeReadingBodyFromNet() override;
 
     // network::mojom::URLLoaderClient:
-    void OnReceiveResponse(const network::ResourceResponseHead& head) override;
+    void OnReceiveResponse(network::mojom::URLResponseHeadPtr head) override;
     void OnReceiveRedirect(const net::RedirectInfo& redirect_info,
-                           const network::ResourceResponseHead& head) override;
+                           network::mojom::URLResponseHeadPtr head) override;
     void OnUploadProgress(int64_t current_position,
                           int64_t total_size,
                           OnUploadProgressCallback callback) override;
@@ -204,7 +205,8 @@ class ProxyingURLLoaderFactory
       network::mojom::URLLoaderFactoryRequest loader_request,
       network::mojom::URLLoaderFactoryPtrInfo target_factory_info,
       mojo::PendingReceiver<network::mojom::TrustedURLLoaderHeaderClient>
-          header_client_receiver);
+          header_client_receiver,
+      content::ContentBrowserClient::URLLoaderFactoryType loader_factory_type);
   ~ProxyingURLLoaderFactory() override;
 
   // network::mojom::URLLoaderFactory:
@@ -226,6 +228,8 @@ class ProxyingURLLoaderFactory
 
   WebRequestAPI* web_request_api() { return web_request_api_; }
 
+  bool IsForServiceWorkerScript() const;
+
  private:
   void OnTargetFactoryError();
   void OnProxyBindingError();
@@ -249,6 +253,8 @@ class ProxyingURLLoaderFactory
   network::mojom::URLLoaderFactoryPtr target_factory_;
   mojo::Receiver<network::mojom::TrustedURLLoaderHeaderClient>
       url_loader_header_client_receiver_{this};
+  const content::ContentBrowserClient::URLLoaderFactoryType
+      loader_factory_type_;
 
   // Mapping from our own internally generated request ID to an
   // InProgressRequest instance.

+ 2 - 1
shell/browser/osr/osr_render_widget_host_view.cc

@@ -446,7 +446,8 @@ gfx::Size OffScreenRenderWidgetHostView::GetVisibleViewportSize() {
 
 void OffScreenRenderWidgetHostView::SetInsets(const gfx::Insets& insets) {}
 
-bool OffScreenRenderWidgetHostView::LockMouse() {
+bool OffScreenRenderWidgetHostView::LockMouse(
+    bool request_unadjusted_movement) {
   return false;
 }
 

+ 1 - 1
shell/browser/osr/osr_render_widget_host_view.h

@@ -101,7 +101,7 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase,
   void SetBackgroundColor(SkColor color) override;
   base::Optional<SkColor> GetBackgroundColor() override;
   void UpdateBackgroundColor() override;
-  bool LockMouse(void) override;
+  bool LockMouse(bool request_unadjusted_movement) override;
   void UnlockMouse(void) override;
   void TakeFallbackContentFrom(content::RenderWidgetHostView* view) override;
   void SetNeedsBeginFrames(bool needs_begin_frames) override;

+ 0 - 14
shell/renderer/renderer_client_base.cc

@@ -54,10 +54,6 @@
 #include "chrome/renderer/pepper/pepper_helper.h"
 #endif  // BUILDFLAG(ENABLE_PEPPER_FLASH)
 
-#if BUILDFLAG(ENABLE_TTS)
-#include "chrome/renderer/tts_dispatcher.h"
-#endif  // BUILDFLAG(ENABLE_TTS)
-
 #if BUILDFLAG(ENABLE_PRINTING)
 #include "components/printing/renderer/print_render_frame_helper.h"
 #include "printing/print_settings.h"
@@ -275,16 +271,6 @@ void RendererClientBase::DidClearWindowObject(
   render_frame->GetWebFrame()->ExecuteScript(blink::WebScriptSource("void 0"));
 }
 
-std::unique_ptr<blink::WebSpeechSynthesizer>
-RendererClientBase::OverrideSpeechSynthesizer(
-    blink::WebSpeechSynthesizerClient* client) {
-#if BUILDFLAG(ENABLE_TTS)
-  return std::make_unique<TtsDispatcher>(client);
-#else
-  return nullptr;
-#endif
-}
-
 bool RendererClientBase::OverrideCreatePlugin(
     content::RenderFrame* render_frame,
     const blink::WebPluginParams& params,

+ 0 - 2
shell/renderer/renderer_client_base.h

@@ -72,8 +72,6 @@ class RendererClientBase : public content::ContentRendererClient {
   // content::ContentRendererClient:
   void RenderThreadStarted() override;
   void RenderFrameCreated(content::RenderFrame*) override;
-  std::unique_ptr<blink::WebSpeechSynthesizer> OverrideSpeechSynthesizer(
-      blink::WebSpeechSynthesizerClient* client) override;
   bool OverrideCreatePlugin(content::RenderFrame* render_frame,
                             const blink::WebPluginParams& params,
                             blink::WebPlugin** plugin) override;