From ff5210f825cfe7e4088b786fa2a91bfa1fbb7212 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Mon, 10 Mar 2025 15:57:41 -0400 Subject: [PATCH] Update to Chromium version 135.0.7049.0 (#1427262) --- BUILD.gn | 2 +- CHROMIUM_BUILD_COMPATIBILITY.txt | 2 +- include/base/cef_dump_without_crashing.h | 26 ++- .../cef_dump_without_crashing_internal.h | 35 +++- include/internal/cef_types_content_settings.h | 6 + libcef/browser/browser_contents_delegate.cc | 4 +- libcef/browser/browser_context.cc | 3 +- .../chrome_content_browser_client_cef.cc | 2 +- .../chrome_content_browser_client_cef.h | 3 +- libcef/browser/context.h | 2 +- .../browser/global_preference_manager_impl.cc | 2 +- libcef/browser/main_runner.cc | 5 +- libcef/browser/net_service/login_delegate.cc | 11 +- libcef/browser/net_service/login_delegate.h | 4 +- .../net_service/proxy_url_loader_factory.cc | 4 +- libcef/browser/osr/osr_accessibility_util.cc | 2 +- .../osr/render_widget_host_view_osr.cc | 3 +- .../browser/osr/render_widget_host_view_osr.h | 3 +- libcef/browser/views/label_button_impl.h | 4 +- libcef/browser/views/textfield_impl.cc | 10 +- libcef/common/base_impl.cc | 9 +- libcef/common/file_util_impl.cc | 2 +- libcef/common/thread_impl.cc | 2 +- libcef/common/value_base.h | 4 +- libcef_dll/base/cef_dump_without_crashing.cc | 2 + patch/patch.cfg | 8 +- patch/patches/base_command_line_1872.patch | 4 +- patch/patches/base_sandbox_2743.patch | 50 ++--- patch/patches/base_test_4396276.patch | 14 +- .../browser_security_policy_1081397.patch | 6 +- patch/patches/build.patch | 6 +- patch/patches/chrome_browser.patch | 6 +- patch/patches/chrome_browser_browser.patch | 90 ++++---- .../chrome_browser_context_menus.patch | 22 +- .../patches/chrome_browser_devtools_osr.patch | 12 +- .../chrome_browser_dialogs_native.patch | 14 +- .../chrome_browser_dialogs_widget.patch | 8 +- patch/patches/chrome_browser_download.patch | 47 +++-- patch/patches/chrome_browser_extensions.patch | 14 +- .../chrome_browser_permission_prompt.patch | 4 +- patch/patches/chrome_browser_policy.patch | 31 ++- .../patches/chrome_browser_profile_menu.patch | 10 +- patch/patches/chrome_browser_profiles.patch | 2 +- .../chrome_browser_safe_browsing.patch | 4 +- .../chrome_browser_webui_license.patch | 10 +- .../chrome_browser_webui_version.patch | 18 +- patch/patches/chrome_common_logging.patch | 10 +- patch/patches/chrome_runtime.patch | 198 ++++++++---------- patch/patches/chrome_runtime_views.patch | 149 +++++++------ patch/patches/component_build.patch | 6 +- patch/patches/content_2015.patch | 54 ++--- .../content_initiator_policy_323753235.patch | 2 +- patch/patches/content_main_654986.patch | 27 +-- patch/patches/crashpad_1995.patch | 22 +- patch/patches/crashpad_tp_1995.patch | 32 +-- patch/patches/embedder_product_override.patch | 13 +- patch/patches/gn_config.patch | 25 +-- patch/patches/gritsettings.patch | 4 +- patch/patches/gtk_compat_6334084.patch | 13 ++ patch/patches/linux_gtk_theme_3610.patch | 10 +- patch/patches/linux_printing_context.patch | 2 +- patch/patches/mac_chrome_locale_3623.patch | 14 +- .../mac_platform_style_bubble_893292.patch | 8 +- patch/patches/mac_render_widget_3680.patch | 2 +- patch/patches/metrics_system_profile.patch | 4 +- patch/patches/net_cookie_flags.patch | 4 +- patch/patches/net_url_request_3596.patch | 8 +- patch/patches/osr_fling_2745.patch | 19 +- patch/patches/renderer_host_1070713.patch | 4 +- patch/patches/resource_bundle_2512.patch | 6 +- patch/patches/rfh_navigation_4829483.patch | 6 +- patch/patches/rwh_background_color_1984.patch | 4 +- patch/patches/services_network_2622.patch | 51 +++-- patch/patches/services_network_2718.patch | 4 +- .../patches/set_resize_background_color.patch | 4 +- patch/patches/trace_event.patch | 4 +- patch/patches/ui_dragdrop_355390.patch | 4 +- patch/patches/v8_build.patch | 16 +- patch/patches/views_1749_2102_3330.patch | 60 +++--- patch/patches/views_textfield_5399416.patch | 4 +- patch/patches/views_widget.patch | 58 ++--- patch/patches/viz_osr_2575.patch | 16 +- patch/patches/web_contents_1257_1565.patch | 20 +- patch/patches/webkit_plugin_info_2015.patch | 12 +- patch/patches/webkit_popups.patch | 6 +- patch/patches/win_sandbox_op3way_3708.patch | 8 +- 86 files changed, 732 insertions(+), 713 deletions(-) create mode 100644 patch/patches/gtk_compat_6334084.patch diff --git a/BUILD.gn b/BUILD.gn index 8dcd235c7..6cae9b0ad 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -340,7 +340,7 @@ if (is_win) { # to maintain. "//chrome/common/crash_keys.cc", "//chrome/common/chrome_switches.cc", - "//components/flags_ui/flags_ui_switches.cc", + "//components/webui/flags/flags_ui_switches.cc", "//content/public/common/content_switches.cc", ] diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 061f7e0a9..25bea0226 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/134.0.6998.0' + 'chromium_checkout': 'refs/tags/135.0.7049.0' } diff --git a/include/base/cef_dump_without_crashing.h b/include/base/cef_dump_without_crashing.h index 3614ea969..1ab6ab885 100644 --- a/include/base/cef_dump_without_crashing.h +++ b/include/base/cef_dump_without_crashing.h @@ -47,30 +47,46 @@ #define CEF_INCLUDE_BASE_CEF_DUMP_WITHOUT_CRASHING_H_ #pragma once +#include "include/cef_api_hash.h" + constexpr long long kOneDayInMilliseconds = 86400000; /// -/// CefDumpWithoutCrashing allows for generating crash dumps with a throttling +/// This function allows for generating of crash dumps with a throttling /// mechanism, preventing frequent dumps from being generated in a short period -/// of time from the same location. The |function_name|, |file_name|, and -/// |line_number| determine the location of the dump. The +/// of time from the same location. If should only be called after CefInitialize +/// has been successfully called. The |function_name|, |file_name|, and +/// |line_number| parameters specify the origin location of the dump. The /// |mseconds_between_dumps| is an interval between consecutive dumps in /// milliseconds from the same location. /// /// Returns true if the dump was successfully generated, false otherwise. /// +/// For detailed behavior, usage instructions, and considerations, refer to the +/// documentation of DumpWithoutCrashing in base/debug/dump_without_crashing.h. +/// bool CefDumpWithoutCrashing( long long mseconds_between_dumps = kOneDayInMilliseconds, const char* function_name = __builtin_FUNCTION(), const char* file_name = __builtin_FILE(), int line_number = __builtin_LINE()); +#if CEF_API_REMOVED(CEF_NEXT) /// -/// CefDumpWithoutCrashingUnthrottled allows for immediate crash dumping without -/// any throttling constraints. +/// This function allows for generating of crash dumps without any throttling +/// constraints. If should also only be called after CefInitialize has been +/// successfully called. /// /// Returns true if the dump was successfully generated, false otherwise. /// +/// For detailed behavior, usage instructions, and considerations, refer to the +/// documentation of DumpWithoutCrashingUnthrottled in +/// base/debug/dump_without_crashing.h. +/// +/// This function is removed in API version 13500. Use CefDumpWithoutCrashing() +/// instead. +/// bool CefDumpWithoutCrashingUnthrottled(); +#endif #endif // CEF_INCLUDE_BASE_CEF_DUMP_WITHOUT_CRASHING_H_ diff --git a/include/internal/cef_dump_without_crashing_internal.h b/include/internal/cef_dump_without_crashing_internal.h index 61494cf3d..dffc589d7 100644 --- a/include/internal/cef_dump_without_crashing_internal.h +++ b/include/internal/cef_dump_without_crashing_internal.h @@ -42,22 +42,37 @@ extern "C" { // See include/base/cef_dump_without_crashing.h for intended usage. /// -/// cef_dump_without_crashing allows for capturing crash dumps in a throttled -/// manner. This function should only be called after CefInitialize has been -/// successfully called. For detailed behavior, usage instructions, and -/// considerations, refer to the documentation of DumpWithoutCrashing in -/// base/debug/dump_without_crashing.h. +/// This function allows for generating of crash dumps with a throttling +/// mechanism, preventing frequent dumps from being generated in a short period +/// of time from the same location. If should only be called after CefInitialize +/// has been successfully called. The |function_name|, |file_name|, and +/// |line_number| parameters specify the origin location of the dump. The +/// |mseconds_between_dumps| is an interval between consecutive dumps in +/// milliseconds from the same location. +/// +/// Returns true (1) if the dump was successfully generated, false otherwise. +/// +/// For detailed behavior, usage instructions, and considerations, refer to the +/// documentation of DumpWithoutCrashing in base/debug/dump_without_crashing.h. /// CEF_EXPORT int cef_dump_without_crashing(long long mseconds_between_dumps, const char* function_name, const char* file_name, int line_number); + /// -/// cef_dump_without_crashing_unthrottled allows for capturing crash dumps -/// without any throttling constraints. This function should also only be called -/// after CefInitialize has been successfully called. For detailed behavior, -/// usage instructions, and considerations, refer to the documentation of -/// DumpWithoutCrashingUnthrottled in base/debug/dump_without_crashing.h. +/// This function allows for generating of crash dumps without any throttling +/// constraints. If should also only be called after CefInitialize has been +/// successfully called. +/// +/// Returns true (1) if the dump was successfully generated, false otherwise. +/// +/// For detailed behavior, usage instructions, and considerations, refer to the +/// documentation of DumpWithoutCrashingUnthrottled in +/// base/debug/dump_without_crashing.h. +/// +/// This function is removed in API version 13500. Use +/// cef_dump_without_crashing() instead. /// CEF_EXPORT int cef_dump_without_crashing_unthrottled(); diff --git a/include/internal/cef_types_content_settings.h b/include/internal/cef_types_content_settings.h index 99096d69b..cd93ef785 100644 --- a/include/internal/cef_types_content_settings.h +++ b/include/internal/cef_types_content_settings.h @@ -495,6 +495,12 @@ typedef enum { CEF_CONTENT_SETTING_TYPE_CONTROLLED_FRAME, #endif +#if CEF_API_ADDED(CEF_NEXT) + /// Website setting which is used for UnusedSitePermissionsService to + /// store revoked notification permissions of disruptive sites. + CEF_CONTENT_SETTING_TYPE_REVOKED_DISRUPTIVE_NOTIFICATION_PERMISSIONS, +#endif + CEF_CONTENT_SETTING_TYPE_NUM_VALUES, } cef_content_setting_types_t; diff --git a/libcef/browser/browser_contents_delegate.cc b/libcef/browser/browser_contents_delegate.cc index 537a4fd64..debc93f72 100644 --- a/libcef/browser/browser_contents_delegate.cc +++ b/libcef/browser/browser_contents_delegate.cc @@ -378,11 +378,11 @@ void CefBrowserContentsDelegate::RenderViewReady() { void CefBrowserContentsDelegate::PrimaryMainFrameRenderProcessGone( base::TerminationStatus status) { static_assert(static_cast(CEF_RESULT_CODE_CHROME_FIRST) == - static_cast(chrome::RESULT_CODE_CHROME_START), + static_cast(CHROME_RESULT_CODE_CHROME_START), "CEF_RESULT_CODE_CHROME_FIRST must match " "chrome::RESULT_CODE_CHROME_START"); static_assert(static_cast(CEF_RESULT_CODE_CHROME_LAST) == - static_cast(chrome::RESULT_CODE_CHROME_LAST_CODE), + static_cast(CHROME_RESULT_CODE_CHROME_LAST_CODE), "CEF_RESULT_CODE_CHROME_LAST must match " "chrome::RESULT_CODE_CHROME_LAST_CODE"); diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index 4c9e1abb2..109c803f5 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -246,7 +246,8 @@ void CefBrowserContext::RemoveCefRequestContext( Shutdown(); // Allow the current call stack to unwind before deleting |this|. - content::BrowserThread::DeleteSoon(CEF_UIT, FROM_HERE, this); + content::BrowserThread::GetTaskRunnerForThread(CEF_UIT)->DeleteSoon( + FROM_HERE, this); } } diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index e03ef92d9..ba2a5d4d6 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -602,7 +602,7 @@ ChromeContentBrowserClientCef::CreateLoginDelegate( scoped_refptr response_headers, bool first_auth_attempt, content::GuestPageHolder* guest, - LoginAuthRequiredCallback auth_required_callback) { + content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback) { // |web_contents| is nullptr for CefURLRequests without an associated frame. if (!web_contents || base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kDisableChromeLoginPrompt)) { diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.h b/libcef/browser/chrome/chrome_content_browser_client_cef.h index 3cd9052c9..6606685c1 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.h +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.h @@ -134,7 +134,8 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { scoped_refptr response_headers, bool first_auth_attempt, content::GuestPageHolder* guest, - LoginAuthRequiredCallback auth_required_callback) override; + content::LoginDelegate::LoginAuthRequiredCallback auth_required_callback) + override; void ExposeInterfacesToRenderer( service_manager::BinderRegistry* registry, blink::AssociatedInterfaceRegistry* associated_registry, diff --git a/libcef/browser/context.h b/libcef/browser/context.h index a9aec0a85..cc147f938 100644 --- a/libcef/browser/context.h +++ b/libcef/browser/context.h @@ -110,7 +110,7 @@ class CefContext { int exit_code_ = -1; // The thread on which the context was initialized. - base::PlatformThreadId init_thread_id_ = 0; + base::PlatformThreadId init_thread_id_; CefSettings settings_; CefRefPtr application_; diff --git a/libcef/browser/global_preference_manager_impl.cc b/libcef/browser/global_preference_manager_impl.cc index 50e2ceca8..21186c629 100644 --- a/libcef/browser/global_preference_manager_impl.cc +++ b/libcef/browser/global_preference_manager_impl.cc @@ -12,8 +12,8 @@ #include "cef/libcef/common/api_version_util.h" #include "chrome/browser/about_flags.h" #include "chrome/browser/browser_process.h" -#include "components/flags_ui/pref_service_flags_storage.h" #include "components/variations/synthetic_trials_active_group_id_provider.h" +#include "components/webui/flags/pref_service_flags_storage.h" namespace { diff --git a/libcef/browser/main_runner.cc b/libcef/browser/main_runner.cc index dd671972e..b302f9edd 100644 --- a/libcef/browser/main_runner.cc +++ b/libcef/browser/main_runner.cc @@ -117,8 +117,7 @@ bool CefMainRunner::Initialize(CefSettings* settings, if (exit_code_ != content::RESULT_CODE_NORMAL_EXIT) { // Some exit codes are used to exit early, but are otherwise a normal // result. Don't log for those codes. - if (!chrome::IsNormalResultCode( - static_cast(exit_code_))) { + if (!IsNormalResultCode(static_cast(exit_code_))) { LOG(ERROR) << "ContentMainRun failed with exit code " << exit_code_; } return false; @@ -460,7 +459,7 @@ void CefMainRunner::FinishShutdownOnUIThread() { ChromeProcessSingleton::DeleteInstance(); } - static_cast(main_runner_.get()) + static_cast(main_runner_.get()) ->ShutdownOnUIThread(); } diff --git a/libcef/browser/net_service/login_delegate.cc b/libcef/browser/net_service/login_delegate.cc index 2fae39174..7f1978187 100644 --- a/libcef/browser/net_service/login_delegate.cc +++ b/libcef/browser/net_service/login_delegate.cc @@ -111,11 +111,12 @@ void RunCallbackOnIOThread( } } // namespace -LoginDelegate::LoginDelegate(const net::AuthChallengeInfo& auth_info, - content::WebContents* web_contents, - const content::GlobalRequestID& request_id, - const GURL& origin_url, - LoginAuthRequiredCallback callback) +LoginDelegate::LoginDelegate( + const net::AuthChallengeInfo& auth_info, + content::WebContents* web_contents, + const content::GlobalRequestID& request_id, + const GURL& origin_url, + content::LoginDelegate::LoginAuthRequiredCallback callback) : callback_(std::move(callback)), weak_ptr_factory_(this) { CEF_REQUIRE_UIT(); diff --git a/libcef/browser/net_service/login_delegate.h b/libcef/browser/net_service/login_delegate.h index e5308fab1..01d2294c1 100644 --- a/libcef/browser/net_service/login_delegate.h +++ b/libcef/browser/net_service/login_delegate.h @@ -29,7 +29,7 @@ class LoginDelegate : public content::LoginDelegate { content::WebContents* web_contents, const content::GlobalRequestID& request_id, const GURL& origin_url, - LoginAuthRequiredCallback callback); + content::LoginDelegate::LoginAuthRequiredCallback callback); void Continue(const CefString& username, const CefString& password); void Cancel(); @@ -40,7 +40,7 @@ class LoginDelegate : public content::LoginDelegate { const content::GlobalRequestID& request_id, const GURL& origin_url); - LoginAuthRequiredCallback callback_; + content::LoginDelegate::LoginAuthRequiredCallback callback_; base::WeakPtrFactory weak_ptr_factory_; }; diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 2c4ffd7b2..d8ef78ab6 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -103,8 +103,8 @@ class ResourceContextData : public base::SupportsUserData::Data { // Maybe the browser was destroyed while AddProxyOnUIThread was pending. if (!web_contents) { // Delete on the IO thread as expected by mojo bindings. - content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, - proxy); + content::BrowserThread::GetTaskRunnerForThread(CEF_IOT)->DeleteSoon( + FROM_HERE, proxy); return; } diff --git a/libcef/browser/osr/osr_accessibility_util.cc b/libcef/browser/osr/osr_accessibility_util.cc index c758f8bfe..78bb11df8 100644 --- a/libcef/browser/osr/osr_accessibility_util.cc +++ b/libcef/browser/osr/osr_accessibility_util.cc @@ -197,7 +197,7 @@ struct PopulateAxNodeAttributes { case ax::mojom::IntAttribute::kAriaNotificationPriorityDeprecated: { auto state = static_cast(attr.second); - if (ax::mojom::AriaNotificationPriority::kNone != state) { + if (ax::mojom::AriaNotificationPriority::kNormal != state) { attributes->SetString(ToString(attr.first), ToString(state)); } } break; diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 73ad7bca4..7e86a8dd5 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -1864,8 +1864,7 @@ void CefRenderWidgetHostViewOSR::RequestImeCompositionUpdate( void CefRenderWidgetHostViewOSR::ImeCompositionRangeChanged( const gfx::Range& range, - const std::optional>& character_bounds, - const std::optional>& line_bounds) { + const std::optional>& character_bounds) { if (browser_impl_.get()) { CefRange cef_range(range.start(), range.end()); CefRenderHandler::RectList rcList; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index e82f7c9d7..2cb162a68 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -185,8 +185,7 @@ class CefRenderWidgetHostViewOSR viz::SurfaceId GetCurrentSurfaceId() const override; void ImeCompositionRangeChanged( const gfx::Range& range, - const std::optional>& character_bounds, - const std::optional>& line_bounds) override; + const std::optional>& character_bounds) override; std::unique_ptr CreateSyntheticGestureTarget() override; bool TransformPointToCoordSpaceForView( diff --git a/libcef/browser/views/label_button_impl.h b/libcef/browser/views/label_button_impl.h index b0b930794..88df5fe10 100644 --- a/libcef/browser/views/label_button_impl.h +++ b/libcef/browser/views/label_button_impl.h @@ -62,12 +62,12 @@ CEF_LABEL_BUTTON_IMPL_T class CefLabelButtonImpl : public CEF_BUTTON_IMPL_D { CEF_LABEL_BUTTON_IMPL_T void CEF_LABEL_BUTTON_IMPL_D::SetText( const CefString& text) { CEF_REQUIRE_VALID_RETURN_VOID(); - ParentClass::root_view()->SetText(text); + ParentClass::root_view()->SetText(text.ToString16()); } CEF_LABEL_BUTTON_IMPL_T CefString CEF_LABEL_BUTTON_IMPL_D::GetText() { CEF_REQUIRE_VALID_RETURN(CefString()); - return ParentClass::root_view()->GetText(); + return std::u16string(ParentClass::root_view()->GetText()); } CEF_LABEL_BUTTON_IMPL_T void CEF_LABEL_BUTTON_IMPL_D::SetImage( diff --git a/libcef/browser/views/textfield_impl.cc b/libcef/browser/views/textfield_impl.cc index df43dc227..fefcf2f0f 100644 --- a/libcef/browser/views/textfield_impl.cc +++ b/libcef/browser/views/textfield_impl.cc @@ -77,12 +77,12 @@ bool CefTextfieldImpl::IsReadOnly() { CefString CefTextfieldImpl::GetText() { CEF_REQUIRE_VALID_RETURN(CefString()); - return root_view()->GetText(); + return std::u16string(root_view()->GetText()); } void CefTextfieldImpl::SetText(const CefString& text) { CEF_REQUIRE_VALID_RETURN_VOID(); - root_view()->SetText(text); + root_view()->SetText(text.ToString16()); } void CefTextfieldImpl::AppendText(const CefString& text) { @@ -102,7 +102,7 @@ bool CefTextfieldImpl::HasSelection() { CefString CefTextfieldImpl::GetSelectedText() { CEF_REQUIRE_VALID_RETURN(CefString()); - return root_view()->GetSelectedText(); + return std::u16string(root_view()->GetSelectedText()); } void CefTextfieldImpl::SelectAll(bool reversed) { @@ -208,12 +208,12 @@ void CefTextfieldImpl::ClearEditHistory() { void CefTextfieldImpl::SetPlaceholderText(const CefString& text) { CEF_REQUIRE_VALID_RETURN_VOID(); - root_view()->SetPlaceholderText(text); + root_view()->SetPlaceholderText(text.ToString16()); } CefString CefTextfieldImpl::GetPlaceholderText() { CEF_REQUIRE_VALID_RETURN(CefString()); - return root_view()->GetPlaceholderText(); + return std::u16string(root_view()->GetPlaceholderText()); } void CefTextfieldImpl::SetPlaceholderTextColor(cef_color_t color) { diff --git a/libcef/common/base_impl.cc b/libcef/common/base_impl.cc index 1c5f6898f..7d28a379b 100644 --- a/libcef/common/base_impl.cc +++ b/libcef/common/base_impl.cc @@ -11,6 +11,7 @@ #include "cef/include/internal/cef_logging_internal.h" #include "cef/include/internal/cef_thread_internal.h" #include "cef/include/internal/cef_trace_event_internal.h" +#include "cef/libcef/common/api_version_util.h" namespace { @@ -218,13 +219,13 @@ CEF_EXPORT void cef_log(const char* file, } CEF_EXPORT cef_platform_thread_id_t cef_get_current_platform_thread_id() { - return base::PlatformThread::CurrentId(); + return base::PlatformThread::CurrentId().raw(); } CEF_EXPORT cef_platform_thread_handle_t cef_get_current_platform_thread_handle() { #if BUILDFLAG(IS_WIN) - return base::PlatformThread::CurrentId(); + return base::PlatformThread::CurrentId().raw(); #else return base::PlatformThread::CurrentHandle().platform_handle(); #endif @@ -240,5 +241,7 @@ CEF_EXPORT int cef_dump_without_crashing(long long mseconds_between_dumps, } CEF_EXPORT int cef_dump_without_crashing_unthrottled() { - return base::debug::DumpWithoutCrashingUnthrottled(); + CEF_API_REQUIRE_REMOVED(CEF_NEXT); + NOTIMPLEMENTED(); + return 0; } diff --git a/libcef/common/file_util_impl.cc b/libcef/common/file_util_impl.cc index 6464a077d..5db0fc3c9 100644 --- a/libcef/common/file_util_impl.cc +++ b/libcef/common/file_util_impl.cc @@ -62,7 +62,7 @@ bool CefCreateTempDirectoryInDirectory(const CefString& base_dir, base::FilePath result; base::FilePath::StringType prefix_str = prefix; if (base::CreateTemporaryDirInDir( - base_dir, base::FilePath::StringPieceType(prefix_str), &result)) { + base_dir, base::FilePath::StringViewType(prefix_str), &result)) { new_dir = result.value(); return true; } diff --git a/libcef/common/thread_impl.cc b/libcef/common/thread_impl.cc index ee103b7f4..1579df6bf 100644 --- a/libcef/common/thread_impl.cc +++ b/libcef/common/thread_impl.cc @@ -114,7 +114,7 @@ bool CefThreadImpl::Create(const CefString& display_name, } thread_task_runner_ = new CefTaskRunnerImpl(thread_->task_runner()); - thread_id_ = thread_->GetThreadId(); + thread_id_ = thread_->GetThreadId().raw(); return true; } diff --git a/libcef/common/value_base.h b/libcef/common/value_base.h index e3d616698..3054f7172 100644 --- a/libcef/common/value_base.h +++ b/libcef/common/value_base.h @@ -159,7 +159,7 @@ class CefValueControllerThreadSafe : public CefValueController { locked_thread_id_ = base::PlatformThread::CurrentId(); } void unlock() override NO_THREAD_SAFETY_ANALYSIS { - locked_thread_id_ = 0; + locked_thread_id_ = base::PlatformThreadId(); lock_.Release(); } bool locked() override { @@ -169,7 +169,7 @@ class CefValueControllerThreadSafe : public CefValueController { private: base::Lock lock_; - base::PlatformThreadId locked_thread_id_ = 0; + base::PlatformThreadId locked_thread_id_; }; // Non-thread-safe access control implementation. diff --git a/libcef_dll/base/cef_dump_without_crashing.cc b/libcef_dll/base/cef_dump_without_crashing.cc index 43e548cee..721ae5af5 100644 --- a/libcef_dll/base/cef_dump_without_crashing.cc +++ b/libcef_dll/base/cef_dump_without_crashing.cc @@ -15,6 +15,8 @@ bool CefDumpWithoutCrashing(long long mseconds_between_dumps, file_name, line_number); } +#if CEF_API_REMOVED(CEF_NEXT) bool CefDumpWithoutCrashingUnthrottled() { return cef_dump_without_crashing_unthrottled(); } +#endif diff --git a/patch/patch.cfg b/patch/patch.cfg index 66c3940f7..57bede7c2 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -519,9 +519,6 @@ patches = [ # # Avoid inclusion of undefined PartitionAlloc dependencies in Dawn after # https://crrev.com/4dacf2b61c359950d2c2f1b5f9b9d079a01290a4 - # - # win: Fix extra qualification on member 'basic_common_reference' - # https://chromium-review.googlesource.com/c/chromium/src/+/6265643 'name': 'base_sandbox_2743', }, { @@ -773,5 +770,10 @@ patches = [ # builds. # https://github.com/chromiumembedded/cef/issues/3892 'name': 'config_3892' + }, + { + # Linux: Allow GTK3 on GNOME with --gtk-version flag. + # https://chromium-review.googlesource.com/c/chromium/src/+/6334084 + 'name': 'gtk_compat_6334084' } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index fccb61f44..0ff8e3cd1 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 a35ddac7efebb..dbcfea242b463 100644 +index d4d3bc52426d1..69d48fac6bbf4 100644 --- base/command_line.cc +++ base/command_line.cc -@@ -404,11 +404,10 @@ void CommandLine::AppendSwitchNative(std::string_view switch_string, +@@ -421,11 +421,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 ea5678492..5984974ea 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,8 +1,8 @@ diff --git base/BUILD.gn base/BUILD.gn -index 854457658bbdc..823f50e53821d 100644 +index da6b76717d7b7..d536c8329e732 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -42,6 +42,7 @@ import("//build/rust/rust_static_library.gni") +@@ -41,6 +41,7 @@ import("//build/rust/rust_static_library.gni") import("//build/timestamp.gni") import("//build/util/process_version.gni") import("//build_overrides/build.gni") @@ -10,7 +10,7 @@ index 854457658bbdc..823f50e53821d 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1492,7 +1493,13 @@ component("base") { +@@ -1509,7 +1510,13 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -25,7 +25,7 @@ index 854457658bbdc..823f50e53821d 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -1942,6 +1949,12 @@ component("base") { +@@ -1959,6 +1966,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -59,28 +59,6 @@ index f680f63cffc5b..9cb615bbc8a5a 100644 DCHECK([&] { auto const was_set = is_initialized_check_flag_.test_and_set(); is_initialized_check_flag_.clear(); -diff --git base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h -index c3ac11523410f..2a3d3bc4d1f34 100644 ---- base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h -+++ base/allocator/partition_allocator/src/partition_alloc/pointers/raw_ptr.h -@@ -1271,7 +1271,7 @@ template - typename UQ> --struct std::basic_common_reference, T*, TQ, UQ> { -+struct basic_common_reference, T*, TQ, UQ> { - using type = T*; - }; - -@@ -1281,7 +1281,7 @@ template - typename UQ> --struct std::basic_common_reference, TQ, UQ> { -+struct basic_common_reference, TQ, UQ> { - using type = T*; - }; - diff --git base/hash/md5.h base/hash/md5.h index 215d636fec275..922e88f31b999 100644 --- base/hash/md5.h @@ -112,7 +90,7 @@ index 2158b648ca58a..8a8cb13b2fd74 100644 #else #include "base/hash/sha1_boringssl.h" diff --git base/json/json_reader.cc base/json/json_reader.cc -index af1d4f46d02c9..953585804c177 100644 +index 32d8707d3ad5d..12b8ccda8fc30 100644 --- base/json/json_reader.cc +++ base/json/json_reader.cc @@ -12,8 +12,9 @@ @@ -164,7 +142,7 @@ index af1d4f46d02c9..953585804c177 100644 } // static -@@ -168,7 +169,7 @@ std::optional JSONReader::ReadDict(std::string_view json, +@@ -179,7 +180,7 @@ std::optional JSONReader::ReadList(std::string_view json, JSONReader::Result JSONReader::ReadAndReturnValueWithError( std::string_view json, int options) { @@ -173,7 +151,7 @@ index af1d4f46d02c9..953585804c177 100644 internal::JSONParser parser(options); auto value = parser.Parse(json); if (!value) { -@@ -180,7 +181,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( +@@ -191,7 +192,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( } return std::move(*value); @@ -182,7 +160,7 @@ index af1d4f46d02c9..953585804c177 100644 SCOPED_UMA_HISTOGRAM_TIMER_MICROS(kSecurityJsonParsingTime); if (UsingRust()) { return DecodeJSONInRust(json, options, internal::kAbsoluteMaxDepth); -@@ -197,7 +198,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( +@@ -208,7 +209,7 @@ JSONReader::Result JSONReader::ReadAndReturnValueWithError( return std::move(*value); } @@ -191,7 +169,7 @@ index af1d4f46d02c9..953585804c177 100644 } // static -@@ -208,7 +209,7 @@ bool JSONReader::UsingRust() { +@@ -219,7 +220,7 @@ bool JSONReader::UsingRust() { if (!base::FeatureList::GetInstance()) { return false; } @@ -201,18 +179,18 @@ index af1d4f46d02c9..953585804c177 100644 #else return base::FeatureList::IsEnabled(base::features::kUseRustJsonParser); diff --git base/logging.cc base/logging.cc -index 4511af700c1be..dbd50c28455be 100644 +index e996f8c614266..7bd52b676cc92 100644 --- base/logging.cc +++ base/logging.cc -@@ -56,6 +56,7 @@ +@@ -51,6 +51,7 @@ + #include "base/trace_event/base_tracing.h" #include "base/vlog.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "third_party/abseil-cpp/absl/base/internal/raw_logging.h" #include "third_party/abseil-cpp/absl/cleanup/cleanup.h" -@@ -534,7 +535,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) { +@@ -530,7 +531,7 @@ bool BaseInitLoggingImpl(const LoggingSettings& settings) { } #endif @@ -269,7 +247,7 @@ index 5d11d4a1560b1..242a93bcca8ed 100644 } // namespace win #endif diff --git base/rand_util.h base/rand_util.h -index 716222897d140..2d1053085630c 100644 +index da48b37857aa3..3ff683247ab2a 100644 --- base/rand_util.h +++ base/rand_util.h @@ -23,8 +23,9 @@ diff --git a/patch/patches/base_test_4396276.patch b/patch/patches/base_test_4396276.patch index 65dff09b6..4905dc4da 100644 --- a/patch/patches/base_test_4396276.patch +++ b/patch/patches/base_test_4396276.patch @@ -1,8 +1,8 @@ diff --git base/test/BUILD.gn base/test/BUILD.gn -index 37a7e20c415f7..5eef10ee45573 100644 +index 82fab133d08d6..72857b99268eb 100644 --- base/test/BUILD.gn +++ base/test/BUILD.gn -@@ -210,11 +210,6 @@ static_library("test_support") { +@@ -208,11 +208,6 @@ static_library("test_support") { if (enable_base_tracing) { public_deps += [ "//third_party/perfetto:perfetto_test_support" ] @@ -14,7 +14,7 @@ index 37a7e20c415f7..5eef10ee45573 100644 deps += [ ":amalgamated_perfetto_sql_stdlib", ":gen_cc_chrome_track_event_descriptor", -@@ -609,7 +604,7 @@ if (enable_base_tracing) { +@@ -607,7 +602,7 @@ if (enable_base_tracing) { # processor depends on dev_sqlite. The two share the same symbols but have # different implementations, so we need to hide dev_sqlite in this shared # library even in non-component builds to prevent duplicate symbols. @@ -23,7 +23,7 @@ index 37a7e20c415f7..5eef10ee45573 100644 if (is_ios) { _target_type = "ios_framework_bundle" } -@@ -618,6 +613,8 @@ if (enable_base_tracing) { +@@ -616,6 +611,8 @@ if (enable_base_tracing) { defines = [ "TEST_TRACE_PROCESSOR_IMPL" ] testonly = true sources = [ @@ -32,7 +32,7 @@ index 37a7e20c415f7..5eef10ee45573 100644 "test_trace_processor_export.h", "test_trace_processor_impl.cc", "test_trace_processor_impl.h", -@@ -635,33 +632,6 @@ if (enable_base_tracing) { +@@ -633,33 +630,6 @@ if (enable_base_tracing) { output_name = "TestTraceProcessor" bundle_deps_filter = [ "//third_party/icu:icudata" ] } @@ -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 34ae648c14c93..0a481969e9417 100644 +index 95ef6926fc4cb..abb780c6d52c2 100644 --- content/shell/BUILD.gn +++ content/shell/BUILD.gn -@@ -910,7 +910,6 @@ if (is_mac) { +@@ -920,7 +920,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_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 91bf1a507..8778ab7e0 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -20,10 +20,10 @@ index 53a73d6c75b7a..05290de4c03a0 100644 // Make an exception to allow most visited tiles to commit in third-party diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index 84b894ac879b5..07d5b00e53e31 100644 +index f790e2c9ebe6a..7237437f88f50 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -8358,10 +8358,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -8439,10 +8439,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index 84b894ac879b5..07d5b00e53e31 100644 } return origin_and_debug_info; -@@ -8469,11 +8481,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -8550,11 +8562,20 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { DetermineInitiatorRelationship(initiator_rfh, frame_tree_node_->current_frame_host())); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 960e8b188..22bcdd405 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,5 +1,5 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index ffbd381f00929..d03d101656711 100644 +index 15141254347c3..700023784a81d 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn @@ -132,6 +132,9 @@ declare_args() { @@ -17,10 +17,10 @@ index ffbd381f00929..d03d101656711 100644 # .o files, instead of just references to .o files in the build directoy config("thin_archive") { + if (use_thin_archives) { - if ((is_apple && use_lld) || (is_linux && !is_clang)) { + if ((is_apple && use_lld) || (is_linux && !is_clang) || current_os == "aix") { # The macOS and iOS linker ld64.ldd doesn't support thin archive without # symbol table, gcc on linux also throws the error `archive has no index`. -@@ -2304,6 +2308,7 @@ config("thin_archive") { +@@ -2305,6 +2309,7 @@ config("thin_archive") { } else if (is_win && use_lld) { arflags = [ "/llvmlibthin" ] } diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index ce467aa55..e227f5c61 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 9f293f4ddd146..e9b20e7c5f39d 100644 +index 74763d4ec5662..3c88b9b9bcb1d 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 9f293f4ddd146..e9b20e7c5f39d 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/browser/request_header_integrity/buildflags.gni") -@@ -1838,6 +1839,7 @@ static_library("browser") { +@@ -1859,6 +1860,7 @@ static_library("browser") { "//build/config/compiler:compiler_buildflags", "//build/config/linux/dbus:buildflags", "//cc", @@ -18,7 +18,7 @@ index 9f293f4ddd146..e9b20e7c5f39d 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2524,6 +2526,10 @@ static_library("browser") { +@@ -2551,6 +2553,10 @@ static_library("browser") { sources += [ "net/net_error_diagnostics_dialog_stub.cc" ] } diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 4382c635a..3c5ea40fd 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index 7603c2662b8dc..9a38d816bdc40 100644 return false; } diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc -index 4f2fdafea29b3..dc69a82b32245 100644 +index 615de49f749ac..dc02b861c6e4c 100644 --- chrome/browser/devtools/devtools_window.cc +++ chrome/browser/devtools/devtools_window.cc @@ -38,6 +38,7 @@ @@ -24,7 +24,7 @@ index 4f2fdafea29b3..dc69a82b32245 100644 #include "chrome/browser/ui/browser_list.h" #include "chrome/browser/ui/browser_tabstrip.h" #include "chrome/browser/ui/browser_window.h" -@@ -1217,6 +1218,13 @@ DevToolsWindow* DevToolsWindow::Create( +@@ -1218,6 +1219,13 @@ DevToolsWindow* DevToolsWindow::Create( !browser->is_type_normal()) { can_dock = false; } @@ -38,7 +38,7 @@ index 4f2fdafea29b3..dc69a82b32245 100644 } // Create WebContents with devtools. -@@ -1676,9 +1684,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { +@@ -1677,9 +1685,13 @@ void DevToolsWindow::OpenInNewTab(const GURL& url) { if (!inspected_web_contents || !inspected_web_contents->OpenURL(params, /*navigation_handle_callback=*/{})) { @@ -52,7 +52,7 @@ index 4f2fdafea29b3..dc69a82b32245 100644 } } -@@ -1841,12 +1853,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { +@@ -1842,12 +1854,28 @@ void DevToolsWindow::CreateDevToolsBrowser() { Browser::CreationStatus::kOk) { return; } @@ -88,7 +88,7 @@ index 4f2fdafea29b3..dc69a82b32245 100644 } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index a66522f120f6f..4c8ffb85841f8 100644 +index 0ed6e9e434350..5c8bcd5c45ede 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -7,6 +7,7 @@ import("//build/config/compiler/compiler.gni") @@ -99,7 +99,7 @@ index a66522f120f6f..4c8ffb85841f8 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -299,6 +300,10 @@ static_library("ui") { +@@ -301,6 +302,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -110,7 +110,7 @@ index a66522f120f6f..4c8ffb85841f8 100644 public_deps = [ # WARNING WARNING WARNING # New dependencies outside of //chrome/browser should be added to -@@ -326,6 +331,7 @@ static_library("ui") { +@@ -328,6 +333,7 @@ static_library("ui") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/linux/dbus:buildflags", "//cc/paint", @@ -118,7 +118,7 @@ index a66522f120f6f..4c8ffb85841f8 100644 "//chrome:resources", "//chrome:strings", "//chrome/app:chrome_dll_resources", -@@ -695,6 +701,13 @@ static_library("ui") { +@@ -698,6 +704,13 @@ static_library("ui") { deps += [ "//components/plus_addresses/resources:vector_icons" ] } @@ -132,7 +132,7 @@ index a66522f120f6f..4c8ffb85841f8 100644 # TODO(crbug.com/41437292): Remove this circular dependency. # Any circular includes must depend on the target "//chrome/browser:browser_public_dependencies". # These are all-platform circular includes. -@@ -5471,6 +5484,7 @@ static_library("ui") { +@@ -5476,6 +5489,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -141,7 +141,7 @@ index a66522f120f6f..4c8ffb85841f8 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 3d0ffcbb38c23..04830b0062651 100644 +index fafd84d08e336..a17aad8f37537 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc @@ -268,6 +268,25 @@ @@ -194,7 +194,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1399,6 +1428,8 @@ void Browser::WindowFullscreenStateChanged() { +@@ -1404,6 +1433,8 @@ void Browser::WindowFullscreenStateChanged() { ->WindowFullscreenStateChanged(); command_controller_->FullscreenStateChanged(); UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN); @@ -203,7 +203,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } void Browser::FullscreenTopUIStateChanged() { -@@ -1740,6 +1771,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1752,6 +1783,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( return content::KeyboardEventProcessingResult::HANDLED; } @@ -218,7 +218,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1747,8 +1786,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1759,8 +1798,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -239,7 +239,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } bool Browser::TabsNeedBeforeUnloadFired() const { -@@ -1843,9 +1892,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) { +@@ -1855,9 +1904,14 @@ bool Browser::IsBackForwardCacheSupported(content::WebContents& web_contents) { content::PreloadingEligibility Browser::IsPrerender2Supported( content::WebContents& web_contents, content::PreloadingTriggerType trigger_type) { @@ -254,7 +254,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } bool Browser::ShouldShowStaleContentOnEviction(content::WebContents* source) { -@@ -1908,6 +1962,14 @@ WebContents* Browser::OpenURLFromTab( +@@ -1920,6 +1974,14 @@ WebContents* Browser::OpenURLFromTab( std::move(navigation_handle_callback)); } @@ -269,7 +269,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -2081,6 +2143,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -2093,6 +2155,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -278,7 +278,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } void Browser::CloseContents(WebContents* source) { -@@ -2110,6 +2174,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -2122,6 +2186,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -287,7 +287,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 if (!GetStatusBubble()) { return; } -@@ -2119,6 +2185,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -2131,6 +2197,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { } } @@ -305,7 +305,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 void Browser::ContentsMouseEvent(WebContents* source, const ui::Event& event) { const ui::EventType type = event.type(); const bool exited = type == ui::EventType::kMouseExited; -@@ -2147,6 +2224,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -2159,6 +2236,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -325,7 +325,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -2259,12 +2349,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -2271,12 +2361,24 @@ void Browser::WebContentsCreated(WebContents* source_contents, // to track `new_contents` after it is added to its TabModel this override can // be removed. CreateSessionServiceTabHelper(new_contents); @@ -350,7 +350,7 @@ index 3d0ffcbb38c23..04830b0062651 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(); -@@ -2277,6 +2379,13 @@ void Browser::RendererUnresponsive( +@@ -2289,6 +2391,13 @@ void Browser::RendererUnresponsive( void Browser::RendererResponsive( WebContents* source, content::RenderWidgetHost* render_widget_host) { @@ -364,7 +364,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 RenderWidgetHostView* view = render_widget_host->GetView(); if (view && !render_widget_host->GetView()->IsHTMLFormPopup()) { TabDialogs::FromWebContents(source)->HideHungRendererDialog( -@@ -2286,6 +2395,15 @@ void Browser::RendererResponsive( +@@ -2298,6 +2407,15 @@ void Browser::RendererResponsive( content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( WebContents* source) { @@ -380,7 +380,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 return javascript_dialogs::TabModalDialogManager::FromWebContents(source); } -@@ -2321,6 +2439,11 @@ void Browser::DraggableRegionsChanged( +@@ -2333,6 +2451,11 @@ void Browser::DraggableRegionsChanged( if (app_controller_) { app_controller_->DraggableRegionsChanged(regions, contents); } @@ -392,7 +392,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } void Browser::DidFinishNavigation( -@@ -2403,11 +2526,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -2415,11 +2538,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -408,7 +408,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2617,6 +2744,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2629,6 +2756,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -424,7 +424,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -3192,9 +3328,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -3211,9 +3347,10 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -436,7 +436,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } // We hide the status bar for web apps windows as this matches native -@@ -3202,6 +3339,12 @@ StatusBubble* Browser::GetStatusBubble() { +@@ -3221,6 +3358,12 @@ StatusBubble* Browser::GetStatusBubble() { // mode, as the minimal browser UI includes the status bar. if (web_app::AppBrowserController::IsWebApp(this) && !app_controller()->HasMinimalUiButtons()) { @@ -449,7 +449,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 return nullptr; } -@@ -3351,6 +3494,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -3370,6 +3513,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); web_contents_collection_.StopObserving(web_contents); } @@ -458,7 +458,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 } void Browser::TabDetachedAtImpl(content::WebContents* contents, -@@ -3511,6 +3656,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( +@@ -3530,6 +3675,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature( bool Browser::SupportsWindowFeatureImpl(WindowFeature feature, bool check_can_support) const { @@ -474,7 +474,7 @@ index 3d0ffcbb38c23..04830b0062651 100644 case TYPE_NORMAL: return NormalBrowserSupportsWindowFeature(feature, check_can_support); diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index fa28d4500e08d..c759623e8df87 100644 +index 8fda0dfbe8e10..a48a32fe5d08e 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -24,6 +24,7 @@ @@ -539,7 +539,7 @@ index fa28d4500e08d..c759623e8df87 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -961,10 +988,18 @@ class Browser : public TabStripModelObserver, +@@ -966,10 +993,18 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -558,9 +558,9 @@ index fa28d4500e08d..c759623e8df87 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1302,6 +1337,10 @@ class Browser : public TabStripModelObserver, - // This Browser's window. - raw_ptr window_; +@@ -1310,6 +1345,10 @@ class Browser : public TabStripModelObserver, + // The active state of this browser. + bool is_active_ = false; +#if BUILDFLAG(ENABLE_CEF) + std::unique_ptr cef_browser_delegate_; @@ -569,7 +569,7 @@ index fa28d4500e08d..c759623e8df87 100644 std::unique_ptr const tab_strip_model_delegate_; std::unique_ptr const tab_strip_model_; -@@ -1368,6 +1407,8 @@ class Browser : public TabStripModelObserver, +@@ -1376,6 +1415,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -613,7 +613,7 @@ index cefd4bc59943a..69425ab604ddb 100644 bool IsHostAllowedInIncognito(const GURL& url) { diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc -index f12ba73369a65..23c43dcb1dd24 100644 +index 83a510defbda5..f4305701c5f5a 100644 --- chrome/browser/ui/browser_tabstrip.cc +++ chrome/browser/ui/browser_tabstrip.cc @@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt( @@ -631,7 +631,7 @@ index f12ba73369a65..23c43dcb1dd24 100644 params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB : WindowOpenDisposition::NEW_BACKGROUND_TAB; params.tabstrip_index = idx; -@@ -85,6 +89,16 @@ content::WebContents* AddWebContents( +@@ -86,6 +90,16 @@ content::WebContents* AddWebContents( // Can't create a new contents for the current tab - invalid case. DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB); @@ -649,10 +649,10 @@ index f12ba73369a65..23c43dcb1dd24 100644 params.source_contents = source_contents; params.url = target_url; diff --git chrome/browser/ui/browser_window/browser_window_features.cc chrome/browser/ui/browser_window/browser_window_features.cc -index e584d77d67bda..a38a8504abd85 100644 +index 0cdf3de9047f3..291fe0fb0e81e 100644 --- chrome/browser/ui/browser_window/browser_window_features.cc +++ chrome/browser/ui/browser_window/browser_window_features.cc -@@ -67,6 +67,14 @@ BrowserWindowFeatures::BrowserWindowFeaturesFactory& GetFactory() { +@@ -73,6 +73,14 @@ BrowserWindowFeatures::BrowserWindowFeaturesFactory& GetFactory() { return *factory; } @@ -667,7 +667,7 @@ index e584d77d67bda..a38a8504abd85 100644 } // namespace // static -@@ -153,10 +161,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) { +@@ -162,10 +170,12 @@ void BrowserWindowFeatures::Init(BrowserWindowInterface* browser) { } void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) { @@ -681,7 +681,7 @@ index e584d77d67bda..a38a8504abd85 100644 if (IsChromeLabsEnabled()) { chrome_labs_coordinator_ = std::make_unique(browser); -@@ -198,7 +208,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) { +@@ -207,7 +217,7 @@ void BrowserWindowFeatures::InitPostWindowConstruction(Browser* browser) { } } @@ -690,7 +690,7 @@ index e584d77d67bda..a38a8504abd85 100644 base::FeatureList::IsEnabled(toast_features::kToastFramework)) { toast_service_ = std::make_unique(browser); } -@@ -231,10 +241,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction( +@@ -240,10 +250,12 @@ void BrowserWindowFeatures::InitPostBrowserViewConstruction( browser_view->browser(), side_panel_coordinator_->GetWindowRegistry()); @@ -701,6 +701,6 @@ index e584d77d67bda..a38a8504abd85 100644 // some unit tests without browser view. - if (browser_view->GetIsNormalType()) { + if (supports_toolbar) { - memory_saver_opt_in_iph_controller_ = - std::make_unique( - browser_view->browser()); + #if BUILDFLAG(ENABLE_GLIC) + if (glic::GlicEnabling::IsProfileEligible( + browser_view->browser()->profile())) { diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 9dd5727d5..60440c4bc 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 58add8ca095aa..9fe7728f8ccad 100644 +index d73cefd1f7df0..f69a7771cc61f 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc @@ -352,6 +352,18 @@ base::OnceCallback* GetMenuShownCallback() { @@ -32,7 +32,7 @@ index 58add8ca095aa..9fe7728f8ccad 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -882,6 +898,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -895,6 +911,14 @@ RenderViewContextMenu::RenderViewContextMenu( : nullptr; #endif // BUILDFLAG(IS_CHROMEOS) @@ -47,7 +47,7 @@ index 58add8ca095aa..9fe7728f8ccad 100644 observers_.AddObserver(&autofill_context_menu_manager_); } -@@ -1339,6 +1363,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1352,6 +1376,12 @@ void RenderViewContextMenu::InitMenu() { autofill_client->HideAutofillSuggestions( autofill::SuggestionHidingReason::kContextMenuOpened); } @@ -60,8 +60,8 @@ index 58add8ca095aa..9fe7728f8ccad 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3577,6 +3607,26 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( - execute_plugin_action_callback_ = std::move(cb); +@@ -3631,6 +3661,26 @@ void RenderViewContextMenu::RemoveObserverForTesting( + observers_.RemoveObserver(observer); } +// static @@ -88,12 +88,12 @@ index 58add8ca095aa..9fe7728f8ccad 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 e58e041b3ff58..e06b6ef140f36 100644 +index f9c86beaffb8e..a330e66b1970e 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 - } - #endif +@@ -158,7 +158,21 @@ class RenderViewContextMenu + void AddObserverForTesting(RenderViewContextMenuObserver* observer); + void RemoveObserverForTesting(RenderViewContextMenuObserver* observer); + // Registers a callback that will be called each time a context menu is + // created. @@ -113,7 +113,7 @@ index e58e041b3ff58..e06b6ef140f36 100644 Profile* GetProfile() const; // This may return nullptr (e.g. for WebUI dialogs). Virtual to allow tests to -@@ -479,6 +493,9 @@ class RenderViewContextMenu +@@ -482,6 +496,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -368,7 +368,7 @@ index 9fdda1636003d..538bd05a41296 100644 + return false; +} diff --git components/renderer_context_menu/render_view_context_menu_observer.h components/renderer_context_menu/render_view_context_menu_observer.h -index 05efbd822ab0a..f3dff27cdfd19 100644 +index b2aa338c76cd3..233c34003bbc5 100644 --- components/renderer_context_menu/render_view_context_menu_observer.h +++ components/renderer_context_menu/render_view_context_menu_observer.h @@ -11,6 +11,10 @@ namespace content { diff --git a/patch/patches/chrome_browser_devtools_osr.patch b/patch/patches/chrome_browser_devtools_osr.patch index 3219e221a..bd55136b1 100644 --- a/patch/patches/chrome_browser_devtools_osr.patch +++ b/patch/patches/chrome_browser_devtools_osr.patch @@ -1,17 +1,17 @@ diff --git chrome/browser/devtools/chrome_devtools_manager_delegate.cc chrome/browser/devtools/chrome_devtools_manager_delegate.cc -index c27eaca24d4b4..f2a7d6376f6aa 100644 +index 692e883ad3b60..4b45234cea0bc 100644 --- chrome/browser/devtools/chrome_devtools_manager_delegate.cc +++ chrome/browser/devtools/chrome_devtools_manager_delegate.cc -@@ -15,6 +15,7 @@ +@@ -14,6 +14,7 @@ + #include "base/strings/strcat.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_features.h" #include "chrome/browser/devtools/chrome_devtools_session.h" #include "chrome/browser/devtools/device/android_device_manager.h" -@@ -70,6 +71,10 @@ - #include "ash/constants/ash_switches.h" +@@ -66,6 +67,10 @@ + #include "components/prefs/pref_service.h" #endif +#if BUILDFLAG(ENABLE_CEF) @@ -21,7 +21,7 @@ index c27eaca24d4b4..f2a7d6376f6aa 100644 using content::DevToolsAgentHost; const char ChromeDevToolsManagerDelegate::kTypeApp[] = "app"; -@@ -284,6 +289,12 @@ std::string ChromeDevToolsManagerDelegate::GetTargetType( +@@ -280,6 +285,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 c9c7c7a1d..89b0b7e1f 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc -index 5d563a5311ec1..7c8c70393ed4b 100644 +index c3d8a9929e1f3..db4806237472f 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc -@@ -313,6 +313,12 @@ void FileSelectHelper::OnListDone(int error) { +@@ -311,6 +311,12 @@ void FileSelectHelper::OnListDone(int error) { } if (dialog_type_ == ui::SelectFileDialog::SELECT_UPLOAD_FOLDER) { @@ -15,7 +15,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644 auto model = CreateConfirmationDialog( entry->display_name_, std::move(chooser_files), base::BindOnce(&FileSelectHelper::PerformContentAnalysisIfNeeded, -@@ -511,31 +517,51 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -509,31 +515,51 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector* extensions = &file_type->extensions.back(); @@ -71,7 +71,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -552,12 +578,28 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -550,12 +576,28 @@ FileSelectHelper::GetFileTypesFromAcceptType( // dialog uses the first extension in the list to form the description, // like "EHTML Files". This is not what we want. if (valid_type_count > 1 || @@ -104,7 +104,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644 } return file_type; -@@ -567,7 +609,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -565,7 +607,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -114,7 +114,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -575,6 +618,7 @@ void FileSelectHelper::RunFileChooser( +@@ -573,6 +616,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -123,7 +123,7 @@ index 5d563a5311ec1..7c8c70393ed4b 100644 params.Clone()); } diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h -index 921b36076c3f3..d61248be1997b 100644 +index f007afe754be8..36f8ae45c5ee1 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h @@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index d2e9552d5..16b585630 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -210,7 +210,7 @@ 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 7d1c482562bef..30de35e14e826 100644 +index bc2b5ccf9e66f..78b8f5c123d8a 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc @@ -87,10 +87,12 @@ DialogDelegate::DialogDelegate() { @@ -278,10 +278,10 @@ index 7d1c482562bef..30de35e14e826 100644 // Web-modal (ui::mojom::ModalType::kChild) dialogs with parents are marked as // child widgets to prevent top-level window behavior (independent movement, diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h -index 4b0c8249f3d91..056a5a92074e3 100644 +index aed5714f0e767..75ee4f236b084 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h -@@ -128,13 +128,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -129,13 +129,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { // your use case. static Widget* CreateDialogWidget(std::unique_ptr delegate, gfx::NativeWindow context, @@ -303,7 +303,7 @@ index 4b0c8249f3d91..056a5a92074e3 100644 // Returns the dialog widget InitParams for a given |context| or |parent|. // If |bounds| is not empty, used to initially place the dialog, otherwise -@@ -142,7 +147,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { +@@ -143,7 +148,9 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { static Widget::InitParams GetDialogWidgetInitParams(WidgetDelegate* delegate, gfx::NativeWindow context, gfx::NativeView parent, diff --git a/patch/patches/chrome_browser_download.patch b/patch/patches/chrome_browser_download.patch index 3ae640f05..84d727c56 100644 --- a/patch/patches/chrome_browser_download.patch +++ b/patch/patches/chrome_browser_download.patch @@ -1,18 +1,18 @@ diff --git chrome/browser/download/chrome_download_manager_delegate.cc chrome/browser/download/chrome_download_manager_delegate.cc -index 5149acb874523..02ff8061b79c2 100644 +index cfcae9fc073be..b8c140692facc 100644 --- chrome/browser/download/chrome_download_manager_delegate.cc +++ chrome/browser/download/chrome_download_manager_delegate.cc -@@ -31,6 +31,7 @@ +@@ -30,6 +30,7 @@ + #include "base/task/thread_pool.h" #include "base/time/time.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/download/bubble/download_bubble_prefs.h" #include "chrome/browser/download/download_core_service.h" -@@ -158,6 +159,10 @@ - #include "chrome/browser/ash/policy/skyvault/skyvault_rename_handler.h" - #endif +@@ -164,6 +165,10 @@ + #endif // BUILDFLAG(ENABLE_EXTENSIONS) + #endif // BUILDFLAG(SAFE_BROWSING_DOWNLOAD_PROTECTION) +#if BUILDFLAG(ENABLE_CEF) +#include "cef/libcef/browser/download_manager_delegate.h" @@ -21,7 +21,7 @@ index 5149acb874523..02ff8061b79c2 100644 using content::BrowserThread; using content::DownloadManager; using download::DownloadItem; -@@ -516,6 +521,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile) +@@ -523,6 +528,11 @@ ChromeDownloadManagerDelegate::ChromeDownloadManagerDelegate(Profile* profile) download_dialog_bridge_ = std::make_unique(); download_message_bridge_ = std::make_unique(); #endif @@ -33,7 +33,7 @@ index 5149acb874523..02ff8061b79c2 100644 } ChromeDownloadManagerDelegate::~ChromeDownloadManagerDelegate() { -@@ -575,6 +585,9 @@ void ChromeDownloadManagerDelegate::Shutdown() { +@@ -586,6 +596,9 @@ void ChromeDownloadManagerDelegate::Shutdown() { download_manager_->RemoveObserver(this); download_manager_ = nullptr; } @@ -43,7 +43,7 @@ index 5149acb874523..02ff8061b79c2 100644 } void ChromeDownloadManagerDelegate::OnDownloadCanceledAtShutdown( -@@ -643,6 +656,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget( +@@ -654,6 +667,12 @@ bool ChromeDownloadManagerDelegate::DetermineDownloadTarget( ReportPDFLoadStatus(PDFLoadStatus::kTriggeredNoGestureDriveByDownload); } @@ -56,22 +56,23 @@ index 5149acb874523..02ff8061b79c2 100644 DownloadTargetDeterminer::CompletionCallback target_determined_callback = base::BindOnce(&ChromeDownloadManagerDelegate::OnDownloadTargetDetermined, weak_ptr_factory_.GetWeakPtr(), download->GetId(), -@@ -1134,8 +1153,11 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) { - Browser* browser = - web_contents ? chrome::FindBrowserWithTab(web_contents) : nullptr; - std::unique_ptr browser_displayer; -- if (!browser || -- !browser->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP)) { -+ if (!browser +@@ -1142,8 +1161,13 @@ void ChromeDownloadManagerDelegate::OpenDownload(DownloadItem* download) { + return; + } + ++ + Browser* browser = chrome::ScopedTabbedBrowserDisplayer(profile_).browser(); +- CHECK(browser && browser->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP)); ++ CHECK(browser +#if !BUILDFLAG(ENABLE_CEF) -+ || !browser->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP) ++ && browser->CanSupportWindowFeature(Browser::FEATURE_TABSTRIP) +#endif -+ ) { - browser_displayer = - std::make_unique(profile_); - browser = browser_displayer->browser(); ++ ); + content::OpenURLParams params( + net::FilePathToFileURL(download->GetTargetFilePath()), + content::Referrer(), WindowOpenDisposition::NEW_FOREGROUND_TAB, diff --git chrome/browser/download/chrome_download_manager_delegate.h chrome/browser/download/chrome_download_manager_delegate.h -index 04eb2a8d15f4d..740b869961528 100644 +index 41db535e5cf9c..015d84cc95b49 100644 --- chrome/browser/download/chrome_download_manager_delegate.h +++ chrome/browser/download/chrome_download_manager_delegate.h @@ -19,6 +19,7 @@ @@ -95,7 +96,7 @@ index 04eb2a8d15f4d..740b869961528 100644 // This is the Chrome side helper for the download system. class ChromeDownloadManagerDelegate : public content::DownloadManagerDelegate, -@@ -404,6 +411,10 @@ class ChromeDownloadManagerDelegate +@@ -406,6 +413,10 @@ class ChromeDownloadManagerDelegate // Whether a file picker dialog is showing. bool is_file_picker_showing_; diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 218e65793..7e1729823 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -34,10 +34,10 @@ index f61ec524109fe..92ca490728855 100644 WebViewGuestDelegate* ChromeExtensionsAPIClient::CreateWebViewGuestDelegate( diff --git chrome/browser/extensions/api/tabs/tabs_api.cc chrome/browser/extensions/api/tabs/tabs_api.cc -index d19671bad0e0d..639a1737a0ef5 100644 +index 344b810811bfb..a6e4a909eed24 100644 --- chrome/browser/extensions/api/tabs/tabs_api.cc +++ chrome/browser/extensions/api/tabs/tabs_api.cc -@@ -1674,7 +1674,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1686,7 +1686,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(ExtensionTabUtil::kTabStripNotEditableError)); } @@ -46,7 +46,7 @@ index d19671bad0e0d..639a1737a0ef5 100644 tab_strip->ActivateTabAt(tab_index); DCHECK_EQ(contents, tab_strip->GetActiveWebContents()); } -@@ -1688,7 +1688,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1700,7 +1700,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { } bool highlighted = *params->update_properties.highlighted; @@ -55,7 +55,7 @@ index d19671bad0e0d..639a1737a0ef5 100644 tab_strip->ToggleSelectionAt(tab_index); } } -@@ -1700,7 +1700,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1712,7 +1712,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { kCannotUpdateMuteCaptured, base::NumberToString(tab_id)))); } @@ -64,7 +64,7 @@ index d19671bad0e0d..639a1737a0ef5 100644 int opener_id = *params->update_properties.opener_tab_id; WebContents* opener_contents = nullptr; if (opener_id == tab_id) { -@@ -1735,7 +1735,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1747,7 +1747,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { ->SetAutoDiscardable(state); } @@ -73,7 +73,7 @@ index d19671bad0e0d..639a1737a0ef5 100644 // Bug fix for crbug.com/1197888. Don't let the extension update the tab if // the user is dragging tabs. if (!ExtensionTabUtil::IsTabStripEditable()) { -@@ -1756,7 +1756,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1768,7 +1768,8 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { // Navigate the tab to a new location if the url is different. if (params->update_properties.url) { std::string updated_url = *params->update_properties.url; @@ -83,7 +83,7 @@ index d19671bad0e0d..639a1737a0ef5 100644 !IsURLAllowedInIncognito(GURL(updated_url))) { return RespondNow(Error(ErrorUtils::FormatErrorMessage( tabs_constants::kURLsNotAllowedInIncognitoError, updated_url))); -@@ -1771,7 +1772,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { +@@ -1783,7 +1784,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(std::move(error))); } diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index 00509182c..0af388740 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -17,10 +17,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 0f19f3eeeea54..20a942f2e4007 100644 +index ab9701eb9ce8c..7c1dbe9adb0e8 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc -@@ -209,11 +209,28 @@ std::unique_ptr CreateQuietPrompt( +@@ -210,11 +210,28 @@ std::unique_ptr CreateQuietPrompt( } } diff --git a/patch/patches/chrome_browser_policy.patch b/patch/patches/chrome_browser_policy.patch index 093a3e2fa..3f4226191 100644 --- a/patch/patches/chrome_browser_policy.patch +++ b/patch/patches/chrome_browser_policy.patch @@ -105,10 +105,10 @@ index d8fda08453256..466718e824503 100644 } diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc -index 440b8aaca8f0f..fec585790788d 100644 +index 910f29ac13deb..680507379632e 100644 --- chrome/browser/policy/chrome_browser_policy_connector.cc +++ chrome/browser/policy/chrome_browser_policy_connector.cc -@@ -13,11 +13,14 @@ +@@ -13,10 +13,13 @@ #include "base/files/file_util.h" #include "base/functional/bind.h" #include "base/functional/callback.h" @@ -118,12 +118,11 @@ index 440b8aaca8f0f..fec585790788d 100644 #include "base/task/thread_pool.h" #include "build/branding_buildflags.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/browser_management/management_service_factory.h" #include "chrome/browser/policy/configuration_policy_handler_list_factory.h" -@@ -75,6 +78,11 @@ +@@ -71,6 +74,11 @@ namespace policy { namespace { bool g_command_line_enabled_for_testing = false; @@ -135,7 +134,7 @@ index 440b8aaca8f0f..fec585790788d 100644 } // namespace ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector() -@@ -255,6 +263,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() { +@@ -247,6 +255,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() { g_command_line_enabled_for_testing = true; } @@ -209,7 +208,7 @@ index 440b8aaca8f0f..fec585790788d 100644 base::flat_set ChromeBrowserPolicyConnector::device_affiliation_ids() const { if (!device_affiliation_ids_for_testing_.empty()) { -@@ -318,25 +393,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() { +@@ -310,25 +385,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() { std::unique_ptr ChromeBrowserPolicyConnector::CreatePlatformProvider() { #if BUILDFLAG(IS_WIN) @@ -244,7 +243,7 @@ index 440b8aaca8f0f..fec585790788d 100644 auto loader = std::make_unique( base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::BEST_EFFORT}), -@@ -346,7 +418,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() { +@@ -338,7 +410,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() { std::move(loader)); #elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) base::FilePath config_dir_path; @@ -254,10 +253,10 @@ index 440b8aaca8f0f..fec585790788d 100644 base::ThreadPool::CreateSequencedTaskRunner( {base::MayBlock(), base::TaskPriority::BEST_EFFORT}), diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h -index 40ce1cf15d277..e98c6e999fb5b 100644 +index dc552834ff821..6b290da791ccd 100644 --- chrome/browser/policy/chrome_browser_policy_connector.h +++ chrome/browser/policy/chrome_browser_policy_connector.h -@@ -23,6 +23,10 @@ +@@ -22,6 +22,10 @@ #include "components/policy/core/browser/android/policy_cache_updater_android.h" #endif @@ -268,7 +267,7 @@ index 40ce1cf15d277..e98c6e999fb5b 100644 class PrefService; namespace policy { -@@ -128,6 +132,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector { +@@ -122,6 +126,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector { static void EnableCommandLineSupportForTesting(); @@ -357,10 +356,10 @@ 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 afc13e1b56f78..f80c5ed14051d 100644 +index 6476c59ba6378..090eeaf9924a6 100644 --- chrome/common/chrome_paths.cc +++ chrome/common/chrome_paths.cc -@@ -527,7 +527,8 @@ bool PathProvider(int key, base::FilePath* result) { +@@ -500,7 +500,8 @@ bool PathProvider(int key, base::FilePath* result) { break; } #endif @@ -371,18 +370,18 @@ index afc13e1b56f78..f80c5ed14051d 100644 cur = base::FilePath(policy::kPolicyPath); break; diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h -index 21dfe21a78eb9..20d8ea2709b99 100644 +index e9c18e829eff9..9ed452be61adf 100644 --- chrome/common/chrome_paths.h +++ chrome/common/chrome_paths.h -@@ -8,6 +8,7 @@ +@@ -7,6 +7,7 @@ + #include "build/branding_buildflags.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "extensions/buildflags/buildflags.h" #include "third_party/widevine/cdm/buildflags.h" -@@ -51,7 +52,7 @@ enum { +@@ -50,7 +51,7 @@ enum { #if BUILDFLAG(IS_MAC) DIR_OUTER_BUNDLE, // Directory that is the outermost Chromium bundle. #endif diff --git a/patch/patches/chrome_browser_profile_menu.patch b/patch/patches/chrome_browser_profile_menu.patch index 522793f6d..9833929ab 100644 --- a/patch/patches/chrome_browser_profile_menu.patch +++ b/patch/patches/chrome_browser_profile_menu.patch @@ -14,7 +14,7 @@ index 6a1b3f5267b0d..d9cfa012c9756 100644 ? profile_metrics::BrowserProfileType::kRegular : profile_metrics::BrowserProfileType::kIncognito; diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -index 1efeddf9c4989..5792d489d189d 100644 +index 4116021bc0316..34a870636fa7c 100644 --- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc +++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc @@ -32,7 +32,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( @@ -44,10 +44,10 @@ index 1cf20c6206d60..9140d51cb79bd 100644 avatar_toolbar_button, GetBrowser().profile(), type); DCHECK_EQ(nullptr, bubble_tracker_.view()); diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc -index 3216e0a793c4a..6168afcbf507b 100644 +index 50a88f2c7bb82..bf6a3edd4e7bd 100644 --- chrome/browser/ui/views/profiles/incognito_menu_view.cc +++ chrome/browser/ui/views/profiles/incognito_menu_view.cc -@@ -36,7 +36,9 @@ +@@ -30,7 +30,9 @@ IncognitoMenuView::IncognitoMenuView(views::Button* anchor_button, Browser* browser) : ProfileMenuViewBase(anchor_button, browser) { @@ -59,10 +59,10 @@ index 3216e0a793c4a..6168afcbf507b 100644 ax::mojom::NameFrom::kAttribute); diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc -index 51408a6d84f3a..0d4e3197f52e1 100644 +index 6ba5eb8b97e90..fbe8d899878fe 100644 --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc -@@ -56,7 +56,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { +@@ -58,7 +58,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { std::unique_ptr bubble; bool is_incognito = browser.profile()->IsIncognitoProfile(); diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 327c5e803..917a77aef 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -85,7 +85,7 @@ index 2fe342e49d3c1..559b2a676dab5 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 b91df021f6402..fb37277fa9261 100644 +index 0fb68a6c01dfd..7a3aabb607b87 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc @@ -1022,7 +1022,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 4a181c782..f9fd95da3 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index c30c5ab55232d..2380f3595ce71 100644 +index 2fccae1ba5b02..470b8d8b3fae3 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -40,6 +40,7 @@ static_library("safe_browsing") { +@@ -38,6 +38,7 @@ static_library("safe_browsing") { "//components/enterprise/buildflags", "//components/enterprise/common:strings", "//components/enterprise/obfuscation/core:enterprise_obfuscation", diff --git a/patch/patches/chrome_browser_webui_license.patch b/patch/patches/chrome_browser_webui_license.patch index 18c87904d..370454d24 100644 --- a/patch/patches/chrome_browser_webui_license.patch +++ b/patch/patches/chrome_browser_webui_license.patch @@ -69,7 +69,7 @@ index 46103729d33a7..fbc400e60239b 100644 // chrome://terms class TermsUIConfig : public AboutUIConfigBase { diff --git chrome/browser/ui/webui/chrome_web_ui_configs.cc chrome/browser/ui/webui/chrome_web_ui_configs.cc -index acc4db4ef254f..18a764bf77ee0 100644 +index dd1c0af6d55ca..bf694c686434b 100644 --- chrome/browser/ui/webui/chrome_web_ui_configs.cc +++ chrome/browser/ui/webui/chrome_web_ui_configs.cc @@ -5,6 +5,7 @@ @@ -80,7 +80,7 @@ index acc4db4ef254f..18a764bf77ee0 100644 #include "chrome/browser/optimization_guide/optimization_guide_internals_ui.h" #include "chrome/browser/ui/webui/about/about_ui.h" #include "chrome/browser/ui/webui/accessibility/accessibility_ui.h" -@@ -205,6 +206,9 @@ void RegisterChromeWebUIConfigs() { +@@ -209,6 +210,9 @@ void RegisterChromeWebUIConfigs() { map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); @@ -91,7 +91,7 @@ index acc4db4ef254f..18a764bf77ee0 100644 map.AddWebUIConfig(std::make_unique()); map.AddWebUIConfig(std::make_unique()); diff --git chrome/common/webui_url_constants.cc chrome/common/webui_url_constants.cc -index 506d4ea46d297..b11a7b0325dc5 100644 +index d94ad4f02b11d..c1100feeff7c6 100644 --- chrome/common/webui_url_constants.cc +++ chrome/common/webui_url_constants.cc @@ -95,6 +95,9 @@ base::span ChromeURLHosts() { @@ -105,7 +105,7 @@ index 506d4ea46d297..b11a7b0325dc5 100644 #if !BUILDFLAG(IS_ANDROID) kChromeUIManagementHost, diff --git chrome/common/webui_url_constants.h chrome/common/webui_url_constants.h -index ff691df3c5a0e..f4ab7030e9908 100644 +index 8c8870763d73d..cc7ba0131fa0a 100644 --- chrome/common/webui_url_constants.h +++ chrome/common/webui_url_constants.h @@ -17,6 +17,7 @@ @@ -116,7 +116,7 @@ index ff691df3c5a0e..f4ab7030e9908 100644 #include "chrome/common/buildflags.h" #include "components/signin/public/base/signin_buildflags.h" #include "content/public/common/url_constants.h" -@@ -145,6 +146,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials"; +@@ -146,6 +147,10 @@ inline constexpr char kChromeUIInterstitialHost[] = "interstitials"; inline constexpr char kChromeUIInterstitialURL[] = "chrome://interstitials/"; inline constexpr char kChromeUIKillHost[] = "kill"; inline constexpr char kChromeUILauncherInternalsHost[] = "launcher-internals"; diff --git a/patch/patches/chrome_browser_webui_version.patch b/patch/patches/chrome_browser_webui_version.patch index cff6bca4a..182b0620e 100644 --- a/patch/patches/chrome_browser_webui_version.patch +++ b/patch/patches/chrome_browser_webui_version.patch @@ -124,7 +124,7 @@ index 2f8162d7491d1..b00f0d5bf26ae 100644 // Factory for the creating refs in callbacks. base::WeakPtrFactory weak_ptr_factory_{this}; diff --git chrome/browser/ui/webui/version/version_ui.cc chrome/browser/ui/webui/version/version_ui.cc -index 7919a35b990e8..67cbd0aa3360e 100644 +index 04741c513f541..90997d537aede 100644 --- chrome/browser/ui/webui/version/version_ui.cc +++ chrome/browser/ui/webui/version/version_ui.cc @@ -16,6 +16,7 @@ @@ -135,7 +135,7 @@ index 7919a35b990e8..67cbd0aa3360e 100644 #include "chrome/browser/browser_process_impl.h" #include "chrome/browser/profiles/profile.h" #include "chrome/browser/ui/webui/version/version_handler.h" -@@ -63,6 +64,10 @@ +@@ -62,6 +63,10 @@ #include "chrome/browser/ui/webui/version/version_util_win.h" #endif @@ -146,7 +146,7 @@ index 7919a35b990e8..67cbd0aa3360e 100644 using content::WebUIDataSource; namespace { -@@ -83,6 +88,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { +@@ -82,6 +87,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { {version_ui::kCommandLineName, IDS_VERSION_UI_COMMAND_LINE}, {version_ui::kExecutablePathName, IDS_VERSION_UI_EXECUTABLE_PATH}, {version_ui::kProfilePathName, IDS_VERSION_UI_PROFILE_PATH}, @@ -157,7 +157,7 @@ index 7919a35b990e8..67cbd0aa3360e 100644 {version_ui::kVariationsName, IDS_VERSION_UI_VARIATIONS}, {version_ui::kVariationsCmdName, IDS_VERSION_UI_VARIATIONS_CMD}, {version_ui::kCopyVariationsLabel, IDS_VERSION_UI_COPY_VARIATIONS_LABEL}, -@@ -114,6 +123,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { +@@ -113,6 +122,10 @@ void CreateAndAddVersionUIDataSource(Profile* profile) { IDR_PRODUCT_LOGO_WHITE); #endif // BUILDFLAG(IS_ANDROID) html_source->SetDefaultResource(IDR_VERSION_UI_ABOUT_VERSION_HTML); @@ -168,13 +168,13 @@ index 7919a35b990e8..67cbd0aa3360e 100644 } std::string GetProductModifier() { -@@ -231,6 +244,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) { +@@ -229,6 +242,10 @@ void VersionUI::AddVersionDetailStrings(content::WebUIDataSource* html_source) { // blank. - html_source->AddString(version_ui::kExecutablePath, std::string()); - html_source->AddString(version_ui::kProfilePath, std::string()); + html_source->AddString(version_ui::kExecutablePath, std::string_view()); + html_source->AddString(version_ui::kProfilePath, std::string_view()); +#if BUILDFLAG(ENABLE_CEF) -+ html_source->AddString(version_ui::kModulePath, std::string()); -+ html_source->AddString(version_ui::kUserDataPath, std::string()); ++ html_source->AddString(version_ui::kModulePath, std::string_view()); ++ html_source->AddString(version_ui::kUserDataPath, std::string_view()); +#endif #if BUILDFLAG(IS_MAC) diff --git a/patch/patches/chrome_common_logging.patch b/patch/patches/chrome_common_logging.patch index bc6717851..227af329f 100644 --- a/patch/patches/chrome_common_logging.patch +++ b/patch/patches/chrome_common_logging.patch @@ -1,8 +1,8 @@ diff --git chrome/common/features.gni chrome/common/features.gni -index 3d82d96a32ad9..1abf381036167 100644 +index 1078abe8b3665..88be445f788d6 100644 --- chrome/common/features.gni +++ chrome/common/features.gni -@@ -7,6 +7,7 @@ import("//build/config/chromeos/ui_mode.gni") +@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") import("//build/config/compiler/compiler.gni") import("//build/config/dcheck_always_on.gni") import("//build/config/features.gni") @@ -10,7 +10,7 @@ index 3d82d96a32ad9..1abf381036167 100644 import("//components/compose/features.gni") import("//components/nacl/features.gni") import("//components/safe_browsing/buildflags.gni") -@@ -32,7 +33,7 @@ assert(use_blink, "Chromium without blink shouldn't use anything in //chrome") +@@ -31,7 +32,7 @@ assert(use_blink, "Chromium without blink shouldn't use anything in //chrome") declare_args() { # Enables the build to have logging enabled by default. # This is intended for use only in developer builds. @@ -19,7 +19,7 @@ index 3d82d96a32ad9..1abf381036167 100644 # Platforms for which Chrome supports a certificate management UI that # shows the Chrome Root Store. This is specific to the v2 UI that is -@@ -67,11 +68,13 @@ declare_args() { +@@ -66,11 +67,13 @@ declare_args() { # optimize_webui was moved to ui/base/ui_features.gni } @@ -32,4 +32,4 @@ index 3d82d96a32ad9..1abf381036167 100644 +} # Use brlapi from brltty for braille display support. - use_brlapi = is_chromeos_ash + use_brlapi = is_chromeos diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 6a8bdc812..2ae921b25 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 078a4b1a1e350..65ac56b910d9d 100644 +index 5974cdb9b3a8b..5ab669f302ce8 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -42,6 +42,7 @@ @@ -10,7 +10,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" -@@ -544,6 +545,7 @@ struct MainFunction { +@@ -545,6 +546,7 @@ struct MainFunction { int (*function)(content::MainFunctionParams); }; @@ -18,7 +18,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { #if BUILDFLAG(IS_WIN) -@@ -621,6 +623,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) { +@@ -622,6 +624,7 @@ void InitializeUserDataDir(base::CommandLine* command_line) { command_line->AppendSwitchPath(switches::kUserDataDir, user_data_dir); #endif // BUILDFLAG(IS_WIN) } @@ -26,7 +26,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 #if !BUILDFLAG(IS_ANDROID) void InitLogging(const std::string& process_type) { -@@ -740,6 +743,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -741,6 +744,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -37,7 +37,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 std::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get()); -@@ -765,7 +772,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -766,7 +773,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // future session's metrics. DeferBrowserMetrics(user_data_dir); @@ -46,7 +46,7 @@ index 078a4b1a1e350..65ac56b910d9d 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. -@@ -850,7 +857,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -851,7 +858,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( // Initializes the resource bundle and determines the locale. std::string actual_locale = LoadLocalState( @@ -56,7 +56,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 chrome_feature_list_creator->SetApplicationLocale(actual_locale); chrome_feature_list_creator->OverrideCachedUIStrings(); -@@ -865,6 +873,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -866,6 +874,8 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( new net::NetworkChangeNotifierFactoryAndroid()); #endif @@ -65,7 +65,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 if (base::FeatureList::IsEnabled( features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { bool record = true; -@@ -875,6 +885,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -876,6 +886,7 @@ std::optional ChromeMainDelegate::PostEarlyInitialization( if (record) chrome_content_browser_client_->startup_data()->RecordCoreSystemProfile(); } @@ -73,7 +73,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 #if BUILDFLAG(IS_ANDROID) UmaSessionStats::OnStartup(); -@@ -921,8 +932,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) { +@@ -922,8 +933,8 @@ void ChromeMainDelegate::CreateThreadPool(std::string_view name) { std::make_unique()); // `ChromeMainDelegateAndroid::PreSandboxStartup` creates the profiler a little @@ -84,7 +84,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 // Start the sampling profiler as early as possible - namely, once the thread // pool has been created. sampling_profiler_ = std::make_unique(); -@@ -1312,6 +1323,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1323,6 +1334,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -92,7 +92,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1327,6 +1339,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1338,6 +1350,7 @@ void ChromeMainDelegate::PreSandboxStartup() { if (chrome::ProcessNeedsProfileDir(process_type)) { InitializeUserDataDir(base::CommandLine::ForCurrentProcess()); } @@ -100,7 +100,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 // Register component_updater PathProvider after DIR_USER_DATA overridden by // command line flags. Maybe move the chrome PathProvider down here also? -@@ -1423,7 +1436,8 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1434,7 +1447,8 @@ void ChromeMainDelegate::PreSandboxStartup() { #else const std::string loaded_locale = ui::ResourceBundle::InitSharedInstanceWithLocale( @@ -110,7 +110,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 base::FilePath resources_pack_path; base::PathService::Get(chrome::FILE_RESOURCES_PACK, &resources_pack_path); -@@ -1433,6 +1447,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1444,6 +1458,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -118,7 +118,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess && -@@ -1469,6 +1484,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1480,6 +1495,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -126,7 +126,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1587,6 +1603,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1598,6 +1614,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -134,7 +134,7 @@ index 078a4b1a1e350..65ac56b910d9d 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 = -@@ -1599,6 +1616,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1610,6 +1627,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -142,7 +142,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1709,6 +1727,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -1720,6 +1738,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { : memory_system::DispatcherParameters:: AllocationTraceRecorderInclusion::kIgnore; @@ -150,7 +150,7 @@ index 078a4b1a1e350..65ac56b910d9d 100644 memory_system::Initializer() .SetGwpAsanParameters(gwp_asan_boost_sampling, process_type) .SetProfilingClientParameters(chrome::GetChannel(), -@@ -1716,5 +1735,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -1727,5 +1746,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { .SetDispatcherParameters(memory_system::DispatcherParameters:: PoissonAllocationSamplerInclusion::kEnforce, allocation_recorder_inclusion, process_type) @@ -210,7 +210,7 @@ index db17714f74137..7119e5dba649a 100644 "//chrome/app:command_ids", "//chrome/browser/renderer_host:history_swiper", diff --git chrome/app_shim/chrome_main_app_mode_mac.mm chrome/app_shim/chrome_main_app_mode_mac.mm -index 8f5c477acba39..ff2f90a8bf27b 100644 +index 72eb096075a05..d3866aae87c60 100644 --- chrome/app_shim/chrome_main_app_mode_mac.mm +++ chrome/app_shim/chrome_main_app_mode_mac.mm @@ -35,6 +35,7 @@ @@ -221,7 +221,7 @@ index 8f5c477acba39..ff2f90a8bf27b 100644 #include "chrome/app/chrome_crash_reporter_client.h" #include "chrome/app_shim/app_shim_controller.h" #include "chrome/app_shim/app_shim_delegate.h" -@@ -171,7 +172,9 @@ int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) { +@@ -159,7 +160,9 @@ int APP_SHIM_ENTRY_POINT_NAME(const app_mode::ChromeAppModeInfo* info) { base::FilePath(info->user_data_dir).DirName().DirName().DirName(); // TODO(crbug.com/40807881): Specify `user_data_dir` to CrashPad. @@ -232,18 +232,18 @@ index 8f5c477acba39..ff2f90a8bf27b 100644 base::PathService::OverrideAndCreateIfNeeded( diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index af2f0398d633e..598d57e22fdd4 100644 +index 61da14e26c4db..2334d0fab04b5 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc -@@ -52,6 +52,7 @@ +@@ -27,6 +27,7 @@ + #include "base/trace_event/trace_event.h" + #include "base/values.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" - #include "cc/base/switches.h" +#include "cef/libcef/features/features.h" - #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -527,7 +528,7 @@ void ProcessSingletonNotificationCallbackImpl( + #include "chrome/browser/browser_features.h" +@@ -432,7 +433,7 @@ void ProcessSingletonNotificationCallbackImpl( return; } @@ -252,7 +252,7 @@ index af2f0398d633e..598d57e22fdd4 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 -@@ -842,7 +843,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { +@@ -741,7 +742,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { return content::RESULT_CODE_NORMAL_EXIT; } @@ -261,16 +261,7 @@ index af2f0398d633e..598d57e22fdd4 100644 // If we are running stale binaries then relaunch and exit immediately. if (upgrade_util::IsRunningOldChrome()) { if (!upgrade_util::RelaunchChromeBrowser( -@@ -855,7 +856,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() { - // result in browser startup bailing. - return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED; - } --#endif // BUILDFLAG(IS_WIN) -+#endif // BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) - - return load_local_state_result; - } -@@ -960,7 +961,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( +@@ -859,7 +860,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( browser_process_->local_state()); platform_management_service->RefreshCache(base::NullCallback()); @@ -279,48 +270,39 @@ index af2f0398d633e..598d57e22fdd4 100644 if (first_run::IsChromeFirstRun()) { bool stats_default; if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) { -@@ -973,7 +974,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded( - : metrics::EnableMetricsDefault::OPT_IN); - } - } --#endif // BUILDFLAG(IS_WIN) -+#endif // BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) - - std::string locale = - startup_data_->chrome_feature_list_creator()->actual_locale(); -@@ -1006,6 +1007,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) +@@ -905,6 +906,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { + #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) master_prefs_ = std::make_unique(); +#if !BUILDFLAG(ENABLE_CEF) std::unique_ptr installer_initial_prefs = startup_data_->chrome_feature_list_creator()->TakeInitialPrefs(); if (!installer_initial_prefs) -@@ -1039,6 +1041,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { +@@ -938,6 +940,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() { master_prefs_->confirm_to_quit); } - #endif // BUILDFLAG(IS_MAC) + #endif +#endif // !BUILDFLAG(ENABLE_CEF) - #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) return content::RESULT_CODE_NORMAL_EXIT; } -@@ -1111,6 +1114,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -1007,6 +1010,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { browser_process_->browser_policy_connector()->OnResourceBundleCreated(); +#if !BUILDFLAG(ENABLE_CEF) // 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) -@@ -1132,6 +1136,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { - #endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) + #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) +@@ -1028,6 +1032,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { + #endif } - #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) + #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) +#endif // !BUILDFLAG(ENABLE_CEF) #if BUILDFLAG(IS_MAC) #if defined(ARCH_CPU_X86_64) -@@ -1503,6 +1508,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1395,6 +1400,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->PreMainMessageLoopRun(); #if BUILDFLAG(IS_WIN) @@ -328,7 +310,7 @@ index af2f0398d633e..598d57e22fdd4 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)) { -@@ -1514,6 +1520,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1406,6 +1412,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { return ChromeBrowserMainPartsWin::HandleIconsCommands( *base::CommandLine::ForCurrentProcess()); } @@ -336,75 +318,61 @@ index af2f0398d633e..598d57e22fdd4 100644 ui::SelectFileDialog::SetFactory( std::make_unique()); -@@ -1536,6 +1543,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1428,6 +1435,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } - #endif // BUILDFLAG(CHROME_FOR_TESTING) + #endif +#if !BUILDFLAG(ENABLE_CEF) if (base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMakeDefaultBrowser)) { bool is_managed = g_browser_process->local_state()->IsManagedPreference( -@@ -1549,18 +1557,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1441,13 +1449,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { ? static_cast(content::RESULT_CODE_NORMAL_EXIT) - : static_cast(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED); + : static_cast(CHROME_RESULT_CODE_SHELL_INTEGRATION_FAILED); } +#endif // !BUILDFLAG(ENABLE_CEF) #if defined(USE_AURA) // Make sure aura::Env has been initialized. CHECK(aura::Env::GetInstance()); - #endif // defined(USE_AURA) + #endif -+ -+#if !BUILDFLAG(ENABLE_CEF) - #if BUILDFLAG(IS_WIN) +-#if BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) // We must call DoUpgradeTasks now that we own the browser singleton to // finish upgrade tasks (swap) and relaunch if necessary. if (upgrade_util::DoUpgradeTasks(*base::CommandLine::ForCurrentProcess())) - return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED; - #endif // BUILDFLAG(IS_WIN) -+#endif // !BUILDFLAG(ENABLE_CEF) - - #if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING) - // Begin relaunch processing immediately if User Data migration is required -@@ -1599,7 +1611,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1491,7 +1500,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } - #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) + #endif -#if BUILDFLAG(IS_WIN) +#if BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) // 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 -@@ -1608,7 +1620,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { - // obtained but before potentially creating the first run sentinel). - if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall()) - return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS; --#endif // BUILDFLAG(IS_WIN) -+#endif // BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) - - // Desktop construction occurs here, (required before profile creation). - PreProfileInit(); -@@ -1681,6 +1693,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1573,7 +1582,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Call `PostProfileInit()`and set it up for profiles created later. profile_init_manager_ = std::make_unique(this, profile); -+#if !BUILDFLAG(ENABLE_CEF) - #if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) +-#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) ++#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS) && !BUILDFLAG(ENABLE_CEF) // Execute first run specific code after the PrefService has been initialized // and preferences have been registered since some of the import code depends -@@ -1714,6 +1727,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { - *base::CommandLine::ForCurrentProcess()); + // on preferences. +@@ -1594,7 +1603,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } - #endif // BUILDFLAG(IS_WIN) -+#endif // !BUILDFLAG(ENABLE_CEF) + #endif - // Configure modules that need access to resources. - net::NetModule::SetResourceProvider(ChromeNetResourceProvider); -@@ -1805,6 +1819,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +-#if BUILDFLAG(IS_WIN) ++#if BUILDFLAG(IS_WIN) && !BUILDFLAG(ENABLE_CEF) + // Registers Chrome with the Windows Restart Manager, which will restore the + // Chrome session when the computer is restarted after a system update. + // This could be run as late as WM_QUERYENDSESSION for system update reboots, +@@ -1697,6 +1706,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { g_browser_process->profile_manager()->GetLastOpenedProfiles(); } - #endif // BUILDFLAG(IS_CHROMEOS_ASH) + #endif + + // Bypass StartupBrowserCreator and RunLoop creation with CEF. + // CEF with the Chrome runtime will create and manage its own RunLoop. @@ -413,7 +381,7 @@ index af2f0398d633e..598d57e22fdd4 100644 // This step is costly. if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(), base::FilePath(), profile_info, -@@ -1837,11 +1856,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1724,11 +1738,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -426,7 +394,7 @@ index af2f0398d633e..598d57e22fdd4 100644 +#endif // !BUILDFLAG(ENABLE_CEF) + browser_creator_.reset(); - #endif // !BUILDFLAG(IS_ANDROID) + #endif // BUILDFLAG(IS_ANDROID) diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm index e26e3625c99c8..c0d4a95607e37 100644 @@ -465,7 +433,7 @@ index e26e3625c99c8..c0d4a95607e37 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index 678e42c96fe4a..3e61f6e714e5c 100644 +index c9d3bbcf2a0b1..2dd6a7ecf6a84 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc @@ -47,6 +47,7 @@ @@ -476,7 +444,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 #include "chrome/browser/after_startup_task_utils.h" #include "chrome/browser/ai/ai_manager.h" #include "chrome/browser/app_mode/app_mode_utils.h" -@@ -1483,6 +1484,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { +@@ -1490,6 +1491,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { } ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -485,7 +453,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back( std::make_unique()); -@@ -1520,6 +1523,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1527,6 +1530,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { } } @@ -497,7 +465,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -4722,9 +4730,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4731,9 +4739,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -509,7 +477,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -6799,7 +6809,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6809,7 +6819,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( } } @@ -518,7 +486,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -6817,6 +6827,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6827,6 +6837,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -527,7 +495,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 } std::vector -@@ -7925,11 +7937,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -7956,11 +7968,11 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -541,7 +509,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -7951,7 +7963,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7982,7 +7994,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -551,7 +519,7 @@ index 678e42c96fe4a..3e61f6e714e5c 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -8129,7 +8142,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -8160,7 +8173,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -561,10 +529,10 @@ index 678e42c96fe4a..3e61f6e714e5c 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 388954e9b504a..7fd8d7b36fa04 100644 +index 2b5748cd55d4c..c80ed07d3b623 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -157,6 +157,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -159,6 +159,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -573,7 +541,7 @@ index 388954e9b504a..7fd8d7b36fa04 100644 // 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. -@@ -726,7 +728,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -727,7 +729,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -582,7 +550,7 @@ index 388954e9b504a..7fd8d7b36fa04 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1339,7 +1341,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -1343,7 +1345,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -592,18 +560,18 @@ index 388954e9b504a..7fd8d7b36fa04 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index dc8800d422a2c..675410378cc6f 100644 +index c95fca6d405cd..ecec59e7ee2b7 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc -@@ -16,6 +16,7 @@ +@@ -15,6 +15,7 @@ + #include "build/branding_buildflags.h" #include "build/build_config.h" #include "build/chromecast_buildflags.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/invert_bubble_prefs.h" -@@ -213,6 +214,10 @@ +@@ -209,6 +210,10 @@ #include "extensions/browser/pref_names.h" #endif // BUILDFLAG(ENABLE_EXTENSIONS_CORE) @@ -614,7 +582,7 @@ index dc8800d422a2c..675410378cc6f 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1940,6 +1945,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1842,6 +1847,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -626,7 +594,7 @@ index dc8800d422a2c..675410378cc6f 100644 } // Register prefs applicable to all profiles. -@@ -2390,6 +2400,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -2281,6 +2291,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 abd058f5e..4fcfb3da0 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 47e19e2f12139..be792c0b0a12a 100644 +index 61bb1335729f4..bd8c6967a682a 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -421,6 +421,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -427,6 +427,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 47e19e2f12139..be792c0b0a12a 100644 return false; } -@@ -438,6 +439,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -444,6 +445,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -24,7 +24,7 @@ index 47e19e2f12139..be792c0b0a12a 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1211,11 +1219,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1231,11 +1239,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -41,10 +41,10 @@ index 47e19e2f12139..be792c0b0a12a 100644 void BrowserCommandController::InitCommandState() { diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc -index 6130205985f73..5505b44742fde 100644 +index 2eb112147b64b..497e2be438367 100644 --- chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc -@@ -733,10 +733,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel( +@@ -730,10 +730,12 @@ FindAndEditSubMenuModel::FindAndEditSubMenuModel( ui::SimpleMenuModel::Delegate* delegate) : SimpleMenuModel(delegate) { AddItemWithStringIdAndVectorIcon(this, IDC_FIND, IDS_FIND, kSearchMenuIcon); @@ -57,7 +57,7 @@ index 6130205985f73..5505b44742fde 100644 } class SaveAndShareSubMenuModel : public ui::SimpleMenuModel { -@@ -801,6 +803,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( +@@ -798,6 +800,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel( } } @@ -115,7 +115,7 @@ index 6130205985f73..5505b44742fde 100644 } // namespace //////////////////////////////////////////////////////////////////////////////// -@@ -1730,7 +1783,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { +@@ -1726,7 +1779,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { return false; } @@ -124,7 +124,7 @@ index 6130205985f73..5505b44742fde 100644 GlobalError* error = GlobalErrorServiceFactory::GetForProfile(browser_->profile()) ->GetGlobalErrorByMenuItemCommandID(command_id); -@@ -1746,6 +1799,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { +@@ -1742,6 +1795,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { } } @@ -155,7 +155,7 @@ index 6130205985f73..5505b44742fde 100644 bool AppMenuModel::IsCommandIdAlerted(int command_id) const { if (command_id == IDC_VIEW_PASSWORDS || command_id == IDC_SHOW_PASSWORD_MANAGER) { -@@ -1901,8 +1978,10 @@ void AppMenuModel::Build() { +@@ -1897,8 +1974,10 @@ void AppMenuModel::Build() { IDS_CLEAR_BROWSING_DATA, kTrashCanRefreshIcon); @@ -200,10 +200,10 @@ index f5f5d8c1a8918..bebb784115c87 100644 // Adds actionable global error menu items to the menu. // Examples: Extension permissions and sign in errors. diff --git chrome/browser/ui/views/find_bar_host.cc chrome/browser/ui/views/find_bar_host.cc -index 38fe5a02de21d..2bd4508d5c024 100644 +index f348f09b374e3..08c704336746e 100644 --- chrome/browser/ui/views/find_bar_host.cc +++ chrome/browser/ui/views/find_bar_host.cc -@@ -604,6 +604,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { +@@ -608,6 +608,14 @@ gfx::Rect FindBarHost::GetDialogPosition(gfx::Rect avoid_overlapping_rect) { // The BrowserView does Layout for the components that we care about // positioning relative to, so we ask it to tell us where we should go. gfx::Rect find_bar_bounds = browser_view_->GetFindBarBoundingBox(); @@ -219,7 +219,7 @@ index 38fe5a02de21d..2bd4508d5c024 100644 return gfx::Rect(); } diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc -index 806679c846f15..5c685e93631c8 100644 +index 2e9c753a7da81..c628e1c945f30 100644 --- chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -112,15 +112,25 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant( @@ -311,7 +311,7 @@ index 806679c846f15..5c685e93631c8 100644 browser_frame_view_->OnBrowserViewInitViewsComplete(); } -@@ -366,6 +398,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() +@@ -365,6 +397,8 @@ ui::ColorProviderKey::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() } void BrowserFrame::OnNativeWidgetWorkspaceChanged() { @@ -320,7 +320,7 @@ index 806679c846f15..5c685e93631c8 100644 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -@@ -576,6 +610,13 @@ void BrowserFrame::SelectNativeTheme() { +@@ -575,6 +609,13 @@ void BrowserFrame::SelectNativeTheme() { return; } @@ -334,7 +334,7 @@ index 806679c846f15..5c685e93631c8 100644 // Ignore the system theme for web apps with window-controls-overlay as the // display_override so the web contents can blend with the overlay by using // the developer-provided theme color for a better experience. Context: -@@ -641,5 +682,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( +@@ -640,5 +681,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( } bool BrowserFrame::IsIncognitoBrowser() const { @@ -397,10 +397,10 @@ index 3d8a15049d4d2..66c4789581fe1 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 127aa3ef3ba70..506cb33978bed 100644 +index 1b68a93c6d849..4aefc07ba8b02 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -363,10 +363,6 @@ using web_modal::WebContentsModalDialogHost; +@@ -356,10 +356,6 @@ using web_modal::WebContentsModalDialogHost; namespace { @@ -411,7 +411,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 #if BUILDFLAG(IS_CHROMEOS) // UMA histograms that record animation smoothness for tab loading animation. constexpr char kTabLoadingSmoothnessHistogramName[] = -@@ -776,6 +772,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { +@@ -770,6 +766,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate { return browser_view_->frame()->GetTopInset() - browser_view_->y(); } @@ -426,7 +426,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 bool IsToolbarVisible() const override { return browser_view_->IsToolbarVisible(); } -@@ -927,11 +931,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { +@@ -921,11 +925,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -449,7 +449,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 SetShowIcon(::ShouldShowWindowIcon( browser_.get(), AppUsesWindowControlsOverlay(), AppUsesTabbed())); -@@ -1071,8 +1085,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -1067,8 +1081,15 @@ BrowserView::BrowserView(std::unique_ptr browser) watermark_view_)); #endif @@ -467,7 +467,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1144,7 +1165,9 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -1146,7 +1167,9 @@ BrowserView::BrowserView(std::unique_ptr browser) } BrowserView::~BrowserView() { @@ -477,7 +477,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // Remove the layout manager to avoid dangling. This needs to be earlier than // other cleanups that destroy views referenced in the layout manager. -@@ -1156,7 +1179,9 @@ BrowserView::~BrowserView() { +@@ -1158,7 +1181,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. @@ -487,7 +487,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // Stop the animation timer explicitly here to avoid running it in a nested // message loop, which may run by Browser destructor. -@@ -1165,17 +1190,18 @@ BrowserView::~BrowserView() { +@@ -1167,17 +1192,18 @@ BrowserView::~BrowserView() { // Immersive mode may need to reparent views before they are removed/deleted. immersive_mode_controller_.reset(); @@ -510,7 +510,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // These are raw pointers to child views, so they need to be set to null // before `RemoveAllChildViews()` is called to avoid dangling. -@@ -1800,6 +1826,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { +@@ -1816,6 +1842,28 @@ gfx::Point BrowserView::GetThemeOffsetFromBrowserView() const { ThemeProperties::kFrameHeightAboveTabs - browser_view_origin.y()); } @@ -539,7 +539,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // static: BrowserView::DevToolsDockedPlacement BrowserView::GetDevToolsDockedPlacement( const gfx::Rect& contents_webview_bounds, -@@ -2220,7 +2268,13 @@ void BrowserView::OnExclusiveAccessUserInput() { +@@ -2242,7 +2290,13 @@ void BrowserView::OnExclusiveAccessUserInput() { bool BrowserView::ShouldHideUIForFullscreen() const { // Immersive mode needs UI for the slide-down top panel. @@ -554,7 +554,16 @@ index 127aa3ef3ba70..506cb33978bed 100644 return false; } -@@ -3459,7 +3513,9 @@ DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { +@@ -3448,13 +3502,18 @@ views::View* BrowserView::GetTopContainer() { + + DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { + if (base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) { ++ if (!browser_) { ++ return nullptr; ++ } + if (auto* download_controller = + browser_->GetFeatures().download_toolbar_ui_controller()) { + return download_controller->bubble_controller(); } return nullptr; } @@ -563,9 +572,9 @@ index 127aa3ef3ba70..506cb33978bed 100644 + return nullptr; + } if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) { - return download_button->bubble_controller(); - } -@@ -4089,7 +4145,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { + return static_cast(download_button) + ->bubble_controller(); +@@ -4103,7 +4162,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { return; } @@ -575,7 +584,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -4607,11 +4664,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { +@@ -4633,11 +4693,38 @@ void BrowserView::GetAccessiblePanes(std::vector* panes) { bool BrowserView::ShouldDescendIntoChildForEventHandling( gfx::NativeView child, const gfx::Point& location) { @@ -616,7 +625,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // Draggable regions are defined relative to the web contents. gfx::Point point_in_contents_web_view_coords(location); views::View::ConvertPointToTarget(GetWidget()->GetRootView(), -@@ -4620,7 +4704,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling( +@@ -4646,7 +4733,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. @@ -625,7 +634,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 point_in_contents_web_view_coords.x(), point_in_contents_web_view_coords.y()) || WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords); -@@ -4734,8 +4818,10 @@ void BrowserView::Layout(PassKey) { +@@ -4760,8 +4847,10 @@ void BrowserView::Layout(PassKey) { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -638,7 +647,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -4802,6 +4888,11 @@ void BrowserView::AddedToWidget() { +@@ -4828,6 +4917,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -648,9 +657,9 @@ index 127aa3ef3ba70..506cb33978bed 100644 + SetToolbarButtonProvider(toolbar_); + toolbar_->Init(); - if (download::IsDownloadBubbleEnabled() && - features::IsToolbarPinningEnabled() && -@@ -4849,14 +4940,10 @@ void BrowserView::AddedToWidget() { + + // TODO(pbos): Investigate whether the side panels should be creatable when +@@ -4870,12 +4964,6 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -660,6 +669,12 @@ index 127aa3ef3ba70..506cb33978bed 100644 - SetToolbarButtonProvider(toolbar_); - } - + if (download::IsDownloadBubbleEnabled() && + base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) { + browser_->GetFeatures().download_toolbar_ui_controller()->Init(); +@@ -4887,7 +4975,9 @@ void BrowserView::AddedToWidget() { + } + frame_->OnBrowserViewInitViewsComplete(); - frame_->GetFrameView()->UpdateMinimumSize(); + if (frame_->GetFrameView()) { @@ -668,7 +683,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -5252,7 +5339,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) { +@@ -5298,7 +5388,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, const int64_t display_id) { // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -678,7 +693,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 } void BrowserView::RequestFullscreen(bool fullscreen, int64_t display_id) { -@@ -5748,6 +5836,8 @@ Profile* BrowserView::GetProfile() { +@@ -5802,6 +5893,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -687,7 +702,7 @@ index 127aa3ef3ba70..506cb33978bed 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -5777,6 +5867,8 @@ bool BrowserView::CanUserEnterFullscreen() const { +@@ -5831,6 +5924,8 @@ bool BrowserView::CanUserEnterFullscreen() const { } bool BrowserView::CanUserExitFullscreen() const { @@ -697,10 +712,10 @@ index 127aa3ef3ba70..506cb33978bed 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index b9986c6e9097d..fc8f781e6ac66 100644 +index 621d3abcfbd83..13bc942b778ce 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -151,11 +151,16 @@ class BrowserView : public BrowserWindow, +@@ -147,11 +147,16 @@ class BrowserView : public BrowserWindow, METADATA_HEADER(BrowserView, views::ClientView) public: @@ -717,7 +732,7 @@ index b9986c6e9097d..fc8f781e6ac66 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; paint_as_active_subscription_ = -@@ -900,6 +905,10 @@ class BrowserView : public BrowserWindow, +@@ -905,6 +910,10 @@ class BrowserView : public BrowserWindow, void Copy(); void Paste(); @@ -728,7 +743,7 @@ index b9986c6e9097d..fc8f781e6ac66 100644 protected: // Enumerates where the devtools are docked relative to the browser's main // web contents. -@@ -923,6 +932,8 @@ class BrowserView : public BrowserWindow, +@@ -928,6 +937,8 @@ class BrowserView : public BrowserWindow, const gfx::Rect& contents_webview_bounds, const gfx::Rect& local_webview_container_bounds); @@ -738,7 +753,7 @@ index b9986c6e9097d..fc8f781e6ac66 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 1376fdf933420..336391e29944c 100644 +index 39f9345a8bf6a..ecbd2553d7c5b 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc @@ -52,6 +52,10 @@ @@ -878,10 +893,10 @@ index 6bdd187588951..8ac385bcd0cb5 100644 ContentsWebView::~ContentsWebView() = default; 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 d69e8e49bf650..61386736a8d57 100644 +index 8b0103c5920ef..adbb8eaa74885 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 -@@ -668,6 +668,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( +@@ -638,6 +638,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView( frame_background_ = std::make_unique(); } #endif @@ -893,7 +908,7 @@ index d69e8e49bf650..61386736a8d57 100644 } PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() { -@@ -801,18 +806,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( +@@ -771,18 +776,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds( int PictureInPictureBrowserFrameView::NonClientHitTest( const gfx::Point& point) { @@ -944,7 +959,7 @@ index d69e8e49bf650..61386736a8d57 100644 // Allow dragging and resizing the window. int window_component = GetHTComponentForFrame( -@@ -886,7 +915,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { +@@ -856,7 +885,8 @@ void PictureInPictureBrowserFrameView::Layout(PassKey) { gfx::Rect content_area = GetLocalBounds(); content_area.Inset(FrameBorderInsets()); gfx::Rect top_bar = content_area; @@ -954,7 +969,7 @@ index d69e8e49bf650..61386736a8d57 100644 top_bar_container_view_->SetBoundsRect(top_bar); #if !BUILDFLAG(IS_ANDROID) if (auto_pip_setting_overlay_) { -@@ -1436,7 +1466,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { +@@ -1406,7 +1436,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const { } int PictureInPictureBrowserFrameView::GetTopAreaHeight() const { @@ -979,10 +994,10 @@ index 33c6444869375..d74818698d81a 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 b41c7ca3a6a01..24d3c68c34a26 100644 +index a8c61cefa56be..7f40012829c5e 100644 --- chrome/browser/ui/views/page_action/page_action_icon_controller.cc +++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc -@@ -117,6 +117,14 @@ void PageActionIconController::Init(const PageActionIconParams& params, +@@ -120,6 +120,14 @@ void PageActionIconController::Init(const PageActionIconParams& params, continue; } } @@ -998,10 +1013,10 @@ index b41c7ca3a6a01..24d3c68c34a26 100644 case PageActionIconType::kPaymentsOfferNotification: add_page_action_icon( diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index 99da126067283..1519dd277c73b 100644 +index 98d97b84906bd..d63bab08e8098 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -669,29 +669,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -698,29 +698,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -1044,10 +1059,10 @@ index 99da126067283..1519dd277c73b 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 27efd0c4238f4..50037f13b926a 100644 +index 0d912a7cbf371..4b0f539bc9916 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -188,7 +188,7 @@ class TabstripLikeBackground : public views::Background { +@@ -185,7 +185,7 @@ class TabstripLikeBackground : public views::Background { void Paint(gfx::Canvas* canvas, views::View* view) const override { bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view, browser_view_); @@ -1056,7 +1071,7 @@ index 27efd0c4238f4..50037f13b926a 100644 SkColor frame_color = browser_view_->frame()->GetFrameView()->GetFrameColor( BrowserFrameActiveState::kUseCurrent); -@@ -222,12 +222,13 @@ END_METADATA +@@ -219,12 +219,13 @@ END_METADATA DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarElementId); DEFINE_CLASS_ELEMENT_IDENTIFIER_VALUE(ToolbarView, kToolbarContainerElementId); @@ -1072,7 +1087,7 @@ index 27efd0c4238f4..50037f13b926a 100644 SetID(VIEW_ID_TOOLBAR); SetProperty(views::kElementIdentifierKey, kToolbarElementId); -@@ -259,9 +260,24 @@ ToolbarView::~ToolbarView() { +@@ -256,9 +257,24 @@ ToolbarView::~ToolbarView() { for (const auto& view_and_command : GetViewCommandMap()) { chrome::RemoveCommandObserver(browser_, view_and_command.second, this); } @@ -1097,7 +1112,7 @@ index 27efd0c4238f4..50037f13b926a 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 -@@ -284,12 +300,12 @@ void ToolbarView::Init() { +@@ -281,12 +297,12 @@ void ToolbarView::Init() { auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, @@ -1109,20 +1124,20 @@ index 27efd0c4238f4..50037f13b926a 100644 std::unique_ptr download_button; - if (download::IsDownloadBubbleEnabled() && + if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload) && - (!features::IsToolbarPinningEnabled() || - !base::FeatureList::IsEnabled(features::kPinnableDownloadsButton))) { + !base::FeatureList::IsEnabled(features::kPinnableDownloadsButton)) { download_button = -@@ -373,7 +389,8 @@ void ToolbarView::Init() { + std::make_unique(browser_view_); +@@ -368,7 +384,8 @@ void ToolbarView::Init() { + } std::unique_ptr cast; - if (!(features::IsToolbarPinningEnabled() && - base::FeatureList::IsEnabled(features::kPinnedCastButton))) { + if (!base::FeatureList::IsEnabled(features::kPinnedCastButton)) { - if (media_router::MediaRouterEnabled(browser_->profile())) { + if (media_router::MediaRouterEnabled(browser_->profile()) && + BUTTON_VISIBLE(kCast)) { cast = media_router::CastToolbarButton::Create(browser_); } } -@@ -387,7 +404,8 @@ void ToolbarView::Init() { +@@ -382,7 +399,8 @@ void ToolbarView::Init() { std::unique_ptr send_tab_to_self_button; @@ -1132,7 +1147,7 @@ index 27efd0c4238f4..50037f13b926a 100644 send_tab_to_self_button = std::make_unique( browser_view_); -@@ -860,7 +878,8 @@ void ToolbarView::Layout(PassKey) { +@@ -840,7 +858,8 @@ void ToolbarView::Layout(PassKey) { if (display_mode_ == DisplayMode::NORMAL) { LayoutCommon(); @@ -1143,7 +1158,7 @@ index 27efd0c4238f4..50037f13b926a 100644 if (toolbar_controller_) { diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index 8562522807529..a88825e8242e3 100644 +index f1a6841c1ef40..fe88512c90c8e 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h @@ -100,7 +100,8 @@ class ToolbarView : public views::AccessiblePaneView, diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index a74b3e9f7..b32e7e46c 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 51da615ed2e56..fb7d3b21c759a 100644 +index a10ce7680779f..df174ce52288b 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -116,7 +116,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -55,7 +55,7 @@ index 09d80f2ba678d..5dbff44c280a1 100644 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index e202f66106af0..64a316dc80348 100644 +index 1cec8375b6d86..e3aa20e8aea63 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -3,6 +3,7 @@ @@ -66,7 +66,7 @@ index e202f66106af0..64a316dc80348 100644 import("//testing/test.gni") import("//third_party/blink/renderer/bindings/bindings.gni") import("//third_party/blink/renderer/config.gni") -@@ -69,6 +70,15 @@ component("controller") { +@@ -71,6 +72,15 @@ component("controller") { "performance_manager/v8_worker_memory_reporter.h", ] diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 7b42203a4..d4576b001 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 8a8a0bdade6fe..59b9b4a7fe9da 100644 +index e224ec0835bfa..87f18a56705d0 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc -@@ -591,7 +591,7 @@ void DevToolsHttpHandler::OnJsonRequest( +@@ -593,7 +593,7 @@ void DevToolsHttpHandler::OnJsonRequest( base::Value::Dict version; version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.Set("WebKit-Version", GetWebKitVersion()); @@ -12,10 +12,10 @@ index 8a8a0bdade6fe..59b9b4a7fe9da 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 3bdbefae96ce6..086b906eccd9a 100644 +index 8e47cbb36a8cb..5165aea10332e 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -939,7 +939,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -943,7 +943,7 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( mojo::PendingRemote terminal_external_protocol; bool handled = GetContentClient()->browser()->HandleExternalProtocol( @@ -24,7 +24,7 @@ index 3bdbefae96ce6..086b906eccd9a 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, -@@ -951,6 +951,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( +@@ -955,6 +955,21 @@ NavigationURLLoaderImpl::CreateNonNetworkLoaderFactory( *request_info.initiator_document_token) : nullptr, request_info.isolation_info, &terminal_external_protocol); @@ -47,10 +47,10 @@ index 3bdbefae96ce6..086b906eccd9a 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 f07621fc68623..4f155b2f47f3b 100644 +index eacc673508fde..86a9600c75188 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -1170,7 +1170,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -1166,7 +1166,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -59,7 +59,7 @@ index f07621fc68623..4f155b2f47f3b 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1179,6 +1179,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -1175,6 +1175,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 f07621fc68623..4f155b2f47f3b 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 373e9128eeefb..b1bf9be324211 100644 +index 9746621c4fa96..ef3fa93b6b917 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -1365,6 +1365,12 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1360,6 +1360,12 @@ class CONTENT_EXPORT ContentBrowserClient { bool opener_suppressed, bool* no_javascript_access); @@ -84,7 +84,7 @@ index 373e9128eeefb..b1bf9be324211 100644 // Allows the embedder to return a delegate for the SpeechRecognitionManager. // The delegate will be owned by the manager. It's valid to return nullptr. virtual SpeechRecognitionManagerDelegate* -@@ -2220,7 +2226,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2211,7 +2217,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. @@ -93,7 +93,7 @@ index 373e9128eeefb..b1bf9be324211 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -2448,6 +2454,22 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2437,6 +2443,22 @@ class CONTENT_EXPORT ContentBrowserClient { const net::IsolationInfo& isolation_info, mojo::PendingRemote* out_factory); @@ -116,7 +116,7 @@ index 373e9128eeefb..b1bf9be324211 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. -@@ -2508,6 +2530,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2502,6 +2524,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -153,10 +153,10 @@ index 7a2d251ba2d13..68297ee6f118f 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index beb2d175d23f0..52b29dba3995b 100644 +index eda1a7a3f65b8..90658c671b2da 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -588,6 +588,8 @@ void RenderThreadImpl::Init() { +@@ -589,6 +589,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -166,10 +166,10 @@ index beb2d175d23f0..52b29dba3995b 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 0e94e8aded089..7ae244e8d9861 100644 +index 72a30a1711c15..1e9fcacf6c1bb 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1046,6 +1046,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1053,6 +1053,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -200,10 +200,10 @@ index f726c03e34578..96bded19157a3 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 2dcf4df15f13d..0cca73ab49c9b 100644 +index 0c9cd70bbac8c..53fce2a4df907 100644 --- content/shell/browser/shell_content_browser_client.cc +++ content/shell/browser/shell_content_browser_client.cc -@@ -813,7 +813,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( +@@ -816,7 +816,7 @@ void ShellContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -212,7 +212,7 @@ index 2dcf4df15f13d..0cca73ab49c9b 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -822,6 +822,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( +@@ -825,6 +825,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { ConfigureNetworkContextParamsForShell(context, network_context_params, cert_verifier_creation_params); @@ -221,10 +221,10 @@ index 2dcf4df15f13d..0cca73ab49c9b 100644 std::vector diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h -index 0d744f6f0d286..24a7fd8d099b4 100644 +index 0a99e5b919cd0..4d6f04fbbfd6e 100644 --- content/shell/browser/shell_content_browser_client.h +++ content/shell/browser/shell_content_browser_client.h -@@ -159,7 +159,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { +@@ -160,7 +160,7 @@ class ShellContentBrowserClient : public ContentBrowserClient { GetGeolocationSystemPermissionManager() override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -234,10 +234,10 @@ index 0d744f6f0d286..24a7fd8d099b4 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 db5915d32bf54..77480eb3e4b10 100644 +index 3ca4381bcf4df..2ac7cea3f12bc 100644 --- headless/lib/browser/headless_content_browser_client.cc +++ headless/lib/browser/headless_content_browser_client.cc -@@ -392,7 +392,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext( +@@ -394,7 +394,7 @@ bool HeadlessContentBrowserClient::IsCookieDeprecationLabelAllowedForContext( return true; } @@ -246,7 +246,7 @@ index db5915d32bf54..77480eb3e4b10 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -402,6 +402,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( +@@ -404,6 +404,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams( HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams( in_memory, relative_partition_path, network_context_params, cert_verifier_creation_params); @@ -255,10 +255,10 @@ index db5915d32bf54..77480eb3e4b10 100644 std::string HeadlessContentBrowserClient::GetProduct() { diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h -index 4383dda44ddc1..e6cd5b6211d50 100644 +index 30af5588cd71d..29940a43ce09f 100644 --- headless/lib/browser/headless_content_browser_client.h +++ headless/lib/browser/headless_content_browser_client.h -@@ -112,7 +112,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { +@@ -113,7 +113,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient { content::BrowserContext* browser_context, const url::Origin& top_frame_origin, const url::Origin& context_origin) override; diff --git a/patch/patches/content_initiator_policy_323753235.patch b/patch/patches/content_initiator_policy_323753235.patch index 336366dbb..a224045da 100644 --- a/patch/patches/content_initiator_policy_323753235.patch +++ b/patch/patches/content_initiator_policy_323753235.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/navigation_policy_container_builder.cc content/browser/renderer_host/navigation_policy_container_builder.cc -index c2d7f5c2f7abc..512125a22dfc8 100644 +index 4ec9c72f01480..7b033e2f9db11 100644 --- content/browser/renderer_host/navigation_policy_container_builder.cc +++ content/browser/renderer_host/navigation_policy_container_builder.cc @@ -45,7 +45,6 @@ std::unique_ptr GetInitiatorPolicies( diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index aaedf7e35..035d0e49d 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -1,21 +1,22 @@ diff --git base/process/set_process_title.cc base/process/set_process_title.cc -index edd8c78fb1537..49622b9c05dc0 100644 +index b6389523952a4..f9c709624cd0e 100644 --- base/process/set_process_title.cc +++ base/process/set_process_title.cc -@@ -54,7 +54,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) { +@@ -54,9 +54,6 @@ void SetProcessTitleFromCommandLine(const char** main_argv) { bool have_argv0 = false; #if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -- DCHECK_EQ(base::PlatformThread::CurrentId(), getpid()); -+ // DCHECK_EQ(base::PlatformThread::CurrentId(), getpid()); - +- DCHECK_EQ(base::PlatformThread::CurrentId(), +- base::PlatformThreadId(getpid())); +- if (main_argv) { setproctitle_init(main_argv); + } diff --git content/app/content_main.cc content/app/content_main.cc -index 54dfbaa6df693..b3a4093c076a3 100644 +index ffc5c37742800..82e1c22b0f073 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -198,16 +198,10 @@ ContentMainParams::~ContentMainParams() = default; +@@ -199,16 +199,10 @@ ContentMainParams::~ContentMainParams() = default; ContentMainParams::ContentMainParams(ContentMainParams&&) = default; ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default; @@ -34,7 +35,7 @@ index 54dfbaa6df693..b3a4093c076a3 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 -@@ -286,7 +280,9 @@ NO_STACK_PROTECTOR int RunContentProcess( +@@ -287,7 +281,9 @@ NO_STACK_PROTECTOR int RunContentProcess( // default, "C", locale. setlocale(LC_NUMERIC, "C"); @@ -45,7 +46,7 @@ index 54dfbaa6df693..b3a4093c076a3 100644 #endif #if BUILDFLAG(IS_WIN) -@@ -294,14 +290,6 @@ NO_STACK_PROTECTOR int RunContentProcess( +@@ -295,14 +291,6 @@ NO_STACK_PROTECTOR int RunContentProcess( #endif #if BUILDFLAG(IS_MAC) @@ -60,7 +61,7 @@ index 54dfbaa6df693..b3a4093c076a3 100644 InitializeMac(); #endif -@@ -350,12 +338,44 @@ NO_STACK_PROTECTOR int RunContentProcess( +@@ -356,12 +344,44 @@ NO_STACK_PROTECTOR int RunContentProcess( if (IsSubprocess()) CommonSubprocessInit(); @@ -107,10 +108,10 @@ index 54dfbaa6df693..b3a4093c076a3 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 93cbe4e3b64d4..a4356c3ccf4eb 100644 +index 82e5123e35509..437c5d080cf24 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -48,6 +48,7 @@ +@@ -49,6 +49,7 @@ #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/hang_watcher.h" #include "base/threading/platform_thread.h" @@ -118,7 +119,7 @@ index 93cbe4e3b64d4..a4356c3ccf4eb 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1329,6 +1330,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1336,6 +1337,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index d6e3dce49..c362e7e7e 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn -index a6072f97ed578..945fed3bf0276 100644 +index 335a734e4f454..ef5101aed9e0d 100644 --- chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ @@ -20,8 +20,8 @@ index a6072f97ed578..945fed3bf0276 100644 "crash/crash_helper.cc", "crash/crash_helper.h", ] -@@ -111,6 +109,7 @@ static_library("crash") { - ":hook_util", +@@ -110,6 +108,7 @@ static_library("crash") { + ":constants", "//base", # This needs to go. DEP of app, crash_keys, client. "//base:base_static", # pe_image + "//cef/libcef/features:buildflags", @@ -29,7 +29,7 @@ index a6072f97ed578..945fed3bf0276 100644 "//components/crash/core/app", "//components/crash/core/common", # crash_keys @@ -118,6 +117,17 @@ static_library("crash") { - "//content/public/common:result_codes", + "//sandbox/policy:win_hook_util", "//third_party/crashpad/crashpad/client", # DumpWithoutCrash ] + @@ -47,7 +47,7 @@ index a6072f97ed578..945fed3bf0276 100644 source_set("dll_hash") { diff --git chrome/chrome_elf/crash/crash_helper.cc chrome/chrome_elf/crash/crash_helper.cc -index 30a2c1adc4509..b60a7afaf1e5e 100644 +index 975ad7d990fe9..1d75a1250afb7 100644 --- chrome/chrome_elf/crash/crash_helper.cc +++ chrome/chrome_elf/crash/crash_helper.cc @@ -12,12 +12,17 @@ @@ -56,9 +56,9 @@ index 30a2c1adc4509..b60a7afaf1e5e 100644 +#include "cef/libcef/features/features.h" #include "chrome/app/chrome_crash_reporter_client_win.h" - #include "chrome/chrome_elf/hook_util/hook_util.h" #include "components/crash/core/app/crashpad.h" #include "components/crash/core/common/crash_keys.h" + #include "sandbox/policy/win/hook_util/hook_util.h" #include "third_party/crashpad/crashpad/client/crashpad_client.h" +#if BUILDFLAG(ENABLE_CEF) @@ -70,7 +70,7 @@ index 30a2c1adc4509..b60a7afaf1e5e 100644 // Crash handling from elf is only enabled for the chrome.exe process. @@ -78,7 +83,11 @@ bool InitializeCrashReporting() { g_crash_reports = new std::vector; - g_set_unhandled_exception_filter = new elf_hook::IATHook(); + g_set_unhandled_exception_filter = new sandbox::policy::IATHook(); +#if BUILDFLAG(ENABLE_CEF) + CefCrashReporterClient::InitializeCrashReportingForProcess(); @@ -81,7 +81,7 @@ index 30a2c1adc4509..b60a7afaf1e5e 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index 36f846b0dfe29..98979130c36cc 100644 +index b5d093b5415be..d9be58aa3a7ad 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -8,6 +8,8 @@ @@ -93,7 +93,7 @@ index 36f846b0dfe29..98979130c36cc 100644 #include "base/base_switches.h" #include "base/command_line.h" #include "base/format_macros.h" -@@ -106,8 +108,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { +@@ -105,8 +107,10 @@ void HandleEnableDisableFeatures(const base::CommandLine& command_line) { "commandline-disabled-feature"); } @@ -105,7 +105,7 @@ index 36f846b0dfe29..98979130c36cc 100644 static const auto kIgnoreSwitches = std::to_array({ kStringAnnotationsSwitch, switches::kEnableLogging, -@@ -167,6 +171,8 @@ bool IsBoringSwitch(const std::string& flag) { +@@ -166,6 +170,8 @@ bool IsBoringSwitch(const std::string& flag) { return false; } @@ -114,7 +114,7 @@ index 36f846b0dfe29..98979130c36cc 100644 std::deque& GetCommandLineStringAnnotations() { static base::NoDestructor> command_line_string_annotations; -@@ -215,7 +221,7 @@ void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) { +@@ -214,7 +220,7 @@ void AppendStringAnnotationsCommandLineSwitch(base::CommandLine* command_line) { void SetCrashKeysFromCommandLine(const base::CommandLine& command_line) { SetStringAnnotations(command_line); HandleEnableDisableFeatures(command_line); diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 2afd8d68a..ad4345ea0 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -146,7 +146,7 @@ index 39b2de869d225..5a4e621c650ee 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index 104e8502908e2..9086d7b9e00fd 100644 +index 368fef0540317..d8ec71b69dc77 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ @@ -157,9 +157,9 @@ index 104e8502908e2..9086d7b9e00fd 100644 import("../build/crashpad_buildconfig.gni") static_library("handler") { -@@ -76,11 +77,23 @@ static_library("handler") { +@@ -75,11 +76,23 @@ static_library("handler") { + "../minidump", "../snapshot", - "../third_party/mini_chromium:chromeos_buildflags", "../tools:tool_support", + "//cef/libcef/features:buildflags", ] @@ -246,18 +246,18 @@ index 22bb26e31893b..87c80604e5f7a 100644 //! \brief Calls ProcessPendingReports() in response to ReportPending() having //! been called on any thread, as well as periodically on a timer. diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index 7e908c0a305be..e35414a131f07 100644 +index 6eca8415eb10e..346836adb4477 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc -@@ -39,6 +39,7 @@ +@@ -38,6 +38,7 @@ + #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" - #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/features.h" #include "client/crash_report_database.h" #include "client/crashpad_client.h" #include "client/crashpad_info.h" -@@ -89,6 +90,10 @@ +@@ -88,6 +89,10 @@ #include "util/win/session_end_watcher.h" #endif // BUILDFLAG(IS_APPLE) @@ -268,27 +268,27 @@ index 7e908c0a305be..e35414a131f07 100644 namespace crashpad { namespace { -@@ -248,6 +253,9 @@ struct Options { +@@ -247,6 +252,9 @@ struct Options { bool periodic_tasks; bool rate_limit; bool upload_gzip; + int max_uploads; + int max_database_size; + int max_database_age; - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #if BUILDFLAG(IS_CHROMEOS) bool use_cros_crash_reporter = false; base::FilePath minidump_dir_for_tests; -@@ -622,6 +630,9 @@ int HandlerMain(int argc, +@@ -621,6 +629,9 @@ int HandlerMain(int argc, kOptionTraceParentWithException, #endif kOptionURL, + kOptionMaxUploads, + kOptionMaxDatabaseSize, + kOptionMaxDatabaseAge, - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #if BUILDFLAG(IS_CHROMEOS) kOptionUseCrosCrashReporter, kOptionMinidumpDirForTests, -@@ -722,6 +733,9 @@ int HandlerMain(int argc, +@@ -721,6 +732,9 @@ int HandlerMain(int argc, #endif // BUILDFLAG(IS_ANDROID) {"help", no_argument, nullptr, kOptionHelp}, {"version", no_argument, nullptr, kOptionVersion}, @@ -298,7 +298,7 @@ index 7e908c0a305be..e35414a131f07 100644 {nullptr, 0, nullptr, 0}, }; -@@ -879,6 +893,27 @@ int HandlerMain(int argc, +@@ -878,6 +892,27 @@ int HandlerMain(int argc, options.url = optarg; break; } @@ -323,10 +323,10 @@ index 7e908c0a305be..e35414a131f07 100644 + } + break; + } - #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) + #if BUILDFLAG(IS_CHROMEOS) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; -@@ -1028,11 +1063,20 @@ int HandlerMain(int argc, +@@ -1027,11 +1062,20 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; @@ -347,7 +347,7 @@ index 7e908c0a305be..e35414a131f07 100644 upload_thread.Get()->Start(); } -@@ -1103,7 +1147,8 @@ int HandlerMain(int argc, +@@ -1102,7 +1146,8 @@ int HandlerMain(int argc, ScopedStoppable prune_thread; if (options.periodic_tasks) { prune_thread.Reset(new PruneCrashReportThread( diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index a16468cf7..fc6874b67 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 1856966f2b913..6d7ecb4549502 100644 +index 64f9e50f60186..d97a8a461ffcb 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -21,6 +21,7 @@ @@ -10,26 +10,25 @@ index 1856966f2b913..6d7ecb4549502 100644 #include "components/embedder_support/pref_names.h" #include "components/embedder_support/switches.h" #include "components/policy/core/common/policy_pref_names.h" -@@ -41,6 +42,10 @@ +@@ -38,6 +39,10 @@ #include "base/win/windows_version.h" #endif // BUILDFLAG(IS_WIN) +#if BUILDFLAG(ENABLE_CEF) -+#include "cef/libcef/common/cef_switches.h" ++constexpr char kUserAgentProductAndVersion[] = "user-agent-product"; +#endif + namespace embedder_support { namespace { -@@ -315,6 +320,14 @@ blink::UserAgentBrandList ShuffleBrandList( +@@ -299,6 +304,13 @@ blink::UserAgentBrandList ShuffleBrandList( std::string GetProductAndVersion( UserAgentReductionEnterprisePolicyState user_agent_reduction) { +#if BUILDFLAG(ENABLE_CEF) + base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); -+ if (command_line->HasSwitch(switches::kUserAgentProductAndVersion)) { -+ return command_line->GetSwitchValueASCII( -+ switches::kUserAgentProductAndVersion); ++ if (command_line->HasSwitch(kUserAgentProductAndVersion)) { ++ return command_line->GetSwitchValueASCII(kUserAgentProductAndVersion); + } +#endif + diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 6d319e741..04e02b4cc 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index 3f65718281973..66580417cc79e 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index a05810690041d..cac7f91fc271d 100644 +index cf65a66212b8f..0a614a78f9907 100644 --- BUILD.gn +++ BUILD.gn @@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -23,7 +23,7 @@ index a05810690041d..cac7f91fc271d 100644 import("//chrome/enterprise_companion/buildflags.gni") import("//components/enterprise/buildflags/buildflags.gni") import("//components/nacl/features.gni") -@@ -292,6 +293,10 @@ group("gn_all") { +@@ -293,6 +294,10 @@ group("gn_all") { deps += root_extra_deps @@ -78,7 +78,7 @@ index bd41166938952..fba7843d79796 100644 visual_studio_version_logs = [ "windows_sdk_version=${windows_sdk_version}" ] diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 4a4b18b2715c3..efacf2ddeafcc 100644 +index 8f146e28971a7..42d1674c280de 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -89,17 +89,18 @@ index 4a4b18b2715c3..efacf2ddeafcc 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//components/compose/features.gni") -@@ -487,6 +488,10 @@ template("chrome_extra_paks") { - ] - deps += [ "//extensions:extensions_resources" ] +@@ -480,6 +481,11 @@ template("chrome_extra_paks") { + deps += [ "//components/headless/command_handler" ] } + + if (enable_cef) { + sources += [ "$root_gen_dir/cef/cef_resources.pak" ] + deps += [ "//cef:cef_resources" ] + } - if (enable_extensions) { - sources += [ "$root_gen_dir/chrome/extensions_resources.pak" ] - deps += [ "//chrome/browser/resources/extensions:resources" ] ++ + if (enable_extensions_core) { + sources += [ + "$root_gen_dir/chrome/extensions_resources.pak", diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni index c3b77e3653933..21f42ddf85a3b 100644 --- chrome/chrome_repack_locales.gni @@ -124,7 +125,7 @@ index c3b77e3653933..21f42ddf85a3b 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 c490d199bf51e..4c0de0d7a0822 100644 +index be48771397da4..334808a723442 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -7,6 +7,7 @@ import("//build/config/features.gni") @@ -151,7 +152,7 @@ index c490d199bf51e..4c0de0d7a0822 100644 outputs = [ "$root_out_dir/chrome.7z", diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni -index 5cf2768230fa5..f354073500d2c 100644 +index 904edbc9fbf04..c6e830faa2556 100644 --- tools/grit/grit_args.gni +++ tools/grit/grit_args.gni @@ -5,7 +5,9 @@ @@ -164,7 +165,7 @@ index 5cf2768230fa5..f354073500d2c 100644 shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir) devtools_grd_path = "$shared_intermediate_dir/$devtools_grd_location" -@@ -38,6 +40,9 @@ _grit_defines = [ +@@ -37,6 +39,9 @@ _grit_defines = [ "use_titlecase=${is_mac}", "is_desktop_android=${is_desktop_android}", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 7b3f9220a..de12c35d3 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 60e844376f968..b282af990a75a 100644 +index b7c03fa573ff1..712412b50d4c1 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1461,11 +1461,18 @@ +@@ -1476,11 +1476,18 @@ "<(SHARED_INTERMEDIATE_DIR)/third_party/blink/public/strings/permission_element_generated_strings.grd": { "META": {"sizes": {"messages": [2000],}}, "messages": [10080], diff --git a/patch/patches/gtk_compat_6334084.patch b/patch/patches/gtk_compat_6334084.patch new file mode 100644 index 000000000..eef2e0ed5 --- /dev/null +++ b/patch/patches/gtk_compat_6334084.patch @@ -0,0 +1,13 @@ +diff --git ui/gtk/gtk_compat.cc ui/gtk/gtk_compat.cc +index d93d9b94c7ba4..905583f1aa7ce 100644 +--- ui/gtk/gtk_compat.cc ++++ ui/gtk/gtk_compat.cc +@@ -127,7 +127,7 @@ bool LoadGtkImpl() { + } + auto env = base::Environment::Create(); + const auto desktop = base::nix::GetDesktopEnvironment(env.get()); +- if (desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) { ++ if (!gtk_version && desktop == base::nix::DESKTOP_ENVIRONMENT_GNOME) { + // GNOME is currently the only desktop to support GTK4 starting with version + // 42+. Try to match the loaded GTK version with the GNOME GTK version. + // Checking the GNOME version is not necessary since GTK4 is available iff diff --git a/patch/patches/linux_gtk_theme_3610.patch b/patch/patches/linux_gtk_theme_3610.patch index 610415b6a..5f1d066cd 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 771c253082e2a..47a28fd56750e 100644 +index 4ce6508343bdf..7e161072d063f 100644 --- ui/gtk/gtk_ui.cc +++ ui/gtk/gtk_ui.cc @@ -31,6 +31,7 @@ @@ -27,10 +27,10 @@ index 771c253082e2a..47a28fd56750e 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 ec79b3c8e3e43..64287c4354ad7 100644 +index 35023e37a34bb..c466ba7f3c251 100644 --- ui/ozone/platform/x11/ozone_platform_x11.cc +++ ui/ozone/platform/x11/ozone_platform_x11.cc -@@ -64,6 +64,8 @@ namespace ui { +@@ -65,6 +65,8 @@ namespace ui { namespace { @@ -39,7 +39,7 @@ index ec79b3c8e3e43..64287c4354ad7 100644 // Singleton OzonePlatform implementation for X11 platform. class OzonePlatformX11 : public OzonePlatform, public OSExchangeDataProviderFactoryOzone { -@@ -262,7 +264,15 @@ class OzonePlatformX11 : public OzonePlatform, +@@ -266,7 +268,15 @@ class OzonePlatformX11 : public OzonePlatform, TouchFactory::SetTouchDeviceListFromCommandLine(); #if BUILDFLAG(USE_GTK) @@ -56,7 +56,7 @@ index ec79b3c8e3e43..64287c4354ad7 100644 #endif menu_utils_ = std::make_unique(); -@@ -357,4 +367,8 @@ OzonePlatform* CreateOzonePlatformX11() { +@@ -361,4 +371,8 @@ OzonePlatform* CreateOzonePlatformX11() { return new OzonePlatformX11; } diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index 35da06fce..965b21edb 100644 --- a/patch/patches/linux_printing_context.patch +++ b/patch/patches/linux_printing_context.patch @@ -100,7 +100,7 @@ index 3ab395e3b0b45..c012641a5dc7e 100644 } diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h -index 1e59679d20646..de7b4b573b057 100644 +index 090e770ac2f8e..a57f9695bc377 100644 --- ui/linux/linux_ui.h +++ ui/linux/linux_ui.h @@ -20,6 +20,10 @@ diff --git a/patch/patches/mac_chrome_locale_3623.patch b/patch/patches/mac_chrome_locale_3623.patch index 811059a02..36a2cfcc7 100644 --- a/patch/patches/mac_chrome_locale_3623.patch +++ b/patch/patches/mac_chrome_locale_3623.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/chrome_resource_bundle_helper.cc chrome/browser/chrome_resource_bundle_helper.cc -index 0e256b2a268ca..66ef8460d46ca 100644 +index d1e99bf112b20..fee8571fab728 100644 --- chrome/browser/chrome_resource_bundle_helper.cc +++ chrome/browser/chrome_resource_bundle_helper.cc -@@ -68,8 +68,10 @@ extern void InitializeLocalState( +@@ -63,8 +63,10 @@ extern void InitializeLocalState( // Initializes the shared instance of ResourceBundle and returns the application // locale. An empty |actual_locale| value indicates failure. @@ -15,7 +15,7 @@ index 0e256b2a268ca..66ef8460d46ca 100644 #if BUILDFLAG(IS_ANDROID) // In order for SetLoadSecondaryLocalePaks() to work ResourceBundle must // not have been created yet. -@@ -82,16 +84,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, +@@ -77,16 +79,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, .empty()); #endif @@ -31,9 +31,9 @@ index 0e256b2a268ca..66ef8460d46ca 100644 local_state->GetString(language::prefs::kApplicationLocale); -#endif - #if BUILDFLAG(IS_CHROMEOS_ASH) + #if BUILDFLAG(IS_CHROMEOS) ui::ResourceBundle::SetLottieParsingFunctions( -@@ -103,7 +97,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, +@@ -98,7 +92,8 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, // On a POSIX OS other than ChromeOS, the parameter that is passed to the // method InitSharedInstance is ignored. std::string actual_locale = ui::ResourceBundle::InitSharedInstanceWithLocale( @@ -43,7 +43,7 @@ index 0e256b2a268ca..66ef8460d46ca 100644 CHECK(!actual_locale.empty()) << "Locale could not be found for " << preferred_locale; -@@ -136,6 +131,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, +@@ -131,6 +126,7 @@ std::string InitResourceBundleAndDetermineLocale(PrefService* local_state, std::string LoadLocalState( ChromeFeatureListCreator* chrome_feature_list_creator, @@ -51,7 +51,7 @@ index 0e256b2a268ca..66ef8460d46ca 100644 bool is_running_tests) { base::FilePath user_data_dir; if (!base::PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) -@@ -147,5 +143,6 @@ std::string LoadLocalState( +@@ -142,5 +138,6 @@ std::string LoadLocalState( new ChromeCommandLinePrefStore(base::CommandLine::ForCurrentProcess())); return InitResourceBundleAndDetermineLocale( diff --git a/patch/patches/mac_platform_style_bubble_893292.patch b/patch/patches/mac_platform_style_bubble_893292.patch index 7b4155e57..8b1d41683 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 7c8fc82a86d0e..4bc6327ec45bb 100644 +index dab4e4299c95b..4a5dbf95d5be1 100644 --- chrome/browser/ui/views/profiles/profile_menu_view_base.cc +++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc -@@ -1224,8 +1224,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { +@@ -1231,8 +1231,8 @@ int ProfileMenuViewBase::GetMaxHeight() const { ->GetDisplayNearestPoint(anchor_rect.CenterPoint()) .work_area(); int available_space = screen_space.bottom() - anchor_rect.bottom(); @@ -14,10 +14,10 @@ index 7c8fc82a86d0e..4bc6327ec45bb 100644 std::max(available_space, anchor_rect.y() - screen_space.y()); #endif diff --git ui/views/style/platform_style.h ui/views/style/platform_style.h -index 59d9211565b48..63bc255add57f 100644 +index 1e9785672f767..21ff435390562 100644 --- ui/views/style/platform_style.h +++ ui/views/style/platform_style.h -@@ -77,7 +77,7 @@ class VIEWS_EXPORT PlatformStyle { +@@ -84,7 +84,7 @@ class VIEWS_EXPORT PlatformStyle { // Default setting at bubble creation time for whether arrow will be adjusted // for bubbles going off-screen to bring more bubble area into view. Linux // clips bubble windows that extend outside their parent window bounds. diff --git a/patch/patches/mac_render_widget_3680.patch b/patch/patches/mac_render_widget_3680.patch index 61d1339a5..d90012d03 100644 --- a/patch/patches/mac_render_widget_3680.patch +++ b/patch/patches/mac_render_widget_3680.patch @@ -1,5 +1,5 @@ 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 ccfac3b103824..4497a134b2b7c 100644 +index d09df298697b9..2b5da8d0283af 100644 --- content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm +++ content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm @@ -171,6 +171,13 @@ void ExtractUnderlines(NSAttributedString* string, diff --git a/patch/patches/metrics_system_profile.patch b/patch/patches/metrics_system_profile.patch index 4609f2b61..aae662ea6 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 3cef1f28ccdb0..c91c9927436de 100644 +index 5ffc5ec97f90a..d322d2a26264a 100644 --- components/metrics/persistent_system_profile.cc +++ components/metrics/persistent_system_profile.cc -@@ -401,6 +401,10 @@ bool PersistentSystemProfile::GetSystemProfile( +@@ -415,6 +415,10 @@ bool PersistentSystemProfile::GetSystemProfile( return true; } diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 30ad6b600..e71578ac1 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index aeb79b46f5d21..bd57e874c1240 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 75272177caa24..660a3ae430f19 100644 +index ae87ba4982d55..5b11c4d0043a4 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -2099,7 +2099,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -2080,7 +2080,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. diff --git a/patch/patches/net_url_request_3596.patch b/patch/patches/net_url_request_3596.patch index 4bdf1dcde..769ba0efc 100644 --- a/patch/patches/net_url_request_3596.patch +++ b/patch/patches/net_url_request_3596.patch @@ -1,8 +1,8 @@ diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc -index f1288aaa112e6..2b29bffdbbaf6 100644 +index 746d983c20d36..87f42ccc9fec6 100644 --- net/url_request/url_request_job.cc +++ net/url_request/url_request_job.cc -@@ -36,6 +36,7 @@ +@@ -38,6 +38,7 @@ #include "net/url_request/redirect_info.h" #include "net/url_request/redirect_util.h" #include "net/url_request/url_request_context.h" @@ -10,7 +10,7 @@ index f1288aaa112e6..2b29bffdbbaf6 100644 namespace net { -@@ -48,6 +49,16 @@ base::Value::Dict SourceStreamSetParams(SourceStream* source_stream) { +@@ -50,6 +51,16 @@ base::Value::Dict SourceStreamSetParams(SourceStream* source_stream) { return event_params; } @@ -27,7 +27,7 @@ index f1288aaa112e6..2b29bffdbbaf6 100644 } // namespace // Each SourceStreams own the previous SourceStream in the chain, but the -@@ -325,8 +336,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy( +@@ -327,8 +338,7 @@ GURL URLRequestJob::ComputeReferrerForPolicy( } bool secure_referrer_but_insecure_destination = diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 8e11207bd..9aff3b8a3 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -30,7 +30,7 @@ index 76057b3e50f78..d3b63a3b07805 100644 } // namespace input diff --git components/input/render_input_router.h components/input/render_input_router.h -index cb570463e9651..a3e9726f58b16 100644 +index 09111425370d3..900b325dce683 100644 --- components/input/render_input_router.h +++ components/input/render_input_router.h @@ -68,6 +68,7 @@ class COMPONENT_EXPORT(INPUT) RenderInputRouter @@ -56,19 +56,10 @@ index f1030a744809c..c222a209949e6 100644 return nullptr; } diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 130fb82767d53..952b34877fa89 100644 +index f4475e34d3d6c..ad06b50a46a9d 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -801,7 +801,7 @@ void RenderWidgetHostImpl::WasHidden() { - - // Cancel pending pointer lock requests, unless there's an open user prompt. - // Prompts should remain open and functional across tab switches. -- if (!delegate_->IsWaitingForPointerLockPrompt(this)) { -+ if (!delegate_ || !delegate_->IsWaitingForPointerLockPrompt(this)) { - RejectPointerLockOrUnlockIfNecessary( - blink::mojom::PointerLockResult::kWrongDocument); - } -@@ -3681,6 +3681,11 @@ void RenderWidgetHostImpl::StopFling() { +@@ -3733,6 +3733,11 @@ void RenderWidgetHostImpl::StopFling() { GetRenderInputRouter()->StopFling(); } @@ -81,10 +72,10 @@ index 130fb82767d53..952b34877fa89 100644 uint16_t angle, display::mojom::ScreenOrientation type) { diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h -index 286e3d89a6c24..1276618de2e56 100644 +index 99fe44aab8599..5af702180004e 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -838,6 +838,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -843,6 +843,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 5f02372d5..4952e8164 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 ac0856149902d..1f4dda26e44dd 100644 +index a387789fe4270..e5d9dc26601e8 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -752,6 +752,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -762,6 +762,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 b31594026..b442461bf 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 bbe0eade41ec9..49ec1ffdcb7ce 100644 +index 9dcd953d2bcfe..35c0218ce4a84 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -942,6 +942,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -948,6 +948,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(k100Percent) { @@ -15,7 +15,7 @@ index bbe0eade41ec9..49ec1ffdcb7ce 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -951,6 +957,11 @@ ResourceBundle::~ResourceBundle() { +@@ -957,6 +963,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } diff --git a/patch/patches/rfh_navigation_4829483.patch b/patch/patches/rfh_navigation_4829483.patch index 2278e741c..7d55b838a 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 7fc3f01731e3c..c473da6e8abbf 100644 +index 3db42c2bf2740..c83a8a0b8492e 100644 --- content/browser/renderer_host/render_frame_host_impl.cc +++ content/browser/renderer_host/render_frame_host_impl.cc -@@ -9591,6 +9591,16 @@ void RenderFrameHostImpl::CreateNewWindow( +@@ -9627,6 +9627,16 @@ void RenderFrameHostImpl::CreateNewWindow( return; } @@ -19,7 +19,7 @@ index 7fc3f01731e3c..c473da6e8abbf 100644 // Otherwise, consume user activation before we proceed. In particular, it is // important to do this before we return from the |opener_suppressed| case // below. -@@ -11968,6 +11978,7 @@ void RenderFrameHostImpl::CommitNavigation( +@@ -12017,6 +12027,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 b6faa4139..f7d74cb33 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 612d67d06d766..5102758c7f398 100644 +index 1d08f25b91496..ecac98345a92c 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 @@ @@ -28,7 +28,7 @@ index 612d67d06d766..5102758c7f398 100644 SkColor color = *GetBackgroundColor(); window_->layer()->SetColor(color); } -@@ -2642,6 +2647,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2649,6 +2654,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 3431a2419..676d0429f 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,8 +1,8 @@ diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 1dfbe67a3ec3c..6f0db67e6f929 100644 +index cd7ce8c483362..4e05ca9aa5896 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -660,6 +660,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -681,6 +681,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -29,10 +29,10 @@ index 1dfbe67a3ec3c..6f0db67e6f929 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 1533aea31832c..ea961cbc9f65d 100644 +index 18fed025ee0b2..8d7ed64030ad1 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -236,6 +236,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -239,6 +239,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -42,10 +42,10 @@ index 1533aea31832c..ea961cbc9f65d 100644 const net::SchemefulSite& site, const std::optional& partition_key) const override; diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h -index 3f0be99e0e145..0462ebbe9bedc 100644 +index 7c76c93f798b2..09f62ad48ccb4 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h -@@ -163,6 +163,11 @@ class NET_EXPORT CookieStore { +@@ -171,6 +171,11 @@ class NET_EXPORT CookieStore { // Transfer ownership of a CookieAccessDelegate. void SetCookieAccessDelegate(std::unique_ptr delegate); @@ -58,10 +58,10 @@ 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 963ddd7d0fcce..81f37072b77fa 100644 +index 95f73bcb9fb40..e17a93f69c089 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc -@@ -347,14 +347,9 @@ void CookieManager::AllowFileSchemeCookies( +@@ -355,14 +355,9 @@ void CookieManager::AllowFileSchemeCookies( AllowFileSchemeCookiesCallback callback) { OnSettingsWillChange(); @@ -80,45 +80,54 @@ index 963ddd7d0fcce..81f37072b77fa 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index e74079c81ddad..7fd92dc9434a3 100644 +index ca2df1e67d756..d2e963efdf1d8 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2769,19 +2769,23 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2785,22 +2785,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( pref_service.get(), network_service_->network_quality_estimator()); } - if (session_cleanup_cookie_store) { +- // If the pref service was registered and initialized use it. +- // If not, use nullptr to indicate prefs aren't available. - std::unique_ptr cookie_store = - std::make_unique( - session_cleanup_cookie_store.get(), net_log, -- std::make_unique( -- pref_service.get())); +- pref_service +- ? std::make_unique( +- pref_service.get()) +- : nullptr); - if (params_->persist_session_cookies) { - cookie_store->SetPersistSessionCookies(true); - } +- +- builder.SetCookieStore(std::move(cookie_store)); +- } ++ // If the pref service was registered and initialized use it. ++ // If not, use nullptr to indicate prefs aren't available. + std::unique_ptr cookie_store = + std::make_unique( + session_cleanup_cookie_store.get(), net_log, -+ std::make_unique( -+ pref_service.get())); ++ pref_service ++ ? std::make_unique( ++ pref_service.get()) ++ : nullptr); + if (session_cleanup_cookie_store && params_->persist_session_cookies) { + cookie_store->SetPersistSessionCookies(true); + } - -- builder.SetCookieStore(std::move(cookie_store)); ++ + if (params_->cookieable_schemes.has_value()) { + cookie_store->SetCookieableSchemes( + *params_->cookieable_schemes, + net::CookieStore::SetCookieableSchemesCallback()); - } - -+ builder.SetCookieStore(std::move(cookie_store)); ++ } + ++ builder.SetCookieStore(std::move(cookie_store)); + base::FilePath transport_security_persister_file_name; if (GetFullDataFilePath(params_->file_paths, - &network::mojom::NetworkContextFilePaths:: diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index c292e1472c724..3b2237872fe20 100644 +index be45c88ba8571..536e92b4e9497 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom @@ -360,6 +360,9 @@ struct NetworkContextParams { diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 0b3211115..dc431e137 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 5b7298888a896..4d1d7d412179f 100644 +index 91b0547550e85..34972a982e866 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -3402,9 +3402,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -3449,9 +3449,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 255d980fa..0fda69ce4 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -1,8 +1,8 @@ diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 3b8ddf4a4a16f..3d0e54baa1924 100644 +index 0414d4c020839..62c4367b23d06 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc -@@ -170,6 +170,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, +@@ -171,6 +171,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, } } diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 9b53fee89..bf3ffdf15 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 397fd890b7db6..6c52d881d73aa 100644 +index c428a5f8d79e8..47b076605604d 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h -@@ -70,6 +70,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( +@@ -69,6 +69,8 @@ PERFETTO_DEFINE_CATEGORIES_IN_NAMESPACE_WITH_ATTRS( perfetto::Category("cc"), perfetto::Category("cc.debug"), perfetto::Category("cdp.perf"), diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index 07b5205ff..21da3278d 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,8 +1,8 @@ diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc -index 8a9a5b6bc8bf9..f10bcd36c11d9 100644 +index caf41f43c700d..ba15a09e1b231 100644 --- ui/base/x/x11_os_exchange_data_provider.cc +++ ui/base/x/x11_os_exchange_data_provider.cc -@@ -168,7 +168,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, +@@ -164,7 +164,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, format_map_.Insert(x11::GetAtom(kMimeTypeMozillaURL), mem); // Set a string fallback as well. diff --git a/patch/patches/v8_build.patch b/patch/patches/v8_build.patch index 953c61f87..8e7603455 100644 --- a/patch/patches/v8_build.patch +++ b/patch/patches/v8_build.patch @@ -1,5 +1,5 @@ diff --git BUILD.gn BUILD.gn -index 94147651f9b..c243a8ed9cf 100644 +index bc75d8130b4..f15faf2d9c5 100644 --- BUILD.gn +++ BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/mips.gni") @@ -10,17 +10,17 @@ index 94147651f9b..c243a8ed9cf 100644 import("//third_party/icu/config.gni") import("gni/snapshot_toolchain.gni") -@@ -483,6 +484,9 @@ declare_args() { - +@@ -484,6 +485,9 @@ declare_args() { # Experimental testing mode where various limits are artificially set lower. v8_lower_limits_mode = false -+ + + # Set to true if V8 will be used in a shared library. + v8_used_in_shared_library = enable_cef - } - - # Derived defaults. -@@ -835,6 +839,10 @@ config("internal_config") { ++ + # Enables the use of partition_alloc as the default allocator for standalone + # V8. This should be used for benchmarking and testing purposes to more + # closely mimic in-browser behavior. +@@ -849,6 +853,10 @@ config("internal_config") { defines += [ "BUILDING_V8_SHARED" ] } diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index f16dd55bd..10964bb05 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc -index 7ba0c60b24d16..ff05f077ddbad 100644 +index 43e388d5517d1..b16a6961232fd 100644 --- chrome/browser/ui/views/toolbar/app_menu.cc +++ chrome/browser/ui/views/toolbar/app_menu.cc @@ -1044,7 +1044,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) { @@ -58,10 +58,10 @@ index ecd8177fd48cb..63d94b6f39a7b 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 4bc53765f907a..021dfd43f735a 100644 +index f015a54360dd9..6e579c1b7ad9e 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -711,6 +711,14 @@ void RenderText::SetWhitespaceElision(std::optional whitespace_elision) { +@@ -686,6 +686,14 @@ void RenderText::SetWhitespaceElision(std::optional whitespace_elision) { } } @@ -76,7 +76,7 @@ index 4bc53765f907a..021dfd43f735a 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -2148,6 +2156,18 @@ void RenderText::OnTextAttributeChanged() { +@@ -2156,6 +2164,18 @@ void RenderText::OnTextAttributeChanged() { text_elided_ = false; layout_text_up_to_date_ = false; @@ -96,10 +96,10 @@ index 4bc53765f907a..021dfd43f735a 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 624a22c8c5478..707aca5f8342a 100644 +index 55d05c746eb00..7883a183f274d 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h -@@ -360,6 +360,10 @@ class COMPONENT_EXPORT(GFX) RenderText { +@@ -378,6 +378,10 @@ class COMPONENT_EXPORT(GFX) RenderText { void SetWhitespaceElision(std::optional elide_whitespace); std::optional whitespace_elision() const { return whitespace_elision_; } @@ -110,7 +110,7 @@ index 624a22c8c5478..707aca5f8342a 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -1107,6 +1111,8 @@ class COMPONENT_EXPORT(GFX) RenderText { +@@ -1129,6 +1133,8 @@ class COMPONENT_EXPORT(GFX) RenderText { // Tell whether or not the |layout_text_| needs an update or is up to date. mutable bool layout_text_up_to_date_ = false; @@ -133,10 +133,10 @@ index e5135719b8df9..fe88f01136990 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 07e805f154bd3..5bba98ef7d774 100644 +index ccbd45bf8bba7..2a2f403e8fe01 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -628,6 +628,12 @@ void LabelButton::OnThemeChanged() { +@@ -604,6 +604,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -150,10 +150,10 @@ index 07e805f154bd3..5bba98ef7d774 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index eed04364a8c09..a3c7cf6275838 100644 +index 8efaccff40e09..e420e2f4e80ec 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -192,6 +192,9 @@ class VIEWS_EXPORT LabelButton : public Button, +@@ -184,6 +184,9 @@ class VIEWS_EXPORT LabelButton : public Button, return !!paint_as_active_subscription_; } @@ -164,10 +164,10 @@ index eed04364a8c09..a3c7cf6275838 100644 LabelButtonImageContainer* image_container() { return image_container_.get(); diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 9ad8685569d46..00cf319a53a10 100644 +index af3ef923d50ce..263a178888e18 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -52,12 +52,29 @@ enum LabelPropertyKey { +@@ -56,12 +56,29 @@ enum LabelPropertyKey { kLabelObscured, kLabelAllowCharacterBreak, kAccessibleTextOffsets, @@ -197,7 +197,7 @@ index 9ad8685569d46..00cf319a53a10 100644 } // namespace namespace views { -@@ -555,6 +572,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -535,6 +552,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnDisplayTextTruncation(); } @@ -210,15 +210,15 @@ index 9ad8685569d46..00cf319a53a10 100644 + kPropertyEffectsPreferredSizeChanged); +} + - void Label::SetCustomTooltipText(const std::u16string& tooltip_text) { - custom_tooltip_text_ = tooltip_text; + void Label::SetCustomTooltipText(std::u16string_view tooltip_text) { + custom_tooltip_text_ = std::u16string(tooltip_text); -@@ -898,6 +924,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -879,6 +905,16 @@ std::unique_ptr Label::CreateRenderText() const { } } + if (draw_strings_flags_ != 0) { -+ auto text_str = GetText(); ++ std::u16string text_str(GetText()); + gfx::Range range = StripAcceleratorChars(draw_strings_flags_, &text_str); + render_text->SetText(text_str); + if (range.IsValid()) { @@ -231,7 +231,7 @@ index 9ad8685569d46..00cf319a53a10 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index a860b46db4ab7..f2650f8d241ad 100644 +index b4cb7c83a3e4c..562e096930147 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h @@ -241,6 +241,10 @@ class VIEWS_EXPORT Label : public View, @@ -254,7 +254,7 @@ index a860b46db4ab7..f2650f8d241ad 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index fb9d5cab9629f..19273c599c4d3 100644 +index 6337d0d70f247..8ee49d582cbf8 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc @@ -588,7 +588,8 @@ void MenuController::Run(Widget* parent, @@ -275,7 +275,7 @@ index fb9d5cab9629f..19273c599c4d3 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2378,6 +2380,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2380,6 +2382,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { params.do_capture = do_capture; params.native_view_for_gestures = native_view_for_gestures_; params.owned_window_anchor = anchor; @@ -283,7 +283,7 @@ index fb9d5cab9629f..19273c599c4d3 100644 if (item->GetParentMenuItem()) { params.context = item->GetWidget(); // (crbug.com/1414232) The item to be open is a submenu. Make sure -@@ -3089,7 +3092,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -3091,7 +3094,11 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -296,7 +296,7 @@ index fb9d5cab9629f..19273c599c4d3 100644 return; } -@@ -3114,6 +3121,7 @@ void MenuController::CloseSubmenu() { +@@ -3116,6 +3123,7 @@ void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); if (!item->GetParentMenuItem()) { @@ -403,10 +403,10 @@ index fc1d5fccc3845..c065cafcd537c 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index dbb066801e1d0..58573b54dea0b 100644 +index 03dddd5040a34..442bbfdb3f6f5 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1157,6 +1157,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1158,6 +1158,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); @@ -422,7 +422,7 @@ index dbb066801e1d0..58573b54dea0b 100644 } else if (paint_as_selected) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1227,6 +1236,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1228,6 +1237,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { } SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { @@ -749,10 +749,10 @@ index da772edd48c00..43c930e932287 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 1da213198d5de..9961b0c503f0a 100644 +index 265c4713b41e0..8204af77e97fb 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -272,6 +272,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -273,6 +273,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = background_view_->AddChildView( std::make_unique(content_view, false)); @@ -789,7 +789,7 @@ index 548bd04490964..9772363322649 100644 if (root_location != root_current_location && !g_ozone_ui_controls_test_helper->MustUseUiControlsForMoveCursorTo() && diff --git ui/views/view.h ui/views/view.h -index 8dcbed75a834b..d3507ba0d9903 100644 +index cca938ad25cda..e7f12dedfe565 100644 --- ui/views/view.h +++ ui/views/view.h @@ -26,6 +26,7 @@ @@ -810,7 +810,7 @@ index 8dcbed75a834b..d3507ba0d9903 100644 // Do not remove this macro! // The macro is maintained by the memory safety team. ADVANCED_MEMORY_SAFETY_CHECKS(); -@@ -613,7 +615,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -615,7 +617,7 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, // Return the preferred height for a specific width. It is a helper function // of GetPreferredSize(SizeBounds(w, SizeBound())).height(). diff --git a/patch/patches/views_textfield_5399416.patch b/patch/patches/views_textfield_5399416.patch index 196ebdc43..2e0c7b88d 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 076be6ed3360d..466184b6988a9 100644 +index ceafee88760f7..91f670e94a8e4 100644 --- ui/views/controls/textfield/textfield.cc +++ ui/views/controls/textfield/textfield.cc -@@ -3129,6 +3129,10 @@ void Textfield::OnEnabledChanged() { +@@ -3131,6 +3131,10 @@ void Textfield::OnEnabledChanged() { if (GetInputMethod()) { GetInputMethod()->OnTextInputTypeChanged(this); } diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index 7e4dc5123..08ba9afc2 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -61,10 +61,10 @@ index 971e5273f1b05..a5d847f7f9d60 100644 case ui::mojom::WindowShowState::kMaximized: 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 51f836176bf92..9171a879fca77 100644 +index ce00b0540a7ac..21ce742e1406f 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -591,6 +591,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { +@@ -602,6 +602,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { return scale_override_for_capture_; } @@ -80,10 +80,10 @@ index 51f836176bf92..9171a879fca77 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 2a2edc6063b49..66860109f4191 100644 +index 568a87065acb5..826b835d88a03 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -70,6 +70,7 @@ namespace content { +@@ -72,6 +72,7 @@ namespace content { class DevicePosturePlatformProvider; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; @@ -91,7 +91,7 @@ index 2a2edc6063b49..66860109f4191 100644 class ScopedViewTransitionResources; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -151,6 +152,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -156,6 +157,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float GetDeviceScaleFactor() const final; bool IsPointerLocked() override; @@ -101,7 +101,7 @@ index 2a2edc6063b49..66860109f4191 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 -@@ -212,6 +216,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -225,6 +229,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // Called when screen information or native widget bounds change. virtual void UpdateScreenInfo(); @@ -112,7 +112,7 @@ index 2a2edc6063b49..66860109f4191 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_| -@@ -339,6 +347,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -351,6 +359,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase const gfx::Rect& bounds, const gfx::Rect& anchor_rect) = 0; @@ -125,7 +125,7 @@ index 2a2edc6063b49..66860109f4191 100644 // Indicates whether the page has finished loading. virtual void SetIsLoading(bool is_loading) = 0; -@@ -595,6 +609,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -613,6 +627,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // to all displays. gfx::Size system_cursor_size_; @@ -136,7 +136,7 @@ index 2a2edc6063b49..66860109f4191 100644 private: FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, -@@ -616,10 +634,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -634,10 +652,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void SynchronizeVisualProperties(); @@ -196,10 +196,10 @@ index 41b34a27176a3..bdf5f9d4bb61e 100644 if (host_ && set_focus_on_mouse_down_or_key_event_) { set_focus_on_mouse_down_or_key_event_ = false; diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 7cd4d56bb2ac2..19034a43949b1 100644 +index 027dd27577fdc..cee885246b3e1 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -254,6 +254,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -255,6 +255,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() const = 0; @@ -215,10 +215,10 @@ index 7cd4d56bb2ac2..19034a43949b1 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 a5e890065948d..d2d48a9552dd5 100644 +index f7ac6accd990a..068861af469f9 100644 --- ui/aura/native_window_occlusion_tracker_win.cc +++ ui/aura/native_window_occlusion_tracker_win.cc -@@ -103,6 +103,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) { +@@ -102,6 +102,13 @@ void NativeWindowOcclusionTrackerWin::Enable(Window* window) { // when it's no longer true that all windows are minimized, and when the // window is destroyed. HWND root_window_hwnd = window->GetHost()->GetAcceleratedWidget(); @@ -246,10 +246,10 @@ index aeaf8e35f7eda..4b7cc3f03d3cf 100644 + [MinVersion=1] kEnd = 7, }; diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index 7d00ff55616fd..fdcb8d9595d67 100644 +index 5c4cdbd17a169..fe3460b63d3e6 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1877,7 +1877,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1847,7 +1847,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -337,7 +337,7 @@ index 5c57268b37e2a..e844ce5a4cd3a 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 0ec0badc19066..72af7c8024bd3 100644 +index e19eb0360e4ca..97422ae54acc4 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -274,8 +274,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -500,10 +500,10 @@ index 932351e288f37..7897f4b72f605 100644 // the implementation of ::ShowCursor() is based on a counter, so making this // member static ensures that ::ShowCursor() is always called exactly once diff --git ui/views/widget/native_widget_mac.mm ui/views/widget/native_widget_mac.mm -index 89247a9ed3522..2d997ff8fda51 100644 +index 763fa6a33f80c..9ed70009fa879 100644 --- ui/views/widget/native_widget_mac.mm +++ ui/views/widget/native_widget_mac.mm -@@ -699,6 +699,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state, +@@ -702,6 +702,7 @@ void NativeWidgetMac::Show(ui::mojom::WindowShowState show_state, break; case ui::mojom::WindowShowState::kMaximized: case ui::mojom::WindowShowState::kFullscreen: @@ -512,7 +512,7 @@ index 89247a9ed3522..2d997ff8fda51 100644 break; case ui::mojom::WindowShowState::kEnd: diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index a4c1dba98b0d2..b8f9b62260637 100644 +index b3180ad15a658..34ca46a4db5bd 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -234,8 +234,8 @@ bool Widget::InitParams::ShouldInitAsHeadless() const { @@ -526,7 +526,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 } void Widget::InitParams::SetParent(gfx::NativeView parent_view) { -@@ -465,7 +465,8 @@ void Widget::Init(InitParams params) { +@@ -461,7 +461,8 @@ void Widget::Init(InitParams params) { } params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -536,7 +536,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 is_headless_ = params.ShouldInitAsHeadless(); is_autosized_ = params.autosize; -@@ -588,9 +589,14 @@ void Widget::Init(InitParams params) { +@@ -584,9 +585,14 @@ void Widget::Init(InitParams params) { if (show_state == ui::mojom::WindowShowState::kMaximized) { Maximize(); @@ -551,7 +551,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 } #if BUILDFLAG(IS_CHROMEOS) -@@ -604,7 +610,12 @@ void Widget::Init(InitParams params) { +@@ -600,7 +606,12 @@ void Widget::Init(InitParams params) { } else if (delegate) { SetContentsView(delegate->TransferOwnershipOfContentsView()); if (should_set_initial_bounds) { @@ -565,7 +565,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 } } -@@ -1922,10 +1933,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1924,10 +1935,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -582,7 +582,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 return non_client_view_ ? non_client_view_->GetMaximumSize() : gfx::Size(); } -@@ -2206,7 +2223,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) { +@@ -2208,7 +2225,8 @@ bool Widget::SetInitialFocus(ui::mojom::WindowShowState show_state) { View* v = widget_delegate_->GetInitiallyFocusedView(); if (!focus_on_creation_ || show_state == ui::mojom::WindowShowState::kInactive || @@ -593,7 +593,7 @@ index a4c1dba98b0d2..b8f9b62260637 100644 // focus when the window is restored. if (v) { diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 6dae25a61bfaf..39d85fd7c279c 100644 +index 842ea6f7eb241..cfb72cea708f5 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -410,6 +410,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -605,7 +605,7 @@ index 6dae25a61bfaf..39d85fd7c279c 100644 // Specifies the initial bounds of the Widget. Default is empty, which means // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not -@@ -874,7 +876,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -869,7 +871,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, void SetVisible(bool visible); // Activates the widget, assuming it already exists and is visible. @@ -644,10 +644,10 @@ index d402e40e6f587..acf15597dab7f 100644 if (native_widget_delegate->IsDialogBox()) { diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index b3dc46c34f2af..bc3839c4c8c03 100644 +index a10d781e66741..5467f909f22ac 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -793,7 +793,11 @@ bool HWNDMessageHandler::IsVisible() const { +@@ -795,7 +795,11 @@ bool HWNDMessageHandler::IsVisible() const { } bool HWNDMessageHandler::IsActive() const { @@ -660,7 +660,7 @@ index b3dc46c34f2af..bc3839c4c8c03 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3241,10 +3245,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3243,10 +3247,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::EventType::kMousewheel) { 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 61d1962cc..dae2753d8 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,7 +80,7 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 3f1b98692d111..edcafed463c2f 100644 +index b1cb8132b0e8d..5ebae5d34b2df 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -266,6 +266,8 @@ viz_component("service") { @@ -150,7 +150,7 @@ index 4d6cc977ed500..22bab6eb2a5df 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc -index 68ab07c7a6955..ac52108f482a5 100644 +index 378910976c702..8ab82e9c53e7e 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc @@ -441,8 +441,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( @@ -223,10 +223,10 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 6db9abcb6d7df..d3c5d5425a37b 100644 +index d353cd4613c73..9a6a181b7ed4d 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h -@@ -32,7 +32,9 @@ +@@ -34,7 +34,9 @@ #include "components/viz/common/frame_sinks/begin_frame_args.h" #include "components/viz/common/surfaces/frame_sink_id.h" #include "components/viz/common/surfaces/subtree_capture_id.h" @@ -236,8 +236,8 @@ index 6db9abcb6d7df..d3c5d5425a37b 100644 #include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h" #include "services/viz/privileged/mojom/compositing/display_private.mojom.h" -@@ -142,6 +144,14 @@ class COMPOSITOR_EXPORT ContextFactory { - virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; +@@ -155,6 +157,14 @@ class COMPOSITOR_EXPORT ExternalBeginFrameControllerClientFactory { + CreateExternalBeginFrameControllerClient() = 0; }; +class COMPOSITOR_EXPORT CompositorDelegate { @@ -251,7 +251,7 @@ index 6db9abcb6d7df..d3c5d5425a37b 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -185,6 +195,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -198,6 +208,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -261,7 +261,7 @@ index 6db9abcb6d7df..d3c5d5425a37b 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 -@@ -589,6 +602,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -616,6 +629,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 7c8365f04..c8d810cae 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 5ff43afce429c..587130d6d4f2a 100644 +index b45b3210c9564..76b6c52347b73 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3830,6 +3830,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3853,6 +3853,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 5ff43afce429c..587130d6d4f2a 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3840,6 +3846,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3863,6 +3869,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 5ff43afce429c..587130d6d4f2a 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -4050,6 +4057,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -4073,6 +4080,9 @@ void WebContentsImpl::RenderWidgetCreated( "render_widget_host", render_widget_host); CHECK(!created_widgets_.contains(render_widget_host->GetFrameSinkId())); created_widgets_[render_widget_host->GetFrameSinkId()] = render_widget_host; @@ -33,7 +33,7 @@ index 5ff43afce429c..587130d6d4f2a 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4963,6 +4973,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4992,6 +5002,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.picture_in_picture_options = *(params.pip_options); } @@ -49,7 +49,7 @@ index 5ff43afce429c..587130d6d4f2a 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. -@@ -9622,6 +9641,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -9660,6 +9679,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, } CloseListenerManager::DidChangeFocusedFrame(this); @@ -60,7 +60,7 @@ index 5ff43afce429c..587130d6d4f2a 100644 FrameTree* WebContentsImpl::GetOwnedPictureInPictureFrameTree() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 5e89cbf0ed5fd..49a6449c46fad 100644 +index 4f3914d6936cb..8d06a209db635 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -116,10 +116,12 @@ class BrowserPluginGuestDelegate; @@ -88,10 +88,10 @@ index 5e89cbf0ed5fd..49a6449c46fad 100644 // the value that'll be returned by GetLastActiveTimeTicks(). If this is // left default initialized then the value is not passed on to the diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index fbd5d3275fb9d..acd0eab6e3912 100644 +index ac2e7cdceb13c..60b852155daa4 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -98,9 +98,11 @@ class EyeDropperListener; +@@ -100,9 +100,11 @@ class EyeDropperListener; class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; @@ -103,7 +103,7 @@ index fbd5d3275fb9d..acd0eab6e3912 100644 struct ContextMenuParams; struct DropData; struct MediaPlayerWatchTime; -@@ -366,6 +368,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -375,6 +377,14 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index c6c7f494f..44b693fdf 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 8b87ad1fbda13..c752efbdef19e 100644 +index 1e84e382f1f94..e0f147959244d 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -828,6 +828,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -842,6 +842,11 @@ class BLINK_PLATFORM_EXPORT Platform { } #endif @@ -15,10 +15,10 @@ index 8b87ad1fbda13..c752efbdef19e 100644 static void InitializeMainThreadCommon( std::unique_ptr main_thread); diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 15700b6fcff0a..903b2d23a9a3c 100644 +index 07602d73abf5e..ea90041293da8 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc -@@ -17,6 +17,7 @@ +@@ -13,6 +13,7 @@ #include "base/task/sequenced_task_runner.h" #include "base/task/single_thread_task_runner.h" #include "base/trace_event/trace_event.h" @@ -26,7 +26,7 @@ index 15700b6fcff0a..903b2d23a9a3c 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -175,6 +176,7 @@ DevToolsSession::DevToolsSession( +@@ -181,6 +182,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -34,7 +34,7 @@ index 15700b6fcff0a..903b2d23a9a3c 100644 } DevToolsSession::~DevToolsSession() { -@@ -220,6 +222,7 @@ void DevToolsSession::Detach() { +@@ -226,6 +228,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index a46ad2798..1fc2dce84 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,10 +11,10 @@ index b1689844282d6..a8f3b3432517d 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 972603d6408bd..d5c3f76e1222f 100644 +index fd5c0566b6f51..7f891bb6040a5 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -257,8 +257,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -255,8 +255,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -30,7 +30,7 @@ index 972603d6408bd..d5c3f76e1222f 100644 } namespace { -@@ -615,6 +620,7 @@ WebViewImpl::WebViewImpl( +@@ -613,6 +618,7 @@ WebViewImpl::WebViewImpl( blink::ZoomFactorToZoomLevel(kMinimumBrowserZoomFactor)), maximum_zoom_level_( blink::ZoomFactorToZoomLevel(kMaximumBrowserZoomFactor)), diff --git a/patch/patches/win_sandbox_op3way_3708.patch b/patch/patches/win_sandbox_op3way_3708.patch index 045425cf5..7c6220000 100644 --- a/patch/patches/win_sandbox_op3way_3708.patch +++ b/patch/patches/win_sandbox_op3way_3708.patch @@ -1,8 +1,8 @@ diff --git base/time/time.h base/time/time.h -index da5c4c967b4ac..769f856c220af 100644 +index 44921db485328..ae521c59ae388 100644 --- base/time/time.h +++ base/time/time.h -@@ -134,6 +134,13 @@ constexpr bool isnan(double d) { +@@ -136,6 +136,13 @@ constexpr bool isnan(double d) { } // namespace @@ -16,7 +16,7 @@ index da5c4c967b4ac..769f856c220af 100644 // TimeDelta ------------------------------------------------------------------ class BASE_EXPORT TimeDelta { -@@ -322,8 +329,17 @@ class BASE_EXPORT TimeDelta { +@@ -324,8 +331,17 @@ class BASE_EXPORT TimeDelta { // Comparison operators. friend constexpr bool operator==(TimeDelta, TimeDelta) = default; @@ -34,7 +34,7 @@ index da5c4c967b4ac..769f856c220af 100644 // Returns this delta, ceiled/floored/rounded-away-from-zero to the nearest // multiple of |interval|. -@@ -480,8 +496,17 @@ class TimeBase { +@@ -482,8 +498,17 @@ class TimeBase { // Comparison operators friend constexpr bool operator==(const TimeBase&, const TimeBase&) = default;