diff --git a/BUILD.gn b/BUILD.gn index 4cae38082..5b010c88f 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1030,7 +1030,6 @@ source_set("libcef_static") { "//crypto", "//device/base", "//extensions/browser", - "//extensions/browser:core_api_provider", "//extensions/buildflags", "//extensions/common/api", "//extensions/common:core_api_provider", @@ -2194,6 +2193,10 @@ if (is_mac) { configs += [ ":gtk", ] + cflags = [ + # Don't warn about deprecated GDK/GTK functions. + "-Wno-deprecated-declarations", + ] } if (!is_component_build) { diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 030a413a1..67c9f6cd7 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/109.0.5414.0' + 'chromium_checkout': 'refs/tags/110.0.5481.0' } diff --git a/cmake/cef_variables.cmake.in b/cmake/cef_variables.cmake.in index e273b681d..00abdd9bd 100644 --- a/cmake/cef_variables.cmake.in +++ b/cmake/cef_variables.cmake.in @@ -350,6 +350,10 @@ if(OS_MAC) CEF_USE_SANDBOX # Used by apps to test if the sandbox is enabled ) + list(APPEND CEF_STANDARD_LIBS + -lsandbox + ) + # CEF sandbox library paths. set(CEF_SANDBOX_LIB_DEBUG "${CEF_BINARY_DIR_DEBUG}/cef_sandbox.a") set(CEF_SANDBOX_LIB_RELEASE "${CEF_BINARY_DIR_RELEASE}/cef_sandbox.a") @@ -532,6 +536,7 @@ if(OS_WINDOWS) psapi.lib SetupAPI.lib Shell32.lib + Userenv.lib version.lib wbemuuid.lib winmm.lib diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index 0c2294703..53bf6f508 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -1,4 +1,4 @@ -// Copyright (c) 2022 Marshall A. Greenblatt. All rights reserved. +// Copyright (c) 2023 Marshall A. Greenblatt. All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "80dc2ef26a1ac3a35c798a01adc88240759ac85a" +#define CEF_API_HASH_UNIVERSAL "fc4393fe8a78980a4d8689ff8b13094fae3c3e50" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "c3f39d68cb97e87872a59a42c9255460ef4d7170" +#define CEF_API_HASH_PLATFORM "c41fbde76401eaecb7bdf4851d162e1416285ac1" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "589830b49e03e9f4ae2c050125bcdafacbb248dd" +#define CEF_API_HASH_PLATFORM "031d539913b42e85711402dd5f17fa9aada7ebab" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "e3e836b304098732708acf972e82fb6fcb2516a7" +#define CEF_API_HASH_PLATFORM "ceef4f8220761b7bd5bb9959bacd3d55a2dcc484" #endif #ifdef __cplusplus diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 3fef9a90c..210b03613 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -2179,10 +2179,8 @@ typedef struct _cef_popup_features_t { int height; int heightSet; - int menuBarVisible; - int statusBarVisible; - int toolBarVisible; - int scrollbarsVisible; + /// True (1) if browser interface elements should be hidden. + int isPopup; } cef_popup_features_t; /// diff --git a/libcef/browser/alloy/alloy_browser_context.cc b/libcef/browser/alloy/alloy_browser_context.cc index d5dfd1aa8..f97b209aa 100644 --- a/libcef/browser/alloy/alloy_browser_context.cc +++ b/libcef/browser/alloy/alloy_browser_context.cc @@ -264,7 +264,8 @@ void AlloyBrowserContext::LoadExtension( if (manifest && manifest->GetSize() > 0) { CefDictionaryValueImpl* value_impl = static_cast(manifest.get()); - extension_system()->LoadExtension(base::WrapUnique(value_impl->CopyValue()), + std::unique_ptr value_copy(value_impl->CopyValue()); + extension_system()->LoadExtension(std::move(*value_copy).TakeDict(), root_directory, false /* builtin */, loader_context, handler); } else { diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.cc b/libcef/browser/alloy/chrome_browser_process_alloy.cc index e343cda61..ef9d06261 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.cc +++ b/libcef/browser/alloy/chrome_browser_process_alloy.cc @@ -421,3 +421,8 @@ ChromeBrowserProcessAlloy::GetBreadcrumbPersistentStorageManager() { NOTREACHED(); return nullptr; } + +HidSystemTrayIcon* ChromeBrowserProcessAlloy::hid_system_tray_icon() { + NOTREACHED(); + return nullptr; +} diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.h b/libcef/browser/alloy/chrome_browser_process_alloy.h index 46f68b592..80b3d1068 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.h +++ b/libcef/browser/alloy/chrome_browser_process_alloy.h @@ -109,6 +109,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess { HidPolicyAllowedDevices* hid_policy_allowed_devices() override; breadcrumbs::BreadcrumbPersistentStorageManager* GetBreadcrumbPersistentStorageManager() override; + HidSystemTrayIcon* hid_system_tray_icon() override; private: bool initialized_; diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index 56a6a9b54..ff673cc17 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -41,10 +41,7 @@ void TranslatePopupFeatures(const blink::mojom::WindowFeatures& webKitFeatures, features.height = static_cast(webKitFeatures.bounds.height()); features.heightSet = webKitFeatures.has_height; - features.menuBarVisible = webKitFeatures.menu_bar_visible; - features.statusBarVisible = webKitFeatures.status_bar_visible; - features.toolBarVisible = webKitFeatures.tool_bar_visible; - features.scrollbarsVisible = webKitFeatures.scrollbars_visible; + features.isPopup = webKitFeatures.is_popup; } CefBrowserInfoManager* g_info_manager = nullptr; diff --git a/libcef/browser/chrome/chrome_browser_context.cc b/libcef/browser/chrome/chrome_browser_context.cc index 90c828784..7528a670e 100644 --- a/libcef/browser/chrome/chrome_browser_context.cc +++ b/libcef/browser/chrome/chrome_browser_context.cc @@ -14,6 +14,21 @@ #include "chrome/browser/profiles/off_the_record_profile_impl.h" #include "chrome/common/pref_names.h" +namespace { + +// Match the default logic from ProfileManager::GetPrimaryUserProfile which was +// restricted in https://crbug.com/1264436. +Profile* GetPrimaryUserProfile() { + ProfileManager* profile_manager = g_browser_process->profile_manager(); + + // From ProfileManager::GetActiveUserOrOffTheRecordProfile. + base::FilePath default_profile_dir = profile_manager->user_data_dir().Append( + profile_manager->GetInitialProfileDir()); + return profile_manager->GetProfile(default_profile_dir); +} + +} // namespace + ChromeBrowserContext::ChromeBrowserContext( const CefRequestContextSettings& settings) : CefBrowserContext(settings), weak_ptr_factory_(this) {} @@ -57,7 +72,7 @@ void ChromeBrowserContext::InitializeAsync(base::OnceClosure initialized_cb) { if (cache_path_ == user_data_dir) { // Use the default disk-based profile. - auto profile = profile_manager->GetPrimaryUserProfile(); + auto profile = GetPrimaryUserProfile(); ProfileCreated(Profile::CreateStatus::CREATE_STATUS_INITIALIZED, profile); return; } else if (cache_path_.DirName() == user_data_dir) { @@ -93,9 +108,7 @@ void ChromeBrowserContext::Shutdown() { // |g_browser_process| may be nullptr during shutdown. if (g_browser_process) { if (should_destroy_) { - g_browser_process->profile_manager() - ->GetPrimaryUserProfile() - ->DestroyOffTheRecordProfile(profile_); + GetPrimaryUserProfile()->DestroyOffTheRecordProfile(profile_); } else if (profile_) { OnProfileWillBeDestroyed(profile_); } @@ -118,8 +131,7 @@ void ChromeBrowserContext::ProfileCreated(Profile::CreateStatus status, // Creation of a disk-based profile failed for some reason. Create a // new/unique OffTheRecord profile instead. const auto& profile_id = Profile::OTRProfileID::CreateUniqueForCEF(); - parent_profile = - g_browser_process->profile_manager()->GetPrimaryUserProfile(); + parent_profile = GetPrimaryUserProfile(); profile_ = parent_profile->GetOffTheRecordProfile( profile_id, /*create_if_needed=*/true); otr_profile = static_cast(profile_); diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index 2f893e8d8..54ef279b6 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -162,8 +162,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { std::move(callback).Run( suggested_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - download::DownloadItem::MixedContentStatus::UNKNOWN, suggested_path, - base::FilePath(), std::string() /*mime_type*/, + download::DownloadItem::InsecureDownloadStatus::UNKNOWN, + suggested_path, base::FilePath(), std::string() /*mime_type*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -179,11 +179,12 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { } // The download will be cancelled if |path| is empty. - std::move(callback).Run(path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, - download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - download::DownloadItem::MixedContentStatus::UNKNOWN, - path, base::FilePath(), std::string() /*mime_type*/, - download::DOWNLOAD_INTERRUPT_REASON_NONE); + std::move(callback).Run( + path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, + download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, + download::DownloadItem::InsecureDownloadStatus::UNKNOWN, path, + base::FilePath(), std::string() /*mime_type*/, + download::DOWNLOAD_INTERRUPT_REASON_NONE); } base::WeakPtr manager_; @@ -379,7 +380,7 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget( std::move(*callback).Run( item->GetForcedFilePath(), DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, - download::DownloadItem::MixedContentStatus::UNKNOWN, + download::DownloadItem::InsecureDownloadStatus::UNKNOWN, item->GetForcedFilePath(), base::FilePath(), std::string() /*mime_type*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 69d0848ec..8b37dae3d 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -59,19 +59,18 @@ namespace extensions { namespace { // Implementation based on ComponentLoader::ParseManifest. -std::unique_ptr ParseManifest( - const std::string& manifest_contents) { +absl::optional ParseManifest( + base::StringPiece manifest_contents) { JSONStringValueDeserializer deserializer(manifest_contents); - std::unique_ptr manifest( - deserializer.Deserialize(nullptr, nullptr)); + std::unique_ptr manifest = + deserializer.Deserialize(nullptr, nullptr); if (!manifest.get() || !manifest->is_dict()) { LOG(ERROR) << "Failed to parse extension manifest."; - return nullptr; + return absl::nullopt; } - // Transfer ownership to the caller. - return base::WrapUnique( - static_cast(manifest.release())); + + return std::move(*manifest).TakeDict(); } void ExecuteLoadFailure(CefRefPtr handler, @@ -89,7 +88,7 @@ void ExecuteLoadFailure(CefRefPtr handler, } void LoadExtensionOnUIThread(base::WeakPtr context, - std::unique_ptr manifest, + base::Value::Dict manifest, const base::FilePath& root_directory, bool internal, CefRefPtr loader_context, @@ -115,15 +114,14 @@ void LoadExtensionWithManifest(base::WeakPtr context, CefRefPtr handler) { CEF_REQUIRE_BLOCKING(); - std::unique_ptr manifest = - ParseManifest(manifest_contents); + auto manifest = ParseManifest(manifest_contents); if (!manifest) { LOG(WARNING) << "Failed to parse extension manifest"; ExecuteLoadFailure(handler, ERR_INVALID_ARGUMENT); return; } - LoadExtensionOnUIThread(context, std::move(manifest), root_directory, + LoadExtensionOnUIThread(context, std::move(*manifest), root_directory, internal, loader_context, handler); } @@ -263,9 +261,11 @@ void CefExtensionSystem::Init() { // CefMimeHandlerViewGuestDelegate::OnGuestDetached which removes the // routing ID association with the owner CefBrowser. if (PdfExtensionEnabled()) { - LoadExtension(ParseManifest(pdf_extension_util::GetManifest()), - base::FilePath(FILE_PATH_LITERAL("pdf")), true /* internal */, - nullptr, nullptr); + if (auto manifest = ParseManifest(pdf_extension_util::GetManifest())) { + LoadExtension(std::move(*manifest), + base::FilePath(FILE_PATH_LITERAL("pdf")), + true /* internal */, nullptr, nullptr); + } } initialized_ = true; @@ -296,7 +296,7 @@ void CefExtensionSystem::LoadExtension( // Implementation based on ComponentLoader::Add. void CefExtensionSystem::LoadExtension( - std::unique_ptr manifest, + base::Value::Dict manifest, const base::FilePath& root_directory, bool internal, CefRefPtr loader_context, @@ -312,7 +312,7 @@ void CefExtensionSystem::LoadExtension( } #endif - ComponentExtensionInfo info(manifest.get(), root_directory, internal); + ComponentExtensionInfo info(std::move(manifest), root_directory, internal); const Extension* extension = LoadExtension(info, loader_context, handler); if (!extension) { ExecuteLoadFailure(handler, ERR_FAILED); @@ -518,10 +518,12 @@ bool CefExtensionSystem::FinishDelayedInstallationIfReady( } CefExtensionSystem::ComponentExtensionInfo::ComponentExtensionInfo( - const base::DictionaryValue* manifest, + base::Value::Dict manifest, const base::FilePath& directory, bool internal) - : manifest(manifest), root_directory(directory), internal(internal) { + : manifest(std::move(manifest)), + root_directory(directory), + internal(internal) { if (!root_directory.IsAbsolute()) { // This path structure is required by // url_request_util::MaybeCreateURLRequestResourceBundleJob. @@ -564,7 +566,7 @@ scoped_refptr CefExtensionSystem::CreateExtension( // e.g.: alarms API has 1 minute minimum applied to Packed Extensions info.internal ? mojom::ManifestLocation::kComponent : mojom::ManifestLocation::kCommandLine, - *info.manifest, flags, utf8_error); + info.manifest, flags, utf8_error); } // Implementation based on ComponentLoader::Load and diff --git a/libcef/browser/extensions/extension_system.h b/libcef/browser/extensions/extension_system.h index d9d09d280..a30632859 100644 --- a/libcef/browser/extensions/extension_system.h +++ b/libcef/browser/extensions/extension_system.h @@ -57,7 +57,7 @@ class CefExtensionSystem : public ExtensionSystem { bool internal, CefRefPtr loader_context, CefRefPtr handler); - void LoadExtension(std::unique_ptr manifest, + void LoadExtension(base::Value::Dict manifest, const base::FilePath& root_directory, bool internal, CefRefPtr loader_context, @@ -125,12 +125,12 @@ class CefExtensionSystem : public ExtensionSystem { // Information about a registered component extension. struct ComponentExtensionInfo { - ComponentExtensionInfo(const base::DictionaryValue* manifest, + ComponentExtensionInfo(base::Value::Dict manifest, const base::FilePath& root_directory, bool internal); // The parsed contents of the extensions's manifest file. - const base::DictionaryValue* manifest; + base::Value::Dict manifest; // Directory where the extension is stored. base::FilePath root_directory; diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 1ea11c5e7..0f76a2ac4 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -23,11 +23,11 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/render_frame_host.h" +#include "extensions/browser/api/core_extensions_browser_api_provider.h" #include "extensions/browser/api/extensions_api_client.h" #include "extensions/browser/api/mime_handler_private/mime_handler_private.h" #include "extensions/browser/api/runtime/runtime_api_delegate.h" #include "extensions/browser/app_sorting.h" -#include "extensions/browser/core_extensions_browser_api_provider.h" #include "extensions/browser/event_router.h" #include "extensions/browser/extension_host_delegate.h" #include "extensions/browser/extensions_browser_interface_binders.h" diff --git a/libcef/browser/media_router/media_router_manager.cc b/libcef/browser/media_router/media_router_manager.cc index 767fe7c79..6015439cd 100644 --- a/libcef/browser/media_router/media_router_manager.cc +++ b/libcef/browser/media_router/media_router_manager.cc @@ -9,7 +9,7 @@ #include "components/media_router/browser/media_router_factory.h" #include "components/media_router/browser/media_routes_observer.h" -#include "components/media_router/browser/route_message_observer.h" +#include "components/media_router/browser/presentation_connection_message_observer.h" #include "components/media_router/browser/route_message_util.h" namespace { @@ -39,17 +39,22 @@ class CefMediaRoutesObserver : public media_router::MediaRoutesObserver { }; // Used to receive messages if PresentationConnection is not supported. -class CefRouteMessageObserver : public media_router::RouteMessageObserver { +class CefPresentationConnectionMessageObserver + : public media_router::PresentationConnectionMessageObserver { public: - CefRouteMessageObserver(CefMediaRouterManager* manager, - const media_router::MediaRoute& route) - : media_router::RouteMessageObserver(manager->GetMediaRouter(), - route.media_route_id()), + CefPresentationConnectionMessageObserver( + CefMediaRouterManager* manager, + const media_router::MediaRoute& route) + : media_router::PresentationConnectionMessageObserver( + manager->GetMediaRouter(), + route.media_route_id()), manager_(manager), route_(route) {} - CefRouteMessageObserver(const CefRouteMessageObserver&) = delete; - CefRouteMessageObserver& operator=(const CefRouteMessageObserver&) = delete; + CefPresentationConnectionMessageObserver( + const CefPresentationConnectionMessageObserver&) = delete; + CefPresentationConnectionMessageObserver& operator=( + const CefPresentationConnectionMessageObserver&) = delete; void OnMessagesReceived( CefMediaRouterManager::MediaMessageVector messages) override { @@ -269,7 +274,7 @@ void CefMediaRouterManager::CreateRouteState( } else { // Fallback if PresentationConnection is not supported. state->message_observer_ = - std::make_unique(this, route); + std::make_unique(this, route); state->state_subscription_ = GetMediaRouter()->AddPresentationConnectionStateChangedCallback( route_id, diff --git a/libcef/browser/media_router/media_router_manager.h b/libcef/browser/media_router/media_router_manager.h index e80815412..10f831d60 100644 --- a/libcef/browser/media_router/media_router_manager.h +++ b/libcef/browser/media_router/media_router_manager.h @@ -20,7 +20,7 @@ class BrowserContext; class CefMediaRoutesObserver; class CefPresentationConnection; -class CefRouteMessageObserver; +class CefPresentationConnectionMessageObserver; // Manages CEF usage of MediaRouter. Owned by CefBrowserContext and only // accessed on the UI thread. @@ -80,7 +80,7 @@ class CefMediaRouterManager private: friend class CefMediaRoutesObserver; friend class CefPresentationConnection; - friend class CefRouteMessageObserver; + friend class CefPresentationConnectionMessageObserver; // Do not keep a reference to the object returned by this method. media_router::MediaRouter* GetMediaRouter() const; @@ -99,7 +99,7 @@ class CefMediaRouterManager std::unique_ptr presentation_connection_; // Used if there is no RoutePresentationConnectionPtr. - std::unique_ptr message_observer_; + std::unique_ptr message_observer_; base::CallbackListSubscription state_subscription_; }; void CreateRouteState( diff --git a/libcef/browser/native/menu_runner_mac.mm b/libcef/browser/native/menu_runner_mac.mm index 55b7c78d5..9b3c766a4 100644 --- a/libcef/browser/native/menu_runner_mac.mm +++ b/libcef/browser/native/menu_runner_mac.mm @@ -33,7 +33,7 @@ bool CefMenuRunnerMac::RunContextMenu( menu_controller_); // Make sure events can be pumped while the menu is up. - base::CurrentThread::ScopedNestableTaskAllower allow; + base::CurrentThread::ScopedAllowApplicationTasksInNativeNestedLoop allow; // One of the events that could be pumped is |window.close()|. // User-initiated event-tracking loops protect against this by diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 58e6454df..12391bd16 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -523,7 +523,7 @@ void CefBrowserPlatformDelegateOsr::StartDragging( CefRefPtr drag_data( new CefDragDataImpl(drop_data, cef_image, cef_image_pos)); drag_data->SetReadOnly(true); - base::CurrentThread::ScopedNestableTaskAllower allow; + base::CurrentThread::ScopedAllowApplicationTasksInNativeNestedLoop allow; handled = handler->StartDragging( browser_, drag_data.get(), static_cast(allowed_ops), diff --git a/libcef/browser/osr/software_output_device_proxy.cc b/libcef/browser/osr/software_output_device_proxy.cc index 90ccdd077..ddcbb26bc 100644 --- a/libcef/browser/osr/software_output_device_proxy.cc +++ b/libcef/browser/osr/software_output_device_proxy.cc @@ -31,7 +31,8 @@ SoftwareOutputDeviceProxy::SoftwareOutputDeviceProxy( } void SoftwareOutputDeviceProxy::OnSwapBuffers( - SwapBuffersCallback swap_ack_callback) { + SwapBuffersCallback swap_ack_callback, + gl::FrameData data) { DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); DCHECK(swap_ack_callback_.is_null()); diff --git a/libcef/browser/osr/software_output_device_proxy.h b/libcef/browser/osr/software_output_device_proxy.h index 125d25fb0..3850a73d6 100644 --- a/libcef/browser/osr/software_output_device_proxy.h +++ b/libcef/browser/osr/software_output_device_proxy.h @@ -27,7 +27,8 @@ class VIZ_SERVICE_EXPORT SoftwareOutputDeviceProxy ~SoftwareOutputDeviceProxy() override; // SoftwareOutputDevice implementation. - void OnSwapBuffers(SwapBuffersCallback swap_ack_callback) override; + void OnSwapBuffers(SwapBuffersCallback swap_ack_callback, + gl::FrameData data) override; // SoftwareOutputDeviceBase implementation. void Resize(const gfx::Size& viewport_pixel_size, diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index 51b173f8f..7304c3d02 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -768,7 +768,7 @@ bool CefDictionaryValueImpl::Clear() { // Detach any dependent values. controller()->RemoveDependencies(mutable_value()); - mutable_value()->DictClear(); + mutable_value()->GetDict().clear(); return true; } @@ -1222,7 +1222,7 @@ bool CefListValueImpl::Clear() { // Detach any dependent values. controller()->RemoveDependencies(mutable_value()); - mutable_value()->ClearList(); + mutable_value()->GetList().clear(); return true; } diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 6c0e7b22d..437724e13 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -42,6 +42,7 @@ #include "base/memory/ptr_util.h" #include "base/metrics/user_metrics_action.h" #include "base/path_service.h" +#include "base/process/current_process.h" #include "base/stl_util.h" #include "base/strings/utf_string_conversions.h" #include "build/build_config.h" @@ -196,8 +197,8 @@ void AlloyContentRendererClient::RenderThreadStarted() { if (is_extension) { // The process name was set to "Renderer" in RendererMain(). Update it to // "Extension Renderer" to highlight that it's hosting an extension. - base::trace_event::TraceLog::GetInstance()->set_process_name( - "Extension Renderer"); + base::CurrentProcess::GetInstance().SetProcessType( + base::CurrentProcessType::PROCESS_RENDERER_EXTENSION); } thread->AddObserver(observer_.get()); diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 09875a03d..4955a0e13 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -46,6 +46,19 @@ namespace blink_glue { +namespace { + +blink::ExecutionContext* GetExecutionContext(v8::Local context) { + blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context); + if (frame && + frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) { + return frame->GetDocument()->GetExecutionContext(); + } + return nullptr; +} + +} // namespace + const int64_t kInvalidFrameId = -1; bool CanGoBack(blink::WebView* view) { @@ -73,7 +86,7 @@ void GoBack(blink::WebView* view) { blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame); blink::To(core_frame) ->GetLocalFrameHostRemote() - .GoToEntryAtOffset(-1, true /* has_user_gesture */); + .GoToEntryAtOffset(-1, /*has_user_gesture=*/true, absl::nullopt); } } } @@ -89,7 +102,7 @@ void GoForward(blink::WebView* view) { blink::Frame* core_frame = blink::WebFrame::ToCoreFrame(*main_frame); blink::To(core_frame) ->GetLocalFrameHostRemote() - .GoToEntryAtOffset(1, true /* has_user_gesture */); + .GoToEntryAtOffset(1, /*has_user_gesture=*/true, absl::nullopt); } } } @@ -170,13 +183,9 @@ v8::MaybeLocal CallV8Function(v8::Local context, // Execute the function call using the V8ScriptRunner so that inspector // instrumentation works. - blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context); - DCHECK(frame); - if (frame && - frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) { + if (auto execution_context = GetExecutionContext(context)) { func_rv = blink::V8ScriptRunner::CallFunction( - function, frame->GetDocument()->GetExecutionContext(), receiver, argc, - args, isolate); + function, execution_context, receiver, argc, args, isolate); } return func_rv; @@ -225,6 +234,13 @@ v8::Local ExecuteV8ScriptAndReturnValue( return v8::Local(); } +v8::MicrotaskQueue* GetMicrotaskQueue(v8::Local context) { + if (auto execution_context = GetExecutionContext(context)) { + return execution_context->GetMicrotaskQueue(); + } + return nullptr; +} + bool IsScriptForbidden() { return blink::ScriptForbiddenScope::IsScriptForbidden(); } diff --git a/libcef/renderer/blink_glue.h b/libcef/renderer/blink_glue.h index 31716c225..9a19aa300 100644 --- a/libcef/renderer/blink_glue.h +++ b/libcef/renderer/blink_glue.h @@ -71,6 +71,9 @@ BLINK_EXPORT v8::Local ExecuteV8ScriptAndReturnValue( v8::Local context, v8::TryCatch& tryCatch); +BLINK_EXPORT v8::MicrotaskQueue* GetMicrotaskQueue( + v8::Local context); + BLINK_EXPORT bool IsScriptForbidden(); class BLINK_EXPORT CefObserverRegistration { diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 26c3d0cb4..b42c53359 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -973,7 +973,8 @@ bool CefV8Context::InContext() { CefV8ContextImpl::CefV8ContextImpl(v8::Isolate* isolate, v8::Local context) - : handle_(new Handle(isolate, context, context)), enter_count_(0) {} + : handle_(new Handle(isolate, context, context)), + microtask_queue_(blink_glue::GetMicrotaskQueue(context)) {} CefV8ContextImpl::~CefV8ContextImpl() { DLOG_ASSERT(0 == enter_count_); @@ -1041,8 +1042,8 @@ bool CefV8ContextImpl::Enter() { if (!microtasks_scope_) { // Increment the MicrotasksScope recursion level. - microtasks_scope_.reset( - new v8::MicrotasksScope(isolate, v8::MicrotasksScope::kRunMicrotasks)); + microtasks_scope_.reset(new v8::MicrotasksScope( + isolate, microtask_queue_, v8::MicrotasksScope::kRunMicrotasks)); } ++enter_count_; diff --git a/libcef/renderer/v8_impl.h b/libcef/renderer/v8_impl.h index 63e62a77e..af18e9c64 100644 --- a/libcef/renderer/v8_impl.h +++ b/libcef/renderer/v8_impl.h @@ -187,8 +187,9 @@ class CefV8ContextImpl : public CefV8Context { private: using Handle = CefV8Handle; scoped_refptr handle_; + v8::MicrotaskQueue* const microtask_queue_; - int enter_count_; + int enter_count_ = 0; std::unique_ptr microtasks_scope_; IMPLEMENT_REFCOUNTING(CefV8ContextImpl); diff --git a/patch/patch.cfg b/patch/patch.cfg index c3ae35fd3..2aa6ca9ba 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -122,9 +122,6 @@ patches = [ # Windows: Fix incorrect DIPToScreenRect usage in DesktopWindowTreeHostWin # when |has_external_parent_| is true. # https://bitbucket.org/chromiumembedded/cef/issues/3359 - # - # Windows: Fix 1px gap with maximized frameless windows on Win11. - # https://bitbucket.org/chromiumembedded/cef/issues/3414 'name': 'views_widget', }, { @@ -609,15 +606,5 @@ patches = [ # use_sysroot=false on Ubuntu 18.04. # https://chromium-review.googlesource.com/c/chromium/src/+/3960017 'name': 'linux_glib_deprecated_volatile' - }, - { - # Windows: Add ENABLE_BASE_TRACING check to fix cef_sandbox build. - # https://chromium-review.googlesource.com/c/chromium/src/+/4016554 - 'name': 'base_process_4016554' - }, - { - # Windows: Add ENABLE_BASE_TRACING check to fix cef_sandbox build. - # https://chromium-review.googlesource.com/c/chromium/src/+/4015625 - 'name': 'base_task_4015625' } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index 8a7c0aa66..fc4f09511 100644 --- a/patch/patches/base_command_line_1872.patch +++ b/patch/patches/base_command_line_1872.patch @@ -1,8 +1,8 @@ diff --git base/command_line.cc base/command_line.cc -index 2f3596defccf4..9d4e42bbeb473 100644 +index d65d212e4e9c7..3a7dea16e2465 100644 --- base/command_line.cc +++ base/command_line.cc -@@ -339,11 +339,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, +@@ -340,11 +340,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, void CommandLine::AppendSwitchNative(StringPiece switch_string, CommandLine::StringPieceType value) { diff --git a/patch/patches/base_process_4016554.patch b/patch/patches/base_process_4016554.patch deleted file mode 100644 index e1746391d..000000000 --- a/patch/patches/base_process_4016554.patch +++ /dev/null @@ -1,207 +0,0 @@ -diff --git base/process/current_process.cc base/process/current_process.cc -index d7d705b78bc6b..71e08439a6855 100644 ---- base/process/current_process.cc -+++ base/process/current_process.cc -@@ -8,84 +8,96 @@ namespace base { - - namespace { - --struct ProcessName { -- CurrentProcessType type; -- const char* name; --}; -- --constexpr ProcessName kProcessNames[] = { -- {CurrentProcessType::PROCESS_UNSPECIFIED, "Null"}, -- {CurrentProcessType::PROCESS_BROWSER, "Browser"}, -- {CurrentProcessType::PROCESS_RENDERER, "Renderer"}, -- {CurrentProcessType::PROCESS_UTILITY, "Utility"}, -- {CurrentProcessType::PROCESS_ZYGOTE, "SandboxHelper"}, -- {CurrentProcessType::PROCESS_GPU, "Gpu"}, -- {CurrentProcessType::PROCESS_PPAPI_PLUGIN, "PpapiPlugin"}, -- {CurrentProcessType::PROCESS_PPAPI_BROKER, "PpapiBroker"}, -- {CurrentProcessType::PROCESS_SERVICE_NETWORK, -- "Service: network.mojom.NetworkService"}, -- {CurrentProcessType::PROCESS_SERVICE_TRACING, -- "Service: tracing.mojom.TracingService"}, -- {CurrentProcessType::PROCESS_SERVICE_STORAGE, -- "Service: storage.mojom.StorageService"}, -- {CurrentProcessType::PROCESS_SERVICE_AUDIO, -- "Service: audio.mojom.AudioService"}, -- {CurrentProcessType::PROCESS_SERVICE_DATA_DECODER, -- "Service: data_decoder.mojom.DataDecoderService"}, -- {CurrentProcessType::PROCESS_SERVICE_UTIL_WIN, -- "Service: chrome.mojom.UtilWin"}, -- {CurrentProcessType::PROCESS_SERVICE_PROXY_RESOLVER, -- "Service: proxy_resolver.mojom.ProxyResolverFactory"}, -- {CurrentProcessType::PROCESS_SERVICE_CDM, -- "Service: media.mojom.CdmService"}, -- {CurrentProcessType::PROCESS_SERVICE_VIDEO_CAPTURE, -- "Service: video_capture.mojom.VideoCaptureService"}, -- {CurrentProcessType::PROCESS_SERVICE_UNZIPPER, -- "Service: unzip.mojom.Unzipper"}, -- {CurrentProcessType::PROCESS_SERVICE_MIRRORING, -- "Service: mirroring.mojom.MirroringService"}, -- {CurrentProcessType::PROCESS_SERVICE_FILEPATCHER, -- "Service: patch.mojom.FilePatcher"}, -- {CurrentProcessType::PROCESS_SERVICE_TTS, -- "Service: chromeos.tts.mojom.TtsService"}, -- {CurrentProcessType::PROCESS_SERVICE_PRINTING, -- "Service: printing.mojom.PrintingService"}, -- {CurrentProcessType::PROCESS_SERVICE_QUARANTINE, -- "Service: quarantine.mojom.Quarantine"}, -- {CurrentProcessType::PROCESS_SERVICE_CROS_LOCALSEARCH, -- "Service: chromeos.local_search_service.mojom.LocalSearchService"}, -- {CurrentProcessType::PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER, -- "Service: chromeos.assistant.mojom.AssistantAudioDecoderFactory"}, -- {CurrentProcessType::PROCESS_SERVICE_FILEUTIL, -- "Service: chrome.mojom.FileUtilService"}, -- {CurrentProcessType::PROCESS_SERVICE_PRINTCOMPOSITOR, -- "Service: printing.mojom.PrintCompositor"}, -- {CurrentProcessType::PROCESS_SERVICE_PAINTPREVIEW, -- "Service: paint_preview.mojom.PaintPreviewCompositorCollection"}, -- {CurrentProcessType::PROCESS_SERVICE_SPEECHRECOGNITION, -- "Service: media.mojom.SpeechRecognitionService"}, -- {CurrentProcessType::PROCESS_SERVICE_XRDEVICE, -- "Service: device.mojom.XRDeviceService"}, -- {CurrentProcessType::PROCESS_SERVICE_READICON, -- "Service: chrome.mojom.UtilReadIcon"}, -- {CurrentProcessType::PROCESS_SERVICE_LANGUAGEDETECTION, -- "Service: language_detection.mojom.LanguageDetectionService"}, -- {CurrentProcessType::PROCESS_SERVICE_SHARING, -- "Service: sharing.mojom.Sharing"}, -- {CurrentProcessType::PROCESS_SERVICE_MEDIAPARSER, -- "Service: chrome.mojom.MediaParserFactory"}, -- {CurrentProcessType::PROCESS_SERVICE_QRCODEGENERATOR, -- "Service: qrcode_generator.mojom.QRCodeGeneratorService"}, -- {CurrentProcessType::PROCESS_SERVICE_PROFILEIMPORT, -- "Service: chrome.mojom.ProfileImport"}, -- {CurrentProcessType::PROCESS_SERVICE_IME, -- "Service: chromeos.ime.mojom.ImeService"}, -- {CurrentProcessType::PROCESS_SERVICE_RECORDING, -- "Service: recording.mojom.RecordingService"}, -- {CurrentProcessType::PROCESS_SERVICE_SHAPEDETECTION, -- "Service: shape_detection.mojom.ShapeDetectionService"}, -- {CurrentProcessType::PROCESS_RENDERER_EXTENSION, "Extension Renderer"}, --}; -+const char* GetNameForProcessType(CurrentProcessType process_type) { -+#if BUILDFLAG(ENABLE_BASE_TRACING) -+ switch (process_type) { -+ case CurrentProcessType::PROCESS_UNSPECIFIED: -+ return "Null"; -+ case CurrentProcessType::PROCESS_BROWSER: -+ return "Browser"; -+ case CurrentProcessType::PROCESS_RENDERER: -+ return "Renderer"; -+ case CurrentProcessType::PROCESS_UTILITY: -+ return "Utility"; -+ case CurrentProcessType::PROCESS_ZYGOTE: -+ return "Zygote"; -+ case CurrentProcessType::PROCESS_SANDBOX_HELPER: -+ return "SandboxHelper"; -+ case CurrentProcessType::PROCESS_GPU: -+ return "Gpu"; -+ case CurrentProcessType::PROCESS_PPAPI_PLUGIN: -+ return "PpapiPlugin"; -+ case CurrentProcessType::PROCESS_PPAPI_BROKER: -+ return "PpapiBroker"; -+ case CurrentProcessType::PROCESS_SERVICE_NETWORK: -+ return "Service: network.mojom.NetworkService"; -+ case CurrentProcessType::PROCESS_SERVICE_TRACING: -+ return "Service: tracing.mojom.TracingService"; -+ case CurrentProcessType::PROCESS_SERVICE_STORAGE: -+ return "Service: storage.mojom.StorageService"; -+ case CurrentProcessType::PROCESS_SERVICE_AUDIO: -+ return "Service: audio.mojom.AudioService"; -+ case CurrentProcessType::PROCESS_SERVICE_DATA_DECODER: -+ return "Service: data_decoder.mojom.DataDecoderService"; -+ case CurrentProcessType::PROCESS_SERVICE_UTIL_WIN: -+ return "Service: chrome.mojom.UtilWin"; -+ case CurrentProcessType::PROCESS_SERVICE_PROXY_RESOLVER: -+ return "Service: proxy_resolver.mojom.ProxyResolverFactory"; -+ case CurrentProcessType::PROCESS_SERVICE_CDM: -+ return "Service: media.mojom.CdmService"; -+ case CurrentProcessType::PROCESS_SERVICE_VIDEO_CAPTURE: -+ return "Service: video_capture.mojom.VideoCaptureService"; -+ case CurrentProcessType::PROCESS_SERVICE_UNZIPPER: -+ return "Service: unzip.mojom.Unzipper"; -+ case CurrentProcessType::PROCESS_SERVICE_MIRRORING: -+ return "Service: mirroring.mojom.MirroringService"; -+ case CurrentProcessType::PROCESS_SERVICE_FILEPATCHER: -+ return "Service: patch.mojom.FilePatcher"; -+ case CurrentProcessType::PROCESS_SERVICE_TTS: -+ return "Service: chromeos.tts.mojom.TtsService"; -+ case CurrentProcessType::PROCESS_SERVICE_PRINTING: -+ return "Service: printing.mojom.PrintingService"; -+ case CurrentProcessType::PROCESS_SERVICE_QUARANTINE: -+ return "Service: quarantine.mojom.Quarantine"; -+ case CurrentProcessType::PROCESS_SERVICE_CROS_LOCALSEARCH: -+ return "Service: chromeos.local_search_service.mojom.LocalSearchService"; -+ case CurrentProcessType::PROCESS_SERVICE_CROS_ASSISTANT_AUDIO_DECODER: -+ return "Service: chromeos.assistant.mojom.AssistantAudioDecoderFactory"; -+ case CurrentProcessType::PROCESS_SERVICE_FILEUTIL: -+ return "Service: chrome.mojom.FileUtilService"; -+ case CurrentProcessType::PROCESS_SERVICE_PRINTCOMPOSITOR: -+ return "Service: printing.mojom.PrintCompositor"; -+ case CurrentProcessType::PROCESS_SERVICE_PAINTPREVIEW: -+ return "Service: paint_preview.mojom.PaintPreviewCompositorCollection"; -+ case CurrentProcessType::PROCESS_SERVICE_SPEECHRECOGNITION: -+ return "Service: media.mojom.SpeechRecognitionService"; -+ case CurrentProcessType::PROCESS_SERVICE_XRDEVICE: -+ return "Service: device.mojom.XRDeviceService"; -+ case CurrentProcessType::PROCESS_SERVICE_READICON: -+ return "Service: chrome.mojom.UtilReadIcon"; -+ case CurrentProcessType::PROCESS_SERVICE_LANGUAGEDETECTION: -+ return "Service: language_detection.mojom.LanguageDetectionService"; -+ case CurrentProcessType::PROCESS_SERVICE_SHARING: -+ return "Service: sharing.mojom.Sharing"; -+ case CurrentProcessType::PROCESS_SERVICE_MEDIAPARSER: -+ return "Service: chrome.mojom.MediaParserFactory"; -+ case CurrentProcessType::PROCESS_SERVICE_QRCODEGENERATOR: -+ return "Service: qrcode_generator.mojom.QRCodeGeneratorService"; -+ case CurrentProcessType::PROCESS_SERVICE_PROFILEIMPORT: -+ return "Service: chrome.mojom.ProfileImport"; -+ case CurrentProcessType::PROCESS_SERVICE_IME: -+ return "Service: chromeos.ime.mojom.ImeService"; -+ case CurrentProcessType::PROCESS_SERVICE_RECORDING: -+ return "Service: recording.mojom.RecordingService"; -+ case CurrentProcessType::PROCESS_SERVICE_SHAPEDETECTION: -+ return "Service: shape_detection.mojom.ShapeDetectionService"; -+ case CurrentProcessType::PROCESS_RENDERER_EXTENSION: -+ return "Extension Renderer"; -+ } -+#else -+ return "Null"; -+#endif // BUILDFLAG(ENABLE_BASE_TRACING) -+} - - } // namespace - -@@ -96,12 +108,7 @@ CurrentProcess& CurrentProcess::GetInstance() { - } - - void CurrentProcess::SetProcessType(CurrentProcessType process_type) { -- std::string process_name; -- for (size_t i = 0; i < std::size(kProcessNames); ++i) { -- if (process_type == kProcessNames[i].type) { -- process_name = kProcessNames[i].name; -- } -- } -+ std::string process_name = GetNameForProcessType(process_type); - CurrentProcess::GetInstance().SetProcessNameAndType(process_name, - process_type); - } -diff --git base/trace_event/trace_event_stub.h base/trace_event/trace_event_stub.h -index adb407d72b8e5..1ced7d3903ff1 100644 ---- base/trace_event/trace_event_stub.h -+++ base/trace_event/trace_event_stub.h -@@ -256,9 +256,6 @@ inline const char* QueueName_Name(QueueName value) { - namespace ChromeProcessDescriptor { - - enum ProcessType {}; --inline const char* ProcessType_Name(ProcessType process_type) { -- return ""; --} - - } // namespace ChromeProcessDescriptor - diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index ad41956a6..8e17684e9 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,16 +1,16 @@ diff --git base/BUILD.gn base/BUILD.gn -index 304a8d1891a98..13be431518cc4 100644 +index 904eaff4687de..3e5912b7910df 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -39,6 +39,7 @@ import("//build/nocompile.gni") - import("//build/rust/mixed_component.gni") +@@ -38,6 +38,7 @@ import("//build/config/ui.gni") + import("//build/nocompile.gni") import("//build/timestamp.gni") import("//build_overrides/build.gni") +import("//cef/libcef/features/features.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1993,7 +1994,11 @@ mixed_component("base") { +@@ -1966,7 +1967,11 @@ component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 304a8d1891a98..13be431518cc4 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2134,6 +2139,12 @@ mixed_component("base") { +@@ -2107,6 +2112,12 @@ component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -37,10 +37,10 @@ index 304a8d1891a98..13be431518cc4 100644 "cfgmgr32.lib", "powrprof.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index 4a1bf8191ba2c..1fed45b2ac0d9 100644 +index 8c5b7e7d71a56..195d8ae273e31 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc -@@ -13,6 +13,7 @@ +@@ -14,6 +14,7 @@ #include "base/dcheck_is_on.h" #include "base/no_destructor.h" #include "base/sampling_heap_profiler/poisson_allocation_sampler.h" @@ -48,7 +48,7 @@ index 4a1bf8191ba2c..1fed45b2ac0d9 100644 #if DCHECK_IS_ON() #include -@@ -260,7 +261,7 @@ struct Dispatcher::Impl { +@@ -276,7 +277,7 @@ struct Dispatcher::Impl { } void Reset() { @@ -88,35 +88,17 @@ index 29626e5853c6e..2fb1c61504c5d 100644 #else #include "base/hash/sha1_boringssl.h" diff --git base/memory/raw_ptr.h base/memory/raw_ptr.h -index d3e96a9bcf0a2..e7f9003405743 100644 +index 4191f0e47f51e..0167438657063 100644 --- base/memory/raw_ptr.h +++ base/memory/raw_ptr.h -@@ -22,6 +22,7 @@ - #include "base/base_export.h" +@@ -21,6 +21,7 @@ + #include "base/allocator/partition_allocator/partition_alloc_config.h" #include "build/build_config.h" #include "build/buildflag.h" +#include "cef/libcef/features/features.h" - // A strange dance is done here to provide `CHECK` for `raw_ptr` - // in the presence of NaCl. The constraints are: -@@ -39,7 +40,7 @@ - // macro isn't used _everywhere_ (e.g. not in the implementation of - // BRP) because we assert that NaCl always uses RawPtrNoOpImpl (see - // `static_assert` below). --#if BUILDFLAG(IS_NACL) -+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD) - #include "base/check.h" - #define PA_RAW_PTR_CHECK(condition) CHECK(condition) - #else -@@ -993,7 +994,7 @@ class PA_TRIVIAL_ABI PA_GSL_POINTER raw_ptr { - raw_ptr>, - raw_ptr>; - --#if BUILDFLAG(IS_NACL) -+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD) - // See comment at top about `PA_RAW_PTR_CHECK()`. - static_assert(std::is_same_v); - #endif // BUILDFLAG(IS_NACL) + #if defined(PA_ENABLE_MTE_CHECKED_PTR_SUPPORT_WITH_64_BITS_POINTERS) + #include "base/allocator/partition_allocator/partition_tag.h" diff --git base/rand_util.h base/rand_util.h index 04024537ee698..59864cb084559 100644 --- base/rand_util.h @@ -142,10 +124,10 @@ index 04024537ee698..59864cb084559 100644 public: using result_type = uint64_t; diff --git base/rand_util_win.cc base/rand_util_win.cc -index 099fe2912be23..758fa0c4296af 100644 +index 2d9a1633b564f..d304c204c43ff 100644 --- base/rand_util_win.cc +++ base/rand_util_win.cc -@@ -20,14 +20,19 @@ +@@ -21,14 +21,19 @@ #include #include "base/check.h" @@ -165,7 +147,7 @@ index 099fe2912be23..758fa0c4296af 100644 namespace { // The BoringSSl helpers are duplicated in rand_util_fuchsia.cc and -@@ -49,11 +54,16 @@ bool UseBoringSSLForRandBytes() { +@@ -50,11 +55,16 @@ bool UseBoringSSLForRandBytes() { return g_use_boringssl.load(std::memory_order_relaxed); } @@ -182,7 +164,7 @@ index 099fe2912be23..758fa0c4296af 100644 if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { // Ensure BoringSSL is initialized so it can use things like RDRAND. CRYPTO_library_init(); -@@ -61,6 +71,7 @@ void RandBytes(void* output, size_t output_length, bool avoid_allocation) { +@@ -62,6 +72,7 @@ void RandBytes(void* output, size_t output_length, bool avoid_allocation) { (void)RAND_bytes(static_cast(output), output_length); return; } @@ -191,10 +173,10 @@ index 099fe2912be23..758fa0c4296af 100644 char* output_ptr = static_cast(output); while (output_length > 0) { diff --git base/unguessable_token.cc base/unguessable_token.cc -index dcef8fbda4493..c8034ebc44b23 100644 +index ebb51d95575d3..fd9dc67dcf470 100644 --- base/unguessable_token.cc +++ base/unguessable_token.cc -@@ -9,8 +9,9 @@ +@@ -10,8 +10,9 @@ #include "base/format_macros.h" #include "base/rand_util.h" #include "build/build_config.h" @@ -205,7 +187,7 @@ index dcef8fbda4493..c8034ebc44b23 100644 #include "third_party/boringssl/src/include/openssl/mem.h" #endif -@@ -41,7 +42,7 @@ UnguessableToken UnguessableToken::Deserialize(uint64_t high, uint64_t low) { +@@ -44,7 +45,7 @@ UnguessableToken UnguessableToken::Deserialize(uint64_t high, uint64_t low) { } bool UnguessableToken::operator==(const UnguessableToken& other) const { @@ -214,3 +196,46 @@ index dcef8fbda4493..c8034ebc44b23 100644 // BoringSSL is unavailable for NaCl builds so it remains timing dependent. return token_ == other.token_; #else +diff --git base/win/sid.cc base/win/sid.cc +index 50a120166f08a..dc7da1949b6b1 100644 +--- base/win/sid.cc ++++ base/win/sid.cc +@@ -16,14 +16,19 @@ + #include + + #include "base/check.h" ++#include "base/notreached.h" + #include "base/no_destructor.h" + #include "base/rand_util.h" + #include "base/strings/string_util_win.h" + #include "base/win/scoped_handle.h" + #include "base/win/scoped_localalloc.h" + #include "base/win/windows_version.h" ++#include "cef/libcef/features/features.h" ++ ++#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + #include "third_party/boringssl/src/include/openssl/crypto.h" + #include "third_party/boringssl/src/include/openssl/sha.h" ++#endif + + namespace base::win { + +@@ -124,6 +129,7 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { + if (known_cap != known_capabilities->end()) { + return FromKnownCapability(known_cap->second); + } ++#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + CRYPTO_library_init(); + static_assert((SHA256_DIGEST_LENGTH / sizeof(DWORD)) == + SECURITY_APP_PACKAGE_RID_COUNT); +@@ -136,6 +142,10 @@ Sid Sid::FromNamedCapability(const std::wstring& capability_name) { + reinterpret_cast(&rids[2])); + return FromSubAuthorities(SECURITY_APP_PACKAGE_AUTHORITY, std::size(rids), + rids); ++#else ++ NOTREACHED(); ++ return Sid(WellKnownSid::kNull); ++#endif + } + + Sid Sid::FromKnownSid(WellKnownSid type) { diff --git a/patch/patches/base_task_4015625.patch b/patch/patches/base_task_4015625.patch deleted file mode 100644 index 66552017f..000000000 --- a/patch/patches/base_task_4015625.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git base/task/common/task_annotator.cc base/task/common/task_annotator.cc -index 289d1d1f1bd88..b9ed6e32fdc44 100644 ---- base/task/common/task_annotator.cc -+++ base/task/common/task_annotator.cc -@@ -292,6 +292,12 @@ TaskAnnotator::LongTaskTracker::~LongTaskTracker() { - perfetto::Track::ThreadScoped(task_annotator_), - task_end_time); - } -+#if !BUILDFLAG(ENABLE_BASE_TRACING) -+ // Suppress the unused variable warning when TRACE_EVENT macros are turned -+ // into no-op. -+ (void)pending_task_; -+ (void)task_annotator_; -+#endif // !BUILDFLAG(ENABLE_BASE_TRACING) - } - - void TaskAnnotator::LongTaskTracker::SetIpcDetails(const char* interface_name, diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 385a4d0de..597a5e933 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,5 +1,5 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index 30c7921b6ddba..915ff0d89eeba 100644 +index ff470894fc907..7719b8f7e7745 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc @@ -271,7 +271,7 @@ BrowserTaskExecutor::OnUserInputStart() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index d88423e43..e10582f3a 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -20,10 +20,10 @@ index 18c138c21a853..554e22458da45 100644 // TODO(wjmaclean): We should update the ProcessLock comparison API diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index cd1650e1e1ad0..6768097b3a271 100644 +index 8dcc8499e45be..2116054a66828 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -6671,10 +6671,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( +@@ -6780,10 +6780,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( bool use_opaque_origin = (sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) == network::mojom::WebSandboxFlags::kOrigin; @@ -47,7 +47,7 @@ index cd1650e1e1ad0..6768097b3a271 100644 } return origin_and_debug_info; -@@ -6704,6 +6716,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { +@@ -6813,6 +6825,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() { GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo( SandboxFlagsToCommit()); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 79df1760f..e493b22b9 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 3eede98ae4e1d..df81b6b75d9bc 100644 +index 944a039d066f6..5469f6662391a 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1891,8 +1891,6 @@ config("thin_archive") { +@@ -1883,8 +1883,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 1d59386e9..391a00343 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 579d2c1b3db06..6f1e7e69e8ada 100644 +index d7c913bdfe3b5..7443d705d634c 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 579d2c1b3db06..6f1e7e69e8ada 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1981,6 +1982,7 @@ static_library("browser") { +@@ -1973,6 +1974,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 579d2c1b3db06..6f1e7e69e8ada 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2536,6 +2538,10 @@ static_library("browser") { +@@ -2529,6 +2531,10 @@ static_library("browser") { ] } @@ -29,7 +29,7 @@ index 579d2c1b3db06..6f1e7e69e8ada 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -6377,8 +6383,6 @@ static_library("browser") { +@@ -6375,8 +6381,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 5fa83514a..86ca4c6c2 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index f365449df16a8..91afb283a41f5 100644 +index a640eeb910307..c32d7827e9240 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h -@@ -198,9 +198,9 @@ class BrowserProcess { +@@ -199,9 +199,9 @@ class BrowserProcess { virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0; @@ -14,10 +14,10 @@ index f365449df16a8..91afb283a41f5 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index d1962357f5e1a..9e7b9abcca851 100644 +index b924f221dcb3c..9e156b83787ca 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1007,18 +1007,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1030,18 +1030,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -38,7 +38,7 @@ index d1962357f5e1a..9e7b9abcca851 100644 std::unique_ptr manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index f8a1250d7ba07..0ce11cd182281 100644 +index ecae3d0e0ca71..83e7bbdbbe4ce 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess, @@ -52,10 +52,10 @@ index f8a1250d7ba07..0ce11cd182281 100644 std::unique_ptr manager) override; #endif diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc -index bfcd165aa529e..1c5eb471a561c 100644 +index 9210206d6fe6c..df950ed67ba38 100644 --- chrome/browser/lifetime/browser_close_manager.cc +++ chrome/browser/lifetime/browser_close_manager.cc -@@ -157,12 +157,14 @@ void BrowserCloseManager::CloseBrowsers() { +@@ -158,12 +158,14 @@ void BrowserCloseManager::CloseBrowsers() { // exit can restore all browsers open before exiting. ProfileManager::ShutdownSessionServices(); #endif diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index f19a96743..849d23386 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc -index af62c19be9db6..d58f033cffecc 100644 +index 2ffda8141468b..1800b34155201 100644 --- chrome/browser/browser_about_handler.cc +++ chrome/browser/browser_about_handler.cc -@@ -70,6 +70,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { +@@ -69,6 +69,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { FROM_HERE, base::BindOnce(&chrome::AttemptExit)); return true; } @@ -13,7 +13,7 @@ index af62c19be9db6..d58f033cffecc 100644 return false; } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 57133a0b9c92a..966528a3a8246 100644 +index 932388c328889..68103c2a8ffcf 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 57133a0b9c92a..966528a3a8246 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -368,6 +369,10 @@ static_library("ui") { +@@ -363,6 +364,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -35,7 +35,7 @@ index 57133a0b9c92a..966528a3a8246 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 -@@ -391,6 +396,7 @@ static_library("ui") { +@@ -386,6 +391,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -43,7 +43,7 @@ index 57133a0b9c92a..966528a3a8246 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -5714,6 +5720,7 @@ static_library("ui") { +@@ -5727,6 +5733,7 @@ static_library("ui") { if (enable_printing) { deps += [ "//components/printing/browser", @@ -52,7 +52,7 @@ index 57133a0b9c92a..966528a3a8246 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index f0789647f62c8..43346941d64a3 100644 +index a839ea0969600..b92b5a30ec2e1 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc @@ -265,6 +265,25 @@ @@ -95,7 +95,20 @@ index f0789647f62c8..43346941d64a3 100644 location_bar_model_ = std::make_unique( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -1337,6 +1363,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -645,6 +671,12 @@ Browser::~Browser() { + // away so they don't try and call back to us. + if (select_file_dialog_.get()) + select_file_dialog_->ListenerDestroyed(); ++ ++ // Clean up any objects attached via UserData before implicit destruction ++ // of CreateParams. Destruction of those objects may call into something ++ // (ProfileImpl, PrefService, etc) that will be destroyed when the last ++ // CefRequestContextImpl reference (held by CreateParams) is released. ++ ClearAllUserData(); + } + + /////////////////////////////////////////////////////////////////////////////// +@@ -1337,6 +1369,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -110,7 +123,7 @@ index f0789647f62c8..43346941d64a3 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1344,8 +1378,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1344,8 +1384,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -131,7 +144,7 @@ index f0789647f62c8..43346941d64a3 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1552,6 +1596,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1554,6 +1604,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -146,7 +159,7 @@ index f0789647f62c8..43346941d64a3 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1682,6 +1734,15 @@ void Browser::AddNewContents( +@@ -1684,6 +1742,15 @@ void Browser::AddNewContents( return; } @@ -162,7 +175,7 @@ index f0789647f62c8..43346941d64a3 100644 chrome::AddWebContents(this, source, std::move(new_contents), target_url, disposition, window_features, window_action); } -@@ -1700,6 +1761,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1702,6 +1769,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -171,7 +184,7 @@ index f0789647f62c8..43346941d64a3 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1727,6 +1790,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1729,6 +1798,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -180,7 +193,7 @@ index f0789647f62c8..43346941d64a3 100644 if (!GetStatusBubble()) return; -@@ -1734,6 +1799,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1736,6 +1807,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -198,7 +211,7 @@ index f0789647f62c8..43346941d64a3 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1758,6 +1834,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1760,6 +1842,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -218,7 +231,7 @@ index f0789647f62c8..43346941d64a3 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1850,6 +1939,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1852,6 +1947,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -229,7 +242,7 @@ index f0789647f62c8..43346941d64a3 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1894,6 +1987,8 @@ void Browser::RendererResponsive( +@@ -1896,6 +1995,8 @@ void Browser::RendererResponsive( void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) { if (web_contents == tab_strip_model_->GetActiveWebContents()) UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); @@ -238,7 +251,7 @@ index f0789647f62c8..43346941d64a3 100644 } content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1954,11 +2049,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1956,11 +2057,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -254,7 +267,7 @@ index f0789647f62c8..43346941d64a3 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2153,6 +2252,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2159,6 +2264,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -270,16 +283,16 @@ index f0789647f62c8..43346941d64a3 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2691,13 +2799,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2695,13 +2809,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { + bool show_by_default = true; + - // In kiosk and exclusive app mode we want to always hide the status bubble. + // In web apps, and in kiosk and exclusive app mode we want to always hide the + // status bubble. if (chrome::IsRunningInAppMode() || - (base::FeatureList::IsEnabled(features::kRemoveStatusBarInWebApps) && - web_app::AppBrowserController::IsWebApp(this))) { + web_app::AppBrowserController::IsWebApp(this)) { - return nullptr; + show_by_default = false; } @@ -292,7 +305,7 @@ index f0789647f62c8..43346941d64a3 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2827,6 +2942,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2831,6 +2952,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { content_translate_driver->RemoveTranslationObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); } @@ -404,10 +417,10 @@ index b50337f317a66..b12c2e76f32f8 100644 // The following factory is used for chrome update coalescing. diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index 6048fa087031e..e77be35cf4540 100644 +index abe8e2d792d53..33723c6e9f9a5 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc -@@ -558,6 +558,13 @@ std::unique_ptr CreateTargetContents( +@@ -561,6 +561,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 b035a5a04..cf9c87d40 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -56,7 +56,7 @@ index c8a0156b69cc3..6a6fac072143d 100644 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) SupervisedUserSettingsService* supervised_service = diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index 41947c7d3ff0c..dbfbca256e0d1 100644 +index 7847420167a30..c18f0f023c72c 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules( diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 683a9c8a4..9f17ddbd0 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 3718ed86606d6..0721a4475ce81 100644 +index 1907eb7b5c677..c437f31bc260e 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc @@ -310,6 +310,13 @@ base::OnceCallback* GetMenuShownCallback() { @@ -27,7 +27,7 @@ index 3718ed86606d6..0721a4475ce81 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -743,6 +754,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -744,6 +755,14 @@ RenderViewContextMenu::RenderViewContextMenu( ? GetBrowser()->app_controller()->system_app() : nullptr; #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -42,7 +42,7 @@ index 3718ed86606d6..0721a4475ce81 100644 } RenderViewContextMenu::~RenderViewContextMenu() = default; -@@ -1161,6 +1180,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1162,6 +1181,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 3718ed86606d6..0721a4475ce81 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3026,6 +3051,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3011,6 +3036,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,7 +69,7 @@ index 3718ed86606d6..0721a4475ce81 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 3199231012c45..3ee3a17dab4de 100644 +index 203daac4b57ce..4a18c2f5b6034 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -134,6 +134,12 @@ class RenderViewContextMenu @@ -85,7 +85,7 @@ index 3199231012c45..3ee3a17dab4de 100644 protected: Profile* GetProfile() const; -@@ -387,6 +393,9 @@ class RenderViewContextMenu +@@ -386,6 +392,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -96,10 +96,10 @@ index 3199231012c45..3ee3a17dab4de 100644 // "Use enhanced spell check" items. std::unique_ptr spelling_suggestions_menu_observer_; diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -index 82f78a7045ed7..c80825c225b50 100644 +index 42d0c503bd2e9..03063d0f6f723 100644 --- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc +++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc -@@ -146,6 +146,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, +@@ -148,6 +148,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent, bool RenderViewContextMenuViews::GetAcceleratorForCommandId( int command_id, ui::Accelerator* accel) const { @@ -110,10 +110,10 @@ index 82f78a7045ed7..c80825c225b50 100644 // that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do. switch (command_id) { diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc -index c174f3aff2780..d072711c15c4e 100644 +index 4b20d72d73a02..41d331e469f41 100644 --- components/renderer_context_menu/render_view_context_menu_base.cc +++ components/renderer_context_menu/render_view_context_menu_base.cc -@@ -378,6 +378,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { +@@ -382,6 +382,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const { return false; } diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index b123ba274..f83d3eca3 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 0b9bf62547e6e..e908456356ce4 100644 +index ec9d8e38dd4ba..56ed3f097843c 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -20,6 +20,7 @@ @@ -24,7 +24,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 ShowFolderUploadConfirmationDialog( path, base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this), -@@ -367,6 +375,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded( +@@ -341,6 +349,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded( if (AbortIfWebContentsDestroyed()) return; @@ -37,7 +37,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 #if BUILDFLAG(FULL_SAFE_BROWSING) enterprise_connectors::ContentAnalysisDelegate::Data data; if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled( -@@ -480,7 +494,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() { +@@ -528,7 +542,8 @@ bool FileSelectHelper::IsDirectoryEnumerationStartedForTesting() { std::unique_ptr FileSelectHelper::GetFileTypesFromAcceptType( @@ -47,7 +47,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 auto base_file_type = std::make_unique(); if (accept_types.empty()) return base_file_type; -@@ -493,17 +508,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -541,17 +556,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector* extensions = &file_type->extensions.back(); @@ -73,7 +73,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 } else { if (!base::IsStringASCII(accept_type)) continue; -@@ -514,10 +536,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -562,10 +584,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( description_id = IDS_AUDIO_FILES; else if (ascii_type == "video/*") description_id = IDS_VIDEO_FILES; @@ -94,7 +94,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -542,6 +572,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -590,6 +620,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( l10n_util::GetStringUTF16(description_id)); } @@ -110,7 +110,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 return file_type; } -@@ -549,7 +588,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -597,7 +636,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -120,7 +120,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -568,6 +608,7 @@ void FileSelectHelper::RunFileChooser( +@@ -616,6 +656,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -128,7 +128,7 @@ index 0b9bf62547e6e..e908456356ce4 100644 file_select_helper->RunFileChooser(render_frame_host, std::move(listener), params.Clone()); } -@@ -621,7 +662,8 @@ void FileSelectHelper::RunFileChooser( +@@ -669,7 +710,8 @@ void FileSelectHelper::RunFileChooser( } void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { @@ -139,10 +139,10 @@ index 0b9bf62547e6e..e908456356ce4 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 a1fff2a47d227..033271beb8b4c 100644 +index bacd6fd957dba..eabb9b6af35a4 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h -@@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -65,7 +65,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< static void RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -152,7 +152,7 @@ index a1fff2a47d227..033271beb8b4c 100644 // Enumerates all the files in directory. static void EnumerateDirectory( -@@ -267,7 +268,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -293,7 +294,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 a1fff2a47d227..033271beb8b4c 100644 // Check the accept type is valid. It is expected to be all lower case with // no whitespace. -@@ -332,6 +334,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -358,6 +360,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; @@ -173,7 +173,7 @@ index a1fff2a47d227..033271beb8b4c 100644 base::WeakPtrFactory weak_ptr_factory_{this}; #endif // BUILDFLAG(IS_CHROMEOS_ASH) diff --git chrome/browser/ui/chrome_select_file_policy.h chrome/browser/ui/chrome_select_file_policy.h -index e4dc653c7be45..5aeeb0b970484 100644 +index 026f8ae631697..45b324fd3ae25 100644 --- chrome/browser/ui/chrome_select_file_policy.h +++ chrome/browser/ui/chrome_select_file_policy.h @@ -30,6 +30,8 @@ class ChromeSelectFilePolicy : public ui::SelectFilePolicy { @@ -183,7 +183,7 @@ index e4dc653c7be45..5aeeb0b970484 100644 + content::WebContents* source_contents() const { return source_contents_; } + private: - raw_ptr source_contents_; + raw_ptr source_contents_; }; diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc index 53b143e844879..f3c90339c8695 100644 @@ -238,10 +238,10 @@ index 53b143e844879..f3c90339c8695 100644 paths.push_back(std::move(path)); } diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc -index 6260f90352141..99f1e0d7227ab 100644 +index 3defd211d7f52..fce15a249bd1f 100644 --- ui/shell_dialogs/select_file_dialog.cc +++ ui/shell_dialogs/select_file_dialog.cc -@@ -88,8 +88,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { +@@ -87,8 +87,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { // static scoped_refptr SelectFileDialog::Create( Listener* listener, @@ -338,10 +338,10 @@ index 3cd217d5a0af9..5826fe4aea689 100644 std::make_unique(ns_window), std::move(receiver)); diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc -index 5deb21f760aaa..c8cb093492db4 100644 +index 5e128434d9968..1198b14aa240b 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -252,6 +252,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -251,6 +251,8 @@ void SelectFileDialogImpl::SelectFileImpl( HWND owner = owning_window && owning_window->GetRootWindow() ? owning_window->GetHost()->GetAcceleratedWidget() : nullptr; diff --git a/patch/patches/chrome_browser_dialogs_widget.patch b/patch/patches/chrome_browser_dialogs_widget.patch index 7af15dcfd..3bc63c3d8 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -112,7 +112,7 @@ index 51ed6bcf6b540..9ae4737e0737e 100644 virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0; // Returns whether a dialog currently about to be shown should be activated. diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc -index bc0a51138f2fd..1a8086c46e237 100644 +index 54cd17c85983d..c8c276169eaec 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc @@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() { @@ -187,7 +187,7 @@ index bc0a51138f2fd..1a8086c46e237 100644 // Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child // widgets to prevent top-level window behavior (independent movement, etc). diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h -index 84430f84e9bdc..c229bb1155c02 100644 +index b0923fe17e355..2b0545061e0e9 100644 --- ui/views/window/dialog_delegate.h +++ ui/views/window/dialog_delegate.h @@ -94,13 +94,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate { diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index 3c5791648..26c6abbc4 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 19a81f51a14c1..d23f6db838d41 100644 +index 2b64f15504dcb..06a70c70738cd 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -13,6 +13,7 @@ diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index e689af43b..37f5d4346 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/background_fetch/background_fetch_permission_context.cc chrome/browser/background_fetch/background_fetch_permission_context.cc -index 82193be08677a..c7290039cbe96 100644 +index 0a5aef10879ac..1b122c8848c97 100644 --- chrome/browser/background_fetch/background_fetch_permission_context.cc +++ chrome/browser/background_fetch/background_fetch_permission_context.cc @@ -4,6 +4,7 @@ @@ -21,7 +21,7 @@ index 82193be08677a..c7290039cbe96 100644 g_browser_process->download_request_limiter(); DCHECK(limiter); diff --git chrome/browser/background_sync/periodic_background_sync_permission_context.cc chrome/browser/background_sync/periodic_background_sync_permission_context.cc -index 40d27e69a17ce..a7e18b475dd18 100644 +index 16107572d4d0d..409e9ea870482 100644 --- chrome/browser/background_sync/periodic_background_sync_permission_context.cc +++ chrome/browser/background_sync/periodic_background_sync_permission_context.cc @@ -6,6 +6,7 @@ @@ -100,7 +100,7 @@ index 3649a61d07b7d..22fe4f512e93b 100644 delegates.media_stream_device_enumerator = MediaCaptureDevicesDispatcher::GetInstance(); diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc -index c515cd600c0a4..04adc37b4a24c 100644 +index 2a52f59d04ba6..c759dac784553 100644 --- chrome/browser/storage/durable_storage_permission_context.cc +++ chrome/browser/storage/durable_storage_permission_context.cc @@ -8,6 +8,7 @@ @@ -121,7 +121,7 @@ index c515cd600c0a4..04adc37b4a24c 100644 + if (cef::IsAlloyRuntimeEnabled() || requesting_origin != embedding_origin) { NotifyPermissionSet(id, requesting_origin, embedding_origin, std::move(callback), /*persist=*/false, - CONTENT_SETTING_DEFAULT, /*is_one_time=*/false); + CONTENT_SETTING_DEFAULT, /*is_one_time=*/false, diff --git chrome/browser/ui/permission_bubble/permission_prompt.h chrome/browser/ui/permission_bubble/permission_prompt.h index fbce13c16ad10..0512b2f09937e 100644 --- chrome/browser/ui/permission_bubble/permission_prompt.h @@ -141,10 +141,10 @@ index fbce13c16ad10..0512b2f09937e 100644 std::unique_ptr CreatePermissionPrompt( content::WebContents* web_contents, diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc -index 18923a76ceea2..368b82a6c4151 100644 +index 82a50b7e22dfe..c4ba55ec6bd54 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc -@@ -150,11 +150,28 @@ std::unique_ptr CreateQuietPrompt( +@@ -158,11 +158,28 @@ std::unique_ptr CreateQuietPrompt( } } diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 31705af20..225f38be6 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 b419a621763a4..2658df90a4477 100644 +index 0d09e3048615b..38542a1571346 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -652,7 +652,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -655,7 +655,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,10 +14,10 @@ index b419a621763a4..2658df90a4477 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index a82af67cd3afb..c9dbd798dbeda 100644 +index cb16500436e78..5fb96689f961e 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc -@@ -83,6 +83,7 @@ base::LazyInstance>::Leaky +@@ -84,6 +84,7 @@ base::LazyInstance>::Leaky namespace { @@ -25,7 +25,7 @@ index a82af67cd3afb..c9dbd798dbeda 100644 const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext"; const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation"; const char kTestOTRProfileIDPrefix[] = "Test::OTR"; -@@ -103,6 +104,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { +@@ -104,6 +105,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { // DevTools::BrowserContext, MediaRouter::Presentation, and // CaptivePortal::Signin are exceptions to this ban. if (*this == PrimaryID() || @@ -34,7 +34,7 @@ index a82af67cd3afb..c9dbd798dbeda 100644 base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, base::CompareCase::SENSITIVE) || base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, -@@ -133,6 +136,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( +@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( base::GUID::GenerateRandomV4().AsLowercaseString().c_str())); } @@ -52,7 +52,7 @@ index a82af67cd3afb..c9dbd798dbeda 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index 47fb50996f18e..23968a7b45991 100644 +index d90969cd9478c..9cf454be330ce 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h @@ -99,6 +99,10 @@ class Profile : public content::BrowserContext { @@ -66,7 +66,7 @@ index 47fb50996f18e..23968a7b45991 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -489,6 +493,8 @@ class Profile : public content::BrowserContext { +@@ -494,6 +498,8 @@ class Profile : public content::BrowserContext { base::WeakPtr GetWeakPtr(); @@ -75,7 +75,7 @@ index 47fb50996f18e..23968a7b45991 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -500,8 +506,6 @@ class Profile : public content::BrowserContext { +@@ -505,8 +511,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -85,10 +85,10 @@ index 47fb50996f18e..23968a7b45991 100644 virtual bool IsSignedIn() = 0; diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index 10498ef42df23..c40029668cc8f 100644 +index a2a12efa89104..9865a2349490a 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -992,7 +992,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1012,7 +1012,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -100,10 +100,10 @@ index 10498ef42df23..c40029668cc8f 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index dde8c5794d1bc..a5507de13e5d8 100644 +index fb98d310ee001..4180de71d02de 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -539,7 +539,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -380,7 +380,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif @@ -113,19 +113,19 @@ index dde8c5794d1bc..a5507de13e5d8 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 cfe40342e3ee4..d8f26cdbb2615 100644 +index 54502d1b44a82..8134c87824687 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -140,7 +140,7 @@ class ProfileManager : public Profile::Delegate { - // acceptable. Returns null if creation of the new profile fails. - // TODO(bauerb): Migrate calls from other code to GetProfileByPath(), then +@@ -130,7 +130,7 @@ class ProfileManager : public Profile::Delegate { + // acceptable. Returns nullptr if loading the new profile fails. + // TODO(bauerb): Migrate calls from other code to `GetProfileByPath()`, then // make this method private. - Profile* GetProfile(const base::FilePath& profile_dir); + virtual Profile* GetProfile(const base::FilePath& profile_dir); // Returns regular or off-the-record profile given its profile key. static Profile* GetProfileFromProfileKey(ProfileKey* profile_key); -@@ -181,7 +181,7 @@ class ProfileManager : public Profile::Delegate { +@@ -171,7 +171,7 @@ class ProfileManager : public Profile::Delegate { // Returns true if the profile pointer is known to point to an existing // profile. @@ -135,7 +135,7 @@ index cfe40342e3ee4..d8f26cdbb2615 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 5c9f2c1ab4a25..bf48fe9c440e8 100644 +index 69f3761f103ef..78e4ae61b39ae 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -8,6 +8,7 @@ diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index e62065a0d..6201a08db 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index 44d3c54ab4838..8935a035834b9 100644 +index 7a34996cfa221..3bebd3da73877 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc -@@ -31,6 +31,7 @@ - #include "base/threading/thread_task_runner_handle.h" +@@ -30,6 +30,7 @@ + #include "base/task/thread_pool.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_features.h" #include "chrome/browser/extensions/extension_service.h" #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" -@@ -67,6 +68,10 @@ +@@ -66,6 +67,10 @@ #include "ui/color/color_provider.h" #include "ui/native_theme/native_theme.h" @@ -21,7 +21,7 @@ index 44d3c54ab4838..8935a035834b9 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/scoped_observation.h" #include "extensions/browser/extension_registry_observer.h" -@@ -269,11 +274,19 @@ void ThemeService::Init() { +@@ -268,11 +273,19 @@ void ThemeService::Init() { // OnExtensionServiceReady. Otherwise, the ThemeObserver won't be // constructed in time to observe the corresponding events. #if BUILDFLAG(ENABLE_EXTENSIONS) diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 40512283b..8d776ed01 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -54,7 +54,7 @@ index 7ceb1d7b854d9..5efcb8c09058c 100644 PluginInfoHostImpl::Context::~Context() {} diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc -index d63750d32aa5f..170bf0826235d 100644 +index 8b3f569882aeb..ae0c4aa9a0514 100644 --- chrome/browser/plugins/plugin_utils.cc +++ chrome/browser/plugins/plugin_utils.cc @@ -5,6 +5,7 @@ @@ -74,9 +74,9 @@ index d63750d32aa5f..170bf0826235d 100644 +#endif + #if BUILDFLAG(ENABLE_EXTENSIONS) + #include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h" #include "chrome/common/pref_names.h" - #include "components/prefs/pref_service.h" -@@ -68,6 +73,12 @@ base::flat_map +@@ -69,6 +74,12 @@ base::flat_map PluginUtils::GetMimeTypeToExtensionIdMap( content::BrowserContext* browser_context) { base::flat_map mime_type_to_extension_id_map; @@ -88,7 +88,7 @@ index d63750d32aa5f..170bf0826235d 100644 + #if BUILDFLAG(ENABLE_EXTENSIONS) Profile* profile = Profile::FromBrowserContext(browser_context); - const std::vector& allowlist = + if (extensions::ChromeContentBrowserClientExtensionsPart:: diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc index a29a2739af3c8..0feb1a87cef64 100644 --- chrome/common/google_url_loader_throttle.cc @@ -125,10 +125,10 @@ index a29a2739af3c8..0feb1a87cef64 100644 // that the X-Frame-Options protection mechanism is set to either DENY or // SAMEORIGIN. diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 3c3286f049ebc..5e8aae24754e3 100644 +index 3d08b706ec4a0..7f4a0398e51f9 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -979,6 +979,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -978,6 +978,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index 3c3286f049ebc..5e8aae24754e3 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1149,7 +1150,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1147,7 +1148,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index 3c3286f049ebc..5e8aae24754e3 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1158,7 +1160,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1156,7 +1158,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,7 +156,7 @@ index 3c3286f049ebc..5e8aae24754e3 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1168,7 +1171,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1166,7 +1169,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -167,7 +167,7 @@ index 3c3286f049ebc..5e8aae24754e3 100644 } } diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h -index d06734015cf17..5794b6ab1c25a 100644 +index ad5f1925735fd..a871f4a7792a7 100644 --- content/browser/browser_plugin/browser_plugin_embedder.h +++ content/browser/browser_plugin/browser_plugin_embedder.h @@ -15,6 +15,7 @@ @@ -188,10 +188,10 @@ index d06734015cf17..5794b6ab1c25a 100644 BrowserPluginEmbedder(const BrowserPluginEmbedder&) = delete; BrowserPluginEmbedder& operator=(const BrowserPluginEmbedder&) = delete; diff --git content/browser/browser_plugin/browser_plugin_guest.cc content/browser/browser_plugin/browser_plugin_guest.cc -index 5c05c4c3bbde1..df728150ca821 100644 +index a731c5ef5b714..99e313b92c242 100644 --- content/browser/browser_plugin/browser_plugin_guest.cc +++ content/browser/browser_plugin/browser_plugin_guest.cc -@@ -84,6 +84,8 @@ void BrowserPluginGuest::InitInternal(WebContentsImpl* owner_web_contents) { +@@ -80,6 +80,8 @@ void BrowserPluginGuest::InitInternal(WebContentsImpl* owner_web_contents) { GetWebContents()->GetOrCreateWebPreferences(); prefs.navigate_on_drag_drop = false; GetWebContents()->SetWebPreferences(prefs); @@ -201,10 +201,10 @@ index 5c05c4c3bbde1..df728150ca821 100644 BrowserPluginGuest::~BrowserPluginGuest() = default; diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h -index 4712cd8792fa4..60af76c988278 100644 +index aec6a0eb9cbd0..286e7de6887a7 100644 --- content/browser/browser_plugin/browser_plugin_guest.h +++ content/browser/browser_plugin/browser_plugin_guest.h -@@ -82,6 +82,8 @@ class BrowserPluginGuest : public WebContentsObserver { +@@ -68,6 +68,8 @@ class BrowserPluginGuest : public WebContentsObserver { WebContentsImpl* GetWebContents() const; @@ -213,7 +213,7 @@ index 4712cd8792fa4..60af76c988278 100644 private: // BrowserPluginGuest is a WebContentsObserver of |web_contents| and // |web_contents| has to stay valid for the lifetime of BrowserPluginGuest. -@@ -91,6 +93,8 @@ class BrowserPluginGuest : public WebContentsObserver { +@@ -77,6 +79,8 @@ class BrowserPluginGuest : public WebContentsObserver { void InitInternal(WebContentsImpl* owner_web_contents); const raw_ptr delegate_; diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index a081756f9..b43da80ab 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 893347b565a89..11ccac1029614 100644 +index 289e3ad2abba4..366a6bf1e42ff 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -18,7 +18,7 @@ index 893347b565a89..11ccac1029614 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -220,6 +222,10 @@ static_library("renderer") { +@@ -218,6 +220,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 b266c20da..7d14e586a 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 e8f4b7475dc7f..2a5f13dea4965 100644 +index 400cc6f0d441f..e6e1feaef3f06 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -40,6 +40,7 @@ @@ -10,7 +10,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -516,6 +517,8 @@ struct MainFunction { +@@ -526,6 +527,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index e8f4b7475dc7f..2a5f13dea4965 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. -@@ -665,6 +668,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { +@@ -675,6 +678,10 @@ ChromeMainDelegate::~ChromeMainDelegate() { ChromeMainDelegate::~ChromeMainDelegate() = default; #endif // !BUILDFLAG(IS_ANDROID) @@ -30,7 +30,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 absl::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DCHECK(base::ThreadPoolInstance::Get()); -@@ -946,7 +953,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -962,7 +969,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { } #if BUILDFLAG(IS_WIN) @@ -40,7 +40,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); base::InitializePlatformThreadFeatures(); -@@ -1288,6 +1297,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1327,6 +1336,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -48,7 +48,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1298,6 +1308,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1337,6 +1347,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -56,7 +56,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1492,6 +1503,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1531,6 +1542,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -64,7 +64,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1535,6 +1547,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1574,6 +1586,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 e8f4b7475dc7f..2a5f13dea4965 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1633,6 +1646,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1675,6 +1688,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -80,7 +80,7 @@ index e8f4b7475dc7f..2a5f13dea4965 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 = -@@ -1655,6 +1669,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1697,6 +1711,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -89,7 +89,7 @@ index e8f4b7475dc7f..2a5f13dea4965 100644 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h -index de1b45f921123..077894e4a42c9 100644 +index 49993fbc333f8..c39e8743e281e 100644 --- chrome/app/chrome_main_delegate.h +++ chrome/app/chrome_main_delegate.h @@ -52,6 +52,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate { @@ -102,10 +102,10 @@ index de1b45f921123..077894e4a42c9 100644 // content::ContentMainDelegate: absl::optional BasicStartupComplete() override; diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index a9f1fa7ac0c5a..c4c42fab178ba 100644 +index 2893df3488d8f..46cd8d9643b69 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc -@@ -52,6 +52,7 @@ +@@ -51,6 +51,7 @@ #include "build/build_config.h" #include "build/chromeos_buildflags.h" #include "cc/base/switches.h" @@ -113,7 +113,7 @@ index a9f1fa7ac0c5a..c4c42fab178ba 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1551,12 +1552,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1575,12 +1576,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -128,7 +128,7 @@ index a9f1fa7ac0c5a..c4c42fab178ba 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1708,14 +1711,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1732,14 +1735,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. @@ -147,7 +147,7 @@ index a9f1fa7ac0c5a..c4c42fab178ba 100644 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -1743,8 +1749,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1767,8 +1773,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -160,7 +160,7 @@ index a9f1fa7ac0c5a..c4c42fab178ba 100644 GetMainRunLoopInstance()->QuitWhenIdleClosure()); } diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index d12abb3451882..b14d4406c2a76 100644 +index 77aaa6d46daea..e428711ec4ab3 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -17,6 +17,7 @@ @@ -171,15 +171,15 @@ index d12abb3451882..b14d4406c2a76 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -112,6 +113,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -111,6 +112,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } - #endif // !BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) + #endif // BUILDFLAG(ENABLE_UPDATER) +#if !BUILDFLAG(ENABLE_CEF) // Create the app delegate. This object is intentionally leaked as a global // singleton. It is accessed through -[NSApp delegate]. AppController* app_controller = [[AppController alloc] init]; -@@ -120,6 +122,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -119,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { chrome::BuildMainMenu(NSApp, app_controller, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); [app_controller mainMenuCreated]; @@ -187,7 +187,7 @@ index d12abb3451882..b14d4406c2a76 100644 ui::WarmScreenCapture(); -@@ -178,7 +181,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -177,7 +180,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -198,7 +198,7 @@ index d12abb3451882..b14d4406c2a76 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index e0e8374bb5e74..bbafee080af8c 100644 +index 265904cb255f3..463cb5cad9713 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc @@ -35,6 +35,7 @@ @@ -209,7 +209,7 @@ index e0e8374bb5e74..bbafee080af8c 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" -@@ -1481,6 +1482,8 @@ void HandleStringData( +@@ -1503,6 +1504,8 @@ void HandleStringData( } // namespace ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -218,7 +218,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); #endif -@@ -1506,6 +1509,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1528,6 +1531,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { extra_parts_.clear(); } @@ -230,7 +230,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -4149,9 +4157,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4242,9 +4250,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -242,7 +242,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -5960,7 +5970,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -6110,7 +6120,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( network_service); } @@ -251,7 +251,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -5978,6 +5988,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -6128,6 +6138,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -260,7 +260,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 } std::vector -@@ -6822,10 +6834,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -6991,10 +7003,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -273,7 +273,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -6844,7 +6856,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -7013,7 +7025,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -283,7 +283,7 @@ index e0e8374bb5e74..bbafee080af8c 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -6980,7 +6993,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -7149,7 +7162,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -293,7 +293,7 @@ index e0e8374bb5e74..bbafee080af8c 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 6e2f9c30d586e..878e35b0e7d89 100644 +index 227ee8928d157..9f9ca31dac6fb 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h @@ -120,6 +120,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -305,7 +305,7 @@ index 6e2f9c30d586e..878e35b0e7d89 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. -@@ -599,7 +601,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -598,7 +600,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -314,7 +314,7 @@ index 6e2f9c30d586e..878e35b0e7d89 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -959,7 +961,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -958,7 +960,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -324,7 +324,7 @@ index 6e2f9c30d586e..878e35b0e7d89 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index b0fd561c06612..dbb0512262515 100644 +index 829d5faa9433f..a8b171a535449 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -11,6 +11,7 @@ @@ -335,7 +335,7 @@ index b0fd561c06612..dbb0512262515 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_ui.h" -@@ -170,6 +171,10 @@ +@@ -171,6 +172,10 @@ #include "chrome/browser/background/background_mode_manager.h" #endif @@ -346,7 +346,7 @@ index b0fd561c06612..dbb0512262515 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1275,6 +1280,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { +@@ -1312,6 +1317,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) { // This is intentionally last. RegisterLocalStatePrefsForMigration(registry); @@ -358,7 +358,7 @@ index b0fd561c06612..dbb0512262515 100644 } // Register prefs applicable to all profiles. -@@ -1655,6 +1665,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1696,6 +1706,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 46f1fbc12..5cc1cb7eb 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 273dea900af21..a9266e6dba2bc 100644 +index 09189817cb9d4..9c07452ef0411 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -382,8 +382,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -383,8 +383,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( // CommandUpdaterDelegate and CommandUpdater declare this function so we // choose to not implement CommandUpdaterDelegate inside this class and // therefore command_updater_ doesn't have the delegate set). @@ -14,7 +14,7 @@ index 273dea900af21..a9266e6dba2bc 100644 // No commands are enabled if there is not yet any selected tab. // TODO(pkasting): It seems like we should not need this, because either -@@ -398,6 +400,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -399,6 +401,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -28,7 +28,7 @@ index 273dea900af21..a9266e6dba2bc 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1044,11 +1053,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1024,11 +1033,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -178,10 +178,10 @@ index 28085aa32d7d8..312911b8a4564 100644 BrowserFrame(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete; diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index 0c0499c5bcd9c..11cead3bd31cc 100644 +index 457e24dccb793..4ccb4705c2d7f 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -309,11 +309,10 @@ using content::NativeWebKeyboardEvent; +@@ -311,11 +311,10 @@ using content::NativeWebKeyboardEvent; using content::WebContents; using web_modal::WebContentsModalDialogHost; @@ -196,7 +196,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -834,11 +833,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { +@@ -836,11 +835,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -220,7 +220,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 SetShowIcon( ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); -@@ -880,7 +890,6 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -884,7 +894,6 @@ BrowserView::BrowserView(std::unique_ptr browser) } browser_->tab_strip_model()->AddObserver(this); @@ -228,7 +228,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 // Top container holds tab strip region and toolbar and lives at the front of // the view hierarchy. -@@ -926,8 +935,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -930,8 +939,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_)); @@ -246,7 +246,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1911,6 +1927,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1923,6 +1939,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -255,7 +255,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -2782,7 +2800,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { +@@ -2795,7 +2813,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { } DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { @@ -265,7 +265,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) return download_button->bubble_controller(); return nullptr; -@@ -3274,7 +3293,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3287,7 +3306,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -275,7 +275,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3835,8 +3855,10 @@ void BrowserView::Layout() { +@@ -3864,8 +3884,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -288,7 +288,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3902,6 +3924,11 @@ void BrowserView::AddedToWidget() { +@@ -3931,6 +3953,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -300,7 +300,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 toolbar_->Init(); // TODO(pbos): Manage this either inside SidePanel or the corresponding button -@@ -3962,13 +3989,9 @@ void BrowserView::AddedToWidget() { +@@ -3990,13 +4017,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -316,7 +316,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4377,7 +4400,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4405,7 +4428,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -326,7 +326,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4719,6 +4743,8 @@ Profile* BrowserView::GetProfile() { +@@ -4747,6 +4771,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -335,7 +335,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4741,6 +4767,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4769,6 +4795,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -345,7 +345,7 @@ index 0c0499c5bcd9c..11cead3bd31cc 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 79911e5461e2e..d70b8a3b84f84 100644 +index 97f6f59322215..a71571e0d6ce9 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h @@ -131,11 +131,16 @@ class BrowserView : public BrowserWindow, @@ -365,7 +365,7 @@ index 79911e5461e2e..d70b8a3b84f84 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; } BrowserFrame* frame() const { return frame_; } -@@ -798,6 +803,12 @@ class BrowserView : public BrowserWindow, +@@ -803,6 +808,12 @@ class BrowserView : public BrowserWindow, void SetLoadingAnimationStateChangeClosureForTesting( base::OnceClosure closure); @@ -379,10 +379,10 @@ index 79911e5461e2e..d70b8a3b84f84 100644 // Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate // interface to keep these two classes decoupled and testable. diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc -index c923ca16d06a5..eb75ad1111ae3 100644 +index e1b23142611cb..08852ecb7c129 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc -@@ -45,6 +45,10 @@ +@@ -46,6 +46,10 @@ #include "ui/views/widget/widget.h" #include "ui/views/window/client_view.h" @@ -391,9 +391,9 @@ index c923ca16d06a5..eb75ad1111ae3 100644 +#endif + using views::View; - using web_modal::WebContentsModalDialogHost; using web_modal::ModalDialogHostObserver; -@@ -474,6 +478,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { + using web_modal::WebContentsModalDialogHost; +@@ -472,6 +476,11 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) { int BrowserViewLayout::LayoutToolbar(int top) { TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar"); @@ -422,10 +422,10 @@ index 5e059b9878fc2..c1f6fbcd40ec4 100644 ContentsWebView::~ContentsWebView() { diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -index abd41d50e22d9..19a5a486ab9f3 100644 +index 9b29b45b011e7..9fa367bac197c 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -556,33 +556,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -564,33 +564,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -474,7 +474,7 @@ index abd41d50e22d9..19a5a486ab9f3 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index b4d585985bf4c..6c5ac33bf3de8 100644 +index dbe0846164b88..14c9d0f010c0b 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc @@ -171,12 +171,13 @@ auto& GetViewCommandMap() { diff --git a/patch/patches/chrome_utility_client.patch b/patch/patches/chrome_utility_client.patch index 5e4b875f2..73cc2fc7d 100644 --- a/patch/patches/chrome_utility_client.patch +++ b/patch/patches/chrome_utility_client.patch @@ -1,16 +1,16 @@ diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc -index c55bfb810c950..2137956d18b19 100644 +index f779813dd5333..547ba5ebfc161 100644 --- chrome/utility/chrome_content_utility_client.cc +++ chrome/utility/chrome_content_utility_client.cc -@@ -13,6 +13,7 @@ - #include "base/lazy_instance.h" +@@ -12,6 +12,7 @@ + #include "base/files/file_path.h" #include "base/path_service.h" #include "build/build_config.h" +#include "cef/libcef/features/runtime.h" #include "chrome/common/chrome_paths.h" #include "chrome/common/profiler/thread_profiler.h" #include "chrome/common/profiler/thread_profiler_configuration.h" -@@ -70,7 +71,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() { +@@ -56,7 +57,8 @@ void ChromeContentUtilityClient::UtilityThreadStarted() { command_line->GetSwitchValueASCII(switches::kProcessType); // An in-process utility thread may run in other processes, only set up // collector in a utility process. diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 627c47a96..c4e27c379 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,21 +1,21 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index af3f911d7f435..998ba65198721 100644 +index d4eb8f004387b..e654464576e35 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -596,7 +596,7 @@ void DevToolsHttpHandler::OnJsonRequest( - version.SetString("Protocol-Version", - DevToolsAgentHost::GetProtocolVersion()); - version.SetString("WebKit-Version", GetWebKitVersion()); -- version.SetString("Browser", GetContentClient()->browser()->GetProduct()); -+ version.SetString("Browser", GetContentClient()->browser()->GetChromeProduct()); - version.SetString("User-Agent", - GetContentClient()->browser()->GetUserAgent()); - version.SetString("V8-Version", V8_VERSION_STRING); + base::Value::Dict version; + version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); + version.Set("WebKit-Version", GetWebKitVersion()); +- version.Set("Browser", GetContentClient()->browser()->GetProduct()); ++ version.Set("Browser", GetContentClient()->browser()->GetChromeProduct()); + version.Set("User-Agent", GetContentClient()->browser()->GetUserAgent()); + 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 95ab3cd395b8a..1a82cf112454e 100644 +index d86510260c4d2..43c5e58333a4f 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -715,6 +715,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -719,6 +719,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); @@ -34,7 +34,7 @@ index 95ab3cd395b8a..1a82cf112454e 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 560e66d4e402c..f25a012d63424 100644 +index 020f0f162fde3..af48579a0ff57 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc @@ -960,7 +960,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( @@ -55,7 +55,7 @@ index 560e66d4e402c..f25a012d63424 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index bdb4632c56534..fb2334e9bd462 100644 +index eaedfc8f8603d..87ee0b2cdae73 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -35,6 +35,7 @@ @@ -66,7 +66,7 @@ index bdb4632c56534..fb2334e9bd462 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" -@@ -1768,7 +1769,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1767,7 +1768,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 bdb4632c56534..fb2334e9bd462 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1960,6 +1961,19 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1964,6 +1965,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -95,7 +95,7 @@ index bdb4632c56534..fb2334e9bd462 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. -@@ -2012,6 +2026,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2016,6 +2030,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -132,10 +132,10 @@ index 09846e00f1a75..18b396a631f45 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 49688b3adc657..6a1f4b26ef757 100644 +index 2ac91dcba1d7a..c8c1bbab100ba 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -604,6 +604,8 @@ void RenderThreadImpl::Init() { +@@ -607,6 +607,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -145,10 +145,10 @@ index 49688b3adc657..6a1f4b26ef757 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 ab6a83247fb18..385d99d09a5d8 100644 +index c31323121b8fe..8ef9ff1430a91 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1023,6 +1023,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1024,6 +1024,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -165,11 +165,11 @@ index ab6a83247fb18..385d99d09a5d8 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 76ca0135501ae..e81ac506214d8 100644 +index 3ae765eea4b8f..c0fe200f0d373 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -230,6 +230,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { - blink::mojom::AttributionOsSupport GetOsSupportForAttributionReporting() +@@ -233,6 +233,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { + scoped_refptr VideoFrameCompositorTaskRunner() override; + void DevToolsAgentAttached() override; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index 128a13cb7..7ca112450 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -1,8 +1,8 @@ diff --git content/app/content_main.cc content/app/content_main.cc -index 58f891fd7af7a..3178a0aeab935 100644 +index 1ea066908cd96..d14269518c593 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -194,11 +194,8 @@ ContentMainParams::~ContentMainParams() = default; +@@ -195,11 +195,8 @@ ContentMainParams::~ContentMainParams() = default; ContentMainParams::ContentMainParams(ContentMainParams&&) = default; ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default; @@ -13,10 +13,10 @@ index 58f891fd7af7a..3178a0aeab935 100644 - ContentMainRunner* content_main_runner) { +int ContentMainInitialize(ContentMainParams params, + ContentMainRunner* content_main_runner) { + base::FeatureList::FailOnFeatureAccessWithoutFeatureList(); #if BUILDFLAG(IS_CHROMEOS_LACROS) // Lacros is launched with inherited priority. Revert to normal priority - // before spawning more processes. -@@ -206,9 +203,6 @@ RunContentProcess(ContentMainParams params, +@@ -208,9 +205,6 @@ RunContentProcess(ContentMainParams params, #endif int exit_code = -1; base::debug::GlobalActivityTracker* tracker = nullptr; @@ -26,7 +26,7 @@ index 58f891fd7af7a..3178a0aeab935 100644 // A flag to indicate whether Main() has been called before. On Android, we // may re-run Main() without restarting the browser process. This flag -@@ -294,12 +288,6 @@ RunContentProcess(ContentMainParams params, +@@ -296,12 +290,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) @@ -39,7 +39,7 @@ index 58f891fd7af7a..3178a0aeab935 100644 InitializeMac(); #endif -@@ -339,8 +327,18 @@ RunContentProcess(ContentMainParams params, +@@ -341,8 +329,18 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -59,7 +59,7 @@ index 58f891fd7af7a..3178a0aeab935 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -352,14 +350,41 @@ RunContentProcess(ContentMainParams params, +@@ -354,14 +352,41 @@ RunContentProcess(ContentMainParams params, } } @@ -105,10 +105,10 @@ index 58f891fd7af7a..3178a0aeab935 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 6f50af74219a6..629d92c739ce7 100644 +index 6b51120e7d889..57c37e79e68e9 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -43,6 +43,7 @@ +@@ -44,6 +44,7 @@ #include "base/task/thread_pool/thread_pool_instance.h" #include "base/threading/hang_watcher.h" #include "base/threading/platform_thread.h" @@ -116,7 +116,7 @@ index 6f50af74219a6..629d92c739ce7 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1255,6 +1256,12 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1269,6 +1270,12 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index f66a63eee..601e31b4a 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 2c5b4b4a85536..900e8e4735c76 100644 +index 40148eeaef7d1..353c6d2b37a7a 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -15,6 +15,7 @@ @@ -10,7 +10,7 @@ index 2c5b4b4a85536..900e8e4735c76 100644 #include "components/embedder_support/pref_names.h" #include "components/embedder_support/switches.h" #include "components/policy/core/common/policy_pref_names.h" -@@ -370,6 +371,12 @@ std::string GetMajorVersionForUserAgentString( +@@ -382,6 +383,12 @@ std::string GetMajorVersionForUserAgentString( std::string GetProductAndVersion( ForceMajorVersionToMinorPosition force_major_to_minor, UserAgentReductionEnterprisePolicyState user_agent_reduction) { diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 1c75e0a5d..ea43e159c 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -60,13 +60,13 @@ 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 53ae169ef8bbc..a4c20164ba2ae 100644 +index 4d29671429220..e0f287f785668 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc -@@ -60,11 +60,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, - host_type == mojom::ViewType::kOffscreenDocument || +@@ -62,11 +62,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, host_type == mojom::ViewType::kExtensionDialog || - host_type == mojom::ViewType::kExtensionPopup); + host_type == mojom::ViewType::kExtensionPopup || + host_type == mojom::ViewType::kExtensionSidePanel); - host_contents_ = WebContents::Create( + host_contents_owned_ = WebContents::Create( WebContents::CreateParams(browser_context_, site_instance)), @@ -79,7 +79,7 @@ index 53ae169ef8bbc..a4c20164ba2ae 100644 main_frame_host_ = host_contents_->GetPrimaryMainFrame(); // Listen for when an extension is unloaded from the same profile, as it may -@@ -79,6 +80,44 @@ ExtensionHost::ExtensionHost(const Extension* extension, +@@ -81,6 +82,44 @@ ExtensionHost::ExtensionHost(const Extension* extension, ExtensionHostRegistry::Get(browser_context_)->ExtensionHostCreated(this); } @@ -125,10 +125,10 @@ index 53ae169ef8bbc..a4c20164ba2ae 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index fd08f312145a5..1440a3e8246f9 100644 +index 07be432f365b9..d3800886a5b5c 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h -@@ -56,6 +56,12 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -59,6 +59,12 @@ class ExtensionHost : public DeferredStartRenderHost, content::SiteInstance* site_instance, const GURL& url, mojom::ViewType host_type); @@ -141,7 +141,7 @@ index fd08f312145a5..1440a3e8246f9 100644 ExtensionHost(const ExtensionHost&) = delete; ExtensionHost& operator=(const ExtensionHost&) = delete; -@@ -66,7 +72,7 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -69,7 +75,7 @@ class ExtensionHost : public DeferredStartRenderHost, const Extension* extension() const { return extension_; } const std::string& extension_id() const { return extension_id_; } @@ -150,7 +150,7 @@ index fd08f312145a5..1440a3e8246f9 100644 content::RenderFrameHost* main_frame_host() const { return main_frame_host_; } content::RenderProcessHost* render_process_host() const; bool has_loaded_once() const { return has_loaded_once_; } -@@ -202,7 +208,8 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -205,7 +211,8 @@ class ExtensionHost : public DeferredStartRenderHost, raw_ptr browser_context_; // The host for our HTML content. @@ -196,7 +196,7 @@ index 028d6b1fec3a0..0829a24eb2879 100644 // once each time the extensions system is loaded per browser_context. The // implementation may wish to use the BrowserContext to record the current diff --git extensions/browser/process_manager.cc extensions/browser/process_manager.cc -index 40f1782b37a71..d6d5bb4e9faa6 100644 +index aeee5f5a516c4..ca2079ba1b447 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc @@ -380,9 +380,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index 457ce24ad..1ff66ab3b 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index 53c9e4ec12aef..b303d299c49a9 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 15e67fe72dbd2..ac0c5478146e4 100644 +index 9075b6f33090b..21c669d061c44 100644 --- BUILD.gn +++ BUILD.gn @@ -18,6 +18,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -67,7 +67,7 @@ index d9024468296e7..11bfae65b7b02 100644 + "studio path") } diff --git chrome/app/framework.order chrome/app/framework.order -index 1d6be612da8d4..c8ea70f2f256d 100644 +index 60f573a736ba5..90dd6d0b37314 100644 --- chrome/app/framework.order +++ chrome/app/framework.order @@ -28,3 +28,8 @@ _ChromeMain @@ -80,7 +80,7 @@ index 1d6be612da8d4..c8ea70f2f256d 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index c4178b381465f..f7e940470a375 100644 +index 6b478cb901c0d..ba18b48249857 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -126,7 +126,7 @@ index adc881122cb9c..cafa71386fad6 100644 source_patterns += [ "${root_gen_dir}/extensions/strings/extensions_strings_" ] diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index f72c545630922..986a2f7866504 100644 +index 7fe3f49dafecd..8f3015f399b61 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni") @@ -137,7 +137,7 @@ index f72c545630922..986a2f7866504 100644 import("//chrome/process_version_rc_template.gni") import("//components/nacl/features.gni") import("//third_party/ffmpeg/ffmpeg_options.gni") -@@ -121,11 +122,13 @@ action("mini_installer_archive") { +@@ -124,11 +125,13 @@ action("mini_installer_archive") { inputs = [ "$root_out_dir/chrome.dll", "$root_out_dir/chrome.exe", @@ -153,7 +153,7 @@ index f72c545630922..986a2f7866504 100644 outputs = [ # See also chrome.packed.7z conditionally added below. diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni -index a60843bab981e..44b9e98f2eb89 100644 +index bd7d65bdfa518..e7a68d7796bc8 100644 --- tools/grit/grit_args.gni +++ tools/grit/grit_args.gni @@ -5,6 +5,7 @@ @@ -164,7 +164,7 @@ index a60843bab981e..44b9e98f2eb89 100644 import("//build/config/ui.gni") shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir) -@@ -36,6 +37,8 @@ _grit_defines = [ +@@ -37,6 +38,8 @@ _grit_defines = [ # Mac and iOS want Title Case strings. "use_titlecase=${is_apple}", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 8c44d7642..7a9c49aba 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 070b499be40e6..9d875d1a670d7 100644 +index cc28e95c153fd..831ce18cb60ca 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1058,6 +1058,15 @@ +@@ -1066,6 +1066,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 22a58ed11..037ebafaf 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index dd5ccfc0bdc2e..b7e89eabbd05f 100644 +index 8c5cc2b157f6e..ef02db021353a 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc -@@ -172,7 +172,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( +@@ -172,7 +172,7 @@ void ChildProcessLauncherHelper::SetProcessBackgroundedOnLauncherThread( base::File OpenFileToShare(const base::FilePath& path, base::MemoryMappedFile::Region* region) { base::FilePath exe_dir; @@ -12,10 +12,10 @@ index dd5ccfc0bdc2e..b7e89eabbd05f 100644 base::File file(exe_dir.Append(path), base::File::FLAG_OPEN | base::File::FLAG_READ); diff --git sandbox/linux/suid/client/setuid_sandbox_host.cc sandbox/linux/suid/client/setuid_sandbox_host.cc -index 51af32dc6bc72..0ee340e96cb5b 100644 +index 84fd365da0283..88f3adf813eca 100644 --- sandbox/linux/suid/client/setuid_sandbox_host.cc +++ sandbox/linux/suid/client/setuid_sandbox_host.cc -@@ -119,7 +119,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { +@@ -120,7 +120,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { base::FilePath SetuidSandboxHost::GetSandboxBinaryPath() { base::FilePath sandbox_binary; base::FilePath exe_dir; diff --git a/patch/patches/linux_bluetooth_1319006.patch b/patch/patches/linux_bluetooth_1319006.patch index a5fb5332f..1e9f89fd8 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 383a05519497a..3d4c95c39712c 100644 +index 0b526044dcc7c..91fbfcd112548 100644 --- device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn @@ -45,13 +45,6 @@ source_set("deprecated_experimental_mojo") { diff --git a/patch/patches/linux_glib_deprecated_volatile.patch b/patch/patches/linux_glib_deprecated_volatile.patch index 38b75ed1f..466c54543 100644 --- a/patch/patches/linux_glib_deprecated_volatile.patch +++ b/patch/patches/linux_glib_deprecated_volatile.patch @@ -1,8 +1,8 @@ diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn -index 4db17696494ad..c4a56a3237d58 100644 +index 9f1549e173f41..b8af55c0fb763 100644 --- ui/accessibility/platform/BUILD.gn +++ ui/accessibility/platform/BUILD.gn -@@ -272,6 +272,10 @@ source_set("platform") { +@@ -278,6 +278,10 @@ component("platform") { if (use_glib) { configs += [ "//build/config/linux:glib" ] } diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index 8aa682326..43218e757 100644 --- a/patch/patches/linux_printing_context.patch +++ b/patch/patches/linux_printing_context.patch @@ -1,5 +1,5 @@ diff --git printing/printing_context_linux.cc printing/printing_context_linux.cc -index 83211e80d8270..9ce9b37375762 100644 +index 5520e15c232c8..70742cba8056c 100644 --- printing/printing_context_linux.cc +++ printing/printing_context_linux.cc @@ -25,6 +25,12 @@ @@ -16,7 +16,7 @@ index 83211e80d8270..9ce9b37375762 100644 std::unique_ptr PrintingContext::CreateImpl( Delegate* delegate, @@ -47,6 +53,14 @@ PrintingContextLinux::~PrintingContextLinux() { - print_dialog_->ReleaseDialog(); + print_dialog_.ExtractAsDangling()->ReleaseDialog(); } +// static @@ -80,7 +80,7 @@ index 83211e80d8270..9ce9b37375762 100644 return mojom::ResultCode::kSuccess; } diff --git printing/printing_context_linux.h printing/printing_context_linux.h -index 6745bc07ecd21..4139ee5562b84 100644 +index 6fb35248ec459..3be9c29c7ebf9 100644 --- printing/printing_context_linux.h +++ printing/printing_context_linux.h @@ -16,6 +16,20 @@ namespace printing { @@ -105,10 +105,10 @@ index 6745bc07ecd21..4139ee5562b84 100644 // PrintingContext with optional native UI for print dialog and pdf_paper_size. class COMPONENT_EXPORT(PRINTING) PrintingContextLinux : public PrintingContext { diff --git tools/v8_context_snapshot/BUILD.gn tools/v8_context_snapshot/BUILD.gn -index 33a147bd79fd1..01f573e30395e 100644 +index eed0eed705d7f..482037423bc01 100644 --- tools/v8_context_snapshot/BUILD.gn +++ tools/v8_context_snapshot/BUILD.gn -@@ -106,6 +106,7 @@ if (use_v8_context_snapshot) { +@@ -105,6 +105,7 @@ if (use_v8_context_snapshot) { deps = [ "//gin:gin", "//mojo/core/embedder", diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 7b4ffc013..9f21819de 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -30,7 +30,7 @@ index 5d6cbbdcab2d8..33a650036e909 100644 } if (has_msg) diff --git base/task/current_thread.cc base/task/current_thread.cc -index 8208e32159ad2..813c33adef342 100644 +index 857b1dce24133..2907605644f1b 100644 --- base/task/current_thread.cc +++ base/task/current_thread.cc @@ -49,6 +49,8 @@ void CurrentThread::AddDestructionObserver( @@ -43,7 +43,7 @@ index 8208e32159ad2..813c33adef342 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/task/current_thread.h base/task/current_thread.h -index b170a5e7dc424..3cbe16584bac5 100644 +index 9eb954fc91ff4..eb00d339aaf82 100644 --- base/task/current_thread.h +++ base/task/current_thread.h @@ -132,6 +132,12 @@ class BASE_EXPORT CurrentThread { @@ -59,7 +59,7 @@ index b170a5e7dc424..3cbe16584bac5 100644 // Enables nested task processing in scope of an upcoming native message loop. // Some unwanted message loops may occur when using common controls or printer // functions. Hence, nested task processing is disabled by default to avoid -@@ -202,6 +208,13 @@ class BASE_EXPORT CurrentThread { +@@ -196,6 +202,13 @@ class BASE_EXPORT CurrentThread { friend class web::WebTaskEnvironment; raw_ptr current_; diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 5a90c9ce0..c492d3044 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index 1beda5f800827..879f4948b6bcd 100644 +index 25ee65396cfb7..3c9b433cb31bb 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm @@ -813,7 +813,8 @@ void MessagePumpUIApplication::Detach() { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index 266e47823..e5f5b8810 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -12,7 +12,7 @@ index 031dd5eeaef8e..25c2f0e42e22b 100644 virtual ~WebContentsView() = default; diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 98bc3a82d40f8..f2049fb07eb0c 100644 +index 50a583c2bc96a..de7f5a48d6b49 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc @@ -227,6 +227,8 @@ void MimeHandlerViewGuest::CreateWebContents( diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index 830b72666..ccd61aed9 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index f936d951fe272..90a3165172dce 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index f27b0a5918a19..537644f95ad3f 100644 +index 94f844d850c57..81ac8e958abe5 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1730,7 +1730,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1706,7 +1706,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. @@ -24,10 +24,10 @@ index f27b0a5918a19..537644f95ad3f 100644 bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const { diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc -index 65921550e62db..49acfefd935d5 100644 +index d2dd33303bfbf..7a6b1e02154e1 100644 --- services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc -@@ -262,7 +262,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -264,7 +264,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { } bool ResourceRequest::SendsCookies() const { diff --git a/patch/patches/net_test_server_3798752.patch b/patch/patches/net_test_server_3798752.patch index c40adcec5..8be356636 100644 --- a/patch/patches/net_test_server_3798752.patch +++ b/patch/patches/net_test_server_3798752.patch @@ -1,8 +1,8 @@ diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc -index cbb2e334028e2..b469705cd0f84 100644 +index bd996a6794353..5ebbe30c27f9f 100644 --- net/test/embedded_test_server/embedded_test_server.cc +++ net/test/embedded_test_server/embedded_test_server.cc -@@ -983,7 +983,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { +@@ -982,7 +982,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) { if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); @@ -11,12 +11,12 @@ index cbb2e334028e2..b469705cd0f84 100644 if (!io_thread_->task_runner()->PostTaskAndReply( FROM_HERE, std::move(closure), run_loop.QuitClosure())) { return false; -@@ -1010,7 +1010,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( +@@ -1009,7 +1009,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult( if (!base::CurrentThread::Get()) temporary_loop = std::make_unique(); - base::RunLoop run_loop; + base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed); bool task_result = false; - if (!base::PostTaskAndReplyWithResult( - io_thread_->task_runner().get(), FROM_HERE, std::move(task), + if (!io_thread_->task_runner()->PostTaskAndReplyWithResult( + FROM_HERE, std::move(task), diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 9d756554d..7c133c453 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 bc840ec63666f..5990fed2e0f6d 100644 +index 3a78d977e8a50..9313eacec6776 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3197,6 +3197,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3193,6 +3193,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,10 +57,10 @@ index bc840ec63666f..5990fed2e0f6d 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 7162adbd38636..b06283a7d2e60 100644 +index fdf7f8ff369bb..7bbeec760c801 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -787,6 +787,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -791,6 +791,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 64720ae0c..d0f801cc0 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -34,7 +34,7 @@ index 04d7b8ae25192..7da00aa535bea 100644 } diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index 37d7f35d314cc..7ddd2f44118bf 100644 +index b848ee0d185ec..c3ddbc8932f66 100644 --- chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc @@ -15,6 +15,7 @@ @@ -46,10 +46,10 @@ index 37d7f35d314cc..7ddd2f44118bf 100644 #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/task_manager/web_contents_tags.h" diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc -index 780491e14449d..a676ab5c00493 100644 +index 0cd52f9e25177..781bd953a9530 100644 --- chrome/browser/printing/print_view_manager_base.cc +++ chrome/browser/printing/print_view_manager_base.cc -@@ -606,13 +606,14 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -617,13 +617,14 @@ void PrintViewManagerBase::UpdatePrintSettings( job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -104,7 +104,7 @@ index ff180eb75c935..711b51ed039a5 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 72ebe05ad7d83..3a780a36d21d1 100644 +index 94e58569d60fd..47451dbcf7976 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -23,6 +23,7 @@ @@ -114,8 +114,8 @@ index 72ebe05ad7d83..3a780a36d21d1 100644 +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/pdf/pdf_extension_util.h" - #include "chrome/browser/printing/background_printing_manager.h" -@@ -98,6 +99,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; + #include "chrome/browser/policy/management_utils.h" +@@ -99,6 +100,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)"; #endif @@ -129,7 +129,7 @@ index 72ebe05ad7d83..3a780a36d21d1 100644 constexpr char kInvalidArgsForDidStartPreview[] = "Invalid arguments for DidStartPreview"; constexpr char kInvalidPageNumberForDidPreviewPage[] = -@@ -328,7 +336,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { +@@ -329,7 +337,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { source->AddLocalizedStrings(kLocalizedStrings); #if !BUILDFLAG(IS_CHROMEOS) diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index 48abbfddb..360c94560 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index d6b338aa2f5f9..ae5e9f4cf8618 100644 +index ba331906397e7..71acb854028c5 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -133,6 +133,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id) +@@ -132,6 +132,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id) ShouldPrintingContextSkipSystemCalls())), thread_("Printing_Worker") { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index dd3aa2369..625378207 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 42940ab36a024..c22fdcfc8a82a 100644 +index 6b36af5ca7c10..a07d0a700f4cb 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -672,6 +672,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -688,6 +688,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 3a2d1d7c3..58750163c 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index d5d087503f018..476b82029a27d 100644 +index a013ab393c6b0..1187c26bb65f8 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -908,6 +908,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -909,6 +909,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(k100Percent) { @@ -15,7 +15,7 @@ index d5d087503f018..476b82029a27d 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -917,6 +923,11 @@ ResourceBundle::~ResourceBundle() { +@@ -918,6 +924,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index e32923986..b5b1ca4f1 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 e4b6563f2bcdf..1279ebed3885e 100644 +index 9ed11c861275a..442ab6cf20544 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 @@ diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 1a119a8f4..49fc618fc 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index eb8daa2c4d5fe..64f6ac00f4faa 100644 +index 8221b46c59df3..56f9d584b3a50 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -42,10 +42,10 @@ index eb8daa2c4d5fe..64f6ac00f4faa 100644 ::network::mojom::NetworkContextFilePaths::New(); diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 87c6a189d251e..388a02a938468 100644 +index 13911f2bd786d..832308e34a303 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -571,6 +571,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -570,6 +570,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -123,10 +123,10 @@ index 9da2056ddd3cf..c097bb2e8aba3 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index c5a340b64e36d..99a9f387dbd77 100644 +index 8ad7cb314d8c0..cb54766a36acb 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2393,16 +2393,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2243,16 +2243,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -151,14 +151,14 @@ index c5a340b64e36d..99a9f387dbd77 100644 + builder.SetCookieStore(std::move(cookie_store)); + - if (base::FeatureList::IsEnabled(features::kTrustTokens)) { + if (base::FeatureList::IsEnabled(features::kPrivateStateTokens)) { trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index d57c6f1e7f41e..baea0d5edcb8c 100644 +index 1e7e922c738ce..3b13d9ead08d6 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -340,6 +340,9 @@ struct NetworkContextParams { +@@ -345,6 +345,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 1bec437bb..d3e2714fc 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 1dad5d477b4da..55dfd7e5ae5bf 100644 +index 19733d058032d..35d7a1e740e1a 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -491,10 +491,6 @@ class LoginHandlerDelegate { +@@ -495,10 +495,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index 1dad5d477b4da..55dfd7e5ae5bf 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -546,12 +542,6 @@ void OnAuthRequiredContinuation( +@@ -550,12 +546,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote auth_challenge_responder, base::RepeatingCallback web_contents_getter) { @@ -26,7 +26,7 @@ index 1dad5d477b4da..55dfd7e5ae5bf 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, -@@ -2944,8 +2934,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2929,8 +2919,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index 1dad5d477b4da..55dfd7e5ae5bf 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2955,9 +2949,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2940,9 +2934,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 3a42c6fd7..1b78ae688 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -13,10 +13,10 @@ index 133e047583c26..8e5667420f7fc 100644 {base::MayBlock(), base::TaskPriority::USER_VISIBLE, base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN}); diff --git content/browser/browser_context.cc content/browser/browser_context.cc -index db928f54e1901..d05c8b8dd8c58 100644 +index 6180969a38780..13526c077d1d2 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition( +@@ -131,7 +131,7 @@ StoragePartition* BrowserContext::GetStoragePartition( StoragePartition* BrowserContext::GetStoragePartition( const StoragePartitionConfig& storage_partition_config, bool can_create) { @@ -25,7 +25,7 @@ index db928f54e1901..d05c8b8dd8c58 100644 // An off the record profile MUST only use in memory storage partitions. CHECK(storage_partition_config.in_memory()); } -@@ -374,7 +374,8 @@ BrowserContext::CreateVideoDecodePerfHistory() { +@@ -375,7 +375,8 @@ BrowserContext::CreateVideoDecodePerfHistory() { const bool kUseInMemoryDBDefault = false; bool use_in_memory_db = base::GetFieldTrialParamByFeatureAsBool( media::kMediaCapabilitiesWithParameters, kUseInMemoryDBParamName, @@ -58,10 +58,10 @@ index 81013d6eb993a..89abfbe7fec6c 100644 // static diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index af845fb4a872e..10e9fdfb2a15b 100644 +index 0899dc89b93b9..0cd3a8f01c2a2 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc -@@ -562,7 +562,7 @@ bool DatabaseTracker::LazyInit() { +@@ -568,7 +568,7 @@ bool DatabaseTracker::LazyInit() { databases_table_ = std::make_unique(db_.get()); meta_table_ = std::make_unique(); diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index bd637d7a9..8ff691cca 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 a96b2338f39ad..48f1ef2d96045 100644 +index 37bbac5815969..4af1fde05584a 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -64,6 +64,8 @@ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index a5c85a143..10d936c8f 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -119,10 +119,10 @@ index c9be93481712c..cfda497e15f02 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index c9c780e772b69..706e95fb47b47 100644 +index 5f48fe806d0ca..6253c7e880106 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -512,6 +512,12 @@ void LabelButton::OnThemeChanged() { +@@ -538,6 +538,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -136,10 +136,10 @@ index c9c780e772b69..706e95fb47b47 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 4004c670ba7f6..5d7062efed7c2 100644 +index 7ee1bc5714d45..ebf3c21ba0d74 100644 --- ui/views/controls/button/label_button.h +++ ui/views/controls/button/label_button.h -@@ -133,6 +133,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { +@@ -141,6 +141,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate { ui::NativeTheme::State GetForegroundThemeState( ui::NativeTheme::ExtraParams* params) const override; @@ -150,7 +150,7 @@ index 4004c670ba7f6..5d7062efed7c2 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index 7869347fa1408..a5464bde376b7 100644 +index 35ccc8f7ff743..07197b91effc0 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -52,12 +52,29 @@ enum LabelPropertyKey { @@ -183,7 +183,7 @@ index 7869347fa1408..a5464bde376b7 100644 } // namespace namespace views { -@@ -445,6 +462,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -448,6 +465,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -199,7 +199,7 @@ index 7869347fa1408..a5464bde376b7 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -749,6 +775,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -752,6 +778,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -240,10 +240,10 @@ index c4206954d2858..ad7576db464b7 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index bbc0dc1683918..a6836096b55a7 100644 +index b26a30ea89425..9d50678339f7b 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -476,7 +476,8 @@ void MenuController::Run(Widget* parent, +@@ -486,7 +486,8 @@ void MenuController::Run(Widget* parent, MenuAnchorPosition position, bool context_menu, bool is_nested_drag, @@ -253,7 +253,7 @@ index bbc0dc1683918..a6836096b55a7 100644 exit_type_ = ExitType::kNone; possible_drag_ = false; drag_in_progress_ = false; -@@ -523,6 +524,7 @@ void MenuController::Run(Widget* parent, +@@ -533,6 +534,7 @@ void MenuController::Run(Widget* parent, owner_->AddObserver(this); native_view_for_gestures_ = native_view_for_gestures; @@ -261,7 +261,7 @@ index bbc0dc1683918..a6836096b55a7 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2204,6 +2206,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2214,6 +2216,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 bbc0dc1683918..a6836096b55a7 100644 if (item->GetParentMenuItem()) { params.context = state_.item->GetWidget(); -@@ -2888,8 +2891,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2914,8 +2917,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -284,7 +284,7 @@ index bbc0dc1683918..a6836096b55a7 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2908,8 +2916,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2934,8 +2942,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -297,7 +297,7 @@ index bbc0dc1683918..a6836096b55a7 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h -index aa811f23ceea2..99c54eed15ecc 100644 +index ddc2dc5a381bb..c27f38c5e785e 100644 --- ui/views/controls/menu/menu_controller.h +++ ui/views/controls/menu/menu_controller.h @@ -113,7 +113,9 @@ class VIEWS_EXPORT MenuController @@ -360,7 +360,7 @@ index b8fa1c116ebcd..015f15ed72385 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc -index 3f72d4091f3cc..7f7253adf63d2 100644 +index 821826daa9e9a..626b8b540fd00 100644 --- ui/views/controls/menu/menu_host.cc +++ ui/views/controls/menu/menu_host.cc @@ -143,6 +143,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { @@ -383,7 +383,7 @@ index 3f72d4091f3cc..7f7253adf63d2 100644 #if BUILDFLAG(IS_WIN) diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h -index 0720b74d2f333..6b39bcc6c829d 100644 +index 67cdb883886f8..4ca7d632ad7f9 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,7 +396,7 @@ index 0720b74d2f333..6b39bcc6c829d 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index c2433154425be..af00acb2bd5b5 100644 +index e6a16f4d1ee6b..9950ddcdcb936 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc @@ -1095,6 +1095,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, @@ -692,7 +692,7 @@ index 4185ef2d6dba1..78d1f87aeccce 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aura_ozone.cc ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -index f8227c7f41bc9..23743f00d0498 100644 +index 1a183f37f945b..13cf77bbf4190 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc @@ -17,6 +17,7 @@ @@ -703,7 +703,7 @@ index f8227c7f41bc9..23743f00d0498 100644 #include "ui/aura/client/screen_position_client.h" #include "ui/aura/env.h" #include "ui/aura/test/aura_test_utils.h" -@@ -100,9 +101,11 @@ class UIControlsDesktopOzone : public UIControlsAura { +@@ -102,9 +103,11 @@ class UIControlsDesktopOzone : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -716,7 +716,7 @@ index f8227c7f41bc9..23743f00d0498 100644 #if !BUILDFLAG(IS_CHROMEOS_LACROS) if (root_location != root_current_location && diff --git ui/views/view.h ui/views/view.h -index 28167c8e367a9..a630aefbf5dbb 100644 +index 97d4c120169ad..2e8185ccf4ba0 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 608e1ca3a..0dded0b8f 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -18,7 +18,7 @@ index e5d57b6136722..1d34b6256823a 100644 if (!GetMouseWheelPhaseHandler()) return; diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 616aafcb98225..332ade4d33e94 100644 +index dba8778b5b238..d6fdbd89f4743 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -70,6 +70,7 @@ class CursorManager; @@ -152,10 +152,10 @@ index 5342397d0a2e8..3b3878a714e56 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 939345f9c662b..89ae87b666ad3 100644 +index cbf300db6ec3a..0e41c846397c7 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1795,7 +1795,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1796,7 +1796,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -243,10 +243,10 @@ 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 3fcef7e5552bf..f59f82c5f06e5 100644 +index a7d8b09e1d76e..e973baff291c0 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -273,8 +273,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { +@@ -275,8 +275,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { if (properties.parent_widget) { window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget( properties.parent_widget); @@ -258,7 +258,7 @@ index 3fcef7e5552bf..f59f82c5f06e5 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 7fe6a03afbaf2..dc4585b4f398f 100644 +index ceee9102cf021..00e82621849ea 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc @@ -183,16 +183,28 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { @@ -294,7 +294,7 @@ index 7fe6a03afbaf2..dc4585b4f398f 100644 message_handler_->Init(parent_hwnd, pixel_bounds, params.headless_mode); CreateCompositor(params.force_software_compositing); OnAcceleratedWidgetAvailable(); -@@ -1036,11 +1048,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1040,11 +1052,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -312,7 +312,7 @@ index 7fe6a03afbaf2..dc4585b4f398f 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1048,6 +1064,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1052,6 +1068,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -325,7 +325,7 @@ index 7fe6a03afbaf2..dc4585b4f398f 100644 SendEventToSink(event); return event->handled(); } -@@ -1227,8 +1249,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { +@@ -1231,8 +1253,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) { // positions in variable-DPI situations. See https://crbug.com/1224715 for // details. aura::Window* root = nullptr; @@ -426,10 +426,10 @@ index c179c718d0255..967a87c07d026 100644 // the NativeWidget may specify a default size. If the parent is specified, // |bounds| is in the parent's coordinate system. If the parent is not diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h -index a4a8a34009440..88d9721e0c71a 100644 +index 8b0f5f5c2867b..1c8afcfb9d905 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -379,6 +379,10 @@ class VIEWS_EXPORT WidgetDelegate +@@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate // Returns true if the title text should be centered. bool ShouldCenterWindowTitleText() const; @@ -455,21 +455,10 @@ index d24c447bb8030..29215d6578169 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index ec39cb0d15c80..27c51bfb740f4 100644 +index f8a5b92ae541a..9186d9a56de3d 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -626,7 +626,9 @@ void HWNDMessageHandler::SetDwmFrameExtension(DwmFrameState state) { - if (!delegate_->HasFrame() && ui::win::IsAeroGlassEnabled() && - !is_translucent_) { - MARGINS m = {0, 0, 0, 0}; -- if (state == DwmFrameState::kOn) -+ // Fix 1px gap with frameless windows on Win11 by not setting DWM margins -+ // when maximized. See CEF issue #3414. -+ if (state == DwmFrameState::kOn && !IsMaximized()) - m = {0, 0, 1, 0}; - DwmExtendFrameIntoClientArea(hwnd(), &m); - } -@@ -827,7 +829,11 @@ bool HWNDMessageHandler::IsVisible() const { +@@ -838,7 +838,11 @@ bool HWNDMessageHandler::IsVisible() const { } bool HWNDMessageHandler::IsActive() const { @@ -482,7 +471,7 @@ index ec39cb0d15c80..27c51bfb740f4 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3224,10 +3230,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3249,10 +3253,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 27733239e..7f46c573a 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 af5a1b2c61c45..71d0fa3c36600 100644 +index fb793e98d5939..bf51d9aa376ea 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -218,6 +218,8 @@ viz_component("service") { +@@ -220,6 +220,8 @@ viz_component("service") { "transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.h", "viz_service_export.h", @@ -93,7 +93,7 @@ index af5a1b2c61c45..71d0fa3c36600 100644 defines = [ "VIZ_SERVICE_IMPLEMENTATION" ] diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index bd9f162f5053f..20e4d6d437ce2 100644 +index d8f25c1435d4b..ee1eda5180e93 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -17,6 +17,7 @@ @@ -134,10 +134,10 @@ index bd9f162f5053f..20e4d6d437ce2 100644 return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_, display_client); diff --git components/viz/service/display_embedder/software_output_device_win.cc components/viz/service/display_embedder/software_output_device_win.cc -index aedc4d24d3fb3..442d2e4204b93 100644 +index de5825e251f3b..841a626586f2b 100644 --- components/viz/service/display_embedder/software_output_device_win.cc +++ components/viz/service/display_embedder/software_output_device_win.cc -@@ -191,8 +191,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( +@@ -192,8 +192,9 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated( if (!canvas_) return; @@ -222,7 +222,7 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index eb6bcc2e265a9..832d4ba916b7c 100644 +index 50cea82c6b477..0329d39416742 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -32,7 +32,9 @@ @@ -260,7 +260,7 @@ index eb6bcc2e265a9..832d4ba916b7c 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 -@@ -496,6 +509,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -503,6 +516,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 d735fba02..d39c6af0f 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,10 +1,10 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 7ca95e7ec0f37..3be6aa0635ed3 100644 +index 4b0346f89aff3..ad0be55a44a7b 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3106,6 +3106,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, - site_instance.get(), params.renderer_initiated_creation, - params.main_frame_name, GetOpener(), primary_main_frame_policy); +@@ -3168,6 +3168,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, + params.main_frame_name, GetOpener(), primary_main_frame_policy, + base::UnguessableToken::Create()); + if (params.view && params.delegate_view) { + view_.reset(params.view); @@ -15,7 +15,7 @@ index 7ca95e7ec0f37..3be6aa0635ed3 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3116,6 +3122,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3178,6 +3184,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 7ca95e7ec0f37..3be6aa0635ed3 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3291,6 +3298,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3359,6 +3366,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 7ca95e7ec0f37..3be6aa0635ed3 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4029,6 +4039,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -4097,6 +4107,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( params.pip_options->lock_aspect_ratio; } @@ -46,12 +46,12 @@ index 7ca95e7ec0f37..3be6aa0635ed3 100644 + &create_params.delegate_view); + } + - std::unique_ptr new_contents; - if (!is_guest) { - create_params.context = view_->GetNativeView(); -@@ -7931,6 +7950,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, + // Check whether there is an available prerendered page for this navigation if + // this is not for guest. If it exists, take WebContents pre-created for + // hosting the prerendered page instead of creating new WebContents. +@@ -8007,6 +8026,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). - SetFocusedFrameTree(node->frame_tree()); + SetFocusedFrameTree(&node->frame_tree()); } + + observers_.NotifyObservers(&WebContentsObserver::OnFrameFocused, @@ -60,7 +60,7 @@ index 7ca95e7ec0f37..3be6aa0635ed3 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index cc61bc1b43500..c5a387653d93a 100644 +index eec67dd7a103e..4321c4cb12fd9 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -95,10 +95,12 @@ class BrowserContext; @@ -76,7 +76,7 @@ index cc61bc1b43500..c5a387653d93a 100644 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -238,6 +240,10 @@ class WebContents : public PageNavigator, +@@ -241,6 +243,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; @@ -119,7 +119,7 @@ index e2ce097fb78d8..d67675467c133 100644 // typically happens when popups are created. virtual void WebContentsCreated(WebContents* source_contents, diff --git content/public/browser/web_contents_observer.h content/public/browser/web_contents_observer.h -index 0fe98cc87b443..a6999f996cf40 100644 +index d89d18e8d2509..9d7df1f8e7bbc 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h @@ -219,6 +219,9 @@ class CONTENT_EXPORT WebContentsObserver { @@ -132,7 +132,7 @@ index 0fe98cc87b443..a6999f996cf40 100644 // This method is invoked when the `blink::WebView` of the current // RenderViewHost is ready, e.g. because we recreated it after a crash. virtual void RenderViewReady() {} -@@ -802,6 +805,10 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -800,6 +803,10 @@ class CONTENT_EXPORT WebContentsObserver { // WebContents has gained/lost focus. virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index f1fc7d461..9b0c07b7c 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,9 +1,9 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 892b1c4f29c82..e63eb20fe5f67 100644 +index a2a4996e3cbe3..debfe4b698283 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -784,6 +784,11 @@ class BLINK_PLATFORM_EXPORT Platform { - return blink::mojom::AttributionOsSupport::kDisabled; +@@ -798,6 +798,11 @@ class BLINK_PLATFORM_EXPORT Platform { + return attribution_reporting::mojom::OsSupport::kDisabled; } + // DevTools ------------------------------------------------------------ @@ -15,7 +15,7 @@ index 892b1c4f29c82..e63eb20fe5f67 100644 static void InitializeMainThreadCommon( Platform* platform, diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index d9274f6ccb882..548ed543b880e 100644 +index 0718aa7fbe1b1..7e393fa3ebbb6 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -8,6 +8,7 @@ @@ -26,7 +26,7 @@ index d9274f6ccb882..548ed543b880e 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -149,6 +150,7 @@ DevToolsSession::DevToolsSession( +@@ -151,6 +152,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -34,7 +34,7 @@ index d9274f6ccb882..548ed543b880e 100644 } DevToolsSession::~DevToolsSession() { -@@ -191,6 +193,7 @@ void DevToolsSession::Detach() { +@@ -196,6 +198,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 9f2e86f26..942696985 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,7 +11,7 @@ index c8655d9270b81..d11450d22123a 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index eaa633bc51909..afc38da9459a9 100644 +index 2e8500ac411be..8b1e6b5217acb 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc @@ -249,8 +249,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { @@ -39,7 +39,7 @@ index eaa633bc51909..afc38da9459a9 100644 fullscreen_controller_(std::make_unique(this)), page_base_background_color_( diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index f283bfde9e43d..ab42d99e5747a 100644 +index ac623b8bd6c06..3e0bd1dd8ce3b 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h @@ -134,7 +134,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -52,7 +52,7 @@ index f283bfde9e43d..ab42d99e5747a 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -839,6 +840,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -840,6 +841,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_ = 0.f; bool fake_page_scale_animation_use_anchor_ = false; @@ -62,7 +62,7 @@ index f283bfde9e43d..ab42d99e5747a 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 e319413adc293..4bfc8af7776de 100644 +index 6c906a29dbb9e..9d6f325794b19 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc @@ -923,7 +923,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { diff --git a/patch/patches/webkit_runtime_enabled_features.patch b/patch/patches/webkit_runtime_enabled_features.patch index 1103f653b..33e7cc6e1 100644 --- a/patch/patches/webkit_runtime_enabled_features.patch +++ b/patch/patches/webkit_runtime_enabled_features.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl -index d414c5db40cc4..29efc4024b67d 100644 +index 32ca8183f6501..fb38785835fa0 100644 --- third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl +++ third_party/blink/renderer/build/scripts/templates/runtime_enabled_features.h.tmpl @@ -13,6 +13,8 @@ @@ -11,7 +11,7 @@ index d414c5db40cc4..29efc4024b67d 100644 #define ASSERT_ORIGIN_TRIAL(feature) \ static_assert(std::is_sameemplace(kOsVersionTag, os_version); #endif @@ -42,7 +43,7 @@ index cc28ba2a60c35..cc4848f2324c2 100644 PopulateExtensionInfoLogs(response.get()); PopulatePowerApiLogs(response.get()); #if BUILDFLAG(IS_WIN) -@@ -413,6 +421,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( +@@ -472,6 +480,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs( if (!profile) return; @@ -55,7 +56,7 @@ index cc28ba2a60c35..cc4848f2324c2 100644 extensions::ExtensionRegistry* extension_registry = extensions::ExtensionRegistry::Get(profile); std::string extensions_list; -@@ -512,6 +526,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime( +@@ -577,6 +591,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 6b6d69988..470f0babc 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 a885e8cbc626c..9af2869a5c038 100644 +index f20c7697746d1..ad786ca9ebd62 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1136,6 +1136,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1079,6 +1079,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) {