From 701fc03f00f7b9f28ddd03e5798c87bbfff3b8b2 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 22 May 2024 21:52:35 -0400 Subject: [PATCH] Update to Chromium version 126.0.6478.0 (#1300313) --- BUILD.gn | 4 +- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- include/capi/cef_v8_capi.h | 3 +- include/cef_api_hash.h | 8 +- include/cef_v8.h | 5 +- include/internal/cef_types.h | 33 ++-- libcef/browser/alloy/alloy_browser_context.cc | 5 + libcef/browser/alloy/alloy_browser_context.h | 1 + .../browser/alloy/alloy_browser_host_impl.cc | 8 +- .../browser/alloy/alloy_browser_host_impl.h | 5 +- libcef/browser/alloy/alloy_browser_main.cc | 8 +- .../alloy/chrome_browser_process_alloy.cc | 6 + .../alloy/chrome_browser_process_alloy.h | 3 + libcef/browser/browser_platform_delegate.cc | 4 +- libcef/browser/browser_platform_delegate.h | 11 +- .../extensions/extensions_browser_client.cc | 1 + .../extensions/extensions_browser_client.h | 1 + libcef/browser/net/chrome_scheme_handler.cc | 8 +- libcef/browser/net_service/cookie_helper.cc | 6 +- .../net_service/response_filter_wrapper.cc | 2 +- .../osr/browser_platform_delegate_osr.cc | 8 +- .../osr/browser_platform_delegate_osr.h | 5 +- libcef/browser/osr/osr_accessibility_util.cc | 15 +- libcef/browser/osr/osr_accessibility_util.h | 12 +- .../osr/render_widget_host_view_osr.cc | 9 +- .../browser/osr/render_widget_host_view_osr.h | 2 +- libcef/browser/permission_prompt.cc | 5 + libcef/browser/prefs/browser_prefs.cc | 1 + .../speech_recognition_manager_delegate.cc | 3 - .../speech_recognition_manager_delegate.h | 1 - libcef/browser/views/view_view.h | 8 +- libcef/browser/views/window_view.cc | 9 +- .../common/chrome/chrome_main_delegate_cef.cc | 10 + libcef/common/net_service/net_service_util.cc | 2 +- libcef/common/string_util.cc | 9 +- libcef/renderer/blink_glue.cc | 2 +- libcef/renderer/render_frame_observer.cc | 2 +- libcef/renderer/v8_impl.cc | 39 ++-- libcef/renderer/v8_impl.h | 4 +- libcef_dll/cpptoc/v8value_cpptoc.cc | 7 +- libcef_dll/ctocpp/v8value_ctocpp.cc | 7 +- libcef_dll/ctocpp/v8value_ctocpp.h | 6 +- patch/patch.cfg | 9 +- ...se_allocator_instance_tracer_5542485.patch | 2 +- patch/patches/base_command_line_1872.patch | 4 +- patch/patches/base_sandbox_2743.patch | 32 ++-- patch/patches/base_test_4396276.patch | 6 +- patch/patches/browser_scheduler.patch | 2 +- .../browser_security_policy_1081397.patch | 10 +- patch/patches/build.patch | 6 +- patch/patches/chrome_browser.patch | 6 +- ...rome_browser_background_mode_1100085.patch | 12 +- patch/patches/chrome_browser_browser.patch | 85 +++++---- .../chrome_browser_content_settings.patch | 10 +- .../chrome_browser_context_menus.patch | 18 +- .../patches/chrome_browser_devtools_osr.patch | 6 +- .../chrome_browser_dialogs_native.patch | 4 +- .../chrome_browser_dialogs_widget.patch | 122 ++++++++----- patch/patches/chrome_browser_download.patch | 6 +- patch/patches/chrome_browser_extensions.patch | 10 +- .../chrome_browser_permission_prompt.patch | 20 +- patch/patches/chrome_browser_policy.patch | 34 ++-- .../chrome_browser_printing_oop_osr.patch | 2 +- patch/patches/chrome_browser_profiles.patch | 20 +- .../chrome_browser_safe_browsing.patch | 6 +- patch/patches/chrome_browser_startup.patch | 10 +- patch/patches/chrome_browser_themes.patch | 10 +- patch/patches/chrome_common_logging.patch | 4 +- patch/patches/chrome_plugins.patch | 22 +-- patch/patches/chrome_pref_watcher.patch | 8 +- patch/patches/chrome_renderer.patch | 2 +- patch/patches/chrome_runtime.patch | 168 +++++++++-------- patch/patches/chrome_runtime_views.patch | 172 ++++++++---------- patch/patches/chrome_utility_client.patch | 10 +- .../patches/color_provider_manager_3610.patch | 2 +- patch/patches/component_build.patch | 6 +- patch/patches/content_2015.patch | 54 +++--- .../content_initiator_policy_323753235.patch | 12 ++ patch/patches/content_main_654986.patch | 48 +---- .../patches/content_renderer_host_3617.patch | 4 +- patch/patches/crashpad_1995.patch | 26 +-- patch/patches/embedder_product_override.patch | 2 +- patch/patches/extensions_1947.patch | 20 +- patch/patches/gn_config.patch | 12 +- patch/patches/gritsettings.patch | 4 +- patch/patches/light_mode_3534.patch | 6 +- patch/patches/linux_assets_path_1936.patch | 2 +- .../linux_glib_deprecated_volatile.patch | 4 +- patch/patches/linux_gtk_theme_3610.patch | 4 +- patch/patches/linux_printing_context.patch | 2 +- patch/patches/mac_chrome_locale_3623.patch | 6 +- .../mac_platform_style_bubble_893292.patch | 4 +- patch/patches/mac_render_widget_3680.patch | 11 +- patch/patches/message_loop.patch | 12 +- patch/patches/message_pump_mac_2495.patch | 6 +- patch/patches/metrics_system_profile.patch | 6 +- .../mime_handler_view_guest_1565_2727.patch | 12 +- patch/patches/net_cookie_flags.patch | 8 +- patch/patches/net_test_server_3798752.patch | 6 +- patch/patches/osr_fling_2745.patch | 12 +- .../osr_win_remove_keyed_mutex_2575.patch | 8 +- patch/patches/print_preview_123.patch | 2 +- patch/patches/renderer_host_1070713.patch | 4 +- patch/patches/resource_bundle_2512.patch | 8 +- patch/patches/rfh_navigation_4829483.patch | 4 +- patch/patches/rwh_background_color_1984.patch | 8 +- patch/patches/services_network_2622.patch | 78 ++------ patch/patches/services_network_2718.patch | 6 +- .../patches/set_resize_background_color.patch | 2 +- patch/patches/storage_incognito_2289.patch | 2 +- patch/patches/trace_event.patch | 4 +- patch/patches/views_1749_2102_3330.patch | 72 ++++---- patch/patches/views_textfield_5399416.patch | 4 +- patch/patches/views_widget.patch | 100 +++++----- patch/patches/viz_osr_2575.patch | 8 +- patch/patches/web_contents_1257_1565.patch | 24 +-- patch/patches/webkit_popups.patch | 6 +- .../webkit_runtime_enabled_features.patch | 6 +- patch/patches/webui_2037.patch | 6 +- ...n_partition_freelist_entry_336007395.patch | 2 +- patch/patches/win_sandbox_3210.patch | 4 +- patch/patches/win_sandbox_policy.patch | 12 +- tests/cefclient/browser/client_handler.cc | 4 + .../renderer/performance_test_tests.cc | 4 +- .../resource_request_handler_unittest.cc | 5 + tests/ceftests/v8_unittest.cc | 18 +- tools/gn_args.py | 4 - 127 files changed, 915 insertions(+), 909 deletions(-) create mode 100644 patch/patches/content_initiator_policy_323753235.patch diff --git a/BUILD.gn b/BUILD.gn index 75143f08b..fc70a03be 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -252,8 +252,7 @@ if (is_linux) { # Set by GetRequiredArgs() in //cef/tools/gn_args.py. # -# Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1. -assert(enable_basic_printing) +# Enable support for Print Preview. assert(enable_print_preview) # Enable support for Widevine CDM. @@ -1018,7 +1017,6 @@ source_set("libcef_static") { # Normal build dependencies. Should be sorted alphabetically. "//base:base_static", - "//base/third_party/dynamic_annotations", "//cc", "//chrome:dependencies", "//chrome:packed_resources", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 3a69bd1aa..80c379644 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/125.0.6422.0' + 'chromium_checkout': 'refs/tags/126.0.6478.0' } diff --git a/include/capi/cef_v8_capi.h b/include/capi/cef_v8_capi.h index 5b04f6417..4e74d9e46 100644 --- a/include/capi/cef_v8_capi.h +++ b/include/capi/cef_v8_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=3a188f380f8044060ea93fdca0b3d231df88979d$ +// $hash=5dd4948a92af2ad69e2171f2dffb8f2c23e5c147$ // #ifndef CEF_INCLUDE_CAPI_CEF_V8_CAPI_H_ @@ -611,7 +611,6 @@ typedef struct _cef_v8value_t { /// int(CEF_CALLBACK* set_value_byaccessor)(struct _cef_v8value_t* self, const cef_string_t* key, - cef_v8_accesscontrol_t settings, cef_v8_propertyattribute_t attribute); /// diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index 0ae044585..f9e4e648f 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 "c9171db05e2e3ad611ea09d9457edaaa336bd4d6" +#define CEF_API_HASH_UNIVERSAL "a600703f7e1ff2c897b6ee0a77123fdfe25501f7" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "d65aa12068be307fd8e6642024cb67d82643d412" +#define CEF_API_HASH_PLATFORM "1af2a8ac18627ab06e6012ab57f0e3edb9bbd426" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "41e80b4bf45ce56cea0e87e825f9e6b58977a1da" +#define CEF_API_HASH_PLATFORM "7b7d434bce93b2176cd1bb9332f12929db1e85b9" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "1ed8d88d0d7d9d8a3b0296e9f84fea7752fdff2e" +#define CEF_API_HASH_PLATFORM "51042cfa82f6dd179acba9848cb7418b2c24b514" #endif #ifdef __cplusplus diff --git a/include/cef_v8.h b/include/cef_v8.h index 04b592d78..520444cb5 100644 --- a/include/cef_v8.h +++ b/include/cef_v8.h @@ -435,7 +435,6 @@ class CefV8ArrayBufferReleaseCallback : public virtual CefBaseRefCounted { /*--cef(source=library,no_debugct_check)--*/ class CefV8Value : public virtual CefBaseRefCounted { public: - typedef cef_v8_accesscontrol_t AccessControl; typedef cef_v8_propertyattribute_t PropertyAttribute; /// @@ -794,9 +793,7 @@ class CefV8Value : public virtual CefBaseRefCounted { /// will return true even though assignment failed. /// /*--cef(capi_name=set_value_byaccessor,optional_param=key)--*/ - virtual bool SetValue(const CefString& key, - AccessControl settings, - PropertyAttribute attribute) = 0; + virtual bool SetValue(const CefString& key, PropertyAttribute attribute) = 0; /// /// Read the keys for the object's values into the specified vector. Integer- diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 2f0dccbc8..ce4a2d1f4 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -1239,16 +1239,6 @@ typedef enum { CEF_TEXT_INPUT_MODE_MAX = CEF_TEXT_INPUT_MODE_SEARCH, } cef_text_input_mode_t; -/// -/// V8 access control values. -/// -typedef enum { - V8_ACCESS_CONTROL_DEFAULT = 0, - V8_ACCESS_CONTROL_ALL_CAN_READ = 1, - V8_ACCESS_CONTROL_ALL_CAN_WRITE = 1 << 1, - V8_ACCESS_CONTROL_PROHIBITS_OVERWRITING = 1 << 2 -} cef_v8_accesscontrol_t; - /// /// V8 property attribute values. /// @@ -3480,11 +3470,11 @@ typedef enum { CEF_CPAIT_PAYMENTS_OFFER_NOTIFICATION, CEF_CPAIT_PRICE_TRACKING, CEF_CPAIT_PWA_INSTALL, - CEF_CPAIT_QR_CODE_GENERATOR, - CEF_CPAIT_READER_MODE, + CEF_CPAIT_QR_CODE_GENERATOR_DEPRECATED, + CEF_CPAIT_READER_MODE_DEPRECATED, CEF_CPAIT_SAVE_AUTOFILL_ADDRESS, CEF_CPAIT_SAVE_CARD, - CEF_CPAIT_SEND_TAB_TO_SELF, + CEF_CPAIT_SEND_TAB_TO_SELF_DEPRECATED, CEF_CPAIT_SHARING_HUB, CEF_CPAIT_SIDE_SEARCH, CEF_CPAIT_SMS_REMOTE_FETCHER, @@ -3496,7 +3486,8 @@ typedef enum { CEF_CPAIT_MANDATORY_REAUTH, CEF_CPAIT_PRICE_INSIGHTS, CEF_CPAIT_PRICE_READ_ANYTHING, - CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRICE_READ_ANYTHING, + CEF_CPAIT_PRODUCT_SPECIFICATIONS, + CEF_CPAIT_MAX_VALUE = CEF_CPAIT_PRODUCT_SPECIFICATIONS, } cef_chrome_page_action_icon_type_t; /// @@ -3642,12 +3633,14 @@ typedef enum { CEF_PERMISSION_TYPE_MIDI_SYSEX = 1 << 13, CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS = 1 << 14, CEF_PERMISSION_TYPE_NOTIFICATIONS = 1 << 15, - CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 16, - CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 17, - CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 18, - CEF_PERMISSION_TYPE_VR_SESSION = 1 << 19, - CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 20, - CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 21, + CEF_PERMISSION_TYPE_KEYBOARD_LOCK = 1 << 16, + CEF_PERMISSION_TYPE_POINTER_LOCK = 1 << 17, + CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER = 1 << 18, + CEF_PERMISSION_TYPE_REGISTER_PROTOCOL_HANDLER = 1 << 19, + CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 20, + CEF_PERMISSION_TYPE_VR_SESSION = 1 << 21, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 22, + CEF_PERMISSION_TYPE_FILE_SYSTEM_ACCESS = 1 << 23, } cef_permission_request_types_t; /// diff --git a/libcef/browser/alloy/alloy_browser_context.cc b/libcef/browser/alloy/alloy_browser_context.cc index c6523c8d4..93b7c1967 100644 --- a/libcef/browser/alloy/alloy_browser_context.cc +++ b/libcef/browser/alloy/alloy_browser_context.cc @@ -432,6 +432,11 @@ AlloyBrowserContext::GetProfileCloudPolicyManager() { return nullptr; } +policy::CloudPolicyManager* AlloyBrowserContext::GetCloudPolicyManager() { + DCHECK(false); + return nullptr; +} + policy::ProfilePolicyConnector* AlloyBrowserContext::GetProfilePolicyConnector() { DCHECK(false); diff --git a/libcef/browser/alloy/alloy_browser_context.h b/libcef/browser/alloy/alloy_browser_context.h index 51903d61d..9885f27c1 100644 --- a/libcef/browser/alloy/alloy_browser_context.h +++ b/libcef/browser/alloy/alloy_browser_context.h @@ -94,6 +94,7 @@ class AlloyBrowserContext : public ChromeProfileAlloy, policy::SchemaRegistryService* GetPolicySchemaRegistryService() override; policy::UserCloudPolicyManager* GetUserCloudPolicyManager() override; policy::ProfileCloudPolicyManager* GetProfileCloudPolicyManager() override; + policy::CloudPolicyManager* GetCloudPolicyManager() override; policy::ProfilePolicyConnector* GetProfilePolicyConnector() override; const policy::ProfilePolicyConnector* GetProfilePolicyConnector() const override; diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index 017ab7600..38b02f87a 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -1365,26 +1365,26 @@ void AlloyBrowserHostImpl::OnRecentlyAudibleTimerFired() { } void AlloyBrowserHostImpl::AccessibilityEventReceived( - const content::AXEventNotificationDetails& content_event_bundle) { + const ui::AXUpdatesAndEvents& details) { // Only needed in windowless mode. if (IsWindowless()) { if (!web_contents() || !platform_delegate_) { return; } - platform_delegate_->AccessibilityEventReceived(content_event_bundle); + platform_delegate_->AccessibilityEventReceived(details); } } void AlloyBrowserHostImpl::AccessibilityLocationChangesReceived( - const std::vector& locData) { + const std::vector& details) { // Only needed in windowless mode. if (IsWindowless()) { if (!web_contents() || !platform_delegate_) { return; } - platform_delegate_->AccessibilityLocationChangesReceived(locData); + platform_delegate_->AccessibilityLocationChangesReceived(details); } } diff --git a/libcef/browser/alloy/alloy_browser_host_impl.h b/libcef/browser/alloy/alloy_browser_host_impl.h index 67fc4ce8d..1869a4272 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/libcef/browser/alloy/alloy_browser_host_impl.h @@ -303,10 +303,9 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, content::NavigationHandle* navigation_handle) override; void OnAudioStateChanged(bool audible) override; void AccessibilityEventReceived( - const content::AXEventNotificationDetails& content_event_bundle) override; + const ui::AXUpdatesAndEvents& details) override; void AccessibilityLocationChangesReceived( - const std::vector& locData) - override; + const std::vector& details) override; void WebContentsDestroyed() override; private: diff --git a/libcef/browser/alloy/alloy_browser_main.cc b/libcef/browser/alloy/alloy_browser_main.cc index 0e1a0aa74..05bf516fd 100644 --- a/libcef/browser/alloy/alloy_browser_main.cc +++ b/libcef/browser/alloy/alloy_browser_main.cc @@ -50,6 +50,7 @@ #include "ui/native_theme/native_theme.h" #if BUILDFLAG(IS_LINUX) +#include "components/password_manager/core/browser/password_manager_switches.h" #include "ui/base/ozone_buildflags.h" #if defined(USE_AURA) && BUILDFLAG(IS_OZONE_X11) #include "ui/events/devices/x11/touch_factory_x11.h" @@ -283,12 +284,13 @@ void AlloyBrowserMainParts::PostCreateMainMessageLoop() { std::unique_ptr config = std::make_unique(); // Forward to os_crypt the flag to use a specific password store. - config->store = command_line->GetSwitchValueASCII(switches::kPasswordStore); - // Forward the product name (defaults to "Chromium"). + config->store = + command_line->GetSwitchValueASCII(password_manager::kPasswordStore); + // Forward the product name config->product_name = l10n_util::GetStringUTF8(IDS_PRODUCT_NAME); // OSCrypt can be disabled in a special settings file. config->should_use_preference = - command_line->HasSwitch(switches::kEnableEncryptionSelection); + command_line->HasSwitch(password_manager::kEnableEncryptionSelection); base::PathService::Get(chrome::DIR_USER_DATA, &config->user_data_path); DCHECK(!config->user_data_path.empty()); OSCrypt::SetConfig(std::move(config)); diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.cc b/libcef/browser/alloy/chrome_browser_process_alloy.cc index bd2e66523..8e868611a 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.cc +++ b/libcef/browser/alloy/chrome_browser_process_alloy.cc @@ -445,6 +445,12 @@ os_crypt_async::OSCryptAsync* ChromeBrowserProcessAlloy::os_crypt_async() { return os_crypt_async_.get(); } +void ChromeBrowserProcessAlloy::set_additional_os_crypt_async_provider_for_test( + size_t precedence, + std::unique_ptr provider) { + DCHECK(false); +} + BuildState* ChromeBrowserProcessAlloy::GetBuildState() { DCHECK(false); return nullptr; diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.h b/libcef/browser/alloy/chrome_browser_process_alloy.h index f0ec6a91a..c24f3e4e5 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.h +++ b/libcef/browser/alloy/chrome_browser_process_alloy.h @@ -109,6 +109,9 @@ class ChromeBrowserProcessAlloy : public BrowserProcess { resource_coordinator::ResourceCoordinatorParts* resource_coordinator_parts() override; os_crypt_async::OSCryptAsync* os_crypt_async() override; + void set_additional_os_crypt_async_provider_for_test( + size_t precedence, + std::unique_ptr provider) override; BuildState* GetBuildState() override; SerialPolicyAllowedPorts* serial_policy_allowed_ports() override; HidSystemTrayIcon* hid_system_tray_icon() override; diff --git a/libcef/browser/browser_platform_delegate.cc b/libcef/browser/browser_platform_delegate.cc index 13262bd0b..69a035284 100644 --- a/libcef/browser/browser_platform_delegate.cc +++ b/libcef/browser/browser_platform_delegate.cc @@ -495,12 +495,12 @@ void CefBrowserPlatformDelegate::DragSourceSystemDragEnded() { } void CefBrowserPlatformDelegate::AccessibilityEventReceived( - const content::AXEventNotificationDetails& eventData) { + const ui::AXUpdatesAndEvents& details) { DCHECK(false); } void CefBrowserPlatformDelegate::AccessibilityLocationChangesReceived( - const std::vector& locData) { + const std::vector& details) { DCHECK(false); } diff --git a/libcef/browser/browser_platform_delegate.h b/libcef/browser/browser_platform_delegate.h index 3994c364c..ab3d48329 100644 --- a/libcef/browser/browser_platform_delegate.h +++ b/libcef/browser/browser_platform_delegate.h @@ -41,8 +41,6 @@ class WindowFeatures; } // namespace blink namespace content { -struct AXEventNotificationDetails; -struct AXLocationChangeNotificationDetails; struct DropData; struct NativeWebKeyboardEvent; class RenderViewHost; @@ -67,6 +65,11 @@ class Size; class Vector2d; } // namespace gfx +namespace ui { +struct AXLocationChanges; +struct AXUpdatesAndEvents; +} // namespace ui + namespace views { class Widget; } @@ -382,9 +385,9 @@ class CefBrowserPlatformDelegate { virtual void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op); virtual void DragSourceSystemDragEnded(); virtual void AccessibilityEventReceived( - const content::AXEventNotificationDetails& eventData); + const ui::AXUpdatesAndEvents& details); virtual void AccessibilityLocationChangesReceived( - const std::vector& locData); + const std::vector& details); virtual gfx::Point GetDialogPosition(const gfx::Size& size); virtual gfx::Size GetMaximumDialogSize(); diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index f496ee837..0a398b9ab 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -247,6 +247,7 @@ ProcessManagerDelegate* CefExtensionsBrowserClient::GetProcessManagerDelegate() mojo::PendingRemote CefExtensionsBrowserClient::GetControlledFrameEmbedderURLLoader( + const url::Origin& app_origin, int frame_tree_node_id, content::BrowserContext* browser_context) { return mojo::PendingRemote(); diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index f527d0e50..08aa9b5e4 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -85,6 +85,7 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { ProcessManagerDelegate* GetProcessManagerDelegate() const override; mojo::PendingRemote GetControlledFrameEmbedderURLLoader( + const url::Origin& app_origin, int frame_tree_node_id, content::BrowserContext* browser_context) override; std::unique_ptr CreateExtensionHostDelegate() override; diff --git a/libcef/browser/net/chrome_scheme_handler.cc b/libcef/browser/net/chrome_scheme_handler.cc index b902c6444..4ff70ac8a 100644 --- a/libcef/browser/net/chrome_scheme_handler.cc +++ b/libcef/browser/net/chrome_scheme_handler.cc @@ -466,16 +466,16 @@ class CefURLDataSource : public content::URLDataSource { bool handled = false; switch (host_id_) { case CHROME_EXTENSIONS_SUPPORT: - handled = OnExtensionsSupportUI(&mime_type_, &output_->data()); + handled = OnExtensionsSupportUI(&mime_type_, &output_->as_string()); break; case CHROME_LICENSE: - handled = OnLicenseUI(&mime_type_, &output_->data()); + handled = OnLicenseUI(&mime_type_, &output_->as_string()); break; case CHROME_VERSION: - handled = OnVersionUI(profile_, &mime_type_, &output_->data()); + handled = OnVersionUI(profile_, &mime_type_, &output_->as_string()); break; case CHROME_WEBUI_HOSTS: - handled = OnWebUIHostsUI(&mime_type_, &output_->data()); + handled = OnWebUIHostsUI(&mime_type_, &output_->as_string()); break; default: break; diff --git a/libcef/browser/net_service/cookie_helper.cc b/libcef/browser/net_service/cookie_helper.cc index ba29c5139..c043527cf 100644 --- a/libcef/browser/net_service/cookie_helper.cc +++ b/libcef/browser/net_service/cookie_helper.cc @@ -250,10 +250,12 @@ void LoadCookies(const CefBrowserContext::Getter& browser_context_getter, net::CookiePartitionKeyCollection partition_key_collection; if (request.trusted_params.has_value() && !request.trusted_params->isolation_info.IsEmpty()) { + const auto& isolation_info = request.trusted_params->isolation_info; partition_key_collection = net::CookiePartitionKeyCollection::FromOptional( net::CookiePartitionKey::FromNetworkIsolationKey( - request.trusted_params->isolation_info.network_isolation_key(), - request.site_for_cookies, net::SchemefulSite(request.url))); + isolation_info.network_isolation_key(), request.site_for_cookies, + net::SchemefulSite(request.url), + isolation_info.IsMainFrameRequest())); } CEF_POST_TASK( diff --git a/libcef/browser/net_service/response_filter_wrapper.cc b/libcef/browser/net_service/response_filter_wrapper.cc index 5f953dd37..6b81e9021 100644 --- a/libcef/browser/net_service/response_filter_wrapper.cc +++ b/libcef/browser/net_service/response_filter_wrapper.cc @@ -93,7 +93,7 @@ bool ResponseFilterWrapper::CreateOutputHandle( void ResponseFilterWrapper::OnSourceReadable(MojoResult, const mojo::HandleSignalsState&) { const void* buffer = nullptr; - uint32_t read_bytes = 0; + size_t read_bytes = 0; MojoResult result = source_handle_->BeginReadData(&buffer, &read_bytes, MOJO_READ_DATA_FLAG_NONE); if (result == MOJO_RESULT_SHOULD_WAIT) { diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 34e6b0450..a97684f0b 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -625,7 +625,7 @@ void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() { } void CefBrowserPlatformDelegateOsr::AccessibilityEventReceived( - const content::AXEventNotificationDetails& eventData) { + const ui::AXUpdatesAndEvents& details) { CefRefPtr handler = browser_->client()->GetRenderHandler(); if (handler.get()) { CefRefPtr acchandler = @@ -633,13 +633,13 @@ void CefBrowserPlatformDelegateOsr::AccessibilityEventReceived( if (acchandler.get()) { acchandler->OnAccessibilityTreeChange( - osr_accessibility_util::ParseAccessibilityEventData(eventData)); + osr_accessibility_util::ParseAccessibilityEventData(details)); } } } void CefBrowserPlatformDelegateOsr::AccessibilityLocationChangesReceived( - const std::vector& locData) { + const std::vector& details) { CefRefPtr handler = browser_->client()->GetRenderHandler(); if (handler.get()) { CefRefPtr acchandler = @@ -647,7 +647,7 @@ void CefBrowserPlatformDelegateOsr::AccessibilityLocationChangesReceived( if (acchandler.get()) { acchandler->OnAccessibilityLocationChange( - osr_accessibility_util::ParseAccessibilityLocationData(locData)); + osr_accessibility_util::ParseAccessibilityLocationData(details)); } } } diff --git a/libcef/browser/osr/browser_platform_delegate_osr.h b/libcef/browser/osr/browser_platform_delegate_osr.h index 1d0ff49b2..a39a2c265 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.h +++ b/libcef/browser/osr/browser_platform_delegate_osr.h @@ -88,10 +88,9 @@ class CefBrowserPlatformDelegateOsr void DragSourceEndedAt(int x, int y, cef_drag_operations_mask_t op) override; void DragSourceSystemDragEnded() override; void AccessibilityEventReceived( - const content::AXEventNotificationDetails& eventData) override; + const ui::AXUpdatesAndEvents& details) override; void AccessibilityLocationChangesReceived( - const std::vector& locData) - override; + const std::vector& details) override; // CefBrowserPlatformDelegateNative::WindowlessHandler methods: CefWindowHandle GetParentWindowHandle() const override; diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index 926cfdaf8..c9ee9f93d 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -12,11 +12,11 @@ #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/stringprintf.h" -#include "content/public/browser/ax_event_notification_details.h" #include "ui/accessibility/ax_enum_util.h" #include "ui/accessibility/ax_enums.mojom.h" #include "ui/accessibility/ax_text_utils.h" #include "ui/accessibility/ax_tree_update.h" +#include "ui/accessibility/ax_updates_and_events.h" #include "ui/gfx/geometry/transform.h" namespace { @@ -474,7 +474,7 @@ CefRefPtr ToCefValue(const ui::AXEvent& event) { // Convert AXEventNotificationDetails to CefDictionaryValue. CefRefPtr ToCefValue( - const content::AXEventNotificationDetails& eventData) { + const ui::AXUpdatesAndEvents& eventData) { CefRefPtr value = CefDictionaryValue::Create(); if (!eventData.ax_tree_id.ToString().empty()) { @@ -525,8 +525,7 @@ CefRefPtr ToCefValue(const ui::AXRelativeBounds& location) { } // Convert AXLocationChangeNotificationDetails to CefDictionaryValue. -CefRefPtr ToCefValue( - const content::AXLocationChangeNotificationDetails& locData) { +CefRefPtr ToCefValue(const ui::AXLocationChanges& locData) { CefRefPtr value = CefDictionaryValue::Create(); if (locData.id != -1) { @@ -558,16 +557,16 @@ CefRefPtr ToCefValue(const std::vector& vecData) { namespace osr_accessibility_util { CefRefPtr ParseAccessibilityEventData( - const content::AXEventNotificationDetails& data) { + const ui::AXUpdatesAndEvents& details) { CefRefPtr value = CefValue::Create(); - value->SetDictionary(ToCefValue(data)); + value->SetDictionary(ToCefValue(details)); return value; } CefRefPtr ParseAccessibilityLocationData( - const std::vector& data) { + const std::vector& details) { CefRefPtr value = CefValue::Create(); - value->SetList(ToCefValue(data)); + value->SetList(ToCefValue(details)); return value; } diff --git a/libcef/browser/osr/osr_accessibility_util.h b/libcef/browser/osr/osr_accessibility_util.h index 634fe2118..290cf510d 100644 --- a/libcef/browser/osr/osr_accessibility_util.h +++ b/libcef/browser/osr/osr_accessibility_util.h @@ -10,20 +10,20 @@ #include "cef/include/cef_values.h" -namespace content { -struct AXEventNotificationDetails; -struct AXLocationChangeNotificationDetails; -} // namespace content +namespace ui { +struct AXLocationChanges; +struct AXUpdatesAndEvents; +} // namespace ui namespace osr_accessibility_util { // Convert Accessibility Event and location updates to CefValue, which may be // consumed or serialized with CefJSONWrite. CefRefPtr ParseAccessibilityEventData( - const content::AXEventNotificationDetails& data); + const ui::AXUpdatesAndEvents& details); CefRefPtr ParseAccessibilityLocationData( - const std::vector& data); + const std::vector& details); } // namespace osr_accessibility_util diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 18a9aac51..5d17d6f2e 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -116,8 +116,11 @@ class CefDelegatedFrameHostClient : public content::DelegatedFrameHostClient { return view_->GetDeviceScaleFactor(); } - std::vector CollectSurfaceIdsForEviction() override { - return view_->render_widget_host()->CollectSurfaceIdsForEviction(); + viz::FrameEvictorClient::EvictIds CollectSurfaceIdsForEviction() override { + viz::FrameEvictorClient::EvictIds ids; + ids.embedded_ids = + view_->render_widget_host()->CollectSurfaceIdsForEviction(); + return ids; } void InvalidateLocalSurfaceIdOnEviction() override { @@ -958,7 +961,7 @@ CefRenderWidgetHostViewOSR::CreateSyntheticGestureTarget() { bool CefRenderWidgetHostViewOSR::TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewBase* target_view, + RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) { if (target_view == this) { *transformed_point = point; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 5c9acf614..a568e604f 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -188,7 +188,7 @@ class CefRenderWidgetHostViewOSR CreateSyntheticGestureTarget() override; bool TransformPointToCoordSpaceForView( const gfx::PointF& point, - RenderWidgetHostViewBase* target_view, + RenderWidgetHostViewInput* target_view, gfx::PointF* transformed_point) override; void DidNavigate() override; void SelectionChanged(const std::u16string& text, diff --git a/libcef/browser/permission_prompt.cc b/libcef/browser/permission_prompt.cc index c78230045..3122dc6dc 100644 --- a/libcef/browser/permission_prompt.cc +++ b/libcef/browser/permission_prompt.cc @@ -132,6 +132,7 @@ class CefPermissionPrompt : public permissions::PermissionPrompt { const override { return {}; } + bool IsAskPrompt() const override { return true; } private: // We don't expose AcceptThisTime() because it's a special case for @@ -216,6 +217,10 @@ cef_permission_request_types_t GetCefRequestType( return CEF_PERMISSION_TYPE_MULTIPLE_DOWNLOADS; case permissions::RequestType::kNotifications: return CEF_PERMISSION_TYPE_NOTIFICATIONS; + case permissions::RequestType::kKeyboardLock: + return CEF_PERMISSION_TYPE_KEYBOARD_LOCK; + case permissions::RequestType::kPointerLock: + return CEF_PERMISSION_TYPE_POINTER_LOCK; #if BUILDFLAG(IS_WIN) case permissions::RequestType::kProtectedMediaIdentifier: return CEF_PERMISSION_TYPE_PROTECTED_MEDIA_IDENTIFIER; diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index 2be0edeed..37db04079 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -258,6 +258,7 @@ std::unique_ptr CreatePrefService(Profile* profile, // Default profile preferences. AccessibilityUIMessageHandler::RegisterProfilePrefs(registry.get()); + content_settings::CookieSettings::RegisterProfilePrefs(registry.get()); extensions::ExtensionPrefs::RegisterProfilePrefs(registry.get()); HostContentSettingsMap::RegisterProfilePrefs(registry.get()); language::LanguagePrefs::RegisterProfilePrefs(registry.get()); diff --git a/libcef/browser/speech_recognition_manager_delegate.cc b/libcef/browser/speech_recognition_manager_delegate.cc index 48647b5ec..ca57a8e01 100644 --- a/libcef/browser/speech_recognition_manager_delegate.cc +++ b/libcef/browser/speech_recognition_manager_delegate.cc @@ -41,9 +41,6 @@ void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(int session_id) {} void CefSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {} -void CefSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete( - int session_id) {} - void CefSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {} void CefSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {} diff --git a/libcef/browser/speech_recognition_manager_delegate.h b/libcef/browser/speech_recognition_manager_delegate.h index 9b8969adf..ef5e7c258 100644 --- a/libcef/browser/speech_recognition_manager_delegate.h +++ b/libcef/browser/speech_recognition_manager_delegate.h @@ -29,7 +29,6 @@ class CefSpeechRecognitionManagerDelegate // SpeechRecognitionEventListener methods. void OnRecognitionStart(int session_id) override; void OnAudioStart(int session_id) override; - void OnEnvironmentEstimationComplete(int session_id) override; void OnSoundStart(int session_id) override; void OnSoundEnd(int session_id) override; void OnAudioEnd(int session_id) override; diff --git a/libcef/browser/views/view_view.h b/libcef/browser/views/view_view.h index ecd0d7826..166dd65b6 100644 --- a/libcef/browser/views/view_view.h +++ b/libcef/browser/views/view_view.h @@ -73,7 +73,8 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass { } // views::View methods: - gfx::Size CalculatePreferredSize() const override; + gfx::Size CalculatePreferredSize( + const views::SizeBounds& available_size) const override; gfx::Size GetMinimumSize() const override; gfx::Size GetMaximumSize() const override; int GetHeightForWidth(int w) const override; @@ -100,7 +101,8 @@ CEF_VIEW_VIEW_T class CefViewView : public ViewsViewClass { raw_ptr cef_delegate_; }; -CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::CalculatePreferredSize() const { +CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::CalculatePreferredSize( + const views::SizeBounds& available_size) const { gfx::Size result; if (cef_delegate()) { CefSize cef_size = cef_delegate()->GetPreferredSize(GetCefView()); @@ -109,7 +111,7 @@ CEF_VIEW_VIEW_T gfx::Size CEF_VIEW_VIEW_D::CalculatePreferredSize() const { } } if (result.IsEmpty()) { - result = ParentClass::CalculatePreferredSize(); + result = ParentClass::CalculatePreferredSize(available_size); } if (result.IsEmpty()) { // Some layouts like BoxLayout expect the preferred size to be non-empty. diff --git a/libcef/browser/views/window_view.cc b/libcef/browser/views/window_view.cc index db17c48c7..61012b097 100644 --- a/libcef/browser/views/window_view.cc +++ b/libcef/browser/views/window_view.cc @@ -253,7 +253,8 @@ class CaptionlessFrameView : public views::NonClientFrameView { LayoutSuperclass(this); } - gfx::Size CalculatePreferredSize() const override { + gfx::Size CalculatePreferredSize( + const views::SizeBounds& available_size) const override { return widget_->non_client_view() ->GetWindowBoundsForClientBounds( gfx::Rect(widget_->client_view()->GetPreferredSize())) @@ -529,7 +530,7 @@ void CefWindowView::CreateWidget(gfx::AcceleratedWidget parent_widget) { if (params.bounds.IsEmpty()) { // The window will be placed on the default screen with origin (0,0). - params.bounds = gfx::Rect(CalculatePreferredSize()); + params.bounds = gfx::Rect(CalculatePreferredSize({})); if (params.bounds.IsEmpty()) { // Choose a reasonable default size. params.bounds.set_size({800, 600}); @@ -756,7 +757,7 @@ bool CefWindowView::MaybeGetMinimumSize(gfx::Size* size) const { // Resize is disabled on Linux by returning the preferred size as the min/max // size. if (!CanResize()) { - *size = CalculatePreferredSize(); + *size = CalculatePreferredSize({}); return true; } #endif @@ -768,7 +769,7 @@ bool CefWindowView::MaybeGetMaximumSize(gfx::Size* size) const { // Resize is disabled on Linux by returning the preferred size as the min/max // size. if (!CanResize()) { - *size = CalculatePreferredSize(); + *size = CalculatePreferredSize({}); return true; } #endif diff --git a/libcef/common/chrome/chrome_main_delegate_cef.cc b/libcef/common/chrome/chrome_main_delegate_cef.cc index 5212cc35c..c969655b4 100644 --- a/libcef/common/chrome/chrome_main_delegate_cef.cc +++ b/libcef/common/chrome/chrome_main_delegate_cef.cc @@ -35,6 +35,8 @@ #include "cef/libcef/common/util_mac.h" #elif BUILDFLAG(IS_POSIX) #include "cef/libcef/common/util_linux.h" +#elif BUILDFLAG(IS_WIN) +#include "sandbox/policy/features.h" #endif namespace { @@ -322,6 +324,14 @@ std::optional ChromeMainDelegateCef::BasicStartupComplete() { disable_features.push_back(base::kEnableHangWatcher.name); } +#if BUILDFLAG(IS_WIN) && !defined(OFFICIAL_BUILD) + // Disable WinSboxNoFakeGdiInit which causes the renderer processes to crash + // with STATUS_DLL_INIT_FAILED. This is currently enabled via a field trial + // for non-Official builds. See https://crbug.com/326277735#comment23. + disable_features.push_back( + sandbox::policy::features::kWinSboxNoFakeGdiInit.name); +#endif + if (!disable_features.empty()) { DCHECK(!base::FeatureList::GetInstance()); std::string disable_features_str = diff --git a/libcef/common/net_service/net_service_util.cc b/libcef/common/net_service/net_service_util.cc index 5e96936fd..4b1c2b75c 100644 --- a/libcef/common/net_service/net_service_util.cc +++ b/libcef/common/net_service/net_service_util.cc @@ -260,7 +260,7 @@ bool MakeCefCookie(const GURL& url, path_string = pc.Path(); } std::string cookie_path = - net::CanonicalCookie::CanonPathWithString(url, path_string); + net::cookie_util::CanonPathWithString(url, path_string); base::Time creation_time = base::Time::Now(); base::Time cookie_expires = net::CanonicalCookie::ParseExpiration(pc, creation_time, creation_time); diff --git a/libcef/common/string_util.cc b/libcef/common/string_util.cc index 52cca4677..f3f4a0a59 100644 --- a/libcef/common/string_util.cc +++ b/libcef/common/string_util.cc @@ -23,13 +23,14 @@ void GetCefString(scoped_refptr source, if (source && source->size() > 0U) { #if defined(CEF_STRING_TYPE_UTF8) || defined(CEF_STRING_TYPE_UTF16) // Reference existing UTF8 or UTF16 data. - cef_string.FromString(source->front_as(), - source->size() / sizeof(CefString::char_type), - /*copy=*/false); + cef_string.FromString( + reinterpret_cast(source->data()), + source->size() / sizeof(CefString::char_type), + /*copy=*/false); #else // Must convert from UTF16. cef_string.FromString16( - source->front_as(), + reinterpret_cast(source->data()), source->size() / sizeof(std::u16string::value_type)); #endif } else { diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 533c90d5d..467cebd8d 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -215,7 +215,7 @@ v8::Local ExecuteV8ScriptAndReturnValue( // The Rethrow() message is unused due to kDoNotSanitize but it still needs // to be non-nullopt for exceptions to be re-thrown as expected. auto result = blink::V8ScriptRunner::CompileAndRunScript( - blink::ScriptState::From(context), script, + blink::ScriptState::From(context->GetIsolate(), context), script, blink::ExecuteScriptPolicy::kExecuteScriptWhenScriptsDisabled, blink::V8ScriptRunner::RethrowErrorsOption::Rethrow("")); diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index ff2b3fe31..1a88699f9 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -142,7 +142,7 @@ void CefRenderFrameObserver::DidCreateScriptContext( v8::Isolate* isolate = context->GetIsolate(); v8::HandleScope handle_scope(isolate); v8::Context::Scope scope(context); - v8::MicrotasksScope microtasks_scope(isolate, + v8::MicrotasksScope microtasks_scope(isolate, context->GetMicrotaskQueue(), v8::MicrotasksScope::kRunMicrotasks); CefRefPtr contextPtr(new CefV8ContextImpl(isolate, context)); diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 0cc0d3ebc..723e80519 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -579,6 +579,11 @@ void AccessorNameGetterCallbackImpl( return info.GetReturnValue().SetUndefined(); } +// See explanation in https://crbug.com/336325111. +void EmptySetterCallbackImpl(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo& info) {} + void AccessorNameSetterCallbackImpl( v8::Local property, v8::Local value, @@ -625,7 +630,7 @@ int PropertyToIndex(v8::Isolate* isolate, uint32_t index) { // T == v8::Local for named property handlers and // T == uint32_t for indexed property handlers template -void InterceptorGetterCallbackImpl( +v8::Intercepted InterceptorGetterCallbackImpl( T property, const v8::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); @@ -639,7 +644,7 @@ void InterceptorGetterCallbackImpl( interceptorPtr = tracker->GetInterceptor(); } if (!interceptorPtr.get()) { - return; + return v8::Intercepted::kNo; } CefRefPtr object = new CefV8ValueImpl(isolate, context, obj); @@ -654,15 +659,18 @@ void InterceptorGetterCallbackImpl( CefV8ValueImpl* retval_impl = static_cast(retval.get()); if (retval_impl && retval_impl->IsValid()) { info.GetReturnValue().Set(retval_impl->GetV8Value(true)); + return v8::Intercepted::kYes; } } + + return v8::Intercepted::kNo; } template -void InterceptorSetterCallbackImpl( +v8::Intercepted InterceptorSetterCallbackImpl( T property, v8::Local value, - const v8::PropertyCallbackInfo& info) { + const v8::PropertyCallbackInfo& info) { v8::Isolate* isolate = info.GetIsolate(); v8::Local context = isolate->GetCurrentContext(); v8::Handle obj = info.This(); @@ -674,7 +682,7 @@ void InterceptorSetterCallbackImpl( } if (!interceptorPtr.get()) { - return; + return v8::Intercepted::kNo; } CefRefPtr object = new CefV8ValueImpl(isolate, context, obj); CefRefPtr cefValue = new CefV8ValueImpl(isolate, context, value); @@ -685,6 +693,10 @@ void InterceptorSetterCallbackImpl( isolate->ThrowException( v8::Exception::Error(GetV8String(isolate, exception))); } + // Proceed with execution of the Accessor, if any. + // TODO(cef): Allow the CefV8Interceptor::Set callback to stop propegation by + // returning a bool value. + return v8::Intercepted::kNo; } // V8 extension registration. @@ -1337,8 +1349,11 @@ CefRefPtr CefV8Value::CreateObject( nullptr, v8::Local(), v8::PropertyHandlerFlags::kOnlyInterceptStrings)); - tmpl->SetIndexedPropertyHandler(InterceptorGetterCallbackImpl, - InterceptorSetterCallbackImpl); + // TODO(cef): Implement additional Query and Enumerator callbacks. + // See https://crbug.com/328490288#comment6. + tmpl->SetHandler(v8::IndexedPropertyHandlerConfiguration( + InterceptorGetterCallbackImpl, + InterceptorSetterCallbackImpl)); v8::MaybeLocal maybe_object = tmpl->NewInstance(context); if (!maybe_object.ToLocal(&obj)) { @@ -2124,7 +2139,6 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { } bool CefV8ValueImpl::SetValue(const CefString& key, - AccessControl settings, PropertyAttribute attribute) { CEF_V8_REQUIRE_OBJECT_RETURN(false); @@ -2155,15 +2169,14 @@ bool CefV8ValueImpl::SetValue(const CefString& key, v8::AccessorNameGetterCallback getter = AccessorNameGetterCallbackImpl; v8::AccessorNameSetterCallback setter = (attribute & V8_PROPERTY_ATTRIBUTE_READONLY) - ? nullptr + ? EmptySetterCallbackImpl : AccessorNameSetterCallbackImpl; v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); - v8::Maybe set = - obj->SetAccessor(context, GetV8String(isolate, key), getter, setter, obj, - static_cast(settings), - static_cast(attribute)); + v8::Maybe set = obj->SetNativeDataProperty( + context, GetV8String(isolate, key), getter, setter, obj, + static_cast(attribute)); return (!HasCaught(context, try_catch) && set.FromJust()); } diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 3ce7a79fd..c8a031a06 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -261,9 +261,7 @@ class CefV8ValueImpl : public CefV8Value { CefRefPtr value, PropertyAttribute attribute) override; bool SetValue(int index, CefRefPtr value) override; - bool SetValue(const CefString& key, - AccessControl settings, - PropertyAttribute attribute) override; + bool SetValue(const CefString& key, PropertyAttribute attribute) override; bool GetKeys(std::vector& keys) override; bool SetUserData(CefRefPtr user_data) override; CefRefPtr GetUserData() override; diff --git a/libcef_dll/cpptoc/v8value_cpptoc.cc b/libcef_dll/cpptoc/v8value_cpptoc.cc index ff4ef7b28..97f4dec0e 100644 --- a/libcef_dll/cpptoc/v8value_cpptoc.cc +++ b/libcef_dll/cpptoc/v8value_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=b1970fff502586e8d6d473b36ec3d8008fbf7c2a$ +// $hash=c59808566c2a9f2d204b6724bb5a905aeb0e7620$ // #include "libcef_dll/cpptoc/v8value_cpptoc.h" @@ -782,7 +782,6 @@ int CEF_CALLBACK v8value_set_value_byindex(struct _cef_v8value_t* self, int CEF_CALLBACK v8value_set_value_byaccessor(struct _cef_v8value_t* self, const cef_string_t* key, - cef_v8_accesscontrol_t settings, cef_v8_propertyattribute_t attribute) { // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING @@ -793,8 +792,8 @@ v8value_set_value_byaccessor(struct _cef_v8value_t* self, // Unverified params: key // Execute - bool _retval = CefV8ValueCppToC::Get(self)->SetValue(CefString(key), settings, - attribute); + bool _retval = + CefV8ValueCppToC::Get(self)->SetValue(CefString(key), attribute); // Return type: bool return _retval; diff --git a/libcef_dll/ctocpp/v8value_ctocpp.cc b/libcef_dll/ctocpp/v8value_ctocpp.cc index ac8ea227f..d073d0881 100644 --- a/libcef_dll/ctocpp/v8value_ctocpp.cc +++ b/libcef_dll/ctocpp/v8value_ctocpp.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3f2600b370dd8fbcb78b1728e458584bf24358f3$ +// $hash=856fc6c190d0e3376824564155618e468764e841$ // #include "libcef_dll/ctocpp/v8value_ctocpp.h" @@ -790,7 +790,6 @@ bool CefV8ValueCToCpp::SetValue(int index, CefRefPtr value) { NO_SANITIZE("cfi-icall") bool CefV8ValueCToCpp::SetValue(const CefString& key, - AccessControl settings, PropertyAttribute attribute) { cef_v8value_t* _struct = GetStruct(); if (CEF_MEMBER_MISSING(_struct, set_value_byaccessor)) { @@ -802,8 +801,8 @@ bool CefV8ValueCToCpp::SetValue(const CefString& key, // Unverified params: key // Execute - int _retval = _struct->set_value_byaccessor(_struct, key.GetStruct(), - settings, attribute); + int _retval = + _struct->set_value_byaccessor(_struct, key.GetStruct(), attribute); // Return type: bool return _retval ? true : false; diff --git a/libcef_dll/ctocpp/v8value_ctocpp.h b/libcef_dll/ctocpp/v8value_ctocpp.h index ab8305747..64a5dc1ad 100644 --- a/libcef_dll/ctocpp/v8value_ctocpp.h +++ b/libcef_dll/ctocpp/v8value_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=962bf2f9c8f5628a19f96d379edbf5e83313a858$ +// $hash=82c0a5d4a178b6731729c6fcc267388c19471cb0$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_V8VALUE_CTOCPP_H_ @@ -72,9 +72,7 @@ class CefV8ValueCToCpp CefRefPtr value, PropertyAttribute attribute) override; bool SetValue(int index, CefRefPtr value) override; - bool SetValue(const CefString& key, - AccessControl settings, - PropertyAttribute attribute) override; + bool SetValue(const CefString& key, PropertyAttribute attribute) override; bool GetKeys(std::vector& keys) override; bool SetUserData(CefRefPtr user_data) override; CefRefPtr GetUserData() override; diff --git a/patch/patch.cfg b/patch/patch.cfg index 063ae9154..8b55bba1b 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -164,9 +164,6 @@ patches = [ # Fix DiscardableSharedMemoryManager crash on shutdown with multi-threaded # message loop. # https://github.com/chromiumembedded/cef/issues/2798 - # - # win: Don't create console window for `--enable-logging=handle` - # https://chromium-review.googlesource.com/c/chromium/src/+/5381045 'name': 'content_main_654986', }, { @@ -811,5 +808,11 @@ patches = [ # Fix dangling raw_ptr errors. # https://github.com/chromiumembedded/cef/issues/3239 'name': 'raw_ptr_3239' + }, + { + # Fix DCHECK(initiator_policy_container_host) failure when running + # RequestContextTest.PopupNavDestroyParentAfterCreationRCGlobal. + # https://issues.chromium.org/issues/323753235#comment11 + 'name': 'content_initiator_policy_323753235' } ] diff --git a/patch/patches/base_allocator_instance_tracer_5542485.patch b/patch/patches/base_allocator_instance_tracer_5542485.patch index ac183a3fa..033602d6a 100644 --- a/patch/patches/base_allocator_instance_tracer_5542485.patch +++ b/patch/patches/base_allocator_instance_tracer_5542485.patch @@ -1,5 +1,5 @@ diff --git base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc -index 9f9c94cce4599..c6a25c4e2fa0c 100644 +index fecc2c35a3dcf..3745ac1d22a93 100644 --- base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc +++ base/allocator/partition_allocator/src/partition_alloc/pointers/instance_tracer.cc @@ -42,7 +42,7 @@ auto& GetStorage() { diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index d2df4f78b..dd6313940 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 3596432cb48b3..b7846f07f7b1d 100644 +index 1e5e33b0c156d..be0ccb28fc627 100644 --- base/command_line.cc +++ base/command_line.cc -@@ -384,11 +384,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string, +@@ -389,11 +389,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string, #if BUILDFLAG(ENABLE_COMMANDLINE_SEQUENCE_CHECKS) sequence_checker_.Check(); #endif diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 9c6f3a733..34f4845d6 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 5dc15da08eeff..4d98f417eabc3 100644 +index 575149b2f3246..74719a39cf4e4 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -41,6 +41,7 @@ import("//build/nocompile.gni") @@ -37,7 +37,7 @@ index 5dc15da08eeff..4d98f417eabc3 100644 "cfgmgr32.lib", "ntdll.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index 78f706cd6bef8..87eafa7a762f6 100644 +index 2c5dfc7870ce8..7ed12711289b4 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc @@ -8,6 +8,7 @@ @@ -88,7 +88,7 @@ index 1891e95fa387d..fc190dc39ae7d 100644 #else #include "base/hash/sha1_boringssl.h" diff --git base/rand_util.h base/rand_util.h -index a24e93122172e..5084668cb93a7 100644 +index 746166bf75df7..7192a939e4fec 100644 --- base/rand_util.h +++ base/rand_util.h @@ -17,8 +17,9 @@ @@ -102,7 +102,7 @@ index a24e93122172e..5084668cb93a7 100644 #include "third_party/boringssl/src/include/openssl/rand.h" #endif -@@ -125,7 +126,7 @@ class RandomBitGenerator { +@@ -123,7 +124,7 @@ class RandomBitGenerator { ~RandomBitGenerator() = default; }; @@ -112,10 +112,10 @@ index a24e93122172e..5084668cb93a7 100644 public: using result_type = uint64_t; diff --git base/rand_util_win.cc base/rand_util_win.cc -index 299e54300a09d..cdc43cc48dce6 100644 +index 6961e0ef8153c..8863f4ed65ee8 100644 --- base/rand_util_win.cc +++ base/rand_util_win.cc -@@ -15,8 +15,12 @@ +@@ -20,8 +20,12 @@ #include "base/check.h" #include "base/feature_list.h" @@ -128,7 +128,7 @@ index 299e54300a09d..cdc43cc48dce6 100644 // Prototype for ProcessPrng. // See: https://learn.microsoft.com/en-us/windows/win32/seccng/processprng -@@ -28,6 +32,7 @@ namespace base { +@@ -33,6 +37,7 @@ namespace base { namespace internal { @@ -136,7 +136,7 @@ index 299e54300a09d..cdc43cc48dce6 100644 namespace { // The BoringSSl helpers are duplicated in rand_util_fuchsia.cc and -@@ -49,6 +54,10 @@ bool UseBoringSSLForRandBytes() { +@@ -54,6 +59,10 @@ bool UseBoringSSLForRandBytes() { return g_use_boringssl.load(std::memory_order_relaxed); } @@ -147,15 +147,15 @@ index 299e54300a09d..cdc43cc48dce6 100644 } // namespace internal namespace { -@@ -66,6 +75,7 @@ decltype(&ProcessPrng) GetProcessPrng() { +@@ -71,6 +80,7 @@ decltype(&ProcessPrng) GetProcessPrng() { } - void RandBytes(span output, bool avoid_allocation) { + void RandBytesInternal(span output, bool avoid_allocation) { +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { // Ensure BoringSSL is initialized so it can use things like RDRAND. CRYPTO_library_init(); -@@ -73,6 +83,7 @@ void RandBytes(span output, bool avoid_allocation) { +@@ -78,6 +88,7 @@ void RandBytesInternal(span output, bool avoid_allocation) { (void)RAND_bytes(output.data(), output.size()); return; } @@ -188,10 +188,10 @@ index 1f91a938caf55..e7b383ebe3986 100644 return lhs.token_ == rhs.token_; #else diff --git base/win/sid.cc base/win/sid.cc -index ccaf03323d60f..3d7a7513d1843 100644 +index dd063382d97e1..6f8d6a0be91b1 100644 --- base/win/sid.cc +++ base/win/sid.cc -@@ -17,6 +17,7 @@ +@@ -22,6 +22,7 @@ #include #include "base/check.h" @@ -199,7 +199,7 @@ index ccaf03323d60f..3d7a7513d1843 100644 #include "base/no_destructor.h" #include "base/rand_util.h" #include "base/ranges/algorithm.h" -@@ -24,8 +25,12 @@ +@@ -29,8 +30,12 @@ #include "base/win/scoped_handle.h" #include "base/win/scoped_localalloc.h" #include "base/win/windows_version.h" @@ -212,7 +212,7 @@ index ccaf03323d60f..3d7a7513d1843 100644 namespace base::win { -@@ -126,6 +131,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { +@@ -131,6 +136,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { if (known_cap != known_capabilities->end()) { return FromKnownCapability(known_cap->second); } @@ -220,7 +220,7 @@ index ccaf03323d60f..3d7a7513d1843 100644 CRYPTO_library_init(); static_assert((SHA256_DIGEST_LENGTH / sizeof(DWORD)) == SECURITY_APP_PACKAGE_RID_COUNT); -@@ -138,6 +144,10 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { +@@ -143,6 +149,10 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { reinterpret_cast(&rids[2])); return FromSubAuthorities(SECURITY_APP_PACKAGE_AUTHORITY, std::size(rids), rids); diff --git a/patch/patches/base_test_4396276.patch b/patch/patches/base_test_4396276.patch index 82a428b84..adedd95e5 100644 --- a/patch/patches/base_test_4396276.patch +++ b/patch/patches/base_test_4396276.patch @@ -1,5 +1,5 @@ diff --git base/test/BUILD.gn base/test/BUILD.gn -index f50c2e942aed5..3a682be935a99 100644 +index feafabc3a60f9..f78cafeadb879 100644 --- base/test/BUILD.gn +++ base/test/BUILD.gn @@ -191,11 +191,6 @@ static_library("test_support") { @@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644 + #endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_ diff --git content/shell/BUILD.gn content/shell/BUILD.gn -index c469f1ee966ea..dec797956143f 100644 +index 2439098be9ada..7235455526000 100644 --- content/shell/BUILD.gn +++ content/shell/BUILD.gn -@@ -871,7 +871,6 @@ if (is_mac) { +@@ -908,7 +908,6 @@ if (is_mac) { # Specify a sensible install_name for static builds. The library is # dlopen()ed so this is not used to resolve the module. ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ] diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 6009cfc63..e664ba7fa 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,5 +1,5 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index 24f9538d6fd0d..0d57d47d70d38 100644 +index 68b69f564d911..0dba72515782f 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc @@ -209,7 +209,7 @@ BrowserTaskExecutor::OnUserInputStart() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 92a28bd22..3198e343f 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 d660380d5d9ca..c0480add36259 100644 +index 7822aeab4826a..fa72112bfee98 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1953,6 +1953,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin( +@@ -1988,6 +1988,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -20,10 +20,10 @@ index d660380d5d9ca..c0480add36259 100644 // 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 5b2a0a561b948..2f0c7f9941877 100644 +index e3dd21898b85e..2176fde9c1764 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -7944,10 +7944,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -7958,10 +7958,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index 5b2a0a561b948..2f0c7f9941877 100644 } return origin_and_debug_info; -@@ -8055,6 +8067,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -8069,6 +8081,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { DetermineInitiatorRelationship(initiator_rfh, frame_tree_node_->current_frame_host())); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index a5dcb3221..6a636d347 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 973d8bcbd2f1f..385c865f0159e 100644 +index 6efe967eb0a1c..429b3d8897085 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -137,6 +137,9 @@ declare_args() { +@@ -133,6 +133,9 @@ declare_args() { # The cache can lead to non-determinism: https://crbug.com/1486045 thin_lto_enable_cache = true @@ -12,7 +12,7 @@ index 973d8bcbd2f1f..385c865f0159e 100644 # Initialize all local variables with a pattern. This flag will fill # uninitialized floating-point types (and 32-bit pointers) with 0xFF and the # rest with 0xAA. This makes behavior of uninitialized memory bugs consistent, -@@ -2204,11 +2207,13 @@ config("export_dynamic") { +@@ -2179,11 +2182,13 @@ config("export_dynamic") { config("thin_archive") { # The macOS and iOS default linker ld64 does not support reading thin # archives. diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 893e10364..90314f32c 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 70c3930b4d357..f71d0ff5bd9a7 100644 +index c9ff70a8f2f71..d056d3758d564 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 70c3930b4d357..f71d0ff5bd9a7 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -2089,6 +2090,7 @@ static_library("browser") { +@@ -2091,6 +2092,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 70c3930b4d357..f71d0ff5bd9a7 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2759,6 +2761,10 @@ static_library("browser") { +@@ -2790,6 +2792,10 @@ static_library("browser") { ] } diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 6dbc77a5f..070fcf4c7 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index 0a7910bc42894..7dc340fb9c29e 100644 +index 21ab47267370b..eb9b383727995 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h -@@ -210,9 +210,9 @@ class BrowserProcess { +@@ -211,9 +211,9 @@ class BrowserProcess { virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0; @@ -14,10 +14,10 @@ index 0a7910bc42894..7dc340fb9c29e 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 19949bdecce72..cf4ed48fff5ce 100644 +index f77210dcc2ff5..1d0eaa8ff245d 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1097,18 +1097,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1113,18 +1113,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -38,10 +38,10 @@ index 19949bdecce72..cf4ed48fff5ce 100644 std::unique_ptr manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index e4cfec362d50c..2c17d0307601c 100644 +index 8091cc691f093..9f16156c1f2cb 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h -@@ -191,8 +191,8 @@ class BrowserProcessImpl : public BrowserProcess, +@@ -194,8 +194,8 @@ class BrowserProcessImpl : public BrowserProcess, void SetApplicationLocale(const std::string& actual_locale) override; DownloadStatusUpdater* download_status_updater() override; DownloadRequestLimiter* download_request_limiter() override; diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 6846e5d16..d5824dbf9 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644 return false; } diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc -index 8fbc9ab537c6d..e87d068678767 100644 +index e857e2363da9e..3dd4db8ae4267 100644 --- chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc @@ -37,6 +37,7 @@ @@ -38,7 +38,7 @@ index 8fbc9ab537c6d..e87d068678767 100644 } // Create WebContents with devtools. -@@ -1908,12 +1916,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { +@@ -1916,12 +1924,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { Browser::CreationStatus::kOk) { return; } @@ -74,7 +74,7 @@ index 8fbc9ab537c6d..e87d068678767 100644 } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index d6c14b3d70a75..577586f0dd8b4 100644 +index 6ca4ed42a601d..feec87943fee4 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni") @@ -85,7 +85,7 @@ index d6c14b3d70a75..577586f0dd8b4 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -401,6 +402,10 @@ static_library("ui") { +@@ -403,6 +404,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -96,7 +96,7 @@ index d6c14b3d70a75..577586f0dd8b4 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 -@@ -426,6 +431,7 @@ static_library("ui") { +@@ -429,6 +434,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -104,7 +104,7 @@ index d6c14b3d70a75..577586f0dd8b4 100644 "//chrome:resources", "//chrome:strings", "//chrome/app:chrome_dll_resources", -@@ -2979,6 +2985,8 @@ static_library("ui") { +@@ -3000,6 +3006,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", @@ -113,7 +113,7 @@ index d6c14b3d70a75..577586f0dd8b4 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", -@@ -5062,8 +5070,6 @@ static_library("ui") { +@@ -5113,8 +5121,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", @@ -122,7 +122,7 @@ index d6c14b3d70a75..577586f0dd8b4 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", -@@ -6895,6 +6901,7 @@ static_library("ui") { +@@ -6965,6 +6971,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -131,10 +131,10 @@ index d6c14b3d70a75..577586f0dd8b4 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index cf9de7df6299d..3f93ff73ab038 100644 +index a1d50c2e47056..5519a1c7714d5 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -267,6 +267,25 @@ +@@ -269,6 +269,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -160,7 +160,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -476,6 +495,10 @@ Browser::Browser(const CreateParams& params) +@@ -515,6 +534,10 @@ Browser::Browser(const CreateParams& params) type_(params.type), profile_(params.profile), window_(nullptr), @@ -171,7 +171,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 tab_strip_model_delegate_( std::make_unique(this)), tab_strip_model_(std::make_unique( -@@ -678,6 +701,12 @@ Browser::~Browser() { +@@ -722,6 +745,12 @@ Browser::~Browser() { // away so they don't try and call back to us. if (select_file_dialog_.get()) select_file_dialog_->ListenerDestroyed(); @@ -184,7 +184,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1109,6 +1138,8 @@ void Browser::WindowFullscreenStateChanged() { +@@ -1170,6 +1199,8 @@ void Browser::WindowFullscreenStateChanged() { ->WindowFullscreenStateChanged(); command_controller_->FullscreenStateChanged(); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); @@ -193,7 +193,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } void Browser::FullscreenTopUIStateChanged() { -@@ -1450,6 +1481,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1511,6 +1542,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -208,7 +208,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1457,8 +1496,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1518,8 +1557,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -229,7 +229,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } bool Browser::TabsNeedBeforeUnloadFired() const { -@@ -1660,6 +1709,16 @@ WebContents* Browser::OpenURLFromTab( +@@ -1695,6 +1744,16 @@ WebContents* Browser::OpenURLFromTab( } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -246,7 +246,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1822,6 +1881,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1857,6 +1916,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -255,7 +255,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1850,6 +1911,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1885,6 +1946,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -264,7 +264,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 if (!GetStatusBubble()) return; -@@ -1857,6 +1920,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1892,6 +1955,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -279,10 +279,10 @@ index cf9de7df6299d..3f93ff73ab038 100644 + return false; +} + - void Browser::ContentsMouseEvent(WebContents* source, - bool motion, - bool exited) { -@@ -1881,6 +1955,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { + void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) { + const ui::EventType type = event.type(); + const bool exited = type == ui::ET_MOUSE_EXITED; +@@ -1919,6 +1993,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -302,7 +302,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1980,12 +2067,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -2018,12 +2105,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -327,7 +327,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 // Don't show the page hung dialog when a HTML popup hangs because // the dialog will take the focus and immediately close the popup. RenderWidgetHostView* view = render_widget_host->GetView(); -@@ -1998,6 +2097,13 @@ void Browser::RendererUnresponsive( +@@ -2036,6 +2135,13 @@ void Browser::RendererUnresponsive( void Browser::RendererResponsive( WebContents* source, content::RenderWidgetHost* render_widget_host) { @@ -341,7 +341,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 RenderWidgetHostView* view = render_widget_host->GetView(); if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) { TabDialogs::FromWebContents(source)->HideHungRendererDialog( -@@ -2051,6 +2157,11 @@ void Browser::DraggableRegionsChanged( +@@ -2089,6 +2195,11 @@ void Browser::DraggableRegionsChanged( if (app_controller_) { app_controller_->DraggableRegionsChanged(regions, contents); } @@ -353,7 +353,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } void Browser::DidFinishNavigation( -@@ -2132,11 +2243,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -2169,11 +2280,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -369,7 +369,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2336,6 +2451,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2373,6 +2488,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -385,7 +385,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2880,9 +3004,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2917,9 +3041,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -398,7 +398,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } // We hide the status bar for web apps windows as this matches native -@@ -2890,6 +3016,12 @@ StatusBubble* Browser::GetStatusBubble() { +@@ -2927,6 +3053,12 @@ StatusBubble* Browser::GetStatusBubble() { // mode, as the minimal browser UI includes the status bar. if (web_app::AppBrowserController::IsWebApp(this) && !app_controller()->HasMinimalUiButtons()) { @@ -411,7 +411,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 return nullptr; } -@@ -3026,6 +3158,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -3076,6 +3208,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); web_contents_collection_.StopObserving(web_contents); } @@ -420,7 +420,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 } void Browser::TabDetachedAtImpl(content::WebContents* contents, -@@ -3180,6 +3314,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( +@@ -3230,6 +3364,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool check_can_support) const { @@ -436,7 +436,7 @@ index cf9de7df6299d..3f93ff73ab038 100644 case TYPE_NORMAL: return NormalBrowserSupportsWindowFeature(feature, check_can_support); diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index 6a3a4af355be9..b04d27dab01ed 100644 +index af562dfe07909..c81b2b05a85df 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -22,6 +22,7 @@ @@ -447,7 +447,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 #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" -@@ -49,6 +50,10 @@ +@@ -50,6 +51,10 @@ #include "ui/gfx/geometry/rect.h" #include "ui/shell_dialogs/select_file_dialog.h" @@ -458,7 +458,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 #if BUILDFLAG(IS_ANDROID) #error This file should only be included on desktop. #endif -@@ -365,6 +370,15 @@ class Browser : public TabStripModelObserver, +@@ -367,6 +372,15 @@ class Browser : public TabStripModelObserver, // Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE. std::optional pip_options; @@ -474,7 +474,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 private: friend class Browser; friend class WindowSizerChromeOSTest; -@@ -446,6 +460,13 @@ class Browser : public TabStripModelObserver, +@@ -448,6 +462,13 @@ class Browser : public TabStripModelObserver, update_ui_immediately_for_testing_ = true; } @@ -488,7 +488,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 // Accessors //////////////////////////////////////////////////////////////// const CreateParams& create_params() const { return create_params_; } -@@ -536,6 +557,12 @@ class Browser : public TabStripModelObserver, +@@ -541,6 +562,12 @@ class Browser : public TabStripModelObserver, base::WeakPtr AsWeakPtr(); base::WeakPtr AsWeakPtr() const; @@ -501,7 +501,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -947,11 +974,19 @@ class Browser : public TabStripModelObserver, +@@ -947,10 +974,18 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -511,8 +511,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 + int32_t line_no, + const std::u16string& source_id) override; void ContentsMouseEvent(content::WebContents* source, - bool motion, - bool exited) override; + const ui::Event& event) override; void ContentsZoomChange(bool zoom_in) override; bool TakeFocus(content::WebContents* source, bool reverse) override; + void CanDownload(const GURL& url, @@ -521,7 +520,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1289,6 +1324,10 @@ class Browser : public TabStripModelObserver, +@@ -1292,6 +1327,10 @@ class Browser : public TabStripModelObserver, // This Browser's window. raw_ptr window_; @@ -532,7 +531,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 std::unique_ptr const tab_strip_model_delegate_; std::unique_ptr const tab_strip_model_; -@@ -1355,6 +1394,8 @@ class Browser : public TabStripModelObserver, +@@ -1358,6 +1397,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -542,7 +541,7 @@ index 6a3a4af355be9..b04d27dab01ed 100644 UnloadController unload_controller_; diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index cefb9f62051fe..6e19377f78e4f 100644 +index 1bf5227d7c252..250012b2eb5fb 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc @@ -313,6 +313,10 @@ std::pair GetBrowserAndTabForDisposition( diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index a5532f31c..970effe91 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index 9356bf044a318..883c322eef5bb 100644 +index a344dc5c74ce3..548e6218b0e82 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -9,6 +9,7 @@ @@ -21,7 +21,7 @@ index 9356bf044a318..883c322eef5bb 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/trace_event/trace_event.h" #include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h" -@@ -58,7 +63,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() +@@ -60,7 +65,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() #endif DependsOn(OneTimePermissionsTrackerFactory::GetInstance()); #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -35,8 +35,8 @@ index 9356bf044a318..883c322eef5bb 100644 #endif // Used by way of ShouldRestoreOldSessionCookies(). #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -112,6 +123,9 @@ scoped_refptr - std::move(allowlist_provider)); +@@ -113,6 +124,9 @@ scoped_refptr + std::move(allowlist_provider)); #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) @@ -45,7 +45,7 @@ index 9356bf044a318..883c322eef5bb 100644 // These must be registered before before the HostSettings are passed over to // the IOThread. Simplest to do this on construction. settings_map->RegisterProvider( -@@ -124,6 +138,9 @@ scoped_refptr +@@ -125,6 +139,9 @@ scoped_refptr // the case where profile->IsOffTheRecord() is true? And what is the // interaction with profile->IsGuestSession()? false)); diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 89c725e74..45cc94aa2 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 72a2b681d5b98..8f7368add83fb 100644 +index b62e659a27d00..e76cc7c0a7813 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -358,6 +358,18 @@ base::OnceCallback* GetMenuShownCallback() { +@@ -357,6 +357,18 @@ base::OnceCallback* GetMenuShownCallback() { return callback.get(); } @@ -21,7 +21,7 @@ index 72a2b681d5b98..8f7368add83fb 100644 enum class UmaEnumIdLookupType { GeneralEnumId, ContextSpecificEnumId, -@@ -615,6 +627,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { +@@ -618,6 +630,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) return 1; @@ -32,7 +32,7 @@ index 72a2b681d5b98..8f7368add83fb 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -865,6 +881,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -868,6 +884,14 @@ RenderViewContextMenu::RenderViewContextMenu( pdf_ocr_submenu_model_ = std::make_unique(this); #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) @@ -47,8 +47,8 @@ index 72a2b681d5b98..8f7368add83fb 100644 observers_.AddObserver(&autofill_context_menu_manager_); } -@@ -1339,6 +1363,12 @@ void RenderViewContextMenu::InitMenu() { - autofill::PopupHidingReason::kContextMenuOpened); +@@ -1343,6 +1367,12 @@ void RenderViewContextMenu::InitMenu() { + autofill::SuggestionHidingReason::kContextMenuOpened); } } + @@ -60,7 +60,7 @@ index 72a2b681d5b98..8f7368add83fb 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3572,6 +3602,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3564,6 +3594,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -88,7 +88,7 @@ index 72a2b681d5b98..8f7368add83fb 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 548004a597fa0..f63405fa8badc 100644 +index 6c59d4ccaf3d5..21c959aea9c21 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -155,7 +155,21 @@ class RenderViewContextMenu @@ -113,7 +113,7 @@ index 548004a597fa0..f63405fa8badc 100644 Profile* GetProfile() const; // This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to -@@ -465,6 +479,9 @@ class RenderViewContextMenu +@@ -464,6 +478,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; diff --git a/patch/patches/chrome_browser_devtools_osr.patch b/patch/patches/chrome_browser_devtools_osr.patch index 9f1760902..d66c108c2 100644 --- a/patch/patches/chrome_browser_devtools_osr.patch +++ b/patch/patches/chrome_browser_devtools_osr.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc -index 19c2d39b6aa73..099dcb71a6373 100644 +index ee871fcaed0fd..96480a8bd5db7 100644 --- chrome/browser/devtools/chrome_devtools_manager_delegate.cc +++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc @@ -13,6 +13,7 @@ @@ -10,7 +10,7 @@ index 19c2d39b6aa73..099dcb71a6373 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/devtools/chrome_devtools_session.h" #include "chrome/browser/devtools/device/android_device_manager.h" -@@ -66,6 +67,10 @@ +@@ -67,6 +68,10 @@ #include "ash/constants/ash_switches.h" #endif @@ -21,7 +21,7 @@ index 19c2d39b6aa73..099dcb71a6373 100644 using content::DevToolsAgentHost; const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app"; -@@ -246,6 +251,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( +@@ -247,6 +252,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( return DevToolsAgentHost::kTypePage; } diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index b70711f3f..2421bed62 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -344,10 +344,10 @@ index bf99047fa53cf..0efdb76233331 100644 std::make_unique(ns_window), std::move(receiver)); diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc -index cb1a0d203b448..307158e8117fe 100644 +index e5d4311ba152c..16c86e544fe3a 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -253,6 +253,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -254,6 +254,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 204a3ad57..f592e7ee6 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -12,36 +12,32 @@ index b169371e4d42f..509e4bda85b47 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 630ede12ce3f8..b7bc765e3eb99 100644 +index a2ca2f52148fd..7689d43ec9e0b 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc -@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget, - if (widget->HasCapture()) - return; - +@@ -101,9 +101,18 @@ class WidgetModalDialogHostObserverViews : public views::WidgetObserver, + gfx::Rect GetModalDialogBounds(views::Widget* widget, + web_modal::ModalDialogHost* dialog_host, + const gfx::Size& size) { +- views::Widget* const host_widget = +- views::Widget::GetWidgetForNativeView(dialog_host->GetHostView()); +- CHECK(host_widget); + // |host_view| will be nullptr with CEF windowless rendering. + auto host_view = dialog_host->GetHostView(); - views::Widget* host_widget = -- views::Widget::GetWidgetForNativeView(dialog_host->GetHostView()); ++ views::Widget* host_widget = + host_view ? views::Widget::GetWidgetForNativeView(host_view) : nullptr; ++ ++ // If the host view is not backed by a Views::Widget, just update the widget ++ // size. This can happen on MacViews under the Cocoa browser where the window ++ // modal dialogs are displayed as sheets, and their position is managed by a ++ // ConstrainedWindowSheetController instance. ++ if (!host_widget) { ++ return gfx::Rect(dialog_host->GetDialogPosition(size), size); ++ } - // If the host view is not backed by a Views::Widget, just update the widget - // size. This can happen on MacViews under the Cocoa browser where the window - // modal dialogs are displayed as sheets, and their position is managed by a - // ConstrainedWindowSheetController instance. - if (!host_widget) { -+#if BUILDFLAG(IS_MAC) - widget->SetSize(size); -+#elif BUILDFLAG(IS_POSIX) -+ // Set the bounds here instead of relying on the default behavior of -+ // DesktopWindowTreeHostPlatform::CenterWindow which incorrectly centers -+ // the window on the screen. -+ widget->SetBounds(gfx::Rect(dialog_host->GetDialogPosition(size), size)); -+#endif - return; - } - -@@ -123,44 +132,22 @@ void UpdateModalDialogPosition(views::Widget* widget, + gfx::Point position = dialog_host->GetDialogPosition(size); + // Align the first row of pixels inside the border. This is the apparent top +@@ -111,43 +120,22 @@ gfx::Rect GetModalDialogBounds(views::Widget* widget, position.set_y(position.y() - widget->non_client_view()->frame_view()->GetInsets().top()); @@ -93,23 +89,40 @@ index 630ede12ce3f8..b7bc765e3eb99 100644 + display_rect.AdjustToFit(work_area); + position = display_rect.origin(); } - -- widget->SetBounds(dialog_bounds); -+ widget->SetBounds(gfx::Rect(position, size)); +- return dialog_bounds; ++ ++ return gfx::Rect(position, size); } - } // namespace -@@ -242,7 +229,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog, + void UpdateModalDialogPosition(views::Widget* widget, +@@ -158,15 +146,24 @@ void UpdateModalDialogPosition(views::Widget* widget, + return; + } - views::Widget* widget = views::DialogDelegate::CreateDialogWidget( - dialog, nullptr, -- manager->delegate()->GetWebContentsModalDialogHost()->GetHostView()); -+ manager->delegate()->GetWebContentsModalDialogHost()->GetHostView(), -+ manager->delegate()->GetWebContentsModalDialogHost()->GetAcceleratedWidget()); - widget->SetNativeWindowProperty( - views::kWidgetIdentifierKey, - const_cast(kConstrainedWindowWidgetIdentifier)); -@@ -264,8 +252,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, +- views::Widget* const host_widget = +- views::Widget::GetWidgetForNativeView(dialog_host->GetHostView()); ++ // |host_view| will be nullptr with CEF windowless rendering. ++ auto host_view = dialog_host->GetHostView(); ++ views::Widget* host_widget = ++ host_view ? views::Widget::GetWidgetForNativeView(host_view) : nullptr; + + // If the host view is not backed by a Views::Widget, just update the widget + // size. This can happen on MacViews under the Cocoa browser where the window + // modal dialogs are displayed as sheets, and their position is managed by a + // ConstrainedWindowSheetController instance. + if (!host_widget) { ++#if BUILDFLAG(IS_MAC) + widget->SetSize(size); ++#elif BUILDFLAG(IS_POSIX) ++ // Set the bounds here instead of relying on the default behavior of ++ // DesktopWindowTreeHostPlatform::CenterWindow which incorrectly centers ++ // the window on the screen. ++ widget->SetBounds(gfx::Rect(dialog_host->GetDialogPosition(size), size)); ++#endif + return; + } + +@@ -282,8 +279,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, gfx::NativeView parent_view = parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; @@ -124,7 +137,7 @@ index 630ede12ce3f8..b7bc765e3eb99 100644 widget->SetNativeWindowProperty( views::kWidgetIdentifierKey, const_cast(kConstrainedWindowWidgetIdentifier)); -@@ -281,8 +274,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, +@@ -299,8 +301,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, if (!requires_positioning) return widget; @@ -134,6 +147,25 @@ index 630ede12ce3f8..b7bc765e3eb99 100644 if (host) { DCHECK_EQ(parent_view, host->GetHostView()); ModalDialogHostObserver* dialog_host_observer = +@@ -313,10 +314,17 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog, + + views::Widget* ShowBrowserModal(std::unique_ptr dialog_model, + gfx::NativeWindow parent) { ++ gfx::NativeView parent_view = ++ parent ? CurrentClient()->GetDialogHostView(parent) : nullptr; ++ // Use with CEF windowless rendering. ++ gfx::AcceleratedWidget parent_widget = parent ? ++ CurrentClient()->GetModalDialogHost(parent)->GetAcceleratedWidget() : ++ gfx::kNullAcceleratedWidget; ++ + // TODO(crbug.com/41493925): Remove will_use_custom_frame once native frame + // dialogs support autosize. + bool will_use_custom_frame = views::DialogDelegate::CanSupportCustomFrame( +- parent ? CurrentClient()->GetDialogHostView(parent) : nullptr); ++ parent_view, parent_widget); + auto dialog = views::BubbleDialogModelHost::CreateModal( + std::move(dialog_model), ui::MODAL_TYPE_WINDOW, will_use_custom_frame); + dialog->SetOwnedByWidget(true); diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc index 2b495a8ab092c..01a28aca853d0 100644 --- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc @@ -178,10 +210,10 @@ index 51ed6bcf6b540..c6e1161140655 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 1361ac9b3d57b..5a41f86862561 100644 +index 941699c28e286..3f6569b116e64 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc -@@ -84,10 +84,12 @@ DialogDelegate::DialogDelegate() { +@@ -85,10 +85,12 @@ DialogDelegate::DialogDelegate() { // static Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, gfx::NativeWindow context, @@ -196,7 +228,7 @@ index 1361ac9b3d57b..5a41f86862561 100644 widget->Init(std::move(params)); return widget; } -@@ -96,17 +98,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, +@@ -97,17 +99,19 @@ Widget* DialogDelegate::CreateDialogWidget(WidgetDelegate* delegate, Widget* DialogDelegate::CreateDialogWidget( std::unique_ptr delegate, gfx::NativeWindow context, @@ -220,7 +252,7 @@ index 1361ac9b3d57b..5a41f86862561 100644 #else return true; #endif -@@ -117,14 +121,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -118,14 +122,15 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, @@ -238,7 +270,7 @@ index 1361ac9b3d57b..5a41f86862561 100644 if (!dialog || dialog->use_custom_frame()) { params.opacity = Widget::InitParams::WindowOpacity::kTranslucent; -@@ -137,6 +142,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( +@@ -138,6 +143,7 @@ Widget::InitParams DialogDelegate::GetDialogWidgetInitParams( } params.context = context; params.parent = parent; @@ -247,7 +279,7 @@ index 1361ac9b3d57b..5a41f86862561 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 de642a3bc1101..bdd8664f481a9 100644 +index 3cb2a5e22972d..1a716178e3f51 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h @@ -97,13 +97,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { diff --git a/patch/patches/chrome_browser_download.patch b/patch/patches/chrome_browser_download.patch index a1c7b36b3..ec62b2137 100644 --- a/patch/patches/chrome_browser_download.patch +++ b/patch/patches/chrome_browser_download.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc -index 447e7d0d5dc6d..7bba632f1331c 100644 +index bc10e7566bd71..3b513b0b00b34 100644 --- chrome/browser/download/chrome_download_manager_delegate.cc +++ chrome/browser/download/chrome_download_manager_delegate.cc @@ -146,6 +146,10 @@ @@ -85,7 +85,7 @@ index e2cf12d2c8fee..376818e28798c 100644 }; diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 773f72da82f90..0043dd530934d 100644 +index 4ffbb8f5630d4..da0d2975b13d5 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -23,6 +23,7 @@ @@ -107,7 +107,7 @@ index 773f72da82f90..0043dd530934d 100644 using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -355,6 +360,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( +@@ -351,6 +356,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( // static DownloadPrefs* DownloadPrefs::FromBrowserContext( content::BrowserContext* context) { diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 04949646e..70faa615f 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -34,7 +34,7 @@ index 4007e26f780c3..5f92d74018f9e 100644 } diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc -index 1eab73b209fea..fca0a2318202e 100644 +index 3d0843c7d1a60..b07956d25797d 100644 --- chrome/browser/extensions/api/tabs/tabs_api.cc +++ chrome/browser/extensions/api/tabs/tabs_api.cc @@ -1550,7 +1550,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { @@ -153,7 +153,7 @@ index 46154f4501a36..81adec54cee06 100644 // Prerendering tab is not visible and it cannot be in `TabStripModel`, if // the tab id exists as a prerendering tab, and the API will returns diff --git chrome/browser/ui/tab_helpers.h chrome/browser/ui/tab_helpers.h -index 2f769363f8519..228c20926634b 100644 +index 4ca4ecd147267..dc8a8d004a1d6 100644 --- chrome/browser/ui/tab_helpers.h +++ chrome/browser/ui/tab_helpers.h @@ -6,6 +6,7 @@ @@ -175,7 +175,7 @@ index 2f769363f8519..228c20926634b 100644 // A "tab contents" is a WebContents that is used as a tab in a browser window // (or the equivalent on Android). The TabHelpers class allows specific classes // to attach the set of tab helpers that is used for tab contents. -@@ -75,6 +80,10 @@ class TabHelpers { +@@ -74,6 +79,10 @@ class TabHelpers { // Link Preview shows a preview of a page, then promote it as a new tab. friend class PreviewTab; @@ -187,10 +187,10 @@ index 2f769363f8519..228c20926634b 100644 // ones that need to call AttachTabHelpers; if you think you do, re-read the // design document linked above, especially the section "Reusing tab helpers". diff --git chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc -index a76c331ec5344..ffe3cbe7ce37c 100644 +index b667ccfe87ccf..65283ef921458 100644 --- chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc +++ chrome/browser/ui/views/download/bubble/download_toolbar_button_view.cc -@@ -850,6 +850,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() { +@@ -841,6 +841,10 @@ void DownloadToolbarButtonView::ShowPendingDownloadStartedAnimation() { if (!gfx::Animation::ShouldRenderRichAnimation()) { return; } diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index b07228b89..2b5074b2d 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -49,7 +49,7 @@ index d63a055919747..49adba291f1bb 100644 base::FeatureList::IsEnabled( features::kPeriodicSyncPermissionForDefaultSearchEngine) && diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc -index 7f14b48feedf6..9679552640788 100644 +index 6d07868a1100b..ac8fc5e70f045 100644 --- chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc @@ -14,6 +14,7 @@ @@ -60,7 +60,7 @@ index 7f14b48feedf6..9679552640788 100644 #include "chrome/browser/ash/shimless_rma/chrome_shimless_rma_delegate.h" #include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h" #include "chrome/browser/browser_process.h" -@@ -190,6 +191,11 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( +@@ -198,6 +199,11 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( double ChromePermissionsClient::GetSiteEngagementScore( content::BrowserContext* browser_context, const GURL& origin) { @@ -72,7 +72,7 @@ index 7f14b48feedf6..9679552640788 100644 return site_engagement::SiteEngagementService::Get( Profile::FromBrowserContext(browser_context)) ->GetScore(origin); -@@ -360,8 +366,14 @@ ChromePermissionsClient::CreatePermissionUiSelectors( +@@ -368,8 +374,14 @@ ChromePermissionsClient::CreatePermissionUiSelectors( std::make_unique()); selectors.emplace_back(std::make_unique( Profile::FromBrowserContext(browser_context))); @@ -88,7 +88,7 @@ index 7f14b48feedf6..9679552640788 100644 } diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc -index 1ad4009827a9d..6aba08191cf35 100644 +index 8cadbddb47767..879ed1cab0558 100644 --- chrome/browser/permissions/permission_manager_factory.cc +++ chrome/browser/permissions/permission_manager_factory.cc @@ -6,6 +6,7 @@ @@ -99,10 +99,10 @@ index 1ad4009827a9d..6aba08191cf35 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" -@@ -64,9 +65,15 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts( +@@ -68,9 +69,15 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts( std::make_unique(profile); #endif // BUILDFLAG(IS_ANDROID) - #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) + #if BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) +#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) + if (!cef::IsAlloyRuntimeEnabled()) { +#endif @@ -161,10 +161,10 @@ index fbce13c16ad10..0512b2f09937e 100644 std::unique_ptr CreatePermissionPrompt( content::WebContents* web_contents, diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc -index 613500ba8c3d3..36c9aa0d2ea71 100644 +index 7bf3d2015afc8..8a58296f19c30 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc -@@ -202,11 +202,28 @@ std::unique_ptr CreateQuietPrompt( +@@ -217,11 +217,28 @@ std::unique_ptr CreateQuietPrompt( } } @@ -194,7 +194,7 @@ index 613500ba8c3d3..36c9aa0d2ea71 100644 if (!browser) { DLOG(WARNING) << "Permission prompt suppressed because the WebContents is " diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc -index 9c0ec651d494f..8ba6512557edc 100644 +index 063b8e6c0747d..0b7deda8a97b3 100644 --- components/embedder_support/permission_context_utils.cc +++ components/embedder_support/permission_context_utils.cc @@ -5,6 +5,7 @@ @@ -208,7 +208,7 @@ index 9c0ec651d494f..8ba6512557edc 100644 @@ -79,10 +80,21 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context, std::move(delegates.geolocation_permission_context_delegate), is_regular_profile); - #elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS) + #elif BUILDFLAG(OS_LEVEL_GEOLOCATION_PERMISSION_SUPPORTED) +#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) + if (cef::IsAlloyRuntimeEnabled()) { + permission_contexts[ContentSettingsType::GEOLOCATION] = diff --git a/patch/patches/chrome_browser_policy.patch b/patch/patches/chrome_browser_policy.patch index ae9198841..e2c0636a9 100644 --- a/patch/patches/chrome_browser_policy.patch +++ b/patch/patches/chrome_browser_policy.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/policy/browser_dm_token_storage_linux.cc chrome/browser/policy/browser_dm_token_storage_linux.cc -index 9fef3079833f4..43576d91d53f1 100644 +index 02c801eb35549..2fa2e336a8cf7 100644 --- chrome/browser/policy/browser_dm_token_storage_linux.cc +++ chrome/browser/policy/browser_dm_token_storage_linux.cc @@ -22,6 +22,7 @@ @@ -8,9 +8,9 @@ index 9fef3079833f4..43576d91d53f1 100644 #include "base/threading/scoped_blocking_call.h" +#include "chrome/browser/policy/chrome_browser_policy_connector.h" #include "chrome/common/chrome_paths.h" + #include "components/policy/core/common/policy_logger.h" - namespace policy { -@@ -116,8 +117,8 @@ std::string BrowserDMTokenStorageLinux::InitEnrollmentToken() { +@@ -121,8 +122,8 @@ std::string BrowserDMTokenStorageLinux::InitEnrollmentToken() { std::string enrollment_token; base::FilePath dir_policy_files_path; @@ -21,7 +21,7 @@ index 9fef3079833f4..43576d91d53f1 100644 return std::string(); } -@@ -147,8 +148,8 @@ bool BrowserDMTokenStorageLinux::InitEnrollmentErrorOption() { +@@ -152,8 +153,8 @@ bool BrowserDMTokenStorageLinux::InitEnrollmentErrorOption() { std::string options; base::FilePath dir_policy_files_path; @@ -33,7 +33,7 @@ index 9fef3079833f4..43576d91d53f1 100644 } diff --git chrome/browser/policy/browser_dm_token_storage_mac.mm chrome/browser/policy/browser_dm_token_storage_mac.mm -index 27af6ec08f593..156689eec644d 100644 +index d8fda08453256..466718e824503 100644 --- chrome/browser/policy/browser_dm_token_storage_mac.mm +++ chrome/browser/policy/browser_dm_token_storage_mac.mm @@ -27,6 +27,7 @@ @@ -42,9 +42,9 @@ index 27af6ec08f593..156689eec644d 100644 #include "base/threading/scoped_blocking_call.h" +#include "chrome/browser/policy/chrome_browser_policy_connector.h" #include "chrome/common/chrome_paths.h" + #include "components/policy/core/common/policy_logger.h" - namespace policy { -@@ -47,11 +48,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL( +@@ -48,11 +49,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL( "/Library/Google/Chrome/CloudManagementEnrollmentOptions"); const char kEnrollmentMandatoryOption[] = "Mandatory"; @@ -56,7 +56,7 @@ index 27af6ec08f593..156689eec644d 100644 constexpr char kEnrollmentTokenMetricsName[] = "Enterprise.CloudManagementEnrollmentTokenLocation.Mac"; -@@ -104,16 +100,23 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) { +@@ -109,16 +105,23 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) { // Get the enrollment token from policy file: /Library/com.google.Chrome.plist. // Return true if policy is set, otherwise false. bool GetEnrollmentTokenFromPolicy(std::string* enrollment_token) { @@ -82,7 +82,7 @@ index 27af6ec08f593..156689eec644d 100644 return false; } CFStringRef value_string = base::apple::CFCast(value.get()); -@@ -138,12 +141,19 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) { +@@ -143,12 +146,19 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) { } std::optional IsEnrollmentMandatoryByPolicy() { @@ -254,7 +254,7 @@ index 50f1b5313ce45..687e667e4b942 100644 // If the folder containing the policy files doesn't exist, there's no need // to have a provider for them. Note that in verified boot, the folder diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h -index 7d08b9b3a548e..c1acd530587a3 100644 +index 8f90fe72995f3..4d818e1cc61c7 100644 --- chrome/browser/policy/chrome_browser_policy_connector.h +++ chrome/browser/policy/chrome_browser_policy_connector.h @@ -28,6 +28,10 @@ @@ -357,7 +357,7 @@ index 8dbf958c189dd..6eaccc6688eca 100644 *dir = base::FilePath(policy::path_parser::ExpandPathVariables(value)); return true; diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc -index c94a25e390864..b47996eaeb902 100644 +index 3c569bc610124..4f438a3d1f857 100644 --- chrome/common/chrome_paths.cc +++ chrome/common/chrome_paths.cc @@ -541,7 +541,8 @@ bool PathProvider(int key, base::FilePath* result) { @@ -371,7 +371,7 @@ index c94a25e390864..b47996eaeb902 100644 cur = base::FilePath(policy::kPolicyPath); break; diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h -index 4cde94111918e..aaf8245abd9a6 100644 +index 13abfd26b92b3..acb4d58f02650 100644 --- chrome/common/chrome_paths.h +++ chrome/common/chrome_paths.h @@ -8,6 +8,7 @@ @@ -392,10 +392,10 @@ index 4cde94111918e..aaf8245abd9a6 100644 // policy files that allow sys-admins // to set policies for chrome. This directory diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py -index aef54cfd633eb..a3760acb82ea5 100755 +index be1553785d5b5..2446e30bea57e 100755 --- components/policy/tools/generate_policy_source.py +++ components/policy/tools/generate_policy_source.py -@@ -449,6 +449,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups, +@@ -465,6 +465,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups, #include #include @@ -403,7 +403,7 @@ index aef54cfd633eb..a3760acb82ea5 100755 #include "components/policy/core/common/policy_details.h" #include "components/policy/core/common/policy_map.h" -@@ -471,9 +472,11 @@ struct SchemaData; +@@ -487,9 +488,11 @@ struct SchemaData; ''') if target_platform == 'win': @@ -417,7 +417,7 @@ index aef54cfd633eb..a3760acb82ea5 100755 f.write('''#if BUILDFLAG(IS_CHROMEOS) // Sets default profile policies values for enterprise users. -@@ -1116,7 +1119,8 @@ namespace policy { +@@ -1130,7 +1133,8 @@ namespace policy { f.write('} // namespace\n\n') if target_platform == 'win': @@ -427,7 +427,7 @@ index aef54cfd633eb..a3760acb82ea5 100755 'const wchar_t kRegistryChromePolicyKey[] = ' 'L"' + CHROME_POLICY_KEY + '";\n' '#elif BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING)\n' -@@ -1125,6 +1129,7 @@ namespace policy { +@@ -1139,6 +1143,7 @@ namespace policy { '#else\n' 'const wchar_t kRegistryChromePolicyKey[] = ' 'L"' + CHROMIUM_POLICY_KEY + '";\n' diff --git a/patch/patches/chrome_browser_printing_oop_osr.patch b/patch/patches/chrome_browser_printing_oop_osr.patch index 79796c9df..1acbc2ac0 100644 --- a/patch/patches/chrome_browser_printing_oop_osr.patch +++ b/patch/patches/chrome_browser_printing_oop_osr.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/printing/print_backend_service_manager.cc chrome/browser/printing/print_backend_service_manager.cc -index ea046f5f1dfe3..0a915b7e3a091 100644 +index e3a6645add6e3..4dde23d0451ff 100644 --- chrome/browser/printing/print_backend_service_manager.cc +++ chrome/browser/printing/print_backend_service_manager.cc @@ -74,7 +74,15 @@ PrintBackendServiceManager* g_print_backend_service_manager_singleton = nullptr; diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 467d164ea..6111eb553 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 2e67f8c97fab8..a3367979977c9 100644 +index 52da35f06a7a9..5fb43c7c65d34 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -666,7 +666,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -669,7 +669,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -52,10 +52,10 @@ index a9762d47c397d..482c0e4c8550f 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index b06035ad4748f..5d51cd1038a66 100644 +index 7ad5372c8a135..1112491861262 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -93,6 +93,10 @@ class Profile : public content::BrowserContext { +@@ -94,6 +94,10 @@ class Profile : public content::BrowserContext { // be applicable to run. Please see crbug.com/1098697#c3 for more details. static OTRProfileID CreateUnique(const std::string& profile_id_prefix); @@ -66,7 +66,7 @@ index b06035ad4748f..5d51cd1038a66 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -504,6 +508,8 @@ class Profile : public content::BrowserContext { +@@ -515,6 +519,8 @@ class Profile : public content::BrowserContext { return instant_service_; } @@ -75,7 +75,7 @@ index b06035ad4748f..5d51cd1038a66 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -515,7 +521,6 @@ class Profile : public content::BrowserContext { +@@ -526,7 +532,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -84,7 +84,7 @@ index b06035ad4748f..5d51cd1038a66 100644 // 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 47ada6bf53225..a0c4d18b93278 100644 +index fbe18f0773bda..1066b8d2b382a 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc @@ -1040,7 +1040,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, @@ -99,10 +99,10 @@ index 47ada6bf53225..a0c4d18b93278 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index a8ae9d577d4fb..381d6ceeaccba 100644 +index 6e991d99df8ff..00145aba0bd83 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -437,7 +437,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -436,7 +436,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) profile_manager_android_ = std::make_unique(this); #endif @@ -156,7 +156,7 @@ index 0d1d2e3661ff1..ba4b8cb233102 100644 #endif { diff --git chrome/browser/profiles/renderer_updater_factory.cc chrome/browser/profiles/renderer_updater_factory.cc -index ed5b366aa47ab..794cf8b3bbec1 100644 +index a836288d08abc..26219d19f0973 100644 --- chrome/browser/profiles/renderer_updater_factory.cc +++ chrome/browser/profiles/renderer_updater_factory.cc @@ -4,6 +4,7 @@ diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 676baa910..66be41466 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,10 +1,10 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 9bb9b155d3024..34f1bfcffd7d8 100644 +index 102625231e535..47d0d7574b2ee 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -32,6 +32,7 @@ static_library("safe_browsing") { - "//components/browser_sync", +@@ -33,6 +33,7 @@ static_library("safe_browsing") { "//components/enterprise:enterprise", + "//components/enterprise/buildflags", "//components/enterprise/common:strings", + "//components/gcm_driver:gcm_buildflags", "//components/keyed_service/content", diff --git a/patch/patches/chrome_browser_startup.patch b/patch/patches/chrome_browser_startup.patch index 7eb500da8..94434ce84 100644 --- a/patch/patches/chrome_browser_startup.patch +++ b/patch/patches/chrome_browser_startup.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc -index f5fdf2a05a7e7..4622df9f7b0cb 100644 +index 86ab9563e08bc..182be3b6ec1dc 100644 --- chrome/browser/ui/startup/startup_browser_creator.cc +++ chrome/browser/ui/startup/startup_browser_creator.cc -@@ -603,6 +603,13 @@ std::optional GetAppId(const base::CommandLine& command_line, +@@ -604,6 +604,13 @@ std::optional GetAppId(const base::CommandLine& command_line, } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -16,7 +16,7 @@ index f5fdf2a05a7e7..4622df9f7b0cb 100644 } // namespace StartupProfileMode StartupProfileModeFromReason( -@@ -1487,6 +1494,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( +@@ -1488,6 +1495,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile( {profile, mode}, last_opened_profiles); } @@ -29,7 +29,7 @@ index f5fdf2a05a7e7..4622df9f7b0cb 100644 // static void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( const base::CommandLine& command_line, -@@ -1496,6 +1509,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( +@@ -1497,6 +1510,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning( return; } @@ -42,7 +42,7 @@ index f5fdf2a05a7e7..4622df9f7b0cb 100644 StartupProfileMode mode = StartupProfileModeFromReason(profile_path_info.reason); diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h -index fc41cf3c88d9b..e0e51cb9e2dec 100644 +index 11a33a0bdec02..5a8146c95f99d 100644 --- chrome/browser/ui/startup/startup_browser_creator.h +++ chrome/browser/ui/startup/startup_browser_creator.h @@ -9,6 +9,7 @@ diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 42ed86cfd..63feeb7c5 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 0b39e73c2a394..1c42fe06479ab 100644 +index dd41ca3cb8f35..6123e27acffa8 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc @@ -30,6 +30,7 @@ @@ -7,10 +7,10 @@ index 0b39e73c2a394..1c42fe06479ab 100644 #include "base/trace_event/trace_event.h" #include "build/build_config.h" +#include "cef/libcef/features/runtime.h" - #include "chrome/browser/browser_features.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" -@@ -69,6 +70,10 @@ + #include "chrome/browser/new_tab_page/chrome_colors/chrome_colors_service.h" +@@ -68,6 +69,10 @@ #include "ui/color/color_provider_manager.h" #include "ui/native_theme/native_theme.h" @@ -21,7 +21,7 @@ index 0b39e73c2a394..1c42fe06479ab 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/scoped_observation.h" #include "extensions/browser/extension_registry_observer.h" -@@ -270,11 +275,19 @@ void ThemeService::Init() { +@@ -269,11 +274,19 @@ void ThemeService::Init() { // OnExtensionServiceReady. Otherwise, the ThemeObserver won't be // constructed in time to observe the corresponding events. #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -42,7 +42,7 @@ index 0b39e73c2a394..1c42fe06479ab 100644 theme_syncable_service_ = std::make_unique(profile_, this); diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc -index 879bbeef4037b..c52b9144cf966 100644 +index 49fd0b0f7a21c..dc4258f7143d1 100644 --- chrome/browser/themes/theme_service_factory.cc +++ chrome/browser/themes/theme_service_factory.cc @@ -9,6 +9,7 @@ diff --git a/patch/patches/chrome_common_logging.patch b/patch/patches/chrome_common_logging.patch index a668a2aa8..95abe06cc 100644 --- a/patch/patches/chrome_common_logging.patch +++ b/patch/patches/chrome_common_logging.patch @@ -1,5 +1,5 @@ diff --git chrome/common/features.gni chrome/common/features.gni -index 01367ff6efd6c..975ea8e446dce 100644 +index fc2d817cdab5d..bb0fe5b982aae 100644 --- chrome/common/features.gni +++ chrome/common/features.gni @@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni") @@ -19,7 +19,7 @@ index 01367ff6efd6c..975ea8e446dce 100644 # Platforms where Chrome x509 server certificate enterprise policies are # supported. This must must match the supported_on/future_on list of the -@@ -90,11 +91,13 @@ declare_args() { +@@ -94,11 +95,13 @@ declare_args() { # optimize_webui was moved to ui/base/ui_features.gni } diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 14713a984..76300c0b9 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index 2bb525046619c..200fc9c1f0067 100644 +index 0ca794a57bed3..ce171b7a01a8c 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc @@ -16,6 +16,7 @@ @@ -24,7 +24,7 @@ index 2bb525046619c..200fc9c1f0067 100644 extensions::WebViewRendererState::GetInstance(); std::string partition_id; diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc -index 438276b719c2f..e97fa0eaf2d7a 100644 +index 00dd9a34cd3fb..89d4588bdbe4e 100644 --- chrome/browser/plugins/plugin_utils.cc +++ chrome/browser/plugins/plugin_utils.cc @@ -5,6 +5,7 @@ @@ -34,8 +34,8 @@ index 438276b719c2f..e97fa0eaf2d7a 100644 +#include "cef/libcef/features/features.h" #include "chrome/browser/profiles/profile.h" #include "components/content_settings/core/browser/host_content_settings_map.h" - #include "components/content_settings/core/common/content_settings_types.h" -@@ -68,6 +69,15 @@ PluginUtils::GetMimeTypeToExtensionIdMap( + #include "components/content_settings/core/common/content_settings.h" +@@ -69,6 +70,15 @@ PluginUtils::GetMimeTypeToExtensionIdMap( content::BrowserContext* browser_context) { base::flat_map mime_type_to_extension_id_map; #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -51,7 +51,7 @@ index 438276b719c2f..e97fa0eaf2d7a 100644 Profile* profile = Profile::FromBrowserContext(browser_context); if (extensions::ChromeContentBrowserClientExtensionsPart:: AreExtensionsDisabledForProfile(profile)) { -@@ -78,9 +88,11 @@ PluginUtils::GetMimeTypeToExtensionIdMap( +@@ -79,9 +89,11 @@ PluginUtils::GetMimeTypeToExtensionIdMap( MimeTypesHandler::GetMIMETypeAllowlist(); // Go through the allowed extensions and try to use them to intercept // the URL request. @@ -64,10 +64,10 @@ index 438276b719c2f..e97fa0eaf2d7a 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 620f0ebad27d3..f36f4a6c5d1ee 100644 +index 60bc3751cb325..ebce071c74a8b 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -1007,6 +1007,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1006,6 +1006,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -75,7 +75,7 @@ index 620f0ebad27d3..f36f4a6c5d1ee 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1167,7 +1168,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1166,7 +1167,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -85,7 +85,7 @@ index 620f0ebad27d3..f36f4a6c5d1ee 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1176,7 +1178,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1175,7 +1177,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -95,7 +95,7 @@ index 620f0ebad27d3..f36f4a6c5d1ee 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1186,7 +1189,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1185,7 +1188,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -127,7 +127,7 @@ index 8b26a93f7527e..17890bf20e481 100644 BrowserPluginEmbedder(const BrowserPluginEmbedder&) = delete; BrowserPluginEmbedder& operator=(const BrowserPluginEmbedder&) = delete; diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc -index f94fcfcf562db..066c66f46b7ae 100644 +index 1ce20a2a42705..7a3ef88ec689b 100644 --- content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc @@ -49,6 +49,8 @@ std::unique_ptr BrowserPluginGuest::CreateNewGuestWindow( diff --git a/patch/patches/chrome_pref_watcher.patch b/patch/patches/chrome_pref_watcher.patch index b811920a0..7a3b1fddc 100644 --- a/patch/patches/chrome_pref_watcher.patch +++ b/patch/patches/chrome_pref_watcher.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h -index c442c6f50eada..e8a42a9d4948d 100644 +index 79ce1590df640..6b57feb48aad6 100644 --- chrome/browser/ui/prefs/pref_watcher.h +++ chrome/browser/ui/prefs/pref_watcher.h -@@ -33,10 +33,10 @@ class PrefWatcher : public KeyedService, +@@ -36,10 +36,10 @@ class PrefWatcher : public KeyedService, void RegisterRendererPreferenceWatcher( mojo::PendingRemote watcher); @@ -11,6 +11,6 @@ index c442c6f50eada..e8a42a9d4948d 100644 void Shutdown() override; + private: - void OnDoNotTrackEnabledChanged() override; + // ui::NativeThemeObserver: + void OnNativeThemeUpdated(ui::NativeTheme* observed_theme) override; - void UpdateRendererPreferences(); diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 2ef265d53..d287a1ff4 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 b17c8a5f9f9c3..cfa44b65d066a 100644 +index 857247dd93f75..fc2f196d450cd 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index e67cc7ed3..47c42f9e8 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,5 +1,5 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index c09a805c4ed7b..3db1403d60ed5 100644 +index d60a195d58a27..df74bb2c60264 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -37,6 +37,7 @@ @@ -20,7 +20,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) // In debug builds of Lacros, we keep track of when the user data dir // is initialized, to ensure the cryptohome is not accessed before login -@@ -854,6 +858,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -845,6 +849,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -31,7 +31,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 std::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get()); -@@ -879,7 +887,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -870,7 +878,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // future session's metrics. DeferBrowserMetrics(user_data_dir); @@ -40,7 +40,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 // In the case the process is not the singleton process, the uninstall tasks // need to be executed here. A window will be displayed asking to close all // running instances. -@@ -1050,7 +1058,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -1038,7 +1046,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // Initializes the resource bundle and determines the locale. std::string actual_locale = LoadLocalState( @@ -50,7 +50,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 chrome_feature_list_creator->SetApplicationLocale(actual_locale); chrome_feature_list_creator->OverrideCachedUIStrings(); -@@ -1069,7 +1078,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -1057,7 +1066,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( if (base::FeatureList::IsEnabled( features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { @@ -60,15 +60,15 @@ index c09a805c4ed7b..3db1403d60ed5 100644 #if BUILDFLAG(IS_ANDROID) record = base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions); -@@ -1505,6 +1515,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1502,6 +1512,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); + if (!cef::IsChromeRuntimeEnabled()) { crash_reporter::InitializeCrashKeys(); - #if BUILDFLAG(IS_CHROMEOS_LACROS) -@@ -1523,6 +1534,7 @@ void ChromeMainDelegate::PreSandboxStartup() { + #if BUILDFLAG(IS_POSIX) +@@ -1512,6 +1523,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -76,7 +76,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1703,7 +1715,8 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1692,7 +1704,8 @@ void ChromeMainDelegate::PreSandboxStartup() { #else const std::string loaded_locale = ui::ResourceBundle::InitSharedInstanceWithLocale( @@ -86,7 +86,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 base::FilePath resources_pack_path; base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); -@@ -1733,6 +1746,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1722,6 +1735,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -94,7 +94,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1768,6 +1782,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1757,6 +1771,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -102,7 +102,7 @@ index c09a805c4ed7b..3db1403d60ed5 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1893,6 +1908,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1880,6 +1895,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -110,7 +110,7 @@ index c09a805c4ed7b..3db1403d60ed5 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 = -@@ -1905,6 +1921,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1892,6 +1908,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -118,18 +118,18 @@ index c09a805c4ed7b..3db1403d60ed5 100644 } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -2001,6 +2018,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { - const bool is_browser_process = process_type.empty(); - const bool gwp_asan_boost_sampling = is_browser_process || IsCanaryDev(); +@@ -1994,6 +2011,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { + : memory_system::DispatcherParameters:: + AllocationTraceRecorderInclusion::kIgnore; + memory_system_ = std::make_unique(); memory_system::Initializer() .SetGwpAsanParameters(gwp_asan_boost_sampling, process_type) .SetProfilingClientParameters(chrome::GetChannel(), -@@ -2010,5 +2028,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { - memory_system::DispatcherParameters:: - AllocationTraceRecorderInclusion::kDynamic, - process_type) +@@ -2001,5 +2019,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { + .SetDispatcherParameters(memory_system::DispatcherParameters:: + PoissonAllocationSamplerInclusion::kEnforce, + allocation_recorder_inclusion, process_type) - .Initialize(memory_system_); + .Initialize(*memory_system_); } @@ -174,7 +174,7 @@ index 3553377e96017..9f6edc70ef1d4 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) std::unique_ptr lacros_service_; diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index ed96ab7401650..625fd36e74d64 100644 +index d6c9d21a0d4d3..9e0673a150d40 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -52,6 +52,7 @@ @@ -185,7 +185,7 @@ index ed96ab7401650..625fd36e74d64 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -513,7 +514,7 @@ void ProcessSingletonNotificationCallbackImpl( +@@ -529,7 +530,7 @@ void ProcessSingletonNotificationCallbackImpl( return; } @@ -194,7 +194,7 @@ index ed96ab7401650..625fd36e74d64 100644 // The uninstall command-line switch is handled by the origin process; see // ChromeMainDelegate::PostEarlyInitialization(...). The other process won't // be able to become the singleton process and will display a window asking -@@ -816,7 +817,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { +@@ -832,7 +833,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { return content::RESULT_CODE_NORMAL_EXIT; } @@ -203,7 +203,7 @@ index ed96ab7401650..625fd36e74d64 100644 // If we are running stale binaries then relaunch and exit immediately. if (upgrade_util::IsRunningOldChrome()) { if (!upgrade_util::RelaunchChromeBrowser( -@@ -829,7 +830,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { +@@ -845,7 +846,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { // result in browser startup bailing. return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED; } @@ -212,7 +212,7 @@ index ed96ab7401650..625fd36e74d64 100644 return load_local_state_result; } -@@ -935,7 +936,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( +@@ -951,7 +952,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( browser_process_->local_state()); platform_management_service->RefreshCache(base::NullCallback()); @@ -221,7 +221,7 @@ index ed96ab7401650..625fd36e74d64 100644 if (first_run::IsChromeFirstRun()) { bool stats_default; if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) { -@@ -948,7 +949,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( +@@ -964,7 +965,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( : metrics::EnableMetricsDefault::OPT_IN); } } @@ -230,7 +230,7 @@ index ed96ab7401650..625fd36e74d64 100644 std::string locale = startup_data_->chrome_feature_list_creator()->actual_locale(); -@@ -981,6 +982,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { +@@ -997,6 +998,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) master_prefs_ = std::make_unique(); @@ -238,7 +238,7 @@ index ed96ab7401650..625fd36e74d64 100644 std::unique_ptr installer_initial_prefs = startup_data_->chrome_feature_list_creator()->TakeInitialPrefs(); if (!installer_initial_prefs) -@@ -1014,6 +1016,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { +@@ -1030,6 +1032,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { master_prefs_->confirm_to_quit); } #endif // BUILDFLAG(IS_MAC) @@ -246,7 +246,7 @@ index ed96ab7401650..625fd36e74d64 100644 #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) return content::RESULT_CODE_NORMAL_EXIT; } -@@ -1080,6 +1083,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1091,6 +1094,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_process_->browser_policy_connector()->OnResourceBundleCreated(); @@ -254,7 +254,7 @@ index ed96ab7401650..625fd36e74d64 100644 // Android does first run in Java instead of native. // Chrome OS has its own out-of-box-experience code. #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) -@@ -1101,6 +1105,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1112,6 +1116,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) @@ -262,7 +262,7 @@ index ed96ab7401650..625fd36e74d64 100644 #if BUILDFLAG(IS_MAC) #if defined(ARCH_CPU_X86_64) -@@ -1459,6 +1464,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1470,6 +1475,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->PreMainMessageLoopRun(); #if BUILDFLAG(IS_WIN) @@ -270,7 +270,7 @@ index ed96ab7401650..625fd36e74d64 100644 // If the command line specifies 'uninstall' then we need to work here // unless we detect another chrome browser running. if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) { -@@ -1470,6 +1476,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1481,6 +1487,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { return ChromeBrowserMainPartsWin::HandleIconsCommands( *base::CommandLine::ForCurrentProcess()); } @@ -278,7 +278,7 @@ index ed96ab7401650..625fd36e74d64 100644 ui::SelectFileDialog::SetFactory( std::make_unique()); -@@ -1495,6 +1502,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1506,6 +1513,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // BUILDFLAG(CHROME_FOR_TESTING) @@ -286,7 +286,7 @@ index ed96ab7401650..625fd36e74d64 100644 if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMakeDefaultBrowser)) { bool is_managed = g_browser_process->local_state()->IsManagedPreference( -@@ -1508,18 +1516,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1519,18 +1527,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ? static_cast(content::RESULT_CODE_NORMAL_EXIT) : static_cast(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED); } @@ -309,7 +309,7 @@ index ed96ab7401650..625fd36e74d64 100644 #if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING) // Begin relaunch processing immediately if User Data migration is required -@@ -1558,7 +1570,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1569,7 +1581,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) @@ -318,7 +318,7 @@ index ed96ab7401650..625fd36e74d64 100644 // Check if there is any machine level Chrome installed on the current // machine. If yes and the current Chrome process is user level, we do not // allow the user level Chrome to run. So we notify the user and uninstall -@@ -1567,7 +1579,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1578,7 +1590,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // obtained but before potentially creating the first run sentinel). if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; @@ -327,7 +327,7 @@ index ed96ab7401650..625fd36e74d64 100644 // Desktop construction occurs here, (required before profile creation). PreProfileInit(); -@@ -1610,12 +1622,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1621,12 +1633,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -342,7 +342,7 @@ index ed96ab7401650..625fd36e74d64 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1642,6 +1656,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1653,6 +1667,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Call `PostProfileInit()`and set it up for profiles created later. profile_init_manager_ = std::make_unique(this, profile); @@ -350,7 +350,7 @@ index ed96ab7401650..625fd36e74d64 100644 #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) // Execute first run specific code after the PrefService has been initialized // and preferences have been registered since some of the import code depends -@@ -1681,6 +1696,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1692,6 +1707,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { *base::CommandLine::ForCurrentProcess()); } #endif // BUILDFLAG(IS_WIN) @@ -358,7 +358,7 @@ index ed96ab7401650..625fd36e74d64 100644 // Configure modules that need access to resources. net::NetModule::SetResourceProvider(ChromeNetResourceProvider); -@@ -1766,6 +1782,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1783,6 +1799,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { g_browser_process->profile_manager()->GetLastOpenedProfiles(); } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -370,7 +370,7 @@ index ed96ab7401650..625fd36e74d64 100644 // This step is costly. if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(), base::FilePath(), profile_info, -@@ -1798,11 +1819,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1815,11 +1836,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -386,7 +386,7 @@ index ed96ab7401650..625fd36e74d64 100644 #endif // !BUILDFLAG(IS_ANDROID) diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index 6568351d73ae9..f4a4bd3194c02 100644 +index 3c12614c4d7d2..1dc97ecf5a11e 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -18,6 +18,7 @@ @@ -397,7 +397,7 @@ index 6568351d73ae9..f4a4bd3194c02 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -107,6 +108,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -106,6 +107,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } #endif // !BUILDFLAG(CHROME_FOR_TESTING) @@ -405,7 +405,7 @@ index 6568351d73ae9..f4a4bd3194c02 100644 // Create the app delegate by requesting the shared AppController. CHECK_EQ(nil, NSApp.delegate); AppController* app_controller = AppController.sharedController; -@@ -115,6 +117,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -114,6 +116,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { chrome::BuildMainMenu(NSApp, app_controller, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); [app_controller mainMenuCreated]; @@ -413,7 +413,7 @@ index 6568351d73ae9..f4a4bd3194c02 100644 ui::WarmScreenCapture(); -@@ -155,5 +158,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -154,5 +157,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -422,10 +422,10 @@ index 6568351d73ae9..f4a4bd3194c02 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index b07f8f583dabb..94b2acd6ef46e 100644 +index 675a9ab64ea08..d0c160a14b2a7 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -47,6 +47,7 @@ +@@ -46,6 +46,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM @@ -433,7 +433,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 #include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/bluetooth/chrome_bluetooth_delegate_impl_client.h" -@@ -1462,6 +1463,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { +@@ -1467,6 +1468,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { } ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -442,7 +442,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back( std::make_unique()); -@@ -1499,6 +1502,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1504,6 +1507,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { } } @@ -454,10 +454,22 @@ index b07f8f583dabb..94b2acd6ef46e 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -3697,9 +3705,24 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs, +@@ -3707,28 +3715,25 @@ bool UpdatePreferredColorScheme(WebPreferences* web_prefs, web_prefs->preferred_color_scheme; } #else +- // Update based on native theme scheme. +- web_prefs->preferred_color_scheme = +- ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme()); +- +- bool using_different_colored_frame = false; +- if (Profile* profile = +- Profile::FromBrowserContext(web_contents->GetBrowserContext())) { +- if (ThemeService* theme_service = +- ThemeServiceFactory::GetForProfile(profile)) { +- using_different_colored_frame = !theme_service->UsingDefaultTheme() || +- theme_service->GetUserColor().has_value(); +- } + auto preferred_color_scheme = native_theme->GetPreferredColorScheme(); + + auto* profile = Profile::FromBrowserContext( @@ -471,16 +483,24 @@ index b07f8f583dabb..94b2acd6ef46e 100644 + browser_color_scheme == ThemeService::BrowserColorScheme::kLight + ? ui::NativeTheme::PreferredColorScheme::kLight + : ui::NativeTheme::PreferredColorScheme::kDark; -+ } -+ - // Update based on native theme scheme. - web_prefs->preferred_color_scheme = -- ToBlinkPreferredColorScheme(native_theme->GetPreferredColorScheme()); -+ ToBlinkPreferredColorScheme(preferred_color_scheme); + } - // Update based on the ColorProvider associated with `web_contents`. Depends - // on the browser color mode settings. -@@ -4454,9 +4477,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +- // Update based on the ColorProvider associated with `web_contents`. Depends +- // on the browser color mode settings and whether the user profile has set a +- // custom coloring for the browser ui. +- web_prefs->preferred_root_scrollbar_color_scheme = +- web_contents->GetColorMode() == ui::ColorProviderKey::ColorMode::kLight || +- using_different_colored_frame +- ? blink::mojom::PreferredColorScheme::kLight +- : blink::mojom::PreferredColorScheme::kDark; ++ // Update based on native theme scheme. ++ web_prefs->preferred_color_scheme = ++ web_prefs->preferred_root_scrollbar_color_scheme = ++ ToBlinkPreferredColorScheme(preferred_color_scheme); + #endif // BUILDFLAG(IS_ANDROID) + + // Reauth WebUI doesn't support dark mode yet because it shares the dialog +@@ -4471,9 +4476,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -492,7 +512,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -6565,7 +6590,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6592,7 +6599,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -501,7 +521,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -6583,6 +6608,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6610,6 +6617,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -510,7 +530,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 } std::vector -@@ -7698,10 +7725,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -7732,10 +7741,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -523,7 +543,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -7720,7 +7747,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7754,7 +7763,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -533,7 +553,7 @@ index b07f8f583dabb..94b2acd6ef46e 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -7888,7 +7916,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -7923,7 +7933,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -543,19 +563,19 @@ index b07f8f583dabb..94b2acd6ef46e 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 e21d5dbffda0b..113df89dcd68a 100644 +index 6c9208d7b7907..77f049cc7483c 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -145,6 +145,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -146,6 +146,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; + virtual void CleanupOnUIThread(); + - // TODO(https://crbug.com/787567): This file is about calls from content/ out + // TODO(crbug.com/41356866): 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. -@@ -682,7 +684,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -686,7 +688,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -564,7 +584,7 @@ index e21d5dbffda0b..113df89dcd68a 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1202,7 +1204,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -1213,7 +1215,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -574,7 +594,7 @@ index e21d5dbffda0b..113df89dcd68a 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index 14c785c5686a8..ed24f5f045006 100644 +index 750d634f641b1..86220ec515c0c 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -16,6 +16,7 @@ @@ -585,7 +605,7 @@ index 14c785c5686a8..ed24f5f045006 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/invert_bubble_prefs.h" -@@ -194,6 +195,10 @@ +@@ -197,6 +198,10 @@ #include "chrome/browser/background/background_mode_manager.h" #endif @@ -596,7 +616,7 @@ index 14c785c5686a8..ed24f5f045006 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1743,7 +1748,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1820,7 +1825,8 @@ void RegisterLocalState(PrefRegistrySimple* registry) { #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(IS_WIN) @@ -606,7 +626,7 @@ index 14c785c5686a8..ed24f5f045006 100644 downgrade::RegisterPrefs(registry); #endif -@@ -1779,6 +1785,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1864,6 +1870,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -618,7 +638,7 @@ index 14c785c5686a8..ed24f5f045006 100644 } // Register prefs applicable to all profiles. -@@ -2213,6 +2224,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2317,6 +2328,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 c3a903cff..397abba76 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc -index 01d45469f3bae..d1bed9648e4a2 100644 +index 3b992709445b9..822de797dcb3e 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -401,6 +401,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -406,6 +406,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)) { @@ -10,7 +10,7 @@ index 01d45469f3bae..d1bed9648e4a2 100644 return false; } -@@ -417,6 +418,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -422,6 +423,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -24,7 +24,7 @@ index 01d45469f3bae..d1bed9648e4a2 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1179,11 +1187,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1207,11 +1215,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -41,10 +41,10 @@ index 01d45469f3bae..d1bed9648e4a2 100644 bool BrowserCommandController::IsWebAppOrCustomTab() const { diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc -index fc51015c70183..52de604f96d9e 100644 +index dca26d57b903d..3de463129b7ac 100644 --- chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc -@@ -728,6 +728,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( +@@ -739,6 +739,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( } } @@ -102,7 +102,7 @@ index fc51015c70183..52de604f96d9e 100644 } // namespace //////////////////////////////////////////////////////////////////////////////// -@@ -1572,7 +1623,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { +@@ -1583,7 +1634,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { return false; } @@ -111,7 +111,7 @@ index fc51015c70183..52de604f96d9e 100644 GlobalError* error = GlobalErrorServiceFactory::GetForProfile(browser_->profile()) ->GetGlobalErrorByMenuItemCommandID(command_id); -@@ -1587,6 +1638,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { +@@ -1598,6 +1649,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { } } @@ -142,47 +142,20 @@ index fc51015c70183..52de604f96d9e 100644 bool AppMenuModel::IsCommandIdAlerted(int command_id) const { if (command_id == IDC_VIEW_PASSWORDS || command_id == IDC_SHOW_PASSWORD_MANAGER) { -@@ -1755,11 +1830,15 @@ void AppMenuModel::Build() { - kDefaultIconSize)); - } +@@ -1763,8 +1838,10 @@ void AppMenuModel::Build() { + IDS_CLEAR_BROWSING_DATA, + kTrashCanRefreshIcon); -- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR -- : ui::LOWER_SEPARATOR); -- CreateZoomMenu(); -- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR -- : ui::UPPER_SEPARATOR); + if (IsCommandIdVisible(IDC_ZOOM_MENU)) { -+ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR -+ : ui::LOWER_SEPARATOR); -+ CreateZoomMenu(); -+ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR -+ : ui::UPPER_SEPARATOR); -+ } else { -+ AddSeparator(ui::NORMAL_SEPARATOR); + AddSeparator(ui::NORMAL_SEPARATOR); + CreateZoomMenu(); + } + AddSeparator(ui::NORMAL_SEPARATOR); - AddItemWithStringId(IDC_PRINT, IDS_PRINT); - -@@ -1852,9 +1931,13 @@ void AppMenuModel::Build() { - kMoreToolsMenuItem); - - if (!features::IsChromeRefresh2023()) { -- AddSeparator(ui::LOWER_SEPARATOR); -- CreateCutCopyPasteMenu(); -- AddSeparator(ui::UPPER_SEPARATOR); -+ if (IsCommandIdVisible(IDC_EDIT_MENU)) { -+ AddSeparator(ui::LOWER_SEPARATOR); -+ CreateCutCopyPasteMenu(); -+ AddSeparator(ui::UPPER_SEPARATOR); -+ } else { -+ AddSeparator(ui::NORMAL_SEPARATOR); -+ } - } - - if (!features::IsChromeRefresh2023()) { -@@ -1943,6 +2026,11 @@ void AppMenuModel::Build() { - SetCommandIcon(this, IDC_EXIT, kExitMenuIcon); + AddItemWithStringIdAndVectorIcon(this, IDC_PRINT, IDS_PRINT, kPrintMenuIcon); +@@ -1883,6 +1960,11 @@ void AppMenuModel::Build() { } + #endif // !BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(ENABLE_CEF) + FilterMenuModel(this, base::BindRepeating(&AppMenuModel::IsCommandIdVisible, @@ -193,10 +166,10 @@ index fc51015c70183..52de604f96d9e 100644 } diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h -index c477fba63fd1a..3b9eaad8e1906 100644 +index 0824a0b655cde..507021a7c1b66 100644 --- chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h -@@ -218,6 +218,7 @@ class AppMenuModel : public ui::SimpleMenuModel, +@@ -225,6 +225,7 @@ class AppMenuModel : public ui::SimpleMenuModel, void ExecuteCommand(int command_id, int event_flags) override; bool IsCommandIdChecked(int command_id) const override; bool IsCommandIdEnabled(int command_id) const override; @@ -204,9 +177,9 @@ index c477fba63fd1a..3b9eaad8e1906 100644 bool IsCommandIdAlerted(int command_id) const override; bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override; bool GetAcceleratorForCommandId(int command_id, -@@ -259,6 +260,8 @@ class AppMenuModel : public ui::SimpleMenuModel, - safety_hub::SafetyHubModuleType sh_module, - int event_flags); +@@ -265,6 +266,8 @@ class AppMenuModel : public ui::SimpleMenuModel, + void LogSafetyHubInteractionMetrics(safety_hub::SafetyHubModuleType sh_module, + int event_flags); + bool IsCommandIdEnabledInternal(int command_id) const; + @@ -411,10 +384,10 @@ index 2e973c9e279b0..07d04a364d60c 100644 // regenerated. bool RegenerateFrameOnThemeChange(BrowserThemeChangeType theme_change_type); diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index 110812d2874d7..6ac4f560d7c27 100644 +index 4b52ce3877855..7dae2a6b1b151 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -346,11 +346,10 @@ using content::NativeWebKeyboardEvent; +@@ -353,11 +353,10 @@ using content::NativeWebKeyboardEvent; using content::WebContents; using web_modal::WebContentsModalDialogHost; @@ -429,7 +402,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -683,6 +682,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { +@@ -690,6 +689,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { return browser_view_->frame()->GetTopInset() - browser_view_->y(); } @@ -444,7 +417,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 bool IsToolbarVisible() const override { return browser_view_->IsToolbarVisible(); } -@@ -834,11 +841,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { +@@ -841,11 +848,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -467,7 +440,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // Store the actions so that the access is available for other classes. if (features::IsSidePanelPinningEnabled()) { browser_->SetUserData(BrowserActions::UserDataKey(), -@@ -939,8 +956,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -946,8 +963,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_, watermark_view_)); @@ -485,7 +458,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1017,7 +1041,9 @@ BrowserView::~BrowserView() { +@@ -1021,7 +1045,9 @@ BrowserView::~BrowserView() { // All the tabs should have been destroyed already. If we were closed by the // OS with some tabs than the NativeBrowserFrame should have destroyed them. @@ -495,7 +468,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // Stop the animation timer explicitly here to avoid running it in a nested // message loop, which may run by Browser destructor. -@@ -1026,17 +1052,18 @@ BrowserView::~BrowserView() { +@@ -1030,17 +1056,18 @@ BrowserView::~BrowserView() { // Immersive mode may need to reparent views before they are removed/deleted. immersive_mode_controller_.reset(); @@ -518,7 +491,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // The TabStrip attaches a listener to the model. Make sure we shut down the // TabStrip first so that it can cleanly remove the listener. -@@ -1060,7 +1087,9 @@ BrowserView::~BrowserView() { +@@ -1064,7 +1091,9 @@ BrowserView::~BrowserView() { // `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the // SidePanelCoordinator. @@ -528,7 +501,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 } // static -@@ -1621,6 +1650,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { +@@ -1625,6 +1654,13 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y()); } @@ -542,7 +515,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // static: BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement( const gfx::Rect& contents_webview_bounds, -@@ -2032,9 +2068,14 @@ void BrowserView::OnExclusiveAccessUserInput() { +@@ -2029,9 +2065,14 @@ void BrowserView::OnExclusiveAccessUserInput() { bool BrowserView::ShouldHideUIForFullscreen() const { // Immersive mode needs UI for the slide-down top panel. @@ -558,7 +531,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -3170,7 +3211,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { +@@ -3173,7 +3214,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { } DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { @@ -568,7 +541,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) return download_button->bubble_controller(); return nullptr; -@@ -3725,7 +3767,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3728,7 +3770,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -578,7 +551,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -4207,11 +4250,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { +@@ -4210,11 +4253,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { bool BrowserView::ShouldDescendIntoChildForEventHandling( gfx::NativeView child, const gfx::Point& location) { @@ -619,7 +592,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // Draggable regions are defined relative to the web contents. gfx::Point point_in_contents_web_view_coords(location); views::View::ConvertPointToTarget(GetWidget()->GetRootView(), -@@ -4220,7 +4290,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( +@@ -4223,7 +4293,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( // Draggable regions should be ignored for clicks into any browser view's // owned widgets, for example alerts, permission prompts or find bar. @@ -628,7 +601,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 point_in_contents_web_view_coords.x(), point_in_contents_web_view_coords.y()) || WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords); -@@ -4331,8 +4401,10 @@ void BrowserView::Layout(PassKey) { +@@ -4334,8 +4404,10 @@ void BrowserView::Layout(PassKey) { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -641,7 +614,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -4398,6 +4470,11 @@ void BrowserView::AddedToWidget() { +@@ -4401,6 +4473,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -653,7 +626,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 toolbar_->Init(); // TODO(pbos): Investigate whether the side panels should be creatable when -@@ -4445,13 +4522,9 @@ void BrowserView::AddedToWidget() { +@@ -4448,13 +4525,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -669,7 +642,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4882,7 +4955,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4828,7 +4901,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -678,8 +651,8 @@ index 110812d2874d7..6ac4f560d7c27 100644 + frame_->GetFrameView()->OnFullscreenStateChanged(); } - bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -5304,6 +5378,8 @@ Profile* BrowserView::GetProfile() { + void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) { +@@ -5312,6 +5386,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -688,7 +661,7 @@ index 110812d2874d7..6ac4f560d7c27 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -5326,6 +5402,8 @@ void BrowserView::HideDownloadShelf() { +@@ -5334,6 +5410,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -698,10 +671,10 @@ index 110812d2874d7..6ac4f560d7c27 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 46cdfe23b1234..4f3b2b7650b72 100644 +index e7337adf73caf..6130a2eb8fb5c 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow, +@@ -143,11 +143,16 @@ class BrowserView : public BrowserWindow, METADATA_HEADER(BrowserView, views::ClientView) public: @@ -739,7 +712,7 @@ index 46cdfe23b1234..4f3b2b7650b72 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 07bc84fe5ed23..9d05d8918fa3d 100644 +index a7f0ff7ce857e..0ee1c61503204 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc @@ -48,6 +48,10 @@ @@ -812,8 +785,8 @@ index 07bc84fe5ed23..9d05d8918fa3d 100644 + } } - // Return the preferred size which is the size required to give each -@@ -583,6 +601,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { + gfx::Size BrowserViewLayout::GetPreferredSize( +@@ -589,6 +607,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { int BrowserViewLayout::LayoutToolbar(int top) { TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); @@ -857,10 +830,10 @@ index 71445bfab1824..c77750ea2a820 100644 ContentsWebView::~ContentsWebView() { diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -index b1662191f0967..245895ab7bd37 100644 +index 636be129ccfd6..dbb19d94c1ef9 100644 --- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc +++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc -@@ -610,6 +610,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( +@@ -604,6 +604,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( frame->GetNativeWindow()->SetEventTargeter( std::make_unique()); #endif @@ -872,7 +845,7 @@ index b1662191f0967..245895ab7bd37 100644 } PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() { -@@ -737,18 +742,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( +@@ -731,18 +736,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( int PictureInPictureBrowserFrameView::NonClientHitTest( const gfx::Point& point) { @@ -923,7 +896,7 @@ index b1662191f0967..245895ab7bd37 100644 // Allow dragging and resizing the window. int window_component = GetHTComponentForFrame( -@@ -817,7 +846,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { +@@ -811,7 +840,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { gfx::Rect content_area = GetLocalBounds(); content_area.Inset(FrameBorderInsets()); gfx::Rect top_bar = content_area; @@ -933,7 +906,7 @@ index b1662191f0967..245895ab7bd37 100644 top_bar_container_view_->SetBoundsRect(top_bar); #if !BUILDFLAG(IS_ANDROID) if (auto_pip_setting_overlay_) { -@@ -1309,7 +1339,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { +@@ -1298,7 +1328,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { } int PictureInPictureBrowserFrameView::GetTopAreaHeight() const { @@ -958,10 +931,10 @@ index b862ceac7225d..9575440a77d67 100644 LocationBarView* location_bar_view = browser_view_->GetLocationBarView(); CHECK(location_bar_view); diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc -index db003cd7f8329..9ba9064ef0563 100644 +index ad0147f9b8fe8..80aea21bb605a 100644 --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc -@@ -95,6 +95,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, +@@ -96,6 +96,12 @@ void PageActionIconController::Init(const PageActionIconParams& params, }; for (PageActionIconType type : params.types_enabled) { @@ -1021,10 +994,10 @@ index 880d83324cfa6..a6a80cd0b3def 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index e97342ef97514..03b140c9fc7c6 100644 +index e02fe5d5e6290..9e893b2ff1727 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -191,7 +191,7 @@ class TabstripLikeBackground : public views::Background { +@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background { void Paint(gfx::Canvas* canvas, views::View* view) const override { bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view, browser_view_); @@ -1033,7 +1006,7 @@ index e97342ef97514..03b140c9fc7c6 100644 SkColor frame_color = browser_view_->frame()->GetFrameView()->GetFrameColor( BrowserFrameActiveState::kUseCurrent); -@@ -221,12 +221,13 @@ END_METADATA +@@ -222,12 +222,13 @@ END_METADATA //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -1049,7 +1022,7 @@ index e97342ef97514..03b140c9fc7c6 100644 SetID(VIEW_ID_TOOLBAR); container_view_ = AddChildView(std::make_unique()); -@@ -248,9 +249,24 @@ ToolbarView::~ToolbarView() { +@@ -251,9 +252,24 @@ ToolbarView::~ToolbarView() { for (const auto& view_and_command : GetViewCommandMap()) chrome::RemoveCommandObserver(browser_, view_and_command.second, this); @@ -1074,7 +1047,7 @@ index e97342ef97514..03b140c9fc7c6 100644 #if defined(USE_AURA) // Avoid generating too many occlusion tracking calculation events before this // function returns. The occlusion status will be computed only once once this -@@ -275,12 +291,12 @@ void ToolbarView::Init() { +@@ -278,12 +294,12 @@ void ToolbarView::Init() { auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, @@ -1089,7 +1062,7 @@ index e97342ef97514..03b140c9fc7c6 100644 download_button = std::make_unique(browser_view_); } -@@ -362,8 +378,10 @@ void ToolbarView::Init() { +@@ -365,8 +381,10 @@ void ToolbarView::Init() { } } std::unique_ptr cast; @@ -1101,7 +1074,7 @@ index e97342ef97514..03b140c9fc7c6 100644 std::unique_ptr media_button; if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) { -@@ -373,7 +391,8 @@ void ToolbarView::Init() { +@@ -376,7 +394,8 @@ void ToolbarView::Init() { std::unique_ptr send_tab_to_self_button; @@ -1111,7 +1084,7 @@ index e97342ef97514..03b140c9fc7c6 100644 send_tab_to_self_button = std::make_unique( browser_view_); -@@ -452,7 +471,7 @@ void ToolbarView::Init() { +@@ -461,7 +480,7 @@ void ToolbarView::Init() { send_tab_to_self_button_ = container_view_->AddChildView(std::move(send_tab_to_self_button)); @@ -1120,7 +1093,7 @@ index e97342ef97514..03b140c9fc7c6 100644 if (companion::IsCompanionFeatureEnabled()) { side_panel_container_ = container_view_->AddChildView( std::make_unique(browser_view_)); -@@ -818,7 +837,7 @@ void ToolbarView::Layout(PassKey) { +@@ -828,7 +847,7 @@ void ToolbarView::Layout(PassKey) { if (display_mode_ == DisplayMode::NORMAL) { LayoutCommon(); @@ -1130,10 +1103,10 @@ index e97342ef97514..03b140c9fc7c6 100644 } } diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index 1163e52e738ce..e70ebde66fb25 100644 +index 2437b17ffab96..24ac297165db1 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h -@@ -93,7 +93,8 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView, // needs to be displayed. }; @@ -1143,3 +1116,16 @@ index 1163e52e738ce..e70ebde66fb25 100644 ToolbarView(const ToolbarView&) = delete; ToolbarView& operator=(const ToolbarView&) = delete; ~ToolbarView() override; +diff --git chrome/browser/ui/web_applications/web_app_menu_model.cc chrome/browser/ui/web_applications/web_app_menu_model.cc +index 09eb9dbce62f6..93e6dde56ca16 100644 +--- chrome/browser/ui/web_applications/web_app_menu_model.cc ++++ chrome/browser/ui/web_applications/web_app_menu_model.cc +@@ -216,7 +216,7 @@ void WebAppMenuModel::Build() { + } + if (media_router::MediaRouterEnabled(browser()->profile())) + AddItemWithStringId(IDC_ROUTE_MEDIA, IDS_MEDIA_ROUTER_MENU_ITEM_TITLE); +- if (!features::IsChromeRefresh2023()) { ++ if (!features::IsChromeRefresh2023() && IsCommandIdVisible(IDC_EDIT_MENU)) { + AddSeparator(ui::LOWER_SEPARATOR); + CreateCutCopyPasteMenu(); + } diff --git a/patch/patches/chrome_utility_client.patch b/patch/patches/chrome_utility_client.patch index f3a3cd783..412e7c21e 100644 --- a/patch/patches/chrome_utility_client.patch +++ b/patch/patches/chrome_utility_client.patch @@ -1,8 +1,8 @@ diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc -index c15d1fa6d6e25..f7356f7c1ef64 100644 +index 8a498ddd2c563..1a96939d54079 100644 --- chrome/utility/chrome_content_utility_client.cc +++ chrome/utility/chrome_content_utility_client.cc -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "base/path_service.h" #include "base/task/single_thread_task_runner.h" #include "build/build_config.h" @@ -10,7 +10,7 @@ index c15d1fa6d6e25..f7356f7c1ef64 100644 #include "chrome/common/chrome_paths.h" #include "chrome/common/profiler/thread_profiler.h" #include "chrome/common/profiler/thread_profiler_configuration.h" -@@ -54,7 +55,11 @@ void ChromeContentUtilityClient::UtilityThreadStarted() { +@@ -55,7 +56,11 @@ 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. @@ -20,6 +20,6 @@ index c15d1fa6d6e25..f7356f7c1ef64 100644 + && !cef::IsAlloyRuntimeEnabled() +#endif + ) { + const auto* heap_profiler_controller = + heap_profiling::HeapProfilerController::GetInstance(); // The HeapProfilerController should have been created in - // ChromeMainDelegate::PostEarlyInitialization. - using HeapProfilerController = heap_profiling::HeapProfilerController; diff --git a/patch/patches/color_provider_manager_3610.patch b/patch/patches/color_provider_manager_3610.patch index a52142adf..e8730b977 100644 --- a/patch/patches/color_provider_manager_3610.patch +++ b/patch/patches/color_provider_manager_3610.patch @@ -1,5 +1,5 @@ diff --git ui/color/color_provider_manager.cc ui/color/color_provider_manager.cc -index a0933fab35037..7a381e24a8816 100644 +index 452f80c94d684..671f36923741d 100644 --- ui/color/color_provider_manager.cc +++ ui/color/color_provider_manager.cc @@ -46,6 +46,15 @@ std::optional& GetGlobalManager() { diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 890f31f63..fae053d3b 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index 7c7589a393254..573c11adc21c7 100644 +index c16e81b7d357f..2e74fc89de36f 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -115,7 +115,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -68,7 +68,7 @@ index 6af484f35f576..2462700b6d1fb 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 6af8af9ed5f95..4cf7b7a56f07a 100644 +index 47e37a2aaa79c..7a65e0654453a 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -38,6 +38,7 @@ component("controller") { @@ -79,7 +79,7 @@ index 6af8af9ed5f95..4cf7b7a56f07a 100644 "//third_party/blink/renderer:config", "//third_party/blink/renderer:inside_blink", "//third_party/blink/renderer:non_test_config", -@@ -65,6 +66,8 @@ component("controller") { +@@ -67,6 +68,8 @@ component("controller") { "performance_manager/v8_detailed_memory_reporter_impl.h", "performance_manager/v8_worker_memory_reporter.cc", "performance_manager/v8_worker_memory_reporter.h", diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index b86172e89..8eee1595b 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 724be962f293c..88260e45c55ad 100644 +index 2068552edfba8..6ef07a0a5b7fa 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -591,7 +591,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -12,10 +12,10 @@ index 724be962f293c..88260e45c55ad 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 7bd47c28bab3e..38258cbd9641a 100644 +index eef1951861e8b..4800ef3400623 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -849,7 +849,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -850,7 +850,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( mojo::PendingRemote terminal_external_protocol; bool handled = GetContentClient()->browser()->HandleExternalProtocol( @@ -24,7 +24,7 @@ index 7bd47c28bab3e..38258cbd9641a 100644 frame_tree_node->frame_tree_node_id(), navigation_ui_data, request_info.is_primary_main_frame, frame_tree_node->IsInFencedFrameTree(), request_info.sandbox_flags, -@@ -861,6 +861,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -862,6 +862,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( *request_info.initiator_document_token) : nullptr, &terminal_external_protocol); @@ -47,10 +47,10 @@ index 7bd47c28bab3e..38258cbd9641a 100644 return std::make_pair( /*is_cacheable=*/false, diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index d2975a6c36e2c..70040d91977ca 100644 +index 62fed61bd87f1..7a4631e9fb6b7 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -1090,7 +1090,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -1100,7 +1100,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -59,7 +59,7 @@ index d2975a6c36e2c..70040d91977ca 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1099,6 +1099,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -1109,6 +1109,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -68,10 +68,10 @@ index d2975a6c36e2c..70040d91977ca 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 6aea068af5ab0..82f40ed3b70fb 100644 +index 406607bd32563..e32e445aa8923 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -2061,7 +2061,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2079,7 +2079,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. @@ -80,7 +80,7 @@ index 6aea068af5ab0..82f40ed3b70fb 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -2282,6 +2282,21 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2300,6 +2300,21 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -102,7 +102,7 @@ index 6aea068af5ab0..82f40ed3b70fb 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. -@@ -2339,6 +2354,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2357,6 +2372,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -139,10 +139,10 @@ index a062418a22ec9..9b97b77a1f916 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index d38d1cbd515be..7ac2dfe95fdd0 100644 +index da4a8410a6c5d..41cb281d271dd 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -548,6 +548,8 @@ void RenderThreadImpl::Init() { +@@ -549,6 +549,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -152,10 +152,10 @@ index d38d1cbd515be..7ac2dfe95fdd0 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 81b4ff933b5d9..859ad94d4c224 100644 +index c053926291ea4..6edf384e53cd8 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1001,6 +1001,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -989,6 +989,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -186,10 +186,10 @@ index d5ab3967f21cc..b6494070f6840 100644 // plus eTLD+1, such as https://google.com), or to a more specific origin. void SetIsLockedToSite(); diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc -index 5f2cc5ce07558..8e3324ebefc12 100644 +index d8a569dde0012..d3e755f66e4ec 100644 --- content/shell/browser/shell_content_browser_client.cc +++ content/shell/browser/shell_content_browser_client.cc -@@ -734,7 +734,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( +@@ -749,7 +749,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -198,7 +198,7 @@ index 5f2cc5ce07558..8e3324ebefc12 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -743,6 +743,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( +@@ -758,6 +758,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { ConfigureNetworkContextParamsForShell(context, network_context_params, cert_verifier_creation_params); @@ -207,10 +207,10 @@ index 5f2cc5ce07558..8e3324ebefc12 100644 std::vector diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h -index f73d9b1264238..145052c3cadd4 100644 +index 810c7adb1e2b9..1827d957ed012 100644 --- content/shell/browser/shell_content_browser_client.h +++ content/shell/browser/shell_content_browser_client.h -@@ -146,7 +146,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { +@@ -151,7 +151,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { GetGeolocationSystemPermissionManager() override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -220,10 +220,10 @@ index f73d9b1264238..145052c3cadd4 100644 bool in_memory, const base::FilePath& relative_partition_path, diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc -index 9e6c52dab9abb..e5c3bc53e27d3 100644 +index e4be49f9cccf8..6132a90e5ee93 100644 --- headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc -@@ -297,7 +297,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( +@@ -301,7 +301,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed( return true; } @@ -232,7 +232,7 @@ index 9e6c52dab9abb..e5c3bc53e27d3 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -307,6 +307,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( +@@ -311,6 +311,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams( in_memory, relative_partition_path, network_context_params, cert_verifier_creation_params); @@ -241,12 +241,12 @@ index 9e6c52dab9abb..e5c3bc53e27d3 100644 std::string HeadlessContentBrowserClient::GetProduct() { diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h -index c5413f8d2979f..f323ff7843dc4 100644 +index 90cc52b93e737..882f385844d59 100644 --- headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h -@@ -83,7 +83,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { - const url::Origin& accessing_origin, - std::string* out_debug_message = nullptr) override; +@@ -85,7 +85,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { + std::string* out_debug_message, + bool* out_block_is_site_setting_specific) override; - void ConfigureNetworkContextParams( + bool ConfigureNetworkContextParams( diff --git a/patch/patches/content_initiator_policy_323753235.patch b/patch/patches/content_initiator_policy_323753235.patch new file mode 100644 index 000000000..be63003de --- /dev/null +++ b/patch/patches/content_initiator_policy_323753235.patch @@ -0,0 +1,12 @@ +diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc +index e1ca048945905..db386eca4d8d3 100644 +--- content/browser/renderer_host/navigation_policy_container_builder.cc ++++ content/browser/renderer_host/navigation_policy_container_builder.cc +@@ -43,7 +43,6 @@ std::unique_ptr GetInitiatorPolicies( + RenderFrameHostImpl::GetPolicyContainerHost( + frame_token, initiator_process_id, storage_partition); + +- DCHECK(initiator_policy_container_host); + if (!initiator_policy_container_host) { + // Guard against wrong tokens being passed accidentally. + return nullptr; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index ad489ba27..fbce58c20 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -12,7 +12,7 @@ index 79ba3ac1913f8..46bcb4366d2f8 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/app/content_main.cc content/app/content_main.cc -index 91feb21f4249e..88643fdeb4c4c 100644 +index 96c28a7ce3183..3d60ab170e9a5 100644 --- content/app/content_main.cc +++ content/app/content_main.cc @@ -174,11 +174,8 @@ ContentMainParams::~ContentMainParams() = default; @@ -39,14 +39,14 @@ index 91feb21f4249e..88643fdeb4c4c 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 -@@ -274,20 +268,13 @@ RunContentProcess(ContentMainParams params, +@@ -274,14 +268,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) - // We need this pool for all the objects created before we get to the event - // loop, but we don't want to leave them hanging around until the app quits. - // Each "main" needs to flush this pool right before it goes into its main -- // event loop to get rid of the cruft. TODO(https://crbug.com/1424190): This +- // event loop to get rid of the cruft. TODO(crbug.com/40260311): This - // is not safe. Each main loop should create and destroy its own pool; it - // should not be flushing the pool at the base of the autorelease pool - // stack. @@ -54,43 +54,7 @@ index 91feb21f4249e..88643fdeb4c4c 100644 InitializeMac(); #endif -+ base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); -+ - #if BUILDFLAG(IS_IOS) - base::ConditionVariable::InitializeFeatures(); -- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); - command_line->AppendSwitch(switches::kEnableViewport); - command_line->AppendSwitch(switches::kUseMobileUserAgent); - #endif -@@ -304,19 +291,19 @@ RunContentProcess(ContentMainParams params, - } - - #if BUILDFLAG(IS_WIN) -- base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); -- if (command_line->HasSwitch(switches::kHeadless)) { -- // When running in headless mode we want stdio routed however if -- // console does not exist we should not create one. -- base::RouteStdioToConsole(/*create_console_if_not_found*/ false); -- } else if (command_line->HasSwitch(switches::kEnableLogging)) { -+ if (command_line->HasSwitch(switches::kEnableLogging)) { -+ // Don't route to console for "handle" type in child processes. -+ if (command_line->GetSwitchValueASCII(switches::kEnableLogging) != -+ "handle") { -+ base::RouteStdioToConsole(/*create_console_if_not_found*/ true); -+ } -+ } else if (command_line->HasSwitch(switches::kHeadless)) { - // Route stdio to parent console (if any) or create one. - base::RouteStdioToConsole(/*create_console_if_not_found*/ true); - } - #endif - -- if (base::CommandLine::ForCurrentProcess()->HasSwitch( -- ::switches::kTraceToConsole)) { -+ if (command_line->HasSwitch(::switches::kTraceToConsole)) { - base::trace_event::TraceConfig trace_config = - tracing::GetConfigForTraceToConsole(); - base::trace_event::TraceLog::GetInstance()->SetEnabled( -@@ -326,12 +313,46 @@ RunContentProcess(ContentMainParams params, +@@ -329,12 +315,46 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -139,7 +103,7 @@ index 91feb21f4249e..88643fdeb4c4c 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index faa4e5ced67f3..946f26d2c5fe7 100644 +index 5e4c1f8d6c872..6df7bdba1cff7 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -47,6 +47,7 @@ @@ -150,7 +114,7 @@ index faa4e5ced67f3..946f26d2c5fe7 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1349,6 +1350,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } diff --git a/patch/patches/content_renderer_host_3617.patch b/patch/patches/content_renderer_host_3617.patch index 434aef57d..7dc3741d1 100644 --- a/patch/patches/content_renderer_host_3617.patch +++ b/patch/patches/content_renderer_host_3617.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc -index 1dcae1e41f4dc..43951c1c55f1a 100644 +index 83defaaaad55d..76486ceed16e5 100644 --- content/browser/renderer_host/render_process_host_impl.cc +++ content/browser/renderer_host/render_process_host_impl.cc -@@ -1624,7 +1624,8 @@ bool RenderProcessHostImpl::Init() { +@@ -1628,7 +1628,8 @@ bool RenderProcessHostImpl::Init() { // initialized because in tests the factory may never have been initialized. if (!GetBrowserContext()->IsOffTheRecord() && !base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 9b6051337..163fad100 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -81,19 +81,19 @@ index 30a2c1adc4509..b60a7afaf1e5e 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index 81fb33468431c..9b0d500e37452 100644 +index a29f22161328a..4de56b81683f3 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc -@@ -6,6 +6,8 @@ - +@@ -7,6 +7,8 @@ #include + #include +#include + #include "base/base_switches.h" #include "base/command_line.h" #include "base/format_macros.h" -@@ -99,8 +101,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { +@@ -100,8 +102,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { "commandline-disabled-feature"); } @@ -105,7 +105,7 @@ index 81fb33468431c..9b0d500e37452 100644 static const char* const kIgnoreSwitches[] = { switches::kEnableLogging, switches::kFlagSwitchesBegin, -@@ -159,11 +163,9 @@ bool IsBoringSwitch(const std::string& flag) { +@@ -160,11 +164,9 @@ bool IsBoringSwitch(const std::string& flag) { return false; } @@ -270,7 +270,7 @@ index a604df7a5ea6a..618fbde10a65c 100644 } // namespace crash_reporter diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc -index 4a25417a565fd..a7a1d451b56f9 100644 +index 874ade6000ded..31fffc23197fc 100644 --- components/crash/core/app/crashpad.cc +++ components/crash/core/app/crashpad.cc @@ -137,7 +137,8 @@ bool InitializeCrashpadImpl(bool initial_client, @@ -462,10 +462,10 @@ index eb5bcfe0234c3..8963b26806922 100644 handler_path, *database_path, metrics_path, url, GetProcessSimpleAnnotations(), arguments, true, false); diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc -index 15addd5c5e663..f30027b9b6f3c 100644 +index 0e00d26f79231..fdd2b4bc73f8e 100644 --- components/crash/core/app/crashpad_win.cc +++ components/crash/core/app/crashpad_win.cc -@@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations( +@@ -37,8 +37,8 @@ void GetPlatformCrashpadAnnotations( std::wstring product_name, version, special_build, channel_name; crash_reporter_client->GetProductNameAndVersion( exe_file, &product_name, &version, &special_build, &channel_name); @@ -476,7 +476,7 @@ index 15addd5c5e663..f30027b9b6f3c 100644 #if BUILDFLAG(GOOGLE_CHROME_BRANDING) // Empty means stable. const bool allow_empty_channel = true; -@@ -54,9 +54,11 @@ void GetPlatformCrashpadAnnotations( +@@ -55,9 +55,11 @@ void GetPlatformCrashpadAnnotations( if (!special_build.empty()) (*annotations)["special"] = base::WideToUTF8(special_build); #if defined(ARCH_CPU_X86) @@ -490,7 +490,7 @@ index 15addd5c5e663..f30027b9b6f3c 100644 #endif } -@@ -71,7 +73,9 @@ bool PlatformCrashpadInitialization( +@@ -72,7 +74,9 @@ bool PlatformCrashpadInitialization( base::FilePath metrics_path; // Only valid in the browser process. const char kPipeNameVar[] = "CHROME_CRASHPAD_PIPE_NAME"; @@ -500,7 +500,7 @@ index 15addd5c5e663..f30027b9b6f3c 100644 std::unique_ptr env(base::Environment::Create()); CrashReporterClient* crash_reporter_client = GetCrashReporterClient(); -@@ -94,9 +98,11 @@ bool PlatformCrashpadInitialization( +@@ -95,9 +99,11 @@ bool PlatformCrashpadInitialization( std::string url = crash_reporter_client->GetUploadUrl(); @@ -512,7 +512,7 @@ index 15addd5c5e663..f30027b9b6f3c 100644 base::FilePath exe_file(exe_path); if (exe_file.empty()) { -@@ -107,13 +113,14 @@ bool PlatformCrashpadInitialization( +@@ -108,13 +114,14 @@ bool PlatformCrashpadInitialization( exe_file = base::FilePath(exe_file_path); } @@ -533,7 +533,7 @@ index 15addd5c5e663..f30027b9b6f3c 100644 start_arguments.push_back(std::string("--user-data-dir=") + user_data_dir); @@ -124,9 +131,12 @@ bool PlatformCrashpadInitialization( - start_arguments.push_back("/prefetch:4"); + app_launch_prefetch::SubprocessType::kCrashpad))); } else { base::FilePath exe_dir = exe_file.DirName(); - exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe")); diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index 28e777aa0..d9efd2827 100644 --- a/patch/patches/embedder_product_override.patch +++ b/patch/patches/embedder_product_override.patch @@ -1,5 +1,5 @@ diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc -index 1a388cf3b3c0b..f570a2e1f396b 100644 +index fe76e8806f05f..30b184844a5b5 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -18,6 +18,7 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 8721adbf4..c7579127c 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc -index 96a290eef86ca..bee0f9eaad71e 100644 +index b9b147c8c11df..1e3acf4e679ae 100644 --- chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc @@ -6,6 +6,7 @@ @@ -10,7 +10,7 @@ index 96a290eef86ca..bee0f9eaad71e 100644 #include "chrome/browser/extensions/extension_tab_util.h" #include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h" #include "components/no_state_prefetch/browser/no_state_prefetch_contents.h" -@@ -27,6 +28,10 @@ +@@ -26,6 +27,10 @@ #include "pdf/pdf_features.h" #endif // BUILDFLAG(ENABLE_PDF) @@ -21,7 +21,7 @@ index 96a290eef86ca..bee0f9eaad71e 100644 namespace extensions { void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( -@@ -44,6 +49,9 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( +@@ -43,6 +48,9 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( if (!web_contents) return; @@ -31,7 +31,7 @@ index 96a290eef86ca..bee0f9eaad71e 100644 // If the request was for NoStatePrefetch, abort the prefetcher and do not // continue. This is because plugins cancel NoStatePrefetch, see // http://crbug.com/343590. -@@ -54,6 +62,9 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( +@@ -53,6 +61,9 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( no_state_prefetch_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD); return; } @@ -41,7 +41,7 @@ index 96a290eef86ca..bee0f9eaad71e 100644 auto* browser_context = web_contents->GetBrowserContext(); -@@ -80,9 +91,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( +@@ -79,9 +90,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent( // forms of zooming won't work). // TODO(crbug.com/40114809): Present a coherent representation of a tab id for // portal contents. @@ -64,7 +64,7 @@ index 96a290eef86ca..bee0f9eaad71e 100644 std::unique_ptr stream_container( new StreamContainer(tab_id, embedded, handler_url, extension_id, diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index 5a0ba568bf30c..8ef4be85e038a 100644 +index 2bf778dd0c85d..c75d693c6487b 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -142,12 +142,13 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -203,10 +203,10 @@ index c3197eb4790fa..f558ff72bdbac 100644 } diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 7e5c2918e273f..f00799f9e0dad 100644 +index 8b515b7b8c353..f8e4106ac26d4 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -34,6 +34,7 @@ +@@ -33,6 +33,7 @@ #include "url/gurl.h" class ExtensionFunctionRegistry; @@ -214,7 +214,7 @@ index 7e5c2918e273f..f00799f9e0dad 100644 class PrefService; namespace base { -@@ -82,6 +83,7 @@ class ComponentExtensionResourceManager; +@@ -81,6 +82,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -238,7 +238,7 @@ index 7e5c2918e273f..f00799f9e0dad 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 b86a71429eb33..9f7d190975605 100644 +index c9793db28037b..e5f017bf2f2f8 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc @@ -353,9 +353,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 6c1cdf7d1..22dea006f 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index e6f5cbc9c49f9..f64ed7ae77ea1 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 357f7117f8737..724ddd9d61110 100644 +index 3ede70d5d17be..764ce45183919 100644 --- BUILD.gn +++ BUILD.gn @@ -20,6 +20,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -76,7 +76,7 @@ index 1da479dd5eebc..ff9c7e467997c 100644 - visual_studio_runtime_dirs = [] } diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 8acc61076fcf6..4887fe263669c 100644 +index 87e4b167b6a55..6dafb9ac4ed94 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -5,6 +5,7 @@ @@ -87,7 +87,7 @@ index 8acc61076fcf6..4887fe263669c 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//components/compose/features.gni") -@@ -80,6 +81,10 @@ template("chrome_repack_percent") { +@@ -82,6 +83,10 @@ template("chrome_repack_percent") { "//ui/chromeos/resources", ] } @@ -99,7 +99,7 @@ index 8acc61076fcf6..4887fe263669c 100644 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] deps += [ "//extensions:extensions_browser_resources" ] diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni -index 064c39ffe307e..c430ab71419cb 100644 +index 2f5fedb03bc6b..b3b7126aa0f42 100644 --- chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") @@ -110,7 +110,7 @@ index 064c39ffe307e..c430ab71419cb 100644 import("//extensions/buildflags/buildflags.gni") import("//tools/grit/repack.gni") -@@ -107,6 +108,10 @@ template("chrome_repack_locales") { +@@ -105,6 +106,10 @@ template("chrome_repack_locales") { source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ] deps += [ "//components/strings:search_engine_descriptions_strings" ] } @@ -122,7 +122,7 @@ index 064c39ffe307e..c430ab71419cb 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 b94944f6d5527..eecf0673e027e 100644 +index 17c3d731e269b..e2caaf2934cdd 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -7,6 +7,7 @@ import("//build/config/features.gni") diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 118be5d7a..f5a510998 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 8ee4bb1061fe7..a4ed628208426 100644 +index f3ca54d7277ac..16a52e64f3078 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1311,6 +1311,15 @@ +@@ -1312,6 +1312,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/light_mode_3534.patch b/patch/patches/light_mode_3534.patch index 24e0bfb8e..1a9c3d7a0 100644 --- a/patch/patches/light_mode_3534.patch +++ b/patch/patches/light_mode_3534.patch @@ -93,10 +93,10 @@ index f62df6eb7d12b..68f78b5e8bce0 100644 static bool kIsForcedHighContrast = base::CommandLine::ForCurrentProcess()->HasSwitch( diff --git ui/native_theme/native_theme.h ui/native_theme/native_theme.h -index 74b3f56ec91a8..78e548bbea4de 100644 +index fc32dfb0de44f..44ca8103247b1 100644 --- ui/native_theme/native_theme.h +++ ui/native_theme/native_theme.h -@@ -597,6 +597,9 @@ class NATIVE_THEME_EXPORT NativeTheme { +@@ -587,6 +587,9 @@ class NATIVE_THEME_EXPORT NativeTheme { // Whether dark mode is forced via command-line flag. static bool IsForcedDarkMode(); @@ -129,7 +129,7 @@ index 9ca3120cfe3ac..c29c17330a7e5 100644 theme->NotifyOnNativeThemeUpdated(); }]; diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc -index 4c922cce6fe89..196fc0a6c07b2 100644 +index 547872076d126..14d0e817f3243 100644 --- ui/native_theme/native_theme_win.cc +++ ui/native_theme/native_theme_win.cc @@ -673,14 +673,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const { diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 4719e5034..079ffc850 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,5 +1,5 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index 8f4f33fd83ef6..be3c8f5ff50c1 100644 +index add20a2f81d66..97071092ff768 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc @@ -191,7 +191,7 @@ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() { diff --git a/patch/patches/linux_glib_deprecated_volatile.patch b/patch/patches/linux_glib_deprecated_volatile.patch index 148267c71..eead9fa5a 100644 --- a/patch/patches/linux_glib_deprecated_volatile.patch +++ b/patch/patches/linux_glib_deprecated_volatile.patch @@ -1,8 +1,8 @@ diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn -index fc99800e70eb2..23d38bf15155f 100644 +index 3e295499c9ddf..f9109fecb2f49 100644 --- ui/accessibility/platform/BUILD.gn +++ ui/accessibility/platform/BUILD.gn -@@ -290,6 +290,10 @@ component("platform") { +@@ -305,6 +305,10 @@ component("platform") { if (use_gio) { configs += [ "//build/linux:gio_config" ] } diff --git a/patch/patches/linux_gtk_theme_3610.patch b/patch/patches/linux_gtk_theme_3610.patch index 76704dca7..8a20c341f 100644 --- a/patch/patches/linux_gtk_theme_3610.patch +++ b/patch/patches/linux_gtk_theme_3610.patch @@ -1,5 +1,5 @@ diff --git ui/gtk/gtk_ui.cc ui/gtk/gtk_ui.cc -index ab8f0d6b545b2..c4bd035f1cec4 100644 +index 7b81a752ffad2..24297039e23d4 100644 --- ui/gtk/gtk_ui.cc +++ ui/gtk/gtk_ui.cc @@ -26,6 +26,7 @@ @@ -27,7 +27,7 @@ index ab8f0d6b545b2..c4bd035f1cec4 100644 &GtkUi::OnCursorThemeNameChanged); connect(settings, "notify::gtk-cursor-theme-size", diff --git ui/ozone/platform/x11/ozone_platform_x11.cc ui/ozone/platform/x11/ozone_platform_x11.cc -index 417f9f92d4307..388510591d913 100644 +index 39e18820db0d0..0971f5b63d23d 100644 --- ui/ozone/platform/x11/ozone_platform_x11.cc +++ ui/ozone/platform/x11/ozone_platform_x11.cc @@ -64,6 +64,8 @@ namespace ui { diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index b40e45439..0329aff9d 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 49f0ddab8318e..a3a9cd189fc2f 100644 +index 03302777935ba..4e53392605c37 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_chrome_locale_3623.patch b/patch/patches/mac_chrome_locale_3623.patch index fd742e3fe..aeef1ffa7 100644 --- a/patch/patches/mac_chrome_locale_3623.patch +++ b/patch/patches/mac_chrome_locale_3623.patch @@ -98,10 +98,10 @@ index aa43742055b04..e84f21ab963cc 100644 // it will get the locale that should be used potentially from other sources, // depending on the platform (e.g. the OS locale on Mac). diff --git ui/base/l10n/l10n_util.cc ui/base/l10n/l10n_util.cc -index efb5dd2cfe061..965106e026fa3 100644 +index e7beb8277966b..63f2680128e72 100644 --- ui/base/l10n/l10n_util.cc +++ ui/base/l10n/l10n_util.cc -@@ -501,25 +501,7 @@ bool CheckAndResolveLocale(const std::string& locale, +@@ -502,25 +502,7 @@ bool CheckAndResolveLocale(const std::string& locale, return CheckAndResolveLocale(locale, resolved_locale, /*perform_io=*/true); } @@ -128,7 +128,7 @@ index efb5dd2cfe061..965106e026fa3 100644 std::string resolved_locale; std::vector candidates; -@@ -584,15 +566,6 @@ std::string GetApplicationLocaleInternalNonMac(const std::string& pref_locale) { +@@ -585,15 +567,6 @@ std::string GetApplicationLocaleInternalNonMac(const std::string& pref_locale) { return std::string(); } diff --git a/patch/patches/mac_platform_style_bubble_893292.patch b/patch/patches/mac_platform_style_bubble_893292.patch index 89977aac4..fe89eb1d3 100644 --- a/patch/patches/mac_platform_style_bubble_893292.patch +++ b/patch/patches/mac_platform_style_bubble_893292.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc -index 3efb90bd0027a..e9b5110fe739c 100644 +index b87138e45c207..4542996484462 100644 --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -1170,8 +1170,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { +@@ -1167,8 +1167,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { ->GetDisplayNearestPoint(anchor_rect.CenterPoint()) .work_area(); int available_space = screen_space.bottom() - anchor_rect.bottom(); diff --git a/patch/patches/mac_render_widget_3680.patch b/patch/patches/mac_render_widget_3680.patch index e1e34f253..2abd8682c 100644 --- a/patch/patches/mac_render_widget_3680.patch +++ b/patch/patches/mac_render_widget_3680.patch @@ -1,8 +1,8 @@ diff --git content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -index 0c9e9a86a0242..dc80361d0c9a0 100644 +index 1cb6eb60ef419..b0bdc60cebc0d 100644 --- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm -@@ -165,6 +165,13 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -166,6 +166,13 @@ void ExtractUnderlines(NSAttributedString* string, // RenderWidgetHostViewCocoa --------------------------------------------------- @@ -16,7 +16,7 @@ index 0c9e9a86a0242..dc80361d0c9a0 100644 // Private methods: @interface RenderWidgetHostViewCocoa () -@@ -750,6 +757,14 @@ void ExtractUnderlines(NSAttributedString* string, +@@ -762,6 +769,15 @@ void ExtractUnderlines(NSAttributedString* string, } - (BOOL)acceptsFirstMouse:(NSEvent*)theEvent { @@ -28,6 +28,7 @@ index 0c9e9a86a0242..dc80361d0c9a0 100644 + return NO; + } + } - return [self acceptsMouseEventsWhenInactive]; ++ + // Enable "click-through" if mouse clicks are accepted in inactive windows + return [self acceptsMouseEventsOption] > kAcceptMouseEventsInActiveWindow; } - diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 7b36bbdf8..13bd3bee5 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 b136708121867..ee2ba2b731291 100644 +index 5a48d5b098d86..95ebca554932f 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -10,12 +10,12 @@ index b136708121867..ee2ba2b731291 100644 #include "base/message_loop/message_pump_win.h" #include -@@ -577,7 +578,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { +@@ -572,7 +573,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { ctx.event()->set_chrome_message_pump(); msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible); }); - has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; -+ ++ + // We should not process all window messages if we are in the context of an + // OS modal loop, i.e. in the context of a windows API call like MessageBox. + // This is to ensure that these messages are peeked out by the OS modal loop. @@ -30,7 +30,7 @@ index b136708121867..ee2ba2b731291 100644 } if (has_msg) diff --git base/task/current_thread.cc base/task/current_thread.cc -index a93ee7e4213cb..5550158d94de6 100644 +index c4f8862b21ccf..c8c80509abc91 100644 --- base/task/current_thread.cc +++ base/task/current_thread.cc @@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver( @@ -43,7 +43,7 @@ index a93ee7e4213cb..5550158d94de6 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/task/current_thread.h base/task/current_thread.h -index 22bf2c90f90a5..2b4b95c130745 100644 +index 6e21e7299afbf..c9e12a6e701c2 100644 --- base/task/current_thread.h +++ base/task/current_thread.h @@ -163,6 +163,12 @@ class BASE_EXPORT CurrentThread { @@ -59,7 +59,7 @@ index 22bf2c90f90a5..2b4b95c130745 100644 // Enables nested task processing in scope of an upcoming native message loop. // Some unwanted message loops may occur when using common controls or printer // functions. Hence, nested task processing is disabled by default to avoid -@@ -227,6 +233,13 @@ class BASE_EXPORT CurrentThread { +@@ -232,6 +238,13 @@ class BASE_EXPORT CurrentThread { friend class web::WebTaskEnvironment; raw_ptr current_; diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 6e72c61ea..50b02d5a0 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_pump_apple.mm base/message_loop/message_pump_apple.mm -index 5e9d5f082e2c4..6cc3a5981d55c 100644 +index 570a7583512b0..9a38033880604 100644 --- base/message_loop/message_pump_apple.mm +++ base/message_loop/message_pump_apple.mm -@@ -759,7 +759,8 @@ void MessagePumpUIApplication::Detach() { +@@ -764,7 +764,8 @@ void MessagePumpUIApplication::Detach() { #else ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { @@ -12,7 +12,7 @@ index 5e9d5f082e2c4..6cc3a5981d55c 100644 DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask()); // Pumping events in private runloop modes is known to interact badly with // app modal windows like NSAlert. -@@ -770,7 +771,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { +@@ -775,7 +776,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { } ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() { diff --git a/patch/patches/metrics_system_profile.patch b/patch/patches/metrics_system_profile.patch index 2b1e63c8a..cd8559f7c 100644 --- a/patch/patches/metrics_system_profile.patch +++ b/patch/patches/metrics_system_profile.patch @@ -1,8 +1,8 @@ diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc -index f594c075834e3..2165b9196ce03 100644 +index 768c933cd13c6..78d86b97e64bf 100644 --- components/metrics/persistent_system_profile.cc +++ components/metrics/persistent_system_profile.cc -@@ -394,6 +394,10 @@ bool PersistentSystemProfile::GetSystemProfile( +@@ -395,6 +395,10 @@ bool PersistentSystemProfile::GetSystemProfile( return true; } @@ -14,7 +14,7 @@ index f594c075834e3..2165b9196ce03 100644 void PersistentSystemProfile::MergeUpdateRecords( const base::PersistentMemoryAllocator& memory_allocator, diff --git components/metrics/persistent_system_profile.h components/metrics/persistent_system_profile.h -index fc173051fb8c1..3fcc43880e89d 100644 +index 5ef2afa1183a6..a2e00202f7b42 100644 --- components/metrics/persistent_system_profile.h +++ components/metrics/persistent_system_profile.h @@ -64,6 +64,10 @@ class PersistentSystemProfile { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index ea05b6610..5327758d7 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 285dc38950991..326646bb585da 100644 +index 0cc1db9645f04..ab2ae8c744278 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -26,7 +26,7 @@ struct DropData; @@ -12,10 +12,10 @@ index 285dc38950991..326646bb585da 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 bd8b5ddfd8659..767c0ec89ef7a 100644 +index 8a77da73784c8..9ca31537809a3 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 -@@ -205,6 +205,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -204,6 +204,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; @@ -25,7 +25,7 @@ index bd8b5ddfd8659..767c0ec89ef7a 100644 WebContents::CreateWithSessionStorage( params, owner_web_contents() diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h -index 7f59e7925084e..e3e69dc6d3a43 100644 +index 2fb8a60c1f56d..edd275135e60d 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h @@ -7,6 +7,8 @@ @@ -35,9 +35,9 @@ index 7f59e7925084e..e3e69dc6d3a43 100644 +#include "content/public/browser/web_contents.h" + namespace content { + class BrowserContext; class RenderFrameHost; - struct ContextMenuParams; -@@ -25,6 +27,10 @@ class MimeHandlerViewGuestDelegate { +@@ -26,6 +28,10 @@ class MimeHandlerViewGuestDelegate { virtual ~MimeHandlerViewGuestDelegate() {} diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 108ff7997..9871964cc 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index 0e563dbb253ca..891b2bbc3785c 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index b7bc620562e32..0d1f7a049dc3b 100644 +index be520e63b503c..74f842d07499c 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1907,7 +1907,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1905,7 +1905,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 b7bc620562e32..0d1f7a049dc3b 100644 bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const { diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc -index 4e698635af5ac..2f1ffdcd34f3b 100644 +index 3d4cc0dbf277e..eddba6b5a8471 100644 --- services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc -@@ -325,7 +325,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -329,7 +329,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 48f5f3915..1b9d25414 100644 --- a/patch/patches/net_test_server_3798752.patch +++ b/patch/patches/net_test_server_3798752.patch @@ -1,8 +1,8 @@ diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc -index cb651df6d5c67..bf2f7ef2b9319 100644 +index a3ec8894015a8..eec36b0183bce 100644 --- net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc -@@ -1020,7 +1020,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { +@@ -1041,7 +1041,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); @@ -11,7 +11,7 @@ index cb651df6d5c67..bf2f7ef2b9319 100644 if (!io_thread_->task_runner()->PostTaskAndReply( FROM_HERE, std::move(closure), run_loop.QuitClosure())) { return false; -@@ -1047,7 +1047,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( +@@ -1068,7 +1068,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 82560b53f..628b0d929 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -13,10 +13,10 @@ index 431df5d50debe..0fcc9ea8fbb1a 100644 return nullptr; } diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 6902bb7ea90f7..c57b43fe0fce2 100644 +index 7fba410705048..7ce1d8a5eeb7f 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3216,6 +3216,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3292,6 +3292,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -29,10 +29,10 @@ index 6902bb7ea90f7..c57b43fe0fce2 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 b3218a69a1d9e..a7b8e6c20659a 100644 +index dee4fb6b79285..fd3eaef2b6972 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -806,6 +806,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -811,6 +811,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); @@ -72,10 +72,10 @@ index e8ee63f3abc2e..765ea358e093a 100644 } // namespace content diff --git content/common/input/render_input_router.h content/common/input/render_input_router.h -index 9e94dc720f9c9..c3ad0d7d2e6c2 100644 +index cab10100a369d..d8f3be04bfeba 100644 --- content/common/input/render_input_router.h +++ content/common/input/render_input_router.h -@@ -60,6 +60,7 @@ class CONTENT_EXPORT RenderInputRouter : public InputRouterImplClient { +@@ -61,6 +61,7 @@ class CONTENT_EXPORT RenderInputRouter : public InputRouterImplClient { InputRouter* input_router() { return input_router_.get(); } RenderInputRouterDelegate* delegate() { return delegate_; } diff --git a/patch/patches/osr_win_remove_keyed_mutex_2575.patch b/patch/patches/osr_win_remove_keyed_mutex_2575.patch index d4eff9825..eb3c9bd3f 100644 --- a/patch/patches/osr_win_remove_keyed_mutex_2575.patch +++ b/patch/patches/osr_win_remove_keyed_mutex_2575.patch @@ -1,8 +1,8 @@ diff --git gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -index ecabd51db586d..a7ae5e101ca02 100644 +index 58df3e9ad67b2..759f27c07efe9 100644 --- gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc +++ gpu/ipc/service/gpu_memory_buffer_factory_dxgi.cc -@@ -174,7 +174,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( +@@ -180,7 +180,8 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( // so make sure that the usage is one that we support. DCHECK(usage == gfx::BufferUsage::GPU_READ || usage == gfx::BufferUsage::SCANOUT || @@ -12,7 +12,7 @@ index ecabd51db586d..a7ae5e101ca02 100644 << "Incorrect usage, usage=" << gfx::BufferUsageToString(usage); D3D11_TEXTURE2D_DESC desc = { -@@ -188,7 +189,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( +@@ -194,7 +195,9 @@ gfx::GpuMemoryBufferHandle GpuMemoryBufferFactoryDXGI::CreateGpuMemoryBuffer( D3D11_BIND_SHADER_RESOURCE | D3D11_BIND_RENDER_TARGET, 0, D3D11_RESOURCE_MISC_SHARED_NTHANDLE | @@ -24,7 +24,7 @@ index ecabd51db586d..a7ae5e101ca02 100644 Microsoft::WRL::ComPtr d3d11_texture; diff --git media/video/renderable_gpu_memory_buffer_video_frame_pool.cc media/video/renderable_gpu_memory_buffer_video_frame_pool.cc -index a7ac0f10f11e5..bbbfefd486660 100644 +index 1d352951f9592..c346ebf506aa0 100644 --- media/video/renderable_gpu_memory_buffer_video_frame_pool.cc +++ media/video/renderable_gpu_memory_buffer_video_frame_pool.cc @@ -198,7 +198,7 @@ gfx::Size GetBufferSizeInPixelsForVideoPixelFormat( diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index 72f581f67..da2e9d144 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -53,7 +53,7 @@ index c85248ab0d0a0..1595d2aa62bce 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 449f6f2db551e..96cc73b2ca43b 100644 +index 8aea19c0090dc..79f48310eeb1b 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -25,6 +25,7 @@ diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index afe7f3379..85bd8395d 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 57926e0d557fd..0004d03aad8f2 100644 +index d39f6f582109e..42f72e96f0128 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -711,6 +711,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -710,6 +710,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index 95ae6e75b..7ea978073 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index e023edac3fb0a..89ce58885c100 100644 +index 02b98136ad3bd..52dd10da2dfa2 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -945,6 +945,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -944,6 +944,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(k100Percent) { @@ -15,7 +15,7 @@ index e023edac3fb0a..89ce58885c100 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -954,6 +960,11 @@ ResourceBundle::~ResourceBundle() { +@@ -953,6 +959,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,7 +28,7 @@ index e023edac3fb0a..89ce58885c100 100644 void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice"; diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h -index 607e19286e115..61f9569ec614a 100644 +index e2775058db121..691136d0e21d1 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h @@ -220,6 +220,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { diff --git a/patch/patches/rfh_navigation_4829483.patch b/patch/patches/rfh_navigation_4829483.patch index fa0c917fd..f150159a6 100644 --- a/patch/patches/rfh_navigation_4829483.patch +++ b/patch/patches/rfh_navigation_4829483.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc -index 9203a7ad0ef6c..b7ba771e6eea0 100644 +index 3821695f6561f..3cd78bf565086 100644 --- content/browser/renderer_host/render_frame_host_impl.cc +++ content/browser/renderer_host/render_frame_host_impl.cc -@@ -10605,6 +10605,7 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -10854,6 +10854,7 @@ void RenderFrameHostImpl::CommitNavigation( auto browser_calc_origin_to_commit = navigation_request->GetOriginToCommitWithDebugInfo(); if (!process_lock.is_error_page() && !is_mhtml_subframe && diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index ff88a355e..492e2cfd5 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 a52e22d0d43e3..e8403dac2961a 100644 +index df08c0e0fc675..1a2af7a635e75 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 @@ @@ -18,9 +18,9 @@ index a52e22d0d43e3..e8403dac2961a 100644 #include "content/public/common/page_visibility_state.h" #include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/common/input/web_input_event.h" -@@ -724,10 +726,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -738,10 +740,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { - DCHECK(GetBackgroundColor()); + CHECK(GetBackgroundColor()); - SkColor color = *GetBackgroundColor(); - bool opaque = SkColorGetA(color) == SK_AlphaOPAQUE; @@ -35,7 +35,7 @@ index a52e22d0d43e3..e8403dac2961a 100644 } #if BUILDFLAG(IS_WIN) -@@ -2357,6 +2361,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2371,6 +2375,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor() : SK_ColorWHITE); UpdateFrameSinkIdRegistration(); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index eb224b2ea..9bd63e6fc 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc -index 3a8e63a3bcbdd..3fded53efc474 100644 +index 65bc8909d771f..a18907dd1e7ec 100644 --- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc @@ -23,6 +23,7 @@ @@ -23,10 +23,10 @@ index 3a8e63a3bcbdd..3fded53efc474 100644 // If the corresponding Connector policy isn't set, don't perform scans. if (!service || !service->IsConnectorEnabled(connector)) diff --git chrome/browser/first_party_sets/first_party_sets_policy_service.cc chrome/browser/first_party_sets/first_party_sets_policy_service.cc -index e6d8a41c10f3a..18df8a6311d0a 100644 +index a3c34a9922d2e..38c982442bc80 100644 --- chrome/browser/first_party_sets/first_party_sets_policy_service.cc +++ chrome/browser/first_party_sets/first_party_sets_policy_service.cc -@@ -275,6 +275,12 @@ void FirstPartySetsPolicyService::OnProfileConfigReady( +@@ -282,6 +282,12 @@ void FirstPartySetsPolicyService::OnProfileConfigReady( // Representation of the current profile to be persisted on disk. const std::string browser_context_id = profile->GetBaseName().AsUTF8Unsafe(); @@ -40,7 +40,7 @@ index e6d8a41c10f3a..18df8a6311d0a 100644 base::RepeatingCallback browser_context_getter = base::BindRepeating( diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 77d18bd28eeaf..395c62cc348df 100644 +index 627fc56f4f7cf..86d5f8027fd26 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -25,6 +25,7 @@ @@ -51,7 +51,7 @@ index 77d18bd28eeaf..395c62cc348df 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" -@@ -266,9 +267,16 @@ void UpdateCookieSettings(Profile* profile, ContentSettingsType type) { +@@ -239,9 +240,16 @@ void UpdateCookieSettings(Profile* profile, ContentSettingsType type) { // occurs in this class is unsynchronized, so it would be racy to rely on // this update finishing before calling the context's callback.) This // unfortunately triggers a double-update here. @@ -71,24 +71,7 @@ index 77d18bd28eeaf..395c62cc348df 100644 settings = fedcm_context->GetSharingPermissionGrantsAsContentSettings(); } } else { -@@ -323,8 +331,14 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) - base::Unretained(this))); - cookie_settings_ = CookieSettingsFactory::GetForProfile(profile); - cookie_settings_observation_.Observe(cookie_settings_.get()); -- privacy_sandbox_settings_observer_.Observe( -- PrivacySandboxSettingsFactory::GetForProfile(profile)); -+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) -+ if (!cef::IsAlloyRuntimeEnabled()) { -+#endif -+ privacy_sandbox_settings_observer_.Observe( -+ PrivacySandboxSettingsFactory::GetForProfile(profile)); -+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) -+ } -+#endif - - DisableQuicIfNotAllowed(); - -@@ -826,9 +840,16 @@ ProfileNetworkContextService::CreateCookieManagerParams( +@@ -801,9 +809,16 @@ ProfileNetworkContextService::CreateCookieManagerParams( continue; } if (type == ContentSettingsType::FEDERATED_IDENTITY_SHARING) { @@ -108,7 +91,7 @@ index 77d18bd28eeaf..395c62cc348df 100644 out->content_settings[type] = fedcm_context->GetSharingPermissionGrantsAsContentSettings(); } else { -@@ -1082,9 +1103,32 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -1039,9 +1054,32 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( network_context_params->cookie_manager_params = CreateCookieManagerParams(profile_, *cookie_settings_); @@ -142,7 +125,7 @@ index 77d18bd28eeaf..395c62cc348df 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -1093,15 +1137,14 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -1050,15 +1088,14 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( local_state->GetFilePath(prefs::kDiskCacheDir); if (!disk_cache_dir.empty()) base_cache_path = disk_cache_dir.Append(base_cache_path.BaseName()); @@ -162,7 +145,7 @@ index 77d18bd28eeaf..395c62cc348df 100644 network_context_params->file_paths->data_directory = path.Append(chrome::kNetworkDataDirname); network_context_params->file_paths->unsandboxed_data_path = path; -@@ -1276,6 +1319,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -1229,6 +1266,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( network_context_params->first_party_sets_access_delegate_params = network::mojom::FirstPartySetsAccessDelegateParams::New(); network_context_params->first_party_sets_access_delegate_params->enabled = @@ -172,35 +155,8 @@ index 77d18bd28eeaf..395c62cc348df 100644 PrivacySandboxSettingsFactory::GetForProfile(profile_) ->AreRelatedWebsiteSetsEnabled(); -diff --git chrome/browser/net/profile_network_context_service_factory.cc chrome/browser/net/profile_network_context_service_factory.cc -index 14ac2ce8b90c5..c22f8a7a57c69 100644 ---- chrome/browser/net/profile_network_context_service_factory.cc -+++ chrome/browser/net/profile_network_context_service_factory.cc -@@ -6,6 +6,7 @@ - - #include "build/build_config.h" - #include "build/chromeos_buildflags.h" -+#include "cef/libcef/features/runtime.h" - #include "chrome/browser/first_party_sets/first_party_sets_policy_service_factory.h" - #include "chrome/browser/net/profile_network_context_service.h" - #include "chrome/browser/privacy_sandbox/privacy_sandbox_settings_factory.h" -@@ -52,8 +53,14 @@ ProfileNetworkContextServiceFactory::ProfileNetworkContextServiceFactory() - #endif - #if BUILDFLAG(IS_CHROMEOS_ASH) - DependsOn(chromeos::CertificateProviderServiceFactory::GetInstance()); -+#endif -+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) -+ if (!cef::IsAlloyRuntimeEnabled()) { - #endif - DependsOn(PrivacySandboxSettingsFactory::GetInstance()); -+#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) -+ } -+#endif - DependsOn( - first_party_sets::FirstPartySetsPolicyServiceFactory::GetInstance()); - } diff --git chrome/browser/signin/identity_manager_factory.cc chrome/browser/signin/identity_manager_factory.cc -index a635c32482ce0..e478ee670c239 100644 +index 58750a47240e5..2894f323c26bb 100644 --- chrome/browser/signin/identity_manager_factory.cc +++ chrome/browser/signin/identity_manager_factory.cc @@ -11,6 +11,7 @@ @@ -222,7 +178,7 @@ index a635c32482ce0..e478ee670c239 100644 GetInstance()->GetServiceForBrowserContext(profile, true)); } diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index f59e2c8fa8d92..f31ad539a8b36 100644 +index 80af544e4175c..5b1edea7a43cb 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc @@ -630,6 +630,25 @@ void CookieMonster::SetCookieableSchemes( @@ -252,10 +208,10 @@ index f59e2c8fa8d92..f31ad539a8b36 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 e302feb355db4..98449151f2d52 100644 +index b4cb9c4c343a5..976f2134eb055 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -209,6 +209,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -210,6 +210,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -281,7 +237,7 @@ index 3f0be99e0e145..0462ebbe9bedc 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index c251939593cd2..d54817a03066c 100644 +index 60cd3989fe135..d65e76f5b8b75 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc @@ -313,14 +313,9 @@ void CookieManager::AllowFileSchemeCookies( @@ -303,10 +259,10 @@ index c251939593cd2..d54817a03066c 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 5fb60171d3fa8..97e0446856491 100644 +index aa94a653ee3fb..2c105860f5682 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2424,16 +2424,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2434,16 +2434,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -335,7 +291,7 @@ index 5fb60171d3fa8..97e0446856491 100644 base::FeatureList::IsEnabled(features::kFledgePst)) { trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 96943808c6290..c61de0ffd1c4d 100644 +index 10109d4ac851f..23b6f7ff418b9 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom @@ -359,6 +359,9 @@ struct NetworkContextParams { diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index a819c8f86..8a9916828 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 edada1997789f..ecc4c94482327 100644 +index 56f70fef0b2fb..4d2a75eebd102 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -3291,8 +3291,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -3326,8 +3326,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -16,7 +16,7 @@ index edada1997789f..ecc4c94482327 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -3302,9 +3306,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -3337,9 +3341,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 31a4f989e..6cb9df1aa 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -14,7 +14,7 @@ index 112c061004744..ee0ea41872823 100644 if (crashed_overlay_view_.view() == crashed_overlay_view) { return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index 23ddefe2a75b7..5a7eea658ed28 100644 +index 88692c0a858bf..7c277c4bbab11 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h @@ -93,6 +93,10 @@ class WEBVIEW_EXPORT WebView : public View, diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 19a81a756..3e2568dde 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -13,7 +13,7 @@ index 01d2a426e2c17..c239a2f6fc786 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 5127b88e437f0..88ab737e6d2cb 100644 +index 9d073f96177d3..7aaf858bf315c 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -129,7 +129,7 @@ StoragePartition* BrowserContext::GetStoragePartition( diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 7521b9199..5b14a6dc4 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,8 +1,8 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 5f6efb0e93bce..626830a66b73c 100644 +index 4c1a949117a07..1d659b729f2a9 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h -@@ -65,6 +65,8 @@ +@@ -70,6 +70,8 @@ X("cc") \ X("cc.debug") \ X("cdp.perf") \ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index 98b05d7ac..f57102b95 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc -index 15ee19bb52b99..398164f428858 100644 +index b95f9c9a2b856..602dc0588b4a5 100644 --- chrome/browser/ui/views/toolbar/app_menu.cc +++ chrome/browser/ui/views/toolbar/app_menu.cc -@@ -1011,7 +1011,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { +@@ -1032,7 +1032,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { host->button()->GetWidget(), host, host->button()->GetAnchorBoundsInScreen(), views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE, @@ -58,7 +58,7 @@ index fb795f76d3616..6e36a4c1e29da 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index c78845d4a5b3b..f387f67449a6e 100644 +index fa63b2ad55957..0b224818db3d9 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -696,6 +696,14 @@ void RenderText::SetWhitespaceElision(std::optional whitespace_elision) { @@ -97,7 +97,7 @@ index c78845d4a5b3b..f387f67449a6e 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index ae52c62126f2e..49e6fdefadcef 100644 +index c18ec4422d538..e89b7403c5399 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h @@ -356,6 +356,10 @@ class GFX_EXPORT RenderText { @@ -121,7 +121,7 @@ index ae52c62126f2e..49e6fdefadcef 100644 } // namespace gfx diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h -index cbc1a0e7833fe..da451800b1a56 100644 +index c579f65dce9f0..a04e0d1f66aaa 100644 --- ui/views/animation/ink_drop_host.h +++ ui/views/animation/ink_drop_host.h @@ -194,6 +194,8 @@ class VIEWS_EXPORT InkDropHost { @@ -134,10 +134,10 @@ index cbc1a0e7833fe..da451800b1a56 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index eb4dca274cb94..f82527daa1910 100644 +index 265d1bc554133..d3cb82ed3ecec 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -616,6 +616,12 @@ void LabelButton::OnThemeChanged() { +@@ -617,6 +617,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -151,10 +151,10 @@ index eb4dca274cb94..f82527daa1910 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index efcec525b197e..5625074ec41c4 100644 +index 3c862290eab9c..0e85970c08486 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -187,6 +187,9 @@ class VIEWS_EXPORT LabelButton : public Button, +@@ -188,6 +188,9 @@ class VIEWS_EXPORT LabelButton : public Button, // widget, and the parent of the containing widget. ButtonState GetVisualState() const; @@ -165,10 +165,10 @@ index efcec525b197e..5625074ec41c4 100644 LabelButtonImageContainer* image_container() { return image_container_.get(); diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index ae7ea4ef1557d..7db27169fcaab 100644 +index 2c773355d2961..9ccba5a459bd5 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -52,12 +52,29 @@ enum LabelPropertyKey { +@@ -51,12 +51,29 @@ enum LabelPropertyKey { kLabelLineHeight, kLabelObscured, kLabelAllowCharacterBreak, @@ -198,7 +198,7 @@ index ae7ea4ef1557d..7db27169fcaab 100644 } // namespace namespace views { -@@ -473,6 +490,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -485,6 +502,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -214,7 +214,7 @@ index ae7ea4ef1557d..7db27169fcaab 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -781,6 +807,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -789,6 +815,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -232,10 +232,10 @@ index ae7ea4ef1557d..7db27169fcaab 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index 622e808ebffa5..cb6d594d6a8cb 100644 +index 40d9a89b66369..0c7245665d31b 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -241,6 +241,10 @@ class VIEWS_EXPORT Label : public View, +@@ -245,6 +245,10 @@ class VIEWS_EXPORT Label : public View, gfx::ElideBehavior GetElideBehavior() const; void SetElideBehavior(gfx::ElideBehavior elide_behavior); @@ -246,7 +246,7 @@ index 622e808ebffa5..cb6d594d6a8cb 100644 // Gets/Sets the tooltip text. Default behavior for a label (single-line) is // to show the full text if it is wider than its bounds. Calling this // overrides the default behavior and lets you set a custom tooltip. To -@@ -523,6 +527,7 @@ class VIEWS_EXPORT Label : public View, +@@ -524,6 +528,7 @@ class VIEWS_EXPORT Label : public View, int max_width_ = 0; // This is used in single-line mode. int max_width_single_line_ = 0; @@ -255,7 +255,7 @@ index 622e808ebffa5..cb6d594d6a8cb 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index a85f17a892c97..6569abfdb7832 100644 +index a3d188fdde094..afcb6fda0cabe 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc @@ -578,7 +578,8 @@ void MenuController::Run(Widget* parent, @@ -375,19 +375,19 @@ index 0623d151ddd3e..243e8c573e474 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc -index 05e2952ec637e..814ba2f4607b6 100644 +index b42556c290207..c5c1aedb9df58 100644 --- ui/views/controls/menu/menu_host.cc +++ ui/views/controls/menu/menu_host.cc -@@ -147,6 +147,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { - submenu_->GetScrollViewContainer()->outside_border_insets(); - #endif +@@ -144,6 +144,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { + : gfx::NativeWindow(); + params.bounds = init_params.bounds; + params.parent_widget = init_params.parent_widget; + #if defined(USE_AURA) params.init_properties_container.SetProperty(aura::client::kOwnedWindowAnchor, init_params.owned_window_anchor); -@@ -154,7 +156,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { +@@ -151,7 +153,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { // If MenuHost has no parent widget, it needs to be marked // Activatable, so that calling Show in ShowMenuHost will // get keyboard focus. @@ -398,10 +398,10 @@ index 05e2952ec637e..814ba2f4607b6 100644 #if BUILDFLAG(IS_WIN) diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h -index 7e92e72c01d62..e3e1fe357a635 100644 +index fc1d5fccc3845..c065cafcd537c 100644 --- ui/views/controls/menu/menu_host.h +++ ui/views/controls/menu/menu_host.h -@@ -53,6 +53,8 @@ class MenuHost : public Widget, public WidgetObserver { +@@ -57,6 +57,8 @@ class MenuHost : public Widget, public WidgetObserver { // Additional information that helps to position anchored windows in such // backends as Wayland. ui::OwnedWindowAnchor owned_window_anchor; @@ -411,10 +411,10 @@ index 7e92e72c01d62..e3e1fe357a635 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 7d80d762ed43f..9effcd90f6e46 100644 +index 7bc2882ee70ad..ee71d64dce415 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1077,6 +1077,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1079,6 +1079,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -430,7 +430,7 @@ index 7d80d762ed43f..9effcd90f6e46 100644 } else if (paint_as_selected) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1141,6 +1150,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1143,6 +1152,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { } SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { @@ -445,7 +445,7 @@ index 7d80d762ed43f..9effcd90f6e46 100644 // use the default color. if (!paint_as_selected && foreground_color_id_.has_value()) { diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 1109f107fa8c1..cb54fdd6071e1 100644 +index 4babab46bc156..3de7f0891eeaf 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -4,6 +4,7 @@ @@ -456,7 +456,7 @@ index 1109f107fa8c1..cb54fdd6071e1 100644 #include #include #include -@@ -226,6 +227,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const { +@@ -237,6 +238,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const { return model->IsItemCheckedAt(index); } @@ -534,10 +534,10 @@ index 1109f107fa8c1..cb54fdd6071e1 100644 // Look up the menu model for this menu. const std::map::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index 30e11b5eee406..0c08301054ffa 100644 +index 883188d50ce30..3d3ed449744de 100644 --- ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h -@@ -92,6 +92,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate, +@@ -93,6 +93,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate, bool IsCommandEnabled(int id) const override; bool IsCommandVisible(int id) const override; bool IsItemChecked(int id) const override; @@ -751,10 +751,10 @@ index e171461e28836..e137275a22a12 100644 std::optional show_menu_host_duration_histogram) { RunMenu(parent, bounds.CenterPoint()); diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 0fcde1fc9f855..57af601276609 100644 +index 76f58311587d3..850a8d2c9197c 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -252,6 +252,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -253,6 +253,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = background_view_->AddChildView( std::make_unique(content_view, false)); @@ -767,7 +767,7 @@ index 0fcde1fc9f855..57af601276609 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 9228af7f0b02e..a6957017fef5c 100644 +index dcf4b60ad92c2..64fa80edefc1b 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc @@ -16,6 +16,7 @@ @@ -791,13 +791,13 @@ index 9228af7f0b02e..a6957017fef5c 100644 #if !BUILDFLAG(IS_CHROMEOS_LACROS) if (root_location != root_current_location && diff --git ui/views/view.h ui/views/view.h -index e2896cbe245e5..6a8cf99b29a73 100644 +index 4024ec9778c21..d4eeb4c2922e1 100644 --- ui/views/view.h +++ ui/views/view.h @@ -25,6 +25,7 @@ + #include "base/memory/raw_ptr.h" #include "base/memory/safety_checks.h" #include "base/observer_list.h" - #include "base/strings/string_piece.h" +#include "base/supports_user_data.h" #include "base/types/pass_key.h" #include "build/build_config.h" diff --git a/patch/patches/views_textfield_5399416.patch b/patch/patches/views_textfield_5399416.patch index 837011b9c..555e03d9f 100644 --- a/patch/patches/views_textfield_5399416.patch +++ b/patch/patches/views_textfield_5399416.patch @@ -1,8 +1,8 @@ diff --git ui/views/controls/textfield/textfield.cc ui/views/controls/textfield/textfield.cc -index 60e154e91a9e6..0a3fa6255836f 100644 +index c8a4f5805248c..a9f693b357fb9 100644 --- ui/views/controls/textfield/textfield.cc +++ ui/views/controls/textfield/textfield.cc -@@ -2972,6 +2972,10 @@ void Textfield::OnCursorBlinkTimerFired() { +@@ -2973,6 +2973,10 @@ void Textfield::OnCursorBlinkTimerFired() { void Textfield::OnEnabledChanged() { if (GetInputMethod()) GetInputMethod()->OnTextInputTypeChanged(this); diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index 9c7cae667..3c7d95601 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/sessions/sessions_api.cc chrome/browser/extensions/api/sessions/sessions_api.cc -index cbecf407dfce8..35c2bf2687283 100644 +index 23722ce395352..e7e7d70dd312c 100644 --- chrome/browser/extensions/api/sessions/sessions_api.cc +++ chrome/browser/extensions/api/sessions/sessions_api.cc @@ -333,6 +333,7 @@ SessionsGetDevicesFunction::CreateWindowModel( @@ -23,7 +23,7 @@ index cef40af382b1e..a2cf4691edc37 100644 case ui::SHOW_STATE_END: return ui::SHOW_STATE_NORMAL; diff --git components/sessions/core/session_service_commands.cc components/sessions/core/session_service_commands.cc -index da0cb1677c9be..707831bdeec2e 100644 +index 124bf0bf470e5..30845be4a6a88 100644 --- components/sessions/core/session_service_commands.cc +++ components/sessions/core/session_service_commands.cc @@ -165,9 +165,10 @@ enum PersistedWindowShowState { @@ -39,7 +39,7 @@ index da0cb1677c9be..707831bdeec2e 100644 + PERSISTED_SHOW_STATE_END = 9, }; - // TODO(crbug.com/1506068): Remove this around December 2024. This is part of a + // TODO(crbug.com/40946710): Remove this around December 2024. This is part of a @@ -191,6 +192,7 @@ PersistedWindowShowState ShowStateToPersistedShowState( case ui::SHOW_STATE_NORMAL: return PERSISTED_SHOW_STATE_NORMAL; @@ -49,10 +49,10 @@ index da0cb1677c9be..707831bdeec2e 100644 case ui::SHOW_STATE_MAXIMIZED: return PERSISTED_SHOW_STATE_MAXIMIZED; diff --git components/sessions/core/tab_restore_service_impl.cc components/sessions/core/tab_restore_service_impl.cc -index 1a49cf67e0b17..edf5896d3594e 100644 +index 552bf87379e34..b37e04b676de7 100644 --- components/sessions/core/tab_restore_service_impl.cc +++ components/sessions/core/tab_restore_service_impl.cc -@@ -192,6 +192,7 @@ int SerializeWindowShowState(ui::WindowShowState show_state) { +@@ -197,6 +197,7 @@ int SerializeWindowShowState(ui::WindowShowState show_state) { case ui::SHOW_STATE_NORMAL: return kSerializedShowStateNormal; case ui::SHOW_STATE_MINIMIZED: @@ -61,10 +61,10 @@ index 1a49cf67e0b17..edf5896d3594e 100644 case ui::SHOW_STATE_MAXIMIZED: return kSerializedShowStateMaximized; diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index b1fd8fe22daa6..290912f76fb02 100644 +index 60d2748ffebf8..cb16f27ee8d5f 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -669,6 +669,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { +@@ -674,6 +674,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { return scale_override_for_capture_; } @@ -80,18 +80,18 @@ index b1fd8fe22daa6..290912f76fb02 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 307dd3befb375..bf6bdd7ed4cbe 100644 +index 36ed537b555aa..2cf5fe3b03f0d 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -73,6 +73,7 @@ class DevicePosturePlatformProvider; +@@ -72,6 +72,7 @@ class CursorManager; + class DevicePosturePlatformProvider; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; - class RenderWidgetHostViewBaseObserver; +class RenderWidgetHostViewGuest; + class RenderWidgetHostViewInputObserver; class ScopedViewTransitionResources; class TextInputManager; - class TouchSelectionControllerClientManager; -@@ -192,6 +193,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -194,6 +195,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float GetDeviceScaleFactor() const final; bool IsPointerLocked() override; @@ -101,7 +101,7 @@ index 307dd3befb375..bf6bdd7ed4cbe 100644 // Identical to `CopyFromSurface()`, except that this method issues the // `viz::CopyOutputRequest` against the exact `viz::Surface` currently // embedded by this View, while `CopyFromSurface()` may return a copy of any -@@ -253,6 +257,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -255,6 +259,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Called when screen information or native widget bounds change. virtual void UpdateScreenInfo(); @@ -112,7 +112,7 @@ index 307dd3befb375..bf6bdd7ed4cbe 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_| -@@ -374,6 +382,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -383,6 +391,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase const gfx::Rect& bounds, const gfx::Rect& anchor_rect) = 0; @@ -125,7 +125,7 @@ index 307dd3befb375..bf6bdd7ed4cbe 100644 // Indicates whether the page has finished loading. virtual void SetIsLoading(bool is_loading) = 0; -@@ -638,6 +652,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -645,6 +659,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // to all displays. gfx::Size system_cursor_size_; @@ -136,7 +136,7 @@ index 307dd3befb375..bf6bdd7ed4cbe 100644 private: FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, -@@ -659,10 +677,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -666,10 +684,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void SynchronizeVisualProperties(); @@ -148,7 +148,7 @@ index 307dd3befb375..bf6bdd7ed4cbe 100644 // renderer process changes. This method is called before notifying // RenderWidgetHostImpl in order to allow the view to allocate a new diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc -index 82bf8b2dba80d..7ac79b46da2b4 100644 +index d1df19bfcb6c9..c55b89a119046 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -52,6 +52,10 @@ namespace { @@ -162,7 +162,7 @@ index 82bf8b2dba80d..7ac79b46da2b4 100644 #if BUILDFLAG(IS_WIN) // A callback function for EnumThreadWindows to enumerate and dismiss // any owned popup windows. -@@ -870,6 +874,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( +@@ -821,6 +825,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter( } return; } @@ -177,7 +177,7 @@ index 82bf8b2dba80d..7ac79b46da2b4 100644 #endif synthetic_move_position_ = center_in_screen; } -@@ -899,6 +911,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( +@@ -851,6 +863,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition( } void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { @@ -215,7 +215,7 @@ index b4ff7c11d8e3c..b21417f89e6e1 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/aura/native_window_occlusion_tracker_win.cc ui/aura/native_window_occlusion_tracker_win.cc -index a4a87a8347680..71a1e0d76d35f 100644 +index 0893f87550cc9..2a52012e5059d 100644 --- ui/aura/native_window_occlusion_tracker_win.cc +++ ui/aura/native_window_occlusion_tracker_win.cc @@ -101,6 +101,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) { @@ -245,7 +245,7 @@ index 1d79fc2dc34cc..ce5bf0ebf531f 100644 case ui::SHOW_STATE_MAXIMIZED: return ui::mojom::WindowShowState::SHOW_STATE_MAXIMIZED; diff --git ui/base/ui_base_types.h ui/base/ui_base_types.h -index 6076597470af9..871147e3e3a84 100644 +index 2cf9330a4e24b..4bf0890ae000b 100644 --- ui/base/ui_base_types.h +++ ui/base/ui_base_types.h @@ -26,7 +26,8 @@ enum WindowShowState { @@ -259,10 +259,10 @@ index 6076597470af9..871147e3e3a84 100644 // Specifies which edges of the window are tiled. diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index 55c1e9f0ccc1b..8b5fbb29fcd68 100644 +index f1c5f06fb2966..649a206664a00 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1864,7 +1864,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1862,7 +1862,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -286,10 +286,10 @@ index e31c5b4cb6726..1b724948c2868 100644 return host ? host->GetAcceleratedWidget() : nullptr; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -index 946fce84291d4..558867c71737e 100644 +index 87179d2dfc301..92d31c96bb0b1 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -@@ -175,6 +175,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( +@@ -194,6 +194,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( return result; } @@ -308,7 +308,7 @@ index 946fce84291d4..558867c71737e 100644 void DesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) { // In Windows, the native events sent to chrome are separated into client // and non-client versions of events, which we record on our LocatedEvent -@@ -298,6 +310,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( +@@ -329,6 +341,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( properties->wayland_app_id = params.wayland_app_id; @@ -318,19 +318,19 @@ index 946fce84291d4..558867c71737e 100644 properties->x11_extension_delegate = this; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h -index 3151a2c872f4e..e14caeb1e6645 100644 +index e698f71577c51..8a6e28128564d 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h -@@ -58,6 +58,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux - // Disables event listening to make |dialog| modal. - base::OnceClosure DisableEventListening(); +@@ -62,6 +62,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux + // client-drawn shadow. + virtual void UpdateFrameHints(); + void set_screen_bounds(const gfx::Rect& bounds) { screen_bounds_ = bounds; } + protected: // Overridden from DesktopWindowTreeHost: void Init(const Widget::InitParams& params) override; -@@ -67,6 +69,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux +@@ -71,6 +73,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux const gfx::Vector2d& drag_offset, Widget::MoveLoopSource source, Widget::MoveLoopEscapeBehavior escape_behavior) override; @@ -339,7 +339,7 @@ index 3151a2c872f4e..e14caeb1e6645 100644 // PlatformWindowDelegate: void DispatchEvent(ui::Event* event) override; -@@ -115,6 +119,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux +@@ -120,6 +124,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux uint32_t modal_dialog_counter_ = 0; @@ -350,10 +350,10 @@ index 3151a2c872f4e..e14caeb1e6645 100644 base::WeakPtrFactory 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 b305f5c2238c2..e2bd0c430cea0 100644 +index 389e7186c3429..38f7c34326ef9 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -285,8 +285,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { +@@ -281,8 +281,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { if (properties.parent_widget) { window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget( properties.parent_widget); @@ -365,7 +365,7 @@ index b305f5c2238c2..e2bd0c430cea0 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 99e20655e847e..6c3b3028e67fd 100644 +index 288a76d86ed87..1fd024d1645c3 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -20,6 +20,7 @@ @@ -423,7 +423,7 @@ index 99e20655e847e..6c3b3028e67fd 100644 // Stack immediately above its parent so that it does not cover other // root-level windows, with the exception of menus, to allow them to be // displayed on top of other windows. -@@ -1020,10 +1041,23 @@ void DesktopWindowTreeHostWin::HandleWindowMinimizedOrRestored(bool restored) { +@@ -1025,10 +1046,23 @@ void DesktopWindowTreeHostWin::HandleWindowMinimizedOrRestored(bool restored) { if (!native_widget_delegate_->IsNativeWidgetInitialized()) return; @@ -449,7 +449,7 @@ index 99e20655e847e..6c3b3028e67fd 100644 } void DesktopWindowTreeHostWin::HandleClientSizeChanged( -@@ -1040,11 +1074,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1045,11 +1079,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -467,7 +467,7 @@ index 99e20655e847e..6c3b3028e67fd 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1052,6 +1090,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1057,6 +1095,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -480,7 +480,7 @@ index 99e20655e847e..6c3b3028e67fd 100644 SendEventToSink(event); return event->handled(); } -@@ -1230,8 +1274,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { +@@ -1235,8 +1279,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { // positions in variable-DPI situations. See https://crbug.com/1224715 for // details. aura::Window* root = nullptr; @@ -530,10 +530,10 @@ index 6383110804d44..e5bc85f63fab9 100644 break; case ui::SHOW_STATE_END: diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index d958581dc14d0..c06a5b18b4835 100644 +index f2f1f54c474cf..2feb6a47c04e1 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -405,7 +405,8 @@ void Widget::Init(InitParams params) { +@@ -409,7 +409,8 @@ void Widget::Init(InitParams params) { } params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -543,7 +543,7 @@ index d958581dc14d0..c06a5b18b4835 100644 is_headless_ = params.ShouldInitAsHeadless(); is_autosized_ = params.autosize; -@@ -497,9 +498,14 @@ void Widget::Init(InitParams params) { +@@ -501,9 +502,14 @@ void Widget::Init(InitParams params) { if (show_state == ui::SHOW_STATE_MAXIMIZED) { Maximize(); @@ -558,7 +558,7 @@ index d958581dc14d0..c06a5b18b4835 100644 } #if BUILDFLAG(IS_CHROMEOS_ASH) -@@ -513,7 +519,12 @@ void Widget::Init(InitParams params) { +@@ -517,7 +523,12 @@ void Widget::Init(InitParams params) { } else if (delegate) { SetContentsView(delegate->TransferOwnershipOfContentsView()); if (should_set_initial_bounds) { @@ -572,7 +572,7 @@ index d958581dc14d0..c06a5b18b4835 100644 } } -@@ -1692,10 +1703,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1696,10 +1707,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -589,7 +589,7 @@ index d958581dc14d0..c06a5b18b4835 100644 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); } -@@ -1946,7 +1963,8 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) { +@@ -1950,7 +1967,8 @@ bool Widget::SetInitialFocus(ui::WindowShowState show_state) { return false; View* v = widget_delegate_->GetInitiallyFocusedView(); if (!focus_on_creation_ || show_state == ui::SHOW_STATE_INACTIVE || @@ -600,7 +600,7 @@ index d958581dc14d0..c06a5b18b4835 100644 // focus when the window is restored. if (v) diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 0d373af86c18a..33bdd6caa9f35 100644 +index 68c2ac9da74ac..94f75266c6917 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -358,6 +358,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -622,10 +622,10 @@ index 0d373af86c18a..33bdd6caa9f35 100644 // Deactivates the widget, making the next window in the Z order the active // window. diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index 6a8bb8ad5969a..32b7e90152be6 100644 +index d1f6be37fcf45..ca2fd8ce00561 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -380,6 +380,10 @@ class VIEWS_EXPORT WidgetDelegate +@@ -402,6 +402,10 @@ class VIEWS_EXPORT WidgetDelegate // Returns true if the title text should be centered. bool ShouldCenterWindowTitleText() const; @@ -651,7 +651,7 @@ index 3b9b00b7d79ae..e759e3c1a9f34 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 6d4dd467fa533..fdb970e627d81 100644 +index 3bfc5b2257908..0d4437e091daa 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -772,7 +772,11 @@ bool HWNDMessageHandler::IsVisible() const { @@ -667,7 +667,7 @@ index 6d4dd467fa533..fdb970e627d81 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3215,10 +3219,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3225,10 +3229,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 190f9c4f3..e33c57453 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 0131eaf19d3e1..a8669acd03fa7 100644 +index 35b6474193b3f..55b518fe138cc 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -251,6 +251,8 @@ viz_component("service") { +@@ -253,6 +253,8 @@ viz_component("service") { "transitions/surface_animation_manager.h", "transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.h", @@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 9019859a51edf..636dd2a822812 100644 +index adb90506e6df9..d966558511a64 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -33,7 +33,9 @@ @@ -261,7 +261,7 @@ index 9019859a51edf..636dd2a822812 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 -@@ -549,6 +562,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -548,6 +561,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, simple_begin_frame_observers_; std::unique_ptr host_begin_frame_observer_; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index 60ed09f69..72ba7d50e 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 c455f395b3d89..f39ffa5e1a7a4 100644 +index d08ad3ae25ab3..0979551ef5fcb 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3551,6 +3551,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3578,6 +3578,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 c455f395b3d89..f39ffa5e1a7a4 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3561,6 +3567,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3588,6 +3594,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index c455f395b3d89..f39ffa5e1a7a4 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3756,6 +3763,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3784,6 +3791,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 c455f395b3d89..f39ffa5e1a7a4 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4583,6 +4593,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4632,6 +4642,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.picture_in_picture_options = *(params.pip_options); } @@ -49,7 +49,7 @@ index c455f395b3d89..f39ffa5e1a7a4 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. -@@ -8894,6 +8913,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -8955,6 +8974,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, } CloseListenerManager::DidChangeFocusedFrame(this); @@ -60,7 +60,7 @@ index c455f395b3d89..f39ffa5e1a7a4 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 811fde7ff7d9e..bbd63bf21db3e 100644 +index 629b699461464..04d2008af250f 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -104,10 +104,12 @@ class BrowserContext; @@ -88,7 +88,7 @@ index 811fde7ff7d9e..bbd63bf21db3e 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 55aa807264c1e..ebfd5bc73fa3e 100644 +index 7c43ffab6a865..608c87ace18d5 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -63,9 +63,11 @@ class EyeDropperListener; @@ -103,7 +103,7 @@ index 55aa807264c1e..ebfd5bc73fa3e 100644 struct ContextMenuParams; struct DropData; struct MediaPlayerWatchTime; -@@ -354,6 +356,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -355,6 +357,14 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -119,10 +119,10 @@ index 55aa807264c1e..ebfd5bc73fa3e 100644 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h -index 0983d7fa4d180..a0ca59ba1428f 100644 +index 33ce8386f5ca5..935909040c0ed 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h -@@ -237,6 +237,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { +@@ -239,6 +239,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { // controlled by the capturing tab. virtual void OnCapturedSurfaceControl() {} @@ -132,7 +132,7 @@ index 0983d7fa4d180..a0ca59ba1428f 100644 // This method is invoked when the `blink::WebView` of the current // RenderViewHost is ready, e.g. because we recreated it after a crash. virtual void RenderViewReady() {} -@@ -862,6 +865,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { +@@ -872,6 +875,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver { // WebContents has gained/lost focus. virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 1ec763ff7..fd31612c6 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,7 +11,7 @@ index 6dfc5bef7ed41..493781d809a35 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 d0d5030c68f39..f9a86eb99f39e 100644 +index 173ca5a588d8b..092094e89eef0 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -62,10 +62,10 @@ index d6bfd9b670d03..fa01890543ceb 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 9793e13c77631..b8453096117e8 100644 +index 1144e63a6d394..5773f6da9333d 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -985,7 +985,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, +@@ -987,7 +987,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webkit_runtime_enabled_features.patch b/patch/patches/webkit_runtime_enabled_features.patch index 7d0a32016..450900a17 100644 --- a/patch/patches/webkit_runtime_enabled_features.patch +++ b/patch/patches/webkit_runtime_enabled_features.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl -index e065ef718e980..5c94887561a95 100644 +index 1f8a978367a46..6f073aa18151e 100644 --- third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl +++ third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl -@@ -13,6 +13,8 @@ +@@ -14,6 +14,8 @@ #include "third_party/blink/renderer/platform/platform_export.h" #include "third_party/blink/renderer/platform/wtf/allocator/allocator.h" @@ -11,7 +11,7 @@ index e065ef718e980..5c94887561a95 100644 #define ASSERT_ORIGIN_TRIAL(feature) \ static_assert(std::is_sameenabled_extensions(); extensions::ProcessMap* process_map = extensions::ProcessMap::Get(context); -@@ -317,6 +324,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() { - break; +@@ -316,6 +323,9 @@ void MemoryDetails::CollectChildInfoOnUIThread() { + process.renderer_type = ProcessMemoryInformation::RENDERER_EXTENSION; } } +#if BUILDFLAG(ENABLE_ALLOY_BOOTSTRAP) diff --git a/patch/patches/win_partition_freelist_entry_336007395.patch b/patch/patches/win_partition_freelist_entry_336007395.patch index 05130fe76..e27a06929 100644 --- a/patch/patches/win_partition_freelist_entry_336007395.patch +++ b/patch/patches/win_partition_freelist_entry_336007395.patch @@ -1,5 +1,5 @@ diff --git base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h -index 889f6c3d02d2b..eaa8e98ef9c9e 100644 +index 244e52b25278a..df39958ecdc5b 100644 --- base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h +++ base/allocator/partition_allocator/src/partition_alloc/partition_freelist_entry.h @@ -10,7 +10,6 @@ diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index e893d31d6..89b7b55c3 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 8b41e05f29fdb..34cc1063f540e 100644 +index 05a9bd7063f78..32e5659341a70 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1041,6 +1041,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1044,6 +1044,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/patch/patches/win_sandbox_policy.patch b/patch/patches/win_sandbox_policy.patch index c2a89dadb..4c67e1484 100644 --- a/patch/patches/win_sandbox_policy.patch +++ b/patch/patches/win_sandbox_policy.patch @@ -12,7 +12,7 @@ index a2d801b370b01..b56de03637fec 100644 } // namespace sandbox diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc -index 58f55c1398047..f980f67de4f9b 100644 +index 6a9b45d8de663..24646ea209be0 100644 --- sandbox/win/src/sandbox_policy_base.cc +++ sandbox/win/src/sandbox_policy_base.cc @@ -190,12 +190,12 @@ PolicyGlobal* ConfigBase::policy() { @@ -31,7 +31,7 @@ index 58f55c1398047..f980f67de4f9b 100644 } return std::nullopt; } -@@ -774,14 +774,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { +@@ -790,14 +790,14 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) { return (SBOX_ALL_OK == rc); } @@ -49,10 +49,10 @@ index 58f55c1398047..f980f67de4f9b 100644 // Can only set this once - as there is only one region sent to the child. CHECK(!delegate_data_); diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h -index 6b4a9ec20f348..058bca8674177 100644 +index 17c19aedcd774..e645245c72076 100644 --- sandbox/win/src/sandbox_policy_base.h +++ sandbox/win/src/sandbox_policy_base.h -@@ -115,7 +115,7 @@ class ConfigBase final : public TargetConfig { +@@ -122,7 +122,7 @@ class ConfigBase final : public TargetConfig { // Should only be called once the object is configured. PolicyGlobal* policy(); @@ -61,7 +61,7 @@ index 6b4a9ec20f348..058bca8674177 100644 std::vector& blocklisted_dlls(); AppContainerBase* app_container(); IntegrityLevel integrity_level() { return integrity_level_; } -@@ -170,7 +170,7 @@ class PolicyBase final : public TargetPolicy { +@@ -177,7 +177,7 @@ class PolicyBase final : public TargetPolicy { ResultCode SetStdoutHandle(HANDLE handle) override; ResultCode SetStderrHandle(HANDLE handle) override; void AddHandleToShare(HANDLE handle) override; @@ -70,7 +70,7 @@ index 6b4a9ec20f348..058bca8674177 100644 // Creates a Job object with the level specified in a previous call to // SetJobLevel(). -@@ -232,13 +232,13 @@ class PolicyBase final : public TargetPolicy { +@@ -241,13 +241,13 @@ class PolicyBase final : public TargetPolicy { // time. // Returns nullopt if no data has been set, or a view into the data. diff --git a/tests/cefclient/browser/client_handler.cc b/tests/cefclient/browser/client_handler.cc index 54be0a163..dfd75f2cd 100644 --- a/tests/cefclient/browser/client_handler.cc +++ b/tests/cefclient/browser/client_handler.cc @@ -1221,6 +1221,10 @@ void ClientHandler::OnRenderProcessTerminated(CefRefPtr browser, BaseClientHandler::OnRenderProcessTerminated(browser, status, error_code, error_string); + LOG(ERROR) << "Render process terminated with status " + << test_runner::GetErrorString(status) << " (" + << error_string.ToString() << ")"; + // Don't reload if there's no start URL, or if the crash URL was specified. if (startup_url_.empty() || startup_url_ == "chrome://crash") { return; diff --git a/tests/cefclient/renderer/performance_test_tests.cc b/tests/cefclient/renderer/performance_test_tests.cc index f71aa2577..4ce76db9e 100644 --- a/tests/cefclient/renderer/performance_test_tests.cc +++ b/tests/cefclient/renderer/performance_test_tests.cc @@ -280,7 +280,7 @@ PERF_TEST_FUNC(V8ObjectSetValueWithAccessor) { CefString name = "name"; CefRefPtr val = CefV8Value::CreateBool(true); CefRefPtr obj = CefV8Value::CreateObject(accessor, nullptr); - obj->SetValue(name, V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE); + obj->SetValue(name, V8_PROPERTY_ATTRIBUTE_NONE); obj->SetValue(name, val, V8_PROPERTY_ATTRIBUTE_NONE); PERF_ITERATIONS_START() @@ -314,7 +314,7 @@ PERF_TEST_FUNC(V8ObjectGetValueWithAccessor) { CefString name = "name"; CefRefPtr val = CefV8Value::CreateBool(true); CefRefPtr obj = CefV8Value::CreateObject(accessor, nullptr); - obj->SetValue(name, V8_ACCESS_CONTROL_DEFAULT, V8_PROPERTY_ATTRIBUTE_NONE); + obj->SetValue(name, V8_PROPERTY_ATTRIBUTE_NONE); obj->SetValue(name, val, V8_PROPERTY_ATTRIBUTE_NONE); PERF_ITERATIONS_START() diff --git a/tests/ceftests/resource_request_handler_unittest.cc b/tests/ceftests/resource_request_handler_unittest.cc index c2c082ce1..3a8de402d 100644 --- a/tests/ceftests/resource_request_handler_unittest.cc +++ b/tests/ceftests/resource_request_handler_unittest.cc @@ -566,6 +566,11 @@ class BasicResponseTest : public TestHandler { EXPECT_EQ(browser_id_, browser->GetIdentifier()); EXPECT_TRUE(frame->IsMain()); + const std::string& url = request->GetURL(); + if (IgnoreURL(url)) { + return nullptr; + } + if (request_id_ == 0U) { // This is the first callback that provides a request ID. request_id_ = request->GetIdentifier(); diff --git a/tests/ceftests/v8_unittest.cc b/tests/ceftests/v8_unittest.cc index febf8c311..2f09467d2 100644 --- a/tests/ceftests/v8_unittest.cc +++ b/tests/ceftests/v8_unittest.cc @@ -880,8 +880,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate, EXPECT_FALSE(object->HasValue(kName)); - EXPECT_TRUE(object->SetValue(kName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_NONE)); + EXPECT_TRUE(object->SetValue(kName, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_FALSE(object->HasException()); EXPECT_TRUE(object->HasValue(kName)); @@ -954,8 +953,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate, EXPECT_FALSE(object->HasValue(kName)); - EXPECT_TRUE(object->SetValue(kName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_NONE)); + EXPECT_TRUE(object->SetValue(kName, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_FALSE(object->HasException()); EXPECT_TRUE(object->HasValue(kName)); @@ -1026,8 +1024,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate, EXPECT_FALSE(object->HasValue(kName)); - EXPECT_TRUE(object->SetValue(kName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_NONE)); + EXPECT_TRUE(object->SetValue(kName, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_FALSE(object->HasException()); EXPECT_TRUE(object->HasValue(kName)); @@ -1090,8 +1087,7 @@ class V8RendererTest : public ClientAppRenderer::Delegate, EXPECT_FALSE(object->HasValue(kName)); - EXPECT_TRUE(object->SetValue(kName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_READONLY)); + EXPECT_TRUE(object->SetValue(kName, V8_PROPERTY_ATTRIBUTE_READONLY)); EXPECT_FALSE(object->HasException()); EXPECT_TRUE(object->HasValue(kName)); @@ -1668,12 +1664,10 @@ class V8RendererTest : public ClientAppRenderer::Delegate, EXPECT_TRUE(object.get()); // We register both names for accessor. - EXPECT_TRUE(object->SetValue(kAccessorName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_NONE)); + EXPECT_TRUE(object->SetValue(kAccessorName, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_FALSE(object->HasException()); - EXPECT_TRUE(object->SetValue(kInterceptorName, V8_ACCESS_CONTROL_DEFAULT, - V8_PROPERTY_ATTRIBUTE_NONE)); + EXPECT_TRUE(object->SetValue(kInterceptorName, V8_PROPERTY_ATTRIBUTE_NONE)); EXPECT_FALSE(object->HasException()); EXPECT_TRUE(object->SetValue(kAccessorName, diff --git a/tools/gn_args.py b/tools/gn_args.py index ead4d2503..6bea1f0c4 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -277,10 +277,6 @@ def GetRequiredArgs(): Return required GN args. Also enforced by assert() in //cef/BUILD.gn. """ result = { - # Set ENABLE_PRINTING=1 ENABLE_BASIC_PRINTING=1. - 'enable_basic_printing': True, - # ENABLE_SERVICE_DISCOVERY=0 for print preview support - 'enable_print_preview': True, 'optimize_webui': True, # Enable support for Widevine CDM. 'enable_widevine': True,