diff --git a/BUILD.gn b/BUILD.gn index a4b2331c2..f3b0e2655 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -443,6 +443,12 @@ source_set("libcef_test_support") { # Support for UI input events. "//ui/views:test_support", ] + + if (is_mac && enable_base_tracing && !is_component_build) { + # Add libtest_trace_processor.dylib as a runtime dependency. + # See https://crrev.com/8b18bd125d + deps += [ "//base/test:test_trace_processor_bundle_data" ] + } } @@ -1352,6 +1358,8 @@ make_pack_header("resources") { "$root_gen_dir/content/browser/webrtc/resources/grit/webrtc_internals_resources.h", "$root_gen_dir/content/grit/content_resources.h", "$root_gen_dir/content/grit/dev_ui_content_resources.h", + "$root_gen_dir/content/grit/gpu_resources.h", + "$root_gen_dir/content/grit/histograms_resources.h", "$root_gen_dir/extensions/grit/extensions_browser_resources.h", "$root_gen_dir/extensions/grit/extensions_renderer_resources.h", "$root_gen_dir/extensions/grit/extensions_resources.h", @@ -1375,6 +1383,8 @@ make_pack_header("resources") { "//components/resources:components_resources", "//components/resources:dev_ui_components_resources", "//content/browser/devtools:devtools_resources", + "//content/browser/resources/gpu:resources", + "//content/browser/resources/histograms:resources", "//content/browser/tracing:resources", "//content/browser/webrtc/resources", "//content:content_resources", @@ -1504,6 +1514,8 @@ if (is_mac) { public_deps += [ "//third_party/icu:icudata", ] } + sources += [ "//ui/gl/resources/angle-metal/gpu_shader_cache.bin" ] + if (v8_use_external_startup_data) { sources += [ "$root_out_dir/snapshot_blob.bin", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 90726748c..3c320f1b0 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/113.0.5672.0' + 'chromium_checkout': 'refs/tags/114.0.5735.0' } diff --git a/include/cef_application_mac.h b/include/cef_application_mac.h index d4d69e9e5..b607acca1 100644 --- a/include/cef_application_mac.h +++ b/include/cef_application_mac.h @@ -45,9 +45,6 @@ // Use the existing CrAppProtocol definition. #import "base/message_loop/message_pump_mac.h" -// Use the existing UnderlayableSurface definition. -#import "ui/base/cocoa/underlay_opengl_hosting_window.h" - // Use the existing empty protocol definitions. #import "base/mac/cocoa_protocols.h" @@ -70,13 +67,6 @@ - (void)setHandlingSendEvent:(BOOL)handlingSendEvent; @end -// Copy of definition from ui/base/cocoa/underlay_opengl_hosting_window.h. -// Common base class for windows that host a OpenGL surface that renders under -// the window. Contains methods relating to hole punching so that the OpenGL -// surface is visible through the window. -@interface UnderlayOpenGLHostingWindow : NSWindow -@end - #endif // USING_CHROMIUM_INCLUDES // All CEF client applications must subclass NSApplication and implement this diff --git a/libcef/browser/alloy/alloy_browser_context.cc b/libcef/browser/alloy/alloy_browser_context.cc index ca4ccd05a..ed4f5cfc3 100644 --- a/libcef/browser/alloy/alloy_browser_context.cc +++ b/libcef/browser/alloy/alloy_browser_context.cc @@ -450,6 +450,12 @@ AlloyBrowserContext::GetUserCloudPolicyManager() { return nullptr; } +policy::ProfileCloudPolicyManager* +AlloyBrowserContext::GetProfileCloudPolicyManager() { + NOTREACHED(); + return nullptr; +} + policy::ProfilePolicyConnector* AlloyBrowserContext::GetProfilePolicyConnector() { NOTREACHED(); diff --git a/libcef/browser/alloy/alloy_browser_context.h b/libcef/browser/alloy/alloy_browser_context.h index f3d679daf..8c877bffb 100644 --- a/libcef/browser/alloy/alloy_browser_context.h +++ b/libcef/browser/alloy/alloy_browser_context.h @@ -94,6 +94,7 @@ class AlloyBrowserContext : public ChromeProfileAlloy, ProfileKey* GetProfileKey() const override; policy::SchemaRegistryService* GetPolicySchemaRegistryService() override; policy::UserCloudPolicyManager* GetUserCloudPolicyManager() override; + policy::ProfileCloudPolicyManager* GetProfileCloudPolicyManager() override; policy::ProfilePolicyConnector* GetProfilePolicyConnector() override; const policy::ProfilePolicyConnector* GetProfilePolicyConnector() const override; diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index b76b91799..3e8775249 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -120,7 +120,6 @@ #include "extensions/browser/extensions_browser_client.h" #include "extensions/browser/guest_view/extensions_guest_view.h" #include "extensions/browser/guest_view/web_view/web_view_guest.h" -#include "extensions/browser/info_map.h" #include "extensions/browser/process_map.h" #include "extensions/browser/renderer_startup_helper.h" #include "extensions/browser/url_loader_factory_manager.h" @@ -923,14 +922,21 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles( Profile* profile = Profile::FromBrowserContext(browser_context); - chrome::mojom::DynamicParams dynamic_params = { - profile->GetPrefs()->GetBoolean( - policy::policy_prefs::kForceGoogleSafeSearch), - profile->GetPrefs()->GetInteger( - policy::policy_prefs::kForceYouTubeRestrict), - profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)}; - result.push_back( - std::make_unique(std::move(dynamic_params))); + chrome::mojom::DynamicParamsPtr dynamic_params = + chrome::mojom::DynamicParams::New( +#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) + /*bound_session_params=*/nullptr, +#endif + profile->GetPrefs()->GetBoolean( + policy::policy_prefs::kForceGoogleSafeSearch), + profile->GetPrefs()->GetInteger( + policy::policy_prefs::kForceYouTubeRestrict), + profile->GetPrefs()->GetString(prefs::kAllowedDomainsForApps)); + result.push_back(std::make_unique( +#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) + /*bound_session_request_throttled_listener=*/nullptr, +#endif + std::move(dynamic_params))); return result; } diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.cc b/libcef/browser/chrome/chrome_content_browser_client_cef.cc index 8f3606023..d87fead84 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.cc +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.cc @@ -43,12 +43,6 @@ #include "third_party/blink/public/common/web_preferences/web_preferences.h" #include "third_party/blink/public/mojom/loader/resource_load_info.mojom-shared.h" -#if BUILDFLAG(IS_MAC) -#include "chrome/browser/child_process_host_flags.h" -#include "chrome/common/chrome_constants.h" -#include "libcef/common/util_mac.h" -#endif - namespace { void HandleExternalProtocolHelper( @@ -488,20 +482,6 @@ void ChromeContentBrowserClientCef::RegisterBrowserInterfaceBindersForFrame( map); } -#if BUILDFLAG(IS_MAC) -base::FilePath ChromeContentBrowserClientCef::GetChildProcessPath( - int child_flags, - const base::FilePath& helpers_path) { - // Ignoring |helpers_path| here because it doesn't provide sufficient - // information to determine the required path for CEF. - if (child_flags == chrome::kChildProcessHelperAlerts) { - return util_mac::GetChildProcessPath(chrome::kMacHelperSuffixAlerts); - } - NOTREACHED() << "Unsupported child process flags!"; - return {}; -} -#endif // BUILDFLAG(IS_MAC) - CefRefPtr ChromeContentBrowserClientCef::request_context() const { return browser_main_parts_->request_context(); diff --git a/libcef/browser/chrome/chrome_content_browser_client_cef.h b/libcef/browser/chrome/chrome_content_browser_client_cef.h index 3ee5b48ff..ef2cdd753 100644 --- a/libcef/browser/chrome/chrome_content_browser_client_cef.h +++ b/libcef/browser/chrome/chrome_content_browser_client_cef.h @@ -124,14 +124,6 @@ class ChromeContentBrowserClientCef : public ChromeContentBrowserClient { content::RenderFrameHost* render_frame_host, mojo::BinderMapWithContext* map) override; -#if BUILDFLAG(IS_MAC) - // TODO: Delete after merging - // https://chromium-review.googlesource.com/c/chromium/src/+/4456752 - base::FilePath GetChildProcessPath( - int child_flags, - const base::FilePath& helpers_path) override; -#endif // BUILDFLAG(IS_MAC) - CefRefPtr request_context() const; scoped_refptr background_task_runner() const; diff --git a/libcef/browser/extensions/api/tabs/tabs_api.cc b/libcef/browser/extensions/api/tabs/tabs_api.cc index 32c028f48..8da799d3b 100644 --- a/libcef/browser/extensions/api/tabs/tabs_api.cc +++ b/libcef/browser/extensions/api/tabs/tabs_api.cc @@ -90,8 +90,9 @@ ExtensionFunction::ResponseAction TabsCreateFunction::Run() { } // Return data about the newly created tab. - return RespondNow(has_callback() ? OneArgument(base::Value(result->ToValue())) - : NoArguments()); + return RespondNow(has_callback() + ? WithArguments(base::Value(result->ToValue())) + : NoArguments()); } BaseAPIFunction::BaseAPIFunction() : cef_details_(this) {} diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 605493f5d..c3db6abed 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -36,7 +36,6 @@ #include "extensions/browser/api/app_runtime/app_runtime_api.h" #include "extensions/browser/extension_prefs.h" #include "extensions/browser/extension_registry.h" -#include "extensions/browser/info_map.h" #include "extensions/browser/notification_types.h" #include "extensions/browser/null_app_sorting.h" #include "extensions/browser/quota_service.h" @@ -437,13 +436,6 @@ CefExtensionSystem::store_factory() { return store_factory_; } -InfoMap* CefExtensionSystem::info_map() { - if (!info_map_.get()) { - info_map_ = new InfoMap; - } - return info_map_.get(); -} - QuotaService* CefExtensionSystem::quota_service() { return quota_service_.get(); } @@ -452,31 +444,6 @@ AppSorting* CefExtensionSystem::app_sorting() { return app_sorting_.get(); } -// Implementation based on -// ExtensionSystemImpl::RegisterExtensionWithRequestContexts. -void CefExtensionSystem::RegisterExtensionWithRequestContexts( - const Extension* extension, - base::OnceClosure callback) { - // TODO(extensions): The |incognito_enabled| value should be set based on - // manifest settings. - content::GetIOThreadTaskRunner({})->PostTaskAndReply( - FROM_HERE, - base::BindOnce(&InfoMap::AddExtension, info_map(), - base::RetainedRef(extension), base::Time::Now(), - true, // incognito_enabled - false), // notifications_disabled - std::move(callback)); -} - -// Implementation based on -// ExtensionSystemImpl::UnregisterExtensionWithRequestContexts. -void CefExtensionSystem::UnregisterExtensionWithRequestContexts( - const std::string& extension_id) { - content::GetIOThreadTaskRunner({})->PostTask( - FROM_HERE, - base::BindOnce(&InfoMap::RemoveExtension, info_map(), extension_id)); -} - const base::OneShotEvent& CefExtensionSystem::ready() const { return ready_; } @@ -615,18 +582,11 @@ void CefExtensionSystem::UnloadExtension(const std::string& extension_id, // This method can be called via PostTask, so the extension may have been // unloaded by the time this runs. if (!extension.get()) { - // In case the extension may have crashed/uninstalled. Allow the profile to - // clean up its RequestContexts. - UnregisterExtensionWithRequestContexts(extension_id); return; } if (registry_->disabled_extensions().Contains(extension->id())) { registry_->RemoveDisabled(extension->id()); - // Make sure the profile cleans up its RequestContexts when an already - // disabled extension is unloaded (since they are also tracking the disabled - // extensions). - UnregisterExtensionWithRequestContexts(extension_id); // Don't send the unloaded notification. It was sent when the extension // was disabled. } else { @@ -638,18 +598,6 @@ void CefExtensionSystem::UnloadExtension(const std::string& extension_id, // Implementation based on ExtensionService::NotifyExtensionLoaded. void CefExtensionSystem::NotifyExtensionLoaded(const Extension* extension) { - // The URLRequestContexts need to be first to know that the extension - // was loaded, otherwise a race can arise where a renderer that is created - // for the extension may try to load an extension URL with an extension id - // that the request context doesn't yet know about. The profile is responsible - // for ensuring its URLRequestContexts appropriately discover the loaded - // extension. - RegisterExtensionWithRequestContexts( - extension, - base::BindOnce( - &CefExtensionSystem::OnExtensionRegisteredWithRequestContexts, - weak_ptr_factory_.GetWeakPtr(), base::WrapRefCounted(extension))); - // Tell renderers about the loaded extension. renderer_helper_->OnExtensionLoaded(*extension); @@ -690,14 +638,6 @@ void CefExtensionSystem::NotifyExtensionLoaded(const Extension* extension) { } } -void CefExtensionSystem::OnExtensionRegisteredWithRequestContexts( - scoped_refptr extension) { - registry_->AddReady(extension); - if (registry_->enabled_extensions().Contains(extension->id())) { - registry_->TriggerOnReady(extension.get()); - } -} - // Implementation based on ExtensionService::NotifyExtensionUnloaded. void CefExtensionSystem::NotifyExtensionUnloaded( const Extension* extension, @@ -718,8 +658,6 @@ void CefExtensionSystem::NotifyExtensionUnloaded( // Tell renderers about the unloaded extension. renderer_helper_->OnExtensionUnloaded(*extension); - - UnregisterExtensionWithRequestContexts(extension->id()); } } // namespace extensions diff --git a/libcef/browser/extensions/extension_system.h b/libcef/browser/extensions/extension_system.h index a30632859..e1ed08c6b 100644 --- a/libcef/browser/extensions/extension_system.h +++ b/libcef/browser/extensions/extension_system.h @@ -94,14 +94,8 @@ class CefExtensionSystem : public ExtensionSystem { StateStore* rules_store() override; StateStore* dynamic_user_scripts_store() override; scoped_refptr store_factory() override; - InfoMap* info_map() override; QuotaService* quota_service() override; AppSorting* app_sorting() override; - void RegisterExtensionWithRequestContexts( - const Extension* extension, - base::OnceClosure callback) override; - void UnregisterExtensionWithRequestContexts( - const std::string& extension_id) override; const base::OneShotEvent& ready() const override; bool is_ready() const override; ContentVerifier* content_verifier() override; @@ -159,18 +153,10 @@ class CefExtensionSystem : public ExtensionSystem { void NotifyExtensionUnloaded(const Extension* extension, UnloadedExtensionReason reason); - // Completes extension loading after URLRequestContexts have been updated - // on the IO thread. - void OnExtensionRegisteredWithRequestContexts( - scoped_refptr extension); - content::BrowserContext* browser_context_; // Not owned. bool initialized_; - // Data to be accessed on the IO thread. Must outlive process_manager_. - scoped_refptr info_map_; - std::unique_ptr service_worker_manager_; std::unique_ptr quota_service_; std::unique_ptr app_sorting_; diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 8f1a8ddd3..677bcffa7 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -23,7 +23,6 @@ #include "third_party/blink/public/common/input/web_input_event.h" #include "third_party/blink/public/common/input/web_mouse_event.h" #include "third_party/blink/public/common/input/web_mouse_wheel_event.h" -#import "ui/base/cocoa/underlay_opengl_hosting_window.h" #include "ui/display/screen.h" #include "ui/events/base_event_utils.h" #include "ui/events/keycodes/keyboard_codes_posix.h" @@ -280,11 +279,10 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() { kDefaultStyleMask, frame_rect, content_rect); // Create a new window. - new_window = [[UnderlayOpenGLHostingWindow alloc] - initWithContentRect:content_rect - styleMask:kDefaultStyleMask - backing:NSBackingStoreBuffered - defer:NO]; + new_window = [[NSWindow alloc] initWithContentRect:content_rect + styleMask:kDefaultStyleMask + backing:NSBackingStoreBuffered + defer:NO]; // Create the delegate for control and browser window events. [[CefWindowDelegate alloc] initWithWindow:new_window andBrowser:browser_]; diff --git a/libcef/browser/native/cursor_util_aura.cc b/libcef/browser/native/cursor_util_aura.cc index ef3fc6b21..ae5a3604a 100644 --- a/libcef/browser/native/cursor_util_aura.cc +++ b/libcef/browser/native/cursor_util_aura.cc @@ -10,7 +10,9 @@ #include "content/public/browser/render_widget_host_view.h" #include "ui/base/cursor/cursor_factory.h" #include "ui/base/cursor/mojom/cursor_type.mojom.h" +#include "ui/display/display.h" #include "ui/display/display_util.h" +#include "ui/display/screen.h" #include "ui/wm/core/cursor_loader.h" #if BUILDFLAG(IS_LINUX) @@ -30,28 +32,6 @@ namespace cursor_util { namespace { -display::ScreenInfo GetScreenInfo(CefRefPtr browser) { - display::ScreenInfo screen_info; - - bool screen_info_set = false; - if (auto web_contents = - static_cast(browser.get())->GetWebContents()) { - if (auto view = web_contents->GetRenderWidgetHostView()) { - const auto screen_infos = view->GetScreenInfos(); - if (!screen_infos.screen_infos.empty()) { - screen_info = screen_infos.current(); - screen_info_set = true; - } - } - } - - if (!screen_info_set) { - display::DisplayUtil::GetDefaultScreenInfo(&screen_info); - } - - return screen_info; -} - display::Display::Rotation OrientationAngleToRotation( uint16_t orientation_angle) { // The Display rotation and the ScreenInfo orientation are not the same @@ -74,6 +54,31 @@ display::Display::Rotation OrientationAngleToRotation( return display::Display::ROTATE_0; } +// It would be better if CursorLoader took a ScreenInfo argument. +// See https://crbug.com/1149906#c33. +display::Display GetDisplay(CefRefPtr browser) { + if (auto web_contents = + static_cast(browser.get())->GetWebContents()) { + if (auto view = web_contents->GetRenderWidgetHostView()) { + // Windowless browsers always return nullptr from GetNativeView(). + if (auto native_view = view->GetNativeView()) { + return display::Screen::GetScreen()->GetDisplayNearestView(native_view); + } + + // Make a minimal-effort fake Display object to satisfy the actual usage + // by CursorLoader::SetDisplay. + display::Display fake_display; + auto screen_info = view->GetScreenInfo(); + fake_display.set_device_scale_factor(screen_info.device_scale_factor); + fake_display.set_rotation( + OrientationAngleToRotation(screen_info.orientation_angle)); + return fake_display; + } + } + + return display::Display::GetDefaultDisplay(); +} + scoped_refptr ToPlatformCursor( CefRefPtr browser, const ui::Cursor& ui_cursor) { @@ -87,10 +92,7 @@ scoped_refptr ToPlatformCursor( ui::mojom::CursorType::kCustom, ui_cursor.custom_bitmap(), ui_cursor.custom_hotspot()); } else { - const auto& screen_info = GetScreenInfo(browser); - cursor_loader.SetDisplayData( - OrientationAngleToRotation(screen_info.orientation_angle), - screen_info.device_scale_factor); + cursor_loader.SetDisplay(GetDisplay(browser)); // Attempts to load the cursor via the platform or from pak resources. cursor_loader.SetPlatformCursor(&loaded_cursor); diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index 7de600660..ad76d181b 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -384,7 +384,7 @@ bool CefWindowX11::TopLevelAlwaysOnTop() const { void CefWindowX11::ProcessXEvent(const x11::Event& event) { if (auto* configure = event.As()) { - DCHECK_EQ(xwindow_, configure->event); + DCHECK_EQ(xwindow_, configure->window); // It's possible that the X window may be resized by some other means // than from within Aura (e.g. the X window manager can change the // size). Make sure the root window size is maintained properly. diff --git a/libcef/browser/net/crlset_file_util_impl.cc b/libcef/browser/net/crlset_file_util_impl.cc index fecd791af..7c71bd242 100644 --- a/libcef/browser/net/crlset_file_util_impl.cc +++ b/libcef/browser/net/crlset_file_util_impl.cc @@ -10,13 +10,13 @@ #include "base/files/file_util.h" #include "base/logging.h" #include "content/public/browser/network_service_instance.h" -#include "services/network/network_service.h" +#include "services/cert_verifier/public/mojom/cert_verifier_service_factory.mojom.h" namespace { void UpdateCRLSet(const std::string& crl_set_bytes) { CEF_REQUIRE_UIT(); - content::GetNetworkService()->UpdateCRLSet( + content::GetCertVerifierServiceFactory()->UpdateCRLSet( base::as_bytes(base::make_span(crl_set_bytes)), base::DoNothing()); } diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index a76b6a97c..b60384f5b 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -515,7 +515,6 @@ void CefRenderWidgetHostViewOSR::TakeFallbackContentFrom( delegated_frame_host_->TakeFallbackContentFrom( view_cef->delegated_frame_host_.get()); } - host()->GetContentRenderingTimeoutFrom(view_cef->host()); } void CefRenderWidgetHostViewOSR::OnPresentCompositorFrame() {} diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index a43767d26..84e7e1803 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -47,6 +47,7 @@ #include "components/language/core/browser/language_prefs.h" #include "components/language/core/browser/pref_names.h" #include "components/permissions/permission_actions_history.h" +#include "components/permissions/permission_hats_trigger_helper.h" #include "components/policy/core/common/policy_pref_names.h" #include "components/pref_registry/pref_registry_syncable.h" #include "components/prefs/json_pref_store.h" @@ -75,8 +76,8 @@ #if BUILDFLAG(ENABLE_SUPERVISED_USERS) #include "chrome/browser/profiles/profile_key.h" -#include "chrome/browser/supervised_user/supervised_user_pref_store.h" #include "chrome/browser/supervised_user/supervised_user_settings_service_factory.h" +#include "components/supervised_user/core/browser/supervised_user_pref_store.h" #include "components/supervised_user/core/browser/supervised_user_settings_service.h" #endif @@ -270,6 +271,8 @@ std::unique_ptr CreatePrefService(Profile* profile, MediaDeviceIDSalt::RegisterProfilePrefs(registry.get()); PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry.get()); permissions::PermissionActionsHistory::RegisterProfilePrefs(registry.get()); + permissions::PermissionHatsTriggerHelper::RegisterProfilePrefs( + registry.get()); prefetch::RegisterPredictionOptionsProfilePrefs(registry.get()); privacy_sandbox::RegisterProfilePrefs(registry.get()); ProfileNetworkContextService::RegisterProfilePrefs(registry.get()); diff --git a/libcef/common/util_mac.h b/libcef/common/util_mac.h index 1471d43b4..426dfdbc2 100644 --- a/libcef/common/util_mac.h +++ b/libcef/common/util_mac.h @@ -46,14 +46,6 @@ std::string GetMainBundleID(); // running in an app bundle. base::FilePath GetMainResourcesDirectory(); -// Returns the path to the child process executable with optional suffix (e.g. -// "myapp.app/Contents/Frameworks/myapp Helper.app/Contents/MacOS/ -// myapp Helper"). May return an empty value if not running in an app -// bundle. -// TODO: Delete after merging -// https://chromium-review.googlesource.com/c/chromium/src/+/4456752 -base::FilePath GetChildProcessPath(const std::string& suffix); - // Called from MainDelegate::PreSandboxStartup for the main process. void PreSandboxStartup(); diff --git a/libcef/common/util_mac.mm b/libcef/common/util_mac.mm index ef3eae8a0..fc4bb41d6 100644 --- a/libcef/common/util_mac.mm +++ b/libcef/common/util_mac.mm @@ -148,31 +148,6 @@ base::FilePath GetMainResourcesDirectory() { .Append(FILE_PATH_LITERAL("Resources")); } -base::FilePath GetChildProcessPath(const std::string& suffix) { - // Match the logic in ChildProcessHost::GetChildPath(). - base::FilePath child_path; - base::PathService::Get(content::CHILD_PROCESS_EXE, &child_path); - CHECK(!child_path.empty()); - - if (suffix.empty()) { - // Return the normal child helper path. - return child_path; - } - - std::string child_base_name = child_path.BaseName().value() + suffix; - - // This is a specialized helper, with the |child_path| at - // "myapp.app/Contents/Frameworks/myapp Helper.app/Contents/MacOS/ - // myapp Helper" Go back up to the "Frameworks" directory to select - // a different variant. - child_path = child_path.DirName().DirName().DirName().DirName(); - - return child_path.Append(child_base_name + ".app") - .Append("Contents") - .Append("MacOS") - .Append(child_base_name); -} - void PreSandboxStartup() { OverrideChildProcessPath(); } diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index a20428ba1..b6d306a05 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -112,8 +112,8 @@ AlloyContentRendererClient::AlloyContentRendererClient() if (extensions::ExtensionsEnabled()) { extensions_client_.reset(new extensions::CefExtensionsClient); extensions::ExtensionsClient::Set(extensions_client_.get()); - extensions_renderer_client_.reset( - new extensions::CefExtensionsRendererClient); + extensions_renderer_client_ = + std::make_unique(this); extensions::ExtensionsRendererClient::Set( extensions_renderer_client_.get()); } @@ -474,7 +474,8 @@ void AlloyContentRendererClient::DevToolsAgentDetached() { std::unique_ptr AlloyContentRendererClient::CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType provider_type) { - return std::make_unique(provider_type); + return std::make_unique(provider_type, + this); } void AlloyContentRendererClient::AppendContentSecurityPolicy( diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.h b/libcef/renderer/alloy/alloy_content_renderer_client.h index eef43f3c0..74c9a692e 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.h +++ b/libcef/renderer/alloy/alloy_content_renderer_client.h @@ -120,6 +120,10 @@ class AlloyContentRendererClient // MessageLoopCurrent::DestructionObserver implementation. void WillDestroyCurrentMessageLoop() override; + AlloyRenderThreadObserver* GetAlloyObserver() const { + return observer_.get(); + } + private: void OnBrowserCreated(blink::WebView* web_view, absl::optional is_windowless); diff --git a/libcef/renderer/alloy/alloy_render_thread_observer.cc b/libcef/renderer/alloy/alloy_render_thread_observer.cc index ce6ebca00..37c6e3505 100644 --- a/libcef/renderer/alloy/alloy_render_thread_observer.cc +++ b/libcef/renderer/alloy/alloy_render_thread_observer.cc @@ -8,31 +8,26 @@ #include "libcef/common/net/net_resource_provider.h" #include "base/no_destructor.h" +#include "chrome/common/renderer_configuration.mojom.h" #include "net/base/net_module.h" #include "services/service_manager/public/cpp/connector.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" -namespace { - -chrome::mojom::DynamicParams* GetDynamicConfigParams() { - static base::NoDestructor dynamic_params; - return dynamic_params.get(); -} - -} // namespace - -bool AlloyRenderThreadObserver::is_incognito_process_ = false; - AlloyRenderThreadObserver::AlloyRenderThreadObserver() { net::NetModule::SetResourceProvider(NetResourceProvider); } AlloyRenderThreadObserver::~AlloyRenderThreadObserver() {} -// static -const chrome::mojom::DynamicParams& -AlloyRenderThreadObserver::GetDynamicParams() { - return *GetDynamicConfigParams(); +chrome::mojom::DynamicParamsPtr AlloyRenderThreadObserver::GetDynamicParams() + const { + { + base::AutoLock lock(dynamic_params_lock_); + if (dynamic_params_) { + return dynamic_params_.Clone(); + } + } + return chrome::mojom::DynamicParams::New(); } void AlloyRenderThreadObserver::RegisterMojoInterfaces( @@ -51,15 +46,19 @@ void AlloyRenderThreadObserver::UnregisterMojoInterfaces( void AlloyRenderThreadObserver::SetInitialConfiguration( bool is_incognito_process, - mojo::PendingReceiver chromeos_listener, + mojo::PendingReceiver + chromeos_listener_receiver, mojo::PendingRemote - content_settings_manager) { + content_settings_manager, + mojo::PendingRemote + bound_session_request_throttled_listener) { is_incognito_process_ = is_incognito_process; } void AlloyRenderThreadObserver::SetConfiguration( chrome::mojom::DynamicParamsPtr params) { - *GetDynamicConfigParams() = std::move(*params); + base::AutoLock lock(dynamic_params_lock_); + dynamic_params_ = std::move(params); } void AlloyRenderThreadObserver::OnRendererConfigurationAssociatedRequest( diff --git a/libcef/renderer/alloy/alloy_render_thread_observer.h b/libcef/renderer/alloy/alloy_render_thread_observer.h index 909ac29c1..2b4ed4494 100644 --- a/libcef/renderer/alloy/alloy_render_thread_observer.h +++ b/libcef/renderer/alloy/alloy_render_thread_observer.h @@ -8,6 +8,8 @@ #include +#include "base/synchronization/lock.h" +#include "base/thread_annotations.h" #include "chrome/common/renderer_configuration.mojom.h" #include "components/content_settings/core/common/content_settings.h" #include "content/public/renderer/render_thread_observer.h" @@ -25,11 +27,11 @@ class AlloyRenderThreadObserver : public content::RenderThreadObserver, ~AlloyRenderThreadObserver() override; - static bool is_incognito_process() { return is_incognito_process_; } + bool IsIncognitoProcess() const { return is_incognito_process_; } - // Return the dynamic parameters - those that may change while the + // Return a copy of the dynamic parameters - those that may change while the // render process is running. - static const chrome::mojom::DynamicParams& GetDynamicParams(); + chrome::mojom::DynamicParamsPtr GetDynamicParams() const; private: // content::RenderThreadObserver: @@ -41,19 +43,26 @@ class AlloyRenderThreadObserver : public content::RenderThreadObserver, // chrome::mojom::RendererConfiguration: void SetInitialConfiguration( bool is_incognito_process, - mojo::PendingReceiver chromeos_listener, + mojo::PendingReceiver + chromeos_listener_receiver, mojo::PendingRemote - content_settings_manager) override; + content_settings_manager, + mojo::PendingRemote + bound_session_request_throttled_listener) override; void SetConfiguration(chrome::mojom::DynamicParamsPtr params) override; void OnRendererConfigurationAssociatedRequest( mojo::PendingAssociatedReceiver receiver); - static bool is_incognito_process_; + bool is_incognito_process_ = false; mojo::AssociatedReceiverSet renderer_configuration_receivers_; + + chrome::mojom::DynamicParamsPtr dynamic_params_ + GUARDED_BY(dynamic_params_lock_); + mutable base::Lock dynamic_params_lock_; }; #endif // CEF_LIBCEF_RENDERER_ALLOY_ALLOY_RENDER_THREAD_OBSERVER_H_ diff --git a/libcef/renderer/alloy/url_loader_throttle_provider_impl.cc b/libcef/renderer/alloy/url_loader_throttle_provider_impl.cc index 09bd30d87..d2ee4bd3e 100644 --- a/libcef/renderer/alloy/url_loader_throttle_provider_impl.cc +++ b/libcef/renderer/alloy/url_loader_throttle_provider_impl.cc @@ -5,12 +5,14 @@ #include "libcef/renderer/alloy/url_loader_throttle_provider_impl.h" #include "libcef/common/extensions/extensions_util.h" +#include "libcef/renderer/alloy/alloy_content_renderer_client.h" #include "libcef/renderer/alloy/alloy_render_thread_observer.h" #include #include "base/feature_list.h" #include "chrome/common/google_url_loader_throttle.h" +#include "components/signin/public/base/signin_buildflags.h" #include "content/public/common/content_features.h" #include "content/public/renderer/render_frame.h" #include "services/network/public/cpp/features.h" @@ -18,8 +20,10 @@ #include "third_party/blink/public/platform/web_url.h" CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl( - blink::URLLoaderThrottleProviderType type) - : type_(type) { + blink::URLLoaderThrottleProviderType type, + AlloyContentRendererClient* alloy_content_renderer_client) + : type_(type), + alloy_content_renderer_client_(alloy_content_renderer_client) { DETACH_FROM_THREAD(thread_checker_); } @@ -29,7 +33,8 @@ CefURLLoaderThrottleProviderImpl::~CefURLLoaderThrottleProviderImpl() { CefURLLoaderThrottleProviderImpl::CefURLLoaderThrottleProviderImpl( const CefURLLoaderThrottleProviderImpl& other) - : type_(other.type_) { + : type_(other.type_), + alloy_content_renderer_client_(other.alloy_content_renderer_client_) { DETACH_FROM_THREAD(thread_checker_); } @@ -59,7 +64,10 @@ CefURLLoaderThrottleProviderImpl::CreateThrottles( type_ == blink::URLLoaderThrottleProviderType::kFrame); throttles.emplace_back(std::make_unique( - AlloyRenderThreadObserver::GetDynamicParams())); +#if BUILDFLAG(ENABLE_BOUND_SESSION_CREDENTIALS) + /*bound_session_request_throttled_listener=*/nullptr, +#endif + alloy_content_renderer_client_->GetAlloyObserver()->GetDynamicParams())); return throttles; } diff --git a/libcef/renderer/alloy/url_loader_throttle_provider_impl.h b/libcef/renderer/alloy/url_loader_throttle_provider_impl.h index 1adf0a23f..ccc336b11 100644 --- a/libcef/renderer/alloy/url_loader_throttle_provider_impl.h +++ b/libcef/renderer/alloy/url_loader_throttle_provider_impl.h @@ -11,13 +11,16 @@ #include "base/threading/thread_checker.h" #include "third_party/blink/public/platform/url_loader_throttle_provider.h" +class AlloyContentRendererClient; + // Instances must be constructed on the render thread, and then used and // destructed on a single thread, which can be different from the render thread. class CefURLLoaderThrottleProviderImpl : public blink::URLLoaderThrottleProvider { public: - explicit CefURLLoaderThrottleProviderImpl( - blink::URLLoaderThrottleProviderType type); + CefURLLoaderThrottleProviderImpl( + blink::URLLoaderThrottleProviderType type, + AlloyContentRendererClient* alloy_content_renderer_client); CefURLLoaderThrottleProviderImpl& operator=( const CefURLLoaderThrottleProviderImpl&) = delete; @@ -38,6 +41,7 @@ class CefURLLoaderThrottleProviderImpl const CefURLLoaderThrottleProviderImpl& other); blink::URLLoaderThrottleProviderType type_; + AlloyContentRendererClient* const alloy_content_renderer_client_; THREAD_CHECKER(thread_checker_); }; diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index a571d42df..41e4fe3a4 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -4,6 +4,7 @@ #include "libcef/renderer/extensions/extensions_renderer_client.h" +#include "libcef/renderer/alloy/alloy_content_renderer_client.h" #include "libcef/renderer/alloy/alloy_render_thread_observer.h" #include "libcef/renderer/extensions/extensions_dispatcher_delegate.h" @@ -39,12 +40,15 @@ void IsGuestViewApiAvailableToScriptContext( } // namespace -CefExtensionsRendererClient::CefExtensionsRendererClient() {} +CefExtensionsRendererClient::CefExtensionsRendererClient( + AlloyContentRendererClient* alloy_content_renderer_client) + : alloy_content_renderer_client_(alloy_content_renderer_client) {} CefExtensionsRendererClient::~CefExtensionsRendererClient() {} bool CefExtensionsRendererClient::IsIncognitoProcess() const { - return AlloyRenderThreadObserver::is_incognito_process(); + return alloy_content_renderer_client_->GetAlloyObserver() + ->IsIncognitoProcess(); } int CefExtensionsRendererClient::GetLowestIsolatedWorldId() const { diff --git a/libcef/renderer/extensions/extensions_renderer_client.h b/libcef/renderer/extensions/extensions_renderer_client.h index 36d0c1b86..9537652ba 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.h +++ b/libcef/renderer/extensions/extensions_renderer_client.h @@ -12,6 +12,7 @@ #include "services/service_manager/public/cpp/binder_registry.h" #include "ui/base/page_transition_types.h" +class AlloyContentRendererClient; class GURL; namespace blink { @@ -43,7 +44,8 @@ class ResourceRequestPolicy; class CefExtensionsRendererClient : public ExtensionsRendererClient { public: - CefExtensionsRendererClient(); + explicit CefExtensionsRendererClient( + AlloyContentRendererClient* alloy_content_renderer_client); CefExtensionsRendererClient(const CefExtensionsRendererClient&) = delete; CefExtensionsRendererClient& operator=(const CefExtensionsRendererClient&) = @@ -79,6 +81,8 @@ class CefExtensionsRendererClient : public ExtensionsRendererClient { void RunScriptsAtDocumentIdle(content::RenderFrame* render_frame); private: + AlloyContentRendererClient* const alloy_content_renderer_client_; + std::unique_ptr extension_dispatcher_; std::unique_ptr resource_request_policy_; }; diff --git a/patch/patch.cfg b/patch/patch.cfg index 79a02ff66..d7e6eb3b9 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -75,11 +75,6 @@ patches = [ # RuntimeEnabledFeatures methods. 'name': 'webkit_runtime_enabled_features', }, - { - # Fix export of UnderlayOpenGLHostingWindow for 64-bit MacOS builds. - # https://github.com/chromiumembedded/cef/issues/1051 - 'name': 'underlay_1051', - }, { # Allow specification of a parent window handle for Widget creation. # https://github.com/chromiumembedded/cef/issues/180 @@ -610,11 +605,6 @@ patches = [ # https://chromium-review.googlesource.com/c/chromium/src/+/4200240 'name': 'blink_web_element_4200240' }, - { - # Fix GN gen unresolved dependencies error with cef_sandbox build. - # https://chromium-review.googlesource.com/c/chromium/src/+/4401670 - 'name': 'gpu_test_trace_4401670' - }, { # Fix ThreadChecker crash on startup with Chrome runtime + multi-threaded # message loop. diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 8c1a6e0bf..5b4e164d1 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 80f6eaf01c022..b1a35ad087a5b 100644 +index 425cb0ab0af16..57cda56dcfc19 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -40,6 +40,7 @@ import("//build/config/ui.gni") @@ -10,7 +10,7 @@ index 80f6eaf01c022..b1a35ad087a5b 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1535,7 +1536,11 @@ component("base") { +@@ -1528,7 +1529,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 80f6eaf01c022..b1a35ad087a5b 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -1935,6 +1940,12 @@ component("base") { +@@ -1928,6 +1933,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -37,18 +37,18 @@ index 80f6eaf01c022..b1a35ad087a5b 100644 "cfgmgr32.lib", "ntdll.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index 0f044388cefee..49fc4cd20be64 100644 +index 2d4f17ea2a301..ff2ccafd53056 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc -@@ -13,6 +13,7 @@ +@@ -12,6 +12,7 @@ + #include "base/check.h" #include "base/dcheck_is_on.h" #include "base/no_destructor.h" - #include "base/sampling_heap_profiler/poisson_allocation_sampler.h" +#include "cef/libcef/features/features.h" #if DCHECK_IS_ON() #include -@@ -259,7 +260,7 @@ struct Dispatcher::Impl { +@@ -31,7 +32,7 @@ struct Dispatcher::Impl { } void Reset() { @@ -88,7 +88,7 @@ index 29626e5853c6e..2fb1c61504c5d 100644 #else #include "base/hash/sha1_boringssl.h" diff --git base/rand_util.h base/rand_util.h -index 04024537ee698..59864cb084559 100644 +index 38be94387237d..889550e16a6ce 100644 --- base/rand_util.h +++ base/rand_util.h @@ -15,8 +15,9 @@ @@ -102,7 +102,7 @@ index 04024537ee698..59864cb084559 100644 #include "third_party/boringssl/src/include/openssl/rand.h" #endif -@@ -93,7 +94,7 @@ class RandomBitGenerator { +@@ -97,7 +98,7 @@ class RandomBitGenerator { ~RandomBitGenerator() = default; }; diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 685d1cc6f..2b0799c41 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,8 +1,8 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index 33ec36151d7fb..947772e015ad9 100644 +index 818e5f14ee60f..d68d6a16cda67 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -269,7 +269,7 @@ BrowserTaskExecutor::OnUserInputStart() { +@@ -221,7 +221,7 @@ BrowserTaskExecutor::OnUserInputStart() { // static void BrowserTaskExecutor::Shutdown() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 2d34e4310..e45c9e67e 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index 2cc2e8e2a16da..b9484a5832f74 100644 +index 66008c3abbc49..64d2773724750 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1800,6 +1800,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( +@@ -1804,6 +1804,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -20,10 +20,10 @@ index 2cc2e8e2a16da..b9484a5832f74 100644 // Make an exception to allow most visited tiles to commit in diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index 09e2e349e9e29..fdd64503771f9 100644 +index 1bb280cc5c81d..e06315f1d0628 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -7139,10 +7139,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -7321,10 +7321,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index 09e2e349e9e29..fdd64503771f9 100644 } return origin_and_debug_info; -@@ -7172,6 +7184,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -7354,6 +7366,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( SandboxFlagsToCommit()); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 0f70e4ad9..092ae5174 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index d3adf9735ca95..30aa892822318 100644 +index 53db095c1b1ef..de2e7de4bf231 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1916,8 +1916,6 @@ config("thin_archive") { +@@ -1929,8 +1929,6 @@ config("thin_archive") { # confuses lldb. if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 36267b76e..29a818fb3 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 4607e1bd4a189..45fcc0aef8720 100644 +index 6780e7770a9fe..0eaf2593ce127 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 4607e1bd4a189..45fcc0aef8720 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1939,6 +1940,7 @@ static_library("browser") { +@@ -1935,6 +1936,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -29,7 +29,7 @@ index 4607e1bd4a189..45fcc0aef8720 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -6071,8 +6077,6 @@ static_library("browser") { +@@ -6114,8 +6120,6 @@ static_library("browser") { sources += [ "enterprise/chrome_browser_main_extra_parts_enterprise.cc", "enterprise/chrome_browser_main_extra_parts_enterprise.h", diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 9ad636df4..0e981aa46 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -14,10 +14,10 @@ index 4279a763e28e2..2ec8e4cbfac7d 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 00043e84a13e0..6c64dd46b47b9 100644 +index 787a23b85d06c..80a8667e58a86 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1069,18 +1069,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1042,18 +1042,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 28449bec0..403f28945 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index 370d6ab102471..fe1e4111780ed 100644 return false; } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 60994f80e8e51..262869e33aa30 100644 +index da6c3853d1540..273915b67a396 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -24,7 +24,7 @@ index 60994f80e8e51..262869e33aa30 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -364,6 +365,10 @@ static_library("ui") { +@@ -368,6 +369,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -35,7 +35,7 @@ index 60994f80e8e51..262869e33aa30 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -388,6 +393,7 @@ static_library("ui") { +@@ -392,6 +397,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -43,7 +43,7 @@ index 60994f80e8e51..262869e33aa30 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2574,6 +2580,8 @@ static_library("ui") { +@@ -2600,6 +2606,8 @@ static_library("ui") { "views/apps/app_dialog/app_block_dialog_view.h", "views/apps/app_dialog/app_pause_dialog_view.cc", "views/apps/app_dialog/app_pause_dialog_view.h", @@ -52,7 +52,7 @@ index 60994f80e8e51..262869e33aa30 100644 "views/apps/app_info_dialog/arc_app_info_links_panel.cc", "views/apps/app_info_dialog/arc_app_info_links_panel.h", "views/apps/chrome_app_window_client_views_chromeos.cc", -@@ -4369,8 +4377,6 @@ static_library("ui") { +@@ -4429,8 +4437,6 @@ static_library("ui") { "views/accessibility/theme_tracking_non_accessible_image_view.h", "views/apps/app_dialog/app_dialog_view.cc", "views/apps/app_dialog/app_dialog_view.h", @@ -61,7 +61,7 @@ index 60994f80e8e51..262869e33aa30 100644 "views/apps/app_info_dialog/app_info_dialog_container.cc", "views/apps/app_info_dialog/app_info_dialog_container.h", "views/apps/app_info_dialog/app_info_dialog_views.cc", -@@ -5915,6 +5921,7 @@ static_library("ui") { +@@ -5990,6 +5996,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -70,10 +70,10 @@ index 60994f80e8e51..262869e33aa30 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index f1e679d2db0f0..9ad5aaf3a4dfd 100644 +index 0fcb0295dec5d..134b0b2ccc61c 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -263,6 +263,25 @@ +@@ -264,6 +264,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -99,7 +99,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -510,6 +529,13 @@ Browser::Browser(const CreateParams& params) +@@ -511,6 +530,13 @@ Browser::Browser(const CreateParams& params) tab_strip_model_->AddObserver(this); @@ -113,7 +113,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 location_bar_model_ = std::make_unique( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -649,6 +675,12 @@ Browser::~Browser() { +@@ -650,6 +676,12 @@ Browser::~Browser() { // away so they don't try and call back to us. if (select_file_dialog_.get()) select_file_dialog_->ListenerDestroyed(); @@ -126,7 +126,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 } /////////////////////////////////////////////////////////////////////////////// -@@ -1358,6 +1390,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1380,6 +1412,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -141,7 +141,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1365,8 +1405,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1387,8 +1427,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -162,7 +162,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1569,6 +1619,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1591,6 +1641,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -177,7 +177,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1726,6 +1784,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1748,6 +1806,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -186,7 +186,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1754,6 +1814,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1776,6 +1836,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -195,7 +195,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 if (!GetStatusBubble()) return; -@@ -1761,6 +1823,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1783,6 +1845,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -213,7 +213,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1785,6 +1858,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1807,6 +1880,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -233,7 +233,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1877,6 +1963,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1899,6 +1985,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -244,7 +244,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1988,11 +2078,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -2010,11 +2100,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -260,7 +260,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2194,6 +2288,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2204,6 +2298,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -276,7 +276,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2734,13 +2837,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2744,13 +2847,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -298,7 +298,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2874,6 +2984,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2884,6 +2994,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); web_contents_collection_.StopObserving(web_contents); } @@ -308,7 +308,7 @@ index f1e679d2db0f0..9ad5aaf3a4dfd 100644 void Browser::TabDetachedAtImpl(content::WebContents* contents, diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index 83b8260beb59d..480bf6df8f2e5 100644 +index 23a838ba30c68..52601ebdcc9bd 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -22,6 +22,7 @@ @@ -389,7 +389,7 @@ index 83b8260beb59d..480bf6df8f2e5 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1256,6 +1287,8 @@ class Browser : public TabStripModelObserver, +@@ -1264,6 +1295,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -398,7 +398,7 @@ index 83b8260beb59d..480bf6df8f2e5 100644 CreationSource creation_source_ = CreationSource::kUnknown; UnloadController unload_controller_; -@@ -1320,6 +1353,10 @@ class Browser : public TabStripModelObserver, +@@ -1328,6 +1361,10 @@ class Browser : public TabStripModelObserver, extension_browser_window_helper_; #endif @@ -410,10 +410,10 @@ index 83b8260beb59d..480bf6df8f2e5 100644 // The opener browser of the document picture-in-picture browser. Null if the diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index c4a4bb8af94b0..37d64039e7eed 100644 +index 9ee8a99f70bed..a2e198d987498 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -553,6 +553,13 @@ std::unique_ptr CreateTargetContents( +@@ -554,6 +554,13 @@ std::unique_ptr CreateTargetContents( std::unique_ptr target_contents = WebContents::Create(create_params); diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 2abc0ffc0..5ae8f1b29 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index 9a405503f15bd..7edad568f1bb4 100644 +index 5e4d0b203491b..dc5c8fb36d592 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -9,6 +9,7 @@ @@ -7,8 +7,8 @@ index 9a405503f15bd..7edad568f1bb4 100644 #include "build/build_config.h" #include "build/buildflag.h" +#include "cef/libcef/features/runtime.h" - #include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h" - #include "chrome/browser/permissions/last_tab_standing_tracker_factory.h" + #include "chrome/browser/content_settings/one_time_permission_provider.h" + #include "chrome/browser/permissions/one_time_permissions_tracker_factory.h" #include "chrome/browser/profiles/off_the_record_profile_impl.h" @@ -23,6 +24,10 @@ #include "extensions/buildflags/buildflags.h" @@ -21,8 +21,8 @@ index 9a405503f15bd..7edad568f1bb4 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/trace_event/trace_event.h" #include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h" -@@ -62,7 +67,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() - DependsOn(TemplateURLServiceFactory::GetInstance()); +@@ -63,7 +68,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() + DependsOn(OneTimePermissionsTrackerFactory::GetInstance()); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_CEF) @@ -35,8 +35,8 @@ index 9a405503f15bd..7edad568f1bb4 100644 #endif // Used by way of ShouldRestoreOldSessionCookies(). #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -136,6 +147,9 @@ scoped_refptr - } +@@ -127,6 +138,9 @@ scoped_refptr + std::move(allowlist_provider)); #if BUILDFLAG(ENABLE_EXTENSIONS) +#if BUILDFLAG(ENABLE_CEF) @@ -45,7 +45,7 @@ index 9a405503f15bd..7edad568f1bb4 100644 // These must be registered before before the HostSettings are passed over to // the IOThread. Simplest to do this on construction. settings_map->RegisterProvider( -@@ -148,6 +162,9 @@ scoped_refptr +@@ -139,6 +153,9 @@ scoped_refptr // the case where profile->IsOffTheRecord() is true? And what is the // interaction with profile->IsGuestSession()? false)); diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index abce33459..4d6f26e67 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 56f143c94da9c..8e6b18a9b92eb 100644 +index 15b3d1c767883..717ff131cadb5 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -316,6 +316,13 @@ base::OnceCallback* GetMenuShownCallback() { +@@ -319,6 +319,13 @@ base::OnceCallback* GetMenuShownCallback() { return callback.get(); } @@ -16,7 +16,7 @@ index 56f143c94da9c..8e6b18a9b92eb 100644 enum class UmaEnumIdLookupType { GeneralEnumId, ContextSpecificEnumId, -@@ -562,6 +569,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { +@@ -565,6 +572,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) return 1; @@ -27,7 +27,7 @@ index 56f143c94da9c..8e6b18a9b92eb 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -775,6 +786,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -785,6 +796,14 @@ RenderViewContextMenu::RenderViewContextMenu( #if BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) pdf_ocr_submenu_model_ = std::make_unique(this); #endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE) @@ -42,7 +42,7 @@ index 56f143c94da9c..8e6b18a9b92eb 100644 } RenderViewContextMenu::~RenderViewContextMenu() = default; -@@ -1190,6 +1209,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1202,6 +1221,12 @@ void RenderViewContextMenu::InitMenu() { // menu, meaning that each menu item added/removed in this function will cause // it to visibly jump on the screen (see b/173569669). AppendQuickAnswersItems(); @@ -55,7 +55,7 @@ index 56f143c94da9c..8e6b18a9b92eb 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3148,6 +3173,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3164,6 +3189,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,7 +69,7 @@ index 56f143c94da9c..8e6b18a9b92eb 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 4b6e2d55455c3..e25577396d5c1 100644 +index b0505bb7375ee..85b9a58b4655f 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -142,6 +142,12 @@ class RenderViewContextMenu @@ -85,7 +85,7 @@ index 4b6e2d55455c3..e25577396d5c1 100644 protected: Profile* GetProfile() const; -@@ -389,6 +395,9 @@ class RenderViewContextMenu +@@ -394,6 +400,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index 48facf181..631142584 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc -index 0ff5db3d439bc..586a20ddc8a89 100644 +index 1ee6c28cd47bc..62fd628dffd07 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -20,6 +20,7 @@ @@ -10,7 +10,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/enterprise/connectors/common.h" #include "chrome/browser/platform_util.h" -@@ -254,6 +255,13 @@ void FileSelectHelper::OnListFile( +@@ -250,6 +251,13 @@ void FileSelectHelper::OnListFile( void FileSelectHelper::LaunchConfirmationDialog( const base::FilePath& path, std::vector selected_files) { @@ -24,7 +24,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 ShowFolderUploadConfirmationDialog( path, base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this), -@@ -338,6 +346,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded( +@@ -334,6 +342,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded( if (AbortIfWebContentsDestroyed()) return; @@ -37,7 +37,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 #if BUILDFLAG(FULL_SAFE_BROWSING) enterprise_connectors::ContentAnalysisDelegate::Data data; if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled( -@@ -526,7 +540,8 @@ bool FileSelectHelper::IsDirectoryEnumerationStartedForTesting() { +@@ -522,7 +536,8 @@ bool FileSelectHelper::IsDirectoryEnumerationStartedForTesting() { std::unique_ptr FileSelectHelper::GetFileTypesFromAcceptType( @@ -47,7 +47,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 auto base_file_type = std::make_unique(); if (accept_types.empty()) return base_file_type; -@@ -539,17 +554,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -535,17 +550,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector* extensions = &file_type->extensions.back(); @@ -73,7 +73,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 } else { if (!base::IsStringASCII(accept_type)) continue; -@@ -560,10 +582,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -556,10 +578,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( description_id = IDS_AUDIO_FILES; else if (ascii_type == "video/*") description_id = IDS_VIDEO_FILES; @@ -94,7 +94,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -588,6 +618,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -584,6 +614,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( l10n_util::GetStringUTF16(description_id)); } @@ -110,7 +110,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 return file_type; } -@@ -595,7 +634,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -591,7 +630,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -120,7 +120,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -614,6 +654,7 @@ void FileSelectHelper::RunFileChooser( +@@ -610,6 +650,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -128,7 +128,7 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 file_select_helper->RunFileChooser(render_frame_host, std::move(listener), params.Clone()); } -@@ -667,7 +708,8 @@ void FileSelectHelper::RunFileChooser( +@@ -661,7 +702,8 @@ void FileSelectHelper::RunFileChooser( } void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { @@ -139,10 +139,10 @@ index 0ff5db3d439bc..586a20ddc8a89 100644 params->need_local_path ? ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH : ui::SelectFileDialog::FileTypeInfo::ANY_PATH; diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h -index d4b49202f61ce..4813ec70d9b1b 100644 +index a900e41ccf973..4354a90469fd9 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h -@@ -65,7 +65,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -61,7 +61,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< static void RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -152,7 +152,7 @@ index d4b49202f61ce..4813ec70d9b1b 100644 // Enumerates all the files in directory. static void EnumerateDirectory( -@@ -296,7 +297,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -288,7 +289,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< // |accept_types| contains only valid lowercased MIME types or file extensions // beginning with a period (.). static std::unique_ptr @@ -162,7 +162,7 @@ index d4b49202f61ce..4813ec70d9b1b 100644 // Check the accept type is valid. It is expected to be all lower case with // no whitespace. -@@ -361,6 +363,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -349,6 +351,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< // Set to false in unit tests since there is no WebContents. bool abort_on_missing_web_contents_in_tests_ = true; diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index b5c3d8dfc..2301a556a 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc -index d62e9fa67d534..e7bdaeb7b5e19 100644 +index b169371e4d42f..509e4bda85b47 100644 --- chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc +++ chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc -@@ -97,7 +97,7 @@ javascript_dialogs::AppModalDialogView* CreateViewsJavaScriptDialog( +@@ -100,7 +100,7 @@ javascript_dialogs::AppModalDialogView* CreateViewsJavaScriptDialog( gfx::NativeWindow parent_window = controller->web_contents()->GetTopLevelNativeWindow(); #if defined(USE_AURA) diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 7ae2160f7..710ba4531 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc -index cc2cce154cbbf..4298bd8ab3f1c 100644 +index 76cfedc631be6..7b04f6ef7353b 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -13,6 +13,7 @@ @@ -21,7 +21,7 @@ index cc2cce154cbbf..4298bd8ab3f1c 100644 #if BUILDFLAG(ENABLE_PDF) #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" #include "components/pdf/browser/pdf_web_contents_helper.h" -@@ -306,6 +311,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( +@@ -307,6 +312,11 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( std::unique_ptr ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( MimeHandlerViewGuest* guest) const { diff --git a/patch/patches/chrome_browser_frame_mac.patch b/patch/patches/chrome_browser_frame_mac.patch index a157d6587..17efbc563 100644 --- a/patch/patches/chrome_browser_frame_mac.patch +++ b/patch/patches/chrome_browser_frame_mac.patch @@ -33,10 +33,10 @@ index ab1d8fd9bfa84..77f65b44e591a 100644 ~BrowserFrameMac() override; diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm -index 95c64d44044a3..18b017166320f 100644 +index 2290270c3e159..a4a0f4b3c5a33 100644 --- chrome/browser/ui/views/frame/browser_frame_mac.mm +++ chrome/browser/ui/views/frame/browser_frame_mac.mm -@@ -176,7 +176,14 @@ - (NSTouchBar*)makeTouchBar { +@@ -181,7 +181,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() { void BrowserFrameMac::ValidateUserInterfaceItem( int32_t tag, remote_cocoa::mojom::ValidateUserInterfaceItemResult* result) { @@ -52,7 +52,7 @@ index 95c64d44044a3..18b017166320f 100644 if (!chrome::SupportsCommand(browser, tag)) { result->enable = false; return; -@@ -304,8 +311,16 @@ - (NSTouchBar*)makeTouchBar { +@@ -309,8 +316,16 @@ bool BrowserFrameMac::WillExecuteCommand( int32_t command, WindowOpenDisposition window_open_disposition, bool is_before_first_responder) { @@ -70,7 +70,7 @@ index 95c64d44044a3..18b017166320f 100644 if (is_before_first_responder) { // The specification for this private extensions API is incredibly vague. // For now, we avoid triggering chrome commands prior to giving the -@@ -336,11 +351,20 @@ - (NSTouchBar*)makeTouchBar { +@@ -341,11 +356,20 @@ bool BrowserFrameMac::ExecuteCommand( int32_t command, WindowOpenDisposition window_open_disposition, bool is_before_first_responder) { diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index 911af026c..fae8f0b63 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -44,7 +44,7 @@ index 16107572d4d0d..409e9ea870482 100644 base::FeatureList::IsEnabled( features::kPeriodicSyncPermissionForDefaultSearchEngine) && diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc -index 1a2fe8936295a..033ecd276cf45 100644 +index be69eb7fb1d65..0b92de1b0e328 100644 --- chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc @@ -14,6 +14,7 @@ @@ -65,7 +65,7 @@ index 1a2fe8936295a..033ecd276cf45 100644 return site_engagement::SiteEngagementService::Get( Profile::FromBrowserContext(browser_context)) ->GetScore(origin); -@@ -321,8 +325,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( +@@ -323,8 +327,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( std::make_unique()); selectors.emplace_back(std::make_unique( Profile::FromBrowserContext(browser_context))); diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 1c5e42ab4..cb870e307 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc -index 43431d7a42fe5..a440d7732f7dd 100644 +index ec0e1b7be7209..ea85965f1f2c9 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -659,7 +659,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -664,7 +664,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,7 +14,7 @@ index 43431d7a42fe5..a440d7732f7dd 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index d035eb9f2bea7..0ff6726604022 100644 +index 6cffe941b26f9..3e6223ab0d423 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -84,6 +84,7 @@ base::LazyInstance>::Leaky @@ -35,7 +35,7 @@ index d035eb9f2bea7..0ff6726604022 100644 base::CompareCase::SENSITIVE) || base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, @@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( - base::GUID::GenerateRandomV4().AsLowercaseString().c_str())); + base::Uuid::GenerateRandomV4().AsLowercaseString().c_str())); } +// static @@ -52,10 +52,10 @@ index d035eb9f2bea7..0ff6726604022 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index 1e6a22d95a53f..6ec4182bfc5e7 100644 +index 5d6a5b65698c0..964541b2343de 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -99,6 +99,10 @@ class Profile : public content::BrowserContext { +@@ -100,6 +100,10 @@ class Profile : public content::BrowserContext { // be applicable to run. Please see crbug.com/1098697#c3 for more details. static OTRProfileID CreateUnique(const std::string& profile_id_prefix); @@ -66,7 +66,7 @@ index 1e6a22d95a53f..6ec4182bfc5e7 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -494,6 +498,8 @@ class Profile : public content::BrowserContext { +@@ -507,6 +511,8 @@ class Profile : public content::BrowserContext { base::WeakPtr GetWeakPtr(); @@ -75,7 +75,7 @@ index 1e6a22d95a53f..6ec4182bfc5e7 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -505,7 +511,6 @@ class Profile : public content::BrowserContext { +@@ -518,7 +524,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -84,10 +84,10 @@ index 1e6a22d95a53f..6ec4182bfc5e7 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 3ee6b902b6bc2..6416146fba8af 100644 +index 57d728da590da..fc57b690011d6 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1015,7 +1015,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1036,7 +1036,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -99,10 +99,10 @@ index 3ee6b902b6bc2..6416146fba8af 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index eab4bc302ef7d..9ed7d61345263 100644 +index 2b0e6098334bf..9d7fdfc8401aa 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -392,7 +392,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -395,7 +395,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif @@ -112,7 +112,7 @@ index eab4bc302ef7d..9ed7d61345263 100644 zombie_metrics_timer_.Start(FROM_HERE, base::Minutes(30), this, diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h -index c3626f110e6fb..c7d70d32d8f37 100644 +index 60c9fd19fe15b..2a3e317d9c240 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h @@ -130,7 +130,7 @@ class ProfileManager : public Profile::Delegate { @@ -124,7 +124,7 @@ index c3626f110e6fb..c7d70d32d8f37 100644 // Returns regular or off-the-record profile given its profile key. static Profile* GetProfileFromProfileKey(ProfileKey* profile_key); -@@ -171,7 +171,7 @@ class ProfileManager : public Profile::Delegate { +@@ -174,7 +174,7 @@ class ProfileManager : public Profile::Delegate { // Returns true if the profile pointer is known to point to an existing // profile. @@ -134,21 +134,21 @@ index c3626f110e6fb..c7d70d32d8f37 100644 // Returns the directory where the first created profile is stored, // relative to the user data directory currently in use. diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc -index b3cf2ad8d367b..431b44e39de40 100644 +index 884e79cd54e0d..ed47d9a7d1bb4 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc -@@ -8,6 +8,7 @@ - +@@ -9,6 +9,7 @@ #include "base/functional/bind.h" + #include "base/functional/callback.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/content_settings/content_settings_manager_delegate.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/profiles/profile.h" -@@ -36,8 +37,10 @@ RendererUpdater::RendererUpdater(Profile* profile) - : profile_(profile), - is_off_the_record_(profile_->IsOffTheRecord()), - original_profile_(profile->GetOriginalProfile()) { +@@ -49,8 +50,10 @@ RendererUpdater::RendererUpdater(Profile* profile) + BoundSessionCookieRefreshServiceFactory::GetForProfile(profile)) + #endif + { + if (!cef::IsAlloyRuntimeEnabled()) { identity_manager_observation_.Observe( IdentityManagerFactory::GetForProfile(original_profile_)); diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 8af7b9e56..14e991eca 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 5e6f67286ba3d..65411bd132294 100644 +index aaa2a770e4c9f..8d524c456d9dc 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn @@ -32,6 +32,7 @@ static_library("safe_browsing") { diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 6562d742c..04925940c 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index c9a644a755c12..bf4ea541fb359 100644 +index a23a2830b374c..c6822853a6c3d 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc @@ -30,6 +30,7 @@ @@ -42,7 +42,7 @@ index c9a644a755c12..bf4ea541fb359 100644 theme_syncable_service_ = std::make_unique(profile_, this); diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc -index e3a7101326eee..c6592c0d5a1ba 100644 +index 622dcc82663c5..7fbe022c1f78b 100644 --- chrome/browser/themes/theme_service_factory.cc +++ chrome/browser/themes/theme_service_factory.cc @@ -7,6 +7,7 @@ diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 16d2fd955..8c5382d6b 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index cb9253cf1ab6a..b46c6b92a30ce 100644 +index 95cd290b601a3..89e8ab892e5ea 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc @@ -140,6 +140,10 @@ bool IsPluginLoadingAccessibleResourceInWebView( @@ -42,10 +42,10 @@ index 8b3f569882aeb..afc8007a6228b 100644 const extensions::Extension* extension = registry->enabled_extensions().GetByID(extension_id); diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 846a2ee1b05d0..b77a01012bbbb 100644 +index c5c1deb4a388c..6606f5bd417ca 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -1009,6 +1009,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -985,6 +985,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -53,7 +53,7 @@ index 846a2ee1b05d0..b77a01012bbbb 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1176,7 +1177,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1152,7 +1153,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -63,7 +63,7 @@ index 846a2ee1b05d0..b77a01012bbbb 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1185,7 +1187,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1161,7 +1163,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -73,7 +73,7 @@ index 846a2ee1b05d0..b77a01012bbbb 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1195,7 +1198,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1171,7 +1174,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index f7b1ddb76..4bcee690b 100644 --- a/patch/patches/chrome_renderer.patch +++ b/patch/patches/chrome_renderer.patch @@ -1,5 +1,5 @@ diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn -index 0a535c03b96b0..3787cbc8dc8d0 100644 +index a78e96688e039..7b56e77529899 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -10,7 +10,7 @@ index 0a535c03b96b0..3787cbc8dc8d0 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -122,6 +123,7 @@ static_library("renderer") { +@@ -125,6 +126,7 @@ static_library("renderer") { deps = [ "//base/allocator:buildflags", "//build:chromeos_buildflags", @@ -18,7 +18,7 @@ index 0a535c03b96b0..3787cbc8dc8d0 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -220,6 +222,10 @@ static_library("renderer") { +@@ -223,6 +225,10 @@ static_library("renderer") { configs += [ "//build/config/compiler:wexit_time_destructors" ] diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 5ea89c4fd..9c0974e7a 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 d4b31d11a51c4..534973146e405 100644 +index fb5093709a104..2a69318c3e5e2 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -39,6 +39,7 @@ @@ -7,10 +7,10 @@ index d4b31d11a51c4..534973146e405 100644 #include "build/build_config.h" #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" + #include "chrome/browser/buildflags.h" #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" - #include "chrome/browser/defaults.h" -@@ -498,6 +499,8 @@ struct MainFunction { +@@ -502,6 +503,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index d4b31d11a51c4..534973146e405 100644 #if BUILDFLAG(IS_WIN) // Reach out to chrome_elf for the truth on the user data directory. // Note that in tests, this links to chrome_elf_test_stubs. -@@ -647,6 +650,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -651,6 +654,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -30,7 +30,7 @@ index d4b31d11a51c4..534973146e405 100644 absl::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DCHECK(base::ThreadPoolInstance::Get()); -@@ -855,7 +862,8 @@ absl::optional ChromeMainDelegate::PostEarlyInitialization( +@@ -867,7 +874,8 @@ absl::optional ChromeMainDelegate::PostEarlyInitialization( if (base::FeatureList::IsEnabled( features::kWriteBasicSystemProfileToPersistentHistogramsFile)) { @@ -40,7 +40,7 @@ index d4b31d11a51c4..534973146e405 100644 #if BUILDFLAG(IS_ANDROID) record = base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions); -@@ -1280,6 +1288,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1294,6 +1302,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -48,7 +48,7 @@ index d4b31d11a51c4..534973146e405 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1290,6 +1299,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1304,6 +1313,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -56,7 +56,7 @@ index d4b31d11a51c4..534973146e405 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1484,6 +1494,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1498,6 +1508,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -64,7 +64,7 @@ index d4b31d11a51c4..534973146e405 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1527,6 +1538,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1541,6 +1552,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -72,7 +72,7 @@ index d4b31d11a51c4..534973146e405 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1650,6 +1662,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1664,6 +1676,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -80,7 +80,7 @@ index d4b31d11a51c4..534973146e405 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 = -@@ -1672,6 +1685,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1686,6 +1699,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -88,7 +88,7 @@ index d4b31d11a51c4..534973146e405 100644 } #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) -@@ -1763,11 +1777,12 @@ void ChromeMainDelegate::InitializeMemorySystem() { +@@ -1783,6 +1797,7 @@ void ChromeMainDelegate::InitializeMemorySystem() { channel == version_info::Channel::DEV); const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process; @@ -96,9 +96,10 @@ index d4b31d11a51c4..534973146e405 100644 memory_system::Initializer() .SetGwpAsanParameters(gwp_asan_boost_sampling, process_type) .SetProfilingClientParameters(channel, - GetProfileParamsProcess(*command_line)) - .SetDispatcherParameters(memory_system::DispatcherParameters:: - PoissonAllocationSamplerInclusion::kEnforce) +@@ -1791,5 +1806,5 @@ void ChromeMainDelegate::InitializeMemorySystem() { + PoissonAllocationSamplerInclusion::kEnforce, + memory_system::DispatcherParameters:: + AllocationTraceRecorderInclusion::kDynamic) - .Initialize(memory_system_); + .Initialize(*memory_system_); } @@ -125,7 +126,7 @@ index dad9f981d2e01..29baaf84465a0 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) std::unique_ptr lacros_service_; diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index b74b87e496946..89cdeef75fea0 100644 +index b759be27d35ab..75d3c03b748a2 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -51,6 +51,7 @@ @@ -136,7 +137,7 @@ index b74b87e496946..89cdeef75fea0 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1478,7 +1479,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1499,7 +1500,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH) @@ -145,7 +146,7 @@ index b74b87e496946..89cdeef75fea0 100644 // Handle special early return paths (which couldn't be processed even earlier // as they require the process singleton to be held) first. -@@ -1525,7 +1526,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1546,7 +1547,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { return content::RESULT_CODE_NORMAL_EXIT; #endif // BUILDFLAG(IS_WIN) } @@ -154,7 +155,7 @@ index b74b87e496946..89cdeef75fea0 100644 #if BUILDFLAG(IS_WIN) // Check if there is any machine level Chrome installed on the current -@@ -1580,12 +1581,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1601,12 +1602,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -169,7 +170,7 @@ index b74b87e496946..89cdeef75fea0 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1734,6 +1737,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1755,6 +1758,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { } #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -180,7 +181,7 @@ index b74b87e496946..89cdeef75fea0 100644 // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. -@@ -1772,11 +1779,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1793,11 +1800,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -234,10 +235,10 @@ index d495e1a903fd8..31cf6632e831c 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index cfbed0fd8183a..63529099116e4 100644 +index cbaaff6894e47..db95ce1bc3a0d 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -37,6 +37,7 @@ +@@ -40,6 +40,7 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -245,17 +246,17 @@ index cfbed0fd8183a..63529099116e4 100644 #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1523,6 +1524,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { +@@ -1557,6 +1558,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() { } ChromeContentBrowserClient::ChromeContentBrowserClient() { + keepalive_timer_.reset(new base::OneShotTimer()); + #if BUILDFLAG(ENABLE_PLUGINS) - extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); - #endif -@@ -1548,6 +1551,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { - extra_parts_.clear(); + extra_parts_.push_back( + std::make_unique()); +@@ -1589,6 +1592,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { + } } +void ChromeContentBrowserClient::CleanupOnUIThread() { @@ -266,7 +267,7 @@ index cfbed0fd8183a..63529099116e4 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -4342,9 +4350,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4386,9 +4394,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -278,7 +279,7 @@ index cfbed0fd8183a..63529099116e4 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -6240,7 +6250,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6307,7 +6317,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( #endif } @@ -287,7 +288,7 @@ index cfbed0fd8183a..63529099116e4 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -6258,6 +6268,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6325,6 +6335,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -296,7 +297,7 @@ index cfbed0fd8183a..63529099116e4 100644 } std::vector -@@ -7194,10 +7206,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -7314,10 +7326,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -309,7 +310,7 @@ index cfbed0fd8183a..63529099116e4 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -7216,7 +7228,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7336,7 +7348,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -319,7 +320,7 @@ index cfbed0fd8183a..63529099116e4 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -7352,7 +7365,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -7472,7 +7485,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -329,10 +330,10 @@ index cfbed0fd8183a..63529099116e4 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 d2337ac7d7fbf..af49a2589cabf 100644 +index 30ee8cf906f70..09e4fa568c05a 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -133,6 +133,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -134,6 +134,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -341,7 +342,7 @@ index d2337ac7d7fbf..af49a2589cabf 100644 // TODO(https://crbug.com/787567): This file is about calls from content/ out // to chrome/ to get values or notify about events, but both of these // functions are from chrome/ to chrome/ and don't involve content/ at all. -@@ -616,7 +618,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -618,7 +620,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -350,7 +351,7 @@ index d2337ac7d7fbf..af49a2589cabf 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -989,7 +991,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -998,7 +1000,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -360,10 +361,10 @@ index d2337ac7d7fbf..af49a2589cabf 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index bc342655b8367..bc7cbc93dac17 100644 +index d11c0f1334924..47f8edcf62b3a 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc -@@ -12,6 +12,7 @@ +@@ -13,6 +13,7 @@ #include "build/build_config.h" #include "build/chromecast_buildflags.h" #include "build/chromeos_buildflags.h" @@ -382,7 +383,7 @@ index bc342655b8367..bc7cbc93dac17 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1365,6 +1370,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1369,6 +1374,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -394,7 +395,7 @@ index bc342655b8367..bc7cbc93dac17 100644 } // Register prefs applicable to all profiles. -@@ -1759,6 +1769,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1766,6 +1776,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 9f6fb6e63..8428b4c81 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 dc085f13cb279..bad8857a44807 100644 +index 2a14f1b7c2f51..e679d7a24783b 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -389,6 +389,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -394,6 +394,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 dc085f13cb279..bad8857a44807 100644 return false; } -@@ -405,6 +406,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -410,6 +411,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -24,7 +24,7 @@ index dc085f13cb279..bad8857a44807 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1050,11 +1058,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1089,11 +1097,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -41,10 +41,10 @@ index dc085f13cb279..bad8857a44807 100644 bool BrowserCommandController::IsWebAppOrCustomTab() const { diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc -index f505dbc9aa7b9..de2fa3e6732f5 100644 +index 3aa4da01852a1..59544aa46dc82 100644 --- chrome/browser/ui/toolbar/app_menu_model.cc +++ chrome/browser/ui/toolbar/app_menu_model.cc -@@ -157,6 +157,57 @@ absl::optional GetInstallPWAAppMenuItemName(Browser* browser) { +@@ -169,6 +169,57 @@ absl::optional GetInstallPWAAppMenuItemName(Browser* browser) { ui::EscapeMenuLabelAmpersands(app_name)); } @@ -102,7 +102,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644 } // namespace //////////////////////////////////////////////////////////////////////////////// -@@ -811,7 +862,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { +@@ -901,7 +952,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const { return false; } @@ -111,7 +111,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644 GlobalError* error = GlobalErrorServiceFactory::GetForProfile(browser_->profile()) ->GetGlobalErrorByMenuItemCommandID(command_id); -@@ -826,7 +877,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { +@@ -916,7 +967,7 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const { } } @@ -120,7 +120,7 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644 switch (command_id) { case IDC_PIN_TO_START_SCREEN: return false; -@@ -849,6 +900,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const { +@@ -939,6 +990,34 @@ bool AppMenuModel::IsCommandIdVisible(int command_id) const { } } @@ -155,44 +155,47 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644 bool AppMenuModel::IsCommandIdAlerted(int command_id) const { if ((command_id == IDC_RECENT_TABS_MENU) || (command_id == AppMenuModel::kMinRecentTabsCommandId)) { -@@ -965,9 +1044,13 @@ void AppMenuModel::Build() { - kExtensionsMenuItem); +@@ -1085,11 +1164,15 @@ void AppMenuModel::Build() { + } } -- AddSeparator(ui::LOWER_SEPARATOR); +- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR +- : ui::LOWER_SEPARATOR); - CreateZoomMenu(); -- AddSeparator(ui::UPPER_SEPARATOR); +- AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR +- : ui::UPPER_SEPARATOR); + if (IsCommandIdVisible(IDC_ZOOM_MENU)) { -+ AddSeparator(ui::LOWER_SEPARATOR); ++ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR ++ : ui::LOWER_SEPARATOR); + CreateZoomMenu(); -+ AddSeparator(ui::UPPER_SEPARATOR); ++ AddSeparator(features::IsChromeRefresh2023() ? ui::NORMAL_SEPARATOR ++ : ui::UPPER_SEPARATOR); + } else { + AddSeparator(ui::NORMAL_SEPARATOR); + } AddItemWithStringId(IDC_PRINT, IDS_PRINT); -@@ -1031,9 +1114,14 @@ void AppMenuModel::Build() { - sub_menus_.back().get()); - SetElementIdentifierAt(GetIndexOfCommandId(IDC_MORE_TOOLS_MENU).value(), +@@ -1178,9 +1261,13 @@ void AppMenuModel::Build() { kMoreToolsMenuItem); -- AddSeparator(ui::LOWER_SEPARATOR); -- CreateCutCopyPasteMenu(); -- AddSeparator(ui::UPPER_SEPARATOR); -+ -+ if (IsCommandIdVisible(IDC_EDIT_MENU)) { -+ AddSeparator(ui::LOWER_SEPARATOR); -+ CreateCutCopyPasteMenu(); -+ AddSeparator(ui::UPPER_SEPARATOR); -+ } else { -+ AddSeparator(ui::NORMAL_SEPARATOR); -+ } - AddItemWithStringId(IDC_OPTIONS, IDS_SETTINGS); - // The help submenu is only displayed on official Chrome builds. As the -@@ -1070,6 +1158,11 @@ void AppMenuModel::Build() { + if (!features::IsChromeRefresh2023()) { +- AddSeparator(ui::LOWER_SEPARATOR); +- CreateCutCopyPasteMenu(); +- AddSeparator(ui::UPPER_SEPARATOR); ++ if (IsCommandIdVisible(IDC_EDIT_MENU)) { ++ AddSeparator(ui::LOWER_SEPARATOR); ++ CreateCutCopyPasteMenu(); ++ AddSeparator(ui::UPPER_SEPARATOR); ++ } else { ++ AddSeparator(ui::NORMAL_SEPARATOR); ++ } + } + + if (!features::IsChromeRefresh2023()) { +@@ -1265,6 +1352,11 @@ void AppMenuModel::Build() { + set_icon(IDC_EXIT, kExitMenuIcon); } - #endif // !BUILDFLAG(IS_CHROMEOS_ASH) +#if BUILDFLAG(ENABLE_CEF) + FilterMenuModel(this, base::BindRepeating(&AppMenuModel::IsCommandIdVisible, @@ -203,10 +206,10 @@ index f505dbc9aa7b9..de2fa3e6732f5 100644 } diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h -index 26545b0cee2c1..118cf0df456d6 100644 +index 55fb00dbc746a..396eac70f92fd 100644 --- chrome/browser/ui/toolbar/app_menu_model.h +++ chrome/browser/ui/toolbar/app_menu_model.h -@@ -230,6 +230,9 @@ class AppMenuModel : public ui::SimpleMenuModel, +@@ -254,6 +254,9 @@ class AppMenuModel : public ui::SimpleMenuModel, // Appends a zoom menu (without separators). void CreateZoomMenu(); @@ -214,10 +217,10 @@ index 26545b0cee2c1..118cf0df456d6 100644 + bool IsCommandIdVisibleInternal(int command_id) const; + private: - friend class ::MockAppMenuModel; - + // 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 8ac822b917399..7a7e6fd15bdd9 100644 +index 59024587ef6b7..0c30aa71768cf 100644 --- chrome/browser/ui/views/find_bar_host.cc +++ chrome/browser/ui/views/find_bar_host.cc @@ -412,6 +412,12 @@ void FindBarHost::GetWidgetBounds(gfx::Rect* bounds) { @@ -234,7 +237,7 @@ index 8ac822b917399..7a7e6fd15bdd9 100644 void FindBarHost::RegisterAccelerators() { diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc -index 8da09b8c01c3f..d4f2a855bb8e8 100644 +index 618e1b254389e..0b5a25ffe96c3 100644 --- chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc @@ -71,15 +71,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) { @@ -263,7 +266,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 } BrowserFrame::~BrowserFrame() {} -@@ -170,6 +178,12 @@ void BrowserFrame::LayoutWebAppWindowTitle( +@@ -174,6 +182,12 @@ void BrowserFrame::LayoutWebAppWindowTitle( } int BrowserFrame::GetTopInset() const { @@ -276,7 +279,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 return browser_frame_view_->GetTopInset(false); } -@@ -186,6 +200,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { +@@ -190,6 +204,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { } bool BrowserFrame::UseCustomFrame() const { @@ -285,7 +288,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 return native_browser_frame_->UseCustomFrame(); } -@@ -199,20 +215,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { +@@ -203,20 +219,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds, ui::WindowShowState* show_state) const { @@ -316,7 +319,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 browser_frame_view_->OnBrowserViewInitViewsComplete(); } -@@ -274,7 +300,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { +@@ -278,7 +304,7 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { ui::ColorProviderManager::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() const { // Do not return any custom theme if the browser has to use the dark theme. @@ -325,7 +328,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 return nullptr; Browser* browser = browser_view_->browser(); -@@ -291,6 +317,8 @@ BrowserFrame::GetCustomTheme() const { +@@ -295,6 +321,8 @@ BrowserFrame::GetCustomTheme() const { } void BrowserFrame::OnNativeWidgetWorkspaceChanged() { @@ -334,7 +337,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -@@ -388,6 +416,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { +@@ -402,6 +430,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { auto key = Widget::GetColorProviderKey(); @@ -343,7 +346,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 key.frame_type = UseCustomFrame() ? ui::ColorProviderManager::FrameType::kChromium : ui::ColorProviderManager::FrameType::kNative; -@@ -397,6 +427,9 @@ ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { +@@ -411,6 +441,9 @@ ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { } absl::optional BrowserFrame::GetUserColor() const { @@ -353,7 +356,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // ChromeOS SystemWebApps use the OS theme all the time. if (ash::IsSystemWebApp(browser_view_->browser())) { -@@ -489,5 +522,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( +@@ -503,5 +536,7 @@ bool BrowserFrame::RegenerateFrameOnThemeChange( } bool BrowserFrame::ShouldUseDarkTheme() const { @@ -362,7 +365,7 @@ index 8da09b8c01c3f..d4f2a855bb8e8 100644 return browser_view_->browser()->profile()->IsIncognitoProfile(); } diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h -index d9fb9af4db3eb..4a809ee9962fd 100644 +index ea9371d731de0..9398b262c8d83 100644 --- chrome/browser/ui/views/frame/browser_frame.h +++ chrome/browser/ui/views/frame/browser_frame.h @@ -61,7 +61,9 @@ enum class TabDragKind { @@ -376,7 +379,7 @@ index d9fb9af4db3eb..4a809ee9962fd 100644 BrowserFrame(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete; diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index ff1d8ce809a68..a58efb5ca5b72 100644 +index 6f9c8b1d38430..7250c21e5e781 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc @@ -308,11 +308,10 @@ using content::NativeWebKeyboardEvent; @@ -444,7 +447,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1788,6 +1804,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1805,6 +1821,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -453,7 +456,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -2680,7 +2698,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { +@@ -2703,7 +2721,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { } DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { @@ -463,7 +466,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) return download_button->bubble_controller(); return nullptr; -@@ -3180,7 +3199,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3203,7 +3222,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -473,7 +476,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3733,8 +3753,10 @@ void BrowserView::Layout() { +@@ -3756,8 +3776,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -486,7 +489,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3800,6 +3822,11 @@ void BrowserView::AddedToWidget() { +@@ -3823,6 +3845,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -498,7 +501,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 toolbar_->Init(); // TODO(pbos): Investigate whether the side panels should be creatable when -@@ -3846,13 +3873,9 @@ void BrowserView::AddedToWidget() { +@@ -3869,13 +3896,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -514,7 +517,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4258,7 +4281,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4281,7 +4304,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -524,7 +527,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4606,6 +4630,8 @@ Profile* BrowserView::GetProfile() { +@@ -4637,6 +4661,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -533,7 +536,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4628,6 +4654,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4659,6 +4685,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -543,7 +546,7 @@ index ff1d8ce809a68..a58efb5ca5b72 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index a2693a336f830..74d7864151d62 100644 +index 3eb7c4bd065e1..05ef8266d8650 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h @@ -124,11 +124,16 @@ class BrowserView : public BrowserWindow, @@ -563,7 +566,7 @@ index a2693a336f830..74d7864151d62 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; paint_as_active_subscription_ = -@@ -773,6 +778,12 @@ class BrowserView : public BrowserWindow, +@@ -784,6 +789,12 @@ class BrowserView : public BrowserWindow, return web_app_frame_toolbar(); } @@ -639,10 +642,10 @@ index 0dcdb241b98f7..1117776bbc85c 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 f4a5c3ad8cc9c..4f9c1a111e7ce 100644 +index 73eff726270d3..be211a4a285be 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -565,33 +565,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -569,33 +569,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -691,10 +694,10 @@ index f4a5c3ad8cc9c..4f9c1a111e7ce 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index f2b0bd4099b4f..89b7520e359c3 100644 +index f650013dafc56..239f6551658d0 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -169,12 +169,13 @@ constexpr int kToolbarDividerCornerRadius = 1; +@@ -173,12 +173,13 @@ constexpr int kToolbarDividerSpacing = 9; //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -710,19 +713,10 @@ index f2b0bd4099b4f..89b7520e359c3 100644 SetID(VIEW_ID_TOOLBAR); if (display_mode_ == DisplayMode::NORMAL) { -@@ -205,7 +206,7 @@ void ToolbarView::Init() { - #endif - auto location_bar = std::make_unique( - browser_, browser_->profile(), browser_->command_controller(), this, -- display_mode_ != DisplayMode::NORMAL); -+ display_mode_ != DisplayMode::NORMAL && !browser_->toolbar_overridden()); - // Make sure the toolbar shows by default. - size_animation_.Reset(1); - -@@ -229,6 +230,19 @@ void ToolbarView::Init() { - browser, command, ui::DispositionFromEventFlags(event.flags())); - }; +@@ -200,6 +201,19 @@ ToolbarView::~ToolbarView() { + } + void ToolbarView::Init() { +#if BUILDFLAG(ENABLE_CEF) + using ToolbarButtonType = cef::BrowserDelegate::ToolbarButtonType; + auto button_visible = [this](ToolbarButtonType type) { @@ -736,10 +730,26 @@ index f2b0bd4099b4f..89b7520e359c3 100644 + #define BUTTON_VISIBLE(type) true +#endif + - std::unique_ptr back = std::make_unique( - BackForwardButton::Direction::kBack, - base::BindRepeating(callback, browser_, IDC_BACK), browser_); -@@ -258,8 +272,10 @@ void ToolbarView::Init() { + #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 +@@ -209,12 +223,13 @@ void ToolbarView::Init() { + #endif + auto location_bar = std::make_unique( + browser_, browser_->profile(), browser_->command_controller(), this, +- display_mode_ != DisplayMode::NORMAL); ++ display_mode_ != DisplayMode::NORMAL && !browser_->toolbar_overridden()); + // Make sure the toolbar shows by default. + size_animation_.Reset(1); + + std::unique_ptr download_button; +- if (download::IsDownloadBubbleEnabled(browser_->profile())) { ++ if (download::IsDownloadBubbleEnabled(browser_->profile()) && ++ BUTTON_VISIBLE(kDownload)) { + download_button = + std::make_unique(browser_view_); + } +@@ -295,8 +310,10 @@ void ToolbarView::Init() { } } std::unique_ptr cast; @@ -751,16 +761,7 @@ index f2b0bd4099b4f..89b7520e359c3 100644 std::unique_ptr media_button; if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) { -@@ -268,14 +284,16 @@ void ToolbarView::Init() { - } - - std::unique_ptr download_button; -- if (download::IsDownloadBubbleEnabled(browser_->profile())) { -+ if (download::IsDownloadBubbleEnabled(browser_->profile()) && -+ BUTTON_VISIBLE(kDownload)) { - download_button = - std::make_unique(browser_view_); - } +@@ -306,7 +323,8 @@ void ToolbarView::Init() { std::unique_ptr send_tab_to_self_button; @@ -770,15 +771,15 @@ index f2b0bd4099b4f..89b7520e359c3 100644 send_tab_to_self_button = std::make_unique( browser_view_); -@@ -283,7 +301,7 @@ void ToolbarView::Init() { +@@ -314,7 +332,7 @@ void ToolbarView::Init() { std::unique_ptr side_panel_button; std::unique_ptr side_panel_toolbar_container; - if (browser_view_->unified_side_panel()) { + if (browser_view_->unified_side_panel() && BUTTON_VISIBLE(kSidePanel)) { - if (base::FeatureList::IsEnabled(features::kSidePanelCompanion)) { + if (base::FeatureList::IsEnabled( + companion::features::kSidePanelCompanion)) { side_panel_toolbar_container = - std::make_unique(browser_view_); diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h index b3c20d4eaf0b3..62aef2fbc752d 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 760497739..67df0f806 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index 8ac089ad10e93..7205803b7156c 100644 +index 108bab494ea98..97ec37795ce8b 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h -@@ -102,7 +102,7 @@ bool ApplyUserAgentMetadataOverrides( +@@ -100,7 +100,7 @@ bool ApplyUserAgentMetadataOverrides( FrameTreeNode* frame_tree_node, absl::optional* override_out); @@ -68,7 +68,7 @@ index 97c7dc7c25000..63c42610bfd9c 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 64214a7885df2..0cbc7cfc6fe43 100644 +index 53cc163cde365..bf2aa2df19ded 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -35,6 +35,7 @@ component("controller") { diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 537ae1ee9..8ce97842b 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 3083bd8c2a8d6..1966cb5bee7e9 100644 +index f4f583be8fba9..a2ed253f3724d 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -588,7 +588,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -12,10 +12,10 @@ index 3083bd8c2a8d6..1966cb5bee7e9 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 fc00cee495e56..1979a0767edf1 100644 +index ddd5d5f136346..51c55f7108ddf 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -741,6 +741,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { +@@ -733,6 +733,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() { resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); @@ -34,10 +34,10 @@ index fc00cee495e56..1979a0767edf1 100644 factory = base::MakeRefCounted( std::move(loader_factory)); diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index cd77eefb577e6..6cff0a16f2eab 100644 +index f9c88663946a9..f9a78d6468364 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -968,7 +968,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -986,7 +986,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -46,7 +46,7 @@ index cd77eefb577e6..6cff0a16f2eab 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -977,6 +977,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -995,6 +995,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -55,10 +55,10 @@ index cd77eefb577e6..6cff0a16f2eab 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 5500a0cec01ec..ea2fa77649607 100644 +index a60c4455d1d7d..1f0f0db3d8cad 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -35,6 +35,7 @@ +@@ -37,6 +37,7 @@ #include "content/public/browser/login_delegate.h" #include "content/public/browser/mojo_binder_policy_map.h" #include "content/public/browser/storage_partition_config.h" @@ -66,7 +66,7 @@ index 5500a0cec01ec..ea2fa77649607 100644 #include "content/public/common/alternative_error_page_override_info.mojom-forward.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/window_container_type.mojom-forward.h" -@@ -1781,7 +1782,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1812,7 +1813,7 @@ class CONTENT_EXPORT ContentBrowserClient { // // If |relative_partition_path| is the empty string, it means this needs to // create the default NetworkContext for the BrowserContext. @@ -75,7 +75,7 @@ index 5500a0cec01ec..ea2fa77649607 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1984,6 +1985,19 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2020,6 +2021,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -95,7 +95,7 @@ index 5500a0cec01ec..ea2fa77649607 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. -@@ -2040,6 +2054,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2076,6 +2090,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -132,7 +132,7 @@ index 77f2c4fbf8c88..ddbacedde912a 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 3d3645fa25131..2b72ced4c62c4 100644 +index a614d8eb1ecd3..51986244b8960 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc @@ -624,6 +624,8 @@ void RenderThreadImpl::Init() { @@ -145,10 +145,10 @@ index 3d3645fa25131..2b72ced4c62c4 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 decef7b3d86c0..4efa8338dc3b5 100644 +index f84c233c3b069..a9fe097a3a438 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -969,6 +969,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -974,6 +974,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -165,10 +165,10 @@ index decef7b3d86c0..4efa8338dc3b5 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index a15ca0214e694..cdc2331096cc5 100644 +index 9c66a331c615b..822f9492fa50c 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -232,6 +232,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -229,6 +229,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { base::TimeDelta MinimumIntervalOfUserLevelMemoryPressureSignal() override; #endif diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index d6fa005a2..97e0fb909 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -94,7 +94,7 @@ index 3062f57603321..d8532c9c2eabb 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 0846656e45ba8..1f34295fb0544 100644 +index 38c5f465d8e45..762c4b7562d55 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -46,6 +46,7 @@ @@ -105,7 +105,7 @@ index 0846656e45ba8..1f34295fb0544 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1300,6 +1301,12 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1316,6 +1317,12 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -154,10 +154,10 @@ index 283161145d792..9f3f635abdd1c 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/public/app/content_main.h content/public/app/content_main.h -index 16e8c657ad61f..62d58b8dcccf5 100644 +index a1eeb534c0743..aac5194a44efb 100644 --- content/public/app/content_main.h +++ content/public/app/content_main.h -@@ -93,6 +93,13 @@ struct CONTENT_EXPORT ContentMainParams { +@@ -100,6 +100,13 @@ struct CONTENT_EXPORT ContentMainParams { } }; diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 1a4778f90..0c7c9e2bb 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -202,12 +202,12 @@ index 284dd099122df..c09c614c11283 100644 - } // namespace crash_reporter diff --git components/crash/core/app/crash_reporter_client.h components/crash/core/app/crash_reporter_client.h -index 9f8f20dfa6506..5d42f6fc1b003 100644 +index a604df7a5ea6a..618fbde10a65c 100644 --- components/crash/core/app/crash_reporter_client.h +++ components/crash/core/app/crash_reporter_client.h -@@ -5,7 +5,9 @@ - #ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_ - #define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_ +@@ -7,7 +7,9 @@ + + #include +#include #include @@ -215,7 +215,7 @@ index 9f8f20dfa6506..5d42f6fc1b003 100644 #include "build/build_config.h" -@@ -94,7 +96,7 @@ class CrashReporterClient { +@@ -96,7 +98,7 @@ class CrashReporterClient { virtual bool GetShouldDumpLargerDumps(); #endif @@ -224,7 +224,7 @@ index 9f8f20dfa6506..5d42f6fc1b003 100644 // Returns a textual description of the product type and version to include // in the crash report. Neither out parameter should be set to NULL. // TODO(jperaza): Remove the 2-parameter overload of this method once all -@@ -105,6 +107,7 @@ class CrashReporterClient { +@@ -107,6 +109,7 @@ class CrashReporterClient { std::string* version, std::string* channel); @@ -232,7 +232,7 @@ index 9f8f20dfa6506..5d42f6fc1b003 100644 virtual base::FilePath GetReporterLogFilename(); // Custom crash minidump handler after the minidump is generated. -@@ -114,6 +117,7 @@ class CrashReporterClient { +@@ -116,6 +119,7 @@ class CrashReporterClient { // libc nor allocate memory normally. virtual bool HandleCrashDump(const char* crashdump_filename, uint64_t crash_pid); @@ -240,7 +240,7 @@ index 9f8f20dfa6506..5d42f6fc1b003 100644 #endif // The location where minidump files should be written. Returns true if -@@ -211,6 +215,20 @@ class CrashReporterClient { +@@ -213,6 +217,20 @@ class CrashReporterClient { // Returns true if breakpad should run in the given process type. virtual bool EnableBreakpadForProcess(const std::string& process_type); diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index ce58a4fc9..b83f53f5c 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 9d9a0aac10a35..d1498a8f9df2b 100644 +index 86e97af7108a5..1da2d83d72a23 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -17,6 +17,7 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 474ed6250..db8ba0d62 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -60,7 +60,7 @@ index cead7cfa14bae..24142c2e4896f 100644 std::unique_ptr stream_container( new StreamContainer(tab_id, embedded, handler_url, extension_id, diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc -index 91928c8b7811e..a9c5913f4f5d0 100644 +index e8045d12672ed..0752c4780b312 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc @@ -62,11 +62,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, @@ -79,7 +79,13 @@ index 91928c8b7811e..a9c5913f4f5d0 100644 main_frame_host_ = host_contents_->GetPrimaryMainFrame(); // Listen for when an extension is unloaded from the same profile, as it may -@@ -81,6 +82,44 @@ ExtensionHost::ExtensionHost(const Extension* extension, +@@ -82,11 +83,49 @@ ExtensionHost::ExtensionHost(const Extension* extension, + // Create password reuse detection manager when new extension web contents are + // created. + ExtensionsBrowserClient::Get()->CreatePasswordReuseDetectionManager( +- host_contents_.get()); ++ host_contents_); + ExtensionHostRegistry::Get(browser_context_)->ExtensionHostCreated(this); } @@ -192,10 +198,10 @@ index c3197eb4790fa..1e7ae767b0582 100644 } diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 2b0287529078a..e4144e0755e4b 100644 +index 95cec35bfe57f..1479ac9fc29f8 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h -@@ -30,6 +30,7 @@ +@@ -31,6 +31,7 @@ #include "url/gurl.h" class ExtensionFunctionRegistry; @@ -203,7 +209,7 @@ index 2b0287529078a..e4144e0755e4b 100644 class PrefService; namespace base { -@@ -74,6 +75,7 @@ class ComponentExtensionResourceManager; +@@ -75,6 +76,7 @@ class ComponentExtensionResourceManager; class Extension; class ExtensionCache; class ExtensionError; @@ -211,7 +217,7 @@ index 2b0287529078a..e4144e0755e4b 100644 class ExtensionHostDelegate; class ExtensionSet; class ExtensionSystem; -@@ -249,6 +251,14 @@ class ExtensionsBrowserClient { +@@ -250,6 +252,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -227,10 +233,10 @@ index 2b0287529078a..e4144e0755e4b 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index 115f31f9ce46d..914b2564d5a21 100644 +index 73234aa98d4a7..bcf409cd09e3f 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -379,9 +379,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -377,9 +377,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index e5a994178..8ff2517f6 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,10 +12,10 @@ index a9b0a5a827fc8..9a0fd388756f3 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 6b729528b79bd..3b04670a846d6 100644 +index 27ef75902d11e..5c9ab8a865ff4 100644 --- BUILD.gn +++ BUILD.gn -@@ -18,6 +18,7 @@ import("//build/config/sanitizers/sanitizers.gni") +@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni") import("//build/config/ui.gni") import("//build/gn_logs.gni") import("//build/util/generate_wrapper.gni") @@ -23,17 +23,17 @@ index 6b729528b79bd..3b04670a846d6 100644 import("//chrome/browser/buildflags.gni") import("//components/nacl/features.gni") import("//device/vr/buildflags/buildflags.gni") -@@ -278,6 +279,10 @@ group("gn_all") { +@@ -282,6 +283,10 @@ group("gn_all") { - deps += root_extra_deps + deps += root_extra_deps -+ if (enable_cef) { -+ deps += [ "//cef" ] -+ } ++ if (enable_cef) { ++ deps += [ "//cef" ] ++ } + - if (enable_printing) { - deps += [ "//printing:printing_unittests" ] - } + if (enable_printing) { + deps += [ "//printing:printing_unittests" ] + } diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni index 1da479dd5eebc..ff9c7e467997c 100644 --- build/config/win/visual_studio_version.gni @@ -89,7 +89,7 @@ index 60f573a736ba5..90dd6d0b37314 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 84da6451a03ba..ff641f5bdc4c6 100644 +index 2254e8a56cda6..20ca93ea9fe32 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -100,7 +100,7 @@ index 84da6451a03ba..ff641f5bdc4c6 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//extensions/buildflags/buildflags.gni") -@@ -79,6 +80,10 @@ template("chrome_repack_percent") { +@@ -80,6 +81,10 @@ template("chrome_repack_percent") { "//ui/chromeos/resources", ] } diff --git a/patch/patches/gpu_test_trace_4401670.patch b/patch/patches/gpu_test_trace_4401670.patch deleted file mode 100644 index 169167872..000000000 --- a/patch/patches/gpu_test_trace_4401670.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git gpu/BUILD.gn gpu/BUILD.gn -index 671a9e7643de0..498d60c1d35f6 100644 ---- gpu/BUILD.gn -+++ gpu/BUILD.gn -@@ -675,7 +675,6 @@ test("gpu_unittests") { - ":test_support", - "//base", - "//base/test:test_support", -- "//base/test:test_trace_processor", - "//base/third_party/dynamic_annotations", - "//build:chromeos_buildflags", - "//cc:test_support", -@@ -715,6 +714,10 @@ test("gpu_unittests") { - "//url", - ] - -+ if (enable_base_tracing) { -+ deps += [ "//base/test:test_trace_processor" ] -+ } -+ - if (is_android) { - deps += [ - "//ui/android:ui_java", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 49395e673..4eec9acb8 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 03c4a6a04c123..92e0ba938198b 100644 +index e929bcf589914..85c7b4cc754bc 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1118,6 +1118,15 @@ +@@ -1134,6 +1134,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/linux_bluetooth_1319006.patch b/patch/patches/linux_bluetooth_1319006.patch index e1703a653..ee8e01cd0 100644 --- a/patch/patches/linux_bluetooth_1319006.patch +++ b/patch/patches/linux_bluetooth_1319006.patch @@ -1,5 +1,5 @@ diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn -index 5e9f447e4d946..64450c1a1f48e 100644 +index 642afd72cc0f9..5f12133c0ac5a 100644 --- device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn @@ -46,10 +46,12 @@ source_set("deprecated_experimental_mojo") { diff --git a/patch/patches/linux_chrome_widevine_3149.patch b/patch/patches/linux_chrome_widevine_3149.patch index 25a006f33..3b4625142 100644 --- a/patch/patches/linux_chrome_widevine_3149.patch +++ b/patch/patches/linux_chrome_widevine_3149.patch @@ -1,5 +1,5 @@ diff --git chrome/common/media/component_widevine_cdm_hint_file_linux.cc chrome/common/media/component_widevine_cdm_hint_file_linux.cc -index ba25a6223d60e..508bb0e59f512 100644 +index d529ecfb270c4..2e922ef345f04 100644 --- chrome/common/media/component_widevine_cdm_hint_file_linux.cc +++ chrome/common/media/component_widevine_cdm_hint_file_linux.cc @@ -16,6 +16,7 @@ @@ -10,7 +10,7 @@ index ba25a6223d60e..508bb0e59f512 100644 namespace { -@@ -37,14 +38,33 @@ base::FilePath GetPath(const base::Value& dict) { +@@ -35,14 +36,33 @@ base::FilePath GetPath(const base::Value::Dict& dict) { return path; } @@ -44,9 +44,9 @@ index ba25a6223d60e..508bb0e59f512 100644 - &hint_file_path)); + CHECK(GetHintFilePath(&hint_file_path)); - base::Value dict(base::Value::Type::DICT); - dict.SetStringPath(kPath, cdm_base_path.value()); -@@ -62,8 +82,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path) { + base::Value::Dict dict; + dict.Set(kPath, cdm_base_path.value()); +@@ -60,8 +80,7 @@ bool UpdateWidevineCdmHintFile(const base::FilePath& cdm_base_path) { base::FilePath GetLatestComponentUpdatedWidevineCdmDirectory() { base::FilePath hint_file_path; diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index eeb619d05..eacb2ee9a 100644 --- a/patch/patches/linux_printing_context.patch +++ b/patch/patches/linux_printing_context.patch @@ -1,5 +1,5 @@ diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc -index 63af3dd95eada..dc89a9c5c5e47 100644 +index 4f219a5df0089..31f751068080a 100644 --- printing/printing_context_linux.cc +++ printing/printing_context_linux.cc @@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index cb10b9ee0..b115fe470 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 7f5be88878bc6..f72a323b0c8b6 100644 +index f46c03e60b101..f94d0d563412d 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -10,7 +10,7 @@ index 7f5be88878bc6..f72a323b0c8b6 100644 #include "base/message_loop/message_pump_win.h" #include -@@ -487,7 +488,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { +@@ -496,7 +497,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { ctx.event()->set_chrome_message_pump(); msg_pump_data->set_sent_messages_in_queue(more_work_is_plausible); }); diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 4beea215a..93a6d0aea 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index 26223d7db1757..aa3261d2d3e7e 100644 +index 8da699b0da21d..a97bb8ed14d58 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm -@@ -786,7 +786,8 @@ void MessagePumpUIApplication::Detach() { +@@ -780,7 +780,8 @@ void MessagePumpUIApplication::Detach() { #else ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { @@ -12,7 +12,7 @@ index 26223d7db1757..aa3261d2d3e7e 100644 DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask()); // Pumping events in private runloop modes is known to interact badly with // app modal windows like NSAlert. -@@ -796,7 +797,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { +@@ -790,7 +791,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { } ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() { diff --git a/patch/patches/metrics_system_profile.patch b/patch/patches/metrics_system_profile.patch index d8551b014..9f20ed023 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 d0084f3359be2..7acb2178c38f8 100644 +index 83c0308a977a0..9859e33d3ce7e 100644 --- components/metrics/persistent_system_profile.cc +++ components/metrics/persistent_system_profile.cc -@@ -370,6 +370,10 @@ bool PersistentSystemProfile::GetSystemProfile( +@@ -392,6 +392,10 @@ bool PersistentSystemProfile::GetSystemProfile( return true; } @@ -14,10 +14,10 @@ index d0084f3359be2..7acb2178c38f8 100644 void PersistentSystemProfile::MergeUpdateRecords( const base::PersistentMemoryAllocator& memory_allocator, diff --git components/metrics/persistent_system_profile.h components/metrics/persistent_system_profile.h -index 1c5a7491b4f0a..b990176df875f 100644 +index fc173051fb8c1..3fcc43880e89d 100644 --- components/metrics/persistent_system_profile.h +++ components/metrics/persistent_system_profile.h -@@ -61,6 +61,10 @@ class PersistentSystemProfile { +@@ -64,6 +64,10 @@ class PersistentSystemProfile { const base::PersistentMemoryAllocator& memory_allocator, SystemProfileProto* system_profile); diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index f13a9c9e3..94b77bdaf 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,7 +10,7 @@ index f936d951fe272..90a3165172dce 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index 2ccb6fa76ddc6..f08dd2f2469a6 100644 +index 78206280cfbb8..5a7499747956b 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc @@ -1709,7 +1709,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index e3733d05b..91c1caa11 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index afefe3cd83dee..6668463247644 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 6dab72c3c7471..5578384004d36 100644 +index e45129c031d9c..2d2392117a8a0 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3140,6 +3140,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3152,6 +3152,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,10 +57,10 @@ index 6dab72c3c7471..5578384004d36 100644 const WebInputEvent& event) { if ((base::FeatureList::IsEnabled( diff --git content/browser/renderer_host/render_widget_host_impl.h content/browser/renderer_host/render_widget_host_impl.h -index f4775ddc34202..e5de7f864ed23 100644 +index d93a3647c1150..423e2ced1d572 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -791,6 +791,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -796,6 +796,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index c985934e9..ab60bdd09 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 4b7fcf619a55d..139fd5b4a2bd0 100644 +index 3a236b6752338..620c283a52db9 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -24,6 +24,7 @@ @@ -21,7 +21,7 @@ index 4b7fcf619a55d..139fd5b4a2bd0 100644 using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -358,6 +363,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( +@@ -361,6 +366,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( // static DownloadPrefs* DownloadPrefs::FromBrowserContext( content::BrowserContext* context) { @@ -34,7 +34,7 @@ index 4b7fcf619a55d..139fd5b4a2bd0 100644 } diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index f2dca42faf347..458703a565501 100644 +index 897184766020b..42a2991f3f31c 100644 --- chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc @@ -15,6 +15,7 @@ @@ -84,7 +84,7 @@ index d5767fe27db0d..5778847a68208 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index fb8f4728eb559..a1a505a31e7af 100644 +index 641551c50c9f0..86d5e597626b4 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -22,6 +22,7 @@ diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index e494280f9..2616794c1 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc -index 7f77a94ddcdbc..149fe2bd90a13 100644 +index 0b6ff160cc053..987d9cf9b43c0 100644 --- chrome/browser/printing/printer_query.cc +++ chrome/browser/printing/printer_query.cc -@@ -116,6 +116,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id) +@@ -122,6 +122,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id) rfh_id_(rfh_id), cookie_(PrintSettings::NewCookie()) { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -11,10 +11,10 @@ index 7f77a94ddcdbc..149fe2bd90a13 100644 PrinterQuery::~PrinterQuery() { diff --git printing/printing_context.h printing/printing_context.h -index 7582c73418e74..f5b477c18c65a 100644 +index 2fb3aef0797f2..73248cd2d2039 100644 --- printing/printing_context.h +++ printing/printing_context.h -@@ -173,6 +173,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -180,6 +180,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { int job_id() const { return job_id_; } @@ -28,7 +28,7 @@ index 7582c73418e74..f5b477c18c65a 100644 protected: explicit PrintingContext(Delegate* delegate); -@@ -219,6 +226,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { +@@ -224,6 +231,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { // The job id for the current job. The value is 0 if no jobs are active. int job_id_; diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 6693df746..b6f9e4b0a 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 172f0b47e2c77..a651cf056c52c 100644 +index 43c8a9913c4b3..0de9549168097 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -686,6 +686,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -692,6 +692,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 f083623fc..fe65173d8 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,5 +1,5 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index a013ab393c6b0..1187c26bb65f8 100644 +index c6b1c58758df8..0e55c70e938d3 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc @@ -909,6 +909,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index b2cc4210e..ebbae8c5d 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 7098e7e553bcd..b1e4f4c9b9e0b 100644 +index c295b6c6bd54f..3c0f5a64baa6d 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -6,6 +6,7 @@ @@ -10,7 +10,7 @@ index 7098e7e553bcd..b1e4f4c9b9e0b 100644 #include #include -@@ -727,10 +728,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -729,10 +730,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -27,7 +27,7 @@ index 7098e7e553bcd..b1e4f4c9b9e0b 100644 } absl::optional RenderWidgetHostViewAura::GetDisplayFeature() { -@@ -2247,6 +2250,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2270,6 +2273,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // This needs to happen only after |window_| has been initialized using // Init(), because it needs to have the layer. window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index da845fd0e..5e5837c49 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc -index 6162047ffe892..0efb184682a00 100644 +index ac27e4f66e56f..18a36a58faf01 100644 --- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc +++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc @@ -23,6 +23,7 @@ @@ -21,7 +21,7 @@ index 6162047ffe892..0efb184682a00 100644 enterprise_connectors::ConnectorsServiceFactory::GetForBrowserContext( profile); diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index db593e5f07ea8..5e72cd57ee0fa 100644 +index 81851bafbadd5..e0fdb35702b22 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -32,7 +32,7 @@ index db593e5f07ea8..5e72cd57ee0fa 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" -@@ -300,8 +301,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) +@@ -299,8 +300,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile) base::Unretained(this))); cookie_settings_ = CookieSettingsFactory::GetForProfile(profile); cookie_settings_observation_.Observe(cookie_settings_.get()); @@ -45,7 +45,7 @@ index db593e5f07ea8..5e72cd57ee0fa 100644 DisableQuicIfNotAllowed(); -@@ -810,7 +813,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -804,7 +807,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -66,7 +66,7 @@ index db593e5f07ea8..5e72cd57ee0fa 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -823,7 +838,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -817,7 +832,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -178,10 +178,10 @@ index ba7f48e90026c..a509cc4565e9f 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 7301ba6c8992e..c34a2919fa9d0 100644 +index 02709c1f1bf51..bf9cbcfa3ff48 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2297,16 +2297,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2318,16 +2318,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -206,14 +206,14 @@ index 7301ba6c8992e..c34a2919fa9d0 100644 + builder.SetCookieStore(std::move(cookie_store)); + - if (base::FeatureList::IsEnabled(features::kPrivateStateTokens)) { + if (base::FeatureList::IsEnabled(features::kPrivateStateTokens) || + base::FeatureList::IsEnabled(features::kFledgePst)) { trust_token_store_ = std::make_unique(); - diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index f32ad0616a72f..c6cc5fcacf34b 100644 +index 62150fda9f17a..14d7b8988e2c9 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -346,6 +346,9 @@ struct NetworkContextParams { +@@ -357,6 +357,9 @@ struct NetworkContextParams { // cookies. Otherwise it should be false. bool persist_session_cookies = false; diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 7379ddebe..581f762ee 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 e5185febf2cc3..fc296d35427f0 100644 +index ec5b4bff492cd..9f03c209edbc3 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -496,10 +496,6 @@ class LoginHandlerDelegate { +@@ -499,10 +499,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index e5185febf2cc3..fc296d35427f0 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -551,12 +547,6 @@ void OnAuthRequiredContinuation( +@@ -554,12 +550,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote auth_challenge_responder, base::RepeatingCallback web_contents_getter) { @@ -26,7 +26,7 @@ index e5185febf2cc3..fc296d35427f0 100644 new LoginHandlerDelegate( std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_primary_main_frame, process_id, request_id, url, -@@ -3050,8 +3040,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -3075,8 +3065,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index e5185febf2cc3..fc296d35427f0 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -3061,9 +3055,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -3086,9 +3080,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 3833f2aac..bc33d7f51 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,8 +1,8 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 0e1d0b858e9d9..79cc66c6c2e8e 100644 +index 01d2a426e2c17..c239a2f6fc786 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc -@@ -124,7 +124,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( +@@ -125,7 +125,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( // If we're not incognito mode, schedule all of our file tasks to enable // disk on the storage context. @@ -13,7 +13,7 @@ index 0e1d0b858e9d9..79cc66c6c2e8e 100644 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index 21e72bb8a6994..f4d9994c2fc57 100644 +index e4a0c8a1a55b7..7e2e0e3b1b987 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition( diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index a02a36637..75cd67a54 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,5 +1,5 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 7146ce14ee1a2..acaedc4761331 100644 +index 3c8faea2c2391..0d744c7b1c27d 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -63,6 +63,8 @@ diff --git a/patch/patches/underlay_1051.patch b/patch/patches/underlay_1051.patch deleted file mode 100644 index 6087d8e65..000000000 --- a/patch/patches/underlay_1051.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git ui/base/cocoa/underlay_opengl_hosting_window.h ui/base/cocoa/underlay_opengl_hosting_window.h -index a0e5f803e62b2..d59122c483920 100644 ---- ui/base/cocoa/underlay_opengl_hosting_window.h -+++ ui/base/cocoa/underlay_opengl_hosting_window.h -@@ -12,7 +12,7 @@ - // Common base class for windows that host a OpenGL surface that renders under - // the window. Previously contained methods related to hole punching, now just - // contains common asserts. --COMPONENT_EXPORT(UI_BASE) -+__attribute__((visibility("default"))) - @interface UnderlayOpenGLHostingWindow : NSWindow - @end - diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index a43a69a23..9a6385548 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -1,5 +1,5 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index 50eeaa9acca98..eb4c7aa70de9c 100644 +index 6e4b373945d6a..6fcb29d67451d 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h @@ -17,8 +17,11 @@ @@ -43,7 +43,7 @@ index 50eeaa9acca98..eb4c7aa70de9c 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 2beb8043a684a..52654691534d6 100644 +index 17d8659f9c6fd..a6348c2ce453d 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -665,6 +665,14 @@ void RenderText::SetWhitespaceElision(absl::optional whitespace_elision) { @@ -106,10 +106,10 @@ index 3c78525361ebf..c922dfe5019a3 100644 } // namespace gfx diff --git ui/views/animation/ink_drop_host.h ui/views/animation/ink_drop_host.h -index 4512e4e37cb76..ca39d737e9723 100644 +index 109522be316f2..25fb550337fb6 100644 --- ui/views/animation/ink_drop_host.h +++ ui/views/animation/ink_drop_host.h -@@ -186,6 +186,8 @@ class VIEWS_EXPORT InkDropHost { +@@ -189,6 +189,8 @@ class VIEWS_EXPORT InkDropHost { View* host_view() { return host_view_; } const View* host_view() const { return host_view_; } @@ -119,10 +119,10 @@ index 4512e4e37cb76..ca39d737e9723 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index ca061545ed8f2..711207914f1fa 100644 +index 3168220180af9..3ed7bec8438a2 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -552,6 +552,12 @@ void LabelButton::OnThemeChanged() { +@@ -553,6 +553,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -150,10 +150,10 @@ index e641dc163c5fc..785ccd20e4dd4 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 37c22391d5c94..d96f63ed47ec2 100644 +index 6f46fb17b0916..cd0cfe163acb8 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc -@@ -51,12 +51,29 @@ enum LabelPropertyKey { +@@ -50,12 +50,29 @@ enum LabelPropertyKey { kLabelLineHeight, kLabelObscured, kLabelAllowCharacterBreak, @@ -183,7 +183,7 @@ index 37c22391d5c94..d96f63ed47ec2 100644 } // namespace namespace views { -@@ -458,6 +475,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -464,6 +481,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -199,7 +199,7 @@ index 37c22391d5c94..d96f63ed47ec2 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -763,6 +789,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -761,6 +787,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -217,7 +217,7 @@ index 37c22391d5c94..d96f63ed47ec2 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index 03c33a87c8ee2..3cd41c96ab504 100644 +index cdaa9899be3e0..40aa6ffcc639a 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h @@ -240,6 +240,10 @@ class VIEWS_EXPORT Label : public View, @@ -231,7 +231,7 @@ index 03c33a87c8ee2..3cd41c96ab504 100644 // Gets/Sets the tooltip text. Default behavior for a label (single-line) is // to show the full text if it is wider than its bounds. Calling this // overrides the default behavior and lets you set a custom tooltip. To -@@ -500,6 +504,7 @@ class VIEWS_EXPORT Label : public View, +@@ -499,6 +503,7 @@ class VIEWS_EXPORT Label : public View, int max_width_ = 0; // This is used in single-line mode. int max_width_single_line_ = 0; @@ -240,10 +240,10 @@ index 03c33a87c8ee2..3cd41c96ab504 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 9752106bd171b..3a9b02408373d 100644 +index 10044c8def94f..a799a4841e113 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -471,7 +471,8 @@ void MenuController::Run(Widget* parent, +@@ -470,7 +470,8 @@ void MenuController::Run(Widget* parent, MenuAnchorPosition position, bool context_menu, bool is_nested_drag, @@ -253,7 +253,7 @@ index 9752106bd171b..3a9b02408373d 100644 exit_type_ = ExitType::kNone; possible_drag_ = false; drag_in_progress_ = false; -@@ -518,6 +519,7 @@ void MenuController::Run(Widget* parent, +@@ -517,6 +518,7 @@ void MenuController::Run(Widget* parent, owner_->AddObserver(this); native_view_for_gestures_ = native_view_for_gestures; @@ -261,7 +261,7 @@ index 9752106bd171b..3a9b02408373d 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2196,6 +2198,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2195,6 +2197,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { params.do_capture = do_capture; params.native_view_for_gestures = native_view_for_gestures_; params.owned_window_anchor = anchor; @@ -269,7 +269,7 @@ index 9752106bd171b..3a9b02408373d 100644 if (item->GetParentMenuItem()) { params.context = item->GetWidget(); // (crbug.com/1414232) The item to be open is a submenu. Make sure -@@ -2900,8 +2903,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2898,8 +2901,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -284,7 +284,7 @@ index 9752106bd171b..3a9b02408373d 100644 // Show the sub-menu. SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY); -@@ -2921,8 +2929,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2919,8 +2927,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -383,7 +383,7 @@ index d246468d9510b..baf6a250bca8d 100644 #if BUILDFLAG(IS_WIN) diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h -index 67cdb883886f8..4ca7d632ad7f9 100644 +index dac3249c247e5..0573e84ac24a4 100644 --- ui/views/controls/menu/menu_host.h +++ ui/views/controls/menu/menu_host.h @@ -55,6 +55,8 @@ class MenuHost : public Widget, public WidgetObserver { @@ -396,10 +396,10 @@ index 67cdb883886f8..4ca7d632ad7f9 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 946028ff36e25..7d63a6ba799d5 100644 +index 3caeab8d93084..aa7c5541f5e71 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1109,6 +1109,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1112,6 +1112,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); @@ -415,7 +415,7 @@ index 946028ff36e25..7d63a6ba799d5 100644 } else if (paint_as_selected) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1175,6 +1184,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1178,6 +1187,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { } SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { @@ -430,7 +430,7 @@ index 946028ff36e25..7d63a6ba799d5 100644 // use the default color. if (!paint_as_selected && foreground_color_id_.has_value()) { diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index e826d42492872..2ade4b2f44df5 100644 +index ec8856bfaebfa..53100322e12a0 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -4,6 +4,7 @@ @@ -441,7 +441,7 @@ index e826d42492872..2ade4b2f44df5 100644 #include #include #include -@@ -221,6 +222,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const { +@@ -222,6 +223,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const { return model->IsItemCheckedAt(index); } @@ -676,10 +676,10 @@ index cf696fbcf0714..5c48fd7410b88 100644 // Hides and cancels the menu. diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 629877961fe6b..d41bfca45103e 100644 +index c4f9cea175824..6ab8c295abf8b 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -260,6 +260,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -257,6 +257,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = background_view_->AddChildView( std::make_unique(content_view, false)); @@ -692,7 +692,7 @@ index 629877961fe6b..d41bfca45103e 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aura_ozone.cc ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -index 983f9390aa1f6..d6db1ea93e0ef 100644 +index ef7fc4c8d6fc0..88b1b40355a97 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc @@ -15,6 +15,7 @@ @@ -703,7 +703,7 @@ index 983f9390aa1f6..d6db1ea93e0ef 100644 #include "ui/aura/client/screen_position_client.h" #include "ui/aura/env.h" #include "ui/aura/test/aura_test_utils.h" -@@ -172,9 +173,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x, +@@ -178,9 +179,11 @@ bool SendMouseMoveNotifyWhenDone(int screen_x, aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -716,7 +716,7 @@ index 983f9390aa1f6..d6db1ea93e0ef 100644 #if !BUILDFLAG(IS_CHROMEOS_LACROS) if (root_location != root_current_location && diff --git ui/views/view.h ui/views/view.h -index d43db49340391..24b68b0d68eed 100644 +index a37618c6d37ed..6615e4e59db0b 100644 --- ui/views/view.h +++ ui/views/view.h @@ -21,6 +21,7 @@ diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index a22167266..5bc4d9d37 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -18,7 +18,7 @@ index d770e7b922232..efb97d9a53574 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 d83e754fe27be..7d35d07fde46d 100644 +index 7b8afe19a3088..2a2ca57077f73 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -71,6 +71,7 @@ class CursorManager; @@ -62,7 +62,7 @@ index d83e754fe27be..7d35d07fde46d 100644 // Sets the cursor for this view to the one specified. virtual void UpdateCursor(const ui::Cursor& cursor) = 0; -@@ -676,6 +689,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -678,6 +691,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { // to all displays. gfx::Size system_cursor_size_; @@ -73,7 +73,7 @@ index d83e754fe27be..7d35d07fde46d 100644 private: FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, -@@ -697,10 +714,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { +@@ -699,10 +716,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { void SynchronizeVisualProperties(); @@ -152,7 +152,7 @@ index c4cb1c13fc35c..a9371d66f3f9c 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index f681a199951f4..365fa8b4c2a46 100644 +index 7ebbdf4700a63..0e09252466b82 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc @@ -1801,7 +1801,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { @@ -243,7 +243,7 @@ index 01d4ffe408a84..fbe41fefbb2bd 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 e24a4268cdfa4..31e97cc4f61c2 100644 +index 22487e3d3425f..7bbee50a0fbd9 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) { @@ -258,7 +258,7 @@ index e24a4268cdfa4..31e97cc4f61c2 100644 // Calculate initial bounds. diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index d52fc15106eb3..070800332285c 100644 +index 3d22d934c39f5..6d2066270e4b4 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -180,16 +180,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { @@ -294,7 +294,7 @@ index d52fc15106eb3..070800332285c 100644 message_handler_->Init(parent_hwnd, pixel_bounds, params.headless_mode); CreateCompositor(params.force_software_compositing); OnAcceleratedWidgetAvailable(); -@@ -1030,11 +1042,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1036,11 +1048,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -312,7 +312,7 @@ index d52fc15106eb3..070800332285c 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1042,6 +1058,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1048,6 +1064,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -325,7 +325,7 @@ index d52fc15106eb3..070800332285c 100644 SendEventToSink(event); return event->handled(); } -@@ -1220,8 +1242,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { +@@ -1226,8 +1248,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { // positions in variable-DPI situations. See https://crbug.com/1224715 for // details. aura::Window* root = nullptr; @@ -344,10 +344,10 @@ index d52fc15106eb3..070800332285c 100644 } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 2b935ac09209c..ef7d7a3675215 100644 +index 2e4bacce52a45..76916c5d21cb9 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -320,6 +320,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -322,6 +322,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -359,7 +359,7 @@ index 2b935ac09209c..ef7d7a3675215 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/widget.cc ui/views/widget/widget.cc -index 3bf08b3dbabd9..81e36e24de16e 100644 +index eb53fdc1b3564..3b6955ebca5ad 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc @@ -367,7 +367,8 @@ void Widget::Init(InitParams params) { @@ -395,7 +395,7 @@ index 3bf08b3dbabd9..81e36e24de16e 100644 } if (base::FeatureList::IsEnabled(features::kWidgetLayering)) { -@@ -1597,10 +1606,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1615,10 +1624,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -413,7 +413,7 @@ index 3bf08b3dbabd9..81e36e24de16e 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index e8b02fc9df426..e4ecdd8764244 100644 +index 478b38681cd23..19ec8cc026029 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -351,6 +351,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -455,7 +455,7 @@ index 3b9b00b7d79ae..e759e3c1a9f34 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index 5de1045439dca..94c6a8b2e914d 100644 +index bde6bc5a8a3ad..653a71d1c26d3 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc @@ -939,8 +939,12 @@ bool HWNDMessageHandler::IsActive() const { @@ -472,7 +472,7 @@ index 5de1045439dca..94c6a8b2e914d 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3302,10 +3306,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3318,10 +3322,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, } else if (event.type() == ui::ET_MOUSEWHEEL) { ui::MouseWheelEvent mouse_wheel_event(msg); // Reroute the mouse wheel to the window under the pointer if applicable. diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index b7b3ffedd..80cb186f3 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index 27c944acb2e84..bc491de193ded 100644 +index f2fe76f53dac7..e7fbe7b38e15d 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -220,6 +220,8 @@ viz_component("service") { +@@ -224,6 +224,8 @@ viz_component("service") { "transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.h", "viz_service_export.h", @@ -191,10 +191,10 @@ index d63ec55ae38d6..ff86831efd68b 100644 // running in the same process, so it won't block anything. // TODO(159346933) Remove once the origin isolation logic is moved outside of diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom -index c286482bc7ddb..0914982e12be9 100644 +index 350fa67c49249..c03f924171720 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom -@@ -103,13 +103,15 @@ interface DisplayPrivate { +@@ -108,13 +108,15 @@ interface DisplayPrivate { // DisplayClient allows privileged clients to receive events from the Display. interface DisplayClient { @@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 2c587c7d2f7e9..51a4e6fc3f027 100644 +index c9f14ed6547ba..f4a3da53f53ef 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -33,7 +33,9 @@ @@ -261,7 +261,7 @@ index 2c587c7d2f7e9..51a4e6fc3f027 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 -@@ -519,6 +532,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -525,6 +538,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index bff39d999..d282138d0 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 79e0289b713ce..abc76cb041465 100644 +index e4f917be12064..0c8b367f412d1 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3189,6 +3189,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3207,6 +3207,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 79e0289b713ce..abc76cb041465 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3199,6 +3205,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3217,6 +3223,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 79e0289b713ce..abc76cb041465 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3379,6 +3386,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3397,6 +3404,9 @@ void WebContentsImpl::RenderWidgetCreated( OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated", "render_widget_host", render_widget_host); created_widgets_.insert(render_widget_host); @@ -33,7 +33,7 @@ index 79e0289b713ce..abc76cb041465 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4111,6 +4121,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4125,6 +4135,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( create_params.picture_in_picture_options = *(params.pip_options); } @@ -49,7 +49,7 @@ index 79e0289b713ce..abc76cb041465 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. -@@ -8035,6 +8054,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -8046,6 +8065,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). SetFocusedFrameTree(&node->frame_tree()); } @@ -60,7 +60,7 @@ index 79e0289b713ce..abc76cb041465 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index f020af02d53a4..e263e4a456905 100644 +index 8baf744895c94..305e34f53bf54 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -96,10 +96,12 @@ class BrowserContext; diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 786612b60..93a031320 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 17e2a2876789c..b708401ec2c0f 100644 +index d7fc9c28b67f0..5a8b5b68654e0 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -793,6 +793,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -794,6 +794,11 @@ class BLINK_PLATFORM_EXPORT Platform { } #endif diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index befb7cd13..cd77250cf 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,7 +11,7 @@ index 2c3930e849719..12c81c7c0e7e6 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 bb5b2ecb90889..6a1a7c47e8c86 100644 +index 4f99cf1e984cb..7ed63f2db8267 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -250,8 +250,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -62,10 +62,10 @@ index 421ca0b15eea5..4802d65c6dc4f 100644 gfx::Transform device_emulation_transform_; diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc -index 89a9e47e85841..fe8754953c060 100644 +index 8cb8e7c17836f..6f98ab3b61ebd 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -916,7 +916,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -917,7 +917,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index e4bf865f1..bd3e5ad2b 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index 0aae647fea27f..295319c17b46f 100644 +index 88f0e02ec95c2..8160f40418cc6 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -19,10 +19,12 @@ @@ -15,7 +15,7 @@ index 0aae647fea27f..295319c17b46f 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h" #include "chrome/browser/google/google_brand.h" -@@ -397,7 +399,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { +@@ -400,7 +402,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) { response->emplace(kOsVersionTag, os_version); #endif @@ -28,7 +28,7 @@ index 0aae647fea27f..295319c17b46f 100644 PopulateExtensionInfoLogs(response.get()); PopulatePowerApiLogs(response.get()); #if BUILDFLAG(IS_WIN) -@@ -471,8 +477,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -478,8 +484,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -41,7 +41,7 @@ index 0aae647fea27f..295319c17b46f 100644 std::string extensions_list; for (const scoped_refptr& extension : extension_registry->enabled_extensions()) { -@@ -576,6 +586,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( +@@ -583,6 +593,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( #if BUILDFLAG(IS_WIN) void ChromeInternalLogSource::PopulateUsbKeyboardDetected( SystemLogsResponse* response) { diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index d87717bed..279614267 100644 --- a/patch/patches/win_sandbox_3210.patch +++ b/patch/patches/win_sandbox_3210.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index d663390faa8e2..018cd11d9487f 100644 +index fe8894d58176f..2235536ae6e03 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -998,6 +998,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -991,6 +991,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/tests/cefclient/browser/root_window_mac.mm b/tests/cefclient/browser/root_window_mac.mm index 1b8c8e47b..4eb056fa9 100644 --- a/tests/cefclient/browser/root_window_mac.mm +++ b/tests/cefclient/browser/root_window_mac.mm @@ -515,16 +515,11 @@ void RootWindowMacImpl::CreateRootWindow(const CefBrowserSettings& settings, GetNSBoundsInDisplay(dip_bounds, /*input_content_bounds=*/is_popup_, style_mask, frame_rect, content_rect); - // The CEF framework library is loaded at runtime so we need to use this - // mechanism for retrieving the class. - Class window_class = NSClassFromString(@"UnderlayOpenGLHostingWindow"); - CHECK(window_class); - // Create the main window. - window_ = [[window_class alloc] initWithContentRect:content_rect - styleMask:style_mask - backing:NSBackingStoreBuffered - defer:NO]; + window_ = [[NSWindow alloc] initWithContentRect:content_rect + styleMask:style_mask + backing:NSBackingStoreBuffered + defer:NO]; [window_ setTitle:@"cefclient"]; // No dark mode, please window_.appearance = [NSAppearance appearanceNamed:NSAppearanceNameAqua]; diff --git a/tools/distrib/mac/README.redistrib.txt b/tools/distrib/mac/README.redistrib.txt index 9812ce8b3..a66f27cb8 100644 --- a/tools/distrib/mac/README.redistrib.txt +++ b/tools/distrib/mac/README.redistrib.txt @@ -23,6 +23,7 @@ cefclient.app/ chrome_100_percent.pak <= non-localized resources and strings chrome_200_percent.pak <=^ resources.pak <=^ + gpu_shader_cache.bin <= ANGLE-Metal shader cache icudtl.dat <= unicode support snapshot_blob.bin, v8_context_snapshot.[x86_64|arm64].bin <= V8 initial snapshot en.lproj/, ... <= locale-specific resources and strings @@ -94,6 +95,7 @@ run but any related functionality may become broken or disabled. * ANGLE support. * Chromium Embedded Framework.framework/Libraries/libEGL.dylib * Chromium Embedded Framework.framework/Libraries/libGLESv2.dylib + * Chromium Embedded Framework.framework/Resources/gpu_shader_cache.bin Support for rendering of HTML5 content like 2D canvas, 3D CSS and WebGL. Without these files the aforementioned capabilities may fail. diff --git a/tools/gn_args.py b/tools/gn_args.py index 360405004..0359f2feb 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -228,6 +228,11 @@ def GetRecommendedDefaultArgs(): # CefV8Value::CreateArrayBuffer with memory allocated outside of the V8 # sandbox. See https://github.com/chromiumembedded/cef/issues/3332. 'v8_enable_sandbox': False, + + # Disable use of //third_party/perfetto for TRACE_EVENT macros. This is + # currently default-enabled on Linux and is causing DCHECK failures. + # See https://github.com/chromiumembedded/cef/issues/3497. + 'use_perfetto_client_library': False, } if platform == 'windows' or platform == 'mac':