diff options
author | Marshall Greenblatt <magreenblatt@gmail.com> | 2023-01-30 12:43:54 -0500 |
---|---|---|
committer | Marshall Greenblatt <magreenblatt@gmail.com> | 2023-02-03 13:00:26 -0500 |
commit | dc2231cdfb6c355d83c6121ffe2912ea30e6eef0 (patch) | |
tree | 259a2b729ff80e5ce2b724f70205cb8d7e9d6f27 | |
parent | 4c41f143605524e344ed766cd3c52e9a6b1c6532 (diff) | |
download | cef-dc2231cdfb6c355d83c6121ffe2912ea30e6eef0.tar.gz |
Update to Chromium version 111.0.5563.0 (#1097615)
179 files changed, 986 insertions, 930 deletions
@@ -1079,7 +1079,6 @@ source_set("libcef_static") { "libcef/browser/alloy/alloy_browser_main_win.cc", "libcef/browser/native/browser_platform_delegate_native_win.cc", "libcef/browser/native/browser_platform_delegate_native_win.h", - "libcef/browser/native/cursor_util_win.cc", "libcef/browser/osr/browser_platform_delegate_osr_win.cc", "libcef/browser/osr/browser_platform_delegate_osr_win.h", ] @@ -1108,7 +1107,6 @@ source_set("libcef_static") { sources += includes_linux + [ "libcef/browser/native/browser_platform_delegate_native_linux.cc", "libcef/browser/native/browser_platform_delegate_native_linux.h", - "libcef/browser/native/cursor_util_linux.cc", "libcef/browser/osr/browser_platform_delegate_osr_linux.cc", "libcef/browser/osr/browser_platform_delegate_osr_linux.h", "libcef/browser/printing/print_dialog_linux.cc", @@ -1140,6 +1138,7 @@ source_set("libcef_static") { sources += includes_mac + [ "libcef/browser/native/browser_platform_delegate_native_mac.h", "libcef/browser/native/browser_platform_delegate_native_mac.mm", + "libcef/browser/native/cursor_util_mac.mm", "libcef/browser/native/javascript_dialog_runner_mac.h", "libcef/browser/native/javascript_dialog_runner_mac.mm", "libcef/browser/native/menu_runner_mac.h", @@ -1168,6 +1167,7 @@ source_set("libcef_static") { sources += [ "libcef/browser/native/browser_platform_delegate_native_aura.cc", "libcef/browser/native/browser_platform_delegate_native_aura.h", + "libcef/browser/native/cursor_util_aura.cc", "libcef/browser/native/menu_runner_views_aura.cc", "libcef/browser/native/menu_runner_views_aura.h", "libcef/browser/views/view_util_aura.cc", @@ -1356,7 +1356,7 @@ make_pack_header("resources") { "$root_gen_dir/net/grit/net_resources.h", "$root_gen_dir/third_party/blink/public/resources/grit/blink_resources.h", "$root_gen_dir/ui/resources/grit/ui_resources.h", - "$root_gen_dir/ui/resources/grit/webui_generated_resources.h", + "$root_gen_dir/ui/resources/grit/webui_resources.h", "$root_gen_dir/ui/views/resources/grit/views_resources.h", ] @@ -1383,7 +1383,7 @@ make_pack_header("resources") { "//net:net_resources", "//third_party/blink/public:resources", "//ui/resources:ui_resources_grd", - "//ui/resources:webui_generated_resources_grd", + "//ui/resources:webui_resources_grd", "//ui/views/resources:resources_grd", ] } diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 67c9f6cd..7072cffc 100644 --- a/CHROMIUM_BUILD_COMPATIBILITY.txt +++ b/CHROMIUM_BUILD_COMPATIBILITY.txt @@ -7,5 +7,5 @@ # https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding { - 'chromium_checkout': 'refs/tags/110.0.5481.0' + 'chromium_checkout': 'refs/tags/111.0.5563.0' } diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index 8ec7d566..fc329321 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -531,6 +531,7 @@ if(OS_WINDOWS) Advapi32.lib dbghelp.lib Delayimp.lib + ntdll.lib OleAut32.lib PowrProf.lib Propsys.lib diff --git a/include/base/cef_bind.h b/include/base/cef_bind.h index 3c655c80..770e373e 100644 --- a/include/base/cef_bind.h +++ b/include/base/cef_bind.h @@ -71,7 +71,7 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -#include "base/bind.h" +#include "base/functional/bind.h" #else // !USING_CHROMIUM_INCLUDES // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be diff --git a/include/base/cef_callback.h b/include/base/cef_callback.h index 080fb4db..bcfe4992 100644 --- a/include/base/cef_callback.h +++ b/include/base/cef_callback.h @@ -67,7 +67,7 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -#include "base/callback.h" +#include "base/functional/callback.h" #else // !USING_CHROMIUM_INCLUDES // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be diff --git a/include/base/cef_callback_forward.h b/include/base/cef_callback_forward.h index 863152fb..2d227743 100644 --- a/include/base/cef_callback_forward.h +++ b/include/base/cef_callback_forward.h @@ -34,7 +34,7 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #else // !USING_CHROMIUM_INCLUDES // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be diff --git a/include/base/cef_callback_helpers.h b/include/base/cef_callback_helpers.h index bb572f70..5e386440 100644 --- a/include/base/cef_callback_helpers.h +++ b/include/base/cef_callback_helpers.h @@ -39,7 +39,7 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -#include "base/callback_helpers.h" +#include "base/functional/callback_helpers.h" #else // !USING_CHROMIUM_INCLUDES // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be diff --git a/include/base/cef_callback_list.h b/include/base/cef_callback_list.h index 010857a6..2038acb7 100644 --- a/include/base/cef_callback_list.h +++ b/include/base/cef_callback_list.h @@ -86,7 +86,7 @@ #if defined(USING_CHROMIUM_INCLUDES) // When building CEF include the Chromium header directly. -#include "base/callback_list.h" +#include "base/functional/callback_list.h" #else // !USING_CHROMIUM_INCLUDES // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be diff --git a/include/capi/cef_media_router_capi.h b/include/capi/cef_media_router_capi.h index 4ee594d7..27f9d0e1 100644 --- a/include/capi/cef_media_router_capi.h +++ b/include/capi/cef_media_router_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=333350f8141cc925d16df2edc8c21a720a1008f0$ +// $hash=de4a9b856c6951231f446991a9b1efb89096ad3b$ // #ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ @@ -258,13 +258,6 @@ typedef struct _cef_media_sink_t { cef_string_userfree_t(CEF_CALLBACK* get_name)(struct _cef_media_sink_t* self); /// - /// Returns the description of this sink. - /// - // The resulting string must be freed by calling cef_string_userfree_free(). - cef_string_userfree_t(CEF_CALLBACK* get_description)( - struct _cef_media_sink_t* self); - - /// /// Returns the icon type for this sink. /// cef_media_sink_icon_type_t(CEF_CALLBACK* get_icon_type)( diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index 53bf6f50..ed2d9f9d 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "fc4393fe8a78980a4d8689ff8b13094fae3c3e50" +#define CEF_API_HASH_UNIVERSAL "ec5797fa2a4dabdcf61183905db6b8ff2b79f9f0" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "c41fbde76401eaecb7bdf4851d162e1416285ac1" +#define CEF_API_HASH_PLATFORM "011499a93a394bf5fa92ebf0047de5ee1a4e5841" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "031d539913b42e85711402dd5f17fa9aada7ebab" +#define CEF_API_HASH_PLATFORM "8f276dfddb7341168f9ce0f705df212f08e2f08c" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "ceef4f8220761b7bd5bb9959bacd3d55a2dcc484" +#define CEF_API_HASH_PLATFORM "3c239fa16f5a3f9f452b185c750c7145fc305274" #endif #ifdef __cplusplus diff --git a/include/cef_media_router.h b/include/cef_media_router.h index f784d110..eb9ea3f8 100644 --- a/include/cef_media_router.h +++ b/include/cef_media_router.h @@ -240,12 +240,6 @@ class CefMediaSink : public virtual CefBaseRefCounted { virtual CefString GetName() = 0; /// - /// Returns the description of this sink. - /// - /*--cef()--*/ - virtual CefString GetDescription() = 0; - - /// /// Returns the icon type for this sink. /// /*--cef(default_retval=CEF_MSIT_GENERIC)--*/ diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 5cceff6a..810dc524 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -3368,21 +3368,22 @@ typedef enum { CEF_PERMISSION_TYPE_CAMERA_PAN_TILT_ZOOM = 1 << 2, CEF_PERMISSION_TYPE_CAMERA_STREAM = 1 << 3, CEF_PERMISSION_TYPE_CLIPBOARD = 1 << 4, - CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 5, - CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 6, - CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 7, - CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 8, - CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 9, - CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 10, - CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 11, - CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 12, - CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 13, - CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 14, - CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 15, - CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 16, - CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 17, - CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18, - CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19, + CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS = 1 << 5, + CEF_PERMISSION_TYPE_DISK_QUOTA = 1 << 6, + CEF_PERMISSION_TYPE_LOCAL_FONTS = 1 << 7, + CEF_PERMISSION_TYPE_GEOLOCATION = 1 << 8, + CEF_PERMISSION_TYPE_IDLE_DETECTION = 1 << 9, + CEF_PERMISSION_TYPE_MIC_STREAM = 1 << 10, + CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 11, + CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 12, + CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 13, + CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 14, + CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 15, + CEF_PERMISSION_TYPE_SECURITY_ATTESTATION = 1 << 16, + CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 17, + CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 18, + CEF_PERMISSION_TYPE_VR_SESSION = 1 << 19, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 20, } cef_permission_request_types_t; /// diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index c90b85cc..c11055fb 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -29,9 +29,9 @@ #include "libcef/common/values_impl.h" #include "libcef/features/runtime_checks.h" -#include "base/bind.h" -#include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "chrome/browser/file_select_helper.h" #include "chrome/browser/picture_in_picture/picture_in_picture_window_manager.h" #include "content/browser/gpu/compositor_util.h" @@ -1253,11 +1253,6 @@ void AlloyBrowserHostImpl::WebContentsCreated( std::move(platform_delegate), /*cef_extension=*/nullptr); } -void AlloyBrowserHostImpl::DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) { - contents_delegate_->DidNavigatePrimaryMainFramePostCommit(web_contents); -} - content::JavaScriptDialogManager* AlloyBrowserHostImpl::GetJavaScriptDialogManager(content::WebContents* source) { if (!javascript_dialog_manager_) { @@ -1353,9 +1348,9 @@ bool AlloyBrowserHostImpl::IsBackForwardCacheSupported() { return false; } -bool AlloyBrowserHostImpl::IsPrerender2Supported( +content::PreloadingEligibility AlloyBrowserHostImpl::IsPrerender2Supported( content::WebContents& web_contents) { - return true; + return content::PreloadingEligibility::kEligible; } // content::WebContentsObserver methods. diff --git a/libcef/browser/alloy/alloy_browser_host_impl.h b/libcef/browser/alloy/alloy_browser_host_impl.h index f7241996..6aa3bfba 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/libcef/browser/alloy/alloy_browser_host_impl.h @@ -235,8 +235,6 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, const std::string& frame_name, const GURL& target_url, content::WebContents* new_contents) override; - void DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) override; content::JavaScriptDialogManager* GetJavaScriptDialogManager( content::WebContents* source) override; void RunFileChooser(content::RenderFrameHost* render_frame_host, @@ -272,7 +270,8 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, content::WebContents* web_contents) override; void ExitPictureInPicture() override; bool IsBackForwardCacheSupported() override; - bool IsPrerender2Supported(content::WebContents& web_contents) override; + content::PreloadingEligibility IsPrerender2Supported( + content::WebContents& web_contents) override; // content::WebContentsObserver methods. using content::WebContentsObserver::BeforeUnloadFired; diff --git a/libcef/browser/alloy/alloy_browser_main.cc b/libcef/browser/alloy/alloy_browser_main.cc index 9cce22ab..876c203c 100644 --- a/libcef/browser/alloy/alloy_browser_main.cc +++ b/libcef/browser/alloy/alloy_browser_main.cc @@ -22,8 +22,8 @@ #include "libcef/common/extensions/extensions_util.h" #include "libcef/common/net/net_resource_provider.h" -#include "base/bind.h" #include "base/feature_list.h" +#include "base/functional/bind.h" #include "base/strings/string_number_conversions.h" #include "base/task/thread_pool.h" #include "chrome/browser/browser_process.h" diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index 353d43fe..55711ca3 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -121,6 +121,7 @@ #include "extensions/browser/guest_view/web_view/web_view_guest.h" #include "extensions/browser/info_map.h" #include "extensions/browser/process_map.h" +#include "extensions/browser/renderer_startup_helper.h" #include "extensions/browser/url_loader_factory_manager.h" #include "extensions/common/constants.h" #include "extensions/common/switches.h" @@ -976,6 +977,9 @@ void AlloyContentBrowserClient::ExposeInterfacesToRenderer( base::BindRepeating( &extensions::ExtensionsGuestView::CreateForExtensions, host->GetID())); + associated_registry->AddInterface<extensions::mojom::RendererHost>( + base::BindRepeating(&extensions::RendererStartupHelper::BindForRenderer, + host->GetID())); } CefBrowserManager::ExposeInterfacesToRenderer(registry, associated_registry, @@ -1356,6 +1360,7 @@ bool AlloyContentBrowserClient::ArePersistentMediaDeviceIDsAllowed( Profile::FromBrowserContext(browser_context)) ->IsFullCookieAccessAllowed( url, site_for_cookies, top_frame_origin, + net::CookieSettingOverrides(), content_settings::CookieSettings::QueryReason::kSiteStorage); } diff --git a/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.h b/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.h index 3b765a11..e5630501 100644 --- a/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.h +++ b/libcef/browser/alloy/dialogs/alloy_web_contents_dialog_helper.h @@ -6,7 +6,7 @@ #define CEF_LIBCEF_BROWSER_ALLOY_DIALOGS_ALLOY_WEB_CONTENTS_DIALOG_HELPER_H_ #pragma once -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include "base/observer_list.h" #include "components/web_modal/modal_dialog_host.h" diff --git a/libcef/browser/audio_loopback_stream_creator.cc b/libcef/browser/audio_loopback_stream_creator.cc index 72dc3c1d..48aea22d 100644 --- a/libcef/browser/audio_loopback_stream_creator.cc +++ b/libcef/browser/audio_loopback_stream_creator.cc @@ -7,8 +7,8 @@ #include <memory> #include <utility> -#include "base/bind.h" #include "base/check_op.h" +#include "base/functional/bind.h" #include "base/location.h" #include "content/browser/browser_main_loop.h" #include "content/browser/web_contents/web_contents_impl.h" diff --git a/libcef/browser/audio_loopback_stream_creator.h b/libcef/browser/audio_loopback_stream_creator.h index ad3708c6..1887832a 100644 --- a/libcef/browser/audio_loopback_stream_creator.h +++ b/libcef/browser/audio_loopback_stream_creator.h @@ -5,7 +5,7 @@ #ifndef CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_ #define CEF_LIBCEF_BROWSER_AUDIO_LOOPBACK_STREAM_CREATOR_H_ -#include "base/callback.h" +#include "base/functional/callback.h" #include "content/browser/media/forwarding_audio_stream_factory.h" #include "content/common/content_export.h" #include "media/mojo/mojom/audio_data_pipe.mojom.h" diff --git a/libcef/browser/browser_contents_delegate.cc b/libcef/browser/browser_contents_delegate.cc index b536fc7a..e38923a6 100644 --- a/libcef/browser/browser_contents_delegate.cc +++ b/libcef/browser/browser_contents_delegate.cc @@ -218,12 +218,6 @@ bool CefBrowserContentsDelegate::DidAddMessageToConsole( return false; } -void CefBrowserContentsDelegate::DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) { - has_document_ = false; - OnStateChanged(State::kDocument); -} - void CefBrowserContentsDelegate::EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) { @@ -458,6 +452,13 @@ void CefBrowserContentsDelegate::DidFinishNavigation( return; } + if (navigation_handle->IsInPrimaryMainFrame() && + navigation_handle->HasCommitted()) { + // A primary main frame navigation has occured. + has_document_ = false; + OnStateChanged(State::kDocument); + } + const bool is_main_frame = navigation_handle->IsInMainFrame(); const auto global_id = frame_util::GetGlobalId(navigation_handle); const GURL& url = diff --git a/libcef/browser/browser_contents_delegate.h b/libcef/browser/browser_contents_delegate.h index ddf50159..87c931eb 100644 --- a/libcef/browser/browser_contents_delegate.h +++ b/libcef/browser/browser_contents_delegate.h @@ -95,8 +95,6 @@ class CefBrowserContentsDelegate : public content::WebContentsDelegate, const std::u16string& message, int32_t line_no, const std::u16string& source_id) override; - void DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) override; void EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) override; diff --git a/libcef/browser/browser_context.h b/libcef/browser/browser_context.h index 3bae0202..8da79950 100644 --- a/libcef/browser/browser_context.h +++ b/libcef/browser/browser_context.h @@ -13,8 +13,8 @@ #include "libcef/browser/iothread_state.h" #include "libcef/browser/request_context_handler_map.h" -#include "base/callback.h" #include "base/files/file_path.h" +#include "base/functional/callback.h" #include "base/memory/weak_ptr.h" #include "base/task/sequenced_task_runner_helpers.h" #include "chrome/common/plugin.mojom.h" diff --git a/libcef/browser/browser_info.h b/libcef/browser/browser_info.h index 1d7ee747..d53d77ab 100644 --- a/libcef/browser/browser_info.h +++ b/libcef/browser/browser_info.h @@ -13,8 +13,8 @@ #include "include/internal/cef_ptr.h" #include "libcef/common/values_impl.h" -#include "base/callback.h" #include "base/containers/unique_ptr_adapters.h" +#include "base/functional/callback.h" #include "base/memory/ref_counted.h" #include "base/memory/weak_ptr.h" #include "base/synchronization/lock.h" diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index 7d75708f..2c794f90 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -18,11 +18,11 @@ #include "base/command_line.h" #include "base/logging.h" -#include "base/threading/sequenced_task_runner_handle.h" +#include "base/task/sequenced_task_runner.h" +#include "content/public/browser/child_process_host.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/web_contents.h" -#include "content/public/common/child_process_host.h" #include "content/public/common/url_constants.h" namespace { @@ -265,7 +265,7 @@ void CefBrowserInfoManager::OnGetNewBrowserInfo( DCHECK(frame_util::IsValidGlobalId(global_id)); DCHECK(callback); - auto callback_runner = base::SequencedTaskRunnerHandle::Get(); + auto callback_runner = base::SequencedTaskRunner::GetCurrentDefault(); base::AutoLock lock_scope(browser_info_lock_); diff --git a/libcef/browser/browser_platform_delegate.h b/libcef/browser/browser_platform_delegate.h index cd257f64..af271a4a 100644 --- a/libcef/browser/browser_platform_delegate.h +++ b/libcef/browser/browser_platform_delegate.h @@ -14,7 +14,7 @@ #include "include/internal/cef_types.h" #include "include/views/cef_browser_view.h" -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "extensions/common/mojom/view_type.mojom-forward.h" #include "third_party/blink/public/common/page/drag_operation.h" #include "third_party/blink/public/mojom/drag/drag.mojom-forward.h" diff --git a/libcef/browser/certificate_query.cc b/libcef/browser/certificate_query.cc index 2826121e..ca787984 100644 --- a/libcef/browser/certificate_query.cc +++ b/libcef/browser/certificate_query.cc @@ -9,8 +9,8 @@ #include "libcef/browser/ssl_info_impl.h" #include "libcef/browser/thread_util.h" -#include "base/callback.h" -#include "base/callback_helpers.h" +#include "base/functional/callback.h" +#include "base/functional/callback_helpers.h" #include "base/logging.h" #include "content/public/browser/web_contents.h" #include "net/ssl/ssl_info.h" diff --git a/libcef/browser/certificate_query.h b/libcef/browser/certificate_query.h index f881480c..f2e6b531 100644 --- a/libcef/browser/certificate_query.h +++ b/libcef/browser/certificate_query.h @@ -6,7 +6,7 @@ #define CEF_LIBCEF_BROWSER_CERTIFICATE_QUERY_H_ #pragma once -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "content/public/browser/certificate_request_result_type.h" namespace content { diff --git a/libcef/browser/chrome/chrome_browser_delegate.cc b/libcef/browser/chrome/chrome_browser_delegate.cc index 70b696c3..761c2a73 100644 --- a/libcef/browser/chrome/chrome_browser_delegate.cc +++ b/libcef/browser/chrome/chrome_browser_delegate.cc @@ -222,13 +222,6 @@ bool ChromeBrowserDelegate::DidAddMessageToConsole( return false; } -void ChromeBrowserDelegate::DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) { - if (auto delegate = GetDelegateForWebContents(web_contents)) { - delegate->DidNavigatePrimaryMainFramePostCommit(web_contents); - } -} - void ChromeBrowserDelegate::EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) { diff --git a/libcef/browser/chrome/chrome_browser_delegate.h b/libcef/browser/chrome/chrome_browser_delegate.h index d073454a..06a99186 100644 --- a/libcef/browser/chrome/chrome_browser_delegate.h +++ b/libcef/browser/chrome/chrome_browser_delegate.h @@ -84,8 +84,6 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate { const std::u16string& message, int32_t line_no, const std::u16string& source_id) override; - void DidNavigatePrimaryMainFramePostCommit( - content::WebContents* web_contents) override; void EnterFullscreenModeForTab( content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) override; diff --git a/libcef/browser/context.cc b/libcef/browser/context.cc index 9c51a4c3..e4539f31 100644 --- a/libcef/browser/context.cc +++ b/libcef/browser/context.cc @@ -10,8 +10,8 @@ #include "libcef/browser/trace_subscriber.h" #include "libcef/common/cef_switches.h" -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/run_loop.h" #include "base/task/current_thread.h" #include "base/threading/thread_restrictions.h" diff --git a/libcef/browser/devtools/devtools_file_manager.cc b/libcef/browser/devtools/devtools_file_manager.cc index ac5912a4..2d8220b4 100644 --- a/libcef/browser/devtools/devtools_file_manager.cc +++ b/libcef/browser/devtools/devtools_file_manager.cc @@ -6,17 +6,17 @@ #include "libcef/browser/alloy/alloy_browser_host_impl.h" -#include "base/bind.h" -#include "base/callback.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "base/json/json_writer.h" #include "base/json/values_util.h" #include "base/lazy_instance.h" #include "base/path_service.h" #include "base/strings/utf_string_conversions.h" +#include "base/task/sequenced_task_runner.h" #include "base/task/thread_pool.h" -#include "base/threading/sequenced_task_runner_handle.h" #include "base/values.h" #include "chrome/common/pref_names.h" #include "components/prefs/scoped_user_pref_update.h" @@ -142,9 +142,8 @@ void CefDevToolsFileManager::SaveAsFileSelected(const std::string& url, *g_last_save_path.Pointer() = path; saved_files_[url] = path; - DictionaryPrefUpdate update(prefs_, prefs::kDevToolsEditedFiles); - base::Value* files_map = update.Get(); - files_map->SetKey(base::MD5String(url), base::FilePathToValue(path)); + ScopedDictPrefUpdate update(prefs_, prefs::kDevToolsEditedFiles); + update->Set(base::MD5String(url), base::FilePathToValue(path)); std::string file_system_path = path.AsUTF8Unsafe(); std::move(callback).Run(file_system_path); file_task_runner_->PostTask(FROM_HERE, diff --git a/libcef/browser/devtools/devtools_file_manager.h b/libcef/browser/devtools/devtools_file_manager.h index 27c506fb..08b2b830 100644 --- a/libcef/browser/devtools/devtools_file_manager.h +++ b/libcef/browser/devtools/devtools_file_manager.h @@ -5,7 +5,7 @@ #ifndef CEF_LIBCEF_BROWSER_DEVTOOLS_DEVTOOLS_FILE_MANAGER_H_ #define CEF_LIBCEF_BROWSER_DEVTOOLS_DEVTOOLS_FILE_MANAGER_H_ -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include <map> diff --git a/libcef/browser/devtools/devtools_frontend.cc b/libcef/browser/devtools/devtools_frontend.cc index f5f30a30..b778fad7 100644 --- a/libcef/browser/devtools/devtools_frontend.cc +++ b/libcef/browser/devtools/devtools_frontend.cc @@ -222,7 +222,7 @@ class CefDevToolsFrontend::NetworkResourceLoader void OnComplete(bool success) override { auto response = BuildObjectForResponse(response_headers_.get(), success, loader_->NetError()); - bindings_->SendMessageAck(request_id_, base::Value(std::move(response))); + bindings_->SendMessageAck(request_id_, std::move(response)); bindings_->loaders_.erase(bindings_->loaders_.find(this)); } @@ -424,7 +424,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( base::Value::Dict response; response.Set("statusCode", 404); response.Set("urlValid", false); - SendMessageAck(request_id, base::Value(std::move(response))); + SendMessageAck(request_id, std::move(response)); return; } @@ -475,7 +475,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( } else if (content::HasWebUIScheme(gurl)) { base::Value::Dict response; response.Set("statusCode", 403); - SendMessageAck(request_id, base::Value(std::move(response))); + SendMessageAck(request_id, std::move(response)); return; } else { auto* partition = @@ -491,9 +491,8 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( loaders_.insert(std::move(resource_loader)); return; } else if (*method == "getPreferences") { - SendMessageAck( - request_id, - base::Value(GetPrefs()->GetDict(prefs::kDevToolsPreferences).Clone())); + SendMessageAck(request_id, + GetPrefs()->GetDict(prefs::kDevToolsPreferences).Clone()); return; } else if (*method == "setPreference") { if (params.size() < 2) { @@ -507,15 +506,15 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( return; } - DictionaryPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences); - update.Get()->SetKey(*name, std::move(params[1])); + ScopedDictPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences); + update->Set(*name, std::move(params[1])); } else if (*method == "removePreference") { const std::string* name = params[0].GetIfString(); if (!name) { return; } - DictionaryPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences); - update.Get()->RemoveKey(*name); + ScopedDictPrefUpdate update(GetPrefs(), prefs::kDevToolsPreferences); + update->Remove(*name); } else if (*method == "requestFileSystems") { web_contents()->GetPrimaryMainFrame()->ExecuteJavaScriptForTests( u"DevToolsAPI.fileSystemsLoaded([]);", base::NullCallback()); @@ -561,7 +560,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( } if (request_id) { - SendMessageAck(request_id, base::Value()); + SendMessageAck(request_id, base::Value::Dict()); } } @@ -628,9 +627,10 @@ void CefDevToolsFrontend::CallClientFunction( std::move(arguments), std::move(cb)); } -void CefDevToolsFrontend::SendMessageAck(int request_id, base::Value arg) { +void CefDevToolsFrontend::SendMessageAck(int request_id, + base::Value::Dict arg) { CallClientFunction("DevToolsAPI", "embedderMessageAck", - base::Value(request_id), std::move(arg)); + base::Value(request_id), base::Value(std::move(arg))); } bool CefDevToolsFrontend::ProtocolLoggingEnabled() const { diff --git a/libcef/browser/devtools/devtools_frontend.h b/libcef/browser/devtools/devtools_frontend.h index 796fd230..36af6f11 100644 --- a/libcef/browser/devtools/devtools_frontend.h +++ b/libcef/browser/devtools/devtools_frontend.h @@ -83,7 +83,7 @@ class CefDevToolsFrontend : public content::WebContentsObserver, void PrimaryMainDocumentElementAvailable() override; void WebContentsDestroyed() override; - void SendMessageAck(int request_id, base::Value arg); + void SendMessageAck(int request_id, base::Value::Dict arg); bool ProtocolLoggingEnabled() const; void LogProtocolMessage(ProtocolMessageType type, diff --git a/libcef/browser/devtools/devtools_manager_delegate.cc b/libcef/browser/devtools/devtools_manager_delegate.cc index 55fe2e74..7f23370d 100644 --- a/libcef/browser/devtools/devtools_manager_delegate.cc +++ b/libcef/browser/devtools/devtools_manager_delegate.cc @@ -9,9 +9,9 @@ #include <vector> #include "base/atomicops.h" -#include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" +#include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" @@ -128,7 +128,7 @@ CefDevToolsManagerDelegate::CefDevToolsManagerDelegate() {} CefDevToolsManagerDelegate::~CefDevToolsManagerDelegate() {} scoped_refptr<content::DevToolsAgentHost> -CefDevToolsManagerDelegate::CreateNewTarget(const GURL& url) { +CefDevToolsManagerDelegate::CreateNewTarget(const GURL& url, bool for_tab) { // This is reached when the user selects "Open link in new tab" from the // DevTools interface. // TODO(cef): Consider exposing new API to support this. diff --git a/libcef/browser/devtools/devtools_manager_delegate.h b/libcef/browser/devtools/devtools_manager_delegate.h index 584869f1..69dc3df2 100644 --- a/libcef/browser/devtools/devtools_manager_delegate.h +++ b/libcef/browser/devtools/devtools_manager_delegate.h @@ -26,7 +26,8 @@ class CefDevToolsManagerDelegate : public content::DevToolsManagerDelegate { // DevToolsManagerDelegate implementation. scoped_refptr<content::DevToolsAgentHost> CreateNewTarget( - const GURL& url) override; + const GURL& url, + bool for_tab) override; std::string GetDiscoveryPageHTML() override; bool HasBundledFrontendResources() override; }; diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index 54ef279b..dc684232 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -12,8 +12,8 @@ #include "libcef/browser/download_item_impl.h" #include "libcef/browser/thread_util.h" -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/path_service.h" #include "base/strings/string_util.h" diff --git a/libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc b/libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc index 68750540..abe577b9 100644 --- a/libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc +++ b/libcef/browser/extensions/api/file_system/cef_file_system_delegate.cc @@ -5,8 +5,8 @@ #include "libcef/browser/extensions/api/file_system/cef_file_system_delegate.h"
#include "apps/saved_files_service.h"
-#include "base/callback.h"
#include "base/files/file_path.h"
+#include "base/functional/callback.h"
#include "chrome/browser/extensions/api/file_system/file_entry_picker.h"
#include "chrome/grit/generated_resources.h"
#include "content/public/browser/web_contents.h"
diff --git a/libcef/browser/extensions/api/file_system/cef_file_system_delegate.h b/libcef/browser/extensions/api/file_system/cef_file_system_delegate.h index 910c6e10..bfcb0203 100644 --- a/libcef/browser/extensions/api/file_system/cef_file_system_delegate.h +++ b/libcef/browser/extensions/api/file_system/cef_file_system_delegate.h @@ -7,8 +7,8 @@ #include <memory>
-#include "base/callback.h"
#include "base/compiler_specific.h"
+#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "extensions/browser/api/execute_code_function.h"
#include "extensions/browser/api/file_system/file_system_delegate.h"
diff --git a/libcef/browser/extensions/chrome_api_registration.cc b/libcef/browser/extensions/chrome_api_registration.cc index d399a9c0..d1198ddc 100644 --- a/libcef/browser/extensions/chrome_api_registration.cc +++ b/libcef/browser/extensions/chrome_api_registration.cc @@ -12,6 +12,7 @@ #include "libcef/browser/extensions/api/tabs/tabs_api.h" #include "chrome/browser/extensions/api/content_settings/content_settings_api.h" +#include "chrome/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h" #include "chrome/browser/extensions/api/resources_private/resources_private_api.h" #include "extensions/browser/api/alarms/alarms_api.h" #include "extensions/browser/api/storage/storage_api.h" @@ -28,8 +29,6 @@ namespace cefimpl = extensions::cef; // Maintain the same order as https://developer.chrome.com/extensions/api_index // so chrome://extensions-support looks nice. const char* const kSupportedAPIs[] = { - "resourcesPrivate", - EXTENSION_FUNCTION_NAME(ResourcesPrivateGetStringsFunction), "alarms", EXTENSION_FUNCTION_NAME(AlarmsCreateFunction), EXTENSION_FUNCTION_NAME(AlarmsGetFunction), @@ -42,6 +41,10 @@ const char* const kSupportedAPIs[] = { EXTENSION_FUNCTION_NAME(ContentSettingsContentSettingSetFunction), EXTENSION_FUNCTION_NAME( ContentSettingsContentSettingGetResourceIdentifiersFunction), + "pdfViewerPrivate", + EXTENSION_FUNCTION_NAME(PdfViewerPrivateIsAllowedLocalFileAccessFunction), + "resourcesPrivate", + EXTENSION_FUNCTION_NAME(ResourcesPrivateGetStringsFunction), "storage", EXTENSION_FUNCTION_NAME(StorageStorageAreaGetFunction), EXTENSION_FUNCTION_NAME(StorageStorageAreaSetFunction), @@ -76,7 +79,6 @@ bool ChromeFunctionRegistry::IsSupported(const std::string& name) { // Only add APIs to this list that have been tested in CEF. // static void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) { - registry->RegisterFunction<ResourcesPrivateGetStringsFunction>(); registry->RegisterFunction<AlarmsCreateFunction>(); registry->RegisterFunction<AlarmsGetFunction>(); registry->RegisterFunction<AlarmsGetAllFunction>(); @@ -87,6 +89,9 @@ void ChromeFunctionRegistry::RegisterAll(ExtensionFunctionRegistry* registry) { registry->RegisterFunction<ContentSettingsContentSettingSetFunction>(); registry->RegisterFunction< ContentSettingsContentSettingGetResourceIdentifiersFunction>(); + registry + ->RegisterFunction<PdfViewerPrivateIsAllowedLocalFileAccessFunction>(); + registry->RegisterFunction<ResourcesPrivateGetStringsFunction>(); registry->RegisterFunction<StorageStorageAreaGetFunction>(); registry->RegisterFunction<StorageStorageAreaSetFunction>(); registry->RegisterFunction<StorageStorageAreaRemoveFunction>(); diff --git a/libcef/browser/extensions/component_extension_resource_manager.cc b/libcef/browser/extensions/component_extension_resource_manager.cc index 138e2d5f..c7a3af04 100644 --- a/libcef/browser/extensions/component_extension_resource_manager.cc +++ b/libcef/browser/extensions/component_extension_resource_manager.cc @@ -24,7 +24,8 @@ CefComponentExtensionResourceManager::CefComponentExtensionResourceManager() { base::Value::Dict dict; pdf_extension_util::AddStrings( pdf_extension_util::PdfViewerContext::kPdfViewer, &dict); - pdf_extension_util::AddAdditionalData(/*enable_annotations=*/true, &dict); + pdf_extension_util::AddAdditionalData(/*enable_printing=*/true, + /*enable_annotations=*/true, &dict); ui::TemplateReplacements pdf_viewer_replacements; ui::TemplateReplacementsFromDictionaryValue(dict, &pdf_viewer_replacements); diff --git a/libcef/browser/extensions/extension_background_host.cc b/libcef/browser/extensions/extension_background_host.cc index 461cbeed..37fe38b8 100644 --- a/libcef/browser/extensions/extension_background_host.cc +++ b/libcef/browser/extensions/extension_background_host.cc @@ -7,7 +7,7 @@ #include "libcef/browser/alloy/alloy_browser_host_impl.h" #include "libcef/browser/extensions/extension_host_delegate.h" -#include "base/callback.h" +#include "base/functional/callback.h" namespace extensions { diff --git a/libcef/browser/extensions/extension_background_host.h b/libcef/browser/extensions/extension_background_host.h index e8b69dff..ed7f6c80 100644 --- a/libcef/browser/extensions/extension_background_host.h +++ b/libcef/browser/extensions/extension_background_host.h @@ -7,7 +7,7 @@ #include <memory> -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "extensions/browser/extension_host.h" class AlloyBrowserHostImpl; diff --git a/libcef/browser/extensions/extension_function_details.h b/libcef/browser/extensions/extension_function_details.h index 11ac622a..e47b3b48 100644 --- a/libcef/browser/extensions/extension_function_details.h +++ b/libcef/browser/extensions/extension_function_details.h @@ -9,7 +9,7 @@ #include "include/cef_extension.h" -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "chrome/common/extensions/api/tabs.h" #include "ui/gfx/native_widget_types.h" diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 8b37dae3..605493f5 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -12,10 +12,10 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/extensions/extensions_util.h" -#include "base/bind.h" #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/json/json_string_value_serializer.h" #include "base/path_service.h" #include "base/strings/string_tokenizer.h" diff --git a/libcef/browser/frame_service_base.h b/libcef/browser/frame_service_base.h index 16ae9469..795ac299 100644 --- a/libcef/browser/frame_service_base.h +++ b/libcef/browser/frame_service_base.h @@ -7,7 +7,7 @@ #include <utility> -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/threading/thread_checker.h" #include "content/public/browser/navigation_handle.h" diff --git a/libcef/browser/javascript_dialog_manager.cc b/libcef/browser/javascript_dialog_manager.cc index 115211f3..1debbf12 100644 --- a/libcef/browser/javascript_dialog_manager.cc +++ b/libcef/browser/javascript_dialog_manager.cc @@ -10,8 +10,8 @@ #include "libcef/browser/browser_host_base.h" #include "libcef/browser/thread_util.h" -#include "base/bind.h" -#include "base/callback_helpers.h" +#include "base/functional/bind.h" +#include "base/functional/callback_helpers.h" #include "base/logging.h" #include "components/javascript_dialogs/tab_modal_dialog_manager.h" diff --git a/libcef/browser/main_runner.h b/libcef/browser/main_runner.h index 2125e174..3b612fd1 100644 --- a/libcef/browser/main_runner.h +++ b/libcef/browser/main_runner.h @@ -11,7 +11,7 @@ #include "libcef/common/main_runner_delegate.h" #include "libcef/common/main_runner_handler.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "content/public/browser/browser_main_runner.h" namespace base { diff --git a/libcef/browser/media_access_query.cc b/libcef/browser/media_access_query.cc index 0e58b2bf..44f54349 100644 --- a/libcef/browser/media_access_query.cc +++ b/libcef/browser/media_access_query.cc @@ -10,8 +10,8 @@ #include "libcef/browser/media_stream_registrar.h" #include "libcef/common/cef_switches.h" -#include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/functional/callback_helpers.h" #include "third_party/blink/public/mojom/mediastream/media_stream.mojom.h" namespace media_access_query { diff --git a/libcef/browser/media_capture_devices_dispatcher.h b/libcef/browser/media_capture_devices_dispatcher.h index 11042061..3082bf1a 100644 --- a/libcef/browser/media_capture_devices_dispatcher.h +++ b/libcef/browser/media_capture_devices_dispatcher.h @@ -5,7 +5,7 @@ #ifndef CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #define CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/singleton.h" #include "base/observer_list.h" #include "content/public/browser/media_observer.h" diff --git a/libcef/browser/media_router/media_sink_impl.cc b/libcef/browser/media_router/media_sink_impl.cc index 2b1c0be3..b66ad20e 100644 --- a/libcef/browser/media_router/media_sink_impl.cc +++ b/libcef/browser/media_router/media_sink_impl.cc @@ -104,10 +104,6 @@ CefString CefMediaSinkImpl::GetName() { return sink_.name(); } -CefString CefMediaSinkImpl::GetDescription() { - return sink_.description().value_or(""); -} - CefMediaSink::IconType CefMediaSinkImpl::GetIconType() { // Verify that our enum matches Chromium's values. static_assert(static_cast<int>(CEF_MSIT_TOTAL_COUNT) == diff --git a/libcef/browser/media_router/media_sink_impl.h b/libcef/browser/media_router/media_sink_impl.h index 5c2e4896..20dbdefd 100644 --- a/libcef/browser/media_router/media_sink_impl.h +++ b/libcef/browser/media_router/media_sink_impl.h @@ -24,7 +24,6 @@ class CefMediaSinkImpl : public CefMediaSink { // CefMediaSink methods. CefString GetId() override; CefString GetName() override; - CefString GetDescription() override; IconType GetIconType() override; void GetDeviceInfo( CefRefPtr<CefMediaSinkDeviceInfoCallback> callback) override; diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index 004721a8..f1f3433e 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -10,7 +10,7 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/task_runner_impl.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "third_party/blink/public/mojom/context_menu/context_menu.mojom.h" #include "ui/base/accelerators/accelerator.h" diff --git a/libcef/browser/native/cursor_util.cc b/libcef/browser/native/cursor_util.cc index 42ab5f6c..2fb9204a 100644 --- a/libcef/browser/native/cursor_util.cc +++ b/libcef/browser/native/cursor_util.cc @@ -4,72 +4,12 @@ #include "libcef/browser/native/cursor_util.h" -#include "libcef/browser/browser_host_base.h" +#include "include/cef_client.h" -#include "content/common/cursors/webcursor.h" -#include "content/public/browser/render_widget_host_view.h" -#include "ui/base/cursor/cursor_factory.h" #include "ui/base/cursor/mojom/cursor_type.mojom.h" -#if defined(USE_AURA) -#include "ui/display/display_util.h" -#include "ui/wm/core/cursor_loader.h" -#endif - namespace cursor_util { -namespace { - -#if defined(USE_AURA) - -display::ScreenInfo GetScreenInfo(CefRefPtr<CefBrowser> browser) { - display::ScreenInfo screen_info; - - bool screen_info_set = false; - if (auto web_contents = - static_cast<CefBrowserHostBase*>(browser.get())->GetWebContents()) { - if (auto view = web_contents->GetRenderWidgetHostView()) { - const auto screen_infos = view->GetScreenInfos(); - if (!screen_infos.screen_infos.empty()) { - screen_info = screen_infos.current(); - screen_info_set = true; - } - } - } - - if (!screen_info_set) { - display::DisplayUtil::GetDefaultScreenInfo(&screen_info); - } - - return screen_info; -} - -display::Display::Rotation OrientationAngleToRotation( - uint16_t orientation_angle) { - // The Display rotation and the ScreenInfo orientation are not the same - // angle. The former is the physical display rotation while the later is the - // rotation required by the content to be shown properly on the screen, in - // other words, relative to the physical display. - if (orientation_angle == 0) { - return display::Display::ROTATE_0; - } - if (orientation_angle == 90) { - return display::Display::ROTATE_270; - } - if (orientation_angle == 180) { - return display::Display::ROTATE_180; - } - if (orientation_angle == 270) { - return display::Display::ROTATE_90; - } - NOTREACHED(); - return display::Display::ROTATE_0; -} - -#endif // defined(USE_AURA) - -} // namespace - bool OnCursorChange(CefRefPtr<CefBrowser> browser, const ui::Cursor& ui_cursor) { auto client = browser->GetHost()->GetClient(); @@ -93,47 +33,10 @@ bool OnCursorChange(CefRefPtr<CefBrowser> browser, custom_cursor_info.size.height = ui_cursor.custom_bitmap().height(); } - bool handled = false; - -#if defined(USE_AURA) - wm::CursorLoader cursor_loader; - scoped_refptr<ui::PlatformCursor> platform_cursor; - CefCursorHandle native_cursor = kNullCursorHandle; - - ui::Cursor loaded_cursor = ui_cursor; - - if (ui_cursor.type() == ui::mojom::CursorType::kCustom) { - platform_cursor = ui::CursorFactory::GetInstance()->CreateImageCursor( - ui::mojom::CursorType::kCustom, ui_cursor.custom_bitmap(), - ui_cursor.custom_hotspot()); - } else { - const auto& screen_info = GetScreenInfo(browser); - cursor_loader.SetDisplayData( - OrientationAngleToRotation(screen_info.orientation_angle), - screen_info.device_scale_factor); - - // Attempts to load the cursor via the platform or from pak resources. - cursor_loader.SetPlatformCursor(&loaded_cursor); - platform_cursor = loaded_cursor.platform(); - } - - if (platform_cursor) { - native_cursor = cursor_util::ToCursorHandle(platform_cursor); - } - - handled = handler->OnCursorChange(browser, native_cursor, cursor_type, - custom_cursor_info); -#elif BUILDFLAG(IS_MAC) - // |web_cursor| owns the resulting |native_cursor|. - content::WebCursor web_cursor(ui_cursor); - CefCursorHandle native_cursor = web_cursor.GetNativeCursor(); - handled = handler->OnCursorChange(browser, native_cursor, cursor_type, - custom_cursor_info); -#else - NOTIMPLEMENTED(); -#endif - - return handled; + auto scoped_cursor_handle(ScopedCursorHandle::Create(browser, ui_cursor)); + return handler->OnCursorChange(browser, + scoped_cursor_handle->GetCursorHandle(), + cursor_type, custom_cursor_info); } } // namespace cursor_util diff --git a/libcef/browser/native/cursor_util.h b/libcef/browser/native/cursor_util.h index 45ab3d5b..629d0fa6 100644 --- a/libcef/browser/native/cursor_util.h +++ b/libcef/browser/native/cursor_util.h @@ -7,6 +7,8 @@ #include "include/cef_browser.h" +#include <memory> + #include "ui/base/cursor/cursor.h" #include "ui/base/cursor/mojom/cursor_type.mojom-forward.h" @@ -16,9 +18,17 @@ namespace cursor_util { -#if defined(USE_AURA) -cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor); -#endif // defined(USE_AURA) +// Scoped ownership of a native cursor handle. +class ScopedCursorHandle { + public: + virtual ~ScopedCursorHandle() = default; + + static std::unique_ptr<ScopedCursorHandle> Create( + CefRefPtr<CefBrowser> browser, + const ui::Cursor& ui_cursor); + + virtual cef_cursor_handle_t GetCursorHandle() = 0; +}; // Returns true if the client handled the cursor change. bool OnCursorChange(CefRefPtr<CefBrowser> browser, const ui::Cursor& ui_cursor); diff --git a/libcef/browser/native/cursor_util_aura.cc b/libcef/browser/native/cursor_util_aura.cc new file mode 100644 index 00000000..ef3fc6b2 --- /dev/null +++ b/libcef/browser/native/cursor_util_aura.cc @@ -0,0 +1,153 @@ +// Copyright 2023 The Chromium Embedded Framework Authors. Portions copyright +// 2012 The Chromium Authors. All rights reserved. Use of this source code is +// governed by a BSD-style license that can be found in the LICENSE file. + +#include "libcef/browser/native/cursor_util.h" + +#include "libcef/browser/browser_host_base.h" + +#include "content/common/cursors/webcursor.h" +#include "content/public/browser/render_widget_host_view.h" +#include "ui/base/cursor/cursor_factory.h" +#include "ui/base/cursor/mojom/cursor_type.mojom.h" +#include "ui/display/display_util.h" +#include "ui/wm/core/cursor_loader.h" + +#if BUILDFLAG(IS_LINUX) +#include "ui/ozone/buildflags.h" +#if BUILDFLAG(OZONE_PLATFORM_X11) +#include "ui/base/x/x11_cursor.h" +#elif BUILDFLAG(IS_OZONE) +#include "ui/ozone/common/bitmap_cursor.h" +#endif +#endif // BUILDFLAG(IS_LINUX) + +#if BUILDFLAG(IS_WIN) +#include "ui/base/win/win_cursor.h" +#endif + +namespace cursor_util { + +namespace { + +display::ScreenInfo GetScreenInfo(CefRefPtr<CefBrowser> browser) { + display::ScreenInfo screen_info; + + bool screen_info_set = false; + if (auto web_contents = + static_cast<CefBrowserHostBase*>(browser.get())->GetWebContents()) { + if (auto view = web_contents->GetRenderWidgetHostView()) { + const auto screen_infos = view->GetScreenInfos(); + if (!screen_infos.screen_infos.empty()) { + screen_info = screen_infos.current(); + screen_info_set = true; + } + } + } + + if (!screen_info_set) { + display::DisplayUtil::GetDefaultScreenInfo(&screen_info); + } + + return screen_info; +} + +display::Display::Rotation OrientationAngleToRotation( + uint16_t orientation_angle) { + // The Display rotation and the ScreenInfo orientation are not the same + // angle. The former is the physical display rotation while the later is the + // rotation required by the content to be shown properly on the screen, in + // other words, relative to the physical display. + if (orientation_angle == 0) { + return display::Display::ROTATE_0; + } + if (orientation_angle == 90) { + return display::Display::ROTATE_270; + } + if (orientation_angle == 180) { + return display::Display::ROTATE_180; + } + if (orientation_angle == 270) { + return display::Display::ROTATE_90; + } + NOTREACHED(); + return display::Display::ROTATE_0; +} + +scoped_refptr<ui::PlatformCursor> ToPlatformCursor( + CefRefPtr<CefBrowser> browser, + const ui::Cursor& ui_cursor) { + wm::CursorLoader cursor_loader; + scoped_refptr<ui::PlatformCursor> platform_cursor; + + ui::Cursor loaded_cursor = ui_cursor; + + if (ui_cursor.type() == ui::mojom::CursorType::kCustom) { + platform_cursor = ui::CursorFactory::GetInstance()->CreateImageCursor( + ui::mojom::CursorType::kCustom, ui_cursor.custom_bitmap(), + ui_cursor.custom_hotspot()); + } else { + const auto& screen_info = GetScreenInfo(browser); + cursor_loader.SetDisplayData( + OrientationAngleToRotation(screen_info.orientation_angle), + screen_info.device_scale_factor); + + // Attempts to load the cursor via the platform or from pak resources. + cursor_loader.SetPlatformCursor(&loaded_cursor); + platform_cursor = loaded_cursor.platform(); + } + + return platform_cursor; +} + +#if BUILDFLAG(IS_WIN) +using CursorType = ui::WinCursor; +inline cef_cursor_handle_t GetCursorHandleImpl(CursorType* cursor) { + return cursor->hcursor(); +} +#elif BUILDFLAG(OZONE_PLATFORM_X11) +// See https://crbug.com/1029142 for background. +using CursorType = ui::X11Cursor; +inline cef_cursor_handle_t GetCursorHandleImpl(CursorType* cursor) { + return static_cast<cef_cursor_handle_t>(cursor->xcursor()); +} +#elif BUILDFLAG(IS_OZONE) +using CursorType = ui::BitmapCursor; +inline cef_cursor_handle_t GetCursorHandleImpl(CursorType* cursor) { + return static_cast<cef_cursor_handle_t>(cursor->platform_data()); +} +#else +#error Unsupported platform +#endif + +class ScopedCursorHandleImpl : public ScopedCursorHandle { + public: + explicit ScopedCursorHandleImpl( + scoped_refptr<ui::PlatformCursor> platform_cursor) { + if (platform_cursor) { + cursor_ = CursorType::FromPlatformCursor(platform_cursor); + } + } + + cef_cursor_handle_t GetCursorHandle() override { + if (cursor_) { + return GetCursorHandleImpl(cursor_.get()); + } + return kNullCursorHandle; + } + + private: + scoped_refptr<CursorType> cursor_; +}; + +} // namespace + +// static +std::unique_ptr<ScopedCursorHandle> ScopedCursorHandle::Create( + CefRefPtr<CefBrowser> browser, + const ui::Cursor& ui_cursor) { + return std::make_unique<ScopedCursorHandleImpl>( + ToPlatformCursor(browser, ui_cursor)); +} + +} // namespace cursor_util diff --git a/libcef/browser/native/cursor_util_linux.cc b/libcef/browser/native/cursor_util_linux.cc deleted file mode 100644 index cfce4a77..00000000 --- a/libcef/browser/native/cursor_util_linux.cc +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "libcef/browser/native/cursor_util.h" - -#include "ui/ozone/buildflags.h" - -#if BUILDFLAG(OZONE_PLATFORM_X11) -#include "ui/base/x/x11_cursor.h" -#elif BUILDFLAG(IS_OZONE) -#include "ui/ozone/common/bitmap_cursor.h" -#endif - -namespace cursor_util { - -cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor) { -#if BUILDFLAG(OZONE_PLATFORM_X11) - // See https://crbug.com/1029142 for background. - return static_cast<cef_cursor_handle_t>( - ui::X11Cursor::FromPlatformCursor(cursor)->xcursor()); -#elif BUILDFLAG(IS_OZONE) - return static_cast<cef_cursor_handle_t>( - ui::BitmapCursor::FromPlatformCursor(cursor)->platform_data()); -#else - return 0; -#endif -} - -} // namespace cursor_util diff --git a/libcef/browser/native/cursor_util_mac.mm b/libcef/browser/native/cursor_util_mac.mm new file mode 100644 index 00000000..c2ed9ac5 --- /dev/null +++ b/libcef/browser/native/cursor_util_mac.mm @@ -0,0 +1,38 @@ +// Copyright 2023 The Chromium Embedded Framework Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be found +// in the LICENSE file. + +#include "libcef/browser/native/cursor_util.h" + +#import "base/mac/scoped_nsobject.h" +#import "ui/base/cocoa/cursor_utils.h" + +namespace cursor_util { + +namespace { + +class ScopedCursorHandleImpl : public ScopedCursorHandle { + public: + explicit ScopedCursorHandleImpl(NSCursor* native_cursor) { + if (native_cursor) { + cursor_.reset([native_cursor retain]); + } + } + + cef_cursor_handle_t GetCursorHandle() override { return cursor_.get(); } + + private: + base::scoped_nsobject<NSCursor> cursor_; +}; + +} // namespace + +// static +std::unique_ptr<ScopedCursorHandle> ScopedCursorHandle::Create( + CefRefPtr<CefBrowser> /*browser*/, + const ui::Cursor& ui_cursor) { + return std::make_unique<ScopedCursorHandleImpl>( + ui::GetNativeCursor(ui_cursor)); +} + +} // namespace cursor_util diff --git a/libcef/browser/native/cursor_util_win.cc b/libcef/browser/native/cursor_util_win.cc deleted file mode 100644 index e7c5bb15..00000000 --- a/libcef/browser/native/cursor_util_win.cc +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2020 The Chromium Embedded Framework Authors. Portions copyright -// 2012 The Chromium Authors. All rights reserved. Use of this source code is -// governed by a BSD-style license that can be found in the LICENSE file. - -#include "libcef/browser/native/cursor_util.h" - -#include "ui/base/win/win_cursor.h" - -namespace cursor_util { - -cef_cursor_handle_t ToCursorHandle(scoped_refptr<ui::PlatformCursor> cursor) { - return ui::WinCursor::FromPlatformCursor(cursor)->hcursor(); -} - -} // namespace cursor_util diff --git a/libcef/browser/native/javascript_dialog_runner_mac.h b/libcef/browser/native/javascript_dialog_runner_mac.h index 9f8c783b..6cfc99d6 100644 --- a/libcef/browser/native/javascript_dialog_runner_mac.h +++ b/libcef/browser/native/javascript_dialog_runner_mac.h @@ -9,7 +9,7 @@ #include "libcef/browser/javascript_dialog_runner.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/mac/scoped_nsobject.h" #include "base/memory/weak_ptr.h" diff --git a/libcef/browser/native/javascript_dialog_runner_mac.mm b/libcef/browser/native/javascript_dialog_runner_mac.mm index 00335276..5769aff8 100644 --- a/libcef/browser/native/javascript_dialog_runner_mac.mm +++ b/libcef/browser/native/javascript_dialog_runner_mac.mm @@ -7,7 +7,7 @@ #import <Cocoa/Cocoa.h> -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "components/url_formatter/elide_url.h" diff --git a/libcef/browser/net_service/cookie_helper.cc b/libcef/browser/net_service/cookie_helper.cc index ef2416f4..b0f75365 100644 --- a/libcef/browser/net_service/cookie_helper.cc +++ b/libcef/browser/net_service/cookie_helper.cc @@ -7,7 +7,7 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/net_service/net_service_util.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/storage_partition.h" #include "content/public/common/url_constants.h" diff --git a/libcef/browser/net_service/cookie_helper.h b/libcef/browser/net_service/cookie_helper.h index b1fe2610..c975fd1f 100644 --- a/libcef/browser/net_service/cookie_helper.h +++ b/libcef/browser/net_service/cookie_helper.h @@ -7,7 +7,7 @@ #include "libcef/browser/browser_context.h" -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "net/cookies/canonical_cookie.h" namespace net { diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index 00593be9..ef323825 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -7,7 +7,7 @@ #include "libcef/common/net_service/net_service_util.h" #include "libcef/common/time_util.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/storage_partition.h" diff --git a/libcef/browser/net_service/login_delegate.cc b/libcef/browser/net_service/login_delegate.cc index 6346a495..da16c321 100644 --- a/libcef/browser/net_service/login_delegate.cc +++ b/libcef/browser/net_service/login_delegate.cc @@ -9,7 +9,7 @@ #include "libcef/browser/thread_util.h" #include "base/memory/scoped_refptr.h" -#include "base/threading/sequenced_task_runner_handle.h" +#include "base/task/sequenced_task_runner.h" #include "content/public/browser/global_request_id.h" #include "content/public/browser/web_contents.h" @@ -21,7 +21,7 @@ class AuthCallbackImpl : public CefAuthCallback { public: explicit AuthCallbackImpl(base::WeakPtr<LoginDelegate> delegate) : delegate_(delegate), - task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + task_runner_(base::SequencedTaskRunner::GetCurrentDefault()) {} AuthCallbackImpl(const AuthCallbackImpl&) = delete; AuthCallbackImpl& operator=(const AuthCallbackImpl&) = delete; diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 0638f3a2..96fcc392 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -760,8 +760,8 @@ void InterceptedRequest::InterceptResponseReceived( current_response_->headers = headers; current_response_->encoded_data_length = headers->raw_headers().length(); - current_response_->content_length = current_response_->encoded_body_length = - 0; + current_response_->content_length = 0; + current_response_->encoded_body_length = 0; std::string origin; if (request_.headers.GetHeader(net::HttpRequestHeaders::kOrigin, &origin) && @@ -917,8 +917,8 @@ net::RedirectInfo InterceptedRequest::MakeRedirectResponseAndInfo( net::HttpRequestHeaders::kContentType); // Clear the Content-Length values. - current_response_->content_length = current_response_->encoded_body_length = - 0; + current_response_->content_length = 0; + current_response_->encoded_body_length = 0; current_response_->headers->RemoveHeader( net::HttpRequestHeaders::kContentLength); diff --git a/libcef/browser/net_service/proxy_url_loader_factory.h b/libcef/browser/net_service/proxy_url_loader_factory.h index 3c8dba27..b9fdeae6 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.h +++ b/libcef/browser/net_service/proxy_url_loader_factory.h @@ -8,8 +8,8 @@ #include "libcef/browser/net_service/stream_reader_url_loader.h" -#include "base/callback.h" #include "base/containers/unique_ptr_adapters.h" +#include "base/functional/callback.h" #include "base/hash/hash.h" #include "base/strings/string_piece.h" #include "content/public/browser/content_browser_client.h" diff --git a/libcef/browser/net_service/resource_handler_wrapper.cc b/libcef/browser/net_service/resource_handler_wrapper.cc index 37e72b06..f1acc40c 100644 --- a/libcef/browser/net_service/resource_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_handler_wrapper.cc @@ -20,7 +20,8 @@ class SkipCallbackWrapper : public CefResourceSkipCallback { public: explicit SkipCallbackWrapper(InputStream::SkipCallback callback) : callback_(std::move(callback)), - work_thread_task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + work_thread_task_runner_( + base::SequencedTaskRunner::GetCurrentDefault()) {} SkipCallbackWrapper(const SkipCallbackWrapper&) = delete; SkipCallbackWrapper& operator=(const SkipCallbackWrapper&) = delete; @@ -59,7 +60,8 @@ class ReadCallbackWrapper : public CefResourceReadCallback { public: explicit ReadCallbackWrapper(InputStream::ReadCallback callback) : callback_(std::move(callback)), - work_thread_task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + work_thread_task_runner_( + base::SequencedTaskRunner::GetCurrentDefault()) {} ReadCallbackWrapper(const ReadCallbackWrapper&) = delete; ReadCallbackWrapper& operator=(const ReadCallbackWrapper&) = delete; @@ -314,7 +316,8 @@ class OpenCallbackWrapper : public CefCallback { std::unique_ptr<InputStreamWrapper> stream) : callback_(std::move(callback)), stream_(std::move(stream)), - work_thread_task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + work_thread_task_runner_( + base::SequencedTaskRunner::GetCurrentDefault()) {} OpenCallbackWrapper(const OpenCallbackWrapper&) = delete; OpenCallbackWrapper& operator=(const OpenCallbackWrapper&) = delete; diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.cc b/libcef/browser/net_service/resource_request_handler_wrapper.cc index 3b971b5c..f5ca9c59 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -48,7 +48,8 @@ class RequestCallbackWrapper : public CefCallback { using Callback = base::OnceCallback<void(bool /* allow */)>; explicit RequestCallbackWrapper(Callback callback) : callback_(std::move(callback)), - work_thread_task_runner_(base::SequencedTaskRunnerHandle::Get()) {} + work_thread_task_runner_( + base::SequencedTaskRunner::GetCurrentDefault()) {} RequestCallbackWrapper(const RequestCallbackWrapper&) = delete; RequestCallbackWrapper& operator=(const RequestCallbackWrapper&) = delete; diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.h b/libcef/browser/net_service/resource_request_handler_wrapper.h index 11de480e..6052a767 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.h +++ b/libcef/browser/net_service/resource_request_handler_wrapper.h @@ -5,7 +5,7 @@ #ifndef CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_ #define CEF_LIBCEF_BROWSER_NET_SERVICE_RESOURCE_REQUEST_HANDLER_WRAPPER_H_ -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "content/public/browser/web_contents.h" namespace content { diff --git a/libcef/browser/net_service/response_filter_wrapper.h b/libcef/browser/net_service/response_filter_wrapper.h index be3b4c0e..a85d0959 100644 --- a/libcef/browser/net_service/response_filter_wrapper.h +++ b/libcef/browser/net_service/response_filter_wrapper.h @@ -7,7 +7,7 @@ #include "include/cef_response_filter.h" -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "mojo/public/cpp/system/data_pipe.h" namespace net_service { diff --git a/libcef/browser/net_service/stream_reader_url_loader.cc b/libcef/browser/net_service/stream_reader_url_loader.cc index a61ad2dc..71168336 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.cc +++ b/libcef/browser/net_service/stream_reader_url_loader.cc @@ -8,14 +8,14 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/net_service/net_service_util.h" -#include "base/bind.h" -#include "base/callback.h" +#include "base/functional/bind.h" +#include "base/functional/callback.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" +#include "base/task/single_thread_task_runner.h" #include "base/task/thread_pool.h" #include "base/threading/thread.h" -#include "base/threading/thread_task_runner_handle.h" #include "content/public/browser/browser_thread.h" #include "net/base/io_buffer.h" #include "net/http/http_status_code.h" @@ -45,7 +45,7 @@ class OpenInputStreamWrapper OnInputStreamOpenedCallback callback) { scoped_refptr<OpenInputStreamWrapper> wrapper = new OpenInputStreamWrapper( std::move(delegate), work_thread_task_runner, - base::ThreadTaskRunnerHandle::Get(), std::move(callback)); + base::SingleThreadTaskRunner::GetCurrentDefault(), std::move(callback)); wrapper->Start(request_id, request); return wrapper->GetCancelCallback(); @@ -242,7 +242,8 @@ InputStreamReader::InputStreamReader( scoped_refptr<base::SequencedTaskRunner> work_thread_task_runner) : stream_(std::move(stream)), work_thread_task_runner_(work_thread_task_runner), - job_thread_task_runner_(base::ThreadTaskRunnerHandle::Get()) { + job_thread_task_runner_( + base::SingleThreadTaskRunner::GetCurrentDefault()) { CEF_REQUIRE_IOT(); DCHECK(stream_); DCHECK(work_thread_task_runner_); @@ -485,7 +486,7 @@ StreamReaderURLLoader::StreamReaderURLLoader( response_delegate_(std::move(response_delegate)), writable_handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, - base::SequencedTaskRunnerHandle::Get()), + base::SequencedTaskRunner::GetCurrentDefault()), weak_factory_(this) { DCHECK(response_delegate_); // If there is a client error, clean up the request. @@ -696,8 +697,8 @@ void StreamReaderURLLoader::ContinueWithResponseHeaders( const auto has_redirect_url = redirect_url && !redirect_url->is_empty(); if (has_redirect_url || pending_headers->IsRedirect(&location)) { pending_response->encoded_data_length = header_length_; - pending_response->content_length = pending_response->encoded_body_length = - 0; + pending_response->content_length = 0; + pending_response->encoded_body_length = 0; const GURL new_location = has_redirect_url ? *redirect_url : request_.url.Resolve(location); client_->OnReceiveRedirect( @@ -794,7 +795,7 @@ void StreamReaderURLLoader::OnReaderReadCompleted(int bytes_read) { client_->OnTransferSizeUpdated(bytes_read); total_bytes_read_ += bytes_read; - base::ThreadTaskRunnerHandle::Get()->PostTask( + base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask( FROM_HERE, base::BindOnce(&StreamReaderURLLoader::ReadMore, weak_factory_.GetWeakPtr())); } diff --git a/libcef/browser/net_service/stream_reader_url_loader.h b/libcef/browser/net_service/stream_reader_url_loader.h index 9af8b019..ea3ec46b 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.h +++ b/libcef/browser/net_service/stream_reader_url_loader.h @@ -8,7 +8,7 @@ #include <map> -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/threading/thread_checker.h" #include "mojo/public/cpp/bindings/remote.h" #include "mojo/public/cpp/system/simple_watcher.h" diff --git a/libcef/browser/net_service/url_loader_factory_getter.cc b/libcef/browser/net_service/url_loader_factory_getter.cc index bb7a548e..4223f909 100644 --- a/libcef/browser/net_service/url_loader_factory_getter.cc +++ b/libcef/browser/net_service/url_loader_factory_getter.cc @@ -8,7 +8,7 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/app_manager.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/task/single_thread_task_runner.h" #include "content/browser/devtools/devtools_instrumentation.h" #include "content/browser/renderer_host/render_frame_host_impl.h" #include "content/public/browser/browser_context.h" @@ -90,7 +90,7 @@ scoped_refptr<network::SharedURLLoaderFactory> URLLoaderFactoryGetter::GetURLLoaderFactory() { // On first call we associate with the current thread. if (!task_runner_) { - task_runner_ = base::ThreadTaskRunnerHandle::Get(); + task_runner_ = base::SingleThreadTaskRunner::GetCurrentDefault(); } else { DCHECK(task_runner_->RunsTasksInCurrentSequence()); } diff --git a/libcef/browser/origin_whitelist_impl.cc b/libcef/browser/origin_whitelist_impl.cc index 01bef97e..0b98c4c7 100644 --- a/libcef/browser/origin_whitelist_impl.cc +++ b/libcef/browser/origin_whitelist_impl.cc @@ -12,7 +12,7 @@ #include "libcef/browser/context.h" #include "libcef/browser/thread_util.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/lazy_instance.h" #include "base/synchronization/lock.h" #include "cef/libcef/common/mojom/cef.mojom.h" diff --git a/libcef/browser/osr/host_display_client_osr.h b/libcef/browser/osr/host_display_client_osr.h index 284ccb32..c0987f8d 100644 --- a/libcef/browser/osr/host_display_client_osr.h +++ b/libcef/browser/osr/host_display_client_osr.h @@ -7,7 +7,7 @@ #include <memory> -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/shared_memory_mapping.h" #include "components/viz/host/host_display_client.h" #include "ui/gfx/native_widget_types.h" diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 935a4cdb..19d74f64 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -85,6 +85,7 @@ struct PopulateAxNodeAttributes { case ax::mojom::IntAttribute::kScrollYMin: case ax::mojom::IntAttribute::kScrollYMax: case ax::mojom::IntAttribute::kHasPopup: + case ax::mojom::IntAttribute::kIsPopup: case ax::mojom::IntAttribute::kHierarchicalLevel: case ax::mojom::IntAttribute::kTextSelStart: case ax::mojom::IntAttribute::kTextSelEnd: diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 874eb375..e74390cc 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -15,8 +15,8 @@ #include "libcef/browser/osr/video_consumer_osr.h" #include "libcef/browser/thread_util.h" -#include "base/callback_helpers.h" #include "base/command_line.h" +#include "base/functional/callback_helpers.h" #include "base/memory/ptr_util.h" #include "base/strings/utf_string_conversions.h" #include "cc/base/switches.h" @@ -240,8 +240,8 @@ CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( // Matching the attributes from RecyclableCompositorMac. compositor_.reset(new ui::Compositor( context_factory->AllocateFrameSinkId(), context_factory, - base::ThreadTaskRunnerHandle::Get(), false /* enable_pixel_canvas */, - use_external_begin_frame)); + base::SingleThreadTaskRunner::GetCurrentDefault(), + false /* enable_pixel_canvas */, use_external_begin_frame)); compositor_->SetAcceleratedWidget(gfx::kNullAcceleratedWidget); compositor_->SetDelegate(this); @@ -635,8 +635,7 @@ void CefRenderWidgetHostViewOSR::InitAsPopup( Show(); } -void CefRenderWidgetHostViewOSR::UpdateCursor( - const content::WebCursor& cursor) {} +void CefRenderWidgetHostViewOSR::UpdateCursor(const ui::Cursor& cursor) {} content::CursorManager* CefRenderWidgetHostViewOSR::GetCursorManager() { return cursor_manager_.get(); diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 698408dc..6a603b32 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -158,7 +158,7 @@ class CefRenderWidgetHostViewOSR void InitAsPopup(content::RenderWidgetHostView* parent_host_view, const gfx::Rect& bounds, const gfx::Rect& anchor_rect) override; - void UpdateCursor(const content::WebCursor& cursor) override; + void UpdateCursor(const ui::Cursor& cursor) override; void SetIsLoading(bool is_loading) override; void RenderProcessGone() override; void Destroy() override; diff --git a/libcef/browser/osr/software_output_device_proxy.cc b/libcef/browser/osr/software_output_device_proxy.cc index ddcbb26b..85729698 100644 --- a/libcef/browser/osr/software_output_device_proxy.cc +++ b/libcef/browser/osr/software_output_device_proxy.cc @@ -32,7 +32,7 @@ SoftwareOutputDeviceProxy::SoftwareOutputDeviceProxy( void SoftwareOutputDeviceProxy::OnSwapBuffers( SwapBuffersCallback swap_ack_callback, - gl::FrameData data) { + gfx::FrameData data) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(swap_ack_callback_.is_null()); diff --git a/libcef/browser/osr/software_output_device_proxy.h b/libcef/browser/osr/software_output_device_proxy.h index 3850a73d..fc29ae2e 100644 --- a/libcef/browser/osr/software_output_device_proxy.h +++ b/libcef/browser/osr/software_output_device_proxy.h @@ -28,7 +28,7 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceProxy // SoftwareOutputDevice implementation. void OnSwapBuffers(SwapBuffersCallback swap_ack_callback, - gl::FrameData data) override; + gfx::FrameData data) override; // SoftwareOutputDeviceBase implementation. void Resize(const gfx::Size& viewport_pixel_size, diff --git a/libcef/browser/osr/touch_selection_controller_client_osr.cc b/libcef/browser/osr/touch_selection_controller_client_osr.cc index 06fb6a1b..3b9bb059 100644 --- a/libcef/browser/osr/touch_selection_controller_client_osr.cc +++ b/libcef/browser/osr/touch_selection_controller_client_osr.cc @@ -11,7 +11,7 @@ #include "libcef/browser/osr/render_widget_host_view_osr.h" #include "libcef/browser/osr/touch_handle_drawable_osr.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "content/browser/renderer_host/render_widget_host_delegate.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/public/browser/context_menu_params.h" diff --git a/libcef/browser/osr/video_consumer_osr.h b/libcef/browser/osr/video_consumer_osr.h index 06156152..4616b053 100644 --- a/libcef/browser/osr/video_consumer_osr.h +++ b/libcef/browser/osr/video_consumer_osr.h @@ -1,7 +1,7 @@ #ifndef LIBCEF_BROWSER_OSR_VIDEO_CONSUMER_OSR_H_ #define LIBCEF_BROWSER_OSR_VIDEO_CONSUMER_OSR_H_ -#include "base/callback.h" +#include "base/functional/callback.h" #include "components/viz/host/client_frame_sink_video_capturer.h" #include "media/capture/mojom/video_capture_types.mojom.h" #include "third_party/abseil-cpp/absl/types/optional.h" diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 6488f538..abb6af5e 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -149,6 +149,9 @@ void CefWebContentsViewOSR::SetOverscrollControllerEnabled(bool enabled) {} void CefWebContentsViewOSR::OnCapturerCountChanged() {} +void CefWebContentsViewOSR::UpdateWindowControlsOverlay( + const gfx::Rect& bounding_rect) {} + #if BUILDFLAG(IS_MAC) bool CefWebContentsViewOSR::CloseTabAfterEventTrackingIfNeeded() { return false; diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index 39b6c3cc..d3fc78d3 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -61,6 +61,7 @@ class CefWebContentsViewOSR : public content::WebContentsView, content::RenderViewHost* new_host) override; void SetOverscrollControllerEnabled(bool enabled) override; void OnCapturerCountChanged() override; + void UpdateWindowControlsOverlay(const gfx::Rect& bounding_rect) override; #if BUILDFLAG(IS_MAC) bool CloseTabAfterEventTrackingIfNeeded() override; diff --git a/libcef/browser/permission_prompt.cc b/libcef/browser/permission_prompt.cc index d0f32f0a..784aab65 100644 --- a/libcef/browser/permission_prompt.cc +++ b/libcef/browser/permission_prompt.cc @@ -215,6 +215,8 @@ cef_permission_request_types_t GetCefRequestType( return CEF_PERMISSION_TYPE_SECURITY_ATTESTATION; case permissions::RequestType::kStorageAccess: return CEF_PERMISSION_TYPE_STORAGE_ACCESS; + case permissions::RequestType::kTopLevelStorageAccess: + return CEF_PERMISSION_TYPE_TOP_LEVEL_STORAGE_ACCESS; case permissions::RequestType::kU2fApiRequest: return CEF_PERMISSION_TYPE_U2F_API_REQUEST; case permissions::RequestType::kVrSession: diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index 5da52019..c42a0231 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -43,6 +43,7 @@ #include "components/component_updater/component_updater_service.h" #include "components/content_settings/core/browser/cookie_settings.h" #include "components/content_settings/core/browser/host_content_settings_map.h" +#include "components/domain_reliability/domain_reliability_prefs.h" #include "components/flags_ui/pref_service_flags_storage.h" #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "components/language/core/browser/language_prefs.h" @@ -230,6 +231,7 @@ std::unique_ptr<PrefService> CreatePrefService(Profile* profile, if (!profile) { component_updater::RegisterComponentUpdateServicePrefs(registry.get()); + domain_reliability::RegisterPrefs(registry.get()); SystemNetworkContextManager::RegisterPrefs(registry.get()); #if BUILDFLAG(IS_WIN) OSCrypt::RegisterLocalPrefs(registry.get()); diff --git a/libcef/browser/printing/print_dialog_linux.cc b/libcef/browser/printing/print_dialog_linux.cc index d975ae7f..262391db 100644 --- a/libcef/browser/printing/print_dialog_linux.cc +++ b/libcef/browser/printing/print_dialog_linux.cc @@ -14,8 +14,8 @@ #include "libcef/common/app_manager.h" #include "libcef/common/frame_util.h" -#include "base/bind.h" #include "base/files/file_util.h" +#include "base/functional/bind.h" #include "base/lazy_instance.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 77aa44b7..72d10796 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -16,8 +16,8 @@ #include "chrome/browser/profiles/profile.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_task_traits.h" +#include "content/public/browser/child_process_host.h" #include "content/public/browser/ssl_host_state_delegate.h" -#include "content/public/common/child_process_host.h" #include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "net/dns/host_resolver.h" diff --git a/libcef/browser/server_impl.cc b/libcef/browser/server_impl.cc index 700e8ff5..a9faff45 100644 --- a/libcef/browser/server_impl.cc +++ b/libcef/browser/server_impl.cc @@ -8,8 +8,8 @@ #include "libcef/common/request_impl.h" #include "libcef/common/task_runner_impl.h" -#include "base/bind.h" #include "base/format_macros.h" +#include "base/functional/bind.h" #include "base/memory/ptr_util.h" #include "base/strings/stringprintf.h" #include "base/task/thread_pool.h" diff --git a/libcef/browser/speech_recognition_manager_delegate.cc b/libcef/browser/speech_recognition_manager_delegate.cc index 8eb7568f..1a7c669a 100644 --- a/libcef/browser/speech_recognition_manager_delegate.cc +++ b/libcef/browser/speech_recognition_manager_delegate.cc @@ -10,8 +10,8 @@ #include "libcef/browser/thread_util.h" #include "libcef/common/cef_switches.h" -#include "base/bind.h" #include "base/command_line.h" +#include "base/functional/bind.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/notification_observer.h" diff --git a/libcef/browser/ssl_host_state_delegate.cc b/libcef/browser/ssl_host_state_delegate.cc index e97bc1ad..15a98cad 100644 --- a/libcef/browser/ssl_host_state_delegate.cc +++ b/libcef/browser/ssl_host_state_delegate.cc @@ -4,7 +4,7 @@ #include "libcef/browser/ssl_host_state_delegate.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "net/base/hash_value.h" using content::SSLHostStateDelegate; diff --git a/libcef/browser/test/test_server_impl.cc b/libcef/browser/test/test_server_impl.cc index b02d605b..73719625 100644 --- a/libcef/browser/test/test_server_impl.cc +++ b/libcef/browser/test/test_server_impl.cc @@ -8,8 +8,8 @@ #include "base/logging.h" #include "base/strings/string_util.h" +#include "base/task/single_thread_task_runner.h" #include "base/threading/thread_checker.h" -#include "base/threading/thread_task_runner_handle.h" #include "net/http/http_request_headers.h" #include "net/test/embedded_test_server/embedded_test_server.h" #include "net/test/embedded_test_server/http_response.h" @@ -22,7 +22,8 @@ class CefTestServerConnectionImpl : public CefTestServerConnection { public: explicit CefTestServerConnectionImpl( base::WeakPtr<HttpResponseDelegate> delegate) - : delegate_(delegate), task_runner_(base::ThreadTaskRunnerHandle::Get()) { + : delegate_(delegate), + task_runner_(base::SingleThreadTaskRunner::GetCurrentDefault()) { DCHECK(delegate_); DCHECK(task_runner_); } diff --git a/libcef/browser/trace_subscriber.cc b/libcef/browser/trace_subscriber.cc index 2ed76026..1f6c0300 100644 --- a/libcef/browser/trace_subscriber.cc +++ b/libcef/browser/trace_subscriber.cc @@ -7,7 +7,7 @@ #include "libcef/browser/thread_util.h" #include "base/files/file_util.h" -#include "base/threading/thread_task_runner_handle.h" +#include "base/task/single_thread_task_runner.h" #include "base/trace_event/trace_event.h" #include "content/public/browser/tracing_controller.h" @@ -111,7 +111,7 @@ bool CefTraceSubscriber::EndTracing(const base::FilePath& tracing_file, // Create a new temporary file path on the FILE thread, then continue. CEF_POST_USER_VISIBLE_TASK( base::BindOnce(CreateTemporaryFileOnBackgroundThread, - base::ThreadTaskRunnerHandle::Get(), + base::SingleThreadTaskRunner::GetCurrentDefault(), base::BindOnce(&CefTraceSubscriber::ContinueEndTracing, weak_factory_.GetWeakPtr(), callback))); return true; diff --git a/libcef/browser/views/browser_view_impl.h b/libcef/browser/views/browser_view_impl.h index e5d9cc19..90033d58 100644 --- a/libcef/browser/views/browser_view_impl.h +++ b/libcef/browser/views/browser_view_impl.h @@ -13,7 +13,7 @@ #include "libcef/browser/views/browser_view_view.h" #include "libcef/browser/views/view_impl.h" -#include "base/callback_forward.h" +#include "base/functional/callback_forward.h" #include "base/memory/weak_ptr.h" #include "ui/views/controls/webview/unhandled_keyboard_event_handler.h" diff --git a/libcef/common/alloy/alloy_content_client.cc b/libcef/common/alloy/alloy_content_client.cc index dec9977f..99d72f7b 100644 --- a/libcef/common/alloy/alloy_content_client.cc +++ b/libcef/common/alloy/alloy_content_client.cc @@ -47,9 +47,10 @@ namespace { // The following plugin-related methods are from // chrome/common/chrome_content_client.cc -const char kPDFPluginExtension[] = "pdf"; -const char kPDFPluginDescription[] = "Portable Document Format"; -const uint32_t kPDFPluginPermissions = +constexpr char kPDFPluginName[] = "Chromium PDF Plugin"; +constexpr char kPDFPluginExtension[] = "pdf"; +constexpr char kPDFPluginDescription[] = "Portable Document Format"; +constexpr uint32_t kPDFPluginPermissions = ppapi::PERMISSION_PDF | ppapi::PERMISSION_DEV; // Appends the known built-in plugins to the given vector. Some built-in @@ -62,9 +63,9 @@ void ComputeBuiltInPlugins(std::vector<content::ContentPluginInfo>* plugins) { content::ContentPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; - pdf_info.name = ChromeContentClient::kPDFInternalPluginName; + pdf_info.name = kPDFPluginName; pdf_info.description = kPDFPluginDescription; - pdf_info.path = base::FilePath(ChromeContentClient::kPDFPluginPath); + pdf_info.path = base::FilePath(ChromeContentClient::kPDFInternalPluginPath); content::WebPluginMimeType pdf_mime_type(pdf::kInternalPluginMimeType, kPDFPluginExtension, kPDFPluginDescription); diff --git a/libcef/common/app_manager.h b/libcef/common/app_manager.h index f50e1cb9..94ea9679 100644 --- a/libcef/common/app_manager.h +++ b/libcef/common/app_manager.h @@ -11,7 +11,7 @@ #include "include/cef_app.h" #include "include/cef_request_context.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "build/build_config.h" #include "content/public/common/content_client.h" diff --git a/libcef/common/extensions/api/README.txt b/libcef/common/extensions/api/README.txt index 0fbbc8d3..5e423e7d 100644 --- a/libcef/common/extensions/api/README.txt +++ b/libcef/common/extensions/api/README.txt @@ -22,7 +22,7 @@ To add a new extension API implemented only in CEF ***: files if necessary [2]. 7. Call `<class>::GetInstance();` or `<class>Factory::GetFactoryInstance();` [3] from EnsureBrowserContextKeyedServiceFactoriesBuilt in - libcef/browser/extensions/browser_context_keyed_service_factories.cc. + libcef/browser/browser_context_keyed_service_factories.cc. 8. Call `DependsOn(<class>Factory::GetInstance());` from CefExtensionSystemFactory::CefExtensionSystemFactory in libcef/browser/extensions/extension_system_factory.cc if necessary [3]. diff --git a/libcef/common/extensions/api/_api_features.json b/libcef/common/extensions/api/_api_features.json index 551fe286..db253cfa 100644 --- a/libcef/common/extensions/api/_api_features.json +++ b/libcef/common/extensions/api/_api_features.json @@ -22,6 +22,10 @@ "channel": "stable", "matches": ["<all_urls>"] }, + "pdfViewerPrivate": { + "dependencies": ["permission:pdfViewerPrivate"], + "contexts": ["blessed_extension"] + }, "resourcesPrivate": [ { "dependencies": ["permission:resourcesPrivate"], diff --git a/libcef/common/extensions/api/_permission_features.json b/libcef/common/extensions/api/_permission_features.json index 1c904b9d..96013ada 100644 --- a/libcef/common/extensions/api/_permission_features.json +++ b/libcef/common/extensions/api/_permission_features.json @@ -16,6 +16,13 @@ "channel": "stable", "extension_types": ["extension", "legacy_packaged_app"] }, + "pdfViewerPrivate": { + "channel": "stable", + "extension_types": ["extension"], + "allowlist": [ + "CBCC42ABED43A4B58FE3810E62AFFA010EB0349F" // PDF Viewer + ] + }, "resourcesPrivate": { "channel": "stable", "extension_types": [ diff --git a/libcef/common/frame_util.h b/libcef/common/frame_util.h index e23e04e8..7aeedbf0 100644 --- a/libcef/common/frame_util.h +++ b/libcef/common/frame_util.h @@ -9,8 +9,8 @@ #include <string> #include "base/logging.h" +#include "content/public/browser/child_process_host.h" #include "content/public/browser/global_routing_id.h" -#include "content/public/common/child_process_host.h" namespace content { class NavigationHandle; diff --git a/libcef/common/scheme_registrar_impl.cc b/libcef/common/scheme_registrar_impl.cc index 112876eb..a31734f7 100644 --- a/libcef/common/scheme_registrar_impl.cc +++ b/libcef/common/scheme_registrar_impl.cc @@ -10,7 +10,7 @@ #include "libcef/common/net/scheme_info.h" #include "libcef/common/net/scheme_registration.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/logging.h" #include "base/strings/string_util.h" diff --git a/libcef/common/string_util.h b/libcef/common/string_util.h index 0261fbc5..f9727653 100644 --- a/libcef/common/string_util.h +++ b/libcef/common/string_util.h @@ -8,7 +8,7 @@ #include "include/cef_base.h" -#include "base/callback.h" +#include "base/functional/callback.h" #include "base/memory/scoped_refptr.h" namespace base { diff --git a/libcef/common/task_impl.cc b/libcef/common/task_impl.cc index 4f7122ee..6e3bc087 100644 --- a/libcef/common/task_impl.cc +++ b/libcef/common/task_impl.cc @@ -5,7 +5,7 @@ #include "include/cef_task.h" #include "libcef/common/task_runner_impl.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/location.h" #include "base/logging.h" #include "base/time/time.h" diff --git a/libcef/common/task_runner_impl.cc b/libcef/common/task_runner_impl.cc index ab345c20..fe5b260d 100644 --- a/libcef/common/task_runner_impl.cc +++ b/libcef/common/task_runner_impl.cc @@ -6,11 +6,11 @@ #include "libcef/common/task_runner_manager.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/location.h" #include "base/logging.h" +#include "base/task/single_thread_task_runner.h" #include "base/task/thread_pool.h" -#include "base/threading/thread_task_runner_handle.h" #include "base/time/time.h" #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/browser_thread.h" @@ -110,7 +110,7 @@ CefTaskRunnerImpl::GetCurrentTaskRunner() { // Check for a MessageLoopProxy. This covers all of the named browser and // render process threads, plus a few extra. - if (auto task_runner = base::ThreadTaskRunnerHandle::Get()) { + if (auto task_runner = base::SingleThreadTaskRunner::GetCurrentDefault()) { return task_runner; } diff --git a/libcef/common/thread_impl.cc b/libcef/common/thread_impl.cc index b974e986..7c4a0946 100644 --- a/libcef/common/thread_impl.cc +++ b/libcef/common/thread_impl.cc @@ -6,7 +6,7 @@ #include "libcef/common/task_runner_impl.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/threading/thread_restrictions.h" namespace { diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 437724e1..51d89cfd 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -180,7 +180,7 @@ void AlloyContentRendererClient::RenderThreadStarted() { const base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - render_task_runner_ = base::ThreadTaskRunnerHandle::Get(); + render_task_runner_ = base::SingleThreadTaskRunner::GetCurrentDefault(); observer_ = std::make_unique<AlloyRenderThreadObserver>(); web_cache_impl_ = std::make_unique<web_cache::WebCacheImpl>(); visited_link_slave_ = std::make_unique<visitedlink::VisitedLinkReader>(); @@ -238,7 +238,7 @@ void AlloyContentRendererClient::RenderThreadStarted() { void AlloyContentRendererClient::ExposeInterfacesToBrowser( mojo::BinderMap* binders) { - auto task_runner = base::SequencedTaskRunnerHandle::Get(); + auto task_runner = base::SequencedTaskRunner::GetCurrentDefault(); binders->Add<web_cache::mojom::WebCache>( base::BindRepeating(&web_cache::WebCacheImpl::BindReceiver, diff --git a/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc b/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc index 576b5eb9..5d234267 100644 --- a/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc +++ b/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc @@ -28,7 +28,7 @@ ChromeContentRendererClientCef::GetCurrentTaskRunner() { void ChromeContentRendererClientCef::RenderThreadStarted() { ChromeContentRendererClient::RenderThreadStarted(); - render_task_runner_ = base::ThreadTaskRunnerHandle::Get(); + render_task_runner_ = base::SingleThreadTaskRunner::GetCurrentDefault(); } void ChromeContentRendererClientCef::RenderThreadConnected() { diff --git a/libcef/renderer/render_manager.cc b/libcef/renderer/render_manager.cc index 3b865186..77e2c59d 100644 --- a/libcef/renderer/render_manager.cc +++ b/libcef/renderer/render_manager.cc @@ -140,7 +140,7 @@ void CefRenderManager::DevToolsAgentDetached() { } void CefRenderManager::ExposeInterfacesToBrowser(mojo::BinderMap* binders) { - auto task_runner = base::SequencedTaskRunnerHandle::Get(); + auto task_runner = base::SequencedTaskRunner::GetCurrentDefault(); binders->Add<cef::mojom::RenderManager>( base::BindRepeating( diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index b26af072..96aae6e0 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -50,14 +50,14 @@ class CefWebURLLoaderClient : public blink::WebURLLoaderClient { void DidFinishLoading( base::TimeTicks finish_time, int64_t total_encoded_data_length, - int64_t total_encoded_body_length, + uint64_t total_encoded_body_length, int64_t total_decoded_body_length, bool should_report_corb_blocking, absl::optional<bool> pervasive_payload_requested) override; void DidFail(const WebURLError&, base::TimeTicks finish_time, int64_t total_encoded_data_length, - int64_t total_encoded_body_length, + uint64_t total_encoded_body_length, int64_t total_decoded_body_length) override; void DidStartLoadingResponseBody( mojo::ScopedDataPipeConsumerHandle response_body) override; @@ -381,7 +381,7 @@ void CefWebURLLoaderClient::DidReceiveData(const char* data, int dataLength) { void CefWebURLLoaderClient::DidFinishLoading( base::TimeTicks finish_time, int64_t total_encoded_data_length, - int64_t total_encoded_body_length, + uint64_t total_encoded_body_length, int64_t total_decoded_body_length, bool should_report_corb_blocking, absl::optional<bool> pervasive_payload_requested) { @@ -391,7 +391,7 @@ void CefWebURLLoaderClient::DidFinishLoading( void CefWebURLLoaderClient::DidFail(const WebURLError& error, base::TimeTicks finish_time, int64_t total_encoded_data_length, - int64_t total_encoded_body_length, + uint64_t total_encoded_body_length, int64_t total_decoded_body_length) { context_->OnError(error); } diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 6fa89513..d8c6534e 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -34,7 +34,7 @@ #include "libcef/renderer/render_frame_util.h" #include "libcef/renderer/thread_util.h" -#include "base/bind.h" +#include "base/functional/bind.h" #include "base/lazy_instance.h" #include "base/strings/string_number_conversions.h" #include "base/threading/thread_local.h" diff --git a/libcef_dll/cpptoc/media_sink_cpptoc.cc b/libcef_dll/cpptoc/media_sink_cpptoc.cc index 4a453146..98e032a5 100644 --- a/libcef_dll/cpptoc/media_sink_cpptoc.cc +++ b/libcef_dll/cpptoc/media_sink_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=e574ca5c4349122acd1409b0622bd0aa72dce8b6$ +// $hash=9a49bd42c37e24a9f968dc703b91ac0a0d467471$ // #include "libcef_dll/cpptoc/media_sink_cpptoc.h" @@ -57,24 +57,6 @@ media_sink_get_name(struct _cef_media_sink_t* self) { return _retval.DetachToUserFree(); } -cef_string_userfree_t CEF_CALLBACK -media_sink_get_description(struct _cef_media_sink_t* self) { - shutdown_checker::AssertNotShutdown(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) { - return NULL; - } - - // Execute - CefString _retval = CefMediaSinkCppToC::Get(self)->GetDescription(); - - // Return type: string - return _retval.DetachToUserFree(); -} - cef_media_sink_icon_type_t CEF_CALLBACK media_sink_get_icon_type(struct _cef_media_sink_t* self) { shutdown_checker::AssertNotShutdown(); @@ -182,7 +164,6 @@ media_sink_is_compatible_with(struct _cef_media_sink_t* self, CefMediaSinkCppToC::CefMediaSinkCppToC() { GetStruct()->get_id = media_sink_get_id; GetStruct()->get_name = media_sink_get_name; - GetStruct()->get_description = media_sink_get_description; GetStruct()->get_icon_type = media_sink_get_icon_type; GetStruct()->get_device_info = media_sink_get_device_info; GetStruct()->is_cast_sink = media_sink_is_cast_sink; diff --git a/libcef_dll/ctocpp/media_sink_ctocpp.cc b/libcef_dll/ctocpp/media_sink_ctocpp.cc index 12f9e5f7..6fb9833f 100644 --- a/libcef_dll/ctocpp/media_sink_ctocpp.cc +++ b/libcef_dll/ctocpp/media_sink_ctocpp.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=84b4fdb81093f8f1c3923718803bb2b8162b537f$ +// $hash=6a7b7f88d045e2827c989a39368741a8d6064da4$ // #include "libcef_dll/ctocpp/media_sink_ctocpp.h" @@ -57,25 +57,6 @@ NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetName() { return _retvalStr; } -NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetDescription() { - shutdown_checker::AssertNotShutdown(); - - cef_media_sink_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, get_description)) { - return CefString(); - } - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - cef_string_userfree_t _retval = _struct->get_description(_struct); - - // Return type: string - CefString _retvalStr; - _retvalStr.AttachToUserFree(_retval); - return _retvalStr; -} - NO_SANITIZE("cfi-icall") CefMediaSink::IconType CefMediaSinkCToCpp::GetIconType() { shutdown_checker::AssertNotShutdown(); diff --git a/libcef_dll/ctocpp/media_sink_ctocpp.h b/libcef_dll/ctocpp/media_sink_ctocpp.h index 766c420c..80e03936 100644 --- a/libcef_dll/ctocpp/media_sink_ctocpp.h +++ b/libcef_dll/ctocpp/media_sink_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=336516dab0f0d898a0416a0ae9be7ddf6d195b11$ +// $hash=f1a192a4341ed6fe0d4b6f8b065b372401e0f055$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_CTOCPP_H_ @@ -36,7 +36,6 @@ class CefMediaSinkCToCpp : public CefCToCppRefCounted<CefMediaSinkCToCpp, // CefMediaSink methods. CefString GetId() override; CefString GetName() override; - CefString GetDescription() override; IconType GetIconType() override; void GetDeviceInfo( CefRefPtr<CefMediaSinkDeviceInfoCallback> callback) override; diff --git a/patch/patch.cfg b/patch/patch.cfg index f2c01f3c..157a7502 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -612,5 +612,17 @@ patches = [ # use_sysroot=false on Ubuntu 18.04. # https://chromium-review.googlesource.com/c/chromium/src/+/3960017 'name': 'linux_glib_deprecated_volatile' + }, + { + # Specify an output name for the pdfium build component to fix PDF + # loading with component build. + # https://pdfium-review.googlesource.com/c/pdfium/+/103501 + 'name': 'pdfium_103501', + 'path': 'third_party/pdfium' + }, + { + # Windows: Fix cef_sandbox compile error related to unsafe narrowing. + # https://chromium-review.googlesource.com/c/chromium/src/+/4219163 + 'name': 'win_power_monitor_4219163' } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index fc4f0951..3532b8d1 100644 --- a/patch/patches/base_command_line_1872.patch +++ b/patch/patches/base_command_line_1872.patch @@ -1,8 +1,8 @@ diff --git base/command_line.cc base/command_line.cc -index d65d212e4e9c7..3a7dea16e2465 100644 +index ae845dcf3972a..a6fc08d159b74 100644 --- base/command_line.cc +++ base/command_line.cc -@@ -340,11 +340,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, +@@ -339,11 +339,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, void CommandLine::AppendSwitchNative(StringPiece switch_string, CommandLine::StringPieceType value) { diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 8e17684e..d58b3134 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,8 +1,8 @@ diff --git base/BUILD.gn base/BUILD.gn -index 904eaff4687de..3e5912b7910df 100644 +index 1f0e5cc5f0fae..6f2003a67c9ce 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -38,6 +38,7 @@ import("//build/config/ui.gni") +@@ -39,6 +39,7 @@ import("//build/config/ui.gni") import("//build/nocompile.gni") import("//build/timestamp.gni") import("//build_overrides/build.gni") @@ -10,7 +10,7 @@ index 904eaff4687de..3e5912b7910df 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1966,7 +1967,11 @@ component("base") { +@@ -1960,7 +1961,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 904eaff4687de..3e5912b7910df 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2107,6 +2112,12 @@ component("base") { +@@ -2104,6 +2109,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -37,10 +37,10 @@ index 904eaff4687de..3e5912b7910df 100644 "cfgmgr32.lib", "powrprof.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index 8c5b7e7d71a56..195d8ae273e31 100644 +index fd6e8a1696c94..df996398c1e78 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc -@@ -14,6 +14,7 @@ +@@ -13,6 +13,7 @@ #include "base/dcheck_is_on.h" #include "base/no_destructor.h" #include "base/sampling_heap_profiler/poisson_allocation_sampler.h" @@ -48,7 +48,7 @@ index 8c5b7e7d71a56..195d8ae273e31 100644 #if DCHECK_IS_ON() #include <atomic> -@@ -276,7 +277,7 @@ struct Dispatcher::Impl { +@@ -259,7 +260,7 @@ struct Dispatcher::Impl { } void Reset() { @@ -87,18 +87,6 @@ index 29626e5853c6e..2fb1c61504c5d 100644 #include "base/hash/sha1_nacl.h" #else #include "base/hash/sha1_boringssl.h" -diff --git base/memory/raw_ptr.h base/memory/raw_ptr.h -index 4191f0e47f51e..0167438657063 100644 ---- base/memory/raw_ptr.h -+++ base/memory/raw_ptr.h -@@ -21,6 +21,7 @@ - #include "base/allocator/partition_allocator/partition_alloc_config.h" - #include "build/build_config.h" - #include "build/buildflag.h" -+#include "cef/libcef/features/features.h" - - #if defined(PA_ENABLE_MTE_CHECKED_PTR_SUPPORT_WITH_64_BITS_POINTERS) - #include "base/allocator/partition_allocator/partition_tag.h" diff --git base/rand_util.h base/rand_util.h index 04024537ee698..59864cb084559 100644 --- base/rand_util.h @@ -173,7 +161,7 @@ index 2d9a1633b564f..d304c204c43ff 100644 char* output_ptr = static_cast<char*>(output); while (output_length > 0) { diff --git base/unguessable_token.cc base/unguessable_token.cc -index ebb51d95575d3..fd9dc67dcf470 100644 +index aa7423f88d278..1b2c7d3e3c4a0 100644 --- base/unguessable_token.cc +++ base/unguessable_token.cc @@ -10,8 +10,9 @@ @@ -187,7 +175,7 @@ index ebb51d95575d3..fd9dc67dcf470 100644 #include "third_party/boringssl/src/include/openssl/mem.h" #endif -@@ -44,7 +45,7 @@ UnguessableToken UnguessableToken::Deserialize(uint64_t high, uint64_t low) { +@@ -46,7 +47,7 @@ absl::optional<UnguessableToken> UnguessableToken::Deserialize(uint64_t high, } bool UnguessableToken::operator==(const UnguessableToken& other) const { diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 597a5e93..9208ee61 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,8 +1,8 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index ff470894fc907..7719b8f7e7745 100644 +index 6006db1791a2a..81e7667183280 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -271,7 +271,7 @@ BrowserTaskExecutor::OnUserInputStart() { +@@ -273,7 +273,7 @@ BrowserTaskExecutor::OnUserInputStart() { // static void BrowserTaskExecutor::Shutdown() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index e10582f3..dc0188e7 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index 18c138c21a853..554e22458da45 100644 +index 4dbf8a2811c9e..917b6a2e7b56f 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1755,6 +1755,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( +@@ -1800,6 +1800,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -18,12 +18,12 @@ index 18c138c21a853..554e22458da45 100644 + } } - // TODO(wjmaclean): We should update the ProcessLock comparison API + // Make an exception to allow most visited tiles to commit in diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index 8dcc8499e45be..2116054a66828 100644 +index 76c8470dfd3e5..9ab6ce0759c9a 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -6780,10 +6780,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -6936,10 +6936,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index 8dcc8499e45be..2116054a66828 100644 } return origin_and_debug_info; -@@ -6813,6 +6825,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -6969,6 +6981,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( SandboxFlagsToCommit()); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index e493b22b..21191d2f 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index 944a039d066f6..5469f6662391a 100644 +index ef3285ae74e1b..c669380332eb9 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1883,8 +1883,6 @@ config("thin_archive") { +@@ -1911,8 +1911,6 @@ config("thin_archive") { # confuses lldb. if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 391a0034..4f55eac9 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index d7c913bdfe3b5..7443d705d634c 100644 +index 42712ea4134e1..eee57ad898aa9 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -10,7 +10,7 @@ index d7c913bdfe3b5..7443d705d634c 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1973,6 +1974,7 @@ static_library("browser") { +@@ -1974,6 +1975,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index d7c913bdfe3b5..7443d705d634c 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2529,6 +2531,10 @@ static_library("browser") { +@@ -2537,6 +2539,10 @@ static_library("browser") { ] } @@ -29,7 +29,7 @@ index d7c913bdfe3b5..7443d705d634c 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -6375,8 +6381,6 @@ static_library("browser") { +@@ -6076,8 +6082,6 @@ static_library("browser") { sources += [ "enterprise/chrome_browser_main_extra_parts_enterprise.cc", "enterprise/chrome_browser_main_extra_parts_enterprise.h", diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 86ca4c6c..e5401222 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index a640eeb910307..c32d7827e9240 100644 +index fa9472796576e..3e6a71e1e9697 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h @@ -199,9 +199,9 @@ class BrowserProcess { @@ -14,10 +14,10 @@ index a640eeb910307..c32d7827e9240 100644 std::unique_ptr<BackgroundModeManager> manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index b924f221dcb3c..9e156b83787ca 100644 +index c559c9dee4da0..facb6dc88e2e1 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1030,18 +1030,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1037,18 +1037,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -38,7 +38,7 @@ index b924f221dcb3c..9e156b83787ca 100644 std::unique_ptr<BackgroundModeManager> manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index ecae3d0e0ca71..83e7bbdbbe4ce 100644 +index c7fab534552b2..075f2e9cfdb66 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess, @@ -52,7 +52,7 @@ index ecae3d0e0ca71..83e7bbdbbe4ce 100644 std::unique_ptr<BackgroundModeManager> manager) override; #endif diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc -index 9210206d6fe6c..df950ed67ba38 100644 +index ac79a59ef056b..cac2b4d97271c 100644 --- chrome/browser/lifetime/browser_close_manager.cc +++ chrome/browser/lifetime/browser_close_manager.cc @@ -158,12 +158,14 @@ void BrowserCloseManager::CloseBrowsers() { diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 5dc4b79d..e5b97d95 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc -index 2ffda8141468b..1800b34155201 100644 +index 370d6ab102471..fe1e4111780ed 100644 --- chrome/browser/browser_about_handler.cc +++ chrome/browser/browser_about_handler.cc @@ -69,6 +69,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { @@ -13,7 +13,7 @@ index 2ffda8141468b..1800b34155201 100644 return false; } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 932388c328889..f5b0894158537 100644 +index 03a6d3a2ee5e8..a19224279243c 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -24,7 +24,7 @@ index 932388c328889..f5b0894158537 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -363,6 +364,10 @@ static_library("ui") { +@@ -361,6 +362,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -35,7 +35,7 @@ index 932388c328889..f5b0894158537 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -386,6 +391,7 @@ static_library("ui") { +@@ -385,6 +390,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -43,7 +43,7 @@ index 932388c328889..f5b0894158537 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2506,6 +2512,8 @@ static_library("ui") { +@@ -2527,6 +2533,8 @@ static_library("ui") { "views/apps/app_dialog/app_block_dialog_view.h", "views/apps/app_dialog/app_pause_dialog_view.cc", "views/apps/app_dialog/app_pause_dialog_view.h", @@ -52,7 +52,7 @@ index 932388c328889..f5b0894158537 100644 "views/apps/app_info_dialog/arc_app_info_links_panel.cc", "views/apps/app_info_dialog/arc_app_info_links_panel.h", "views/apps/chrome_app_window_client_views_chromeos.cc", -@@ -4242,8 +4250,6 @@ static_library("ui") { +@@ -4292,8 +4300,6 @@ static_library("ui") { "views/accessibility/theme_tracking_non_accessible_image_view.h", "views/apps/app_dialog/app_dialog_view.cc", "views/apps/app_dialog/app_dialog_view.h", @@ -61,7 +61,7 @@ index 932388c328889..f5b0894158537 100644 "views/apps/app_info_dialog/app_info_dialog_container.cc", "views/apps/app_info_dialog/app_info_dialog_container.h", "views/apps/app_info_dialog/app_info_dialog_views.cc", -@@ -5727,6 +5733,7 @@ static_library("ui") { +@@ -5799,6 +5805,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -70,10 +70,10 @@ index 932388c328889..f5b0894158537 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index a839ea0969600..b92b5a30ec2e1 100644 +index 08ac5f0afd874..480986df48aa6 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -265,6 +265,25 @@ +@@ -264,6 +264,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -99,7 +99,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -508,6 +527,13 @@ Browser::Browser(const CreateParams& params) +@@ -510,6 +529,13 @@ Browser::Browser(const CreateParams& params) tab_strip_model_->AddObserver(this); @@ -113,7 +113,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 location_bar_model_ = std::make_unique<LocationBarModelImpl>( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -645,6 +671,12 @@ Browser::~Browser() { +@@ -650,6 +676,12 @@ Browser::~Browser() { // away so they don't try and call back to us. if (select_file_dialog_.get()) select_file_dialog_->ListenerDestroyed(); @@ -126,7 +126,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1337,6 +1369,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1359,6 +1391,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -141,7 +141,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1344,8 +1384,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1366,8 +1406,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -162,7 +162,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1554,6 +1604,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1575,6 +1625,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -177,7 +177,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1684,6 +1742,15 @@ void Browser::AddNewContents( +@@ -1712,6 +1770,15 @@ void Browser::AddNewContents( return; } @@ -193,7 +193,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 chrome::AddWebContents(this, source, std::move(new_contents), target_url, disposition, window_features, window_action); } -@@ -1702,6 +1769,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1730,6 +1797,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -202,7 +202,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1729,6 +1798,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1757,6 +1826,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -211,7 +211,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 if (!GetStatusBubble()) return; -@@ -1736,6 +1807,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1764,6 +1835,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -229,7 +229,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1760,6 +1842,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1788,6 +1870,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -249,7 +249,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1852,6 +1947,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1880,6 +1975,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -260,16 +260,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1896,6 +1995,8 @@ void Browser::RendererResponsive( - void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) { - if (web_contents == tab_strip_model_->GetActiveWebContents()) - UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); -+ -+ CALL_CEF_DELEGATE(DidNavigatePrimaryMainFramePostCommit, web_contents); - } - - content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1956,11 +2057,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1991,11 +2090,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -285,7 +276,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2159,6 +2264,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2189,6 +2292,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -301,7 +292,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2695,13 +2809,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2725,13 +2837,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -323,9 +314,9 @@ index a839ea0969600..b92b5a30ec2e1 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2831,6 +2952,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { - content_translate_driver->RemoveTranslationObserver(this); +@@ -2863,6 +2982,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); + web_contents_collection_.StopObserving(web_contents); } + + CALL_CEF_DELEGATE(SetAsDelegate, web_contents, set_delegate); @@ -333,7 +324,7 @@ index a839ea0969600..b92b5a30ec2e1 100644 void Browser::TabDetachedAtImpl(content::WebContents* contents, diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index b50337f317a66..b12c2e76f32f8 100644 +index 08879ac2f134a..cdd6615f72db4 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -22,6 +22,7 @@ @@ -341,10 +332,10 @@ index b50337f317a66..b12c2e76f32f8 100644 #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" + #include "chrome/browser/tab_contents/web_contents_collection.h" #include "chrome/browser/themes/theme_service_observer.h" #include "chrome/browser/ui/bookmarks/bookmark_bar.h" - #include "chrome/browser/ui/bookmarks/bookmark_tab_helper_observer.h" -@@ -47,6 +48,10 @@ +@@ -48,6 +49,10 @@ #include "ui/gfx/geometry/rect.h" #include "ui/shell_dialogs/select_file_dialog.h" @@ -355,7 +346,7 @@ index b50337f317a66..b12c2e76f32f8 100644 #if BUILDFLAG(IS_ANDROID) #error This file should only be included on desktop. #endif -@@ -311,6 +316,11 @@ class Browser : public TabStripModelObserver, +@@ -315,6 +320,11 @@ class Browser : public TabStripModelObserver, float initial_aspect_ratio = 1.0f; bool lock_aspect_ratio = false; @@ -367,7 +358,7 @@ index b50337f317a66..b12c2e76f32f8 100644 private: friend class Browser; friend class WindowSizerChromeOSTest; -@@ -386,6 +396,13 @@ class Browser : public TabStripModelObserver, +@@ -390,6 +400,13 @@ class Browser : public TabStripModelObserver, force_skip_warning_user_on_close_ = force_skip_warning_user_on_close; } @@ -381,7 +372,7 @@ index b50337f317a66..b12c2e76f32f8 100644 // Accessors //////////////////////////////////////////////////////////////// const CreateParams& create_params() const { return create_params_; } -@@ -459,6 +476,12 @@ class Browser : public TabStripModelObserver, +@@ -463,6 +480,12 @@ class Browser : public TabStripModelObserver, base::WeakPtr<Browser> AsWeakPtr(); @@ -394,7 +385,7 @@ index b50337f317a66..b12c2e76f32f8 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -829,11 +852,19 @@ class Browser : public TabStripModelObserver, +@@ -839,11 +862,19 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -414,7 +405,7 @@ index b50337f317a66..b12c2e76f32f8 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1235,6 +1266,8 @@ class Browser : public TabStripModelObserver, +@@ -1248,6 +1279,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -423,7 +414,7 @@ index b50337f317a66..b12c2e76f32f8 100644 CreationSource creation_source_ = CreationSource::kUnknown; UnloadController unload_controller_; -@@ -1299,6 +1332,10 @@ class Browser : public TabStripModelObserver, +@@ -1312,6 +1345,10 @@ class Browser : public TabStripModelObserver, extension_browser_window_helper_; #endif @@ -433,12 +424,12 @@ index b50337f317a66..b12c2e76f32f8 100644 + const base::ElapsedTimer creation_timer_; - // The following factory is used for chrome update coalescing. + // The opener browser of the document picture-in-picture browser. Null if the diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index abe8e2d792d53..33723c6e9f9a5 100644 +index f6df2d49dc719..01e5e7a42fa96 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -561,6 +561,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents( +@@ -565,6 +565,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents( std::unique_ptr<WebContents> target_contents = WebContents::Create(create_params); diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index cf9c87d4..d401611f 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -56,7 +56,7 @@ index c8a0156b69cc3..6a6fac072143d 100644 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) SupervisedUserSettingsService* supervised_service = diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index 7847420167a30..c18f0f023c72c 100644 +index c65b17d8ee9e2..1c6e91858ba9e 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules( diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 9f17ddbd..266ee231 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 1907eb7b5c677..c437f31bc260e 100644 +index c3350ad6f9d34..851eb1cfed65b 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -310,6 +310,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() { +@@ -313,6 +313,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() { return callback.get(); } @@ -16,7 +16,7 @@ index 1907eb7b5c677..c437f31bc260e 100644 enum class UmaEnumIdLookupType { GeneralEnumId, ContextSpecificEnumId, -@@ -549,6 +556,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { +@@ -555,6 +562,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) return 1; @@ -27,10 +27,10 @@ index 1907eb7b5c677..c437f31bc260e 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -744,6 +755,14 @@ RenderViewContextMenu::RenderViewContextMenu( - ? GetBrowser()->app_controller()->system_app() - : nullptr; - #endif // BUILDFLAG(IS_CHROMEOS_ASH) +@@ -756,6 +767,14 @@ RenderViewContextMenu::RenderViewContextMenu( + #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this); + #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) + + auto* cb = GetMenuCreatedCallback(); + if (!cb->is_null()) { @@ -42,7 +42,7 @@ index 1907eb7b5c677..c437f31bc260e 100644 } RenderViewContextMenu::~RenderViewContextMenu() = default; -@@ -1162,6 +1181,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1170,6 +1189,12 @@ void RenderViewContextMenu::InitMenu() { // menu, meaning that each menu item added/removed in this function will cause // it to visibly jump on the screen (see b/173569669). AppendQuickAnswersItems(); @@ -55,7 +55,7 @@ index 1907eb7b5c677..c437f31bc260e 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3011,6 +3036,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3050,6 +3075,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,10 +69,10 @@ index 1907eb7b5c677..c437f31bc260e 100644 RenderViewContextMenu::GetHandlersForLinkUrl() { custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h -index 203daac4b57ce..4a18c2f5b6034 100644 +index f0c2e640e7373..5bf9f35335878 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -134,6 +134,12 @@ class RenderViewContextMenu +@@ -139,6 +139,12 @@ class RenderViewContextMenu } #endif @@ -96,10 +96,10 @@ index 203daac4b57ce..4a18c2f5b6034 100644 // "Use enhanced spell check" items. std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_; diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -index 42d0c503bd2e9..03063d0f6f723 100644 +index ab018dd1ce675..1d80631a0c2ec 100644 --- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -@@ -148,6 +148,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, +@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, bool RenderViewContextMenuViews::GetAcceleratorForCommandId( int command_id, ui::Accelerator* accel) const { @@ -110,7 +110,7 @@ index 42d0c503bd2e9..03063d0f6f723 100644 // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do. switch (command_id) { diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc -index 4b20d72d73a02..41d331e469f41 100644 +index 62142213ca3e9..f2187cadb6cdf 100644 --- components/renderer_context_menu/render_view_context_menu_base.cc +++ components/renderer_context_menu/render_view_context_menu_base.cc @@ -382,6 +382,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index f83d3eca..311c1f0e 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc -index ec9d8e38dd4ba..56ed3f097843c 100644 +index 24b1b799392ce..be2d605ab8907 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -20,6 +20,7 @@ @@ -37,7 +37,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 #if BUILDFLAG(FULL_SAFE_BROWSING) enterprise_connectors::ContentAnalysisDelegate::Data data; if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled( -@@ -528,7 +542,8 @@ bool FileSelectHelper::IsDirectoryEnumerationStartedForTesting() { +@@ -529,7 +543,8 @@ bool FileSelectHelper::IsDirectoryEnumerationStartedForTesting() { std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> FileSelectHelper::GetFileTypesFromAcceptType( @@ -47,7 +47,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>(); if (accept_types.empty()) return base_file_type; -@@ -541,17 +556,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -542,17 +557,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector<base::FilePath::StringType>* extensions = &file_type->extensions.back(); @@ -73,7 +73,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 } else { if (!base::IsStringASCII(accept_type)) continue; -@@ -562,10 +584,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -563,10 +585,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( description_id = IDS_AUDIO_FILES; else if (ascii_type == "video/*") description_id = IDS_VIDEO_FILES; @@ -94,7 +94,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -590,6 +620,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -591,6 +621,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( l10n_util::GetStringUTF16(description_id)); } @@ -110,7 +110,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 return file_type; } -@@ -597,7 +636,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -598,7 +637,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr<content::FileSelectListener> listener, @@ -120,7 +120,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -616,6 +656,7 @@ void FileSelectHelper::RunFileChooser( +@@ -617,6 +657,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr<FileSelectHelper> file_select_helper( new FileSelectHelper(profile)); @@ -128,7 +128,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 file_select_helper->RunFileChooser(render_frame_host, std::move(listener), params.Clone()); } -@@ -669,7 +710,8 @@ void FileSelectHelper::RunFileChooser( +@@ -670,7 +711,8 @@ void FileSelectHelper::RunFileChooser( } void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { @@ -139,7 +139,7 @@ index ec9d8e38dd4ba..56ed3f097843c 100644 params->need_local_path ? ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH : ui::SelectFileDialog::FileTypeInfo::ANY_PATH; diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h -index bacd6fd957dba..eabb9b6af35a4 100644 +index d4b49202f61ce..4813ec70d9b1b 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h @@ -65,7 +65,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< @@ -152,7 +152,7 @@ index bacd6fd957dba..eabb9b6af35a4 100644 // Enumerates all the files in directory. static void EnumerateDirectory( -@@ -293,7 +294,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -296,7 +297,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< // |accept_types| contains only valid lowercased MIME types or file extensions // beginning with a period (.). static std::unique_ptr<ui::SelectFileDialog::FileTypeInfo> @@ -162,7 +162,7 @@ index bacd6fd957dba..eabb9b6af35a4 100644 // Check the accept type is valid. It is expected to be all lower case with // no whitespace. -@@ -358,6 +360,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -361,6 +363,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< // Set to false in unit tests since there is no WebContents. bool abort_on_missing_web_contents_in_tests_ = true; @@ -186,7 +186,7 @@ index 026f8ae631697..45b324fd3ae25 100644 raw_ptr<content::WebContents, DanglingUntriaged> source_contents_; }; diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc -index 53b143e844879..f3c90339c8695 100644 +index 101e91826023b..35456ffad43f3 100644 --- ui/shell_dialogs/execute_select_file_win.cc +++ ui/shell_dialogs/execute_select_file_win.cc @@ -297,9 +297,7 @@ bool ExecuteSelectSingleFile(HWND owner, @@ -238,7 +238,7 @@ index 53b143e844879..f3c90339c8695 100644 paths.push_back(std::move(path)); } diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc -index 3defd211d7f52..fce15a249bd1f 100644 +index 4a67edd5e5ea0..dfbfd166fc33a 100644 --- ui/shell_dialogs/select_file_dialog.cc +++ ui/shell_dialogs/select_file_dialog.cc @@ -87,8 +87,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { @@ -323,7 +323,7 @@ index c7acd9b05fbb8..3e95e4125fa24 100644 } // namespace ui diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm -index 3cd217d5a0af9..5826fe4aea689 100644 +index 0b8aaa3c0e4f0..fe01d3db2eabe 100644 --- ui/shell_dialogs/select_file_dialog_mac.mm +++ ui/shell_dialogs/select_file_dialog_mac.mm @@ -102,6 +102,10 @@ void SelectFileDialogImpl::SelectFileImpl( @@ -338,10 +338,10 @@ index 3cd217d5a0af9..5826fe4aea689 100644 std::make_unique<remote_cocoa::SelectFileDialogBridge>(ns_window), std::move(receiver)); diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc -index 5e128434d9968..1198b14aa240b 100644 +index 04aa920d91675..93ea4988839cf 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -251,6 +251,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -252,6 +252,8 @@ void SelectFileDialogImpl::SelectFileImpl( HWND owner = owning_window && owning_window->GetRootWindow() ? owning_window->GetHost()->GetAcceleratedWidget() : nullptr; diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index 3bc63c3d..629f0765 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -12,7 +12,7 @@ index d62e9fa67d534..e7bdaeb7b5e19 100644 // on the screen, we can't actually attach to it. parent_window = nullptr; diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc -index aa0bbc8ae1a0f..d862340edfb0b 100644 +index 3b41c7d676b35..e76c13cd8d122 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc @@ -101,15 +101,24 @@ void UpdateModalDialogPosition(views::Widget* widget, @@ -112,10 +112,10 @@ index 51ed6bcf6b540..9ae4737e0737e 100644 virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0; // Returns whether a dialog currently about to be shown should be activated. diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc -index 54cd17c85983d..c8c276169eaec 100644 +index fca1500246f01..e0c719b90f5da 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc -@@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() { +@@ -54,10 +54,12 @@ DialogDelegate::DialogDelegate() { // static Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, gfx::NativeWindow context, @@ -130,7 +130,7 @@ index 54cd17c85983d..c8c276169eaec 100644 widget->Init(std::move(params)); return widget; } -@@ -72,22 +74,24 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, +@@ -66,17 +68,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, Widget* DialogDelegate::CreateDialogWidget( std::unique_ptr<WidgetDelegate> delegate, gfx::NativeWindow context, @@ -152,15 +152,9 @@ index 54cd17c85983d..c8c276169eaec 100644 - return parent != nullptr; + return parent != nullptr || parent_widget != gfx::kNullAcceleratedWidget; #else - #if BUILDFLAG(IS_WIN) - // The new style doesn't support unparented dialogs on Windows Classic themes. - if (!ui::win::IsAeroGlassEnabled()) -- return parent != nullptr; -+ return parent != nullptr || parent_widget != gfx::kNullAcceleratedWidget; - #endif return true; #endif -@@ -98,14 +102,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -87,14 +91,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, @@ -178,7 +172,7 @@ index 54cd17c85983d..c8c276169eaec 100644 if (!dialog || dialog->use_custom_frame()) { params.opacity = Widget::InitParams::WindowOpacity::kTranslucent; -@@ -118,6 +123,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -107,6 +112,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( } params.context = context; params.parent = parent; @@ -187,7 +181,7 @@ index 54cd17c85983d..c8c276169eaec 100644 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child // widgets to prevent top-level window behavior (independent movement, etc). diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h -index b0923fe17e355..2b0545061e0e9 100644 +index 0b660d38eeb03..4f402ee8ddbd4 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h @@ -94,13 +94,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index ced81058..f6249c2e 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc -index 2b64f15504dcb..7c65f1b0d8baa 100644 +index e49e111d2e867..83f3c9221fa1e 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -13,6 +13,7 @@ diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index 37f5d434..e0f8be41 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -44,18 +44,18 @@ index 16107572d4d0d..409e9ea870482 100644 base::FeatureList::IsEnabled( features::kPeriodicSyncPermissionForDefaultSearchEngine) && diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc -index d28d9f115dc18..6bc4b61617bf5 100644 +index faa6ee8eb3dbc..4cf7c6959c7e6 100644 --- chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc -@@ -13,6 +13,7 @@ - #include "base/strings/string_util.h" +@@ -14,6 +14,7 @@ + #include "base/time/time.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -219,6 +220,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( +@@ -174,6 +175,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( double ChromePermissionsClient::GetSiteEngagementScore( content::BrowserContext* browser_context, const GURL& origin) { @@ -65,7 +65,7 @@ index d28d9f115dc18..6bc4b61617bf5 100644 return site_engagement::SiteEngagementService::Get( Profile::FromBrowserContext(browser_context)) ->GetScore(origin); -@@ -303,8 +307,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( +@@ -320,8 +324,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( std::make_unique<ContextualNotificationPermissionUiSelector>()); selectors.emplace_back(std::make_unique<PrefNotificationPermissionUiSelector>( Profile::FromBrowserContext(browser_context))); @@ -77,7 +77,7 @@ index d28d9f115dc18..6bc4b61617bf5 100644 } diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc -index 3649a61d07b7d..22fe4f512e93b 100644 +index 5e3e2bd6f1e69..4594213db914f 100644 --- chrome/browser/permissions/permission_manager_factory.cc +++ chrome/browser/permissions/permission_manager_factory.cc @@ -6,6 +6,7 @@ @@ -88,7 +88,7 @@ index 3649a61d07b7d..22fe4f512e93b 100644 #include "chrome/browser/background_fetch/background_fetch_permission_context.h" #include "chrome/browser/background_sync/periodic_background_sync_permission_context.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -59,8 +60,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts( +@@ -60,8 +61,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts( std::make_unique<GeolocationPermissionContextDelegate>(profile); #endif // BUILDFLAG(IS_ANDROID) #if BUILDFLAG(IS_MAC) @@ -100,7 +100,7 @@ index 3649a61d07b7d..22fe4f512e93b 100644 delegates.media_stream_device_enumerator = MediaCaptureDevicesDispatcher::GetInstance(); diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc -index 2a52f59d04ba6..c759dac784553 100644 +index 9836207f50e5b..09d8f5549820c 100644 --- chrome/browser/storage/durable_storage_permission_context.cc +++ chrome/browser/storage/durable_storage_permission_context.cc @@ -8,6 +8,7 @@ @@ -111,7 +111,7 @@ index 2a52f59d04ba6..c759dac784553 100644 #include "chrome/browser/bookmarks/bookmark_model_factory.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -52,7 +53,9 @@ void DurableStoragePermissionContext::DecidePermission( +@@ -55,7 +56,9 @@ void DurableStoragePermissionContext::DecidePermission( // Durable is only allowed to be granted to the top-level origin. Embedding // origin is the last committed navigation origin to the web contents. diff --git a/patch/patches/chrome_browser_profile_menu.patch b/patch/patches/chrome_browser_profile_menu.patch index 064a7e87..5377a418 100644 --- a/patch/patches/chrome_browser_profile_menu.patch +++ b/patch/patches/chrome_browser_profile_menu.patch @@ -14,10 +14,10 @@ index 45f661faa6e0b..777a1f6c333b6 100644 ? profile_metrics::BrowserProfileType::kRegular : profile_metrics::BrowserProfileType::kIncognito; diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -index 07edba472de67..2545b4926e66e 100644 +index f3a5093abe7ca..f2bcc7b3c1f4c 100644 --- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc +++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -@@ -29,7 +29,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( +@@ -30,7 +30,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( dialog_type_(type), incognito_profile_(incognito_profile) { DCHECK(incognito_profile_); @@ -44,7 +44,7 @@ index caa20ec03434a..2a3ca921445c1 100644 avatar_toolbar_button, GetBrowser().profile(), type); DCHECK_EQ(nullptr, bubble_tracker_.view()); diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc -index 0d0b99bf57efa..2f8ba83a313ab 100644 +index 723920ef96f9a..cb3cbbd18a957 100644 --- chrome/browser/ui/views/profiles/incognito_menu_view.cc +++ chrome/browser/ui/views/profiles/incognito_menu_view.cc @@ -37,7 +37,9 @@ @@ -59,10 +59,10 @@ index 0d0b99bf57efa..2f8ba83a313ab 100644 base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show")); diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc -index 413f221ac2553..4a066d59ed2f0 100644 +index 41546d7dce559..dce0122a85933 100644 --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc -@@ -44,7 +44,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { +@@ -45,7 +45,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { feature_engagement::kIPHProfileSwitchFeature); std::unique_ptr<ProfileMenuViewBase> bubble; diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 225f38be..8f488c57 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc -index 0d09e3048615b..38542a1571346 100644 +index 45357cf77c472..c5a4104a3414f 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -655,7 +655,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile( +@@ -656,7 +656,9 @@ std::unique_ptr<Profile> Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique<OffTheRecordProfileImpl>(parent, otr_profile_id); @@ -14,7 +14,7 @@ index 0d09e3048615b..38542a1571346 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index cb16500436e78..5fb96689f961e 100644 +index d035eb9f2bea7..0ff6726604022 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky @@ -52,7 +52,7 @@ index cb16500436e78..5fb96689f961e 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index d90969cd9478c..9cf454be330ce 100644 +index 1e6a22d95a53f..6ec4182bfc5e7 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h @@ -99,6 +99,10 @@ class Profile : public content::BrowserContext { @@ -75,20 +75,19 @@ index d90969cd9478c..9cf454be330ce 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr<Profile> CreateOffTheRecordProfile( -@@ -505,8 +511,6 @@ class Profile : public content::BrowserContext { +@@ -505,7 +511,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); - void NotifyOffTheRecordProfileCreated(Profile* off_the_record); -- - // Returns whether the user has signed in this profile to an account. - virtual bool IsSignedIn() = 0; + void NotifyProfileInitializationComplete(); + // Returns whether the user has signed in this profile to an account. diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index a2a12efa89104..9865a2349490a 100644 +index 1340e751c0381..a0875155ddad2 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1012,7 +1012,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1013,7 +1013,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -100,10 +99,10 @@ index a2a12efa89104..9865a2349490a 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index fb98d310ee001..4180de71d02de 100644 +index 4f6dd066df3de..4d04f0ad554df 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -380,7 +380,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -381,7 +381,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif @@ -135,12 +134,12 @@ index 54502d1b44a82..8134c87824687 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc -index 69f3761f103ef..78e4ae61b39ae 100644 +index 43082afabf4bb..fa87aae9cbc93 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -8,6 +8,7 @@ - #include "base/bind.h" + #include "base/functional/bind.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/content_settings/content_settings_manager_delegate.h" diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 08a00b63..82c9c3f1 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 1197ad7d00986..0174e5e2b76d5 100644 +index da80c70f42a61..31441ecc1ee83 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn @@ -30,6 +30,7 @@ static_library("safe_browsing") { diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 6201a08d..c1551ed9 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index 7a34996cfa221..3bebd3da73877 100644 +index 851cacf36cb21..217c38335903d 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc @@ -30,6 +30,7 @@ diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 4715ab19..b66fe9be 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index 7ceb1d7b854d9..721026a5a4be1 100644 +index f59ecb8fa3246..bb55ea9d91a73 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc -@@ -135,6 +135,10 @@ bool IsPluginLoadingAccessibleResourceInWebView( +@@ -142,6 +142,10 @@ bool IsPluginLoadingAccessibleResourceInWebView( extensions::ExtensionRegistry* extension_registry, int process_id, const GURL& resource) { @@ -42,10 +42,10 @@ index 8b3f569882aeb..afc8007a6228b 100644 const extensions::Extension* extension = registry->enabled_extensions().GetByID(extension_id); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 3d08b706ec4a0..7f4a0398e51f9 100644 +index eab276d6ebe23..aa6ca12d1b8bc 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -978,6 +978,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -971,6 +971,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -53,7 +53,7 @@ index 3d08b706ec4a0..7f4a0398e51f9 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1147,7 +1148,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1138,7 +1139,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -63,7 +63,7 @@ index 3d08b706ec4a0..7f4a0398e51f9 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1156,7 +1158,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1147,7 +1149,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -73,7 +73,7 @@ index 3d08b706ec4a0..7f4a0398e51f9 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1166,7 +1169,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1157,7 +1160,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index b43da80a..5979b2da 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index 289e3ad2abba4..366a6bf1e42ff 100644 +index 6a646ba3e1975..8849ea7e53996 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -10,7 +10,7 @@ index 289e3ad2abba4..366a6bf1e42ff 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -122,6 +123,7 @@ static_library("renderer") { +@@ -124,6 +125,7 @@ static_library("renderer") { deps = [ "//base/allocator:buildflags", "//build:chromeos_buildflags", @@ -18,7 +18,7 @@ index 289e3ad2abba4..366a6bf1e42ff 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -218,6 +220,10 @@ static_library("renderer") { +@@ -221,6 +223,10 @@ static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 8d8be7ea..d0a2d8ab 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,8 +1,8 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 400cc6f0d441f..e6e1feaef3f06 100644 +index 6ecb3aeadd6e3..cdeca82d8bfe6 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc -@@ -40,6 +40,7 @@ +@@ -39,6 +39,7 @@ #include "base/trace_event/trace_event_impl.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -10,7 +10,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -526,6 +527,8 @@ struct MainFunction { +@@ -527,6 +528,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #if BUILDFLAG(IS_WIN) // Reach out to chrome_elf for the truth on the user data directory. // Note that in tests, this links to chrome_elf_test_stubs. -@@ -675,6 +678,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -676,6 +679,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -30,7 +30,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 absl::optional<int> ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DCHECK(base::ThreadPoolInstance::Get()); -@@ -962,7 +969,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -959,7 +966,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { } #if BUILDFLAG(IS_WIN) @@ -40,7 +40,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); base::InitializePlatformThreadFeatures(); -@@ -1327,6 +1336,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1324,6 +1333,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -48,7 +48,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1337,6 +1347,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1334,6 +1344,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -56,7 +56,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1531,6 +1542,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1528,6 +1539,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -64,7 +64,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1574,6 +1586,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1571,6 +1583,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -72,7 +72,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1675,6 +1688,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1672,6 +1685,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -80,7 +80,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 // Needs to be called after we have chrome::DIR_USER_DATA. BrowserMain sets // this up for the browser process in a different manner. const base::CommandLine* command_line = -@@ -1697,6 +1711,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1694,6 +1708,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -89,7 +89,7 @@ index 400cc6f0d441f..e6e1feaef3f06 100644 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h -index 49993fbc333f8..c39e8743e281e 100644 +index bfafb0a895b0f..f42ebc52d4a1a 100644 --- chrome/app/chrome_main_delegate.h +++ chrome/app/chrome_main_delegate.h @@ -52,6 +52,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate { @@ -102,7 +102,7 @@ index 49993fbc333f8..c39e8743e281e 100644 // content::ContentMainDelegate: absl::optional<int> BasicStartupComplete() override; diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index 2893df3488d8f..4ad86fb7a2bb0 100644 +index a09033cda2e09..df8f48d6d0403 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -51,6 +51,7 @@ @@ -113,7 +113,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1475,7 +1476,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1473,7 +1474,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) @@ -122,7 +122,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 // Handle special early return paths (which couldn't be processed even earlier // as they require the process singleton to be held) first. -@@ -1522,7 +1523,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1520,7 +1521,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { return content::RESULT_CODE_NORMAL_EXIT; #endif // BUILDFLAG(IS_WIN) } @@ -131,7 +131,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 #if BUILDFLAG(IS_WIN) // Check if there is any machine level Chrome installed on the current -@@ -1575,12 +1576,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1573,12 +1574,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -146,7 +146,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1729,6 +1732,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1727,6 +1730,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -157,7 +157,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. -@@ -1767,11 +1774,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1765,11 +1772,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -173,7 +173,7 @@ index 2893df3488d8f..4ad86fb7a2bb0 100644 #endif // !BUILDFLAG(IS_ANDROID) diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index 77aaa6d46daea..e428711ec4ab3 100644 +index 194833d0bae43..21564d96466c0 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -17,6 +17,7 @@ @@ -184,15 +184,15 @@ index 77aaa6d46daea..e428711ec4ab3 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -111,6 +112,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -114,6 +115,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } - #endif // BUILDFLAG(ENABLE_UPDATER) + #endif // !BUILDFLAG(CHROME_FOR_TESTING) +#if !BUILDFLAG(ENABLE_CEF) // Create the app delegate. This object is intentionally leaked as a global // singleton. It is accessed through -[NSApp delegate]. AppController* app_controller = [[AppController alloc] init]; -@@ -119,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -122,6 +124,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { chrome::BuildMainMenu(NSApp, app_controller, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); [app_controller mainMenuCreated]; @@ -200,7 +200,7 @@ index 77aaa6d46daea..e428711ec4ab3 100644 ui::WarmScreenCapture(); -@@ -177,7 +180,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -180,7 +183,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -211,10 +211,10 @@ index 77aaa6d46daea..e428711ec4ab3 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index 265904cb255f3..463cb5cad9713 100644 +index 95fc727fe36b7..06e56e9525a84 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -35,6 +35,7 @@ +@@ -36,6 +36,7 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -222,7 +222,7 @@ index 265904cb255f3..463cb5cad9713 100644 #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1503,6 +1504,8 @@ void HandleStringData( +@@ -1515,6 +1516,8 @@ void HandleStringData( } // namespace ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -231,7 +231,7 @@ index 265904cb255f3..463cb5cad9713 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); #endif -@@ -1528,6 +1531,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1540,6 +1543,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { extra_parts_.clear(); } @@ -243,7 +243,7 @@ index 265904cb255f3..463cb5cad9713 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -4242,9 +4250,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4280,9 +4288,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -255,7 +255,7 @@ index 265904cb255f3..463cb5cad9713 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -6110,7 +6120,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6157,7 +6167,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( network_service); } @@ -264,7 +264,7 @@ index 265904cb255f3..463cb5cad9713 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -6128,6 +6138,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6175,6 +6185,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -273,7 +273,7 @@ index 265904cb255f3..463cb5cad9713 100644 } std::vector<base::FilePath> -@@ -6991,10 +7003,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -7081,10 +7093,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -286,7 +286,7 @@ index 265904cb255f3..463cb5cad9713 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -7013,7 +7025,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7103,7 +7115,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -296,7 +296,7 @@ index 265904cb255f3..463cb5cad9713 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -7149,7 +7162,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -7239,7 +7252,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -306,10 +306,10 @@ index 265904cb255f3..463cb5cad9713 100644 base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, weak_factory_.GetWeakPtr(), diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index 227ee8928d157..9f9ca31dac6fb 100644 +index 071a3dd11e61b..7b15b6f4abb24 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -120,6 +120,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -121,6 +121,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -318,7 +318,7 @@ index 227ee8928d157..9f9ca31dac6fb 100644 // TODO(https://crbug.com/787567): This file is about calls from content/ out // to chrome/ to get values or notify about events, but both of these // functions are from chrome/ to chrome/ and don't involve content/ at all. -@@ -598,7 +600,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -601,7 +603,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -327,7 +327,7 @@ index 227ee8928d157..9f9ca31dac6fb 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -958,7 +960,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -962,7 +964,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -337,7 +337,7 @@ index 227ee8928d157..9f9ca31dac6fb 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index 829d5faa9433f..a8b171a535449 100644 +index 193d174d20d45..9b8d8a6b4a051 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -11,6 +11,7 @@ @@ -348,7 +348,7 @@ index 829d5faa9433f..a8b171a535449 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_ui.h" -@@ -171,6 +172,10 @@ +@@ -172,6 +173,10 @@ #include "chrome/browser/background/background_mode_manager.h" #endif @@ -359,7 +359,7 @@ index 829d5faa9433f..a8b171a535449 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1312,6 +1317,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1366,6 +1371,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -371,7 +371,7 @@ index 829d5faa9433f..a8b171a535449 100644 } // Register prefs applicable to all profiles. -@@ -1696,6 +1706,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1761,6 +1771,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, const std::string& locale) { RegisterProfilePrefs(registry, locale); diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index c759770d..287662ce 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -1,20 +1,16 @@ diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc -index 09189817cb9d4..9c07452ef0411 100644 +index 100baefb933be..4e1501387aa6c 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -383,8 +383,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( - // CommandUpdaterDelegate and CommandUpdater declare this function so we +@@ -390,6 +390,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( // choose to not implement CommandUpdaterDelegate inside this class and // therefore command_updater_ doesn't have the delegate set). -- if (!SupportsCommand(id) || !IsCommandEnabled(id)) -+ if (!SupportsCommand(id) || !IsCommandEnabled(id)) { + if (!SupportsCommand(id) || !IsCommandEnabled(id)) { + LOG(WARNING) << "Invalid/disabled command " << id; return false; -+ } + } - // No commands are enabled if there is not yet any selected tab. - // TODO(pkasting): It seems like we should not need this, because either -@@ -399,6 +401,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -406,6 +407,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -28,7 +24,7 @@ index 09189817cb9d4..9c07452ef0411 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1024,11 +1033,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1040,11 +1048,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -45,10 +41,10 @@ index 09189817cb9d4..9c07452ef0411 100644 bool BrowserCommandController::IsWebAppOrCustomTab() const { diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc -index 59f895b5c3e65..db22d75cf8b63 100644 +index 1b8cd7a3ff295..b837a9379bd04 100644 --- chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc -@@ -66,15 +66,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) { +@@ -67,15 +67,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) { //////////////////////////////////////////////////////////////////////////////// // BrowserFrame, public: @@ -74,7 +70,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 } BrowserFrame::~BrowserFrame() {} -@@ -146,6 +154,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion( +@@ -147,6 +155,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion( } int BrowserFrame::GetTopInset() const { @@ -87,7 +83,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 return browser_frame_view_->GetTopInset(false); } -@@ -162,6 +176,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { +@@ -163,6 +177,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { } bool BrowserFrame::UseCustomFrame() const { @@ -96,7 +92,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 return native_browser_frame_->UseCustomFrame(); } -@@ -175,20 +191,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { +@@ -176,20 +192,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds, ui::WindowShowState* show_state) const { @@ -127,7 +123,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 browser_frame_view_->OnBrowserViewInitViewsComplete(); } -@@ -250,7 +276,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { +@@ -251,7 +277,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { ui::ColorProviderManager::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() const { // Do not return any custom theme if the browser has to use the dark theme. @@ -136,7 +132,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 return nullptr; Browser* browser = browser_view_->browser(); -@@ -267,6 +293,8 @@ BrowserFrame::GetCustomTheme() const { +@@ -268,6 +294,8 @@ BrowserFrame::GetCustomTheme() const { } void BrowserFrame::OnNativeWidgetWorkspaceChanged() { @@ -145,7 +141,7 @@ index 59f895b5c3e65..db22d75cf8b63 100644 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -@@ -354,6 +382,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { +@@ -355,6 +383,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { auto key = Widget::GetColorProviderKey(); @@ -154,14 +150,13 @@ index 59f895b5c3e65..db22d75cf8b63 100644 key.frame_type = UseCustomFrame() ? ui::ColorProviderManager::FrameType::kChromium : ui::ColorProviderManager::FrameType::kNative; -@@ -440,6 +470,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( +@@ -441,5 +471,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( } bool BrowserFrame::ShouldUseDarkTheme() const { + if (!browser_view_) + return false; - return browser_view_->browser()->profile()->IsIncognitoProfile() || - browser_view_->GetIsPictureInPictureType(); + return browser_view_->browser()->profile()->IsIncognitoProfile(); } diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h index 28085aa32d7d8..312911b8a4564 100644 @@ -178,10 +173,10 @@ index 28085aa32d7d8..312911b8a4564 100644 BrowserFrame(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete; diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index 457e24dccb793..4ccb4705c2d7f 100644 +index bc22da820add3..04798b83011e2 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -311,11 +311,10 @@ using content::NativeWebKeyboardEvent; +@@ -307,11 +307,10 @@ using content::NativeWebKeyboardEvent; using content::WebContents; using web_modal::WebContentsModalDialogHost; @@ -196,7 +191,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -836,11 +835,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { +@@ -826,11 +825,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -220,7 +215,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 SetShowIcon( ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); -@@ -884,7 +894,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) +@@ -874,7 +884,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) } browser_->tab_strip_model()->AddObserver(this); @@ -228,7 +223,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 // Top container holds tab strip region and toolbar and lives at the front of // the view hierarchy. -@@ -930,8 +939,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) +@@ -920,8 +929,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser) contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>( devtools_web_view_, contents_web_view_)); @@ -246,7 +241,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 contents_separator_ = top_container_->AddChildView(std::make_unique<ContentsSeparator>()); -@@ -1923,6 +1939,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1839,6 +1855,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -255,7 +250,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -2795,7 +2813,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { +@@ -2734,7 +2752,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { } DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { @@ -265,7 +260,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) return download_button->bubble_controller(); return nullptr; -@@ -3287,7 +3306,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3226,7 +3245,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -275,7 +270,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3864,8 +3884,10 @@ void BrowserView::Layout() { +@@ -3765,8 +3785,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -288,7 +283,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3931,6 +3953,11 @@ void BrowserView::AddedToWidget() { +@@ -3832,6 +3854,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -300,7 +295,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 toolbar_->Init(); // TODO(pbos): Manage this either inside SidePanel or the corresponding button -@@ -3990,13 +4017,9 @@ void BrowserView::AddedToWidget() { +@@ -3887,13 +3914,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -316,7 +311,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4405,7 +4428,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4302,7 +4325,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -326,7 +321,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4747,6 +4771,8 @@ Profile* BrowserView::GetProfile() { +@@ -4650,6 +4674,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -335,7 +330,7 @@ index 457e24dccb793..4ccb4705c2d7f 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4769,6 +4795,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4672,6 +4698,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -345,10 +340,10 @@ index 457e24dccb793..4ccb4705c2d7f 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 97f6f59322215..a71571e0d6ce9 100644 +index 673e626f60cd4..1444e9db81cfc 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -131,11 +131,16 @@ class BrowserView : public BrowserWindow, +@@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow, public webapps::AppBannerManager::Observer { public: METADATA_HEADER(BrowserView); @@ -362,10 +357,10 @@ index 97f6f59322215..a71571e0d6ce9 100644 + // Key used to bind BrowserView to the Widget with which it is associated. + static const char kBrowserViewKey[]; + - void set_frame(BrowserFrame* frame) { frame_ = frame; } - BrowserFrame* frame() const { return frame_; } - -@@ -803,6 +808,12 @@ class BrowserView : public BrowserWindow, + void set_frame(BrowserFrame* frame) { + frame_ = frame; + paint_as_active_subscription_ = +@@ -777,6 +782,12 @@ class BrowserView : public BrowserWindow, void SetLoadingAnimationStateChangeClosureForTesting( base::OnceClosure closure); @@ -379,7 +374,7 @@ index 97f6f59322215..a71571e0d6ce9 100644 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // interface to keep these two classes decoupled and testable. diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc -index e1b23142611cb..1c9fb04a163db 100644 +index 991e095456a35..2373048a30123 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc @@ -46,6 +46,10 @@ @@ -393,7 +388,7 @@ index e1b23142611cb..1c9fb04a163db 100644 using views::View; using web_modal::ModalDialogHostObserver; using web_modal::WebContentsModalDialogHost; -@@ -472,6 +476,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { +@@ -466,6 +470,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { int BrowserViewLayout::LayoutToolbar(int top) { TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); @@ -424,7 +419,7 @@ index 5e059b9878fc2..c1f6fbcd40ec4 100644 ContentsWebView::~ContentsWebView() { diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index 9b29b45b011e7..9fa367bac197c 100644 +index 4f04525fafb8e..eea2013607200 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc @@ -564,33 +564,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( @@ -476,10 +471,10 @@ index 9b29b45b011e7..9fa367bac197c 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index dbe0846164b88..14c9d0f010c0b 100644 +index 46ce747cfdec8..99a718aaffe01 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -171,12 +171,13 @@ auto& GetViewCommandMap() { +@@ -164,12 +164,13 @@ auto& GetViewCommandMap() { //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -494,8 +489,8 @@ index dbe0846164b88..14c9d0f010c0b 100644 + display_mode_(display_mode ? *display_mode : GetDisplayMode(browser)) { SetID(VIEW_ID_TOOLBAR); - UpgradeDetector::GetInstance()->AddObserver(this); -@@ -211,7 +212,7 @@ void ToolbarView::Init() { + if (display_mode_ == DisplayMode::NORMAL) { +@@ -200,7 +201,7 @@ void ToolbarView::Init() { #endif auto location_bar = std::make_unique<LocationBarView>( browser_, browser_->profile(), browser_->command_controller(), this, @@ -505,10 +500,10 @@ index dbe0846164b88..14c9d0f010c0b 100644 size_animation_.Reset(1); diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index 9031df4c31d52..97a60956defb2 100644 +index 8c2ea74023637..a24cab7c58f93 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h -@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView, // needs to be displayed. }; diff --git a/patch/patches/chrome_utility_client.patch b/patch/patches/chrome_utility_client.patch index 73cc2fc7..0612c600 100644 --- a/patch/patches/chrome_utility_client.patch +++ b/patch/patches/chrome_utility_client.patch @@ -1,16 +1,16 @@ diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc -index f779813dd5333..547ba5ebfc161 100644 +index 6413d01cb4b41..b38eb084d8508 100644 --- chrome/utility/chrome_content_utility_client.cc +++ chrome/utility/chrome_content_utility_client.cc -@@ -12,6 +12,7 @@ - #include "base/files/file_path.h" +@@ -13,6 +13,7 @@ #include "base/path_service.h" + #include "base/task/single_thread_task_runner.h" #include "build/build_config.h" +#include "cef/libcef/features/runtime.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/profiler/thread_profiler.h" #include "chrome/common/profiler/thread_profiler_configuration.h" -@@ -56,7 +57,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() { +@@ -57,7 +58,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() { command_line->GetSwitchValueASCII(switches::kProcessType); // An in-process utility thread may run in other processes, only set up // collector in a utility process. diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 0c50fea9..6e8b363a 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -33,7 +33,7 @@ index d69f9d4641613..e88aaf8617c52 100644 MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h -index c48c5c949621f..7b9194ba91514 100644 +index 95ce91508908e..94042da4b46bf 100644 --- content/browser/renderer_host/input/synthetic_gesture_target_base.h +++ content/browser/renderer_host/input/synthetic_gesture_target_base.h @@ -9,6 +9,7 @@ @@ -68,7 +68,7 @@ index 97c7dc7c25000..63c42610bfd9c 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index bb3dc58a360cf..823b0c6582eb1 100644 +index 2cf3784f871e2..df32d4ea7e027 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -32,6 +32,7 @@ component("controller") { diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index ee520973..28491615 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index d4eb8f004387b..e654464576e35 100644 +index a6e355d835004..9087d3cc485ea 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc -@@ -596,7 +596,7 @@ void DevToolsHttpHandler::OnJsonRequest( +@@ -589,7 +589,7 @@ void DevToolsHttpHandler::OnJsonRequest( base::Value::Dict version; version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.Set("WebKit-Version", GetWebKitVersion()); @@ -12,10 +12,10 @@ index d4eb8f004387b..e654464576e35 100644 version.Set("V8-Version", V8_VERSION_STRING); std::string host = info.GetHeaderValue("host"); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index d86510260c4d2..43c5e58333a4f 100644 +index 059dca9146bde..ef5537248308f 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -719,6 +719,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -712,6 +712,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); @@ -34,10 +34,10 @@ index d86510260c4d2..43c5e58333a4f 100644 factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>( std::move(loader_factory)); diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index 020f0f162fde3..af48579a0ff57 100644 +index 75dbea1be3e60..3c9d427c9b790 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -960,7 +960,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -965,7 +965,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -46,7 +46,7 @@ index 020f0f162fde3..af48579a0ff57 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -969,6 +969,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -974,6 +974,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -55,7 +55,7 @@ index 020f0f162fde3..af48579a0ff57 100644 std::vector<base::FilePath> diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index eaedfc8f8603d..87ee0b2cdae73 100644 +index 868dd480c66e3..4c788029e9c52 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -35,6 +35,7 @@ @@ -66,7 +66,7 @@ index eaedfc8f8603d..87ee0b2cdae73 100644 #include "content/public/common/alternative_error_page_override_info.mojom-forward.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/window_container_type.mojom-forward.h" -@@ -1767,7 +1768,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1775,7 +1776,7 @@ class CONTENT_EXPORT ContentBrowserClient { // // If |relative_partition_path| is the empty string, it means this needs to // create the default NetworkContext for the BrowserContext. @@ -75,7 +75,7 @@ index eaedfc8f8603d..87ee0b2cdae73 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1964,6 +1965,19 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1978,6 +1979,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory); @@ -95,7 +95,7 @@ index eaedfc8f8603d..87ee0b2cdae73 100644 // Creates an OverlayWindow to be used for video or Picture-in-Picture. // This window will house the content shown when in Picture-in-Picture mode. // This will return a new OverlayWindow. -@@ -2016,6 +2030,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2034,6 +2048,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -107,7 +107,7 @@ index eaedfc8f8603d..87ee0b2cdae73 100644 // on blink::features::kUserAgentReduction. Content may cache this value. virtual std::string GetUserAgent(); diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 09846e00f1a75..18b396a631f45 100644 +index 77f2c4fbf8c88..ddbacedde912a 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -96,6 +96,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -132,10 +132,10 @@ index 09846e00f1a75..18b396a631f45 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 2ac91dcba1d7a..c8c1bbab100ba 100644 +index 2fb8a5e9b9f18..12a07a0619514 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -607,6 +607,8 @@ void RenderThreadImpl::Init() { +@@ -620,6 +620,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -145,10 +145,10 @@ index 2ac91dcba1d7a..c8c1bbab100ba 100644 base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index c31323121b8fe..8ef9ff1430a91 100644 +index a0811daead7bc..2beb0d03cd671 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1024,6 +1024,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1001,6 +1001,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -165,12 +165,12 @@ index c31323121b8fe..8ef9ff1430a91 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique<V8ValueConverterImpl>(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 3ae765eea4b8f..c0fe200f0d373 100644 +index f9b61ff32e3e7..ea649425e7b34 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -233,6 +233,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { - scoped_refptr<base::SingleThreadTaskRunner> VideoFrameCompositorTaskRunner() - override; +@@ -235,6 +235,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { + uint64_t private_memory_footprint_bytes) override; + #endif + void DevToolsAgentAttached() override; + void DevToolsAgentDetached() override; @@ -179,11 +179,11 @@ index 3ae765eea4b8f..c0fe200f0d373 100644 // plus eTLD+1, such as https://google.com), or to a more specific origin. void SetIsLockedToSite(); diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc -index 5cae59116d39d..2c6fb3e830fcd 100644 +index 5c1f3a069c00b..db5f4250330ad 100644 --- headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc -@@ -312,7 +312,7 @@ bool HeadlessContentBrowserClient::ShouldEnableStrictSiteIsolation() { - return browser_->options()->site_per_process; +@@ -284,7 +284,7 @@ bool HeadlessContentBrowserClient::ShouldEnableStrictSiteIsolation() { + return false; } -void HeadlessContentBrowserClient::ConfigureNetworkContextParams( @@ -191,7 +191,7 @@ index 5cae59116d39d..2c6fb3e830fcd 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -322,6 +322,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( +@@ -294,6 +294,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams( in_memory, relative_partition_path, network_context_params, cert_verifier_creation_params); @@ -200,7 +200,7 @@ index 5cae59116d39d..2c6fb3e830fcd 100644 std::string HeadlessContentBrowserClient::GetProduct() { diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h -index 441423c66de35..97a98a41dd7e3 100644 +index c96642d57f5cd..bfcf88fa2559d 100644 --- headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h @@ -71,7 +71,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index 7ca11245..c3c83bf2 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -1,8 +1,8 @@ diff --git content/app/content_main.cc content/app/content_main.cc -index 1ea066908cd96..d14269518c593 100644 +index 00c293219a70c..e68d0d3abd95e 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -195,11 +195,8 @@ ContentMainParams::~ContentMainParams() = default; +@@ -173,11 +173,8 @@ ContentMainParams::~ContentMainParams() = default; ContentMainParams::ContentMainParams(ContentMainParams&&) = default; ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default; @@ -16,7 +16,7 @@ index 1ea066908cd96..d14269518c593 100644 base::FeatureList::FailOnFeatureAccessWithoutFeatureList(); #if BUILDFLAG(IS_CHROMEOS_LACROS) // Lacros is launched with inherited priority. Revert to normal priority -@@ -208,9 +205,6 @@ RunContentProcess(ContentMainParams params, +@@ -186,9 +183,6 @@ RunContentProcess(ContentMainParams params, #endif int exit_code = -1; base::debug::GlobalActivityTracker* tracker = nullptr; @@ -26,7 +26,7 @@ index 1ea066908cd96..d14269518c593 100644 // A flag to indicate whether Main() has been called before. On Android, we // may re-run Main() without restarting the browser process. This flag -@@ -296,12 +290,6 @@ RunContentProcess(ContentMainParams params, +@@ -274,12 +268,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) @@ -39,7 +39,7 @@ index 1ea066908cd96..d14269518c593 100644 InitializeMac(); #endif -@@ -341,8 +329,18 @@ RunContentProcess(ContentMainParams params, +@@ -321,8 +309,18 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -59,7 +59,7 @@ index 1ea066908cd96..d14269518c593 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -354,14 +352,41 @@ RunContentProcess(ContentMainParams params, +@@ -334,14 +332,41 @@ RunContentProcess(ContentMainParams params, } } @@ -105,10 +105,10 @@ index 1ea066908cd96..d14269518c593 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 6b51120e7d889..57c37e79e68e9 100644 +index 5029cbe44e4bd..fc6616da947eb 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -44,6 +44,7 @@ +@@ -46,6 +46,7 @@ #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/hang_watcher.h" #include "base/threading/platform_thread.h" @@ -116,7 +116,7 @@ index 6b51120e7d889..57c37e79e68e9 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1269,6 +1270,12 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1290,6 +1291,12 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -130,7 +130,7 @@ index 6b51120e7d889..57c37e79e68e9 100644 std::unique_ptr<ContentMainRunner> ContentMainRunner::Create() { return ContentMainRunnerImpl::Create(); diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h -index 7dc520f2fffc7..3900cce3ad42f 100644 +index ea9b5233820cd..aba62b3384134 100644 --- content/app/content_main_runner_impl.h +++ content/app/content_main_runner_impl.h @@ -27,7 +27,7 @@ class DiscardableSharedMemoryManager; @@ -165,7 +165,7 @@ index 04a08015aaff6..694f5c43a29e1 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/public/app/content_main.h content/public/app/content_main.h -index 91646692bac96..316d3161a9e31 100644 +index 16e8c657ad61f..62d58b8dcccf5 100644 --- content/public/app/content_main.h +++ content/public/app/content_main.h @@ -93,6 +93,13 @@ struct CONTENT_EXPORT ContentMainParams { diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index bf4b4dc0..d51d8d3b 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn -index be50b0ddb3731..44e081a83f628 100644 +index e2cb049c1ce6c..8c2b6242894b3 100644 --- chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index 15f471a9..b6993e47 100644 --- a/patch/patches/embedder_product_override.patch +++ b/patch/patches/embedder_product_override.patch @@ -1,8 +1,8 @@ diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc -index 40148eeaef7d1..9e2fae7232653 100644 +index e7fe1c565aac5..45980ceed2c50 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc -@@ -15,6 +15,7 @@ +@@ -17,6 +17,7 @@ #include "base/version.h" #include "build/branding_buildflags.h" #include "build/build_config.h" @@ -10,7 +10,7 @@ index 40148eeaef7d1..9e2fae7232653 100644 #include "components/embedder_support/pref_names.h" #include "components/embedder_support/switches.h" #include "components/policy/core/common/policy_pref_names.h" -@@ -35,6 +36,10 @@ +@@ -37,6 +38,10 @@ #include "base/win/windows_version.h" #endif // BUILDFLAG(IS_WIN) @@ -21,7 +21,7 @@ index 40148eeaef7d1..9e2fae7232653 100644 namespace embedder_support { namespace { -@@ -382,6 +387,14 @@ std::string GetMajorVersionForUserAgentString( +@@ -339,6 +344,14 @@ std::string GetMajorVersionForUserAgentString( std::string GetProductAndVersion( ForceMajorVersionToMinorPosition force_major_to_minor, UserAgentReductionEnterprisePolicyState user_agent_reduction) { diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 474b97ca..f8e1e128 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -125,7 +125,7 @@ index 4d29671429220..e0f287f785668 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index 07be432f365b9..d3800886a5b5c 100644 +index 9ba85048d1fcf..f3a5b8bc9bda0 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h @@ -59,6 +59,12 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -192,7 +192,7 @@ index 10d751cceab73..128af05925e07 100644 } diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 028d6b1fec3a0..0829a24eb2879 100644 +index bb7a1c1860f7f..25f9d0c47e5ab 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -31,6 +31,7 @@ @@ -227,7 +227,7 @@ index 028d6b1fec3a0..0829a24eb2879 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index aeee5f5a516c4..ca2079ba1b447 100644 +index 0a9fa13f82250..2d0ed7c2396c4 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc @@ -380,9 +380,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 1ff66ab3..effff6a9 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index 53c9e4ec12aef..b303d299c49a9 100644 +index a9b0a5a827fc8..9a0fd388756f3 100644 --- .gn +++ .gn -@@ -155,6 +155,8 @@ exec_script_whitelist = +@@ -151,6 +151,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", "//chrome/version.gni", @@ -12,7 +12,7 @@ index 53c9e4ec12aef..b303d299c49a9 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 9075b6f33090b..21c669d061c44 100644 +index 7cfadb4724141..e59835c875ec6 100644 --- BUILD.gn +++ BUILD.gn @@ -18,6 +18,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -23,16 +23,16 @@ index 9075b6f33090b..21c669d061c44 100644 import("//chrome/browser/buildflags.gni") import("//components/nacl/features.gni") import("//device/vr/buildflags/buildflags.gni") -@@ -115,6 +116,10 @@ group("gn_all") { - deps += [ "//third_party/abseil-cpp:absl_tests" ] - } +@@ -274,6 +275,10 @@ group("gn_all") { + + deps += root_extra_deps + if (enable_cef) { + deps += [ "//cef" ] + } + - if (enable_js_type_check) { - deps += [ ":webui_closure_compile" ] + if (enable_printing) { + deps += [ "//printing:printing_unittests" ] } diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni index d9024468296e7..11bfae65b7b02 100644 @@ -80,7 +80,7 @@ index 60f573a736ba5..90dd6d0b37314 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 6b478cb901c0d..ba18b48249857 100644 +index a16658689a69e..36515332da633 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -91,7 +91,7 @@ index 6b478cb901c0d..ba18b48249857 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//extensions/buildflags/buildflags.gni") -@@ -72,6 +73,10 @@ template("chrome_repack_percent") { +@@ -73,6 +74,10 @@ template("chrome_repack_percent") { "//ui/chromeos/resources", ] } @@ -126,7 +126,7 @@ index adc881122cb9c..cafa71386fad6 100644 source_patterns += [ "${root_gen_dir}/extensions/strings/extensions_strings_" ] diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 7fe3f49dafecd..8f3015f399b61 100644 +index 4e6af9a522de5..b1851bc764355 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni") @@ -137,7 +137,7 @@ index 7fe3f49dafecd..8f3015f399b61 100644 import("//chrome/process_version_rc_template.gni") import("//components/nacl/features.gni") import("//third_party/ffmpeg/ffmpeg_options.gni") -@@ -124,11 +125,13 @@ action("mini_installer_archive") { +@@ -121,11 +122,13 @@ action("mini_installer_archive") { inputs = [ "$root_out_dir/chrome.dll", "$root_out_dir/chrome.exe", @@ -151,9 +151,9 @@ index 7fe3f49dafecd..8f3015f399b61 100644 + } outputs = [ - # See also chrome.packed.7z conditionally added below. + "$root_out_dir/chrome.7z", diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni -index bd7d65bdfa518..e7a68d7796bc8 100644 +index 77f1be6116d0c..6bc41416af551 100644 --- tools/grit/grit_args.gni +++ tools/grit/grit_args.gni @@ -5,6 +5,7 @@ @@ -164,7 +164,7 @@ index bd7d65bdfa518..e7a68d7796bc8 100644 import("//build/config/ui.gni") shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir) -@@ -37,6 +38,8 @@ _grit_defines = [ +@@ -36,6 +37,8 @@ _grit_defines = [ # Mac and iOS want Title Case strings. "use_titlecase=${is_apple}", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 7a9c49ab..5230061b 100644 --- a/patch/patches/gritsettings.patch +++ b/patch/patches/gritsettings.patch @@ -1,8 +1,8 @@ diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec -index cc28e95c153fd..831ce18cb60ca 100644 +index 15e77b25cc0b1..96d70a5ba039f 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1066,6 +1066,15 @@ +@@ -1110,6 +1110,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 037ebafa..8cb1ce24 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index 8c5cc2b157f6e..ef02db021353a 100644 +index b7f21237e87fa..11e4c166ab8a6 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc -@@ -172,7 +172,7 @@ void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( +@@ -183,7 +183,7 @@ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() { base::File OpenFileToShare(const base::FilePath& path, base::MemoryMappedFile::Region* region) { base::FilePath exe_dir; diff --git a/patch/patches/linux_glib_deprecated_volatile.patch b/patch/patches/linux_glib_deprecated_volatile.patch index 466c5454..f0b6b9a9 100644 --- a/patch/patches/linux_glib_deprecated_volatile.patch +++ b/patch/patches/linux_glib_deprecated_volatile.patch @@ -1,10 +1,10 @@ diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn -index 9f1549e173f41..b8af55c0fb763 100644 +index 3bec9f0f7d46f..59c527bdd29cd 100644 --- ui/accessibility/platform/BUILD.gn +++ ui/accessibility/platform/BUILD.gn -@@ -278,6 +278,10 @@ component("platform") { - if (use_glib) { - configs += [ "//build/config/linux:glib" ] +@@ -285,6 +285,10 @@ component("platform") { + if (use_gio) { + configs += [ "//build/linux:gio_config" ] } + + if (is_clang) { diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index 16fab293..909a36af 100644 --- a/patch/patches/linux_printing_context.patch +++ b/patch/patches/linux_printing_context.patch @@ -1,5 +1,5 @@ diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc -index 83211e80d8270..753c07be0ec49 100644 +index 5520e15c232c8..2648037fcf37e 100644 --- printing/printing_context_linux.cc +++ printing/printing_context_linux.cc @@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index f6f5aaad..95aa8d37 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,8 +1,8 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index 3185c6221b921..179072f60e930 100644 +index e7bf81292b0f4..e700608f9b9d7 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc -@@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { +@@ -47,11 +47,8 @@ bool InitializeOneOffForSandbox() { // GPU-related stuff is very slow without this, probably because // the sandbox prevents loading graphics drivers or some such. std::vector<CGLPixelFormatAttribute> attribs; diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 9f21819d..958da699 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 5d6cbbdcab2d8..33a650036e909 100644 +index e0969d4ad3087..267ac89aab806 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -30,10 +30,10 @@ index 5d6cbbdcab2d8..33a650036e909 100644 } if (has_msg) diff --git base/task/current_thread.cc base/task/current_thread.cc -index 857b1dce24133..2907605644f1b 100644 +index 05daff869644c..ccd19eade21ed 100644 --- base/task/current_thread.cc +++ base/task/current_thread.cc -@@ -49,6 +49,8 @@ void CurrentThread::AddDestructionObserver( +@@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver( void CurrentThread::RemoveDestructionObserver( DestructionObserver* destruction_observer) { @@ -43,7 +43,7 @@ index 857b1dce24133..2907605644f1b 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/task/current_thread.h base/task/current_thread.h -index 9eb954fc91ff4..eb00d339aaf82 100644 +index 6e5aea5de684f..22019f157eabd 100644 --- base/task/current_thread.h +++ base/task/current_thread.h @@ -132,6 +132,12 @@ class BASE_EXPORT CurrentThread { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index e5f5b881..e36eda82 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -1,5 +1,5 @@ diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index 031dd5eeaef8e..25c2f0e42e22b 100644 +index ddf25382e49fc..fe64fa31a7a85 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -25,7 +25,7 @@ struct DropData; @@ -12,10 +12,10 @@ index 031dd5eeaef8e..25c2f0e42e22b 100644 virtual ~WebContentsView() = default; diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 50a583c2bc96a..de7f5a48d6b49 100644 +index ec5521a6e2005..a9f3f55ffd176 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -227,6 +227,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -228,6 +228,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -24,7 +24,7 @@ index 50a583c2bc96a..de7f5a48d6b49 100644 std::move(callback).Run(std::move(owned_this), WebContents::CreateWithSessionStorage( params, owner_web_contents() -@@ -235,6 +237,10 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -236,6 +238,10 @@ void MimeHandlerViewGuest::CreateWebContents( } void MimeHandlerViewGuest::DidAttachToEmbedder() { @@ -35,7 +35,7 @@ index 50a583c2bc96a..de7f5a48d6b49 100644 DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme)); GetController().LoadURL(stream_->handler_url(), content::Referrer(), ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); -@@ -483,6 +489,14 @@ void MimeHandlerViewGuest::DidFinishNavigation( +@@ -493,6 +499,14 @@ void MimeHandlerViewGuest::DidFinishNavigation( } } @@ -51,10 +51,10 @@ index 50a583c2bc96a..de7f5a48d6b49 100644 mojo::PendingReceiver<mime_handler::BeforeUnloadControl> receiver) { if (!pending_before_unload_control_) diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 06d3ed32b6570..eb85372754783 100644 +index 810289b11cba7..714b7c64c9ba2 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -191,6 +191,7 @@ class MimeHandlerViewGuest +@@ -193,6 +193,7 @@ class MimeHandlerViewGuest void ReadyToCommitNavigation( content::NavigationHandle* navigation_handle) final; void DidFinishNavigation(content::NavigationHandle* navigation_handle) final; @@ -62,7 +62,7 @@ index 06d3ed32b6570..eb85372754783 100644 std::unique_ptr<MimeHandlerViewGuestDelegate> delegate_; std::unique_ptr<StreamContainer> stream_; -@@ -199,6 +200,7 @@ class MimeHandlerViewGuest +@@ -201,6 +202,7 @@ class MimeHandlerViewGuest content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE}; int embedder_widget_routing_id_ = MSG_ROUTING_NONE; diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index ccd61aed..61ef2cef 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index f936d951fe272..90a3165172dce 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index 94f844d850c57..81ac8e958abe5 100644 +index 31b8af59f7b5e..162d54de19abf 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1706,7 +1706,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1705,7 +1705,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. @@ -24,10 +24,10 @@ index 94f844d850c57..81ac8e958abe5 100644 bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const { diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc -index d2dd33303bfbf..7a6b1e02154e1 100644 +index 6d42ae691a2c4..27c98529f7881 100644 --- services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc -@@ -264,7 +264,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -285,7 +285,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { } bool ResourceRequest::SendsCookies() const { diff --git a/patch/patches/net_test_server_3798752.patch b/patch/patches/net_test_server_3798752.patch index 8be35663..3e9a618b 100644 --- a/patch/patches/net_test_server_3798752.patch +++ b/patch/patches/net_test_server_3798752.patch @@ -1,5 +1,5 @@ diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc -index bd996a6794353..5ebbe30c27f9f 100644 +index d112bec7c7dce..ca88a6df95e5d 100644 --- net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc @@ -982,7 +982,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 7c133c45..292d7ddd 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index afefe3cd83dee..6668463247644 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 3a78d977e8a50..9313eacec6776 100644 +index a689c6e60b5d5..5a1204c01f04a 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3193,6 +3193,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3144,6 +3144,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,7 +57,7 @@ index 3a78d977e8a50..9313eacec6776 100644 const WebInputEvent& event) { if ((base::FeatureList::IsEnabled( diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h -index fdf7f8ff369bb..7bbeec760c801 100644 +index 3910d3a1642ab..8738df72afced 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h @@ -791,6 +791,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl diff --git a/patch/patches/pdfium_103501.patch b/patch/patches/pdfium_103501.patch new file mode 100644 index 00000000..1d36d587 --- /dev/null +++ b/patch/patches/pdfium_103501.patch @@ -0,0 +1,12 @@ +diff --git BUILD.gn BUILD.gn +index a8532128d..f5a098afa 100644 +--- BUILD.gn ++++ BUILD.gn +@@ -338,6 +338,7 @@ group("pdfium_public_headers") { + } + + component("pdfium") { ++ output_name = "pdfium" + libs = [] + configs += [ ":pdfium_strict_config" ] + public_configs = [ ":pdfium_public_config" ] diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index d0f801cc..4f238287 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 04d7b8ae25192..7da00aa535bea 100644 +index 35c194b2d8dc4..8b9cc3095906c 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -24,6 +24,7 @@ @@ -46,10 +46,10 @@ index b848ee0d185ec..c3ddbc8932f66 100644 #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/task_manager/web_contents_tags.h" diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc -index 0cd52f9e25177..781bd953a9530 100644 +index 34d6001efd674..d8c99f9f01e3c 100644 --- chrome/browser/printing/print_view_manager_base.cc +++ chrome/browser/printing/print_view_manager_base.cc -@@ -617,13 +617,14 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -610,13 +610,14 @@ void PrintViewManagerBase::UpdatePrintSettings( job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -82,7 +82,7 @@ index 5d1658999d5bb..d1b7b7288c946 100644 $i18n{cancel} </cr-button> diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc -index ff180eb75c935..711b51ed039a5 100644 +index d5767fe27db0d..5778847a68208 100644 --- chrome/browser/ui/webui/constrained_web_dialog_ui.cc +++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc @@ -13,6 +13,7 @@ @@ -104,7 +104,7 @@ index ff180eb75c935..711b51ed039a5 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 94e58569d60fd..47451dbcf7976 100644 +index 2680a3e16f53f..a925307664c15 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -23,6 +23,7 @@ @@ -115,7 +115,7 @@ index 94e58569d60fd..47451dbcf7976 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/pdf/pdf_extension_util.h" #include "chrome/browser/policy/management_utils.h" -@@ -99,6 +100,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; +@@ -101,6 +102,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)"; #endif diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 360c9456..f74721c8 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,17 +1,17 @@ -diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index ba331906397e7..71acb854028c5 100644 ---- chrome/browser/printing/print_job_worker.cc -+++ chrome/browser/printing/print_job_worker.cc -@@ -132,6 +132,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id) - ShouldPrintingContextSkipSystemCalls())), - thread_("Printing_Worker") { +diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc +index d01d616c3b1ea..580fa043bdc79 100644 +--- chrome/browser/printing/printer_query.cc ++++ chrome/browser/printing/printer_query.cc +@@ -115,6 +115,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id) + rfh_id_(rfh_id), + cookie_(PrintSettings::NewCookie()) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); + printing_context_->set_render_ids(rfh_id.child_id, rfh_id.frame_routing_id); } - PrintJobWorker::~PrintJobWorker() { + PrinterQuery::~PrinterQuery() { diff --git printing/printing_context.h printing/printing_context.h -index 42095172d1406..8bf48be927d2f 100644 +index 7582c73418e74..f5b477c18c65a 100644 --- printing/printing_context.h +++ printing/printing_context.h @@ -173,6 +173,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 62537820..daee8064 100644 --- a/patch/patches/renderer_host_1070713.patch +++ b/patch/patches/renderer_host_1070713.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_view_host_impl.cc content/browser/renderer_host/render_view_host_impl.cc -index 6b36af5ca7c10..a07d0a700f4cb 100644 +index 39bd6ef7be6ec..a6ce95a1c8557 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -688,6 +688,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -686,6 +686,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/runhooks.patch b/patch/patches/runhooks.patch index 3aace9a2..a14de55e 100644 --- a/patch/patches/runhooks.patch +++ b/patch/patches/runhooks.patch @@ -1,8 +1,8 @@ diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index 112690a7f7ad3..6c65b68b171ab 100644 +index 026bcc96c3439..cbc827b27a0ba 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py -@@ -166,13 +166,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store): +@@ -165,13 +165,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store): del os.environ['LIB'] if 'LIBPATH' in os.environ: del os.environ['LIBPATH'] @@ -26,10 +26,10 @@ index 112690a7f7ad3..6c65b68b171ab 100644 if (cpu != 'x64'): # x64 is default target CPU thus any other CPU requires a target set diff --git build/vs_toolchain.py build/vs_toolchain.py -index d426fcd842c16..cc85b09f19579 100755 +index 6ca0be49fe8ed..28e134716c116 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py -@@ -107,9 +107,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): +@@ -106,9 +106,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs) os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH'] elif sys.platform == 'win32' and not depot_tools_win_toolchain: @@ -46,7 +46,7 @@ index d426fcd842c16..cc85b09f19579 100755 # When using an installed toolchain these files aren't needed in the output # directory in order to run binaries locally, but they are needed in order # to create isolates or the mini_installer. Copying them to the output -@@ -158,6 +165,10 @@ def _RegistryGetValue(key, value): +@@ -157,6 +164,10 @@ def _RegistryGetValue(key, value): def GetVisualStudioVersion(): """Return best available version of Visual Studio. """ @@ -57,7 +57,7 @@ index d426fcd842c16..cc85b09f19579 100755 supported_versions = list(MSVS_VERSIONS.keys()) # VS installed in depot_tools for Googlers -@@ -431,7 +442,7 @@ def _CopyDebugger(target_dir, target_cpu): +@@ -430,7 +441,7 @@ def _CopyDebugger(target_dir, target_cpu): # List of debug files that should be copied, the first element of the tuple is # the name of the file and the second indicates if it's optional. diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index b5b1ca4f..5ded6a7a 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 9ed11c861275a..442ab6cf20544 100644 +index 65daab4054860..14c44d8bd5512 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -6,6 +6,7 @@ @@ -10,7 +10,7 @@ index 9ed11c861275a..442ab6cf20544 100644 #include <set> #include <utility> -@@ -723,10 +724,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -724,10 +725,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -27,7 +27,7 @@ index 9ed11c861275a..442ab6cf20544 100644 } absl::optional<DisplayFeature> RenderWidgetHostViewAura::GetDisplayFeature() { -@@ -2239,6 +2242,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2240,6 +2243,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // This needs to happen only after |window_| has been initialized using // Init(), because it needs to have the layer. window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 4e099989..198ad3bb 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,27 @@ +diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +index 53383355d6646..d7a713017e16d 100644 +--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc ++++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +@@ -23,6 +23,7 @@ + #include "base/strings/utf_string_conversions.h" + #include "base/time/time.h" + #include "build/build_config.h" ++#include "cef/libcef/features/runtime.h" + #include "chrome/browser/browser_process.h" + #include "chrome/browser/enterprise/connectors/analysis/analysis_settings.h" + #include "chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.h" +@@ -232,6 +233,9 @@ bool ContentAnalysisDelegate::IsEnabled( + GURL url, + Data* data, + enterprise_connectors::AnalysisConnector connector) { ++ if (cef::IsAlloyRuntimeEnabled()) ++ return false; ++ + auto* service = + enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( + profile); diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 8221b46c59df3..736e703efa276 100644 +index 99fb0211efd6b..5f4a4c2d7c977 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -10,7 +32,7 @@ index 8221b46c59df3..736e703efa276 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_content_browser_client.h" -@@ -263,8 +264,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) +@@ -283,8 +284,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) base::Unretained(this))); cookie_settings_ = CookieSettingsFactory::GetForProfile(profile); cookie_settings_observation_.Observe(cookie_settings_.get()); @@ -23,7 +45,7 @@ index 8221b46c59df3..736e703efa276 100644 DisableQuicIfNotAllowed(); -@@ -304,7 +307,9 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) +@@ -324,7 +327,9 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) base::Unretained(this))); #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -34,7 +56,7 @@ index 8221b46c59df3..736e703efa276 100644 #endif } -@@ -796,7 +801,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -828,7 +833,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -55,7 +77,7 @@ index 8221b46c59df3..736e703efa276 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -809,7 +826,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -841,7 +858,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -65,7 +87,7 @@ index 8221b46c59df3..736e703efa276 100644 network_context_params->file_paths = ::network::mojom::NetworkContextFilePaths::New(); -@@ -1009,6 +1028,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -1039,6 +1058,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( network_context_params->require_network_isolation_key = true; network_context_params->block_trust_tokens = @@ -74,7 +96,7 @@ index 8221b46c59df3..736e703efa276 100644 ->IsTrustTokensAllowed(); diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc -index ff1d5b905b050..911e4b13f91e1 100644 +index 0f92e4682eee9..ea6e6ed6f1e05 100644 --- chrome/browser/signin/identity_manager_factory.cc +++ chrome/browser/signin/identity_manager_factory.cc @@ -11,6 +11,7 @@ @@ -94,10 +116,10 @@ index ff1d5b905b050..911e4b13f91e1 100644 GetInstance()->GetServiceForBrowserContext(profile, true)); } diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 13911f2bd786d..832308e34a303 100644 +index 44f52e0c14355..6b380a5bfe3c8 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -570,6 +570,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -554,6 +554,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -124,7 +146,7 @@ index 13911f2bd786d..832308e34a303 100644 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index 77692a8ef78a3..7bf855b47b8fc 100644 +index 8a896a86b58b0..08077ffeebc3e 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h @@ -208,6 +208,8 @@ class NET_EXPORT CookieMonster : public CookieStore { @@ -137,7 +159,7 @@ index 77692a8ef78a3..7bf855b47b8fc 100644 const net::SchemefulSite& site, const absl::optional<CookiePartitionKey>& partition_key) const override; diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h -index f6df78d4d3878..5e4984760ba56 100644 +index 61fd008fc067e..73909be088278 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h @@ -163,6 +163,11 @@ class NET_EXPORT CookieStore { @@ -153,7 +175,7 @@ index f6df78d4d3878..5e4984760ba56 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index 9da2056ddd3cf..c097bb2e8aba3 100644 +index 5b4fe64a4374a..780c9726a03d3 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc @@ -283,14 +283,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -175,10 +197,10 @@ index 9da2056ddd3cf..c097bb2e8aba3 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 8ad7cb314d8c0..cb54766a36acb 100644 +index 47bba434b56d8..92060d40e0a84 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2243,16 +2243,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2252,16 +2252,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -207,10 +229,10 @@ index 8ad7cb314d8c0..cb54766a36acb 100644 trust_token_store_ = std::make_unique<PendingTrustTokenStore>(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 1e7e922c738ce..3b13d9ead08d6 100644 +index b2254b765c313..9d7da9a963f40 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -345,6 +345,9 @@ struct NetworkContextParams { +@@ -347,6 +347,9 @@ struct NetworkContextParams { // cookies. Otherwise it should be false. bool persist_session_cookies = false; diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index d3e2714f..ac2ef9fd 100644 --- a/patch/patches/services_network_2718.patch +++ b/patch/patches/services_network_2718.patch @@ -1,8 +1,8 @@ diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc -index 19733d058032d..35d7a1e740e1a 100644 +index a0aa623d7f673..2d60f2a4d40e5 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -495,10 +495,6 @@ class LoginHandlerDelegate { +@@ -494,10 +494,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index 19733d058032d..35d7a1e740e1a 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -550,12 +546,6 @@ void OnAuthRequiredContinuation( +@@ -549,12 +545,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote<network::mojom::AuthChallengeResponder> auth_challenge_responder, base::RepeatingCallback<WebContents*(void)> web_contents_getter) { @@ -26,7 +26,7 @@ index 19733d058032d..35d7a1e740e1a 100644 new LoginHandlerDelegate( std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_primary_main_frame, process_id, request_id, url, -@@ -2929,8 +2919,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2939,8 +2929,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index 19733d058032d..35d7a1e740e1a 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2940,9 +2934,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2950,9 +2944,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 1b44c114..11f63c3f 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -14,7 +14,7 @@ index fd325017d2347..84ab42c78c1fd 100644 if (crashed_overlay_view_ == crashed_overlay_view) return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index c76c867283902..d303f2a8d8dc8 100644 +index 33e93fd257574..b25e00d6b4f48 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h @@ -85,6 +85,10 @@ class WEBVIEW_EXPORT WebView : public View, diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 1b78ae68..163f96f5 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,5 +1,5 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 133e047583c26..8e5667420f7fc 100644 +index 3bfd99c004c55..e95bb2a6d78c2 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc @@ -122,7 +122,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( @@ -13,10 +13,10 @@ index 133e047583c26..8e5667420f7fc 100644 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 6180969a38780..13526c077d1d2 100644 +index fe0f45376b729..2120ae8ef7665 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -131,7 +131,7 @@ StoragePartition* BrowserContext::GetStoragePartition( +@@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition( StoragePartition* BrowserContext::GetStoragePartition( const StoragePartitionConfig& storage_partition_config, bool can_create) { @@ -25,7 +25,7 @@ index 6180969a38780..13526c077d1d2 100644 // An off the record profile MUST only use in memory storage partitions. CHECK(storage_partition_config.in_memory()); } -@@ -375,7 +375,8 @@ BrowserContext::CreateVideoDecodePerfHistory() { +@@ -365,7 +365,8 @@ BrowserContext::CreateVideoDecodePerfHistory() { const bool kUseInMemoryDBDefault = false; bool use_in_memory_db = base::GetFieldTrialParamByFeatureAsBool( media::kMediaCapabilitiesWithParameters, kUseInMemoryDBParamName, @@ -58,7 +58,7 @@ index 81013d6eb993a..89abfbe7fec6c 100644 // static diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index 0899dc89b93b9..0cd3a8f01c2a2 100644 +index 27861ffd3321e..6983995e38815 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc @@ -568,7 +568,7 @@ bool DatabaseTracker::LazyInit() { diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 8ff691cc..2f83e144 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 37bbac5815969..4af1fde05584a 100644 +index 686b0af1442fb..859c7ad4c64aa 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -64,6 +64,8 @@ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index 10d936c8..33c1ff38 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -43,10 +43,10 @@ index f1f8f33165a4a..8b07817c654e8 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 67fbf128ea158..230a2adb0af05 100644 +index 68a3c1f68f6c1..721bc530f8690 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -671,6 +671,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) { +@@ -665,6 +665,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) { } } @@ -61,7 +61,7 @@ index 67fbf128ea158..230a2adb0af05 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -2000,6 +2008,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1994,6 +2002,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -105,10 +105,10 @@ index 5d9aaef31ecea..a6b47cd468270 100644 }; } // namespace gfx -diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index c9be93481712c..cfda497e15f02 100644 ---- ui/views/animation/ink_drop_host_view.h -+++ ui/views/animation/ink_drop_host_view.h +diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h +index 427aed77cff26..415d8a4b22460 100644 +--- ui/views/animation/ink_drop_host.h ++++ ui/views/animation/ink_drop_host.h @@ -179,6 +179,8 @@ class VIEWS_EXPORT InkDropHost { View* host_view() { return host_view_; } const View* host_view() const { return host_view_; } @@ -136,7 +136,7 @@ index 5f48fe806d0ca..6253c7e880106 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 7ee1bc5714d45..ebf3c21ba0d74 100644 +index 2da2766eeb055..0a8fbf3c51c13 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h @@ -141,6 +141,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { @@ -150,7 +150,7 @@ index 7ee1bc5714d45..ebf3c21ba0d74 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 35ccc8f7ff743..07197b91effc0 100644 +index b544876cabea1..51efa38cda76e 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -52,12 +52,29 @@ enum LabelPropertyKey { @@ -199,7 +199,7 @@ index 35ccc8f7ff743..07197b91effc0 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -752,6 +778,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const { +@@ -753,6 +779,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -217,7 +217,7 @@ index 35ccc8f7ff743..07197b91effc0 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index c4206954d2858..ad7576db464b7 100644 +index 78bf64d40a649..16b889859d358 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h @@ -237,6 +237,10 @@ class VIEWS_EXPORT Label : public View, @@ -240,10 +240,10 @@ index c4206954d2858..ad7576db464b7 100644 std::unique_ptr<SelectionController> selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index b26a30ea89425..9d50678339f7b 100644 +index 64229eeead5f9..d3a13d1c0ab27 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -486,7 +486,8 @@ void MenuController::Run(Widget* parent, +@@ -471,7 +471,8 @@ void MenuController::Run(Widget* parent, MenuAnchorPosition position, bool context_menu, bool is_nested_drag, @@ -253,7 +253,7 @@ index b26a30ea89425..9d50678339f7b 100644 exit_type_ = ExitType::kNone; possible_drag_ = false; drag_in_progress_ = false; -@@ -533,6 +534,7 @@ void MenuController::Run(Widget* parent, +@@ -518,6 +519,7 @@ void MenuController::Run(Widget* parent, owner_->AddObserver(this); native_view_for_gestures_ = native_view_for_gestures; @@ -261,7 +261,7 @@ index b26a30ea89425..9d50678339f7b 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2214,6 +2216,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2199,6 +2201,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { params.do_capture = do_capture; params.native_view_for_gestures = native_view_for_gestures_; params.owned_window_anchor = anchor; @@ -269,7 +269,7 @@ index b26a30ea89425..9d50678339f7b 100644 if (item->GetParentMenuItem()) { params.context = state_.item->GetWidget(); -@@ -2914,8 +2917,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2899,8 +2902,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -284,7 +284,7 @@ index b26a30ea89425..9d50678339f7b 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2934,8 +2942,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2919,8 +2927,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -396,7 +396,7 @@ index 67cdb883886f8..4ca7d632ad7f9 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index e6a16f4d1ee6b..9950ddcdcb936 100644 +index 5cef5b698b9db..0e07b10be1744 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc @@ -1095,6 +1095,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, @@ -430,7 +430,7 @@ index e6a16f4d1ee6b..9950ddcdcb936 100644 GetMenuController() && GetMenuController()->use_ash_system_ui_layout() ? style::CONTEXT_TOUCH_MENU diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 71385398057f6..9bf3f69b1cfd6 100644 +index 944a82d709df8..08aaf00b0208e 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -4,6 +4,7 @@ @@ -519,7 +519,7 @@ index 71385398057f6..9bf3f69b1cfd6 100644 // Look up the menu model for this menu. const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index 74358011ec8f4..76b53ca3a8ade 100644 +index eaae7fd7a3607..bfc69d7fc86e1 100644 --- ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h @@ -88,6 +88,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate, @@ -565,7 +565,7 @@ index adb22671b94fa..59cc421e82e1b 100644 bool MenuRunner::IsRunning() const { diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h -index 54a0966b1624a..69834c2256aab 100644 +index 9d51c2e38b893..7fbe67198a1e5 100644 --- ui/views/controls/menu/menu_runner.h +++ ui/views/controls/menu/menu_runner.h @@ -152,6 +152,8 @@ class VIEWS_EXPORT MenuRunner { @@ -639,7 +639,7 @@ index e6587d2208a13..c2c72f7edb89c 100644 void Cancel() override; base::TimeTicks GetClosingEventTime() const override; diff --git ui/views/controls/menu/menu_runner_impl_cocoa.h ui/views/controls/menu/menu_runner_impl_cocoa.h -index d11d5bb193102..49e494ccba304 100644 +index 50291eb07440a..9716791a463aa 100644 --- ui/views/controls/menu/menu_runner_impl_cocoa.h +++ ui/views/controls/menu/menu_runner_impl_cocoa.h @@ -43,6 +43,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface { @@ -651,10 +651,10 @@ index d11d5bb193102..49e494ccba304 100644 void Cancel() override; base::TimeTicks GetClosingEventTime() const override; diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm -index c0818ab3fbec1..a77b84d873d11 100644 +index 9ad468f10e9df..ccbaaad5b78bd 100644 --- ui/views/controls/menu/menu_runner_impl_cocoa.mm +++ ui/views/controls/menu/menu_runner_impl_cocoa.mm -@@ -518,6 +518,7 @@ void MenuRunnerImplCocoa::RunMenuAt( +@@ -195,6 +195,7 @@ void MenuRunnerImplCocoa::RunMenuAt( MenuAnchorPosition anchor, int32_t run_types, gfx::NativeView native_view_for_gestures, @@ -663,7 +663,7 @@ index c0818ab3fbec1..a77b84d873d11 100644 DCHECK(!IsRunning()); DCHECK(parent); diff --git ui/views/controls/menu/menu_runner_impl_interface.h ui/views/controls/menu/menu_runner_impl_interface.h -index 90842f90f1e75..f638f78e8ef37 100644 +index cf696fbcf0714..5c48fd7410b88 100644 --- ui/views/controls/menu/menu_runner_impl_interface.h +++ ui/views/controls/menu/menu_runner_impl_interface.h @@ -46,6 +46,8 @@ class MenuRunnerImplInterface { @@ -676,7 +676,7 @@ index 90842f90f1e75..f638f78e8ef37 100644 // Hides and cancels the menu. diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 4185ef2d6dba1..78d1f87aeccce 100644 +index e9102acc407c8..46a0cfb8bf436 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc @@ -263,6 +263,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) @@ -692,18 +692,18 @@ index 4185ef2d6dba1..78d1f87aeccce 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aura_ozone.cc ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -index 1a183f37f945b..13cf77bbf4190 100644 +index da9cefb9dffc1..6900756b3822d 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -@@ -17,6 +17,7 @@ - #include "base/threading/thread_task_runner_handle.h" +@@ -16,6 +16,7 @@ + #include "base/task/single_thread_task_runner.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "ui/aura/client/screen_position_client.h" #include "ui/aura/env.h" #include "ui/aura/test/aura_test_utils.h" -@@ -102,9 +103,11 @@ class UIControlsDesktopOzone : public UIControlsAura { +@@ -106,9 +107,11 @@ class UIControlsDesktopOzone : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -716,7 +716,7 @@ index 1a183f37f945b..13cf77bbf4190 100644 #if !BUILDFLAG(IS_CHROMEOS_LACROS) if (root_location != root_current_location && diff --git ui/views/view.h ui/views/view.h -index 97d4c120169ad..2e8185ccf4ba0 100644 +index 43b50bfdc3cb6..3d23059131467 100644 --- ui/views/view.h +++ ui/views/view.h @@ -21,6 +21,7 @@ diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index b54bbfb5..94a2f34c 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index e5d57b6136722..1d34b6256823a 100644 +index 9a942b2b4dd39..fe77b3fa468e3 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -663,6 +663,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { +@@ -656,6 +656,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { return scale_override_for_capture_; } @@ -18,10 +18,10 @@ index e5d57b6136722..1d34b6256823a 100644 if (!GetMouseWheelPhaseHandler()) return; diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index dba8778b5b238..d6fdbd89f4743 100644 +index 1425fc2e82e48..312114d238da2 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -70,6 +70,7 @@ class CursorManager; +@@ -71,6 +71,7 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -29,7 +29,7 @@ index dba8778b5b238..d6fdbd89f4743 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -142,6 +143,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -141,6 +142,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Size& max_size) override; void DisableAutoResize(const gfx::Size& new_size) override; float GetDeviceScaleFactor() const final; @@ -38,7 +38,7 @@ index dba8778b5b238..d6fdbd89f4743 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; ui::mojom::VirtualKeyboardMode GetVirtualKeyboardMode() override; -@@ -178,6 +181,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -177,6 +180,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { // Called when screen information or native widget bounds change. virtual void UpdateScreenInfo(); @@ -49,7 +49,7 @@ index dba8778b5b238..d6fdbd89f4743 100644 // Called by the TextInputManager to notify the view about being removed from // the list of registered views, i.e., TextInputManager is no longer tracking // TextInputState from this view. The RWHV should reset |text_input_manager_| -@@ -434,6 +441,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -430,6 +437,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { const gfx::Rect& bounds, const gfx::Rect& anchor_rect) = 0; @@ -59,10 +59,10 @@ index dba8778b5b238..d6fdbd89f4743 100644 + virtual void InitAsGuest(RenderWidgetHostView* parent_host_view, + RenderWidgetHostViewGuest* guest_view) {} + - // Sets the cursor for this view to the one associated with the specified - // cursor_type. - virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -684,6 +697,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { + // Sets the cursor for this view to the one specified. + virtual void UpdateCursor(const ui::Cursor& cursor) = 0; + +@@ -675,6 +688,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { // to all displays. gfx::Size system_cursor_size_; @@ -73,7 +73,7 @@ index dba8778b5b238..d6fdbd89f4743 100644 private: FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, -@@ -705,10 +722,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -696,10 +713,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { void SynchronizeVisualProperties(); @@ -133,10 +133,10 @@ index fe52808643114..58197f52e19e5 100644 if (host_ && set_focus_on_mouse_down_or_key_event_) { set_focus_on_mouse_down_or_key_event_ = false; diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 5342397d0a2e8..3b3878a714e56 100644 +index c4cb1c13fc35c..a9371d66f3f9c 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -258,6 +258,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -255,6 +255,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() const = 0; @@ -243,7 +243,7 @@ index 01d4ffe408a84..fbe41fefbb2bd 100644 base::WeakPtrFactory<DesktopWindowTreeHostLinux> weak_factory_{this}; }; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -index a7d8b09e1d76e..e973baff291c0 100644 +index 113fcb91360fb..8d82b545b51bb 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -275,8 +275,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -258,10 +258,10 @@ index a7d8b09e1d76e..e973baff291c0 100644 // Calculate initial bounds. diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index ceee9102cf021..60939d07e402d 100644 +index 0be1688818063..b627453be9f8b 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -183,16 +183,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -180,16 +180,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_.get()); HWND parent_hwnd = nullptr; @@ -294,7 +294,7 @@ index ceee9102cf021..60939d07e402d 100644 message_handler_->Init(parent_hwnd, pixel_bounds, params.headless_mode); CreateCompositor(params.force_software_compositing); OnAcceleratedWidgetAvailable(); -@@ -1040,11 +1052,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1030,11 +1042,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -312,7 +312,7 @@ index ceee9102cf021..60939d07e402d 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1052,6 +1068,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1042,6 +1058,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -325,7 +325,7 @@ index ceee9102cf021..60939d07e402d 100644 SendEventToSink(event); return event->handled(); } -@@ -1231,8 +1253,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { +@@ -1215,8 +1237,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { // positions in variable-DPI situations. See https://crbug.com/1224715 for // details. aura::Window* root = nullptr; @@ -344,10 +344,10 @@ index ceee9102cf021..60939d07e402d 100644 } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 58c13ba424645..9245711b97dac 100644 +index b23ba1bf3a49f..f85ff1bef75e4 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -326,6 +326,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -319,6 +319,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -355,11 +355,11 @@ index 58c13ba424645..9245711b97dac 100644 + // Chromium-controlled view/window hierarchy. + bool has_external_parent_ = false; + - // Owned by TooltipController, but we need to forward events to it so we keep - // a reference. - raw_ptr<corewm::TooltipWin> tooltip_; + // Visibility of the cursor. On Windows we can have multiple root windows and + // the implementation of ::ShowCursor() is based on a counter, so making this + // member static ensures that ::ShowCursor() is always called exactly once diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 56206b82c4eac..da148689d38eb 100644 +index 13d32438918d0..e5152c6e467c2 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -366,7 +366,8 @@ void Widget::Init(InitParams params) { @@ -426,7 +426,7 @@ index c179c718d0255..967a87c07d026 100644 // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index 8b0f5f5c2867b..1c8afcfb9d905 100644 +index 56c992edca67a..21cee8b517edd 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h @@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate @@ -441,10 +441,10 @@ index 8b0f5f5c2867b..1c8afcfb9d905 100644 bool enable_arrow_key_traversal() const { return params_.enable_arrow_key_traversal; diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index d24c447bb8030..29215d6578169 100644 +index b162f426dbceb..017eb2562f6eb 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc -@@ -67,7 +67,8 @@ void CalculateWindowStylesFromInitParams( +@@ -63,7 +63,8 @@ void CalculateWindowStylesFromInitParams( if (!widget_delegate->CanResize()) *style &= static_cast<DWORD>(~(WS_THICKFRAME | WS_MAXIMIZEBOX)); if (params.remove_standard_frame) @@ -455,10 +455,10 @@ index d24c447bb8030..29215d6578169 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index f8a5b92ae541a..9186d9a56de3d 100644 +index 22bb24f2afcef..9d63bf4013775 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -838,7 +838,11 @@ bool HWNDMessageHandler::IsVisible() const { +@@ -826,7 +826,11 @@ bool HWNDMessageHandler::IsVisible() const { } bool HWNDMessageHandler::IsActive() const { @@ -471,7 +471,7 @@ index f8a5b92ae541a..9186d9a56de3d 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3249,10 +3253,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3187,10 +3191,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index 7f46c573..ed656cf1 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -1,8 +1,8 @@ diff --git components/viz/host/host_display_client.cc components/viz/host/host_display_client.cc -index 6d905b62e6258..a650c048cfcf3 100644 +index 0c63e0d59b6b0..bdbac6fceb1df 100644 --- components/viz/host/host_display_client.cc +++ components/viz/host/host_display_client.cc -@@ -47,9 +47,14 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( +@@ -48,9 +48,14 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( } #endif @@ -18,7 +18,7 @@ index 6d905b62e6258..a650c048cfcf3 100644 if (!NeedsToUseLayerWindow(widget_)) { DLOG(ERROR) << "HWND shouldn't be using a layered window"; return; -@@ -57,7 +62,10 @@ void HostDisplayClient::CreateLayeredWindowUpdater( +@@ -58,7 +63,10 @@ void HostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_ = std::make_unique<LayeredWindowUpdaterImpl>(widget_, std::move(receiver)); @@ -80,7 +80,7 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index fb793e98d5939..bf51d9aa376ea 100644 +index 77fc13c924dd1..3046733922148 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -220,6 +220,8 @@ viz_component("service") { @@ -93,7 +93,7 @@ index fb793e98d5939..bf51d9aa376ea 100644 defines = [ "VIZ_SERVICE_IMPLEMENTATION" ] diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index d8f25c1435d4b..ee1eda5180e93 100644 +index ec7cc3404b5d6..01898ac0cef5b 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -17,6 +17,7 @@ @@ -134,7 +134,7 @@ index d8f25c1435d4b..ee1eda5180e93 100644 return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc -index de5825e251f3b..841a626586f2b 100644 +index d4d4c1444e7a1..d62a3939a31fa 100644 --- components/viz/service/display_embedder/software_output_device_win.cc +++ components/viz/service/display_embedder/software_output_device_win.cc @@ -192,8 +192,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( @@ -150,10 +150,10 @@ index de5825e251f3b..841a626586f2b 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc -index 3b44531f2618f..097957f0eb7b1 100644 +index d4c0be621ecd9..8b6052c4bd807 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -399,8 +399,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -397,8 +397,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); @@ -191,10 +191,10 @@ index d63ec55ae38d6..ff86831efd68b 100644 // running in the same process, so it won't block anything. // TODO(159346933) Remove once the origin isolation logic is moved outside of diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom -index 52f44a31de4a8..10fe3d9daa207 100644 +index 83c153d99c1e2..7396a87b56a94 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom -@@ -98,12 +98,14 @@ interface DisplayPrivate { +@@ -102,12 +102,14 @@ interface DisplayPrivate { }; interface DisplayClient { @@ -222,10 +222,10 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 50cea82c6b477..0329d39416742 100644 +index 2d296b025ec17..a45c73aaa09b8 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h -@@ -32,7 +32,9 @@ +@@ -33,7 +33,9 @@ #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/subtree_capture_id.h" @@ -235,7 +235,7 @@ index 50cea82c6b477..0329d39416742 100644 #include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/viz/privileged/mojom/compositing/display_private.mojom.h" -@@ -143,6 +145,14 @@ class COMPOSITOR_EXPORT ContextFactory { +@@ -145,6 +147,14 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -250,7 +250,7 @@ index 50cea82c6b477..0329d39416742 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -186,6 +196,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -188,6 +198,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -260,7 +260,7 @@ index 50cea82c6b477..0329d39416742 100644 // 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 -@@ -503,6 +516,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -513,6 +526,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index d39c6af0..21adb9ee 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 4b0346f89aff3..ad0be55a44a7b 100644 +index c4db6519acbff..03d173d9bf8fa 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3168,6 +3168,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3182,6 +3182,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, params.main_frame_name, GetOpener(), primary_main_frame_policy, base::UnguessableToken::Create()); @@ -15,7 +15,7 @@ index 4b0346f89aff3..ad0be55a44a7b 100644 std::unique_ptr<WebContentsViewDelegate> delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3178,6 +3184,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3192,6 +3198,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 4b0346f89aff3..ad0be55a44a7b 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3359,6 +3366,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3372,6 +3379,9 @@ void WebContentsImpl::RenderWidgetCreated( OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated", "render_widget_host", render_widget_host); created_widgets_.insert(render_widget_host); @@ -33,7 +33,7 @@ index 4b0346f89aff3..ad0be55a44a7b 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4097,6 +4107,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4106,6 +4116,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( params.pip_options->lock_aspect_ratio; } @@ -49,7 +49,7 @@ index 4b0346f89aff3..ad0be55a44a7b 100644 // Check whether there is an available prerendered page for this navigation if // this is not for guest. If it exists, take WebContents pre-created for // hosting the prerendered page instead of creating new WebContents. -@@ -8007,6 +8026,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -7996,6 +8015,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). SetFocusedFrameTree(&node->frame_tree()); } @@ -60,10 +60,10 @@ index 4b0346f89aff3..ad0be55a44a7b 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index eec67dd7a103e..4321c4cb12fd9 100644 +index 7778d03105273..b9b6f060201d9 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -95,10 +95,12 @@ class BrowserContext; +@@ -94,10 +94,12 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -76,7 +76,7 @@ index eec67dd7a103e..4321c4cb12fd9 100644 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -241,6 +243,10 @@ class WebContents : public PageNavigator, +@@ -240,6 +242,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; @@ -88,7 +88,7 @@ index eec67dd7a103e..4321c4cb12fd9 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index e2ce097fb78d8..d67675467c133 100644 +index 2717fd39b99c6..604d3b75160a4 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -58,9 +58,11 @@ class EyeDropperListener; diff --git a/patch/patches/web_url_loader_cancel_1617042.patch b/patch/patches/web_url_loader_cancel_1617042.patch index f76a4148..e41f0b6d 100644 --- a/patch/patches/web_url_loader_cancel_1617042.patch +++ b/patch/patches/web_url_loader_cancel_1617042.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/public/platform/web_url_loader.h third_party/blink/public/platform/web_url_loader.h -index 3d6c5c66b8edb..a77305b86aabf 100644 +index 31054cf2795a4..d5082be28ea54 100644 --- third_party/blink/public/platform/web_url_loader.h +++ third_party/blink/public/platform/web_url_loader.h @@ -143,12 +143,14 @@ class BLINK_PLATFORM_EXPORT WebURLLoader { diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 9b0c07b7..c56ca685 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,10 +1,10 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index a2a4996e3cbe3..debfe4b698283 100644 +index b2de9ae25b7ac..06b34b5a120cf 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -798,6 +798,11 @@ class BLINK_PLATFORM_EXPORT Platform { - return attribution_reporting::mojom::OsSupport::kDisabled; - } +@@ -799,6 +799,11 @@ class BLINK_PLATFORM_EXPORT Platform { + uint64_t private_memory_footprint_bytes) {} + #endif + // DevTools ------------------------------------------------------------ + @@ -15,18 +15,18 @@ index a2a4996e3cbe3..debfe4b698283 100644 static void InitializeMainThreadCommon( Platform* platform, diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 0718aa7fbe1b1..7e393fa3ebbb6 100644 +index 01c2f360adbb0..92ea44b41820e 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc -@@ -8,6 +8,7 @@ - #include <utility> - #include <vector> +@@ -10,6 +10,7 @@ + #include "base/task/sequenced_task_runner.h" + #include "base/task/single_thread_task_runner.h" +#include "third_party/blink/public/platform/platform.h" #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -151,6 +152,7 @@ DevToolsSession::DevToolsSession( +@@ -165,6 +166,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -34,11 +34,11 @@ index 0718aa7fbe1b1..7e393fa3ebbb6 100644 } DevToolsSession::~DevToolsSession() { -@@ -196,6 +198,7 @@ void DevToolsSession::Detach() { +@@ -210,6 +212,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); + Platform::Current()->DevToolsAgentDetached(); } - void DevToolsSession::DispatchProtocolCommand( + void DevToolsSession::DetachFromV8() { diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 94269698..378d9fe9 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,7 +11,7 @@ index c8655d9270b81..d11450d22123a 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index 2e8500ac411be..8b1e6b5217acb 100644 +index 9ce7b0b20d0e9..52b7713d3d250 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -249,8 +249,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -30,7 +30,7 @@ index 2e8500ac411be..8b1e6b5217acb 100644 } namespace { -@@ -564,6 +569,7 @@ WebViewImpl::WebViewImpl( +@@ -563,6 +568,7 @@ WebViewImpl::WebViewImpl( chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), @@ -62,10 +62,10 @@ index ac623b8bd6c06..3e0bd1dd8ce3b 100644 gfx::Transform device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 6c906a29dbb9e..9d6f325794b19 100644 +index c1e0b9eff83cb..333ad8c8e2990 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -923,7 +923,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -916,7 +916,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index a44344ba..610bebe9 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index 0b3085d90332f..4fe995a31d4e8 100644 +index 22bf50617329b..40dfc6cc75df0 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -19,10 +19,12 @@ @@ -51,7 +51,7 @@ index 0b3085d90332f..4fe995a31d4e8 100644 bool result = base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index d071ef696f441..aba280943251a 100644 +index 2565fae8b1433..9ca16abf99c92 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc @@ -294,8 +294,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { diff --git a/patch/patches/win_power_monitor_4219163.patch b/patch/patches/win_power_monitor_4219163.patch new file mode 100644 index 00000000..c48a35a8 --- /dev/null +++ b/patch/patches/win_power_monitor_4219163.patch @@ -0,0 +1,22 @@ +diff --git base/power_monitor/battery_level_provider_win.cc base/power_monitor/battery_level_provider_win.cc +index 1e9f88154adc7..3c3a4ee7cd511 100644 +--- base/power_monitor/battery_level_provider_win.cc ++++ base/power_monitor/battery_level_provider_win.cc +@@ -18,6 +18,7 @@ + + #include "base/memory/weak_ptr.h" + #include "base/metrics/histogram_macros.h" ++#include "base/numerics/safe_conversions.h" + #include "base/task/sequenced_task_runner.h" + #include "base/task/task_traits.h" + #include "base/task/thread_pool.h" +@@ -134,7 +135,8 @@ absl::optional<uint32_t> GetBatteryBatteryDischargeGranularity( + if (!success) + return absl::nullopt; + +- size_t nb_elements = bytes_returned / sizeof(BATTERY_REPORTING_SCALE); ++ ptrdiff_t nb_elements = base::checked_cast<ptrdiff_t>( ++ bytes_returned / sizeof(BATTERY_REPORTING_SCALE)); + if (!nb_elements) + return absl::nullopt; + diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index 470f0bab..9cd86666 100644 --- a/patch/patches/win_sandbox_3210.patch +++ b/patch/patches/win_sandbox_3210.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index f20c7697746d1..ad786ca9ebd62 100644 +index 38601d04959aa..de394933d26b9 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1079,6 +1079,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1017,6 +1017,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/patch/patches/win_shell_dialogs_3294.patch b/patch/patches/win_shell_dialogs_3294.patch index e3586b92..236c0f59 100644 --- a/patch/patches/win_shell_dialogs_3294.patch +++ b/patch/patches/win_shell_dialogs_3294.patch @@ -1,8 +1,8 @@ diff --git ui/shell_dialogs/base_shell_dialog_win.cc ui/shell_dialogs/base_shell_dialog_win.cc -index aa20fab454512..f9f814b59ce65 100644 +index 138167d4c0105..81562ffdd2162 100644 --- ui/shell_dialogs/base_shell_dialog_win.cc +++ ui/shell_dialogs/base_shell_dialog_win.cc -@@ -58,11 +58,15 @@ BaseShellDialogImpl::Owners& BaseShellDialogImpl::GetOwners() { +@@ -59,11 +59,15 @@ BaseShellDialogImpl::Owners& BaseShellDialogImpl::GetOwners() { // static void BaseShellDialogImpl::DisableOwner(HWND owner) { @@ -18,7 +18,7 @@ index aa20fab454512..f9f814b59ce65 100644 // Cannot run a modal shell dialog if one is already running for this owner. DCHECK(!IsRunningDialogForOwner(owner)); // The owner must be a top level window, otherwise we could end up with two -@@ -88,6 +92,8 @@ void BaseShellDialogImpl::EndRun(std::unique_ptr<RunState> run_state) { +@@ -89,6 +93,8 @@ void BaseShellDialogImpl::EndRun(std::unique_ptr<RunState> run_state) { } bool BaseShellDialogImpl::IsRunningDialogForOwner(HWND owner) const { diff --git a/tests/cefclient/browser/media_router_test.cc b/tests/cefclient/browser/media_router_test.cc index 54483ded..94b39441 100644 --- a/tests/cefclient/browser/media_router_test.cc +++ b/tests/cefclient/browser/media_router_test.cc @@ -324,7 +324,6 @@ class MediaObserver : public CefMediaObserver { CefRefPtr<CefDictionaryValue> sink_dict = CefDictionaryValue::Create(); sink_dict->SetString("id", it->first); sink_dict->SetString("name", info->sink->GetName()); - sink_dict->SetString("desc", info->sink->GetDescription()); sink_dict->SetInt("icon", info->sink->GetIconType()); sink_dict->SetString("ip_address", CefString(&info->device_info.ip_address)); diff --git a/tests/cefclient/resources/media_router.html b/tests/cefclient/resources/media_router.html index 54f8b745..a13451e0 100644 --- a/tests/cefclient/resources/media_router.html +++ b/tests/cefclient/resources/media_router.html @@ -240,7 +240,6 @@ Expected format for |sinks| is: name: string, type: string ('cast' or 'dial'), id: string, - desc: string, icon: int }, ... ] @@ -506,14 +505,12 @@ function initDemoMode() { name: 'Sink 1', type: 'cast', id: 'sink1', - desc: 'My cast device', icon: CEF_MSIT_CAST }, { name: 'Sink 2', type: 'dial', id: 'sink2', - desc: 'My dial device', icon: CEF_MSIT_GENERIC } ]; |