From d5f2eb5a816e1755c662bfb8522e0e669da9f65c Mon Sep 17 00:00:00 2001 From: Electron Bot Date: Thu, 6 May 2021 15:01:04 -0700 Subject: [PATCH] chore: bump chromium to 92.0.4499.0 (master) (#29046) --- DEPS | 2 +- .../chrome/browser/process_singleton.h | 2 +- .../add_didinstallconditionalfeatures.patch | 4 ++-- ...tter_for_browsermainloop_result_code.patch | 4 ++-- patches/chromium/can_create_window.patch | 10 ++++---- ...screationoverridden_with_full_params.patch | 6 ++--- ...esources_not_chrome_for_spellchecker.patch | 4 ++-- patches/chromium/chrome_key_systems.patch | 6 ++--- patches/chromium/dcheck.patch | 6 ++--- .../disable_color_correct_rendering.patch | 6 ++--- patches/chromium/disable_hidden.patch | 6 ++--- patches/chromium/disable_unload_metrics.patch | 6 ++--- ...ll_getwebframe_-_view_when_get_blink.patch | 4 ++-- ...xpose_setuseragent_on_networkcontext.patch | 2 +- ..._scheduler_throttling_per_renderview.patch | 8 +++---- ...ntcapturercount_in_web_contents_impl.patch | 2 +- patches/chromium/frame_host_manager.patch | 4 ++-- .../mas_disable_remote_accessibility.patch | 4 ++-- ...emote_certificate_verification_logic.patch | 4 ++-- .../chromium/notification_provenance.patch | 4 ++-- patches/chromium/picture-in-picture.patch | 24 +++++++++---------- ...r_changes_to_the_webcontentsobserver.patch | 8 +++---- ...ove_contentrendererclient_shouldfork.patch | 4 ++-- patches/chromium/scroll_bounce_flag.patch | 4 ++-- .../support_mixed_sandbox_with_zygote.patch | 10 ++++---- patches/chromium/web_contents.patch | 2 +- .../worker_context_will_destroy.patch | 4 ++-- ...feat_add_hook_to_notify_script_ready.patch | 4 ++-- patches/v8/build_gn.patch | 8 +++---- ...export_private_v8_symbols_on_windows.patch | 4 ++-- patches/v8/expose_mksnapshot.patch | 4 ++-- .../browser/api/electron_api_browser_window.h | 2 +- .../api/electron_api_global_shortcut.cc | 4 ++-- .../api/electron_api_global_shortcut.h | 7 +++--- shell/browser/browser.h | 2 +- shell/browser/browser_mac.mm | 2 +- shell/browser/cookie_change_notifier.cc | 3 ++- shell/browser/cookie_change_notifier.h | 3 ++- .../electron_download_manager_delegate.h | 2 +- shell/browser/electron_permission_manager.h | 17 ++++++------- shell/browser/lib/power_observer_linux.cc | 3 ++- shell/browser/lib/power_observer_linux.h | 2 +- shell/browser/mac/electron_application.h | 4 ++-- shell/browser/mac/electron_application.mm | 2 +- .../browser/net/electron_url_loader_factory.h | 3 ++- shell/browser/osr/osr_host_display_client.h | 3 ++- .../browser/osr/osr_render_widget_host_view.h | 5 ++-- .../browser/ui/gtk/app_indicator_icon_menu.cc | 2 +- .../browser/ui/gtk/app_indicator_icon_menu.h | 7 +++--- shell/browser/ui/win/taskbar_host.h | 4 ++-- shell/common/gin_helper/callback.h | 6 ++--- shell/common/gin_helper/constructor.h | 24 ++++++++++--------- shell/common/gin_helper/function_template.h | 23 ++++++++++-------- .../gin_helper/object_template_builder.h | 6 ++--- shell/common/gin_helper/wrappable.h | 2 +- shell/renderer/guest_view_container.h | 2 +- 56 files changed, 162 insertions(+), 148 deletions(-) diff --git a/DEPS b/DEPS index 625673fb14e3..10d079348120 100644 --- a/DEPS +++ b/DEPS @@ -14,7 +14,7 @@ gclient_gn_args = [ vars = { 'chromium_version': - '92.0.4498.0', + '92.0.4499.0', 'node_version': 'v14.16.1', 'nan_version': diff --git a/chromium_src/chrome/browser/process_singleton.h b/chromium_src/chrome/browser/process_singleton.h index 5f2f38dc1276..1cac06a33f16 100644 --- a/chromium_src/chrome/browser/process_singleton.h +++ b/chromium_src/chrome/browser/process_singleton.h @@ -158,7 +158,7 @@ class ProcessSingleton { // Function to call when the other process is hung and needs to be killed. // Allows overriding for tests. - base::Callback kill_callback_; + base::RepeatingCallback kill_callback_; // Path in file system to the socket. base::FilePath socket_path_; diff --git a/patches/chromium/add_didinstallconditionalfeatures.patch b/patches/chromium/add_didinstallconditionalfeatures.patch index 23399542d79e..f3f3650587f9 100644 --- a/patches/chromium/add_didinstallconditionalfeatures.patch +++ b/patches/chromium/add_didinstallconditionalfeatures.patch @@ -23,10 +23,10 @@ index fa860cddc22da75967796674e9b467f8c726a368..730c7ddd2838eb50f6f5f0676f0f16f7 int32_t world_id) {} virtual void DidClearWindowObject() {} diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index eaac22ff3405d1d53b05285ab4018090cca1570f..2d0d35843ee2ed2e13c053790fdbfd625a9a0071 100644 +index 50504820638367fc32e42583edad4f68d62a2526..abcfd464b8a92f65623bc4527123cc75ad38b712 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4150,6 +4150,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, +@@ -4146,6 +4146,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local context, observer.DidCreateScriptContext(context, world_id); } diff --git a/patches/chromium/add_setter_for_browsermainloop_result_code.patch b/patches/chromium/add_setter_for_browsermainloop_result_code.patch index f2cb6cf45138..16daeb557842 100644 --- a/patches/chromium/add_setter_for_browsermainloop_result_code.patch +++ b/patches/chromium/add_setter_for_browsermainloop_result_code.patch @@ -10,10 +10,10 @@ valid use cases for setting custom exit codes of the main loop. This exposes a simple setter that embedders can call. diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h -index e116a3de7fb765758793b3feecab2654193c3a96..0131d97a8b82d2339c99d1b1c6c3faeba2ae35ff 100644 +index 69b091698f04209af113af6c586ec8615ff52d41..c54ad51b6cf4b48c522ae79091697b5efa50673c 100644 --- a/content/browser/browser_main_loop.h +++ b/content/browser/browser_main_loop.h -@@ -167,6 +167,10 @@ class CONTENT_EXPORT BrowserMainLoop { +@@ -168,6 +168,10 @@ class CONTENT_EXPORT BrowserMainLoop { int GetResultCode() const { return result_code_; } diff --git a/patches/chromium/can_create_window.patch b/patches/chromium/can_create_window.patch index 963843a8d83e..031e9c518f5e 100644 --- a/patches/chromium/can_create_window.patch +++ b/patches/chromium/can_create_window.patch @@ -9,10 +9,10 @@ potentially prevent a window from being created. TODO(loc): this patch is currently broken. diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc -index 80e4a073dc34ee6eeca411afb663477941b2ebca..e881cd42b45d2100749c270e5abfc12664329051 100644 +index 3925d8f312ea132e0edbc610d61588af5686e2d4..f2f31f6f954b560a3c3e31dc2233292b00c21b80 100644 --- a/content/browser/renderer_host/render_frame_host_impl.cc +++ b/content/browser/renderer_host/render_frame_host_impl.cc -@@ -5575,6 +5575,7 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -5586,6 +5586,7 @@ void RenderFrameHostImpl::CreateNewWindow( last_committed_origin_, params->window_container_type, params->target_url, params->referrer.To(), params->frame_name, params->disposition, *params->features, @@ -21,7 +21,7 @@ index 80e4a073dc34ee6eeca411afb663477941b2ebca..e881cd42b45d2100749c270e5abfc126 &no_javascript_access); diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index cee128d842b530dfe00dbd6b7aa1a977fe623d83..6acb183b87ebcfb5d769517985b691b9969bb6e6 100644 +index 24f086e5798930a888ca2f78d9c36c93e046261b..b1cbf6f76c2032dd3a6c90f1c9cf97ccaa734bec 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3649,6 +3649,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( @@ -150,7 +150,7 @@ index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db8 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 386a38dd82433a53b82c0d35de44fdfbfce87b89..b24bbf95e879b1e04d686d703340c978d7f33bba 100644 +index bb60e5d711ab45f89c401f4c053e453a324f6881..fbe1312f13f799b4c1b3dbc663fde81fe64162c8 100644 --- a/content/renderer/render_view_impl.cc +++ b/content/renderer/render_view_impl.cc @@ -27,6 +27,7 @@ @@ -161,7 +161,7 @@ index 386a38dd82433a53b82c0d35de44fdfbfce87b89..b24bbf95e879b1e04d686d703340c978 #include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h" #include "third_party/blink/public/web/web_frame_widget.h" #include "third_party/blink/public/web/web_local_frame.h" -@@ -326,6 +327,10 @@ WebView* RenderViewImpl::CreateView( +@@ -317,6 +318,10 @@ WebView* RenderViewImpl::CreateView( params->impression = blink::ConvertWebImpressionToImpression(*impression); } diff --git a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch index 7f5a06d1330e..273766f0c76e 100644 --- a/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch +++ b/patches/chromium/chore_provide_iswebcontentscreationoverridden_with_full_params.patch @@ -264,7 +264,7 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee void AddNewContents(content::WebContents* source, std::unique_ptr new_contents, diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 2426eb615967cbe3d11ece998d97d63266fac184..f4c8d9e8a20f9be8c6566857fcf1d57ba7ec1af7 100644 +index 54fce2b0b6da947473e8725bf97816de9f51b12a..aa50664e5fcb88ac72118ba5d354f835d427b6fd 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -3601,8 +3601,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( @@ -404,7 +404,7 @@ index 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930 ->options() ->block_new_web_contents(); diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc -index 9b312a0604c38ea95f03b0ef9885ebaf08ed896c..87d57b3be4609dd1847620d58cb8b61a29114b89 100644 +index cd3f3c8849060fec8d9612d26c6c34caeefb3995..1ed386fd54918b24ebc81d6c2524e5d1fe02a655 100644 --- a/ui/views/controls/webview/web_dialog_view.cc +++ b/ui/views/controls/webview/web_dialog_view.cc @@ -429,8 +429,7 @@ bool WebDialogView::IsWebContentsCreationOverridden( @@ -418,7 +418,7 @@ index 9b312a0604c38ea95f03b0ef9885ebaf08ed896c..87d57b3be4609dd1847620d58cb8b61a return delegate_->HandleShouldOverrideWebContentsCreation(); return false; diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h -index 8c5edd6b46b828bba2422ae11e451625ee4e6894..cc4a53e149fab62a72b321c9a3ec994fb9d87622 100644 +index 96896f5600495ff89b5209bb8cd72d7add6b404a..7df417f0509ddd993fa11bf6fb23ae68886d8008 100644 --- a/ui/views/controls/webview/web_dialog_view.h +++ b/ui/views/controls/webview/web_dialog_view.h @@ -159,8 +159,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView, diff --git a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch index 162bc5b0e671..d8c2160b6625 100644 --- a/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch +++ b/patches/chromium/chore_use_electron_resources_not_chrome_for_spellchecker.patch @@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from Electrons grit header instead of Chromes diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn -index c2359837f08332d18ac81f81f1b4d4e0728292b8..39e37edfe9d98630595e300ae000e920cfe4236b 100644 +index c0ba41010a64873c240acb337a69c0a1c2b69ccb..fb937c7d0aaf06b7120c1549cf15d6e18ac89be2 100644 --- a/chrome/browser/BUILD.gn +++ b/chrome/browser/BUILD.gn -@@ -6282,6 +6282,7 @@ static_library("browser") { +@@ -6292,6 +6292,7 @@ static_library("browser") { deps += [ "//components/spellcheck/browser", "//components/spellcheck/common", diff --git a/patches/chromium/chrome_key_systems.patch b/patches/chromium/chrome_key_systems.patch index 99446c8c776b..a8ceecb5666e 100644 --- a/patches/chromium/chrome_key_systems.patch +++ b/patches/chromium/chrome_key_systems.patch @@ -7,10 +7,10 @@ Disable persiste licence support check for widevine cdm, as its not supported in the current version of chrome. diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc -index 6a539eb21f8ba381fd3fe6fddc21e499befbd8a9..d7b9ef789d684c58013179b25cd40569ff773249 100644 +index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169630fa502 100644 --- a/chrome/renderer/media/chrome_key_systems.cc +++ b/chrome/renderer/media/chrome_key_systems.cc -@@ -15,7 +15,9 @@ +@@ -16,7 +16,9 @@ #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -20,7 +20,7 @@ index 6a539eb21f8ba381fd3fe6fddc21e499befbd8a9..d7b9ef789d684c58013179b25cd40569 #include "components/cdm/renderer/external_clear_key_key_system_properties.h" #include "components/cdm/renderer/widevine_key_system_properties.h" #include "content/public/renderer/render_thread.h" -@@ -200,12 +202,14 @@ static SupportedCodecs GetSupportedCodecs( +@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs( // Returns persistent-license session support. static EmeSessionTypeSupport GetPersistentLicenseSupport( bool supported_by_the_cdm) { diff --git a/patches/chromium/dcheck.patch b/patches/chromium/dcheck.patch index 5438a5517438..691bfb41e84e 100644 --- a/patches/chromium/dcheck.patch +++ b/patches/chromium/dcheck.patch @@ -17,10 +17,10 @@ only one or two specific checks fail. Then it's better to simply comment out the failing checks and allow the rest of the target to have them enabled. diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc -index a1a67daa21f93a8e19ee57ea007967e9a0735c18..d826fc5bacf7966e3f910572dd6b0f63de25089d 100644 +index 814eebf4b641fe01a29875b9c06aea84b2ab7206..892039c0481c0c66cefbff6a37bf51fe1ae61c6b 100644 --- a/content/browser/renderer_host/navigation_controller_impl.cc +++ b/content/browser/renderer_host/navigation_controller_impl.cc -@@ -1417,8 +1417,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( +@@ -1416,8 +1416,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation( return NAVIGATION_TYPE_NEW_SUBFRAME; } @@ -33,7 +33,7 @@ index a1a67daa21f93a8e19ee57ea007967e9a0735c18..d826fc5bacf7966e3f910572dd6b0f63 if (rfh->GetParent()) { // All manual subframes would be did_create_new_entry and handled above, so -@@ -1733,7 +1735,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry( +@@ -1732,7 +1734,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry( } } diff --git a/patches/chromium/disable_color_correct_rendering.patch b/patches/chromium/disable_color_correct_rendering.patch index 59eb5cd209fb..81396d433cb2 100644 --- a/patches/chromium/disable_color_correct_rendering.patch +++ b/patches/chromium/disable_color_correct_rendering.patch @@ -241,10 +241,10 @@ index cbb30f8900ed07d5cccbf250f2f1e6fafb66b40e..411fabb7e8c3e2a1aceb9db0fefdc4c6 sandbox::policy::switches::kGpuSandboxAllowSysVShm, sandbox::policy::switches::kGpuSandboxFailuresFatal, diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 43ad6054fc9c310fb78f8e718a91d29cfcc797d8..635ac52ba7615aa2dbe0c728c274c8027e651b7c 100644 +index 4208521cf4f03a154f44d5bd925f1cc12c306e20..541125c33491201b660ec06da202619219c527c1 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -211,6 +211,7 @@ +@@ -210,6 +210,7 @@ #include "ui/accessibility/accessibility_switches.h" #include "ui/base/ui_base_switches.h" #include "ui/display/display_switches.h" @@ -252,7 +252,7 @@ index 43ad6054fc9c310fb78f8e718a91d29cfcc797d8..635ac52ba7615aa2dbe0c728c274c802 #include "ui/gl/gl_switches.h" #include "ui/native_theme/native_theme_features.h" #include "url/origin.h" -@@ -3200,6 +3201,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( +@@ -3199,6 +3200,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer( // Propagate the following switches to the renderer command line (along // with any associated values) if present in the browser command line. static const char* const kSwitchNames[] = { diff --git a/patches/chromium/disable_hidden.patch b/patches/chromium/disable_hidden.patch index c1864f09560e..18d96fc62302 100644 --- a/patches/chromium/disable_hidden.patch +++ b/patches/chromium/disable_hidden.patch @@ -6,10 +6,10 @@ Subject: disable_hidden.patch Electron uses this to disable background throttling for hidden windows. diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 7aaea0969a47e0e34e529863867e0a0a7b586692..06524496cdad2dfecc8a7cba98a44eac4fa87101 100644 +index 252e7992b8d9376779cb8b59aae2dc12e1e3c0ba..ac6e92d1dab80d2e9d3a48ac419102b93615d7a9 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -712,6 +712,9 @@ void RenderWidgetHostImpl::WasHidden() { +@@ -711,6 +711,9 @@ void RenderWidgetHostImpl::WasHidden() { if (is_hidden_) return; @@ -34,7 +34,7 @@ index 81c55683ea0c08bc87487b7d0bd45160634d3aa3..bb1b37ae5cb6fce48aaa7a8e9e636a7b // |routing_id| must not be MSG_ROUTING_NONE. // If this object outlives |delegate|, DetachDelegate() must be called when diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc -index c3f4bf477f30bd441a42f00e90f05523f737f072..7839107b2143afd4268d1028ec2fe0dfb104b7b5 100644 +index 606051acbdc77167d4b44d4990b1e52c6acf27f8..42e8390aed5dd0b7a7dad0069db3b5c9bb0faebf 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -595,7 +595,7 @@ void RenderWidgetHostViewAura::HideImpl() { diff --git a/patches/chromium/disable_unload_metrics.patch b/patches/chromium/disable_unload_metrics.patch index 42a857e099b0..58ebd9953b3f 100644 --- a/patches/chromium/disable_unload_metrics.patch +++ b/patches/chromium/disable_unload_metrics.patch @@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we should continue seeking for a real fix. diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc -index bc2d7c7f00b2da0e32d48a2d85aeec81ee2c15aa..a69821a91841a6e28e983307bf46ca698db2a374 100644 +index e494a067dc20f2a4d95a62c3570b017f523f42bf..d2d36ed49b408c55834cfc84b5122ba6b2864459 100644 --- a/content/browser/renderer_host/navigator.cc +++ b/content/browser/renderer_host/navigator.cc -@@ -1079,6 +1079,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1078,6 +1078,7 @@ void Navigator::RecordNavigationMetrics( .InMilliseconds()); } @@ -35,7 +35,7 @@ index bc2d7c7f00b2da0e32d48a2d85aeec81ee2c15aa..a69821a91841a6e28e983307bf46ca69 // If this is a same-process navigation and we have timestamps for unload // durations, fill those metrics out as well. if (params.unload_start && params.unload_end && -@@ -1125,6 +1126,7 @@ void Navigator::RecordNavigationMetrics( +@@ -1124,6 +1125,7 @@ void Navigator::RecordNavigationMetrics( first_before_unload_start_time) .InMilliseconds()); } diff --git a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch index b82cbd4e0402..9d2388451c7e 100644 --- a/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch +++ b/patches/chromium/don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch @@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572 Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393 diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index f4abb34513e76cf76deb58810b1b4d9387ac0fec..dbe005d4b0e3eba3f4f94493324681b55818e0e3 100644 +index 33fe8d118ced62aaba2c81ade206382395630086..9dccdd341860cfe7ee6038a99482d97fe0ffb3e6 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -2286,7 +2286,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() { +@@ -2282,7 +2282,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() { } const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() { diff --git a/patches/chromium/expose_setuseragent_on_networkcontext.patch b/patches/chromium/expose_setuseragent_on_networkcontext.patch index be2f534fe506..2df7d1c6f87e 100644 --- a/patches/chromium/expose_setuseragent_on_networkcontext.patch +++ b/patches/chromium/expose_setuseragent_on_networkcontext.patch @@ -33,7 +33,7 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970 DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings); }; diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index 18f9a7c1277653a4a9e0bd2303d57f40fe5f288a..0344da1de5df9ffec6e71669e3115b138420ec9e 100644 +index fa84ecca47caf78174e9f588d2a1c1f65ebb157d..8bfe1d73ee5cd3d32b9190585747faeea483fcfb 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -1140,6 +1140,13 @@ void NetworkContext::SetNetworkConditions( diff --git a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch index b696ae2981d9..6c03423b3c19 100644 --- a/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch +++ b/patches/chromium/feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch @@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView This allows us to disable throttling for hidden windows. diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc -index 756ad32666dcf1be906e348706af4b1dbdb1bb92..c0dd093e9e396af70f7b5f7003f1e6599fa6b870 100644 +index ba94f41600d2caf5beafa4aa83127bf1cf868a72..95d0dc410cb2ae4eaedbf28435786f7dc267db59 100644 --- a/content/browser/renderer_host/render_view_host_impl.cc +++ b/content/browser/renderer_host/render_view_host_impl.cc -@@ -612,6 +612,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { +@@ -611,6 +611,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque); } @@ -48,10 +48,10 @@ index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520 // This interface should only be implemented inside content. friend class RenderViewHostImpl; diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h -index 1d8ffde83fa97ff516e2cbc2add520da7b955750..4db10afe645a36ccac56d9afda95fd1fb3eaadf7 100644 +index b855cc7ce85117b3b32fe097b4c209ed5302e041..66456189bb90f2002682308a0ec83dc709d3cc72 100644 --- a/content/renderer/render_view_impl.h +++ b/content/renderer/render_view_impl.h -@@ -211,6 +211,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, +@@ -206,6 +206,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient, static WindowOpenDisposition NavigationPolicyToDisposition( blink::WebNavigationPolicy policy); diff --git a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch index 715ec29cd6db..2544fd9961fd 100644 --- a/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch +++ b/patches/chromium/fix_expose_decrementcapturercount_in_web_contents_impl.patch @@ -8,7 +8,7 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta to users. We should try to upstream this. diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 860301d6374687ab8f155e5091aba6239c37af35..8b5e624cf456241c7649456ea92716e8233f4c0f 100644 +index e66c762b5093e7154920b7df8638733bd146f535..46cc6cfd3c5b9ca14321bdf4c94a7126edec6eb5 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -1736,9 +1736,11 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/frame_host_manager.patch b/patches/chromium/frame_host_manager.patch index 04bb8c4a4d92..d72d96f1d7ce 100644 --- a/patches/chromium/frame_host_manager.patch +++ b/patches/chromium/frame_host_manager.patch @@ -6,10 +6,10 @@ Subject: frame_host_manager.patch Allows embedder to intercept site instances created by chromium. diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc -index f2ccdb02af3278fe955ca1658f4cc50b90e81637..3a4abaad35285b9bf7e9bd77293ca0b2b982f15b 100644 +index 3bd26f70aa00f051de7eae7ec94a56aaf018514d..4b766ad4055afc09b5f0287ffc3d3b4d8a74599f 100644 --- a/content/browser/renderer_host/render_frame_host_manager.cc +++ b/content/browser/renderer_host/render_frame_host_manager.cc -@@ -2922,6 +2922,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( +@@ -2921,6 +2921,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest( request->ResetStateForSiteInstanceChange(); } diff --git a/patches/chromium/mas_disable_remote_accessibility.patch b/patches/chromium/mas_disable_remote_accessibility.patch index 1731129495eb..ac8abf1255c0 100644 --- a/patches/chromium/mas_disable_remote_accessibility.patch +++ b/patches/chromium/mas_disable_remote_accessibility.patch @@ -170,10 +170,10 @@ index e99a5a11a5f48b985aa3cc28eae2c53eec34a518..3e7d3dbd8fd39a3554d91bd15c567b8f /////////////////////////////////////////////////////////////////////////////// diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn -index 2bcb3fd35fd4505ee29d5030ce9434cbf23a8447..3990639fa204ec44a3d4e49ee200337bed86f53c 100644 +index 195e6a88cb0612cedb4b228e10fc5660b5440be2..75250a4b9cb661d9fbea3580a50ff214b1b9510e 100644 --- a/ui/base/BUILD.gn +++ b/ui/base/BUILD.gn -@@ -314,6 +314,13 @@ component("base") { +@@ -324,6 +324,13 @@ component("base") { ] } diff --git a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch index 5e6316daa534..e1c797ad7cfe 100644 --- a/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch +++ b/patches/chromium/network_service_allow_remote_certificate_verification_logic.patch @@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement session.setCertificateVerifyCallback. diff --git a/services/network/network_context.cc b/services/network/network_context.cc -index eeadeb1b81259e81e73a0a31080c2803c0e84f0c..18f9a7c1277653a4a9e0bd2303d57f40fe5f288a 100644 +index 482d6022fd5076f55d339684e07d556e4cb3f220..fa84ecca47caf78174e9f588d2a1c1f65ebb157d 100644 --- a/services/network/network_context.cc +++ b/services/network/network_context.cc @@ -117,6 +117,11 @@ @@ -116,7 +116,7 @@ index eeadeb1b81259e81e73a0a31080c2803c0e84f0c..18f9a7c1277653a4a9e0bd2303d57f40 void NetworkContext::CreateURLLoaderFactory( mojo::PendingReceiver receiver, mojom::URLLoaderFactoryParamsPtr params) { -@@ -1931,6 +2016,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -1933,6 +2018,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( std::move(cert_verifier)); cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_); #endif // BUILDFLAG(IS_CHROMEOS_ASH) diff --git a/patches/chromium/notification_provenance.patch b/patches/chromium/notification_provenance.patch index bc624f425c2b..863cec4e531d 100644 --- a/patches/chromium/notification_provenance.patch +++ b/patches/chromium/notification_provenance.patch @@ -108,10 +108,10 @@ index 71dad766e05ac4726e1e18159f2af5ea01079a91..ef8e55a4420288fe64c99e68d0a649a9 const GURL& document_url, mojo::PendingReceiver receiver); diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index d94dbfafeb8a87434a4df8db5286527bb20cfdd6..1a01a7264f7a89c6b6f1d4e903333718adfbeb2d 100644 +index 6eee013d0401a7507cdcc0773ab0d9418c86b5c4..2afda54851efbb052371ce1e49f29cc56e93dce4 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -2161,7 +2161,7 @@ void RenderProcessHostImpl::CreateNotificationService( +@@ -2160,7 +2160,7 @@ void RenderProcessHostImpl::CreateNotificationService( document_url = rfh->GetLastCommittedURL(); storage_partition_impl_->GetPlatformNotificationContext()->CreateService( diff --git a/patches/chromium/picture-in-picture.patch b/patches/chromium/picture-in-picture.patch index f939c9e3273b..dc076d63bf94 100644 --- a/patches/chromium/picture-in-picture.patch +++ b/patches/chromium/picture-in-picture.patch @@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent because we don't generate them in our build. diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc -index 9c861140fec428cd6d3f0375e81d91d94b0444b6..f9dd34d2ad342b507e2b40298fbd8221fbbf14e3 100644 +index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887b9f7cc59 100644 --- a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc +++ b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc @@ -5,7 +5,7 @@ @@ -19,10 +19,10 @@ index 9c861140fec428cd6d3f0375e81d91d94b0444b6..f9dd34d2ad342b507e2b40298fbd8221 -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/l10n/l10n_util.h" + #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" - #include "ui/gfx/paint_vector_icon.h" diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc -index 28c00fd4f326dd7d5efa839cd7540e2f9f824904..98e77d49684ab6a267cf80122c9a9a79cea377ac 100644 +index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e3070c072 100644 --- a/chrome/browser/ui/views/overlay/close_image_button.cc +++ b/chrome/browser/ui/views/overlay/close_image_button.cc @@ -6,7 +6,7 @@ @@ -32,8 +32,8 @@ index 28c00fd4f326dd7d5efa839cd7540e2f9f824904..98e77d49684ab6a267cf80122c9a9a79 -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/l10n/l10n_util.h" + #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" - #include "ui/gfx/paint_vector_icon.h" diff --git a/chrome/browser/ui/views/overlay/hang_up_button.cc b/chrome/browser/ui/views/overlay/hang_up_button.cc index 4b741d67c4c20766e248f0799825103ba4f2a1ce..adf85811da98e1666e8e93e5b339e176ecfe64e3 100644 --- a/chrome/browser/ui/views/overlay/hang_up_button.cc @@ -91,7 +91,7 @@ index c996365b075abf026b4c26bce0ec89668cf933b8..04c6218f5f59b2d0d3d8e005461fa016 Browser* browser = chrome::FindBrowserWithWebContents(controller->GetWebContents()); diff --git a/chrome/browser/ui/views/overlay/playback_image_button.cc b/chrome/browser/ui/views/overlay/playback_image_button.cc -index b146450f115cec9717fdb9280ed894963a11c667..df0443d82ad9a42f6965387630ac3eb7231c4994 100644 +index ab1717bd630e8f143a2ba6dddfeb04bc95beb7fd..2cf5bcd690a9db84cb14c409f31a82da6a9c0348 100644 --- a/chrome/browser/ui/views/overlay/playback_image_button.cc +++ b/chrome/browser/ui/views/overlay/playback_image_button.cc @@ -6,7 +6,7 @@ @@ -102,9 +102,9 @@ index b146450f115cec9717fdb9280ed894963a11c667..df0443d82ad9a42f6965387630ac3eb7 +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/resize_handle_button.cc b/chrome/browser/ui/views/overlay/resize_handle_button.cc -index a3236fd87a096bebcd66a3d9c2525ba7ef8f15bf..0237ed5903abe4577d0a5a1850bb6e27a8d99010 100644 +index 375efc8f931b1bfd595265829e47c8187a8d8d39..080e652f2c3e88b9a082dbd8fef82c461311cd9c 100644 --- a/chrome/browser/ui/views/overlay/resize_handle_button.cc +++ b/chrome/browser/ui/views/overlay/resize_handle_button.cc @@ -6,7 +6,7 @@ @@ -115,9 +115,9 @@ index a3236fd87a096bebcd66a3d9c2525ba7ef8f15bf..0237ed5903abe4577d0a5a1850bb6e27 +#include "electron/grit/electron_resources.h" #include "ui/base/hit_test.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/color_palette.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc -index e803c1d3bbee5407dcfdc7b5a73cae3fc403a0e6..7bddae5d23fb6f100809c27d3636ae7ea6ca5169 100644 +index 8153a0b667383374d787ce105c177eda0cdf2171..e5f33a4c43f2571669dd2bef2260e548e20be9b4 100644 --- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc +++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc @@ -5,7 +5,7 @@ @@ -127,8 +127,8 @@ index e803c1d3bbee5407dcfdc7b5a73cae3fc403a0e6..7bddae5d23fb6f100809c27d3636ae7e -#include "chrome/grit/generated_resources.h" +#include "electron/grit/electron_resources.h" #include "ui/base/l10n/l10n_util.h" + #include "ui/base/metadata/metadata_impl_macros.h" #include "ui/gfx/color_palette.h" - #include "ui/views/background.h" diff --git a/chrome/browser/ui/views/overlay/toggle_camera_button.cc b/chrome/browser/ui/views/overlay/toggle_camera_button.cc index a3cff2dfa906aa469abd5f12f3f70f0acea0adfe..93ad732afe209a9f51756112a5aa4f7dcd6a8b2e 100644 --- a/chrome/browser/ui/views/overlay/toggle_camera_button.cc @@ -156,7 +156,7 @@ index a681ba4ed2de3226b20c5e89361c4bec47dfb8ea..5cd85706018fe163d1e0a9e48e3b8a4b #include "ui/base/l10n/l10n_util.h" #include "ui/gfx/paint_vector_icon.h" diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc -index 8b9911c9819f334c9c634e986e6809ed6e1140c5..e8eb76a94a459bc293f47ad08099bc707527dd7b 100644 +index 4fceb3f5d802e7f01df59d1b3e9c80cc48af714a..70075228f6104b5a16f551af56eafc6829124143 100644 --- a/chrome/browser/ui/views/overlay/track_image_button.cc +++ b/chrome/browser/ui/views/overlay/track_image_button.cc @@ -6,7 +6,7 @@ @@ -167,4 +167,4 @@ index 8b9911c9819f334c9c634e986e6809ed6e1140c5..e8eb76a94a459bc293f47ad08099bc70 +#include "electron/grit/electron_resources.h" #include "components/vector_icons/vector_icons.h" #include "ui/base/l10n/l10n_util.h" - #include "ui/gfx/paint_vector_icon.h" + #include "ui/base/metadata/metadata_impl_macros.h" diff --git a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch index 09e877277aba..540fde1e316b 100644 --- a/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch +++ b/patches/chromium/refactor_expose_cursor_changes_to_the_webcontentsobserver.patch @@ -30,10 +30,10 @@ index fb25b91e254ca03002fda226861ff5b9c24f6b11..752f5e26b4f60561f38f08a8ce10cbce // RenderWidgetHost on the main frame, and false otherwise. virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*); diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc -index 06524496cdad2dfecc8a7cba98a44eac4fa87101..77cdeea65429b28bbb178d797406b7362c022624 100644 +index ac6e92d1dab80d2e9d3a48ac419102b93615d7a9..b56b5031abacad5e3d7c575097999845f4efd3e1 100644 --- a/content/browser/renderer_host/render_widget_host_impl.cc +++ b/content/browser/renderer_host/render_widget_host_impl.cc -@@ -1946,6 +1946,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { +@@ -1945,6 +1945,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) { void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) { if (view_) view_->UpdateCursor(WebCursor(cursor)); @@ -43,7 +43,7 @@ index 06524496cdad2dfecc8a7cba98a44eac4fa87101..77cdeea65429b28bbb178d797406b736 void RenderWidgetHostImpl::ShowContextMenuAtPoint( diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index 6acb183b87ebcfb5d769517985b691b9969bb6e6..2426eb615967cbe3d11ece998d97d63266fac184 100644 +index b1cbf6f76c2032dd3a6c90f1c9cf97ccaa734bec..54fce2b0b6da947473e8725bf97816de9f51b12a 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -4192,6 +4192,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() { @@ -59,7 +59,7 @@ index 6acb183b87ebcfb5d769517985b691b9969bb6e6..2426eb615967cbe3d11ece998d97d632 RenderWidgetHostImpl* render_widget_host) { return render_widget_host == GetMainFrame()->GetRenderWidgetHost(); diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h -index 345cdec6cb509341b23f5870c0660029c984e0bf..860301d6374687ab8f155e5091aba6239c37af35 100644 +index 2520b412d1cb644d44dbc12d6d4d1d4ab131ca33..e66c762b5093e7154920b7df8638733bd146f535 100644 --- a/content/browser/web_contents/web_contents_impl.h +++ b/content/browser/web_contents/web_contents_impl.h @@ -960,6 +960,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents, diff --git a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch index cbe056873486..caf878731211 100644 --- a/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch +++ b/patches/chromium/revert_remove_contentrendererclient_shouldfork.patch @@ -88,10 +88,10 @@ index 6191d4774ae35f00c3b58f62719962de616c8ad7..f717ae1d8e3bf642792f1dcfebbaa287 // |url|. If the function returns a valid |new_url|, the request must be // updated to use it. diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc -index 2d0d35843ee2ed2e13c053790fdbfd625a9a0071..f4abb34513e76cf76deb58810b1b4d9387ac0fec 100644 +index abcfd464b8a92f65623bc4527123cc75ad38b712..33fe8d118ced62aaba2c81ade206382395630086 100644 --- a/content/renderer/render_frame_impl.cc +++ b/content/renderer/render_frame_impl.cc -@@ -4928,6 +4928,22 @@ void RenderFrameImpl::BeginNavigation( +@@ -4924,6 +4924,22 @@ void RenderFrameImpl::BeginNavigation( // we can do a per-frame check here rather than a process-wide check. bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) || (enabled_bindings_ & kWebUIBindingsPolicyMask); diff --git a/patches/chromium/scroll_bounce_flag.patch b/patches/chromium/scroll_bounce_flag.patch index 4117a125dd97..15f093540ad3 100644 --- a/patches/chromium/scroll_bounce_flag.patch +++ b/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 fcb90d8024c7677ea15ff73064f51886b333a512..fa2ecae71873d4d83b805f73b8978fbadb5b1245 100644 +index 2d3f4ec3c94f669276ad8e8b5595f49100b7ad34..51321a2ee5602ae628eaad77e519b4d9c2821b3f 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc -@@ -1270,7 +1270,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { +@@ -1250,7 +1250,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() { } bool RenderThreadImpl::IsElasticOverscrollEnabled() { diff --git a/patches/chromium/support_mixed_sandbox_with_zygote.patch b/patches/chromium/support_mixed_sandbox_with_zygote.patch index 80cc382d91d6..49aa63023c5b 100644 --- a/patches/chromium/support_mixed_sandbox_with_zygote.patch +++ b/patches/chromium/support_mixed_sandbox_with_zygote.patch @@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it does touch a security-sensitive class. diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc -index 1a01a7264f7a89c6b6f1d4e903333718adfbeb2d..43ad6054fc9c310fb78f8e718a91d29cfcc797d8 100644 +index 2afda54851efbb052371ce1e49f29cc56e93dce4..4208521cf4f03a154f44d5bd925f1cc12c306e20 100644 --- a/content/browser/renderer_host/render_process_host_impl.cc +++ b/content/browser/renderer_host/render_process_host_impl.cc -@@ -388,10 +388,18 @@ class RendererSandboxedProcessLauncherDelegate +@@ -387,10 +387,18 @@ class RendererSandboxedProcessLauncherDelegate public: RendererSandboxedProcessLauncherDelegate() = default; @@ -44,7 +44,7 @@ index 1a01a7264f7a89c6b6f1d4e903333718adfbeb2d..43ad6054fc9c310fb78f8e718a91d29c const base::CommandLine& browser_command_line = *base::CommandLine::ForCurrentProcess(); base::CommandLine::StringType renderer_prefix = -@@ -409,6 +417,11 @@ class RendererSandboxedProcessLauncherDelegate +@@ -408,6 +416,11 @@ class RendererSandboxedProcessLauncherDelegate sandbox::policy::SandboxType GetSandboxType() override { return sandbox::policy::SandboxType::kRenderer; } @@ -56,7 +56,7 @@ index 1a01a7264f7a89c6b6f1d4e903333718adfbeb2d..43ad6054fc9c310fb78f8e718a91d29c }; #if defined(OS_WIN) -@@ -419,6 +432,9 @@ class RendererSandboxedProcessLauncherDelegateWin +@@ -418,6 +431,9 @@ class RendererSandboxedProcessLauncherDelegateWin RendererSandboxedProcessLauncherDelegateWin(base::CommandLine* cmd_line) : renderer_code_integrity_enabled_( GetContentClient()->browser()->IsRendererCodeIntegrityEnabled()) { @@ -66,7 +66,7 @@ index 1a01a7264f7a89c6b6f1d4e903333718adfbeb2d..43ad6054fc9c310fb78f8e718a91d29c if (cmd_line->HasSwitch(switches::kJavaScriptFlags)) { std::string js_flags = cmd_line->GetSwitchValueASCII(switches::kJavaScriptFlags); -@@ -1879,9 +1895,15 @@ bool RenderProcessHostImpl::Init() { +@@ -1878,9 +1894,15 @@ bool RenderProcessHostImpl::Init() { std::unique_ptr sandbox_delegate = std::make_unique( cmd_line.get()); diff --git a/patches/chromium/web_contents.patch b/patches/chromium/web_contents.patch index 8495324e7ad8..864522ffec76 100644 --- a/patches/chromium/web_contents.patch +++ b/patches/chromium/web_contents.patch @@ -9,7 +9,7 @@ is needed for OSR. Originally landed in https://github.com/electron/libchromiumcontent/pull/226. diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc -index f4c8d9e8a20f9be8c6566857fcf1d57ba7ec1af7..96a40070b3aab960d8e0639636f1a0ee346b0ed3 100644 +index aa50664e5fcb88ac72118ba5d354f835d427b6fd..93b554fb8e6f560ff1e1081e34430f3ad65b7ca1 100644 --- a/content/browser/web_contents/web_contents_impl.cc +++ b/content/browser/web_contents/web_contents_impl.cc @@ -2774,6 +2774,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { diff --git a/patches/chromium/worker_context_will_destroy.patch b/patches/chromium/worker_context_will_destroy.patch index 3b6707e92675..94d555db3843 100644 --- a/patches/chromium/worker_context_will_destroy.patch +++ b/patches/chromium/worker_context_will_destroy.patch @@ -26,10 +26,10 @@ index a0d7f49d1e4ca4009fbebc0bd7df234eb6850b08..6191d4774ae35f00c3b58f62719962de // 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 1db5cf167274eefc24be8071aecfae23e6b35c9c..eccb1b6257d8e57e4c20c015e96987852c90eafa 100644 +index a0bf74769bf06bb8a97b675c9eeac4d6c3829964..1f6380f738fd41906e79839560498b54461c6cea 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -917,6 +917,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { +@@ -916,6 +916,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() { WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread(); } diff --git a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch index 0781edc8b86e..0319a90e9992 100644 --- a/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch +++ b/patches/chromium/worker_feat_add_hook_to_notify_script_ready.patch @@ -35,10 +35,10 @@ index f717ae1d8e3bf642792f1dcfebbaa2870ff97694..65d3085260e054a671afbecf55062d17 // from the worker thread. virtual void WillDestroyWorkerContextOnWorkerThread( diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc -index eccb1b6257d8e57e4c20c015e96987852c90eafa..9b6ce666b9e268bf4157e00e94d54f5b87491e3b 100644 +index 1f6380f738fd41906e79839560498b54461c6cea..bf6b13594de39cbf96df332922a2b364219b7905 100644 --- a/content/renderer/renderer_blink_platform_impl.cc +++ b/content/renderer/renderer_blink_platform_impl.cc -@@ -929,6 +929,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( +@@ -928,6 +928,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated( worker); } diff --git a/patches/v8/build_gn.patch b/patches/v8/build_gn.patch index 22c7872656f0..6d7655ab44a8 100644 --- a/patches/v8/build_gn.patch +++ b/patches/v8/build_gn.patch @@ -9,10 +9,10 @@ necessary for native modules to load. Also, some fixes relating to mksnapshot on ARM. diff --git a/BUILD.gn b/BUILD.gn -index 1a94829652fb309759927dab9b67951d14d43c01..34cfa21668d409cd0e2de2c96ee52f5b575df742 100644 +index ff0aaa30098839a1186626061363aca985c8e46d..cf0daf8006928970e8dc2e9dd2cb20985d3309ae 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -510,7 +510,7 @@ config("internal_config") { +@@ -507,7 +507,7 @@ config("internal_config") { ":cppgc_header_features", ] @@ -21,7 +21,7 @@ index 1a94829652fb309759927dab9b67951d14d43c01..34cfa21668d409cd0e2de2c96ee52f5b defines += [ "BUILDING_V8_SHARED" ] } } -@@ -5183,7 +5183,7 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5182,7 +5182,7 @@ if (current_toolchain == v8_generator_toolchain) { "src/interpreter/bytecodes.h", ] @@ -30,7 +30,7 @@ index 1a94829652fb309759927dab9b67951d14d43c01..34cfa21668d409cd0e2de2c96ee52f5b deps = [ ":v8_libbase", -@@ -5221,6 +5221,8 @@ if (current_toolchain == v8_snapshot_toolchain) { +@@ -5220,6 +5220,8 @@ if (current_toolchain == v8_snapshot_toolchain) { configs = [ ":internal_config" ] diff --git a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch index 7a70c9a6e6fb..e09914d2c417 100644 --- a/patches/v8/do_not_export_private_v8_symbols_on_windows.patch +++ b/patches/v8/do_not_export_private_v8_symbols_on_windows.patch @@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not contain any standard C++ library exports (e.g. `std::ostringstream`). diff --git a/BUILD.gn b/BUILD.gn -index 04ded39fa48c2a46b3603e56e06e198f1ea5dc15..aefef3f07bb843bd84f6d4e5b70e98bedf189ac5 100644 +index 71afc320af85b8f0021ba3e64aacb0f1af5a45ab..98b1e1f346c5d6c8b1f6574c5154446d7c6257df 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -510,6 +510,10 @@ config("internal_config") { +@@ -507,6 +507,10 @@ config("internal_config") { ":cppgc_header_features", ] diff --git a/patches/v8/expose_mksnapshot.patch b/patches/v8/expose_mksnapshot.patch index 54d658531d3e..d6fc6f5b7d83 100644 --- a/patches/v8/expose_mksnapshot.patch +++ b/patches/v8/expose_mksnapshot.patch @@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch Needed in order to target mksnapshot for mksnapshot zip. diff --git a/BUILD.gn b/BUILD.gn -index 34cfa21668d409cd0e2de2c96ee52f5b575df742..04ded39fa48c2a46b3603e56e06e198f1ea5dc15 100644 +index cf0daf8006928970e8dc2e9dd2cb20985d3309ae..71afc320af85b8f0021ba3e64aacb0f1af5a45ab 100644 --- a/BUILD.gn +++ b/BUILD.gn -@@ -5195,7 +5195,6 @@ if (current_toolchain == v8_generator_toolchain) { +@@ -5194,7 +5194,6 @@ if (current_toolchain == v8_generator_toolchain) { if (current_toolchain == v8_snapshot_toolchain) { v8_executable("mksnapshot") { diff --git a/shell/browser/api/electron_api_browser_window.h b/shell/browser/api/electron_api_browser_window.h index d398249aee77..d2fb9b1ac145 100644 --- a/shell/browser/api/electron_api_browser_window.h +++ b/shell/browser/api/electron_api_browser_window.h @@ -117,7 +117,7 @@ class BrowserWindow : public BaseWindow, // Closure that would be called when window is unresponsive when closing, // it should be cancelled when we can prove that the window is responsive. - base::CancelableClosure window_unresponsive_closure_; + base::CancelableRepeatingClosure window_unresponsive_closure_; #if defined(OS_MAC) std::vector draggable_regions_; diff --git a/shell/browser/api/electron_api_global_shortcut.cc b/shell/browser/api/electron_api_global_shortcut.cc index 6c160426084f..4caf6b95f00b 100644 --- a/shell/browser/api/electron_api_global_shortcut.cc +++ b/shell/browser/api/electron_api_global_shortcut.cc @@ -73,7 +73,7 @@ void GlobalShortcut::OnKeyPressed(const ui::Accelerator& accelerator) { bool GlobalShortcut::RegisterAll( const std::vector& accelerators, - const base::Closure& callback) { + const base::RepeatingClosure& callback) { if (!electron::Browser::Get()->is_ready()) { gin_helper::ErrorThrower(JavascriptEnvironment::GetIsolate()) .ThrowError("globalShortcut cannot be used before the app is ready"); @@ -94,7 +94,7 @@ bool GlobalShortcut::RegisterAll( } bool GlobalShortcut::Register(const ui::Accelerator& accelerator, - const base::Closure& callback) { + const base::RepeatingClosure& callback) { if (!electron::Browser::Get()->is_ready()) { gin_helper::ErrorThrower(JavascriptEnvironment::GetIsolate()) .ThrowError("globalShortcut cannot be used before the app is ready"); diff --git a/shell/browser/api/electron_api_global_shortcut.h b/shell/browser/api/electron_api_global_shortcut.h index fea58d668ec1..99ab90ebbd0a 100644 --- a/shell/browser/api/electron_api_global_shortcut.h +++ b/shell/browser/api/electron_api_global_shortcut.h @@ -35,12 +35,13 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, ~GlobalShortcut() override; private: - typedef std::map AcceleratorCallbackMap; + typedef std::map + AcceleratorCallbackMap; bool RegisterAll(const std::vector& accelerators, - const base::Closure& callback); + const base::RepeatingClosure& callback); bool Register(const ui::Accelerator& accelerator, - const base::Closure& callback); + const base::RepeatingClosure& callback); bool IsRegistered(const ui::Accelerator& accelerator); void Unregister(const ui::Accelerator& accelerator); void UnregisterSome(const std::vector& accelerators); diff --git a/shell/browser/browser.h b/shell/browser/browser.h index 9ff26a07c66a..12e1f8876ba1 100755 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -155,7 +155,7 @@ class Browser : public WindowListObserver { #if defined(OS_MAC) // Set the handler which decides whether to shutdown. - void SetShutdownHandler(base::Callback handler); + void SetShutdownHandler(base::RepeatingCallback handler); // Hide the application. void Hide(); diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 55596891b48a..968d6cd89a2d 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -93,7 +93,7 @@ v8::Local Browser::GetApplicationInfoForProtocol( return handle; } -void Browser::SetShutdownHandler(base::Callback handler) { +void Browser::SetShutdownHandler(base::RepeatingCallback handler) { [[AtomApplication sharedApplication] setShutdownHandler:std::move(handler)]; } diff --git a/shell/browser/cookie_change_notifier.cc b/shell/browser/cookie_change_notifier.cc index b52a79d66fba..88fde2207485 100644 --- a/shell/browser/cookie_change_notifier.cc +++ b/shell/browser/cookie_change_notifier.cc @@ -26,7 +26,8 @@ CookieChangeNotifier::~CookieChangeNotifier() = default; base::CallbackListSubscription CookieChangeNotifier::RegisterCookieChangeCallback( - const base::Callback& cb) { + const base::RepeatingCallback& + cb) { DCHECK_CURRENTLY_ON(BrowserThread::UI); return cookie_change_sub_list_.Add(cb); diff --git a/shell/browser/cookie_change_notifier.h b/shell/browser/cookie_change_notifier.h index e2cf9546d993..98efb57bbff8 100644 --- a/shell/browser/cookie_change_notifier.h +++ b/shell/browser/cookie_change_notifier.h @@ -25,7 +25,8 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener { // Register callbacks that needs to notified on any cookie store changes. base::CallbackListSubscription RegisterCookieChangeCallback( - const base::Callback& cb); + const base::RepeatingCallback& + cb); private: void StartListening(); diff --git a/shell/browser/electron_download_manager_delegate.h b/shell/browser/electron_download_manager_delegate.h index 29fcfa157845..2c9ae9bc9f76 100644 --- a/shell/browser/electron_download_manager_delegate.h +++ b/shell/browser/electron_download_manager_delegate.h @@ -22,7 +22,7 @@ class ElectronDownloadManagerDelegate : public content::DownloadManagerDelegate { public: using CreateDownloadPathCallback = - base::Callback; + base::RepeatingCallback; explicit ElectronDownloadManagerDelegate(content::DownloadManager* manager); ~ElectronDownloadManagerDelegate() override; diff --git a/shell/browser/electron_permission_manager.h b/shell/browser/electron_permission_manager.h index 40013b3e89ca..45e78f9ab7d4 100644 --- a/shell/browser/electron_permission_manager.h +++ b/shell/browser/electron_permission_manager.h @@ -29,14 +29,15 @@ class ElectronPermissionManager : public content::PermissionControllerDelegate { base::OnceCallback; using StatusesCallback = base::OnceCallback&)>; - using RequestHandler = base::Callback; - using CheckHandler = base::Callback; + using RequestHandler = base::RepeatingCallback; + using CheckHandler = + base::RepeatingCallback; // Handler to dispatch permission requests in JS. void SetPermissionRequestHandler(const RequestHandler& handler); diff --git a/shell/browser/lib/power_observer_linux.cc b/shell/browser/lib/power_observer_linux.cc index cc473775c6b3..8ed6b4c9b738 100644 --- a/shell/browser/lib/power_observer_linux.cc +++ b/shell/browser/lib/power_observer_linux.cc @@ -115,7 +115,8 @@ void PowerObserverLinux::UnblockShutdown() { shutdown_lock_.reset(); } -void PowerObserverLinux::SetShutdownHandler(base::Callback handler) { +void PowerObserverLinux::SetShutdownHandler( + base::RepeatingCallback handler) { // In order to delay system shutdown when e.preventDefault() is invoked // on a powerMonitor 'shutdown' event, we need an org.freedesktop.login1 // shutdown delay lock. For more details see the "Taking Delay Locks" diff --git a/shell/browser/lib/power_observer_linux.h b/shell/browser/lib/power_observer_linux.h index c92a7c0660f0..a0a7e783249f 100644 --- a/shell/browser/lib/power_observer_linux.h +++ b/shell/browser/lib/power_observer_linux.h @@ -22,7 +22,7 @@ class PowerObserverLinux { explicit PowerObserverLinux(base::PowerSuspendObserver* suspend_observer); ~PowerObserverLinux(); - void SetShutdownHandler(base::Callback should_shutdown); + void SetShutdownHandler(base::RepeatingCallback should_shutdown); private: void BlockSleep(); diff --git a/shell/browser/mac/electron_application.h b/shell/browser/mac/electron_application.h index 074d9c20be50..70d312236a43 100644 --- a/shell/browser/mac/electron_application.h +++ b/shell/browser/mac/electron_application.h @@ -18,12 +18,12 @@ NSCondition* handoffLock_; BOOL updateReceived_; BOOL userStoppedShutdown_; - base::Callback shouldShutdown_; + base::RepeatingCallback shouldShutdown_; } + (AtomApplication*)sharedApplication; -- (void)setShutdownHandler:(base::Callback)handler; +- (void)setShutdownHandler:(base::RepeatingCallback)handler; - (void)registerURLHandler; // Called when macOS itself is shutting down. diff --git a/shell/browser/mac/electron_application.mm b/shell/browser/mac/electron_application.mm index e3c65c9eeeac..a4cc956cc183 100644 --- a/shell/browser/mac/electron_application.mm +++ b/shell/browser/mac/electron_application.mm @@ -56,7 +56,7 @@ inline void dispatch_sync_main(dispatch_block_t block) { electron::Browser::Get()->Quit(); } -- (void)setShutdownHandler:(base::Callback)handler { +- (void)setShutdownHandler:(base::RepeatingCallback)handler { shouldShutdown_ = std::move(handler); } diff --git a/shell/browser/net/electron_url_loader_factory.h b/shell/browser/net/electron_url_loader_factory.h index 26fff062e86e..7d26e3328573 100644 --- a/shell/browser/net/electron_url_loader_factory.h +++ b/shell/browser/net/electron_url_loader_factory.h @@ -33,7 +33,8 @@ enum class ProtocolType { using StartLoadingCallback = base::OnceCallback; using ProtocolHandler = - base::Callback; + base::RepeatingCallback; // scheme => (type, handler). using HandlersMap = diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index ebb2c6af94ab..593ab3de82b5 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/shell/browser/osr/osr_host_display_client.h @@ -17,7 +17,8 @@ namespace electron { -typedef base::Callback OnPaintCallback; +typedef base::RepeatingCallback + OnPaintCallback; class LayeredWindowUpdater : public viz::mojom::LayeredWindowUpdater { public: diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 6dc50afd6b3b..0e037c8e3d6f 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -52,8 +52,9 @@ class ElectronBeginFrameTimer; class ElectronDelegatedFrameHostClient; -typedef base::Callback OnPaintCallback; -typedef base::Callback OnPopupPaintCallback; +typedef base::RepeatingCallback + OnPaintCallback; +typedef base::RepeatingCallback OnPopupPaintCallback; class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, public ui::CompositorDelegate, diff --git a/shell/browser/ui/gtk/app_indicator_icon_menu.cc b/shell/browser/ui/gtk/app_indicator_icon_menu.cc index 8f74749bddf9..ea7c0f552f28 100644 --- a/shell/browser/ui/gtk/app_indicator_icon_menu.cc +++ b/shell/browser/ui/gtk/app_indicator_icon_menu.cc @@ -37,7 +37,7 @@ AppIndicatorIconMenu::~AppIndicatorIconMenu() { void AppIndicatorIconMenu::UpdateClickActionReplacementMenuItem( const char* label, - const base::Closure& callback) { + const base::RepeatingClosure& callback) { click_action_replacement_callback_ = callback; if (click_action_replacement_menu_item_added_) { diff --git a/shell/browser/ui/gtk/app_indicator_icon_menu.h b/shell/browser/ui/gtk/app_indicator_icon_menu.h index d7f25bf9dd09..e849e31ac51c 100644 --- a/shell/browser/ui/gtk/app_indicator_icon_menu.h +++ b/shell/browser/ui/gtk/app_indicator_icon_menu.h @@ -29,8 +29,9 @@ class AppIndicatorIconMenu { // Sets a menu item at the top of |gtk_menu_| as a replacement for the app // indicator icon's click action. |callback| is called when the menu item // is activated. - void UpdateClickActionReplacementMenuItem(const char* label, - const base::Closure& callback); + void UpdateClickActionReplacementMenuItem( + const char* label, + const base::RepeatingClosure& callback); // Refreshes all the menu item labels and menu item checked/enabled states. void Refresh(); @@ -59,7 +60,7 @@ class AppIndicatorIconMenu { // Called when the click action replacement menu item is activated. When a // menu item from |menu_model_| is activated, MenuModel::ActivatedAt() is // invoked and is assumed to do any necessary processing. - base::Closure click_action_replacement_callback_; + base::RepeatingClosure click_action_replacement_callback_; GtkWidget* gtk_menu_ = nullptr; diff --git a/shell/browser/ui/win/taskbar_host.h b/shell/browser/ui/win/taskbar_host.h index 4d09f232e0e3..12b4b2e82eab 100644 --- a/shell/browser/ui/win/taskbar_host.h +++ b/shell/browser/ui/win/taskbar_host.h @@ -25,7 +25,7 @@ class TaskbarHost { std::string tooltip; gfx::Image icon; std::vector flags; - base::Closure clicked_callback; + base::RepeatingClosure clicked_callback; ThumbarButton(); ThumbarButton(const ThumbarButton&); @@ -66,7 +66,7 @@ class TaskbarHost { // Initialize the taskbar object. bool InitializeTaskbar(); - using CallbackMap = std::map; + using CallbackMap = std::map; CallbackMap callback_map_; std::vector last_buttons_; diff --git a/shell/common/gin_helper/callback.h b/shell/common/gin_helper/callback.h index 363619bde3a2..4e5a5614baf2 100644 --- a/shell/common/gin_helper/callback.h +++ b/shell/common/gin_helper/callback.h @@ -14,7 +14,7 @@ #include "shell/common/gin_helper/function_template.h" #include "shell/common/gin_helper/locker.h" #include "shell/common/gin_helper/microtasks_scope.h" -// Implements safe convertions between JS functions and base::Callback. +// Implements safe convertions between JS functions and base::RepeatingCallback. namespace gin_helper { @@ -111,7 +111,7 @@ struct V8FunctionInvoker { }; // Helper to pass a C++ funtion to JavaScript. -using Translater = base::Callback; +using Translater = base::RepeatingCallback; v8::Local CreateFunctionFromTranslater(v8::Isolate* isolate, const Translater& translater, bool one_time); @@ -127,7 +127,7 @@ struct NativeFunctionInvoker {}; template struct NativeFunctionInvoker { - static void Go(base::Callback val, + static void Go(base::RepeatingCallback val, gin::Arguments* args) { using Indices = typename IndicesGenerator::type; Invoker invoker(args, 0); diff --git a/shell/common/gin_helper/constructor.h b/shell/common/gin_helper/constructor.h index 73b5dbed1ca4..efaffd4c4aeb 100644 --- a/shell/common/gin_helper/constructor.h +++ b/shell/common/gin_helper/constructor.h @@ -12,19 +12,19 @@ namespace gin_helper { namespace internal { -// This set of templates invokes a base::Callback by converting the Arguments -// into native types. It relies on the function_template.h to provide helper -// templates. +// This set of templates invokes a base::RepeatingCallback by converting the +// Arguments into native types. It relies on the function_template.h to provide +// helper templates. inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& callback) { return callback.Run(); } template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& callback) { typename CallbackParamTraits::LocalType a1; if (!gin_helper::GetNextArgument(args, 0, true, &a1)) return nullptr; @@ -34,7 +34,7 @@ inline WrappableBase* InvokeFactory( template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& callback) { typename CallbackParamTraits::LocalType a1; typename CallbackParamTraits::LocalType a2; if (!gin_helper::GetNextArgument(args, 0, true, &a1) || @@ -46,7 +46,7 @@ inline WrappableBase* InvokeFactory( template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& callback) { typename CallbackParamTraits::LocalType a1; typename CallbackParamTraits::LocalType a2; typename CallbackParamTraits::LocalType a3; @@ -60,7 +60,7 @@ inline WrappableBase* InvokeFactory( template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& callback) { typename CallbackParamTraits::LocalType a1; typename CallbackParamTraits::LocalType a2; typename CallbackParamTraits::LocalType a3; @@ -76,7 +76,8 @@ inline WrappableBase* InvokeFactory( template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& + callback) { typename CallbackParamTraits::LocalType a1; typename CallbackParamTraits::LocalType a2; typename CallbackParamTraits::LocalType a3; @@ -99,7 +100,8 @@ template inline WrappableBase* InvokeFactory( gin::Arguments* args, - const base::Callback& callback) { + const base::RepeatingCallback& + callback) { typename CallbackParamTraits::LocalType a1; typename CallbackParamTraits::LocalType a2; typename CallbackParamTraits::LocalType a3; @@ -117,7 +119,7 @@ inline WrappableBase* InvokeFactory( } template -void InvokeNew(const base::Callback& factory, +void InvokeNew(const base::RepeatingCallback& factory, v8::Isolate* isolate, gin_helper::Arguments* args) { if (!args->IsConstructCall()) { diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index def4d2151ea4..afab3da3264f 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -41,7 +41,8 @@ struct CallbackParamTraits { typedef T* LocalType; }; -// CallbackHolder and CallbackHolderBase are used to pass a base::Callback from +// CallbackHolder and CallbackHolderBase are used to pass a +// base::RepeatingCallback from // CreateFunctionTemplate through v8 (via v8::FunctionTemplate) to // DispatchToCallback, where it is invoked. @@ -70,10 +71,10 @@ template class CallbackHolder : public CallbackHolderBase { public: CallbackHolder(v8::Isolate* isolate, - const base::Callback& callback, + const base::RepeatingCallback& callback, int flags) : CallbackHolderBase(isolate), callback(callback), flags(flags) {} - base::Callback callback; + base::RepeatingCallback callback; int flags = 0; private: @@ -214,7 +215,8 @@ class Invoker, ArgTypes...> bool IsOK() { return And(ArgumentHolder::ok...); } template - void DispatchToCallback(base::Callback callback) { + void DispatchToCallback( + base::RepeatingCallback callback) { gin_helper::MicrotasksScope microtasks_scope(args_->isolate(), true); args_->Return( callback.Run(std::move(ArgumentHolder::value)...)); @@ -223,7 +225,7 @@ class Invoker, ArgTypes...> // In C++, you can declare the function foo(void), but you can't pass a void // expression to foo. As a result, we must specialize the case of Callbacks // that have the void return type. - void DispatchToCallback(base::Callback callback) { + void DispatchToCallback(base::RepeatingCallback callback) { gin_helper::MicrotasksScope microtasks_scope(args_->isolate(), true); callback.Run(std::move(ArgumentHolder::value)...); } @@ -239,7 +241,7 @@ class Invoker, ArgTypes...> }; // DispatchToCallback converts all the JavaScript arguments to C++ types and -// invokes the base::Callback. +// invokes the base::RepeatingCallback. template struct Dispatcher {}; @@ -264,7 +266,8 @@ struct Dispatcher { }; // CreateFunctionTemplate creates a v8::FunctionTemplate that will create -// JavaScript functions that execute a provided C++ function or base::Callback. +// JavaScript functions that execute a provided C++ function or +// base::RepeatingCallback. // JavaScript arguments are automatically converted via gin::Converter, as is // the return value of the C++ function, if any. // @@ -275,7 +278,7 @@ struct Dispatcher { template v8::Local CreateFunctionTemplate( v8::Isolate* isolate, - const base::Callback callback, + const base::RepeatingCallback callback, int callback_flags = 0) { typedef CallbackHolder HolderT; HolderT* holder = new HolderT(isolate, callback, callback_flags); @@ -298,9 +301,9 @@ struct CallbackTraits { } }; -// Specialization for base::Callback. +// Specialization for base::RepeatingCallback. template -struct CallbackTraits> { +struct CallbackTraits> { static v8::Local CreateTemplate( v8::Isolate* isolate, const base::RepeatingCallback& callback) { diff --git a/shell/common/gin_helper/object_template_builder.h b/shell/common/gin_helper/object_template_builder.h index b22ada2bd23e..8c9207dc9c4e 100644 --- a/shell/common/gin_helper/object_template_builder.h +++ b/shell/common/gin_helper/object_template_builder.h @@ -32,9 +32,9 @@ class ObjectTemplateBuilder { } // In the following methods, T and U can be function pointer, member function - // pointer, base::Callback, or v8::FunctionTemplate. Most clients will want to - // use one of the first two options. Also see gin::CreateFunctionTemplate() - // for creating raw function templates. + // pointer, base::RepeatingCallback, or v8::FunctionTemplate. Most clients + // will want to use one of the first two options. Also see + // gin::CreateFunctionTemplate() for creating raw function templates. template ObjectTemplateBuilder& SetMethod(const base::StringPiece& name, const T& callback) { diff --git a/shell/common/gin_helper/wrappable.h b/shell/common/gin_helper/wrappable.h index 7568ac731081..fbec908e6140 100644 --- a/shell/common/gin_helper/wrappable.h +++ b/shell/common/gin_helper/wrappable.h @@ -24,7 +24,7 @@ class Wrappable : public WrappableBase { template static void SetConstructor(v8::Isolate* isolate, - const base::Callback& constructor) { + const base::RepeatingCallback& constructor) { v8::Local templ = gin_helper::CreateFunctionTemplate( isolate, base::BindRepeating(&internal::InvokeNew, constructor)); templ->InstanceTemplate()->SetInternalFieldCount(1); diff --git a/shell/renderer/guest_view_container.h b/shell/renderer/guest_view_container.h index 2bf4c9e48755..7b34a97fc5bd 100644 --- a/shell/renderer/guest_view_container.h +++ b/shell/renderer/guest_view_container.h @@ -16,7 +16,7 @@ namespace electron { class GuestViewContainer { public: - typedef base::Callback ResizeCallback; + typedef base::RepeatingCallback ResizeCallback; explicit GuestViewContainer(content::RenderFrame* render_frame); virtual ~GuestViewContainer();