diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 1a25284b3..0881b7055 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/106.0.5249.0' + 'chromium_checkout': 'refs/tags/107.0.5304.0' } diff --git a/libcef/browser/alloy/alloy_browser_host_impl.cc b/libcef/browser/alloy/alloy_browser_host_impl.cc index 389a0d87d..7783c2072 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.cc +++ b/libcef/browser/alloy/alloy_browser_host_impl.cc @@ -1036,11 +1036,11 @@ void AlloyBrowserHostImpl::AddNewContents( std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) { platform_delegate_->AddNewContents(source, std::move(new_contents), - target_url, disposition, initial_rect, + target_url, disposition, window_features, user_gesture, was_blocked); } diff --git a/libcef/browser/alloy/alloy_browser_host_impl.h b/libcef/browser/alloy/alloy_browser_host_impl.h index 5d5070691..bddc2d008 100644 --- a/libcef/browser/alloy/alloy_browser_host_impl.h +++ b/libcef/browser/alloy/alloy_browser_host_impl.h @@ -196,7 +196,7 @@ class AlloyBrowserHostImpl : public CefBrowserHostBase, std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) override; void LoadingStateChanged(content::WebContents* source, diff --git a/libcef/browser/alloy/alloy_browser_main.cc b/libcef/browser/alloy/alloy_browser_main.cc index 1576b7cde..56b6fbf1c 100644 --- a/libcef/browser/alloy/alloy_browser_main.cc +++ b/libcef/browser/alloy/alloy_browser_main.cc @@ -29,7 +29,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/media/router/chrome_media_router_factory.h" #include "chrome/browser/net/system_network_context_manager.h" -#include "chrome/browser/plugins/plugin_finder.h" #include "chrome/browser/ui/javascript_dialogs/chrome_javascript_app_modal_dialog_view_factory.h" #include "chrome/browser/ui/ui_features.h" #include "chrome/common/chrome_switches.h" @@ -91,6 +90,7 @@ #include "ui/linux/linux_ui.h" #include "ui/linux/linux_ui_delegate.h" #include "ui/linux/linux_ui_factory.h" +#include "ui/linux/linux_ui_getter.h" #include "ui/ozone/public/ozone_platform.h" #endif // BUILDFLAG(IS_LINUX) @@ -106,7 +106,20 @@ namespace { #if BUILDFLAG(IS_LINUX) -std::unique_ptr BuildLinuxUI() { +class LinuxUiGetterImpl : public ui::LinuxUiGetter { + public: + LinuxUiGetterImpl() = default; + ~LinuxUiGetterImpl() override = default; + ui::LinuxUiTheme* GetForWindow(aura::Window* window) override { + return window ? GetForProfile(GetThemeProfileForWindow(window)) : nullptr; + } + ui::LinuxUiTheme* GetForProfile(Profile* profile) override { + return ui::GetLinuxUiTheme( + ThemeServiceAuraLinux::GetSystemThemeForProfile(profile)); + } +}; + +ui::LinuxUi* GetLinuxUI() { // We can't use GtkUi in combination with multi-threaded-message-loop because // Chromium's GTK implementation doesn't use GDK threads. if (!!CefContext::Get()->settings().multi_threaded_message_loop) @@ -117,31 +130,7 @@ std::unique_ptr BuildLinuxUI() { if (!ui::LinuxUiDelegate::GetInstance()) return nullptr; - return ui::CreateLinuxUi(); -} - -// Based on chrome_browser_main_extra_parts_views_linux.cc -void ToolkitInitializedLinux() { - if (auto linux_ui = BuildLinuxUI()) { - linux_ui->SetUseSystemThemeCallback( - base::BindRepeating([](aura::Window* window) { - if (!window) - return true; - return ThemeServiceAuraLinux::ShouldUseSystemThemeForProfile( - GetThemeProfileForWindow(window)); - })); - - ui::LinuxUi::SetInstance(std::move(linux_ui)); - - // Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager - // implementation). Start observing them once it's initialized. - ui::CursorFactory::GetInstance()->ObserveThemeChanges(); - } - - auto printing_delegate = new CefPrintingContextLinuxDelegate(); - auto default_delegate = - printing::PrintingContextLinuxDelegate::SetInstance(printing_delegate); - printing_delegate->SetDefaultDelegate(default_delegate); + return ui::GetDefaultLinuxUi(); } #endif // BUILDFLAG(IS_LINUX) @@ -170,8 +159,21 @@ void AlloyBrowserMainParts::ToolkitInitialized() { #endif #if BUILDFLAG(IS_LINUX) - ToolkitInitializedLinux(); -#endif + // Based on chrome_browser_main_extra_parts_views_linux.cc + if (auto linux_ui = GetLinuxUI()) { + linux_ui_getter_ = std::make_unique(); + ui::LinuxUi::SetInstance(linux_ui); + + // Cursor theme changes are tracked by LinuxUI (via a CursorThemeManager + // implementation). Start observing them once it's initialized. + ui::CursorFactory::GetInstance()->ObserveThemeChanges(); + } + + auto printing_delegate = new CefPrintingContextLinuxDelegate(); + auto default_delegate = + printing::PrintingContextLinuxDelegate::SetInstance(printing_delegate); + printing_delegate->SetDefaultDelegate(default_delegate); +#endif // BUILDFLAG(IS_LINUX) #if BUILDFLAG(IS_MAC) if (base::FeatureList::IsEnabled(features::kViewsJSAppModalDialog)) @@ -299,9 +301,6 @@ int AlloyBrowserMainParts::PreMainMessageLoopRun() { base::IsEnterpriseDevice(); #endif // BUILDFLAG(IS_WIN) - // Triggers initialization of the singleton instance on UI thread. - PluginFinder::GetInstance(); - scheme::RegisterWebUIControllerFactory(); file_dialog_runner::RegisterFactory(); permission_prompt::RegisterCreateCallback(); diff --git a/libcef/browser/alloy/alloy_browser_main.h b/libcef/browser/alloy/alloy_browser_main.h index 268e4baf5..856d19f5e 100644 --- a/libcef/browser/alloy/alloy_browser_main.h +++ b/libcef/browser/alloy/alloy_browser_main.h @@ -28,6 +28,12 @@ class LayoutProvider; #endif } // namespace views +#if BUILDFLAG(IS_LINUX) +namespace ui { +class LinuxUiGetter; +} +#endif + class CefDevToolsDelegate; class AlloyBrowserMainParts : public content::BrowserMainParts { @@ -89,6 +95,10 @@ class AlloyBrowserMainParts : public content::BrowserMainParts { std::unique_ptr screen_; std::unique_ptr layout_provider_; #endif + +#if BUILDFLAG(IS_LINUX) + std::unique_ptr linux_ui_getter_; +#endif }; #endif // CEF_LIBCEF_BROWSER_ALLOY_ALLOY_BROWSER_MAIN_H_ diff --git a/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/libcef/browser/alloy/browser_platform_delegate_alloy.cc index 744fb3fa3..47f2f008f 100644 --- a/libcef/browser/alloy/browser_platform_delegate_alloy.cc +++ b/libcef/browser/alloy/browser_platform_delegate_alloy.cc @@ -131,7 +131,7 @@ void CefBrowserPlatformDelegateAlloy::AddNewContents( std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) { REQUIRE_ALLOY_RUNTIME(); @@ -149,7 +149,7 @@ void CefBrowserPlatformDelegateAlloy::AddNewContents( if (extension_host_) { extension_host_->AddNewContents(source, std::move(new_contents), target_url, - disposition, initial_rect, user_gesture, + disposition, window_features, user_gesture, was_blocked); } } diff --git a/libcef/browser/alloy/browser_platform_delegate_alloy.h b/libcef/browser/alloy/browser_platform_delegate_alloy.h index db1060cc8..6286fe900 100644 --- a/libcef/browser/alloy/browser_platform_delegate_alloy.h +++ b/libcef/browser/alloy/browser_platform_delegate_alloy.h @@ -30,7 +30,7 @@ class CefBrowserPlatformDelegateAlloy : public CefBrowserPlatformDelegate { std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) override; bool ShouldAllowRendererInitiatedCrossProcessNavigation( diff --git a/libcef/browser/audio_capturer.cc b/libcef/browser/audio_capturer.cc index 4cd10be3c..3ed90421f 100644 --- a/libcef/browser/audio_capturer.cc +++ b/libcef/browser/audio_capturer.cc @@ -13,7 +13,7 @@ namespace { -media::ChannelLayout TranslateChannelLayout( +media::ChannelLayoutConfig TranslateChannelLayout( cef_channel_layout_t channel_layout) { // Verify that our enum matches Chromium's values. The enum values match // between those enums and existing values don't ever change, so it's enough @@ -22,7 +22,9 @@ media::ChannelLayout TranslateChannelLayout( static_cast(CEF_CHANNEL_LAYOUT_MAX) == static_cast(media::CHANNEL_LAYOUT_MAX), "cef_channel_layout_t must match the ChannelLayout enum in Chromium"); - return static_cast(channel_layout); + + const auto layout = static_cast(channel_layout); + return {layout, media::ChannelLayoutToChannelCount(layout)}; } void StreamCreatorHelper( diff --git a/libcef/browser/browser_context.cc b/libcef/browser/browser_context.cc index 305c6ad02..0fcc1abe9 100644 --- a/libcef/browser/browser_context.cc +++ b/libcef/browser/browser_context.cc @@ -55,9 +55,11 @@ class ImplManager { void RemoveImpl(CefBrowserContext* impl, const base::FilePath& path) { CEF_REQUIRE_UIT(); - Vector::iterator it = GetImplPos(impl); - DCHECK(it != all_.end()); - all_.erase(it); + { + Vector::iterator it = GetImplPos(impl); + DCHECK(it != all_.end()); + all_.erase(it); + } if (!path.empty()) { PathMap::iterator it = map_.find(path); diff --git a/libcef/browser/browser_info.cc b/libcef/browser/browser_info.cc index c50cbe01d..0128ddfbb 100644 --- a/libcef/browser/browser_info.cc +++ b/libcef/browser/browser_info.cc @@ -223,11 +223,11 @@ void CefBrowserInfo::RemoveFrame(content::RenderFrameHost* host) { auto it2 = frame_info_set_.find(frame_info); // Explicitly Detach everything but the current main frame. - const auto& frame_info = *it2; - if (frame_info->frame_ && !frame_info->IsCurrentMainFrame()) { - if (frame_info->frame_->Detach( + const auto& other_frame_info = *it2; + if (other_frame_info->frame_ && !other_frame_info->IsCurrentMainFrame()) { + if (other_frame_info->frame_->Detach( CefFrameHostImpl::DetachReason::RENDER_FRAME_DELETED)) { - MaybeNotifyFrameDetached(browser_, frame_info->frame_); + MaybeNotifyFrameDetached(browser_, other_frame_info->frame_); } } diff --git a/libcef/browser/browser_info_manager.cc b/libcef/browser/browser_info_manager.cc index c7a057f75..22fe1aa42 100644 --- a/libcef/browser/browser_info_manager.cc +++ b/libcef/browser/browser_info_manager.cc @@ -32,13 +32,13 @@ const int64_t kNewBrowserInfoResponseTimeoutMs = 2000; void TranslatePopupFeatures(const blink::mojom::WindowFeatures& webKitFeatures, CefPopupFeatures& features) { - features.x = static_cast(webKitFeatures.x); + features.x = static_cast(webKitFeatures.bounds.x()); features.xSet = webKitFeatures.has_x; - features.y = static_cast(webKitFeatures.y); + features.y = static_cast(webKitFeatures.bounds.y()); features.ySet = webKitFeatures.has_y; - features.width = static_cast(webKitFeatures.width); + features.width = static_cast(webKitFeatures.bounds.width()); features.widthSet = webKitFeatures.has_width; - features.height = static_cast(webKitFeatures.height); + features.height = static_cast(webKitFeatures.bounds.height()); features.heightSet = webKitFeatures.has_height; features.menuBarVisible = webKitFeatures.menu_bar_visible; diff --git a/libcef/browser/browser_platform_delegate.cc b/libcef/browser/browser_platform_delegate.cc index cbaede478..46b4cbb23 100644 --- a/libcef/browser/browser_platform_delegate.cc +++ b/libcef/browser/browser_platform_delegate.cc @@ -45,7 +45,7 @@ void CefBrowserPlatformDelegate::AddNewContents( std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) { NOTREACHED(); diff --git a/libcef/browser/browser_platform_delegate.h b/libcef/browser/browser_platform_delegate.h index d6b840409..3518faa93 100644 --- a/libcef/browser/browser_platform_delegate.h +++ b/libcef/browser/browser_platform_delegate.h @@ -30,6 +30,10 @@ class WebMouseEvent; class WebMouseWheelEvent; class WebInputEvent; class WebTouchEvent; + +namespace mojom { +class WindowFeatures; +} } // namespace blink namespace content { @@ -114,7 +118,7 @@ class CefBrowserPlatformDelegate { std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked); diff --git a/libcef/browser/chrome/chrome_browser_context.cc b/libcef/browser/chrome/chrome_browser_context.cc index 6e7c0115d..90c828784 100644 --- a/libcef/browser/chrome/chrome_browser_context.cc +++ b/libcef/browser/chrome/chrome_browser_context.cc @@ -58,15 +58,19 @@ void ChromeBrowserContext::InitializeAsync(base::OnceClosure initialized_cb) { if (cache_path_ == user_data_dir) { // Use the default disk-based profile. auto profile = profile_manager->GetPrimaryUserProfile(); - ProfileCreated(profile, Profile::CreateStatus::CREATE_STATUS_INITIALIZED); + ProfileCreated(Profile::CreateStatus::CREATE_STATUS_INITIALIZED, profile); return; } else if (cache_path_.DirName() == user_data_dir) { // Create or load a specific disk-based profile. May continue // synchronously or asynchronously. profile_manager->CreateProfileAsync( cache_path_, - base::BindRepeating(&ChromeBrowserContext::ProfileCreated, - weak_ptr_factory_.GetWeakPtr())); + base::BindOnce(&ChromeBrowserContext::ProfileCreated, + weak_ptr_factory_.GetWeakPtr(), + Profile::CreateStatus::CREATE_STATUS_INITIALIZED), + base::BindOnce(&ChromeBrowserContext::ProfileCreated, + weak_ptr_factory_.GetWeakPtr(), + Profile::CreateStatus::CREATE_STATUS_CREATED)); return; } else { // All profile directories must be relative to |user_data_dir|. @@ -76,7 +80,7 @@ void ChromeBrowserContext::InitializeAsync(base::OnceClosure initialized_cb) { } // Default to creating a new/unique OffTheRecord profile. - ProfileCreated(nullptr, Profile::CreateStatus::CREATE_STATUS_LOCAL_FAIL); + ProfileCreated(Profile::CreateStatus::CREATE_STATUS_LOCAL_FAIL, nullptr); } void ChromeBrowserContext::Shutdown() { @@ -98,8 +102,8 @@ void ChromeBrowserContext::Shutdown() { } } -void ChromeBrowserContext::ProfileCreated(Profile* profile, - Profile::CreateStatus status) { +void ChromeBrowserContext::ProfileCreated(Profile::CreateStatus status, + Profile* profile) { Profile* parent_profile = nullptr; OffTheRecordProfileImpl* otr_profile = nullptr; diff --git a/libcef/browser/chrome/chrome_browser_context.h b/libcef/browser/chrome/chrome_browser_context.h index fff34a765..0bac7fde4 100644 --- a/libcef/browser/chrome/chrome_browser_context.h +++ b/libcef/browser/chrome/chrome_browser_context.h @@ -38,7 +38,7 @@ class ChromeBrowserContext : public CefBrowserContext, public ProfileObserver { private: ~ChromeBrowserContext() override; - void ProfileCreated(Profile* profile, Profile::CreateStatus status); + void ProfileCreated(Profile::CreateStatus status, Profile* profile); base::OnceClosure initialized_cb_; Profile* profile_ = nullptr; diff --git a/libcef/browser/chrome/chrome_browser_delegate.cc b/libcef/browser/chrome/chrome_browser_delegate.cc index d5b6892f7..6df40c319 100644 --- a/libcef/browser/chrome/chrome_browser_delegate.cc +++ b/libcef/browser/chrome/chrome_browser_delegate.cc @@ -160,7 +160,7 @@ void ChromeBrowserDelegate::AddNewContents( std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) { auto new_browser = @@ -173,7 +173,7 @@ void ChromeBrowserDelegate::AddNewContents( // Fall back to default behavior from Browser::AddNewContents. chrome::AddWebContents(browser_, source_contents, std::move(new_contents), - target_url, disposition, initial_rect); + target_url, disposition, window_features); } content::WebContents* ChromeBrowserDelegate::OpenURLFromTab( diff --git a/libcef/browser/chrome/chrome_browser_delegate.h b/libcef/browser/chrome/chrome_browser_delegate.h index 77455f728..d073454a9 100644 --- a/libcef/browser/chrome/chrome_browser_delegate.h +++ b/libcef/browser/chrome/chrome_browser_delegate.h @@ -70,7 +70,7 @@ class ChromeBrowserDelegate : public cef::BrowserDelegate { std::unique_ptr new_contents, const GURL& target_url, WindowOpenDisposition disposition, - const gfx::Rect& initial_rect, + const blink::mojom::WindowFeatures& window_features, bool user_gesture, bool* was_blocked) override; content::WebContents* OpenURLFromTab( diff --git a/libcef/browser/devtools/devtools_file_manager.cc b/libcef/browser/devtools/devtools_file_manager.cc index 93f7cd457..76a877fa0 100644 --- a/libcef/browser/devtools/devtools_file_manager.cc +++ b/libcef/browser/devtools/devtools_file_manager.cc @@ -76,12 +76,11 @@ void CefDevToolsFileManager::Save(const std::string& url, return; } - const base::DictionaryValue* file_map = &base::Value::AsDictionaryValue( - *prefs_->GetDictionary(prefs::kDevToolsEditedFiles)); + const base::Value::Dict& file_map = + prefs_->GetDict(prefs::kDevToolsEditedFiles); base::FilePath initial_path; - const base::Value* path_value; - if (file_map->Get(base::MD5String(url), &path_value)) { + if (const base::Value* path_value = file_map.Find(base::MD5String(url))) { absl::optional path = base::ValueToFilePath(*path_value); if (path) initial_path = std::move(*path); diff --git a/libcef/browser/devtools/devtools_frontend.cc b/libcef/browser/devtools/devtools_frontend.cc index a651a16a3..1982ac366 100644 --- a/libcef/browser/devtools/devtools_frontend.cc +++ b/libcef/browser/devtools/devtools_frontend.cc @@ -483,7 +483,7 @@ void CefDevToolsFrontend::HandleMessageFromDevToolsFrontend( } else if (*method == "getPreferences") { SendMessageAck( request_id, - GetPrefs()->GetDictionary(prefs::kDevToolsPreferences)->Clone()); + base::Value(GetPrefs()->GetDict(prefs::kDevToolsPreferences).Clone())); return; } else if (*method == "setPreference") { if (params.size() < 2) diff --git a/libcef/browser/extensions/api/tabs/tabs_api.cc b/libcef/browser/extensions/api/tabs/tabs_api.cc index 2faa9ad52..cae0ea4c4 100644 --- a/libcef/browser/extensions/api/tabs/tabs_api.cc +++ b/libcef/browser/extensions/api/tabs/tabs_api.cc @@ -60,14 +60,6 @@ void ZoomModeToZoomSettings(zoom::ZoomController::ZoomMode zoom_mode, } } -template -void AssignOptionalValue(const std::unique_ptr& source, - std::unique_ptr& destination) { - if (source.get()) { - destination.reset(new T(*source)); - } -} - } // namespace ExtensionFunction::ResponseAction TabsGetFunction::Run() { @@ -82,27 +74,23 @@ ExtensionFunction::ResponseAction TabsCreateFunction::Run() { EXTENSION_FUNCTION_VALIDATE(params.get()); CefExtensionFunctionDetails::OpenTabParams options; - AssignOptionalValue(params->create_properties.window_id, options.window_id); - AssignOptionalValue(params->create_properties.opener_tab_id, - options.opener_tab_id); - AssignOptionalValue(params->create_properties.selected, options.active); + options.window_id = params->create_properties.window_id; + options.opener_tab_id = params->create_properties.opener_tab_id; + options.active = params->create_properties.selected; // The 'active' property has replaced the 'selected' property. - AssignOptionalValue(params->create_properties.active, options.active); - AssignOptionalValue(params->create_properties.pinned, options.pinned); - AssignOptionalValue(params->create_properties.index, options.index); - AssignOptionalValue(params->create_properties.url, options.url); + options.active = params->create_properties.active; + options.pinned = params->create_properties.pinned; + options.index = params->create_properties.index; + options.url = params->create_properties.url; std::string error; - std::unique_ptr result( - cef_details_.OpenTab(options, user_gesture(), &error)); + auto result = cef_details_.OpenTab(options, user_gesture(), &error); if (!result) return RespondNow(Error(error)); // Return data about the newly created tab. - return RespondNow( - has_callback() - ? OneArgument(base::Value::FromUniquePtrValue(std::move(result))) - : NoArguments()); + return RespondNow(has_callback() ? OneArgument(base::Value(result->ToValue())) + : NoArguments()); } BaseAPIFunction::BaseAPIFunction() : cef_details_(this) {} @@ -134,7 +122,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { // -favIconUrl // Navigate the tab to a new location if the url is different. - if (params->update_properties.url.get()) { + if (params->update_properties.url.has_value()) { std::string updated_url = *params->update_properties.url; if (!UpdateURL(updated_url, tab_id_, &error_)) return RespondNow(Error(std::move(error_))); @@ -143,11 +131,11 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { bool active = false; // TODO(rafaelw): Setting |active| from js doesn't make much sense. // Move tab selection management up to window. - if (params->update_properties.selected.get()) + if (params->update_properties.selected.has_value()) active = *params->update_properties.selected; // The 'active' property has replaced 'selected'. - if (params->update_properties.active.get()) + if (params->update_properties.active.has_value()) active = *params->update_properties.active; if (active) { @@ -156,21 +144,21 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(tabs_constants::kTabStripNotEditableError)); } - if (params->update_properties.highlighted.get() && + if (params->update_properties.highlighted.has_value() && *params->update_properties.highlighted) { // TODO: Highlight the tab at |tab_id_|. NOTIMPLEMENTED(); return RespondNow(Error(tabs_constants::kTabStripNotEditableError)); } - if (params->update_properties.pinned.get() && + if (params->update_properties.pinned.has_value() && *params->update_properties.pinned) { // TODO: Pin the tab at |tab_id_|. NOTIMPLEMENTED(); return RespondNow(Error(tabs_constants::kTabStripNotEditableError)); } - if (params->update_properties.muted.get()) { + if (params->update_properties.muted.has_value()) { // TODO: Mute/unmute the tab at |tab_id_|. NOTIMPLEMENTED(); return RespondNow(Error(ErrorUtils::FormatErrorMessage( @@ -178,7 +166,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { base::NumberToString(tab_id_)))); } - if (params->update_properties.opener_tab_id.get()) { + if (params->update_properties.opener_tab_id.has_value()) { int opener_id = *params->update_properties.opener_tab_id; if (opener_id == tab_id_) return RespondNow(Error("Cannot set a tab's opener to itself.")); @@ -188,7 +176,7 @@ ExtensionFunction::ResponseAction TabsUpdateFunction::Run() { return RespondNow(Error(tabs_constants::kTabStripNotEditableError)); } - if (params->update_properties.auto_discardable.get()) { + if (params->update_properties.auto_discardable.has_value()) { // TODO: Set auto-discardable state for the tab at |tab_id_|. NOTIMPLEMENTED(); } @@ -242,7 +230,7 @@ ExtensionFunction::ResponseValue TabsUpdateFunction::GetResult() { if (!has_callback()) return NoArguments(); - return ArgumentList(tabs::Get::Results::Create(*cef_details_.CreateTabObject( + return ArgumentList(tabs::Get::Results::Create(cef_details_.CreateTabObject( AlloyBrowserHostImpl::GetBrowserForContents(web_contents_), /*opener_browser_id=*/-1, /*active=*/true, tab_id_))); } @@ -524,8 +512,8 @@ ExtensionFunction::ResponseAction TabsGetZoomSettingsFunction::Run() { ZoomController::ZoomMode zoom_mode = zoom_controller->zoom_mode(); api::tabs::ZoomSettings zoom_settings; ZoomModeToZoomSettings(zoom_mode, &zoom_settings); - zoom_settings.default_zoom_factor = std::make_unique( - blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel())); + zoom_settings.default_zoom_factor = + blink::PageZoomLevelToZoomFactor(zoom_controller->GetDefaultZoomLevel()); return RespondNow( ArgumentList(api::tabs::GetZoomSettings::Results::Create(zoom_settings))); diff --git a/libcef/browser/extensions/component_extension_resource_manager.cc b/libcef/browser/extensions/component_extension_resource_manager.cc index 213b7209f..138e2d5f1 100644 --- a/libcef/browser/extensions/component_extension_resource_manager.cc +++ b/libcef/browser/extensions/component_extension_resource_manager.cc @@ -21,14 +21,13 @@ CefComponentExtensionResourceManager::CefComponentExtensionResourceManager() { kComponentExtensionResourcesSize); AddComponentResourceEntries(kPdfResources, kPdfResourcesSize); - base::Value dict(base::Value::Type::DICTIONARY); + base::Value::Dict dict; pdf_extension_util::AddStrings( pdf_extension_util::PdfViewerContext::kPdfViewer, &dict); pdf_extension_util::AddAdditionalData(/*enable_annotations=*/true, &dict); ui::TemplateReplacements pdf_viewer_replacements; - ui::TemplateReplacementsFromDictionaryValue(dict.GetDict(), - &pdf_viewer_replacements); + ui::TemplateReplacementsFromDictionaryValue(dict, &pdf_viewer_replacements); template_replacements_[extension_misc::kPdfExtensionId] = std::move(pdf_viewer_replacements); } diff --git a/libcef/browser/extensions/extension_function_details.cc b/libcef/browser/extensions/extension_function_details.cc index 7e6702847..5b96534be 100644 --- a/libcef/browser/extensions/extension_function_details.cc +++ b/libcef/browser/extensions/extension_function_details.cc @@ -288,7 +288,7 @@ CefExtensionFunctionDetails::OpenTabParams::OpenTabParams() {} CefExtensionFunctionDetails::OpenTabParams::~OpenTabParams() {} -base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( +std::unique_ptr CefExtensionFunctionDetails::OpenTab( const OpenTabParams& params, bool user_gesture, std::string* error_message) const { @@ -298,7 +298,7 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( // windowId defaults to "current" window. int window_id = extension_misc::kCurrentWindowId; - if (params.window_id.get()) + if (params.window_id.has_value()) window_id = *params.window_id; // CEF doesn't have the concept of windows containing tab strips so we'll @@ -310,7 +310,7 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( // If an opener browser was specified then we expect it to exist. int opener_browser_id = -1; - if (params.opener_tab_id.get() && *params.opener_tab_id >= 0) { + if (params.opener_tab_id.has_value() && *params.opener_tab_id >= 0) { if (GetBrowserForTabIdAgain(*params.opener_tab_id, error_message)) { opener_browser_id = *params.opener_tab_id; } else { @@ -319,7 +319,7 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( } GURL url; - if (params.url.get()) { + if (params.url.has_value()) { std::string url_string = *params.url; if (!ExtensionTabUtil::PrepareURLForNavigation( url_string, function()->extension(), &url, error_message)) { @@ -330,12 +330,12 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( // Default to foreground for the new tab. The presence of 'active' property // will override this default. bool active = true; - if (params.active.get()) + if (params.active.has_value()) active = *params.active; // CEF doesn't use the index value but we let the client see/modify it. int index = 0; - if (params.index.get()) + if (params.index.has_value()) index = *params.index; auto cef_browser_context = CefBrowserContext::FromBrowserContext( @@ -369,7 +369,7 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( create_params.settings = active_browser->settings(); CefRefPtr handler = cef_extension->GetHandler(); - if (handler.get() && + if (handler && handler->OnBeforeBrowser(cef_extension, sender_browser.get(), active_browser.get(), index, create_params.url, active, *create_params.window_info, @@ -397,12 +397,12 @@ base::DictionaryValue* CefExtensionFunctionDetails::OpenTab( auto scrub_tab_behavior = ExtensionTabUtil::GetScrubTabBehavior( extension, extensions::Feature::Context::UNSPECIFIED_CONTEXT, web_contents); - ExtensionTabUtil::ScrubTabForExtension(extension, web_contents, result.get(), + ExtensionTabUtil::ScrubTabForExtension(extension, web_contents, &result, scrub_tab_behavior); - return result->ToValue().release(); + return base::WrapUnique(new api::tabs::Tab(std::move(result))); } -std::unique_ptr CefExtensionFunctionDetails::CreateTabObject( +api::tabs::Tab CefExtensionFunctionDetails::CreateTabObject( CefRefPtr new_browser, int opener_browser_id, bool active, @@ -410,47 +410,45 @@ std::unique_ptr CefExtensionFunctionDetails::CreateTabObject( content::WebContents* contents = new_browser->web_contents(); bool is_loading = contents->IsLoading(); - auto tab_object = std::make_unique(); - tab_object->id = std::make_unique(new_browser->GetIdentifier()); - tab_object->index = index; - tab_object->window_id = *tab_object->id; - tab_object->status = is_loading ? api::tabs::TAB_STATUS_LOADING - : api::tabs::TAB_STATUS_COMPLETE; - tab_object->active = active; - tab_object->selected = true; - tab_object->highlighted = true; - tab_object->pinned = false; + api::tabs::Tab tab_object; + tab_object.id = new_browser->GetIdentifier(); + tab_object.index = index; + tab_object.window_id = *tab_object.id; + tab_object.status = is_loading ? api::tabs::TAB_STATUS_LOADING + : api::tabs::TAB_STATUS_COMPLETE; + tab_object.active = active; + tab_object.selected = true; + tab_object.highlighted = true; + tab_object.pinned = false; // TODO(extensions): Use RecentlyAudibleHelper to populate |audible|. - tab_object->discarded = false; - tab_object->auto_discardable = false; - tab_object->muted_info = CreateMutedInfo(contents); - tab_object->incognito = false; + tab_object.discarded = false; + tab_object.auto_discardable = false; + tab_object.muted_info = CreateMutedInfo(contents); + tab_object.incognito = false; gfx::Size contents_size = contents->GetContainerBounds().size(); - tab_object->width = std::make_unique(contents_size.width()); - tab_object->height = std::make_unique(contents_size.height()); - tab_object->url = std::make_unique(contents->GetURL().spec()); - tab_object->title = - std::make_unique(base::UTF16ToUTF8(contents->GetTitle())); + tab_object.width = contents_size.width(); + tab_object.height = contents_size.height(); + tab_object.url = contents->GetURL().spec(); + tab_object.title = base::UTF16ToUTF8(contents->GetTitle()); content::NavigationEntry* entry = contents->GetController().GetVisibleEntry(); if (entry && entry->GetFavicon().valid) { - tab_object->fav_icon_url = - std::make_unique(entry->GetFavicon().url.spec()); + tab_object.fav_icon_url = entry->GetFavicon().url.spec(); } if (opener_browser_id >= 0) - tab_object->opener_tab_id = std::make_unique(opener_browser_id); + tab_object.opener_tab_id = opener_browser_id; return tab_object; } // static -std::unique_ptr -CefExtensionFunctionDetails::CreateMutedInfo(content::WebContents* contents) { +api::tabs::MutedInfo CefExtensionFunctionDetails::CreateMutedInfo( + content::WebContents* contents) { DCHECK(contents); - std::unique_ptr info(new api::tabs::MutedInfo); - info->muted = contents->IsAudioMuted(); - // TODO(cef): Maybe populate |info->reason|. + api::tabs::MutedInfo info; + info.muted = contents->IsAudioMuted(); + // TODO(cef): Maybe populate |info.reason|. return info; } diff --git a/libcef/browser/extensions/extension_function_details.h b/libcef/browser/extensions/extension_function_details.h index d89af3c5c..11ac622a8 100644 --- a/libcef/browser/extensions/extension_function_details.h +++ b/libcef/browser/extensions/extension_function_details.h @@ -98,35 +98,35 @@ class CefExtensionFunctionDetails { OpenTabParams(); ~OpenTabParams(); - std::unique_ptr window_id; - std::unique_ptr opener_tab_id; - std::unique_ptr url; - std::unique_ptr active; - std::unique_ptr pinned; - std::unique_ptr index; + bool create_browser_if_needed = false; + absl::optional window_id; + absl::optional opener_tab_id; + absl::optional url; + absl::optional active; + absl::optional pinned; + absl::optional index; + absl::optional bookmark_id; }; // Opens a new tab given creation parameters |params|. Returns a Tab object // if successful, or NULL and optionally sets |error_message| if an error // occurs. - base::DictionaryValue* OpenTab(const OpenTabParams& params, - bool user_gesture, - std::string* error_message) const; + std::unique_ptr OpenTab(const OpenTabParams& params, + bool user_gesture, + std::string* error_message) const; // Creates a Tab object (see chrome/common/extensions/api/tabs.json) with // information about the state of a browser tab. Depending on the // permissions of the extension, the object may or may not include sensitive // data such as the tab's URL. - std::unique_ptr CreateTabObject( - CefRefPtr new_browser, - int opener_browser_id, - bool active, - int index) const; + api::tabs::Tab CreateTabObject(CefRefPtr new_browser, + int opener_browser_id, + bool active, + int index) const; // Creates a tab MutedInfo object (see chrome/common/extensions/api/tabs.json) // with information about the mute state of a browser tab. - static std::unique_ptr CreateMutedInfo( - content::WebContents* contents); + static api::tabs::MutedInfo CreateMutedInfo(content::WebContents* contents); // Returns a pointer to the associated ExtensionFunction ExtensionFunction* function() { return function_; } diff --git a/libcef/browser/extensions/extensions_browser_client.cc b/libcef/browser/extensions/extensions_browser_client.cc index 5c69b84be..9a360c9be 100644 --- a/libcef/browser/extensions/extensions_browser_client.cc +++ b/libcef/browser/extensions/extensions_browser_client.cc @@ -143,6 +143,29 @@ BrowserContext* CefExtensionsBrowserClient::GetOriginalContext( return nullptr; } +content::BrowserContext* +CefExtensionsBrowserClient::GetRedirectedContextInIncognito( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) { + return context; +} + +content::BrowserContext* +CefExtensionsBrowserClient::GetContextForRegularAndIncognito( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) { + return context; +} + +content::BrowserContext* CefExtensionsBrowserClient::GetRegularProfile( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) { + return context; +} + bool CefExtensionsBrowserClient::IsGuestSession(BrowserContext* context) const { return false; } diff --git a/libcef/browser/extensions/extensions_browser_client.h b/libcef/browser/extensions/extensions_browser_client.h index f3abed188..fd8540e31 100644 --- a/libcef/browser/extensions/extensions_browser_client.h +++ b/libcef/browser/extensions/extensions_browser_client.h @@ -39,6 +39,18 @@ class CefExtensionsBrowserClient : public ExtensionsBrowserClient { content::BrowserContext* context) override; content::BrowserContext* GetOriginalContext( content::BrowserContext* context) override; + content::BrowserContext* GetRedirectedContextInIncognito( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) override; + content::BrowserContext* GetContextForRegularAndIncognito( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) override; + content::BrowserContext* GetRegularProfile( + content::BrowserContext* context, + bool force_guest_profile, + bool force_system_profile) override; bool IsGuestSession(content::BrowserContext* context) const override; bool IsExtensionIncognitoEnabled( const std::string& extension_id, diff --git a/libcef/browser/media_router/media_router_impl.cc b/libcef/browser/media_router/media_router_impl.cc index 54c193d02..5cbc5ade9 100644 --- a/libcef/browser/media_router/media_router_impl.cc +++ b/libcef/browser/media_router/media_router_impl.cc @@ -150,8 +150,8 @@ void CefMediaRouterImpl::Initialize( initialized_ = true; if (!init_callbacks_.empty()) { - for (auto& callback : init_callbacks_) { - std::move(callback).Run(); + for (auto& init_callback : init_callbacks_) { + std::move(init_callback).Run(); } init_callbacks_.clear(); } diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 9bec75d40..35705107c 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -320,9 +320,9 @@ void CefBrowserPlatformDelegateNativeMac::SetFocus(bool setFocus) { if (setFocus) { // Give keyboard focus to the native view. - NSView* view = web_contents_->GetContentNativeView().GetNativeNSView(); - DCHECK([view canBecomeKeyView]); - [[view window] makeFirstResponder:view]; + NSView* nsview = web_contents_->GetContentNativeView().GetNativeNSView(); + DCHECK([nsview canBecomeKeyView]); + [[nsview window] makeFirstResponder:nsview]; } } } diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index bbc386238..2c2610b00 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -130,8 +130,8 @@ void CefCookieManagerImpl::Initialize( initialized_ = true; if (!init_callbacks_.empty()) { - for (auto& callback : init_callbacks_) { - std::move(callback).Run(); + for (auto& init_callback : init_callbacks_) { + std::move(init_callback).Run(); } init_callbacks_.clear(); } diff --git a/libcef/browser/net_service/proxy_url_loader_factory.cc b/libcef/browser/net_service/proxy_url_loader_factory.cc index 25ceda9a4..e30a4955e 100644 --- a/libcef/browser/net_service/proxy_url_loader_factory.cc +++ b/libcef/browser/net_service/proxy_url_loader_factory.cc @@ -227,14 +227,15 @@ class InterceptedRequest : public network::mojom::URLLoader, // mojom::URLLoaderClient methods: void OnReceiveEarlyHints(network::mojom::EarlyHintsPtr early_hints) override; - void OnReceiveResponse(network::mojom::URLResponseHeadPtr head, - mojo::ScopedDataPipeConsumerHandle body) override; + void OnReceiveResponse( + network::mojom::URLResponseHeadPtr head, + mojo::ScopedDataPipeConsumerHandle body, + absl::optional cached_metadata) override; void OnReceiveRedirect(const net::RedirectInfo& redirect_info, network::mojom::URLResponseHeadPtr head) override; void OnUploadProgress(int64_t current_position, int64_t total_size, OnUploadProgressCallback callback) override; - void OnReceiveCachedMetadata(mojo_base::BigBuffer data) override; void OnTransferSizeUpdated(int32_t transfer_size_diff) override; void OnComplete(const network::URLLoaderCompletionStatus& status) override; @@ -334,6 +335,7 @@ class InterceptedRequest : public network::mojom::URLLoader, network::ResourceRequest request_; network::mojom::URLResponseHeadPtr current_response_; mojo::ScopedDataPipeConsumerHandle current_body_; + absl::optional current_cached_metadata_; scoped_refptr current_headers_; scoped_refptr override_headers_; GURL original_url_; @@ -558,9 +560,11 @@ void InterceptedRequest::OnReceiveEarlyHints( void InterceptedRequest::OnReceiveResponse( network::mojom::URLResponseHeadPtr head, - mojo::ScopedDataPipeConsumerHandle body) { + mojo::ScopedDataPipeConsumerHandle body, + absl::optional cached_metadata) { current_response_ = std::move(head); current_body_ = std::move(body); + current_cached_metadata_ = std::move(cached_metadata); // |current_headers_| may be null for cached responses where OnHeadersReceived // is not called. @@ -588,6 +592,7 @@ void InterceptedRequest::OnReceiveRedirect( current_response_ = std::move(head); current_body_.reset(); + current_cached_metadata_.reset(); // |current_headers_| may be null for synthetic redirects where // OnHeadersReceived is not called. @@ -652,10 +657,6 @@ void InterceptedRequest::OnUploadProgress(int64_t current_position, std::move(callback).Run(); } -void InterceptedRequest::OnReceiveCachedMetadata(mojo_base::BigBuffer data) { - target_client_->OnReceiveCachedMetadata(std::move(data)); -} - void InterceptedRequest::OnTransferSizeUpdated(int32_t transfer_size_diff) { target_client_->OnTransferSizeUpdated(transfer_size_diff); } @@ -743,6 +744,7 @@ void InterceptedRequest::InterceptResponseReceived( current_response_->request_start = base::TimeTicks::Now(); current_response_->response_start = base::TimeTicks::Now(); current_body_.reset(); + current_cached_metadata_.reset(); auto headers = MakeResponseHeaders( net::HTTP_TEMPORARY_REDIRECT, std::string(), std::string(), @@ -813,6 +815,7 @@ void InterceptedRequest::ContinueAfterInterceptWithOverride( stream_loader_ = new StreamReaderURLLoader( id_, request_, proxied_client_receiver_.BindNewPipeAndPassRemote(), header_client_receiver_.BindNewPipeAndPassRemote(), traffic_annotation_, + std::move(current_cached_metadata_), std::make_unique(std::move(response), weak_factory_.GetWeakPtr())); stream_loader_->Start(); @@ -1048,7 +1051,8 @@ void InterceptedRequest::ContinueToResponseStarted(int error_code) { target_client_->OnReceiveResponse( std::move(current_response_), factory_->request_handler_->OnFilterResponseBody( - id_, request_, std::move(current_body_))); + id_, request_, std::move(current_body_)), + std::move(current_cached_metadata_)); } } diff --git a/libcef/browser/net_service/stream_reader_url_loader.cc b/libcef/browser/net_service/stream_reader_url_loader.cc index 88528296f..45680d918 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.cc +++ b/libcef/browser/net_service/stream_reader_url_loader.cc @@ -466,12 +466,14 @@ StreamReaderURLLoader::StreamReaderURLLoader( mojo::PendingRemote client, mojo::PendingRemote header_client, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, + absl::optional cached_metadata, std::unique_ptr response_delegate) : request_id_(request_id), request_(request), client_(std::move(client)), header_client_(std::move(header_client)), traffic_annotation_(traffic_annotation), + cached_metadata_(std::move(cached_metadata)), response_delegate_(std::move(response_delegate)), writable_handle_watcher_(FROM_HERE, mojo::SimpleWatcher::ArmingPolicy::MANUAL, @@ -708,7 +710,8 @@ void StreamReaderURLLoader::ContinueWithResponseHeaders( base::Unretained(this))); client_->OnReceiveResponse(std::move(pending_response), - std::move(consumer_handle)); + std::move(consumer_handle), + std::move(cached_metadata_)); ReadMore(); } } diff --git a/libcef/browser/net_service/stream_reader_url_loader.h b/libcef/browser/net_service/stream_reader_url_loader.h index ce446ea81..9af8b0195 100644 --- a/libcef/browser/net_service/stream_reader_url_loader.h +++ b/libcef/browser/net_service/stream_reader_url_loader.h @@ -117,6 +117,7 @@ class StreamReaderURLLoader : public network::mojom::URLLoader { mojo::PendingRemote client, mojo::PendingRemote header_client, const net::MutableNetworkTrafficAnnotationTag& traffic_annotation, + absl::optional cached_metadata, std::unique_ptr response_delegate); StreamReaderURLLoader(const StreamReaderURLLoader&) = delete; @@ -172,6 +173,7 @@ class StreamReaderURLLoader : public network::mojom::URLLoader { mojo::Remote client_; mojo::Remote header_client_; const net::MutableNetworkTrafficAnnotationTag traffic_annotation_; + absl::optional cached_metadata_; std::unique_ptr response_delegate_; scoped_refptr input_stream_reader_; diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 63c9b0b0e..e6c878e86 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -94,6 +94,8 @@ void CefWebContentsViewOSR::TakeFocus(bool reverse) { web_contents_->GetDelegate()->TakeFocus(web_contents_, reverse); } +void CefWebContentsViewOSR::FullscreenStateChanged(bool is_fullscreen) {} + content::DropData* CefWebContentsViewOSR::GetDropData() const { return nullptr; } @@ -169,12 +171,13 @@ void CefWebContentsViewOSR::StartDragging( const content::DropData& drop_data, blink::DragOperationsMask allowed_ops, const gfx::ImageSkia& image, - const gfx::Vector2d& image_offset, + const gfx::Vector2d& cursor_offset, + const gfx::Rect& drag_obj_rect, const blink::mojom::DragEventSourceInfo& event_info, content::RenderWidgetHostImpl* source_rwh) { CefRefPtr browser = GetBrowser(); if (browser.get()) { - browser->StartDragging(drop_data, allowed_ops, image, image_offset, + browser->StartDragging(drop_data, allowed_ops, image, cursor_offset, event_info, source_rwh); } else if (web_contents_) { static_cast(web_contents_) diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index 230c758f4..39b6c3ccd 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -72,7 +72,8 @@ class CefWebContentsViewOSR : public content::WebContentsView, void StartDragging(const content::DropData& drop_data, blink::DragOperationsMask allowed_ops, const gfx::ImageSkia& image, - const gfx::Vector2d& image_offset, + const gfx::Vector2d& cursor_offset, + const gfx::Rect& drag_obj_rect, const blink::mojom::DragEventSourceInfo& event_info, content::RenderWidgetHostImpl* source_rwh) override; void UpdateDragCursor(ui::mojom::DragOperation operation) override; @@ -81,6 +82,7 @@ class CefWebContentsViewOSR : public content::WebContentsView, virtual void LostFocus( content::RenderWidgetHostImpl* render_widget_host) override; virtual void TakeFocus(bool reverse) override; + virtual void FullscreenStateChanged(bool is_fullscreen) override; private: CefRenderWidgetHostViewOSR* GetView() const; diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 0c0cc8d4a..6902e2aef 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -18,7 +18,7 @@ #include "content/public/browser/browser_task_traits.h" #include "content/public/browser/ssl_host_state_delegate.h" #include "content/public/common/child_process_host.h" -#include "mojo/public/cpp/bindings/pending_receiver.h" +#include "mojo/public/cpp/bindings/receiver.h" #include "mojo/public/cpp/bindings/remote.h" #include "net/dns/host_resolver.h" #include "services/network/public/cpp/resolve_host_client_base.h" @@ -66,23 +66,25 @@ class ResolveHostHelper : public network::ResolveHostClientBase { CEF_REQUIRE_UIT(); browser_context->GetNetworkContext()->CreateHostResolver( - absl::nullopt, host_resolver_.BindNewPipeAndPassReceiver()); + net::DnsConfigOverrides(), host_resolver_.BindNewPipeAndPassReceiver()); host_resolver_.set_disconnect_handler(base::BindOnce( &ResolveHostHelper::OnComplete, base::Unretained(this), net::ERR_FAILED, - net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt)); + net::ResolveErrorInfo(net::ERR_FAILED), absl::nullopt, absl::nullopt)); host_resolver_->ResolveHost( - net::HostPortPair::FromURL(GURL(origin.ToString())), + network::mojom::HostResolverHost::NewHostPortPair( + net::HostPortPair::FromURL(GURL(origin.ToString()))), net::NetworkIsolationKey::CreateTransient(), nullptr, receiver_.BindNewPipeAndPassRemote()); } private: - void OnComplete( - int32_t result, - const ::net::ResolveErrorInfo& resolve_error_info, - const absl::optional& resolved_addresses) override { + void OnComplete(int result, + const net::ResolveErrorInfo& resolve_error_info, + const absl::optional& resolved_addresses, + const absl::optional& + endpoint_results_with_metadat) override { CEF_REQUIRE_UIT(); host_resolver_.reset(); @@ -90,9 +92,9 @@ class ResolveHostHelper : public network::ResolveHostClientBase { std::vector resolved_ips; - if (result == net::OK) { - DCHECK(resolved_addresses && !resolved_addresses->empty()); - for (const auto& value : resolved_addresses.value()) { + if (result == net::OK && resolved_addresses.has_value()) { + DCHECK(!resolved_addresses->empty()); + for (const auto& value : *resolved_addresses) { resolved_ips.push_back(value.ToStringWithoutPort()); } } @@ -105,7 +107,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase { CefRefPtr callback_; mojo::Remote host_resolver_; - mojo::Receiver receiver_; + mojo::Receiver receiver_{this}; }; } // namespace diff --git a/libcef/browser/server_impl.cc b/libcef/browser/server_impl.cc index 2518ba1b7..ad7958024 100644 --- a/libcef/browser/server_impl.cc +++ b/libcef/browser/server_impl.cc @@ -545,9 +545,9 @@ void CefServerImpl::StartOnHandlerThread(const std::string& address, if (socket->ListenWithAddressAndPort(address, port, backlog) == net::OK) { server_.reset(new net::HttpServer(std::move(socket), this)); - net::IPEndPoint address; - if (server_->GetLocalAddress(&address) == net::OK) - address_ = address.ToString(); + net::IPEndPoint ip_address; + if (server_->GetLocalAddress(&ip_address) == net::OK) + address_ = ip_address.ToString(); } handler_->OnServerCreated(this); diff --git a/libcef/common/alloy/alloy_content_client.cc b/libcef/common/alloy/alloy_content_client.cc index fe1f5fa84..badba86c8 100644 --- a/libcef/common/alloy/alloy_content_client.cc +++ b/libcef/common/alloy/alloy_content_client.cc @@ -31,8 +31,8 @@ #include "components/pdf/common/internal_plugin_helpers.h" #include "content/public/common/cdm_info.h" #include "content/public/common/content_constants.h" +#include "content/public/common/content_plugin_info.h" #include "content/public/common/content_switches.h" -#include "content/public/common/pepper_plugin_info.h" #include "ppapi/shared_impl/ppapi_permissions.h" #include "third_party/widevine/cdm/buildflags.h" #include "ui/base/l10n/l10n_util.h" @@ -52,18 +52,14 @@ const char kPDFPluginDescription[] = "Portable Document Format"; const uint32_t kPDFPluginPermissions = ppapi::PERMISSION_PDF | ppapi::PERMISSION_DEV; -content::PepperPluginInfo::GetInterfaceFunc g_pdf_get_interface; -content::PepperPluginInfo::PPP_InitializeModuleFunc g_pdf_initialize_module; -content::PepperPluginInfo::PPP_ShutdownModuleFunc g_pdf_shutdown_module; - // Appends the known built-in plugins to the given vector. Some built-in // plugins are "internal" which means they are compiled into the Chrome binary, // and some are extra shared libraries distributed with the browser (these are // not marked internal, aside from being automatically registered, they're just // regular plugins). -void ComputeBuiltInPlugins(std::vector* plugins) { +void ComputeBuiltInPlugins(std::vector* plugins) { if (extensions::PdfExtensionEnabled()) { - content::PepperPluginInfo pdf_info; + content::ContentPluginInfo pdf_info; pdf_info.is_internal = true; pdf_info.is_out_of_process = true; pdf_info.name = ChromeContentClient::kPDFInternalPluginName; @@ -73,9 +69,6 @@ void ComputeBuiltInPlugins(std::vector* plugins) { kPDFPluginExtension, kPDFPluginDescription); pdf_info.mime_types.push_back(pdf_mime_type); - pdf_info.internal_entry_points.get_interface = g_pdf_get_interface; - pdf_info.internal_entry_points.initialize_module = g_pdf_initialize_module; - pdf_info.internal_entry_points.shutdown_module = g_pdf_shutdown_module; pdf_info.permissions = kPDFPluginPermissions; plugins->push_back(pdf_info); } @@ -86,8 +79,8 @@ void ComputeBuiltInPlugins(std::vector* plugins) { AlloyContentClient::AlloyContentClient() = default; AlloyContentClient::~AlloyContentClient() = default; -void AlloyContentClient::AddPepperPlugins( - std::vector* plugins) { +void AlloyContentClient::AddPlugins( + std::vector* plugins) { ComputeBuiltInPlugins(plugins); } @@ -157,13 +150,3 @@ gfx::Image& AlloyContentClient::GetNativeImageNamed(int resource_id) { return value; } - -// static -void AlloyContentClient::SetPDFEntryFunctions( - content::PepperPluginInfo::GetInterfaceFunc get_interface, - content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, - content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module) { - g_pdf_get_interface = get_interface; - g_pdf_initialize_module = initialize_module; - g_pdf_shutdown_module = shutdown_module; -} diff --git a/libcef/common/alloy/alloy_content_client.h b/libcef/common/alloy/alloy_content_client.h index f3045d21b..968bb32c1 100644 --- a/libcef/common/alloy/alloy_content_client.h +++ b/libcef/common/alloy/alloy_content_client.h @@ -8,7 +8,6 @@ #pragma once #include "content/public/common/content_client.h" -#include "content/public/common/pepper_plugin_info.h" class AlloyContentClient : public content::ContentClient { public: @@ -16,8 +15,7 @@ class AlloyContentClient : public content::ContentClient { ~AlloyContentClient() override; // content::ContentClient overrides. - void AddPepperPlugins( - std::vector* plugins) override; + void AddPlugins(std::vector* plugins) override; void AddContentDecryptionModules( std::vector* cdms, std::vector* cdm_host_file_paths) override; @@ -30,11 +28,6 @@ class AlloyContentClient : public content::ContentClient { ui::ResourceScaleFactor scale_factor) override; base::RefCountedMemory* GetDataResourceBytes(int resource_id) override; gfx::Image& GetNativeImageNamed(int resource_id) override; - - static void SetPDFEntryFunctions( - content::PepperPluginInfo::GetInterfaceFunc get_interface, - content::PepperPluginInfo::PPP_InitializeModuleFunc initialize_module, - content::PepperPluginInfo::PPP_ShutdownModuleFunc shutdown_module); }; #endif // CEF_LIBCEF_COMMON_ALLOY_ALLOY_CONTENT_CLIENT_H_ diff --git a/libcef/common/cef_crash_report_upload_thread.cc b/libcef/common/cef_crash_report_upload_thread.cc index 34c5fb647..2d98ef674 100644 --- a/libcef/common/cef_crash_report_upload_thread.cc +++ b/libcef/common/cef_crash_report_upload_thread.cc @@ -14,8 +14,9 @@ CefCrashReportUploadThread::CefCrashReportUploadThread( CrashReportDatabase* database, const std::string& url, const Options& options, + ProcessPendingReportsObservationCallback callback, int max_uploads) - : CrashReportUploadThread(database, url, options), + : CrashReportUploadThread(database, url, options, std::move(callback)), max_uploads_(max_uploads) {} CefCrashReportUploadThread::~CefCrashReportUploadThread() {} diff --git a/libcef/common/cef_crash_report_upload_thread.h b/libcef/common/cef_crash_report_upload_thread.h index 4ebda8cb0..d0921ac08 100644 --- a/libcef/common/cef_crash_report_upload_thread.h +++ b/libcef/common/cef_crash_report_upload_thread.h @@ -12,6 +12,7 @@ class CefCrashReportUploadThread : public crashpad::CrashReportUploadThread { CefCrashReportUploadThread(crashpad::CrashReportDatabase* database, const std::string& url, const Options& options, + ProcessPendingReportsObservationCallback callback, int max_uploads); CefCrashReportUploadThread(const CefCrashReportUploadThread&) = delete; diff --git a/libcef/common/process_message_smr_impl.cc b/libcef/common/process_message_smr_impl.cc index 21a037b46..4e04eb57c 100644 --- a/libcef/common/process_message_smr_impl.cc +++ b/libcef/common/process_message_smr_impl.cc @@ -55,7 +55,7 @@ CefProcessMessageSMRImpl::GetSharedMemoryRegion() { base::ReadOnlySharedMemoryRegion CefProcessMessageSMRImpl::TakeRegion() { return std::move(region_); -}; +} // static CefRefPtr diff --git a/libcef/common/process_message_smr_impl.h b/libcef/common/process_message_smr_impl.h index 6c263aedf..abc2a9f69 100644 --- a/libcef/common/process_message_smr_impl.h +++ b/libcef/common/process_message_smr_impl.h @@ -24,7 +24,7 @@ class CefProcessMessageSMRImpl final : public CefProcessMessage { bool IsReadOnly() override { return true; } CefRefPtr Copy() override { return nullptr; } CefString GetName() override; - CefRefPtr GetArgumentList() override { return nullptr; }; + CefRefPtr GetArgumentList() override { return nullptr; } CefRefPtr GetSharedMemoryRegion() override; [[nodiscard]] base::ReadOnlySharedMemoryRegion TakeRegion(); diff --git a/libcef/common/values_impl.cc b/libcef/common/values_impl.cc index 79ffb442c..b682239f8 100644 --- a/libcef/common/values_impl.cc +++ b/libcef/common/values_impl.cc @@ -732,9 +732,8 @@ bool CefDictionaryValueImpl::HasKey(const CefString& key) { bool CefDictionaryValueImpl::GetKeys(KeyList& keys) { CEF_VALUE_VERIFY_RETURN(false, 0); - for (base::DictionaryValue::Iterator i(const_value()); !i.IsAtEnd(); - i.Advance()) { - keys.push_back(i.key()); + for (const auto item : const_value().GetDict()) { + keys.push_back(item.first); } return true; @@ -996,10 +995,22 @@ bool CefDictionaryValueImpl::RemoveInternal(const CefString& key) { base::Value* CefDictionaryValueImpl::SetInternal(const CefString& key, base::Value* value) { DCHECK(value); + std::unique_ptr valueObj(value); + RemoveInternal(key); - mutable_value()->SetWithoutPathExpansion( - base::StringPiece(key), base::WrapUnique(value)); - return value; + + // base::Value now uses move semantics which means that Set() will move the + // contents of the passed-in base::Value instead of keeping the same object. + // Set() then returns the actual Value pointer as it currently exists. + base::Value* actual_value = + mutable_value()->GetDict().Set(base::StringPiece(key), std::move(*value)); + CHECK(actual_value); + + // |value| will be deleted when this method returns. Update the controller to + // reference |actual_value| instead. + controller()->Swap(value, actual_value); + + return actual_value; } CefDictionaryValueImpl::CefDictionaryValueImpl(base::DictionaryValue* value, @@ -1128,7 +1139,7 @@ CefRefPtr CefListValueImpl::Copy() { bool CefListValueImpl::SetSize(size_t size) { CEF_VALUE_VERIFY_RETURN(true, false); - size_t current_size = const_value().GetListDeprecated().size(); + size_t current_size = const_value().GetList().size(); if (size < current_size) { // Clean up any values above the requested size. for (size_t i = current_size - 1; i >= size; --i) @@ -1137,7 +1148,7 @@ bool CefListValueImpl::SetSize(size_t size) { // Expand the list size. // TODO: This approach seems inefficient. See https://crbug.com/1187066#c17 // for background. - auto list = mutable_value()->GetListDeprecated(); + auto& list = mutable_value()->GetList(); while (list.size() < size) mutable_value()->Append(base::Value()); } @@ -1146,7 +1157,7 @@ bool CefListValueImpl::SetSize(size_t size) { size_t CefListValueImpl::GetSize() { CEF_VALUE_VERIFY_RETURN(false, 0); - return const_value().GetListDeprecated().size(); + return const_value().GetList().size(); } bool CefListValueImpl::Clear() { @@ -1167,7 +1178,7 @@ bool CefListValueImpl::Remove(size_t index) { CefValueType CefListValueImpl::GetType(size_t index) { CEF_VALUE_VERIFY_RETURN(false, VTYPE_INVALID); - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; switch (value.type()) { @@ -1196,7 +1207,7 @@ CefValueType CefListValueImpl::GetType(size_t index) { CefRefPtr CefListValueImpl::GetValue(size_t index) { CEF_VALUE_VERIFY_RETURN(false, nullptr); - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; return CefValueImpl::GetOrCreateRefOrCopy( @@ -1212,7 +1223,7 @@ bool CefListValueImpl::GetBool(size_t index) { CEF_VALUE_VERIFY_RETURN(false, false); bool ret_value = false; - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_bool()) { @@ -1227,7 +1238,7 @@ int CefListValueImpl::GetInt(size_t index) { CEF_VALUE_VERIFY_RETURN(false, 0); int ret_value = 0; - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_int()) { @@ -1242,7 +1253,7 @@ double CefListValueImpl::GetDouble(size_t index) { CEF_VALUE_VERIFY_RETURN(false, 0); double ret_value = 0; - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_double()) { @@ -1257,7 +1268,7 @@ CefString CefListValueImpl::GetString(size_t index) { CEF_VALUE_VERIFY_RETURN(false, CefString()); std::string ret_value; - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_string()) { @@ -1271,7 +1282,7 @@ CefString CefListValueImpl::GetString(size_t index) { CefRefPtr CefListValueImpl::GetBinary(size_t index) { CEF_VALUE_VERIFY_RETURN(false, nullptr); - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_blob()) { @@ -1288,7 +1299,7 @@ CefRefPtr CefListValueImpl::GetBinary(size_t index) { CefRefPtr CefListValueImpl::GetDictionary(size_t index) { CEF_VALUE_VERIFY_RETURN(false, nullptr); - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_dict()) { @@ -1306,7 +1317,7 @@ CefRefPtr CefListValueImpl::GetDictionary(size_t index) { CefRefPtr CefListValueImpl::GetList(size_t index) { CEF_VALUE_VERIFY_RETURN(false, nullptr); - const auto& list = const_value().GetListDeprecated(); + const auto& list = const_value().GetList(); if (index < list.size()) { const base::Value& value = list[index]; if (value.is_list()) { @@ -1397,7 +1408,7 @@ bool CefListValueImpl::SetList(size_t index, CefRefPtr value) { } bool CefListValueImpl::RemoveInternal(size_t index) { - auto list = mutable_value()->GetListDeprecated(); + auto& list = mutable_value()->GetList(); if (index >= list.size()) return false; @@ -1410,7 +1421,7 @@ bool CefListValueImpl::RemoveInternal(size_t index) { // |actual_value| is no longer valid after this call. auto out_value = std::move(list[index]); - mutable_value()->EraseListIter(list.begin() + index); + list.erase(list.begin() + index); // Remove the value. controller()->Remove(const_cast(&actual_value), true); @@ -1425,11 +1436,12 @@ bool CefListValueImpl::RemoveInternal(size_t index) { base::Value* CefListValueImpl::SetInternal(size_t index, base::Value* value) { DCHECK(value); + std::unique_ptr valueObj(value); - auto list = mutable_value()->GetListDeprecated(); + auto& list = mutable_value()->GetList(); if (RemoveInternal(index)) { CHECK_LE(index, list.size()); - mutable_value()->GetList().Insert(list.begin() + index, std::move(*value)); + list.Insert(list.begin() + index, std::move(*value)); } else { if (index >= list.size()) { // Expand the list size. @@ -1447,7 +1459,7 @@ base::Value* CefListValueImpl::SetInternal(size_t index, base::Value* value) { // pointer as it exists in the std::vector. const base::Value& actual_value = list[index]; - // |value| will have been deleted at this point. Update the controller to + // |value| will be deleted when this method returns. Update the controller to // reference |actual_value| instead. controller()->Swap(value, const_cast(&actual_value)); diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.cc b/libcef/renderer/alloy/alloy_content_renderer_client.cc index 192db0e68..5f408461d 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.cc +++ b/libcef/renderer/alloy/alloy_content_renderer_client.cc @@ -300,8 +300,10 @@ void AlloyContentRendererClient::RenderFrameCreated( } } -void AlloyContentRendererClient::WebViewCreated(blink::WebView* web_view, - bool was_created_by_renderer) { +void AlloyContentRendererClient::WebViewCreated( + blink::WebView* web_view, + bool was_created_by_renderer, + const url::Origin* outermost_origin) { bool browser_created; absl::optional is_windowless; render_manager_->WebViewCreated(web_view, browser_created, is_windowless); diff --git a/libcef/renderer/alloy/alloy_content_renderer_client.h b/libcef/renderer/alloy/alloy_content_renderer_client.h index d552e39ff..eef43f3c0 100644 --- a/libcef/renderer/alloy/alloy_content_renderer_client.h +++ b/libcef/renderer/alloy/alloy_content_renderer_client.h @@ -82,7 +82,8 @@ class AlloyContentRendererClient void RenderThreadConnected() override; void RenderFrameCreated(content::RenderFrame* render_frame) override; void WebViewCreated(blink::WebView* web_view, - bool was_created_by_renderer) override; + bool was_created_by_renderer, + const url::Origin* outermost_origin) override; bool IsPluginHandledExternally(content::RenderFrame* render_frame, const blink::WebElement& plugin_element, const GURL& original_url, diff --git a/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc b/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc index 3a73c0ee6..eed95483b 100644 --- a/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc +++ b/libcef/renderer/chrome/chrome_content_renderer_client_cef.cc @@ -55,9 +55,10 @@ void ChromeContentRendererClientCef::RenderFrameCreated( void ChromeContentRendererClientCef::WebViewCreated( blink::WebView* web_view, - bool was_created_by_renderer) { - ChromeContentRendererClient::WebViewCreated(web_view, - was_created_by_renderer); + bool was_created_by_renderer, + const url::Origin* outermost_origin) { + ChromeContentRendererClient::WebViewCreated(web_view, was_created_by_renderer, + outermost_origin); bool browser_created; absl::optional is_windowless; diff --git a/libcef/renderer/chrome/chrome_content_renderer_client_cef.h b/libcef/renderer/chrome/chrome_content_renderer_client_cef.h index b8aa310b1..09e4951aa 100644 --- a/libcef/renderer/chrome/chrome_content_renderer_client_cef.h +++ b/libcef/renderer/chrome/chrome_content_renderer_client_cef.h @@ -40,7 +40,8 @@ class ChromeContentRendererClientCef : public ChromeContentRendererClient { void RenderThreadConnected() override; void RenderFrameCreated(content::RenderFrame* render_frame) override; void WebViewCreated(blink::WebView* web_view, - bool was_created_by_renderer) override; + bool was_created_by_renderer, + const url::Origin* outermost_origin) override; void DevToolsAgentAttached() override; void DevToolsAgentDetached() override; void ExposeInterfacesToBrowser(mojo::BinderMap* binders) override; diff --git a/libcef/renderer/dom_node_impl.cc b/libcef/renderer/dom_node_impl.cc index 0b01e4f5d..06dc995c2 100644 --- a/libcef/renderer/dom_node_impl.cc +++ b/libcef/renderer/dom_node_impl.cc @@ -390,7 +390,7 @@ CefRect CefDOMNodeImpl::GetElementBounds() { } WebElement element = node_.To(); - const auto& rc = element.BoundsInViewport(); + const auto& rc = element.BoundsInWidget(); rect.Set(rc.x(), rc.y(), rc.width(), rc.height()); return rect; diff --git a/libcef/renderer/extensions/extensions_renderer_client.cc b/libcef/renderer/extensions/extensions_renderer_client.cc index 078ba0590..8f25c8d9f 100644 --- a/libcef/renderer/extensions/extensions_renderer_client.cc +++ b/libcef/renderer/extensions/extensions_renderer_client.cc @@ -8,6 +8,7 @@ #include "libcef/renderer/extensions/extensions_dispatcher_delegate.h" #include "base/stl_util.h" +#include "base/types/optional_util.h" #include "chrome/common/url_constants.h" #include "chrome/renderer/extensions/resource_request_policy.h" #include "content/public/common/content_constants.h" diff --git a/libcef/renderer/v8_impl.cc b/libcef/renderer/v8_impl.cc index 897524f97..eb579e086 100644 --- a/libcef/renderer/v8_impl.cc +++ b/libcef/renderer/v8_impl.cc @@ -2003,8 +2003,8 @@ bool CefV8ValueImpl::SetValue(const CefString& key, return false; } - v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(context).ToLocalChecked(); + v8::Local v8value = handle_->GetNewV8Handle(false); + v8::Local obj = v8value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -2047,8 +2047,8 @@ bool CefV8ValueImpl::SetValue(int index, CefRefPtr value) { return false; } - v8::Local value = handle_->GetNewV8Handle(false); - v8::Local obj = value->ToObject(context).ToLocalChecked(); + v8::Local v8value = handle_->GetNewV8Handle(false); + v8::Local obj = v8value->ToObject(context).ToLocalChecked(); v8::TryCatch try_catch(isolate); try_catch.SetVerbose(true); @@ -2121,10 +2121,10 @@ bool CefV8ValueImpl::GetKeys(std::vector& keys) { uint32_t len = arr_keys->Length(); for (uint32_t i = 0; i < len; ++i) { - v8::Local value = + v8::Local arr_value = arr_keys->Get(context, v8::Integer::New(isolate, i)).ToLocalChecked(); CefString str; - GetCefString(isolate, value->ToString(context).ToLocalChecked(), str); + GetCefString(isolate, arr_value->ToString(context).ToLocalChecked(), str); keys.push_back(str); } return true; diff --git a/patch/patch.cfg b/patch/patch.cfg index 588954db3..a9ed9e068 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -189,6 +189,9 @@ patches = [ }, { # Support CEF changes in chrome/browser. + # + # Fix duplicate symbols for enterprise_connectors::ContentAnalysisSdkManager + # https://bugs.chromium.org/p/chromium/issues/detail?id=1368633 'name': 'chrome_browser', }, { @@ -514,7 +517,7 @@ patches = [ 'name': 'base_command_line_1872', }, { - # Remove cef_sandbox dependency on boringssl MD5/SHA1 functions. + # Remove cef_sandbox dependency on boringssl functions. # https://bitbucket.org/chromiumembedded/cef/issues/2743 # # Enable the VS 2015 Update 2 fix when building with the MSVC standard @@ -590,21 +593,20 @@ patches = [ # Also reverts the changes from https://crrev.com/db245883e1 'name': 'linux_printing_context', }, - { - # Linux: Fix implicit conversion error on ARM. - # https://chromium-review.googlesource.com/c/linux-syscall-support/+/3786946/ - 'name': 'linux_arm_1292951', - 'path': 'third_party/lss', - }, { # Fix deadlock in EmbeddedTestServer::ShutdownAndWaitUntilComplete. # https://chromium-review.googlesource.com/c/chromium/src/+/3798752 'name': 'net_test_server_3798752' }, { - # Windows: Fix unresolved dependencies error in - # //components/segmentation_platform/embedder on ARM64. - # https://bugs.chromium.org/p/chromium/issues/detail?id=1355185 - 'name': 'windows_arm_1355185', + # Fix duplicate symbols for media_router::LoggerList. + # https://bugs.chromium.org/p/chromium/issues/detail?id=1368642 + 'name': 'chrome_browser_media_router_1368642' + }, + { + # Fix unnecessary pdf_nup_converter_client.h include from + # chrome/browser/devtools/protocol/page_handler.cc. + # https://bugs.chromium.org/p/chromium/issues/detail?id=1366011 + 'name': 'chrome_browser_devtools_1366011' } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index b97a7d394..c34262b95 100644 --- a/patch/patches/base_command_line_1872.patch +++ b/patch/patches/base_command_line_1872.patch @@ -1,5 +1,5 @@ diff --git base/command_line.cc base/command_line.cc -index 9ea1c437056ea..5fcea78a3325a 100644 +index 124a9d59c3ea4..516003f762e60 100644 --- base/command_line.cc +++ base/command_line.cc @@ -339,11 +339,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index 0b68ce9e6..e8dcbcb90 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,5 +1,5 @@ diff --git base/BUILD.gn base/BUILD.gn -index 20e49fa40d823..9e18a2b2dc6c0 100644 +index 60fdc3b8e47ed..fee7412fb46ce 100644 --- base/BUILD.gn +++ base/BUILD.gn @@ -37,6 +37,7 @@ import("//build/nocompile.gni") @@ -10,7 +10,7 @@ index 20e49fa40d823..9e18a2b2dc6c0 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1957,7 +1958,11 @@ mixed_component("base") { +@@ -1971,7 +1972,11 @@ mixed_component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 20e49fa40d823..9e18a2b2dc6c0 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2107,6 +2112,12 @@ mixed_component("base") { +@@ -2112,6 +2117,12 @@ mixed_component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -37,7 +37,7 @@ index 20e49fa40d823..9e18a2b2dc6c0 100644 "cfgmgr32.lib", "powrprof.lib", diff --git base/allocator/dispatcher/dispatcher.cc base/allocator/dispatcher/dispatcher.cc -index b6ecb1c5640ea..892c011336706 100644 +index 4a1bf8191ba2c..1fed45b2ac0d9 100644 --- base/allocator/dispatcher/dispatcher.cc +++ base/allocator/dispatcher/dispatcher.cc @@ -13,6 +13,7 @@ @@ -55,10 +55,10 @@ index b6ecb1c5640ea..892c011336706 100644 -#if DCHECK_IS_ON() +#if DCHECK_IS_ON() && !BUILDFLAG(IS_CEF_SANDBOX_BUILD) DCHECK([&]() { - auto const was_set = is_initialized_check_flag_.test(); + auto const was_set = is_initialized_check_flag_.test_and_set(); is_initialized_check_flag_.clear(); diff --git base/hash/md5.h base/hash/md5.h -index ea6bbd31e3fc8..9941050ac0113 100644 +index aa889f350e8f7..50acac8a69225 100644 --- base/hash/md5.h +++ base/hash/md5.h @@ -10,8 +10,9 @@ @@ -73,7 +73,7 @@ index ea6bbd31e3fc8..9941050ac0113 100644 #else #include "base/hash/md5_boringssl.h" diff --git base/hash/sha1.h base/hash/sha1.h -index c4e656b9a68ef..8eb01343cd5d1 100644 +index 29626e5853c6e..2fb1c61504c5d 100644 --- base/hash/sha1.h +++ base/hash/sha1.h @@ -14,7 +14,9 @@ @@ -87,8 +87,55 @@ index c4e656b9a68ef..8eb01343cd5d1 100644 #include "base/hash/sha1_nacl.h" #else #include "base/hash/sha1_boringssl.h" +diff --git base/rand_util_win.cc base/rand_util_win.cc +index 0a81ed63d1e3c..b08ff362d511e 100644 +--- base/rand_util_win.cc ++++ base/rand_util_win.cc +@@ -20,14 +20,19 @@ + #include + + #include "base/check.h" ++#include "cef/libcef/features/features.h" ++ ++#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + #include "base/feature_list.h" + #include "third_party/boringssl/src/include/openssl/crypto.h" + #include "third_party/boringssl/src/include/openssl/rand.h" ++#endif + + namespace base { + + namespace internal { + ++#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + namespace { + + // The BoringSSl helpers are duplicated in rand_util_fuchsia.cc and +@@ -48,9 +53,14 @@ bool UseBoringSSLForRandBytes() { + return g_use_boringssl.load(std::memory_order_relaxed); + } + ++#else // !BUILDFLAG(IS_CEF_SANDBOX_BUILD) ++void ConfigureBoringSSLBackedRandBytesFieldTrial() {} ++#endif ++ + } // namespace internal + + void RandBytes(void* output, size_t output_length) { ++#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + if (internal::UseBoringSSLForRandBytes()) { + // Ensure BoringSSL is initialized so it can use things like RDRAND. + CRYPTO_library_init(); +@@ -58,6 +68,7 @@ void RandBytes(void* output, size_t output_length) { + (void)RAND_bytes(static_cast(output), output_length); + return; + } ++#endif // !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + + char* output_ptr = static_cast(output); + while (output_length > 0) { diff --git base/unguessable_token.cc base/unguessable_token.cc -index 04ea514c6ce35..4f69b8a7f87f3 100644 +index dcef8fbda4493..c8034ebc44b23 100644 --- base/unguessable_token.cc +++ base/unguessable_token.cc @@ -9,8 +9,9 @@ diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 958af6b18..8f8896a94 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 e06e26f80a5e0..2da99c8f97990 100644 +index c495691fe78a2..7452b3b63b79d 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc @@ -285,7 +285,7 @@ BrowserTaskExecutor::OnUserInputStart() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index f0f67680f..08333a14a 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc -index 16119afeb8d57..dcfde693b8327 100644 +index 18c138c21a853..554e22458da45 100644 --- content/browser/child_process_security_policy_impl.cc +++ content/browser/child_process_security_policy_impl.cc -@@ -1754,6 +1754,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( +@@ -1755,6 +1755,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin( // DeclarativeApiTest.PersistRules. if (actual_process_lock.matches_scheme(url::kDataScheme)) return true; @@ -20,10 +20,10 @@ index 16119afeb8d57..dcfde693b8327 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 034915c79223e..1a6160b109583 100644 +index fe59047aca94b..a2b6583dba0b5 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -6518,6 +6518,14 @@ std::pair NavigationRequest:: +@@ -6542,6 +6542,14 @@ std::pair NavigationRequest:: origin_and_debug_info.second += ", error"; } @@ -38,7 +38,7 @@ index 034915c79223e..1a6160b109583 100644 if (use_opaque_origin) { origin_and_debug_info = std::make_pair(origin_and_debug_info.first.DeriveNewOpaqueOrigin(), -@@ -6545,6 +6553,15 @@ std::pair NavigationRequest:: +@@ -6569,6 +6577,15 @@ std::pair NavigationRequest:: GetOriginForURLLoaderFactoryWithoutFinalFrameHostWithDebugInfo( SandboxFlagsToCommit()); diff --git a/patch/patches/browser_web_ui_controller_factory.patch b/patch/patches/browser_web_ui_controller_factory.patch index f3b3ebd71..7a5ca0603 100644 --- a/patch/patches/browser_web_ui_controller_factory.patch +++ b/patch/patches/browser_web_ui_controller_factory.patch @@ -1,5 +1,5 @@ diff --git content/public/browser/web_ui_controller_factory.h content/public/browser/web_ui_controller_factory.h -index eb068fb9bb42c..4e8e6a1a7abf4 100644 +index 9d9c17ffd6474..4eb79c65369af 100644 --- content/public/browser/web_ui_controller_factory.h +++ content/public/browser/web_ui_controller_factory.h @@ -47,9 +47,6 @@ class CONTENT_EXPORT WebUIControllerFactory { @@ -13,7 +13,7 @@ index eb068fb9bb42c..4e8e6a1a7abf4 100644 }; diff --git content/public/browser/webui_config_map.h content/public/browser/webui_config_map.h -index 51eb1f14fd684..31ceb131d0290 100644 +index 19777632921fc..a22db4c49fd84 100644 --- content/public/browser/webui_config_map.h +++ content/public/browser/webui_config_map.h @@ -60,6 +60,10 @@ class CONTENT_EXPORT WebUIConfigMap { diff --git a/patch/patches/build.patch b/patch/patches/build.patch index cecbdd1b4..2d1f05788 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 0272bf80f31fe..1283f35c68592 100644 +index a094aa41ec525..8f3fa35fe40bb 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1822,8 +1822,6 @@ config("thin_archive") { +@@ -1840,8 +1840,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 85307bbf7..5f0463227 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 bb193ea0cb1df..7cda1f1f80a05 100644 +index 073ded4a9482b..55edbcad5b2a3 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 bb193ea0cb1df..7cda1f1f80a05 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1958,6 +1959,7 @@ static_library("browser") { +@@ -1974,6 +1975,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index bb193ea0cb1df..7cda1f1f80a05 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2502,6 +2504,10 @@ static_library("browser") { +@@ -2520,6 +2522,10 @@ static_library("browser") { ] } @@ -29,3 +29,12 @@ index bb193ea0cb1df..7cda1f1f80a05 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", +@@ -6349,8 +6355,6 @@ static_library("browser") { + sources += [ + "enterprise/chrome_browser_main_extra_parts_enterprise.cc", + "enterprise/chrome_browser_main_extra_parts_enterprise.h", +- "enterprise/connectors/analysis/content_analysis_sdk_manager.cc", +- "enterprise/connectors/analysis/content_analysis_sdk_manager.h", + "enterprise/connectors/analysis/local_binary_upload_service.cc", + "enterprise/connectors/analysis/local_binary_upload_service.h", + "enterprise/connectors/analysis/local_binary_upload_service_factory.cc", diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 0fa1968c2..1042c48ee 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index d7b9aa164f161..a042abaecbce7 100644 +index f365449df16a8..91afb283a41f5 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h @@ -198,9 +198,9 @@ class BrowserProcess { @@ -14,10 +14,10 @@ index d7b9aa164f161..a042abaecbce7 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 362f37e2db49e..1eea29890830c 100644 +index 984c1d637f792..74d7807e43a3c 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -1014,18 +1014,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -1007,18 +1007,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -38,7 +38,7 @@ index 362f37e2db49e..1eea29890830c 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 c63ccb48abb54..fa365de663f06 100644 +index 81c00ee7aab8e..3a069f1eb2df0 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess, @@ -52,7 +52,7 @@ index c63ccb48abb54..fa365de663f06 100644 std::unique_ptr manager) override; #endif diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc -index 8601ee1efb576..52da94c02f6f1 100644 +index e7d45ec1efd0e..6454d2d126f90 100644 --- chrome/browser/lifetime/browser_close_manager.cc +++ chrome/browser/lifetime/browser_close_manager.cc @@ -156,12 +156,14 @@ void BrowserCloseManager::CloseBrowsers() { diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index 8e6947df4..ca6d58556 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/browser_about_handler.cc chrome/browser/browser_about_handler.cc -index 3285e422f76c1..5f35b91897b75 100644 +index af62c19be9db6..d58f033cffecc 100644 --- chrome/browser/browser_about_handler.cc +++ chrome/browser/browser_about_handler.cc @@ -70,6 +70,9 @@ bool HandleNonNavigationAboutURL(const GURL& url) { @@ -13,7 +13,7 @@ index 3285e422f76c1..5f35b91897b75 100644 return false; } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index c74b111116687..e71d33a11ebdc 100644 +index 7b4b0ed936514..8949125070a54 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -43,7 +43,7 @@ index c74b111116687..e71d33a11ebdc 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -5590,6 +5596,7 @@ static_library("ui") { +@@ -5665,6 +5671,7 @@ static_library("ui") { if (enable_basic_printing) { deps += [ "//components/printing/browser", @@ -52,7 +52,7 @@ index c74b111116687..e71d33a11ebdc 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 244584b4df1fb..77612face5286 100644 +index 1678328cf34cf..4b7dafe1193db 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc @@ -265,6 +265,25 @@ @@ -81,7 +81,7 @@ index 244584b4df1fb..77612face5286 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -513,6 +532,13 @@ Browser::Browser(const CreateParams& params) +@@ -508,6 +527,13 @@ Browser::Browser(const CreateParams& params) tab_strip_model_->AddObserver(this); @@ -95,7 +95,7 @@ index 244584b4df1fb..77612face5286 100644 location_bar_model_ = std::make_unique( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -1339,6 +1365,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1334,6 +1360,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -110,7 +110,7 @@ index 244584b4df1fb..77612face5286 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1346,8 +1380,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1341,8 +1375,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -131,7 +131,7 @@ index 244584b4df1fb..77612face5286 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1554,6 +1598,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1549,6 +1593,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -146,23 +146,23 @@ index 244584b4df1fb..77612face5286 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1683,6 +1735,15 @@ void Browser::AddNewContents(WebContents* source, +@@ -1681,6 +1733,15 @@ void Browser::AddNewContents( return; } +#if BUILDFLAG(ENABLE_CEF) + if (cef_browser_delegate_) { + cef_browser_delegate_->AddNewContents( -+ source, std::move(new_contents), target_url, disposition, initial_rect, -+ user_gesture, was_blocked); ++ source, std::move(new_contents), target_url, disposition, ++ window_features, user_gesture, was_blocked); + return; + } +#endif + chrome::AddWebContents(this, source, std::move(new_contents), target_url, - disposition, initial_rect, window_action); + disposition, window_features, window_action); } -@@ -1701,6 +1762,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1699,6 +1760,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 +171,7 @@ index 244584b4df1fb..77612face5286 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1728,6 +1791,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1726,6 +1789,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -180,7 +180,7 @@ index 244584b4df1fb..77612face5286 100644 if (!GetStatusBubble()) return; -@@ -1735,6 +1800,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1733,6 +1798,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -198,7 +198,7 @@ index 244584b4df1fb..77612face5286 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1759,6 +1835,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1757,6 +1833,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -218,7 +218,7 @@ index 244584b4df1fb..77612face5286 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1851,6 +1940,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1849,6 +1938,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -229,7 +229,7 @@ index 244584b4df1fb..77612face5286 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1895,6 +1988,8 @@ void Browser::RendererResponsive( +@@ -1893,6 +1986,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 +238,7 @@ index 244584b4df1fb..77612face5286 100644 } content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1955,11 +2050,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1953,11 +2048,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -254,7 +254,7 @@ index 244584b4df1fb..77612face5286 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2154,6 +2253,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2152,6 +2251,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -270,7 +270,7 @@ index 244584b4df1fb..77612face5286 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2691,13 +2799,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2690,13 +2798,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -292,7 +292,7 @@ index 244584b4df1fb..77612face5286 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2824,6 +2939,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2823,6 +2938,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { content_translate_driver->RemoveTranslationObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); } @@ -302,7 +302,7 @@ index 244584b4df1fb..77612face5286 100644 void Browser::TabDetachedAtImpl(content::WebContents* contents, diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h -index 38ee0d848089a..d242536872d13 100644 +index e80e3d192f615..97c97042e993e 100644 --- chrome/browser/ui/browser.h +++ chrome/browser/ui/browser.h @@ -22,6 +22,7 @@ @@ -324,7 +324,7 @@ index 38ee0d848089a..d242536872d13 100644 #if BUILDFLAG(IS_ANDROID) #error This file should only be included on desktop. #endif -@@ -317,6 +322,11 @@ class Browser : public TabStripModelObserver, +@@ -311,6 +316,11 @@ class Browser : public TabStripModelObserver, float initial_aspect_ratio = 1.0f; bool lock_aspect_ratio = false; @@ -336,7 +336,7 @@ index 38ee0d848089a..d242536872d13 100644 private: friend class Browser; friend class WindowSizerChromeOSTest; -@@ -392,6 +402,13 @@ class Browser : public TabStripModelObserver, +@@ -386,6 +396,13 @@ class Browser : public TabStripModelObserver, force_skip_warning_user_on_close_ = force_skip_warning_user_on_close; } @@ -350,7 +350,7 @@ index 38ee0d848089a..d242536872d13 100644 // Accessors //////////////////////////////////////////////////////////////// const CreateParams& create_params() const { return create_params_; } -@@ -465,6 +482,12 @@ class Browser : public TabStripModelObserver, +@@ -459,6 +476,12 @@ class Browser : public TabStripModelObserver, base::WeakPtr AsWeakPtr(); @@ -363,7 +363,7 @@ index 38ee0d848089a..d242536872d13 100644 // Get the FindBarController for this browser, creating it if it does not // yet exist. FindBarController* GetFindBarController(); -@@ -838,11 +861,19 @@ class Browser : public TabStripModelObserver, +@@ -828,11 +851,19 @@ class Browser : public TabStripModelObserver, void SetContentsBounds(content::WebContents* source, const gfx::Rect& bounds) override; void UpdateTargetURL(content::WebContents* source, const GURL& url) override; @@ -383,7 +383,7 @@ index 38ee0d848089a..d242536872d13 100644 void BeforeUnloadFired(content::WebContents* source, bool proceed, bool* proceed_to_fire_unload) override; -@@ -1244,6 +1275,8 @@ class Browser : public TabStripModelObserver, +@@ -1234,6 +1265,8 @@ class Browser : public TabStripModelObserver, const std::string initial_workspace_; bool initial_visible_on_all_workspaces_state_; @@ -392,8 +392,8 @@ index 38ee0d848089a..d242536872d13 100644 CreationSource creation_source_ = CreationSource::kUnknown; UnloadController unload_controller_; -@@ -1313,6 +1346,10 @@ class Browser : public TabStripModelObserver, - std::unique_ptr screen_ai_annotator_; +@@ -1298,6 +1331,10 @@ class Browser : public TabStripModelObserver, + extension_browser_window_helper_; #endif +#if BUILDFLAG(ENABLE_CEF) @@ -404,7 +404,7 @@ index 38ee0d848089a..d242536872d13 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 ef9eff48c6498..c93c4aae718c2 100644 +index b20e91c512f9b..389cba1d27ca0 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc @@ -559,6 +559,13 @@ std::unique_ptr CreateTargetContents( @@ -422,10 +422,10 @@ index ef9eff48c6498..c93c4aae718c2 100644 // tab helpers, so the entire set of tab helpers needs to be set up // immediately. diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc -index 0b377aacbfbe8..ccf5403a3978f 100644 +index a3dbf97b6f943..6d8e521e9f189 100644 --- chrome/browser/ui/browser_tabstrip.cc +++ chrome/browser/ui/browser_tabstrip.cc -@@ -32,9 +32,13 @@ void AddTabAt(Browser* browser, +@@ -33,9 +33,13 @@ void AddTabAt(Browser* browser, // Time new tab page creation time. We keep track of the timing data in // WebContents, but we want to include the time it takes to create the // WebContents object too. diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index cf7d6189d..92fbbba86 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc -index 242f244a6d3b5..d037f2dfd9987 100644 +index 09e166d182eed..5e5d0d3554600 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -9,6 +9,7 @@ @@ -10,7 +10,7 @@ index 242f244a6d3b5..d037f2dfd9987 100644 #include "chrome/browser/content_settings/one_time_geolocation_permission_provider.h" #include "chrome/browser/permissions/last_tab_standing_tracker_factory.h" #include "chrome/browser/profiles/off_the_record_profile_impl.h" -@@ -23,6 +24,10 @@ +@@ -22,6 +23,10 @@ #include "extensions/buildflags/buildflags.h" #include "ui/webui/webui_allowlist_provider.h" @@ -21,7 +21,7 @@ index 242f244a6d3b5..d037f2dfd9987 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "base/trace_event/trace_event.h" #include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h" -@@ -55,7 +60,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() +@@ -54,7 +59,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory() DependsOn(SupervisedUserSettingsServiceFactory::GetInstance()); #endif #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -35,7 +35,7 @@ index 242f244a6d3b5..d037f2dfd9987 100644 #endif // Used by way of ShouldRestoreOldSessionCookies(). #if BUILDFLAG(ENABLE_SESSION_SERVICE) -@@ -119,6 +130,9 @@ scoped_refptr +@@ -118,6 +129,9 @@ scoped_refptr } #if BUILDFLAG(ENABLE_EXTENSIONS) @@ -45,7 +45,7 @@ index 242f244a6d3b5..d037f2dfd9987 100644 // These must be registered before before the HostSettings are passed over to // the IOThread. Simplest to do this on construction. settings_map->RegisterProvider( -@@ -131,6 +145,9 @@ scoped_refptr +@@ -130,6 +144,9 @@ scoped_refptr // the case where profile->IsOffTheRecord() is true? And what is the // interaction with profile->IsGuestSession()? false)); @@ -56,7 +56,7 @@ index 242f244a6d3b5..d037f2dfd9987 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 701d6a5155f57..862a491c7db88 100644 +index 9b9f37709511a..acff569de15d9 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 e0daa17e6..1f05bd5ef 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index 693145325ca59..0ecb5bcb7d146 100644 +index d1244c71932df..fab3cb730f084 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -305,6 +305,13 @@ base::OnceCallback* GetMenuShownCallback() { +@@ -310,6 +310,13 @@ base::OnceCallback* GetMenuShownCallback() { return callback.get(); } @@ -16,7 +16,7 @@ index 693145325ca59..0ecb5bcb7d146 100644 enum class UmaEnumIdLookupType { GeneralEnumId, ContextSpecificEnumId, -@@ -543,6 +550,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { +@@ -548,6 +555,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) { if (ContextMenuMatcher::IsExtensionsCustomCommandId(id)) return 1; @@ -27,7 +27,7 @@ index 693145325ca59..0ecb5bcb7d146 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -738,6 +749,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -743,6 +754,14 @@ RenderViewContextMenu::RenderViewContextMenu( ? GetBrowser()->app_controller()->system_app() : nullptr; #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -42,7 +42,7 @@ index 693145325ca59..0ecb5bcb7d146 100644 } RenderViewContextMenu::~RenderViewContextMenu() = default; -@@ -1148,6 +1167,12 @@ void RenderViewContextMenu::InitMenu() { +@@ -1160,6 +1179,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 693145325ca59..0ecb5bcb7d146 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -2998,6 +3023,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3015,6 +3040,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,7 +69,7 @@ index 693145325ca59..0ecb5bcb7d146 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 ff9baacda8bc9..a57966a287530 100644 +index 0156137c2853a..ad27c7920e6e7 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h @@ -127,6 +127,12 @@ class RenderViewContextMenu @@ -85,7 +85,7 @@ index ff9baacda8bc9..a57966a287530 100644 protected: Profile* GetProfile() const; -@@ -353,6 +359,9 @@ class RenderViewContextMenu +@@ -356,6 +362,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -96,7 +96,7 @@ index ff9baacda8bc9..a57966a287530 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 13b73503a6a73..6e840062ff825 100644 +index 82f78a7045ed7..c80825c225b50 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, @@ -110,7 +110,7 @@ index 13b73503a6a73..6e840062ff825 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 9600ae2f331f9..67096fd0671a7 100644 +index c174f3aff2780..d072711c15c4e 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 { @@ -132,7 +132,7 @@ index 9600ae2f331f9..67096fd0671a7 100644 command_executed_ = true; RecordUsedItem(id); diff --git components/renderer_context_menu/render_view_context_menu_base.h components/renderer_context_menu/render_view_context_menu_base.h -index 3da0bab3d7bde..f1d5d7f09d6dc 100644 +index 7a16d8bb602e5..b06b811a6fb33 100644 --- components/renderer_context_menu/render_view_context_menu_base.h +++ components/renderer_context_menu/render_view_context_menu_base.h @@ -86,6 +86,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate, @@ -176,7 +176,7 @@ index 3da0bab3d7bde..f1d5d7f09d6dc 100644 bool IsCustomItemEnabled(int id) const; diff --git components/renderer_context_menu/render_view_context_menu_observer.cc components/renderer_context_menu/render_view_context_menu_observer.cc -index 2e2d05f91c646..85b256b2be9bd 100644 +index 9fdda1636003d..538bd05a41296 100644 --- components/renderer_context_menu/render_view_context_menu_observer.cc +++ components/renderer_context_menu/render_view_context_menu_observer.cc @@ -15,3 +15,8 @@ bool RenderViewContextMenuObserver::IsCommandIdChecked(int command_id) { @@ -189,7 +189,7 @@ index 2e2d05f91c646..85b256b2be9bd 100644 + return false; +} diff --git components/renderer_context_menu/render_view_context_menu_observer.h components/renderer_context_menu/render_view_context_menu_observer.h -index b360a8eb4e820..6f9023a629046 100644 +index 0527c57abd51c..70bebcbb50461 100644 --- components/renderer_context_menu/render_view_context_menu_observer.h +++ components/renderer_context_menu/render_view_context_menu_observer.h @@ -11,6 +11,10 @@ namespace content { diff --git a/patch/patches/chrome_browser_devtools_1366011.patch b/patch/patches/chrome_browser_devtools_1366011.patch new file mode 100644 index 000000000..cf7a5a28d --- /dev/null +++ b/patch/patches/chrome_browser_devtools_1366011.patch @@ -0,0 +1,12 @@ +diff --git chrome/browser/devtools/protocol/page_handler.cc chrome/browser/devtools/protocol/page_handler.cc +index 663a27ff332f2..5c8222267f860 100644 +--- chrome/browser/devtools/protocol/page_handler.cc ++++ chrome/browser/devtools/protocol/page_handler.cc +@@ -14,7 +14,6 @@ + #if BUILDFLAG(ENABLE_PRINTING) + #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" + #if BUILDFLAG(ENABLE_PRINT_PREVIEW) +-#include "chrome/browser/printing/pdf_nup_converter_client.h" + #include "chrome/browser/printing/print_view_manager.h" + #else + #include "chrome/browser/printing/print_view_manager_basic.h" diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index 21ae7151a..093d38145 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 f532c9e044b46..c55c424f6ffd5 100644 +index ab0022f97fd3a..0632f7b4d966d 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -20,6 +20,7 @@ @@ -8,9 +8,9 @@ index f532c9e044b46..c55c424f6ffd5 100644 #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_process.h" - #include "chrome/browser/enterprise/connectors/common.h" - #include "chrome/browser/platform_util.h" -@@ -254,6 +255,13 @@ void FileSelectHelper::OnListFile( + #include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager.h" + #include "chrome/browser/chromeos/policy/dlp/dlp_rules_manager_factory.h" +@@ -257,6 +258,13 @@ void FileSelectHelper::OnListFile( void FileSelectHelper::LaunchConfirmationDialog( const base::FilePath& path, std::vector selected_files) { @@ -24,7 +24,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 ShowFolderUploadConfirmationDialog( path, base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this), -@@ -470,7 +478,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() { +@@ -480,7 +488,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() { std::unique_ptr FileSelectHelper::GetFileTypesFromAcceptType( @@ -34,7 +34,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 std::unique_ptr base_file_type( new ui::SelectFileDialog::FileTypeInfo()); if (accept_types.empty()) -@@ -484,17 +493,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -494,17 +503,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector* extensions = &file_type->extensions.back(); @@ -60,7 +60,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 } else { if (!base::IsStringASCII(accept_type)) continue; -@@ -505,10 +521,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -515,10 +531,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( description_id = IDS_AUDIO_FILES; else if (ascii_type == "video/*") description_id = IDS_VIDEO_FILES; @@ -81,7 +81,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -533,6 +557,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -543,6 +567,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( l10n_util::GetStringUTF16(description_id)); } @@ -97,7 +97,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 return file_type; } -@@ -540,7 +573,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -550,7 +583,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -107,7 +107,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -559,6 +593,7 @@ void FileSelectHelper::RunFileChooser( +@@ -569,6 +603,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -115,7 +115,7 @@ index f532c9e044b46..c55c424f6ffd5 100644 file_select_helper->RunFileChooser(render_frame_host, std::move(listener), params.Clone()); } -@@ -612,7 +647,8 @@ void FileSelectHelper::RunFileChooser( +@@ -622,7 +657,8 @@ void FileSelectHelper::RunFileChooser( } void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { @@ -126,10 +126,10 @@ index f532c9e044b46..c55c424f6ffd5 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 8c86774e6d279..b634ed1056b4f 100644 +index a1fff2a47d227..033271beb8b4c 100644 --- chrome/browser/file_select_helper.h +++ chrome/browser/file_select_helper.h -@@ -65,7 +65,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -64,7 +64,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< static void RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -139,7 +139,7 @@ index 8c86774e6d279..b634ed1056b4f 100644 // Enumerates all the files in directory. static void EnumerateDirectory( -@@ -266,7 +267,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -267,7 +268,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 @@ -149,7 +149,7 @@ index 8c86774e6d279..b634ed1056b4f 100644 // Check the accept type is valid. It is expected to be all lower case with // no whitespace. -@@ -331,6 +333,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe< +@@ -332,6 +334,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; @@ -157,10 +157,10 @@ index 8c86774e6d279..b634ed1056b4f 100644 + bool run_from_cef_ = false; + #if BUILDFLAG(IS_CHROMEOS_ASH) - // DlpFilesController is responsible for checking whether any of the selected - // files is restricted according to the DataLeakPrevention policy. + 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 2cf473c35b67a..e3552bd0f17d4 100644 +index e4dc653c7be45..5aeeb0b970484 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 { @@ -173,7 +173,7 @@ index 2cf473c35b67a..e3552bd0f17d4 100644 raw_ptr source_contents_; }; diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc -index 024b691522a6d..22bc54db8e4aa 100644 +index 9243e4a7fb736..e56605fca4e2d 100644 --- ui/shell_dialogs/execute_select_file_win.cc +++ ui/shell_dialogs/execute_select_file_win.cc @@ -286,9 +286,7 @@ bool ExecuteSelectSingleFile(HWND owner, @@ -225,7 +225,7 @@ index 024b691522a6d..22bc54db8e4aa 100644 paths.push_back(std::move(path)); } diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc -index a622d465ab9e9..b5c11c3117738 100644 +index 9b466a0bbe8b5..4c2c336d6f397 100644 --- ui/shell_dialogs/select_file_dialog.cc +++ ui/shell_dialogs/select_file_dialog.cc @@ -64,8 +64,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { @@ -242,7 +242,7 @@ index a622d465ab9e9..b5c11c3117738 100644 return CreateSelectFileDialog(listener, std::move(policy)); } diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h -index 957ef752be4ba..061a415fd5c36 100644 +index 45989e4982d49..05675d1d96350 100644 --- ui/shell_dialogs/select_file_dialog.h +++ ui/shell_dialogs/select_file_dialog.h @@ -111,7 +111,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog @@ -297,7 +297,7 @@ index 957ef752be4ba..061a415fd5c36 100644 SelectFileDialog* CreateSelectFileDialog( diff --git ui/shell_dialogs/select_file_dialog_factory.h ui/shell_dialogs/select_file_dialog_factory.h -index 567f50de40b04..1fbac69307bdc 100644 +index d861d1d86c957..6167e0a5b549f 100644 --- ui/shell_dialogs/select_file_dialog_factory.h +++ ui/shell_dialogs/select_file_dialog_factory.h @@ -24,6 +24,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogFactory { @@ -310,7 +310,7 @@ index 567f50de40b04..1fbac69307bdc 100644 } // namespace ui diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm -index 605c2278407ce..26ca067d32720 100644 +index 14f26f55dad2f..db4b7d96243db 100644 --- ui/shell_dialogs/select_file_dialog_mac.mm +++ ui/shell_dialogs/select_file_dialog_mac.mm @@ -100,6 +100,10 @@ void SelectFileDialogImpl::SelectFileImpl( @@ -325,10 +325,10 @@ index 605c2278407ce..26ca067d32720 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 cf1fee6c8b770..287e9b3ace7cd 100644 +index a1b7af0abde64..4998abc1fb52f 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -250,6 +250,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -249,6 +249,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 d41e72792..a58b8e45c 100644 --- a/patch/patches/chrome_browser_dialogs_widget.patch +++ b/patch/patches/chrome_browser_dialogs_widget.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc -index a15902b583edc..2501a2d8ead5f 100644 +index 58842679b6102..b55a0a07ab372 100644 --- chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc +++ chrome/browser/ui/views/chrome_javascript_app_modal_view_factory_views.cc @@ -97,7 +97,7 @@ javascript_dialogs::AppModalDialogView* CreateViewsJavaScriptDialog( @@ -12,7 +12,7 @@ index a15902b583edc..2501a2d8ead5f 100644 // on the screen, we can't actually attach to it. parent_window = nullptr; diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc -index 259f4465c518b..e19a0a14279cd 100644 +index e41f4b4ea72ad..f955a3fe87fe6 100644 --- components/constrained_window/constrained_window_views.cc +++ components/constrained_window/constrained_window_views.cc @@ -101,15 +101,24 @@ void UpdateModalDialogPosition(views::Widget* widget, @@ -77,7 +77,7 @@ index 259f4465c518b..e19a0a14279cd 100644 DCHECK_EQ(parent_view, host->GetHostView()); ModalDialogHostObserver* dialog_host_observer = diff --git components/constrained_window/native_web_contents_modal_dialog_manager_views.cc components/constrained_window/native_web_contents_modal_dialog_manager_views.cc -index ac015f82f720d..80d11897e5d6d 100644 +index 647391095306e..02aea9b01f59b 100644 --- components/constrained_window/native_web_contents_modal_dialog_manager_views.cc +++ components/constrained_window/native_web_contents_modal_dialog_manager_views.cc @@ -184,9 +184,12 @@ void NativeWebContentsModalDialogManagerViews::HostChanged( @@ -97,7 +97,7 @@ index ac015f82f720d..80d11897e5d6d 100644 OnPositionRequiresUpdate(); diff --git components/web_modal/modal_dialog_host.h components/web_modal/modal_dialog_host.h -index b220ddc72bab2..2a9a35b97f189 100644 +index 51ed6bcf6b540..9ae4737e0737e 100644 --- components/web_modal/modal_dialog_host.h +++ components/web_modal/modal_dialog_host.h @@ -34,6 +34,10 @@ class WEB_MODAL_EXPORT ModalDialogHost { @@ -112,7 +112,7 @@ index b220ddc72bab2..2a9a35b97f189 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 fcf0b05964557..3cac0c96d7ca7 100644 +index bc0a51138f2fd..1a8086c46e237 100644 --- ui/views/window/dialog_delegate.cc +++ ui/views/window/dialog_delegate.cc @@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() { @@ -187,7 +187,7 @@ index fcf0b05964557..3cac0c96d7ca7 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 2575e99e67586..29fc582388bbd 100644 +index 84430f84e9bdc..c229bb1155c02 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 00d51e6f7..f98446e45 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 a3165a89bcdde..71676fbb3cfc9 100644 +index a9703dcc02f48..aea89290f6080 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -13,6 +13,7 @@ @@ -10,7 +10,7 @@ index a3165a89bcdde..71676fbb3cfc9 100644 #include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h" #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h" -@@ -80,6 +81,10 @@ +@@ -81,6 +82,10 @@ #include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h" #endif @@ -21,7 +21,7 @@ index a3165a89bcdde..71676fbb3cfc9 100644 #if BUILDFLAG(ENABLE_PDF) #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" #include "components/pdf/browser/pdf_web_contents_helper.h" -@@ -302,6 +307,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( +@@ -303,6 +308,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( std::unique_ptr ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( MimeHandlerViewGuest* guest) const { diff --git a/patch/patches/chrome_browser_media_router_1368642.patch b/patch/patches/chrome_browser_media_router_1368642.patch new file mode 100644 index 000000000..f4e72576d --- /dev/null +++ b/patch/patches/chrome_browser_media_router_1368642.patch @@ -0,0 +1,22 @@ +diff --git chrome/browser/media/router/BUILD.gn chrome/browser/media/router/BUILD.gn +index c782ea4601eaf..5f39557b6768a 100644 +--- chrome/browser/media/router/BUILD.gn ++++ chrome/browser/media/router/BUILD.gn +@@ -113,8 +113,6 @@ static_library("router") { + public_deps += [ "//components/media_router/common/mojom:logger" ] + + sources += [ +- "logger_list.cc", +- "logger_list.h", + "mojo/media_router_desktop.cc", + "mojo/media_router_desktop.h", + "mojo/media_router_mojo_impl.cc", +@@ -170,6 +168,8 @@ static_library("router") { + "providers/wired_display/wired_display_presentation_receiver_factory.h", + ] + ++ deps += [ ":logger_list" ] ++ + if (is_win) { + sources += [ + "mojo/media_route_provider_util_win.cc", diff --git a/patch/patches/chrome_browser_net_proxy.patch b/patch/patches/chrome_browser_net_proxy.patch index c857dade8..599683150 100644 --- a/patch/patches/chrome_browser_net_proxy.patch +++ b/patch/patches/chrome_browser_net_proxy.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/net/proxy_config_monitor.cc chrome/browser/net/proxy_config_monitor.cc -index d05a82a9c369a..82590253576ff 100644 +index 34584b4400276..809b175ff26de 100644 --- chrome/browser/net/proxy_config_monitor.cc +++ chrome/browser/net/proxy_config_monitor.cc @@ -9,6 +9,7 @@ diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index 32774d542..11289ffcd 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 85b7da7f35c84..311211abf1b82 100644 +index 07a544f4fd8a3..7dfe80b9de4c1 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 85b7da7f35c84..311211abf1b82 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 4741cec1f8a38..e657e26ea1544 100644 +index cfab9f642611f..cc2c6c1f6e9c9 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 @@ @@ -44,7 +44,7 @@ index 4741cec1f8a38..e657e26ea1544 100644 base::FeatureList::IsEnabled( features::kPeriodicSyncPermissionForDefaultSearchEngine) && diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc -index 994b78d94de26..e51f6f6162f02 100644 +index 644eb40b81297..0715d54f84745 100644 --- chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc @@ -12,6 +12,7 @@ @@ -77,7 +77,7 @@ index 994b78d94de26..e51f6f6162f02 100644 } diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc -index 5efee36a48397..bb683b88c5bd6 100644 +index ad86b42a1698e..74f046951383d 100644 --- chrome/browser/permissions/permission_manager_factory.cc +++ chrome/browser/permissions/permission_manager_factory.cc @@ -6,6 +6,7 @@ @@ -100,7 +100,7 @@ index 5efee36a48397..bb683b88c5bd6 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 f732f6c467e9b..c5158bfe045a7 100644 +index b60603e7843eb..9051a490f0b44 100644 --- chrome/browser/storage/durable_storage_permission_context.cc +++ chrome/browser/storage/durable_storage_permission_context.cc @@ -8,6 +8,7 @@ @@ -123,7 +123,7 @@ index f732f6c467e9b..c5158bfe045a7 100644 std::move(callback), /*persist=*/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 c2836d15eba30..0c03c2b4666a6 100644 +index fbce13c16ad10..0512b2f09937e 100644 --- chrome/browser/ui/permission_bubble/permission_prompt.h +++ chrome/browser/ui/permission_bubble/permission_prompt.h @@ -11,6 +11,13 @@ namespace content { @@ -141,10 +141,10 @@ index c2836d15eba30..0c03c2b4666a6 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 eff04a21a7109..daefe93035789 100644 +index 4584985a62cfa..3e894a8c8ca9d 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc -@@ -141,11 +141,28 @@ std::unique_ptr CreateQuietPrompt( +@@ -142,11 +142,28 @@ std::unique_ptr CreateQuietPrompt( } } @@ -174,7 +174,7 @@ index eff04a21a7109..daefe93035789 100644 if (!browser) { DLOG(WARNING) << "Permission prompt suppressed because the WebContents is " diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc -index 75b22de5422b4..9235a20da7812 100644 +index c3b99f8e21b1c..8abca05c7c482 100644 --- components/embedder_support/permission_context_utils.cc +++ components/embedder_support/permission_context_utils.cc @@ -5,6 +5,7 @@ diff --git a/patch/patches/chrome_browser_profile_menu.patch b/patch/patches/chrome_browser_profile_menu.patch index c887306cd..064a7e870 100644 --- a/patch/patches/chrome_browser_profile_menu.patch +++ b/patch/patches/chrome_browser_profile_menu.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/bookmarks/bookmark_stats.cc chrome/browser/ui/bookmarks/bookmark_stats.cc -index 1f928081c142d..697914a83b3c4 100644 +index 45f661faa6e0b..777a1f6c333b6 100644 --- chrome/browser/ui/bookmarks/bookmark_stats.cc +++ chrome/browser/ui/bookmarks/bookmark_stats.cc @@ -21,7 +21,9 @@ bool IsBookmarkBarLocation(BookmarkLaunchLocation location) { @@ -14,7 +14,7 @@ index 1f928081c142d..697914a83b3c4 100644 ? profile_metrics::BrowserProfileType::kRegular : profile_metrics::BrowserProfileType::kIncognito; diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc -index 62d33747b6c3f..4b8a512d1ca85 100644 +index 07edba472de67..2545b4926e66e 100644 --- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc +++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc @@ -29,7 +29,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog( @@ -29,7 +29,7 @@ index 62d33747b6c3f..4b8a512d1ca85 100644 SetShowCloseButton(true); diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc -index 10c69e08d9e41..847dc896eca41 100644 +index caa20ec03434a..2a3ca921445c1 100644 --- chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc +++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog_coordinator.cc @@ -26,6 +26,10 @@ void IncognitoClearBrowsingDataDialogCoordinator::Show( @@ -44,7 +44,7 @@ index 10c69e08d9e41..847dc896eca41 100644 avatar_toolbar_button, GetBrowser().profile(), type); DCHECK_EQ(nullptr, bubble_tracker_.view()); diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc -index 34949452d4891..43aa445b5ac3f 100644 +index 0d0b99bf57efa..2f8ba83a313ab 100644 --- chrome/browser/ui/views/profiles/incognito_menu_view.cc +++ chrome/browser/ui/views/profiles/incognito_menu_view.cc @@ -37,7 +37,9 @@ @@ -59,7 +59,7 @@ index 34949452d4891..43aa445b5ac3f 100644 base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show")); diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc -index 78c840b6fe442..7c694b9e8d754 100644 +index 413f221ac2553..4a066d59ed2f0 100644 --- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc +++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc @@ -44,7 +44,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) { diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index e9d949eb3..164f3cb5f 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 d803bc01655a5..e63babaf2e5c2 100644 +index c3841b69790cf..aa10941fa843d 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -650,7 +650,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -662,7 +662,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,7 +14,7 @@ index d803bc01655a5..e63babaf2e5c2 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index 8ab5d6c0417a5..08b93ac6b78d3 100644 +index 7cd45d8df99ef..4781f131c253c 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -83,6 +83,7 @@ base::LazyInstance>::Leaky @@ -52,10 +52,10 @@ index 8ab5d6c0417a5..08b93ac6b78d3 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index d6126b9fe1c1a..c11b74639d715 100644 +index fc84e8f683a7a..1c4de56dfc9cc 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -98,6 +98,10 @@ class Profile : public content::BrowserContext { +@@ -99,6 +99,10 @@ class Profile : public content::BrowserContext { // be applicable to run. Please see crbug.com/1098697#c3 for more details. static OTRProfileID CreateUnique(const std::string& profile_id_prefix); @@ -66,7 +66,7 @@ index d6126b9fe1c1a..c11b74639d715 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -482,6 +486,8 @@ class Profile : public content::BrowserContext { +@@ -483,6 +487,8 @@ class Profile : public content::BrowserContext { virtual void RecordPrimaryMainFrameNavigation() = 0; @@ -75,7 +75,7 @@ index d6126b9fe1c1a..c11b74639d715 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -493,8 +499,6 @@ class Profile : public content::BrowserContext { +@@ -494,8 +500,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -85,10 +85,10 @@ index d6126b9fe1c1a..c11b74639d715 100644 virtual bool IsSignedIn() = 0; diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index c0a48974dacea..f8ecfa11f8681 100644 +index 9f2ccdfbc8e55..c2fab7e33b06e 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1006,7 +1006,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -1019,7 +1019,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -100,10 +100,10 @@ index c0a48974dacea..f8ecfa11f8681 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index eb08e8d2ca4d3..1c0b2a299c92c 100644 +index 3048e397fd831..56ba0bcb6d762 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -528,7 +528,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -523,7 +523,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif @@ -113,10 +113,10 @@ index eb08e8d2ca4d3..1c0b2a299c92c 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 0f3e28ba7dd6e..1a114b4039e47 100644 +index aedd5c31c6a6c..4a90ac6fce1f3 100644 --- chrome/browser/profiles/profile_manager.h +++ chrome/browser/profiles/profile_manager.h -@@ -153,7 +153,7 @@ class ProfileManager : public Profile::Delegate { +@@ -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 // make this method private. @@ -125,7 +125,7 @@ index 0f3e28ba7dd6e..1a114b4039e47 100644 // Returns regular or off-the-record profile given its profile key. static Profile* GetProfileFromProfileKey(ProfileKey* profile_key); -@@ -185,7 +185,7 @@ class ProfileManager : public Profile::Delegate { +@@ -181,7 +181,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 0f3e28ba7dd6e..1a114b4039e47 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 6ccdfa7f3cc46..f8668efcc77f6 100644 +index 5c9f2c1ab4a25..bf48fe9c440e8 100644 --- chrome/browser/profiles/renderer_updater.cc +++ chrome/browser/profiles/renderer_updater.cc @@ -8,6 +8,7 @@ diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index ccc2bcb39..b07633af2 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 8b2f8a9424a95..a87abd0508f51 100644 +index 848a6365ce97d..5d6185d8402a5 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -29,6 +29,7 @@ static_library("safe_browsing") { +@@ -30,6 +30,7 @@ static_library("safe_browsing") { "//components/browser_sync", "//components/enterprise:enterprise", "//components/enterprise/common:strings", diff --git a/patch/patches/chrome_browser_themes.patch b/patch/patches/chrome_browser_themes.patch index 9826e0a47..80a6fd3de 100644 --- a/patch/patches/chrome_browser_themes.patch +++ b/patch/patches/chrome_browser_themes.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc -index 8ff7b6d7eb813..cdbaff6e4760b 100644 +index 00f6166419491..6714d8596883b 100644 --- chrome/browser/themes/theme_service.cc +++ chrome/browser/themes/theme_service.cc @@ -31,6 +31,7 @@ @@ -42,7 +42,7 @@ index 8ff7b6d7eb813..cdbaff6e4760b 100644 theme_syncable_service_ = std::make_unique(profile_, this); diff --git chrome/browser/themes/theme_service_factory.cc chrome/browser/themes/theme_service_factory.cc -index 47184cef4deff..d68e769f71232 100644 +index e3a7101326eee..c6592c0d5a1ba 100644 --- chrome/browser/themes/theme_service_factory.cc +++ chrome/browser/themes/theme_service_factory.cc @@ -7,6 +7,7 @@ @@ -51,10 +51,10 @@ index 47184cef4deff..d68e769f71232 100644 #include "build/chromeos_buildflags.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/extensions/extension_system_factory.h" - #include "chrome/browser/profiles/incognito_helpers.h" #include "chrome/browser/profiles/profile.h" -@@ -33,6 +34,10 @@ - #include "ui/linux/linux_ui.h" + #include "chrome/browser/themes/theme_service.h" +@@ -31,6 +32,10 @@ + #include "ui/linux/linux_ui_factory.h" #endif +#if BUILDFLAG(ENABLE_CEF) @@ -64,8 +64,8 @@ index 47184cef4deff..d68e769f71232 100644 namespace { const ThemeHelper& GetThemeHelper() { -@@ -76,7 +81,15 @@ ThemeServiceFactory::ThemeServiceFactory() - BrowserContextDependencyManager::GetInstance()) { +@@ -74,7 +79,15 @@ ThemeServiceFactory::ThemeServiceFactory() + ProfileSelections::BuildRedirectedInIncognito()) { DependsOn(extensions::ExtensionRegistryFactory::GetInstance()); DependsOn(extensions::ExtensionPrefsFactory::GetInstance()); +#if BUILDFLAG(ENABLE_CEF) diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index a0ae63b62..ef7711d29 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -1,16 +1,16 @@ diff --git chrome/browser/plugins/plugin_info_host_impl.cc chrome/browser/plugins/plugin_info_host_impl.cc -index 22e8a17b5e2cc..859cd6712debe 100644 +index 7ceb1d7b854d9..5efcb8c09058c 100644 --- chrome/browser/plugins/plugin_info_host_impl.cc +++ chrome/browser/plugins/plugin_info_host_impl.cc -@@ -17,6 +17,7 @@ - #include "base/task/task_runner_util.h" +@@ -16,6 +16,7 @@ + #include "base/strings/utf_string_conversions.h" #include "build/branding_buildflags.h" #include "build/build_config.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/plugins/chrome_plugin_service_filter.h" -@@ -51,6 +52,10 @@ +@@ -50,6 +51,10 @@ #include "url/gurl.h" #include "url/origin.h" @@ -21,7 +21,7 @@ index 22e8a17b5e2cc..859cd6712debe 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "components/guest_view/browser/guest_view_base.h" #include "extensions/browser/extension_registry.h" -@@ -100,6 +105,9 @@ bool IsPluginLoadingAccessibleResourceInWebView( +@@ -135,6 +140,9 @@ bool IsPluginLoadingAccessibleResourceInWebView( extensions::ExtensionRegistry* extension_registry, int process_id, const GURL& resource) { @@ -31,7 +31,7 @@ index 22e8a17b5e2cc..859cd6712debe 100644 extensions::WebViewRendererState* renderer_state = extensions::WebViewRendererState::GetInstance(); std::string partition_id; -@@ -128,14 +136,18 @@ bool IsPluginLoadingAccessibleResourceInWebView( +@@ -163,14 +171,18 @@ bool IsPluginLoadingAccessibleResourceInWebView( PluginInfoHostImpl::Context::Context(int render_process_id, Profile* profile) : render_process_id_(render_process_id), @@ -54,7 +54,7 @@ index 22e8a17b5e2cc..859cd6712debe 100644 PluginInfoHostImpl::Context::~Context() {} diff --git chrome/browser/plugins/plugin_utils.cc chrome/browser/plugins/plugin_utils.cc -index b594c68673c19..b0e3cd149f760 100644 +index d63750d32aa5f..170bf0826235d 100644 --- chrome/browser/plugins/plugin_utils.cc +++ chrome/browser/plugins/plugin_utils.cc @@ -5,6 +5,7 @@ @@ -90,7 +90,7 @@ index b594c68673c19..b0e3cd149f760 100644 Profile* profile = Profile::FromBrowserContext(browser_context); const std::vector& allowlist = diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc -index 8b72897491669..546919dd70afc 100644 +index a29a2739af3c8..0feb1a87cef64 100644 --- chrome/common/google_url_loader_throttle.cc +++ chrome/common/google_url_loader_throttle.cc @@ -7,6 +7,7 @@ @@ -125,10 +125,10 @@ index 8b72897491669..546919dd70afc 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 a7ffa185b5df0..88f424c4f4a1b 100644 +index 0320c23e07862..6151e7744bdee 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -961,6 +961,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -969,6 +969,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index a7ffa185b5df0..88f424c4f4a1b 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1162,7 +1163,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1139,7 +1140,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index a7ffa185b5df0..88f424c4f4a1b 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1171,7 +1173,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1148,7 +1150,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,28 +156,18 @@ index a7ffa185b5df0..88f424c4f4a1b 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1181,7 +1184,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1158,7 +1161,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); - content_settings_agent->DidBlockContentType(content_type); + if (content_settings_agent) -+ content_settings_agent->DidBlockContentType(content_type); - break; - } - case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1189,7 +1193,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( - IDR_BLOCKED_PLUGIN_HTML, - l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, - group_name)); -- content_settings_agent->DidBlockContentType(content_type); -+ if (content_settings_agent) + content_settings_agent->DidBlockContentType(content_type); break; } } diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h -index f2f7e4228f134..e724b36143238 100644 +index d06734015cf17..5794b6ab1c25a 100644 --- content/browser/browser_plugin/browser_plugin_embedder.h +++ content/browser/browser_plugin/browser_plugin_embedder.h @@ -15,6 +15,7 @@ @@ -197,16 +187,38 @@ index f2f7e4228f134..e724b36143238 100644 public: 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 +--- 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) { + GetWebContents()->GetOrCreateWebPreferences(); + prefs.navigate_on_drag_drop = false; + GetWebContents()->SetWebPreferences(prefs); ++ ++ owner_web_contents_ = owner_web_contents; + } + + BrowserPluginGuest::~BrowserPluginGuest() = default; diff --git content/browser/browser_plugin/browser_plugin_guest.h content/browser/browser_plugin/browser_plugin_guest.h -index 066c66c1a2d1b..428cb1871a6af 100644 +index 091dcc8047bfa..4f6ff63f69ffa 100644 --- content/browser/browser_plugin/browser_plugin_guest.h +++ content/browser/browser_plugin/browser_plugin_guest.h -@@ -116,6 +116,8 @@ class BrowserPluginGuest : public GuestHost, public WebContentsObserver { +@@ -82,6 +82,8 @@ class BrowserPluginGuest : public WebContentsObserver { - gfx::Point GetScreenCoordinates(const gfx::Point& relative_position) const; + WebContentsImpl* GetWebContents() const; + WebContentsImpl* owner_web_contents() const { return owner_web_contents_; } + - protected: + 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 { + void InitInternal(WebContentsImpl* owner_web_contents); + + const raw_ptr delegate_; ++ ++ raw_ptr owner_web_contents_ = nullptr; + }; + + } // namespace content diff --git a/patch/patches/chrome_pref_watcher.patch b/patch/patches/chrome_pref_watcher.patch index bbd0b67ea..17c3c3a33 100644 --- a/patch/patches/chrome_pref_watcher.patch +++ b/patch/patches/chrome_pref_watcher.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/prefs/pref_watcher.h chrome/browser/ui/prefs/pref_watcher.h -index 8d9cc4fd0ba86..09af446a550db 100644 +index 1027b73890375..4e310087dffce 100644 --- chrome/browser/ui/prefs/pref_watcher.h +++ chrome/browser/ui/prefs/pref_watcher.h @@ -30,10 +30,10 @@ class PrefWatcher : public KeyedService { diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 499458e87..c62bb8e5a 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 de222ffdf2658..c57596b743fa8 100644 +index 9d935ebc3b4da..67ff14be392d7 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -5,6 +5,7 @@ @@ -18,7 +18,7 @@ index de222ffdf2658..c57596b743fa8 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -218,6 +220,10 @@ static_library("renderer") { +@@ -220,6 +222,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 fc25d9b7a..8289ce33d 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,8 +1,8 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 3799b4be80f5a..9b6714ca31df3 100644 +index 377b2eb646b0a..9163f80176102 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc -@@ -38,6 +38,7 @@ +@@ -39,6 +39,7 @@ #include "base/trace_event/trace_event_impl.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -10,7 +10,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -482,6 +483,8 @@ struct MainFunction { +@@ -489,6 +490,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index 3799b4be80f5a..9b6714ca31df3 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. -@@ -801,7 +804,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -867,7 +870,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { } #if BUILDFLAG(IS_WIN) @@ -29,7 +29,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); base::InitializePlatformThreadFeatures(); -@@ -1124,6 +1129,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1190,6 +1195,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -37,7 +37,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1134,6 +1140,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1200,6 +1206,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -45,7 +45,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1336,6 +1343,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1402,6 +1409,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -53,7 +53,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1375,6 +1383,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1441,6 +1449,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -61,7 +61,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1459,6 +1468,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1530,6 +1539,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -69,7 +69,7 @@ index 3799b4be80f5a..9b6714ca31df3 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 = -@@ -1475,6 +1485,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1546,6 +1556,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -78,7 +78,7 @@ index 3799b4be80f5a..9b6714ca31df3 100644 #endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index c299259088629..e84365598e4a8 100644 +index d1ddad3b91515..9fd596595b0ff 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -52,6 +52,7 @@ @@ -89,7 +89,7 @@ index c299259088629..e84365598e4a8 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1591,12 +1592,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1598,12 +1599,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -104,7 +104,7 @@ index c299259088629..e84365598e4a8 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1746,14 +1749,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1754,14 +1757,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|. @@ -123,7 +123,7 @@ index c299259088629..e84365598e4a8 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)) -@@ -1781,8 +1787,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1789,8 +1795,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -136,7 +136,7 @@ index c299259088629..e84365598e4a8 100644 GetMainRunLoopInstance()->QuitWhenIdleClosure()); } diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index 7ef669d52b306..8edc1aaeaff6a 100644 +index 791b74ef57995..20cd406ff81bb 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -16,6 +16,7 @@ @@ -147,15 +147,15 @@ index 7ef669d52b306..8edc1aaeaff6a 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -108,6 +109,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { - } +@@ -111,6 +112,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } + #endif // !BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) +#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]; -@@ -116,6 +118,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]; @@ -163,7 +163,7 @@ index 7ef669d52b306..8edc1aaeaff6a 100644 ui::WarmScreenCapture(); -@@ -174,7 +177,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -177,7 +180,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -174,7 +174,7 @@ index 7ef669d52b306..8edc1aaeaff6a 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index 0307113b4b0c0..260b5d6f3e645 100644 +index 6f268f5937bd5..2152a26496ceb 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc @@ -31,6 +31,7 @@ @@ -185,7 +185,7 @@ index 0307113b4b0c0..260b5d6f3e645 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" -@@ -1344,6 +1345,8 @@ bool DoesGaiaOriginRequireDedicatedProcess() { +@@ -1395,6 +1396,8 @@ bool DoesGaiaOriginRequireDedicatedProcess() { } // namespace ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -194,7 +194,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); #endif -@@ -1369,6 +1372,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1420,6 +1423,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { extra_parts_.clear(); } @@ -206,7 +206,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -3914,9 +3922,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4011,9 +4019,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -218,7 +218,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -5605,7 +5615,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -5731,7 +5741,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( network_service); } @@ -227,7 +227,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -5623,6 +5633,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -5749,6 +5759,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -236,7 +236,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 } std::vector -@@ -6477,10 +6489,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -6623,10 +6635,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -249,7 +249,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -6499,7 +6511,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -6645,7 +6657,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -259,7 +259,7 @@ index 0307113b4b0c0..260b5d6f3e645 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -6628,7 +6641,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -6777,7 +6790,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -269,10 +269,10 @@ index 0307113b4b0c0..260b5d6f3e645 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 d04de56a29cdd..bf16e1a41f7af 100644 +index cb93058f317e4..27215441c206c 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -118,6 +118,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -119,6 +119,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { ~ChromeContentBrowserClient() override; @@ -281,7 +281,7 @@ index d04de56a29cdd..bf16e1a41f7af 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. -@@ -582,7 +584,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -592,7 +594,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -290,7 +290,7 @@ index d04de56a29cdd..bf16e1a41f7af 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -924,7 +926,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -943,7 +945,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -300,7 +300,7 @@ index d04de56a29cdd..bf16e1a41f7af 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index d9867abfabbdb..b67b1dfd1975a 100644 +index 5e72dbd77de9b..40c346953edb0 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -11,6 +11,7 @@ @@ -322,7 +322,7 @@ index d9867abfabbdb..b67b1dfd1975a 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1321,6 +1326,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1347,6 +1352,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, SessionDataService::RegisterProfilePrefs(registry); #endif diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index 8bee3c93a..27eb63aae 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 dffc146633fd5..38547c5aff831 100644 +index 6eece67e8548a..eb78e5157eec8 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc -@@ -380,8 +380,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -382,8 +382,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 dffc146633fd5..38547c5aff831 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 -@@ -396,6 +398,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( +@@ -398,6 +400,13 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( DCHECK(command_updater_.IsCommandEnabled(id)) << "Invalid/disabled command " << id; @@ -28,7 +28,7 @@ index dffc146633fd5..38547c5aff831 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1038,11 +1047,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1043,11 +1052,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -45,10 +45,10 @@ index dffc146633fd5..38547c5aff831 100644 bool BrowserCommandController::IsWebAppOrCustomTab() const { diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc -index f3cc4af3bdae4..38c088087eb1f 100644 +index c6e125b6c80aa..ae1991c25a98b 100644 --- chrome/browser/ui/views/frame/browser_frame.cc +++ chrome/browser/ui/views/frame/browser_frame.cc -@@ -74,15 +74,23 @@ bool IsUsingGtkTheme(Profile* profile) { +@@ -66,15 +66,23 @@ bool IsUsingLinuxSystemTheme(Profile* profile) { //////////////////////////////////////////////////////////////////////////////// // BrowserFrame, public: @@ -74,7 +74,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 } BrowserFrame::~BrowserFrame() {} -@@ -154,6 +162,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion( +@@ -146,6 +154,12 @@ gfx::Rect BrowserFrame::GetBoundsForTabStripRegion( } int BrowserFrame::GetTopInset() const { @@ -87,7 +87,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 return browser_frame_view_->GetTopInset(false); } -@@ -170,6 +184,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { +@@ -162,6 +176,8 @@ BrowserNonClientFrameView* BrowserFrame::GetFrameView() const { } bool BrowserFrame::UseCustomFrame() const { @@ -96,7 +96,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 return native_browser_frame_->UseCustomFrame(); } -@@ -183,20 +199,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { +@@ -175,20 +191,30 @@ bool BrowserFrame::ShouldDrawFrameHeader() const { void BrowserFrame::GetWindowPlacement(gfx::Rect* bounds, ui::WindowShowState* show_state) const { @@ -127,7 +127,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 browser_frame_view_->OnBrowserViewInitViewsComplete(); } -@@ -257,6 +283,8 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { +@@ -249,6 +275,8 @@ const ui::ThemeProvider* BrowserFrame::GetThemeProvider() const { ui::ColorProviderManager::ThemeInitializerSupplier* BrowserFrame::GetCustomTheme() const { @@ -136,7 +136,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 Browser* browser = browser_view_->browser(); // If this is an incognito profile, there should never be a custom theme. if (browser->profile()->IsIncognitoProfile()) -@@ -274,6 +302,8 @@ BrowserFrame::GetCustomTheme() const { +@@ -266,6 +294,8 @@ BrowserFrame::GetCustomTheme() const { } void BrowserFrame::OnNativeWidgetWorkspaceChanged() { @@ -145,7 +145,7 @@ index f3cc4af3bdae4..38c088087eb1f 100644 chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace()); chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(), IsVisibleOnAllWorkspaces()); -@@ -363,6 +393,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { +@@ -353,6 +383,8 @@ void BrowserFrame::SetTabDragKind(TabDragKind tab_drag_kind) { ui::ColorProviderManager::Key BrowserFrame::GetColorProviderKey() const { auto key = Widget::GetColorProviderKey(); @@ -154,8 +154,8 @@ index f3cc4af3bdae4..38c088087eb1f 100644 key.frame_type = UseCustomFrame() ? ui::ColorProviderManager::FrameType::kChromium : ui::ColorProviderManager::FrameType::kNative; -@@ -395,7 +427,8 @@ void BrowserFrame::SelectNativeTheme() { - // Select between regular, dark and GTK theme. +@@ -385,7 +417,8 @@ void BrowserFrame::SelectNativeTheme() { + // Select between regular, dark and Linux toolkit themes. ui::NativeTheme* native_theme = ui::NativeTheme::GetInstanceForNativeUi(); - if (browser_view_->browser()->profile()->IsIncognitoProfile()) { @@ -164,21 +164,11 @@ index f3cc4af3bdae4..38c088087eb1f 100644 // No matter if we are using the default theme or not we always use the dark // ui instance. SetNativeTheme(ui::NativeTheme::GetInstanceForDarkUI()); -@@ -408,7 +441,8 @@ void BrowserFrame::SelectNativeTheme() { - // display_override so the web contents can blend with the overlay by using - // the developer-provided theme color for a better experience. Context: - // https://crbug.com/1219073. -- if (linux_ui && !browser_view_->AppUsesWindowControlsOverlay()) { -+ if (linux_ui && -+ (!browser_view_ || !browser_view_->AppUsesWindowControlsOverlay())) { - native_theme = linux_ui->GetNativeTheme(GetNativeWindow()); - } - #endif diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h -index 9bd586697dece..80ef1f08cb463 100644 +index 195674a56169c..bee591ec8f2f3 100644 --- chrome/browser/ui/views/frame/browser_frame.h +++ chrome/browser/ui/views/frame/browser_frame.h -@@ -53,7 +53,9 @@ enum class TabDragKind { +@@ -56,7 +56,9 @@ enum class TabDragKind { // This is a virtual interface that allows system specific browser frames. class BrowserFrame : public views::Widget, public views::ContextMenuController { public: @@ -189,10 +179,10 @@ index 9bd586697dece..80ef1f08cb463 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 f19af5dd5c46e..37827cab73cf8 100644 +index a8e5cd8826ca4..0b958e49730d4 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -307,11 +307,10 @@ using content::NativeWebKeyboardEvent; +@@ -305,11 +305,10 @@ using content::NativeWebKeyboardEvent; using content::WebContents; using web_modal::WebContentsModalDialogHost; @@ -207,7 +197,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -804,11 +803,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { +@@ -802,11 +801,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -226,20 +216,20 @@ index f19af5dd5c46e..37827cab73cf8 100644 + DCHECK(!browser_); + browser_ = std::move(browser); + -+ immersive_mode_controller_ = chrome::CreateImmersiveModeController(); ++ immersive_mode_controller_ = chrome::CreateImmersiveModeController(this); + SetShowIcon( ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); -@@ -850,7 +860,6 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -848,7 +858,6 @@ BrowserView::BrowserView(std::unique_ptr browser) } browser_->tab_strip_model()->AddObserver(this); -- immersive_mode_controller_ = chrome::CreateImmersiveModeController(); +- immersive_mode_controller_ = chrome::CreateImmersiveModeController(this); // Top container holds tab strip region and toolbar and lives at the front of // the view hierarchy. -@@ -896,8 +905,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -894,8 +903,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_)); @@ -257,7 +247,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1813,6 +1829,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1841,6 +1857,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -266,7 +256,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -3129,7 +3147,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -3202,7 +3220,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -276,7 +266,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3670,8 +3689,10 @@ void BrowserView::Layout() { +@@ -3747,8 +3766,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -289,7 +279,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3737,6 +3758,11 @@ void BrowserView::AddedToWidget() { +@@ -3814,6 +3835,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -301,7 +291,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 toolbar_->Init(); // TODO(pbos): Manage this either inside SidePanel or the corresponding button -@@ -3798,13 +3824,9 @@ void BrowserView::AddedToWidget() { +@@ -3874,13 +3900,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -317,7 +307,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4221,7 +4243,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4296,7 +4318,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -327,7 +317,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4549,6 +4572,8 @@ Profile* BrowserView::GetProfile() { +@@ -4638,6 +4661,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -336,7 +326,7 @@ index f19af5dd5c46e..37827cab73cf8 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4571,6 +4596,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4660,6 +4685,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -346,10 +336,10 @@ index f19af5dd5c46e..37827cab73cf8 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 2e054124298d4..8df50230cfaba 100644 +index 0dfde39f4bd1f..dc9ba028c22bb 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -126,11 +126,16 @@ class BrowserView : public BrowserWindow, +@@ -130,11 +130,16 @@ class BrowserView : public BrowserWindow, public webapps::AppBannerManager::Observer { public: METADATA_HEADER(BrowserView); @@ -366,9 +356,9 @@ index 2e054124298d4..8df50230cfaba 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; } BrowserFrame* frame() const { return frame_; } -@@ -762,6 +767,12 @@ class BrowserView : public BrowserWindow, - // aligned side panels. - void RightAlignedSidePanelWasClosed(); +@@ -791,6 +796,12 @@ class BrowserView : public BrowserWindow, + return should_show_window_controls_overlay_toggle_; + } + protected: + virtual ToolbarView* OverrideCreateToolbar(Browser* browser, @@ -380,7 +370,7 @@ index 2e054124298d4..8df50230cfaba 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 5f1e08e77de3e..c6746aacf49f3 100644 +index c923ca16d06a5..eb75ad1111ae3 100644 --- chrome/browser/ui/views/frame/browser_view_layout.cc +++ chrome/browser/ui/views/frame/browser_view_layout.cc @@ -45,6 +45,10 @@ @@ -407,7 +397,7 @@ index 5f1e08e77de3e..c6746aacf49f3 100644 bool toolbar_visible = delegate_->IsToolbarVisible(); int height = toolbar_visible ? toolbar_->GetPreferredSize().height() : 0; diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc -index bc047256f110a..b6bc9dfc0eee5 100644 +index 5e059b9878fc2..c1f6fbcd40ec4 100644 --- chrome/browser/ui/views/frame/contents_web_view.cc +++ chrome/browser/ui/views/frame/contents_web_view.cc @@ -26,6 +26,11 @@ @@ -423,10 +413,10 @@ index bc047256f110a..b6bc9dfc0eee5 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 fcda275238c11..d349f515af8fa 100644 +index 57d5e9f7b4e3c..da7b2d14bae49 100644 --- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc +++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc -@@ -557,33 +557,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( +@@ -556,33 +556,47 @@ gfx::Range BrowserTabStripController::ListTabsInGroup( } bool BrowserTabStripController::IsFrameCondensed() const { @@ -475,10 +465,10 @@ index fcda275238c11..d349f515af8fa 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 370b4898ca6ca..559d9994ac866 100644 +index 73869775288dc..524f32d3ae877 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -168,12 +168,13 @@ auto& GetViewCommandMap() { +@@ -170,12 +170,13 @@ auto& GetViewCommandMap() { //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -494,7 +484,7 @@ index 370b4898ca6ca..559d9994ac866 100644 SetID(VIEW_ID_TOOLBAR); UpgradeDetector::GetInstance()->AddObserver(this); -@@ -208,7 +209,7 @@ void ToolbarView::Init() { +@@ -210,7 +211,7 @@ void ToolbarView::Init() { #endif auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, @@ -504,10 +494,10 @@ index 370b4898ca6ca..559d9994ac866 100644 size_animation_.Reset(1); diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index 9eb9688bb442b..9d20d3d262588 100644 +index e597548896482..b9985ed50a2e3 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h -@@ -94,7 +94,8 @@ class ToolbarView : public views::AccessiblePaneView, +@@ -95,7 +95,8 @@ class ToolbarView : public views::AccessiblePaneView, // needs to be displayed. }; diff --git a/patch/patches/chrome_utility_client.patch b/patch/patches/chrome_utility_client.patch index cc04b5953..5e4b875f2 100644 --- a/patch/patches/chrome_utility_client.patch +++ b/patch/patches/chrome_utility_client.patch @@ -1,5 +1,5 @@ diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc -index 0d7e6405b1a23..123ae4af7ec69 100644 +index c55bfb810c950..2137956d18b19 100644 --- chrome/utility/chrome_content_utility_client.cc +++ chrome/utility/chrome_content_utility_client.cc @@ -13,6 +13,7 @@ @@ -19,4 +19,4 @@ index 0d7e6405b1a23..123ae4af7ec69 100644 + !cef::IsAlloyRuntimeEnabled()) { // The HeapProfilerController should have been created in // ChromeMainDelegate::PostEarlyInitialization. - DCHECK_NE(HeapProfilerController::GetProfilingEnabled(), + using HeapProfilerController = heap_profiling::HeapProfilerController; diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 03ebe1606..1e4504741 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,8 +1,8 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index ae9c0a5fe7c28..b50e36ee29ad2 100644 +index 596612c8e9757..af6b9f8e0b11f 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h -@@ -100,7 +100,7 @@ bool ApplyUserAgentMetadataOverrides( +@@ -101,7 +101,7 @@ bool ApplyUserAgentMetadataOverrides( FrameTreeNode* frame_tree_node, absl::optional* override_out); @@ -12,7 +12,7 @@ index ae9c0a5fe7c28..b50e36ee29ad2 100644 bool is_navigation, bool is_download, diff --git content/browser/renderer_host/input/mouse_wheel_phase_handler.h content/browser/renderer_host/input/mouse_wheel_phase_handler.h -index 3d8e22b048f58..4a41f15ce258c 100644 +index d69f9d4641613..e88aaf8617c52 100644 --- content/browser/renderer_host/input/mouse_wheel_phase_handler.h +++ content/browser/renderer_host/input/mouse_wheel_phase_handler.h @@ -9,6 +9,7 @@ @@ -33,7 +33,7 @@ index 3d8e22b048f58..4a41f15ce258c 100644 MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view); diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h -index 3f0f719a192db..5fb3754cced7e 100644 +index c48c5c949621f..7b9194ba91514 100644 --- content/browser/renderer_host/input/synthetic_gesture_target_base.h +++ content/browser/renderer_host/input/synthetic_gesture_target_base.h @@ -9,6 +9,7 @@ @@ -55,7 +55,7 @@ index 3f0f719a192db..5fb3754cced7e 100644 explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host); diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h -index 47eb7528594fc..dbb486a323c1c 100644 +index 97c7dc7c25000..63c42610bfd9c 100644 --- content/common/content_switches_internal.h +++ content/common/content_switches_internal.h @@ -17,7 +17,7 @@ namespace content { @@ -68,7 +68,7 @@ index 47eb7528594fc..dbb486a323c1c 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 7a0d95725d295..99fac79e105aa 100644 +index 33b07692dee48..733f15342f321 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -32,6 +32,7 @@ component("controller") { @@ -89,7 +89,7 @@ index 7a0d95725d295..99fac79e105aa 100644 if (is_linux || is_chromeos) { diff --git ui/events/keycodes/BUILD.gn ui/events/keycodes/BUILD.gn -index c7fe1117512e5..44af6b52db4b4 100644 +index 9cdd599f0d739..23d1ff5cc30fc 100644 --- ui/events/keycodes/BUILD.gn +++ ui/events/keycodes/BUILD.gn @@ -19,6 +19,8 @@ source_set("xkb") { @@ -102,7 +102,7 @@ index c7fe1117512e5..44af6b52db4b4 100644 "//base", "//build:chromeos_buildflags", diff --git ui/events/keycodes/keyboard_code_conversion_xkb.h ui/events/keycodes/keyboard_code_conversion_xkb.h -index e1fefa4cead9e..8213402ff263d 100644 +index 5693e3a1c4bc4..88c0cc6d59098 100644 --- ui/events/keycodes/keyboard_code_conversion_xkb.h +++ ui/events/keycodes/keyboard_code_conversion_xkb.h @@ -9,6 +9,7 @@ diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index 590ea34e7..badfe4946 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index f0961360fe885..1b5103cca7df6 100644 +index 286e99d804cd0..2f431dcab0283 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc @@ -587,7 +587,7 @@ void DevToolsHttpHandler::OnJsonRequest( @@ -12,10 +12,10 @@ index f0961360fe885..1b5103cca7df6 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 4f8967e57bbc3..281af1ce0c1cd 100644 +index cbadbda605709..048c88486ce06 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -718,6 +718,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -716,6 +716,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); @@ -34,10 +34,10 @@ index 4f8967e57bbc3..281af1ce0c1cd 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 1958ddbba66ae..d5ffabfedbdd9 100644 +index 804a179c88580..c889d833f97c6 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -939,7 +939,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -957,7 +957,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -46,7 +46,7 @@ index 1958ddbba66ae..d5ffabfedbdd9 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -948,6 +948,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -966,6 +966,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -55,7 +55,7 @@ index 1958ddbba66ae..d5ffabfedbdd9 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index cfb8d9af38d92..5be3ad23793f8 100644 +index 3f276c5394dde..4963c61ef73e6 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -34,6 +34,7 @@ @@ -66,7 +66,7 @@ index cfb8d9af38d92..5be3ad23793f8 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" -@@ -1727,7 +1728,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1751,7 +1752,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 cfb8d9af38d92..5be3ad23793f8 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1933,6 +1934,19 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1957,6 +1958,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -95,7 +95,7 @@ index cfb8d9af38d92..5be3ad23793f8 100644 // Creates an OverlayWindow to be used for video or document // Picture-in-Picture respectively. This window will house the content shown // when in Picture-in-Picture mode. This will return a new OverlayWindow. -@@ -1988,6 +2002,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2012,6 +2026,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -107,7 +107,7 @@ index cfb8d9af38d92..5be3ad23793f8 100644 // on blink::features::kUserAgentReduction. Content may cache this value. virtual std::string GetUserAgent(); diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index a9146ec6c85b3..d90925089cac1 100644 +index 69e9da01fd708..32ed3641566c2 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -92,6 +92,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -120,7 +120,7 @@ index a9146ec6c85b3..d90925089cac1 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -307,6 +310,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -311,6 +314,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -132,10 +132,10 @@ index a9146ec6c85b3..d90925089cac1 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index a15cfb291dea6..4fd0ef1abfabb 100644 +index b3b8ee2ac0c33..1e2a73265fd1f 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -610,6 +610,8 @@ void RenderThreadImpl::Init() { +@@ -594,6 +594,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -145,10 +145,10 @@ index a15cfb291dea6..4fd0ef1abfabb 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 b822b43d0a239..3d0d9f23cbb57 100644 +index 90e08c610ccc0..96e8061b4c966 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1004,6 +1004,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1009,6 +1009,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -165,7 +165,7 @@ index b822b43d0a239..3d0d9f23cbb57 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 9718602c31f86..3f51ee01684e0 100644 +index e607746a2ef60..a2a8fdc7270c7 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h @@ -225,6 +225,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index 2ebe26be2..0f31a2b82 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 34cbeddf6cabd..b62ce8cf3dd9a 100644 +index 58f891fd7af7a..3178a0aeab935 100644 --- content/app/content_main.cc +++ content/app/content_main.cc -@@ -252,11 +252,8 @@ ContentMainParams::~ContentMainParams() = default; +@@ -194,11 +194,8 @@ ContentMainParams::~ContentMainParams() = default; ContentMainParams::ContentMainParams(ContentMainParams&&) = default; ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default; @@ -16,7 +16,7 @@ index 34cbeddf6cabd..b62ce8cf3dd9a 100644 #if BUILDFLAG(IS_CHROMEOS_LACROS) // Lacros is launched with inherited priority. Revert to normal priority // before spawning more processes. -@@ -264,9 +261,6 @@ RunContentProcess(ContentMainParams params, +@@ -206,9 +203,6 @@ RunContentProcess(ContentMainParams params, #endif int exit_code = -1; base::debug::GlobalActivityTracker* tracker = nullptr; @@ -26,7 +26,7 @@ index 34cbeddf6cabd..b62ce8cf3dd9a 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 -@@ -352,12 +346,6 @@ RunContentProcess(ContentMainParams params, +@@ -294,12 +288,6 @@ RunContentProcess(ContentMainParams params, #endif #if BUILDFLAG(IS_MAC) @@ -39,7 +39,7 @@ index 34cbeddf6cabd..b62ce8cf3dd9a 100644 InitializeMac(); #endif -@@ -430,8 +418,18 @@ RunContentProcess(ContentMainParams params, +@@ -339,8 +327,18 @@ RunContentProcess(ContentMainParams params, if (IsSubprocess()) CommonSubprocessInit(); @@ -59,7 +59,7 @@ index 34cbeddf6cabd..b62ce8cf3dd9a 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -443,14 +441,41 @@ RunContentProcess(ContentMainParams params, +@@ -352,14 +350,41 @@ RunContentProcess(ContentMainParams params, } } @@ -105,10 +105,10 @@ index 34cbeddf6cabd..b62ce8cf3dd9a 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index fb4af331fb38b..591768d2297c2 100644 +index 8967bb5066eb6..4705bf64b2dc6 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc -@@ -42,6 +42,7 @@ +@@ -43,6 +43,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 fb4af331fb38b..591768d2297c2 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1237,6 +1238,12 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1262,6 +1263,12 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -130,7 +130,7 @@ index fb4af331fb38b..591768d2297c2 100644 std::unique_ptr ContentMainRunner::Create() { return ContentMainRunnerImpl::Create(); diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h -index 423ad00697648..cd1a9df97eba0 100644 +index 9dda5702a4c97..10a35923f5965 100644 --- content/app/content_main_runner_impl.h +++ content/app/content_main_runner_impl.h @@ -29,7 +29,7 @@ class DiscardableSharedMemoryManager; @@ -152,7 +152,7 @@ index 423ad00697648..cd1a9df97eba0 100644 int RunBrowser(MainFunctionParams main_function_params, bool start_minimal_browser); diff --git content/common/set_process_title.cc content/common/set_process_title.cc -index 06cdab47c8cdf..1f0ea6c7215ca 100644 +index 04a08015aaff6..694f5c43a29e1 100644 --- content/common/set_process_title.cc +++ content/common/set_process_title.cc @@ -54,7 +54,7 @@ void SetProcessTitleFromCommandLine(const char** main_argv) { @@ -165,7 +165,7 @@ index 06cdab47c8cdf..1f0ea6c7215ca 100644 if (main_argv) setproctitle_init(main_argv); diff --git content/public/app/content_main.h content/public/app/content_main.h -index 268b201ab060a..b745f44139a3d 100644 +index b29fe2403753d..0ff8262ca68a5 100644 --- content/public/app/content_main.h +++ content/public/app/content_main.h @@ -93,6 +93,13 @@ struct CONTENT_EXPORT ContentMainParams { diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index e3814e2b2..4f08247ff 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -1,5 +1,5 @@ diff --git chrome/chrome_elf/BUILD.gn chrome/chrome_elf/BUILD.gn -index 9d96774f5f3de..51c1d85178604 100644 +index be50b0ddb3731..44e081a83f628 100644 --- chrome/chrome_elf/BUILD.gn +++ chrome/chrome_elf/BUILD.gn @@ -7,6 +7,7 @@ @@ -47,7 +47,7 @@ index 9d96774f5f3de..51c1d85178604 100644 source_set("dll_hash") { diff --git chrome/chrome_elf/crash/crash_helper.cc chrome/chrome_elf/crash/crash_helper.cc -index c5fe247fc3acd..8ce4bcd78ea9e 100644 +index 27a803784eb9e..a8b033f475cb4 100644 --- chrome/chrome_elf/crash/crash_helper.cc +++ chrome/chrome_elf/crash/crash_helper.cc @@ -11,12 +11,17 @@ @@ -81,7 +81,7 @@ index c5fe247fc3acd..8ce4bcd78ea9e 100644 g_crash_helper_enabled = true; return true; diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc -index cd5ebb2ff81ac..ec5193c3d2a93 100644 +index 6771b4e2d9217..6e57adc08b986 100644 --- chrome/common/crash_keys.cc +++ chrome/common/crash_keys.cc @@ -6,6 +6,8 @@ @@ -121,7 +121,7 @@ index cd5ebb2ff81ac..ec5193c3d2a93 100644 void SetActiveExtensions(const std::set& extensions) { diff --git chrome/common/crash_keys.h chrome/common/crash_keys.h -index e2d53ac83dde0..6ac76e407a748 100644 +index d802db81c88ef..f78029680e366 100644 --- chrome/common/crash_keys.h +++ chrome/common/crash_keys.h @@ -16,6 +16,10 @@ class CommandLine; @@ -136,7 +136,7 @@ index e2d53ac83dde0..6ac76e407a748 100644 // on the given |command_line|. void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); diff --git components/crash/core/app/crash_reporter_client.cc components/crash/core/app/crash_reporter_client.cc -index 463f92a6e5470..99e70307f180e 100644 +index 284dd099122df..c09c614c11283 100644 --- components/crash/core/app/crash_reporter_client.cc +++ components/crash/core/app/crash_reporter_client.cc @@ -93,7 +93,7 @@ bool CrashReporterClient::GetShouldDumpLargerDumps() { @@ -204,7 +204,7 @@ index 463f92a6e5470..99e70307f180e 100644 - } // namespace crash_reporter diff --git components/crash/core/app/crash_reporter_client.h components/crash/core/app/crash_reporter_client.h -index 2532e99f00b39..c39256296c50d 100644 +index 9f8f20dfa6506..5d42f6fc1b003 100644 --- components/crash/core/app/crash_reporter_client.h +++ components/crash/core/app/crash_reporter_client.h @@ -5,7 +5,9 @@ @@ -264,7 +264,7 @@ index 2532e99f00b39..c39256296c50d 100644 } // namespace crash_reporter diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc -index 8c0ae200194a2..22ceb55182640 100644 +index afa205b987b5b..6a959deee9d4a 100644 --- components/crash/core/app/crashpad.cc +++ components/crash/core/app/crashpad.cc @@ -131,7 +131,8 @@ bool InitializeCrashpadImpl(bool initial_client, @@ -278,7 +278,7 @@ index 8c0ae200194a2..22ceb55182640 100644 ->set_system_crash_reporter_forwarding(crashpad::TriState::kDisabled); } diff --git components/crash/core/app/crashpad_linux.cc components/crash/core/app/crashpad_linux.cc -index a80a792f1cb2c..e9676d786a0f5 100644 +index 99efa6b245b99..008eb397332c2 100644 --- components/crash/core/app/crashpad_linux.cc +++ components/crash/core/app/crashpad_linux.cc @@ -23,6 +23,7 @@ @@ -351,7 +351,7 @@ index a80a792f1cb2c..e9676d786a0f5 100644 annotations, arguments, false, false)); } else { diff --git components/crash/core/app/crashpad_mac.mm components/crash/core/app/crashpad_mac.mm -index dc041c43371fd..1d060ae55c586 100644 +index cab2c95eee53e..06e6f61ebccb1 100644 --- components/crash/core/app/crashpad_mac.mm +++ components/crash/core/app/crashpad_mac.mm @@ -16,11 +16,14 @@ @@ -454,7 +454,7 @@ index dc041c43371fd..1d060ae55c586 100644 handler_path, *database_path, metrics_path, url, GetProcessSimpleAnnotations(), arguments, true, false); diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc -index ae8801a7fc877..361817cbf506d 100644 +index 9ab5fb1c82275..740014c1119bd 100644 --- components/crash/core/app/crashpad_win.cc +++ components/crash/core/app/crashpad_win.cc @@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations( diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 4287dc7d2..4967cca3a 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -1,5 +1,5 @@ diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc -index 3e92f06c8b3b4..74b4bf290dd0c 100644 +index 077694f541d57..928a520485414 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.cc +++ third_party/crashpad/crashpad/client/prune_crash_reports.cc @@ -75,13 +75,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database, @@ -26,7 +26,7 @@ index 3e92f06c8b3b4..74b4bf290dd0c 100644 static const time_t kSecondsInDay = 60 * 60 * 24; diff --git third_party/crashpad/crashpad/client/prune_crash_reports.h third_party/crashpad/crashpad/client/prune_crash_reports.h -index f121a2b07cdbd..b2e9bedac39d3 100644 +index b362e0aadbadd..1588232a6e4d4 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.h +++ third_party/crashpad/crashpad/client/prune_crash_reports.h @@ -58,7 +58,8 @@ class PruneCondition { @@ -40,7 +40,7 @@ index f121a2b07cdbd..b2e9bedac39d3 100644 virtual ~PruneCondition() {} diff --git third_party/crashpad/crashpad/client/settings.cc third_party/crashpad/crashpad/client/settings.cc -index eef24f71495fd..d3a273d369097 100644 +index 68fae16afc4ec..e3004425e13cb 100644 --- third_party/crashpad/crashpad/client/settings.cc +++ third_party/crashpad/crashpad/client/settings.cc @@ -116,7 +116,7 @@ void ScopedLockedFileHandleTraits::Free(FileHandle handle) { @@ -130,7 +130,7 @@ index eef24f71495fd..d3a273d369097 100644 Settings::ScopedLockedFileHandle Settings::MakeScopedLockedFileHandle( FileHandle file, diff --git third_party/crashpad/crashpad/client/settings.h third_party/crashpad/crashpad/client/settings.h -index e4a5cedc43854..56becc7d57530 100644 +index 2b27474a683e9..7b5a89cea7f74 100644 --- third_party/crashpad/crashpad/client/settings.h +++ third_party/crashpad/crashpad/client/settings.h @@ -128,6 +128,11 @@ class Settings { @@ -146,7 +146,7 @@ index e4a5cedc43854..56becc7d57530 100644 struct Data; diff --git third_party/crashpad/crashpad/handler/BUILD.gn third_party/crashpad/crashpad/handler/BUILD.gn -index e79f4719b3dd0..22a20aede8100 100644 +index e5d488e26c170..08d7c35b7cc5c 100644 --- third_party/crashpad/crashpad/handler/BUILD.gn +++ third_party/crashpad/crashpad/handler/BUILD.gn @@ -12,6 +12,7 @@ @@ -184,10 +184,10 @@ index e79f4719b3dd0..22a20aede8100 100644 if (crashpad_is_win) { diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -index 4d1548dbf88d8..59e41b79c5de9 100644 +index 5bd2889eda975..bf3ff4bfcf5c8 100644 --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc +++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -@@ -269,6 +269,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( +@@ -297,6 +297,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( if (minidump_process_snapshot.Initialize(reader)) { parameters = BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot); @@ -197,18 +197,18 @@ index 4d1548dbf88d8..59e41b79c5de9 100644 if (!reader->SeekSet(start_offset)) { diff --git third_party/crashpad/crashpad/handler/crash_report_upload_thread.h third_party/crashpad/crashpad/handler/crash_report_upload_thread.h -index 2af958d7da9e5..6a67185a668af 100644 +index 22bb26e31893b..87c80604e5f7a 100644 --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.h +++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.h -@@ -15,6 +15,7 @@ - #ifndef CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ +@@ -16,6 +16,7 @@ #define CRASHPAD_HANDLER_CRASH_REPORT_UPLOAD_THREAD_H_ + #include +#include #include #include #include -@@ -111,7 +112,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, +@@ -128,7 +129,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, //! \return `true` if the thread is running, `false` if it is not. bool is_running() const { return thread_.is_running(); } @@ -217,7 +217,7 @@ index 2af958d7da9e5..6a67185a668af 100644 //! \brief The result code from UploadReport(). enum class UploadResult { //! \brief The crash report was uploaded successfully. -@@ -139,7 +140,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, +@@ -156,7 +157,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, //! object was constructed with \a watch_pending_reports, it will also scan //! the crash report database for other pending reports, and process those as //! well. @@ -226,7 +226,7 @@ index 2af958d7da9e5..6a67185a668af 100644 //! \brief Processes a single pending report from the database. //! -@@ -153,7 +154,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, +@@ -170,7 +171,7 @@ class CrashReportUploadThread : public WorkerThread::Delegate, //! remain in the “pending” state. If the upload fails and no more retries are //! desired, or report upload is disabled, it will be marked as “completed” in //! the database without ever having been uploaded. @@ -235,7 +235,7 @@ index 2af958d7da9e5..6a67185a668af 100644 //! \brief Attempts to upload a crash report. //! -@@ -170,6 +171,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate, +@@ -187,6 +188,11 @@ class CrashReportUploadThread : public WorkerThread::Delegate, UploadResult UploadReport(const CrashReportDatabase::UploadReport* report, std::string* response_body); @@ -248,7 +248,7 @@ index 2af958d7da9e5..6a67185a668af 100644 //! \brief Calls ProcessPendingReports() in response to ReportPending() having //! been called on any thread, as well as periodically on a timer. diff --git third_party/crashpad/crashpad/handler/handler_main.cc third_party/crashpad/crashpad/handler/handler_main.cc -index c6ef76933735f..5fa38c40e2e96 100644 +index b7ba6b14bb9b3..0567343c99325 100644 --- third_party/crashpad/crashpad/handler/handler_main.cc +++ third_party/crashpad/crashpad/handler/handler_main.cc @@ -39,6 +39,7 @@ @@ -328,22 +328,28 @@ index c6ef76933735f..5fa38c40e2e96 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS) case kOptionUseCrosCrashReporter: { options.use_cros_crash_reporter = true; -@@ -1028,8 +1063,14 @@ int HandlerMain(int argc, +@@ -1028,11 +1063,20 @@ int HandlerMain(int argc, upload_thread_options.upload_gzip = options.upload_gzip; upload_thread_options.watch_pending_reports = options.periodic_tasks; +#if BUILDFLAG(ENABLE_CEF) + upload_thread.Reset(new CefCrashReportUploadThread( -+ database.get(), options.url, upload_thread_options, ++ database.get(), ++ options.url, ++ upload_thread_options, ++ CrashReportUploadThread::ProcessPendingReportsObservationCallback(), + options.max_uploads)); +#else upload_thread.Reset(new CrashReportUploadThread( - database.get(), options.url, upload_thread_options)); + database.get(), + options.url, + upload_thread_options, + CrashReportUploadThread::ProcessPendingReportsObservationCallback())); +#endif upload_thread.Get()->Start(); } -@@ -1100,7 +1141,8 @@ int HandlerMain(int argc, +@@ -1103,7 +1147,8 @@ int HandlerMain(int argc, ScopedStoppable prune_thread; if (options.periodic_tasks) { prune_thread.Reset(new PruneCrashReportThread( diff --git a/patch/patches/embedder_product_override.patch b/patch/patches/embedder_product_override.patch index d69355829..f66a63eee 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 97ddfb060d5ab..499c44b682e4c 100644 +index 2c5b4b4a85536..900e8e4735c76 100644 --- components/embedder_support/user_agent_utils.cc +++ components/embedder_support/user_agent_utils.cc @@ -15,6 +15,7 @@ diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index f7aa35351..74f313c49 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc -index b2095ffc3fc11..371d5030de6e0 100644 +index cead7cfa14bae..24142c2e4896f 100644 --- chrome/browser/extensions/api/streams_private/streams_private_api.cc +++ chrome/browser/extensions/api/streams_private/streams_private_api.cc @@ -6,6 +6,7 @@ @@ -60,10 +60,10 @@ index b2095ffc3fc11..371d5030de6e0 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 04b9beb8c3fc2..7e4d3e31522c0 100644 +index 53ae169ef8bbc..a4c20164ba2ae 100644 --- extensions/browser/extension_host.cc +++ extensions/browser/extension_host.cc -@@ -59,11 +59,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, +@@ -60,11 +60,12 @@ ExtensionHost::ExtensionHost(const Extension* extension, host_type == mojom::ViewType::kOffscreenDocument || host_type == mojom::ViewType::kExtensionDialog || host_type == mojom::ViewType::kExtensionPopup); @@ -79,7 +79,7 @@ index 04b9beb8c3fc2..7e4d3e31522c0 100644 main_frame_host_ = host_contents_->GetPrimaryMainFrame(); // Listen for when an extension is unloaded from the same profile, as it may -@@ -78,6 +79,44 @@ ExtensionHost::ExtensionHost(const Extension* extension, +@@ -79,6 +80,44 @@ ExtensionHost::ExtensionHost(const Extension* extension, ExtensionHostRegistry::Get(browser_context_)->ExtensionHostCreated(this); } @@ -125,7 +125,7 @@ index 04b9beb8c3fc2..7e4d3e31522c0 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index 35f6735afb66a..40401322681cf 100644 +index fd08f312145a5..1440a3e8246f9 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h @@ -56,6 +56,12 @@ class ExtensionHost : public DeferredStartRenderHost, @@ -161,7 +161,7 @@ index 35f6735afb66a..40401322681cf 100644 // A pointer to the current or speculative main frame in `host_contents_`. We // can't access this frame through the `host_contents_` directly as it does diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index 50105246ef3ab..ae05ce09f0f8e 100644 +index 7465d1831d9bc..a4bcf0c5527de 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -31,6 +31,7 @@ @@ -180,7 +180,7 @@ index 50105246ef3ab..ae05ce09f0f8e 100644 class ExtensionHostDelegate; class ExtensionSet; class ExtensionSystem; -@@ -220,6 +222,14 @@ class ExtensionsBrowserClient { +@@ -248,6 +250,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -196,7 +196,7 @@ index 50105246ef3ab..ae05ce09f0f8e 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 edf33b204d669..694bff911b4b9 100644 +index 1ada4dfbdeca8..0720ce6014098 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc @@ -379,9 +379,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, diff --git a/patch/patches/font_family_cache_1501.patch b/patch/patches/font_family_cache_1501.patch index e3edbab34..a853154c7 100644 --- a/patch/patches/font_family_cache_1501.patch +++ b/patch/patches/font_family_cache_1501.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/font_family_cache.h chrome/browser/font_family_cache.h -index 7235413382341..38490e32f7b91 100644 +index d65aae32eb918..433dded32daf6 100644 --- chrome/browser/font_family_cache.h +++ chrome/browser/font_family_cache.h @@ -19,6 +19,8 @@ class Profile; diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index c6ff1fb79..b82075b23 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,5 +1,5 @@ diff --git .gn .gn -index 7b9768eb315ef..8c3ab141a18c6 100644 +index 55f5ee19f13e4..55ad3bccc3ebd 100644 --- .gn +++ .gn @@ -155,6 +155,8 @@ exec_script_whitelist = @@ -12,7 +12,7 @@ index 7b9768eb315ef..8c3ab141a18c6 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 645819d78ca85..940c712bf2d99 100644 +index 710257cbb808c..fb38b7f91890c 100644 --- BUILD.gn +++ BUILD.gn @@ -17,6 +17,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -23,7 +23,7 @@ index 645819d78ca85..940c712bf2d99 100644 import("//chrome/browser/buildflags.gni") import("//components/nacl/features.gni") import("//device/vr/buildflags/buildflags.gni") -@@ -108,6 +109,10 @@ group("gn_all") { +@@ -114,6 +115,10 @@ group("gn_all") { deps += [ "//third_party/abseil-cpp:absl_tests" ] } @@ -35,7 +35,7 @@ index 645819d78ca85..940c712bf2d99 100644 deps += [ ":webui_closure_compile" ] } diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni -index 982fbe8d3f0d0..e757be4688f10 100644 +index d9024468296e7..11bfae65b7b02 100644 --- build/config/win/visual_studio_version.gni +++ build/config/win/visual_studio_version.gni @@ -12,9 +12,8 @@ declare_args() { @@ -67,7 +67,7 @@ index 982fbe8d3f0d0..e757be4688f10 100644 + "studio path") } diff --git chrome/app/framework.order chrome/app/framework.order -index 839144aa1e9bd..29c8ab32398a7 100644 +index 1d6be612da8d4..c8ea70f2f256d 100644 --- chrome/app/framework.order +++ chrome/app/framework.order @@ -28,3 +28,8 @@ _ChromeMain @@ -80,7 +80,7 @@ index 839144aa1e9bd..29c8ab32398a7 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 2965af4b19f95..a3cf3e251b209 100644 +index 1d943a762ccd8..3c659b1ca21a7 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -103,7 +103,7 @@ index 2965af4b19f95..a3cf3e251b209 100644 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] deps += [ "//extensions:extensions_browser_resources" ] diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni -index 936a5422f92fa..5743f4a03aa4f 100644 +index 4f67dd86c1f26..a0d92db77c6ce 100644 --- chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") @@ -126,7 +126,7 @@ index 936a5422f92fa..5743f4a03aa4f 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 7edb8b094375d..01dc67ab1c26f 100644 +index 6b0c60f44dc94..bb514108fe703 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -6,6 +6,7 @@ import("//build/config/compiler/compiler.gni") @@ -153,7 +153,7 @@ index 7edb8b094375d..01dc67ab1c26f 100644 outputs = [ # See also chrome.packed.7z conditionally added below. diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni -index 18792c9891b19..6388cc57c578b 100644 +index a60843bab981e..44b9e98f2eb89 100644 --- tools/grit/grit_args.gni +++ tools/grit/grit_args.gni @@ -5,6 +5,7 @@ @@ -164,7 +164,7 @@ index 18792c9891b19..6388cc57c578b 100644 import("//build/config/ui.gni") shared_intermediate_dir = rebase_path(root_gen_dir, root_build_dir) -@@ -35,6 +36,8 @@ _grit_defines = [ +@@ -36,6 +37,8 @@ _grit_defines = [ # Mac and iOS want Title Case strings. "use_titlecase=${is_apple}", diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index f8295f8bf..47e672073 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 d9ae17943b8fc..eda082a3c5ea3 100644 +index 6500444349ead..ee37ee13dc062 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -987,6 +987,15 @@ +@@ -1026,6 +1026,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/libxml_visibility.patch b/patch/patches/libxml_visibility.patch index 5daf0aeac..c81cb5540 100644 --- a/patch/patches/libxml_visibility.patch +++ b/patch/patches/libxml_visibility.patch @@ -1,5 +1,5 @@ diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn -index f408123aeb7f9..b7380e1d12eab 100644 +index 03d14f984420c..54dad01160a51 100644 --- third_party/libxml/BUILD.gn +++ third_party/libxml/BUILD.gn @@ -141,6 +141,7 @@ static_library("libxml") { diff --git a/patch/patches/linux_arm_1292951.patch b/patch/patches/linux_arm_1292951.patch deleted file mode 100644 index 1c3a9cd37..000000000 --- a/patch/patches/linux_arm_1292951.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git linux_syscall_support.h linux_syscall_support.h -index e4e816f..5ea1295 100644 ---- linux_syscall_support.h -+++ linux_syscall_support.h -@@ -4842,7 +4842,7 @@ struct kernel_statfs { - unsigned, o2) - LSS_INLINE _syscall5(ssize_t, _pwrite64, int, f, - const void *, b, size_t, c, unsigned, o1, -- long, o2) -+ unsigned, o2) - LSS_INLINE _syscall4(int, _readahead, int, f, - unsigned, o1, unsigned, o2, size_t, c) - #endif diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index b15fc5717..22a58ed11 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,5 +1,5 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index 16d838b710d4f..206d29a01ffb9 100644 +index dd5ccfc0bdc2e..b7e89eabbd05f 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc @@ -172,7 +172,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( @@ -12,7 +12,7 @@ index 16d838b710d4f..206d29a01ffb9 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 e79a6e0b31091..9626ec1b9a922 100644 +index 51af32dc6bc72..0ee340e96cb5b 100644 --- sandbox/linux/suid/client/setuid_sandbox_host.cc +++ sandbox/linux/suid/client/setuid_sandbox_host.cc @@ -119,7 +119,7 @@ bool SetuidSandboxHost::IsDisabledViaEnvironment() { @@ -25,7 +25,7 @@ index e79a6e0b31091..9626ec1b9a922 100644 if (base::PathExists(sandbox_candidate)) sandbox_binary = sandbox_candidate; diff --git ui/ozone/common/egl_util.cc ui/ozone/common/egl_util.cc -index 75c59f935976e..c0b7601ceb987 100644 +index 021bcad8c3084..a37406d408718 100644 --- ui/ozone/common/egl_util.cc +++ ui/ozone/common/egl_util.cc @@ -127,7 +127,7 @@ bool LoadDefaultEGLGLES2Bindings( diff --git a/patch/patches/linux_atk_1123214.patch b/patch/patches/linux_atk_1123214.patch index 6fc4c65fb..a973758e0 100644 --- a/patch/patches/linux_atk_1123214.patch +++ b/patch/patches/linux_atk_1123214.patch @@ -1,5 +1,5 @@ diff --git build/config/linux/atk/BUILD.gn build/config/linux/atk/BUILD.gn -index 647bef697ec8f..64708b91d273f 100644 +index 239c3870a149a..9f5a34fc846bd 100644 --- build/config/linux/atk/BUILD.gn +++ build/config/linux/atk/BUILD.gn @@ -11,7 +11,7 @@ import("//build/config/ui.gni") @@ -12,7 +12,7 @@ index 647bef697ec8f..64708b91d273f 100644 if (use_atk) { assert(use_glib, "use_atk=true requires that use_glib=true") diff --git build/config/linux/atspi2/BUILD.gn build/config/linux/atspi2/BUILD.gn -index d103d09a39a51..e032b7f357e85 100644 +index 51b6d33aab3c2..970d454e6b539 100644 --- build/config/linux/atspi2/BUILD.gn +++ build/config/linux/atspi2/BUILD.gn @@ -6,7 +6,7 @@ import("//build/config/linux/pkg_config.gni") diff --git a/patch/patches/linux_bluetooth_1319006.patch b/patch/patches/linux_bluetooth_1319006.patch index 55b5ed5df..ad4239dda 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 62f940e04ad7a..48a5a81bf645d 100644 +index 1ca290c63575e..ea33e05dd41eb 100644 --- device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn @@ -45,13 +45,6 @@ source_set("deprecated_experimental_mojo") { diff --git a/patch/patches/linux_chrome_widevine_3149.patch b/patch/patches/linux_chrome_widevine_3149.patch index 65f801847..33b7d8eef 100644 --- a/patch/patches/linux_chrome_widevine_3149.patch +++ b/patch/patches/linux_chrome_widevine_3149.patch @@ -1,5 +1,5 @@ diff --git chrome/common/media/component_widevine_cdm_hint_file_linux.cc chrome/common/media/component_widevine_cdm_hint_file_linux.cc -index 44a89a2e7f6e4..447c1a635eadd 100644 +index 85a55fdd22a4f..0b935334136cb 100644 --- chrome/common/media/component_widevine_cdm_hint_file_linux.cc +++ chrome/common/media/component_widevine_cdm_hint_file_linux.cc @@ -16,6 +16,7 @@ diff --git a/patch/patches/linux_printing_context.patch b/patch/patches/linux_printing_context.patch index f2ca38a9b..0741e5c8f 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 c8673eaee484b..d7026cd38df11 100644 +index 83211e80d8270..9ce9b37375762 100644 --- printing/printing_context_linux.cc +++ printing/printing_context_linux.cc @@ -25,6 +25,12 @@ @@ -80,7 +80,7 @@ index c8673eaee484b..d7026cd38df11 100644 return mojom::ResultCode::kSuccess; } diff --git printing/printing_context_linux.h printing/printing_context_linux.h -index 0e2f451ac050f..3faa2a3dff79d 100644 +index 6fb35248ec459..3be9c29c7ebf9 100644 --- printing/printing_context_linux.h +++ printing/printing_context_linux.h @@ -16,6 +16,20 @@ namespace printing { @@ -105,7 +105,7 @@ index 0e2f451ac050f..3faa2a3dff79d 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 a06eae4ab3217..43851307c531f 100644 +index 33a147bd79fd1..01f573e30395e 100644 --- tools/v8_context_snapshot/BUILD.gn +++ tools/v8_context_snapshot/BUILD.gn @@ -106,6 +106,7 @@ if (use_v8_context_snapshot) { @@ -117,25 +117,25 @@ index a06eae4ab3217..43851307c531f 100644 "//third_party/blink/public:blink", "//v8", diff --git ui/linux/linux_ui.cc ui/linux/linux_ui.cc -index ec285b1637e57..1f9a4556c4a03 100644 +index fc0ab170837bf..3d8c437ee4733 100644 --- ui/linux/linux_ui.cc +++ ui/linux/linux_ui.cc -@@ -28,6 +28,10 @@ namespace ui { +@@ -23,6 +23,10 @@ LinuxUi* g_linux_ui = nullptr; + // static - std::unique_ptr LinuxUi::SetInstance( - std::unique_ptr instance) { + LinuxUi* LinuxUi::SetInstance(LinuxUi* instance) { +#if BUILDFLAG(IS_LINUX) && BUILDFLAG(ENABLE_PRINTING) -+ printing::PrintingContextLinuxDelegate::SetInstance(instance.get()); ++ printing::PrintingContextLinuxDelegate::SetInstance(instance); +#endif + - return std::exchange(GetLinuxUiInstance(), std::move(instance)); + return std::exchange(g_linux_ui, instance); } diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h -index dee97740309e2..1e034b5e2e9ec 100644 +index 4c5e4e19fc94c..2bfcd7d11ea21 100644 --- ui/linux/linux_ui.h +++ ui/linux/linux_ui.h -@@ -18,6 +18,10 @@ +@@ -17,6 +17,10 @@ #include "build/chromecast_buildflags.h" #include "printing/buildflags/buildflags.h" @@ -146,7 +146,7 @@ index dee97740309e2..1e034b5e2e9ec 100644 // The main entrypoint into Linux toolkit specific code. GTK/QT code should only // be executed behind this interface. -@@ -59,7 +63,11 @@ class WindowFrameProvider; +@@ -61,7 +65,11 @@ class WindowFrameProvider; // Adapter class with targets to render like different toolkits. Set by any // project that wants to do linux desktop native rendering. @@ -157,9 +157,9 @@ index dee97740309e2..1e034b5e2e9ec 100644 +#endif + { public: - using UseSystemThemeCallback = - base::RepeatingCallback; -@@ -180,14 +188,6 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi { + LinuxUi(const LinuxUi&) = delete; + LinuxUi& operator=(const LinuxUi&) = delete; +@@ -111,14 +119,6 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUi { // Returns a map of KeyboardEvent code to KeyboardEvent key values. virtual base::flat_map GetKeyboardLayoutMap() = 0; diff --git a/patch/patches/mac_event_observer_2539.patch b/patch/patches/mac_event_observer_2539.patch index dc3832a7f..14dfb9f92 100644 --- a/patch/patches/mac_event_observer_2539.patch +++ b/patch/patches/mac_event_observer_2539.patch @@ -1,5 +1,5 @@ diff --git content/browser/scheduler/responsiveness/native_event_observer_mac.mm content/browser/scheduler/responsiveness/native_event_observer_mac.mm -index 7cb3238e97edb..ae800739b6863 100644 +index 4aecdd08b7de4..4f5e588a37865 100644 --- content/browser/scheduler/responsiveness/native_event_observer_mac.mm +++ content/browser/scheduler/responsiveness/native_event_observer_mac.mm @@ -12,13 +12,15 @@ namespace content { diff --git a/patch/patches/mac_fling_scheduler_2540.patch b/patch/patches/mac_fling_scheduler_2540.patch index cfd64e2b1..fa98a94b2 100644 --- a/patch/patches/mac_fling_scheduler_2540.patch +++ b/patch/patches/mac_fling_scheduler_2540.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/input/fling_scheduler_mac.mm content/browser/renderer_host/input/fling_scheduler_mac.mm -index f10c5d161dd13..92a751dd984e5 100644 +index 50ed39df38044..7839bdaf7b7e5 100644 --- content/browser/renderer_host/input/fling_scheduler_mac.mm +++ content/browser/renderer_host/input/fling_scheduler_mac.mm @@ -26,6 +26,10 @@ ui::Compositor* FlingSchedulerMac::GetCompositor() { diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index 2db027c1e..90e11ca94 100644 --- a/patch/patches/mac_gpu.patch +++ b/patch/patches/mac_gpu.patch @@ -1,5 +1,5 @@ diff --git ui/gl/init/gl_initializer_mac.cc ui/gl/init/gl_initializer_mac.cc -index bc29406755e34..e4c077621ff6b 100644 +index 380f2935952d6..dcee9c5aeb849 100644 --- ui/gl/init/gl_initializer_mac.cc +++ ui/gl/init/gl_initializer_mac.cc @@ -46,11 +46,8 @@ bool InitializeOneOffForSandbox() { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 7e8bd1f02..0032aa7a2 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 1ed9e277cd967..6b7eed9fa8fd6 100644 +index 646dcfb16bf03..83a3b61d93d5a 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -30,7 +30,7 @@ index 1ed9e277cd967..6b7eed9fa8fd6 100644 } if (has_msg) diff --git base/task/current_thread.cc base/task/current_thread.cc -index d3a89a8496171..2db4706f22ec8 100644 +index 4382f7258fd4e..d28b1e3de31a5 100644 --- base/task/current_thread.cc +++ base/task/current_thread.cc @@ -49,6 +49,8 @@ void CurrentThread::AddDestructionObserver( @@ -43,7 +43,7 @@ index d3a89a8496171..2db4706f22ec8 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/task/current_thread.h base/task/current_thread.h -index 485601662485a..9e1464c33d8d4 100644 +index 0375681bdbc2a..fad14b9ade013 100644 --- base/task/current_thread.h +++ base/task/current_thread.h @@ -132,6 +132,12 @@ class BASE_EXPORT CurrentThread { diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 1c4d06ad1..15b0bd410 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 ac283df047fc4..c68e14df045f0 100644 +index 416ea2f87d9a6..c41d34fa604e6 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 73b00d006..328218f03 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -1,5 +1,5 @@ diff --git content/browser/web_contents/web_contents_view.h content/browser/web_contents/web_contents_view.h -index c046e7f8ba347..e7b627c573e48 100644 +index 031dd5eeaef8e..25c2f0e42e22b 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -25,7 +25,7 @@ struct DropData; @@ -12,7 +12,7 @@ index c046e7f8ba347..e7b627c573e48 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 75a2534e3be71..4ae51c0f7d5cf 100644 +index 6e0cb46a6b913..2c10a5f9acfb4 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 @@ -225,6 +225,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -48,7 +48,7 @@ index 75a2534e3be71..4ae51c0f7d5cf 100644 WebContents* source, const content::OpenURLParams& params) { diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -index 26dc86a7534d9..7fd27ebf28dd2 100644 +index 33bb494fb68d1..9236cf3fd98bf 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h @@ -142,6 +142,7 @@ class MimeHandlerViewGuest @@ -68,7 +68,7 @@ index 26dc86a7534d9..7fd27ebf28dd2 100644 bool is_embedder_fullscreen_ = false; bool plugin_can_save_ = false; diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h -index 3aaeab0baf51e..4f818abde1c1a 100644 +index 7f59e7925084e..777b8a3cf103a 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest_delegate.h @@ -7,6 +7,8 @@ diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index b31c95301..d1750cfc5 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -1,5 +1,5 @@ diff --git net/base/load_flags_list.h net/base/load_flags_list.h -index 96d1a51ec1078..e8120a818b1f2 100644 +index 38062cfb9329e..14429ff0ee7eb 100644 --- net/base/load_flags_list.h +++ net/base/load_flags_list.h @@ -101,3 +101,6 @@ LOAD_FLAG(RESTRICTED_PREFETCH, 1 << 15) @@ -10,10 +10,10 @@ index 96d1a51ec1078..e8120a818b1f2 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 bd336369896d6..58837404660ca 100644 +index 696d21520e076..874954e24bc8c 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1731,7 +1731,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1734,7 +1734,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 bd336369896d6..58837404660ca 100644 bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const { diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc -index 7e02d8c952d22..6251c2e611826 100644 +index 65921550e62db..49acfefd935d5 100644 --- services/network/public/cpp/resource_request.cc +++ services/network/public/cpp/resource_request.cc -@@ -264,7 +264,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const { +@@ -262,7 +262,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 c6418ec72..c40adcec5 100644 --- a/patch/patches/net_test_server_3798752.patch +++ b/patch/patches/net_test_server_3798752.patch @@ -1,5 +1,5 @@ diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc -index ed5b06c6f56ca..9b61bad1097c2 100644 +index cbb2e334028e2..b469705cd0f84 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) { diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index b39ce498f..41cc9f383 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/input/fling_scheduler.cc content/browser/renderer_host/input/fling_scheduler.cc -index c7a4f1f0c3d00..7e6e3b4e56d42 100644 +index 84e5d2a493556..160478790e261 100644 --- content/browser/renderer_host/input/fling_scheduler.cc +++ content/browser/renderer_host/input/fling_scheduler.cc @@ -68,6 +68,9 @@ void FlingScheduler::ProgressFlingOnBeginFrameIfneeded( @@ -13,7 +13,7 @@ index c7a4f1f0c3d00..7e6e3b4e56d42 100644 if (host_->GetView() && host_->GetView()->GetNativeView() && host_->GetView()->GetNativeView()->GetHost() && diff --git content/browser/renderer_host/input/fling_scheduler_base.h content/browser/renderer_host/input/fling_scheduler_base.h -index cc4b13a7b9c67..84f3b9ed7cf49 100644 +index afefe3cd83dee..6668463247644 100644 --- content/browser/renderer_host/input/fling_scheduler_base.h +++ content/browser/renderer_host/input/fling_scheduler_base.h @@ -7,12 +7,23 @@ @@ -41,10 +41,10 @@ index cc4b13a7b9c67..84f3b9ed7cf49 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index 311dd906e497f..79811fef61327 100644 +index c868b13d8e7f9..ac881b5c85f61 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3142,6 +3142,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3170,6 +3170,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,10 +57,10 @@ index 311dd906e497f..79811fef61327 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 527463920c3d2..edb80b612e9f0 100644 +index 8c1133a510ef8..6db0e757a8b2d 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -783,6 +783,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -789,6 +789,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 6928f9190..e68c3937d 100644 --- a/patch/patches/print_preview_123.patch +++ b/patch/patches/print_preview_123.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc -index 6bc746cdfbad1..66bb318e4e9ca 100644 +index a4b81c3c8860a..9b20275b4709c 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -24,6 +24,7 @@ @@ -34,7 +34,7 @@ index 6bc746cdfbad1..66bb318e4e9ca 100644 } diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index 226de9e8e4546..cdedf67c94d01 100644 +index 37d7f35d314cc..7ddd2f44118bf 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 226de9e8e4546..cdedf67c94d01 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 8f4cb7f50dd34..2bca86c637d46 100644 +index cbb6c5925c2ae..f4faa42ca0b04 100644 --- chrome/browser/printing/print_view_manager_base.cc +++ chrome/browser/printing/print_view_manager_base.cc -@@ -600,13 +600,14 @@ void PrintViewManagerBase::UpdatePrintSettings( +@@ -599,13 +599,14 @@ void PrintViewManagerBase::UpdatePrintSettings( job_settings.Set(kSettingRasterizePdfDpi, value); } @@ -66,7 +66,7 @@ index 8f4cb7f50dd34..2bca86c637d46 100644 auto* printer_query_ptr = printer_query.get(); printer_query_ptr->SetSettings( diff --git chrome/browser/printing/print_view_manager_base.h chrome/browser/printing/print_view_manager_base.h -index 871e00c49028c..ac5a5329dd760 100644 +index ffbdbe363d956..9c3a5b9a9814f 100644 --- chrome/browser/printing/print_view_manager_base.h +++ chrome/browser/printing/print_view_manager_base.h @@ -204,9 +204,6 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer { @@ -96,7 +96,7 @@ index 5d1658999d5bb..d1b7b7288c946 100644 $i18n{cancel} diff --git chrome/browser/ui/webui/constrained_web_dialog_ui.cc chrome/browser/ui/webui/constrained_web_dialog_ui.cc -index 7a3fbc44629e6..578422e85320a 100644 +index ff180eb75c935..711b51ed039a5 100644 --- chrome/browser/ui/webui/constrained_web_dialog_ui.cc +++ chrome/browser/ui/webui/constrained_web_dialog_ui.cc @@ -13,6 +13,7 @@ @@ -118,7 +118,7 @@ index 7a3fbc44629e6..578422e85320a 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 2a9cc4d97e4f1..ab37659bcb720 100644 +index 47e46e16ae625..86ebc3488300f 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc @@ -22,6 +22,7 @@ diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index a11c76c75..eba8e11c5 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index f0d4596f0e953..1d4d659b2d785 100644 +index 51bab147b3c35..1774ef9b4abbf 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc @@ -130,6 +130,7 @@ PrintJobWorker::PrintJobWorker(content::GlobalRenderFrameHostId rfh_id) @@ -11,7 +11,7 @@ index f0d4596f0e953..1d4d659b2d785 100644 PrintJobWorker::~PrintJobWorker() { diff --git printing/printing_context.h printing/printing_context.h -index 0e6dd8092f602..4a173fcbc2e89 100644 +index 42095172d1406..8bf48be927d2f 100644 --- printing/printing_context.h +++ printing/printing_context.h @@ -173,6 +173,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext { diff --git a/patch/patches/printing_pdf_3047.patch b/patch/patches/printing_pdf_3047.patch index 3918d3891..18c723a3d 100644 --- a/patch/patches/printing_pdf_3047.patch +++ b/patch/patches/printing_pdf_3047.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/printing/print_view_manager_common.cc chrome/browser/printing/print_view_manager_common.cc -index 3ab701aaad754..4bb32940701c5 100644 +index 06ebb78a547e1..8f470db9167f4 100644 --- chrome/browser/printing/print_view_manager_common.cc +++ chrome/browser/printing/print_view_manager_common.cc @@ -44,6 +44,8 @@ bool StoreFullPagePlugin(content::WebContents** result, @@ -21,7 +21,7 @@ index 3ab701aaad754..4bb32940701c5 100644 content::WebContents* contents, mojo::PendingAssociatedRemote print_renderer, diff --git chrome/browser/printing/print_view_manager_common.h chrome/browser/printing/print_view_manager_common.h -index bf67ddba35b34..7f4dcc216bbb4 100644 +index c8ba345acce57..158baf9a5eda6 100644 --- chrome/browser/printing/print_view_manager_common.h +++ chrome/browser/printing/print_view_manager_common.h @@ -36,6 +36,10 @@ content::RenderFrameHost* GetFrameToPrint(content::WebContents* contents); diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 8d3dde832..f002128fa 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 5c03f1194643c..4902e8c01aae1 100644 +index 54724fac309f7..e785a620aa9fa 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -656,6 +656,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -659,6 +659,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 27eb46d00..3a2d1d7c3 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,5 +1,5 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index 44d03908480cc..1bed9d91076d7 100644 +index d5d087503f018..476b82029a27d 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc @@ -908,6 +908,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) @@ -28,7 +28,7 @@ index 44d03908480cc..1bed9d91076d7 100644 void ResourceBundle::InitSharedInstance(Delegate* delegate) { DCHECK(g_shared_instance_ == nullptr) << "ResourceBundle initialized twice"; diff --git ui/base/resource/resource_bundle.h ui/base/resource/resource_bundle.h -index a03d580f807fd..986665ea70f99 100644 +index 1ea959098a63a..82afff58caf65 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h @@ -216,6 +216,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { diff --git a/patch/patches/runhooks.patch b/patch/patches/runhooks.patch index 1196caa76..4385e33a4 100644 --- a/patch/patches/runhooks.patch +++ b/patch/patches/runhooks.patch @@ -1,5 +1,5 @@ diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index e680ba07e3c01..37d993005566a 100644 +index 112690a7f7ad3..6c65b68b171ab 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py @@ -166,13 +166,17 @@ def _LoadToolchainEnv(cpu, toolchain_root, sdk_dir, target_store): @@ -26,7 +26,7 @@ index e680ba07e3c01..37d993005566a 100644 if (cpu != 'x64'): # x64 is default target CPU thus any other CPU requires a target set diff --git build/vs_toolchain.py build/vs_toolchain.py -index fc2e5e00961ed..566bbc4ba0677 100755 +index 76ef5490c88f9..dd36de8edbf3c 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -107,9 +107,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 2d82d1092..fc7886631 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 9d1301a55acdc..ef1f97f271694 100644 +index 8fe62e794b219..bd83d4bb88ade 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -6,6 +6,7 @@ @@ -10,7 +10,7 @@ index 9d1301a55acdc..ef1f97f271694 100644 #include #include -@@ -713,10 +714,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -721,10 +722,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -27,7 +27,7 @@ index 9d1301a55acdc..ef1f97f271694 100644 } absl::optional RenderWidgetHostViewAura::GetDisplayFeature() { -@@ -2224,6 +2227,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2231,6 +2234,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // This needs to happen only after |window_| has been initialized using // Init(), because it needs to have the layer. window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index ea7a86c81..b9b3e6a59 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 417aee498f300..19f4d5b34c4c7 100644 +index a41ab3c6e50f0..1dd98219869cf 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -9,8 +9,8 @@ index 417aee498f300..19f4d5b34c4c7 100644 +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" - #include "chrome/browser/content_settings/cookie_settings_factory.h" -@@ -758,7 +759,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( + #include "chrome/browser/chrome_content_browser_client.h" +@@ -788,7 +789,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -31,7 +31,7 @@ index 417aee498f300..19f4d5b34c4c7 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -771,7 +784,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -801,7 +814,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,10 +42,10 @@ index 417aee498f300..19f4d5b34c4c7 100644 ::network::mojom::NetworkContextFilePaths::New(); diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index c433232365c93..60e149bafcf68 100644 +index 4c79de32e5f01..9ff92cda4dc3c 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -542,6 +542,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -549,6 +549,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -72,7 +72,7 @@ index c433232365c93..60e149bafcf68 100644 void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { DCHECK(thread_checker_.CalledOnValidThread()); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index fa5e56d60b093..f776bd0cb82eb 100644 +index 0e48488a03aa5..412f09945878d 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h @@ -209,6 +209,8 @@ class NET_EXPORT CookieMonster : public CookieStore { @@ -85,7 +85,7 @@ index fa5e56d60b093..f776bd0cb82eb 100644 // Enables writing session cookies into the cookie database. If this this // method is called, it must be called before first use of the instance diff --git net/cookies/cookie_store.h net/cookies/cookie_store.h -index c143a7381df95..da14e2b0b1c81 100644 +index cf3aac9f8544f..f40de6b160bab 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h @@ -163,6 +163,11 @@ class NET_EXPORT CookieStore { @@ -101,7 +101,7 @@ index c143a7381df95..da14e2b0b1c81 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index 77c0984d364c6..df7ff7d7355b5 100644 +index 955126eed8968..cda1d55350d1e 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc @@ -387,14 +387,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { @@ -123,10 +123,10 @@ index 77c0984d364c6..df7ff7d7355b5 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index f42edc973ece8..4e6f8572dae1e 100644 +index 757059958a1ea..6eeac7e1df7a6 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2380,17 +2380,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2385,17 +2385,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } @@ -157,10 +157,10 @@ index f42edc973ece8..4e6f8572dae1e 100644 trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index d911012bde3ea..07d329823b303 100644 +index ecb6f95f694c0..7a567de87c2b1 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -336,6 +336,9 @@ struct NetworkContextParams { +@@ -341,6 +341,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 1cea1407f..9072297bc 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 ed2ca3323d9bc..8720dfc91c8fb 100644 +index ac917a5bdcdf2..e0b2fa64cb158 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -491,10 +491,6 @@ class LoginHandlerDelegate { +@@ -490,10 +490,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index ed2ca3323d9bc..8720dfc91c8fb 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -546,12 +542,6 @@ void OnAuthRequiredContinuation( +@@ -545,12 +541,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote auth_challenge_responder, base::RepeatingCallback web_contents_getter) { @@ -26,7 +26,7 @@ index ed2ca3323d9bc..8720dfc91c8fb 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, -@@ -2844,8 +2834,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2859,8 +2849,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index ed2ca3323d9bc..8720dfc91c8fb 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2855,9 +2849,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2870,9 +2864,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 944eebfb1..082ce90b5 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -1,5 +1,5 @@ diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 3a3f6e1af5a1e..bbbc69a5c84d3 100644 +index 969b675a84b3b..fc4f63c0d2e79 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc @@ -143,6 +143,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, @@ -14,7 +14,7 @@ index 3a3f6e1af5a1e..bbbc69a5c84d3 100644 if (crashed_overlay_view_ == crashed_overlay_view) return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index 041bcb7c9f4ae..6575739372b5d 100644 +index bd90e13ebfc00..b4d189401da0a 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h @@ -85,6 +85,10 @@ class WEBVIEW_EXPORT WebView : public View, diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index cdf2578ca..dad95b923 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,5 +1,5 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index 1beba57fbb164..448fbcb006e32 100644 +index ae376f6ed4352..98f39fd468961 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc @@ -115,7 +115,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( @@ -13,7 +13,7 @@ index 1beba57fbb164..448fbcb006e32 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 22af8b58056d9..88486bcf6e74b 100644 +index a0caa162ffd0b..e83dd75aca7ae 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition( @@ -36,7 +36,7 @@ index 22af8b58056d9..88486bcf6e74b 100644 std::unique_ptr stats_db; if (use_in_memory_db) { diff --git content/public/browser/storage_partition_config.cc content/public/browser/storage_partition_config.cc -index 160c24ce6e6cc..336aee0b8a0e3 100644 +index 81013d6eb993a..89abfbe7fec6c 100644 --- content/public/browser/storage_partition_config.cc +++ content/public/browser/storage_partition_config.cc @@ -7,6 +7,7 @@ @@ -58,7 +58,7 @@ index 160c24ce6e6cc..336aee0b8a0e3 100644 // static diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index 8abec7e8e4b09..1bac4e476c543 100644 +index af845fb4a872e..10e9fdfb2a15b 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc @@ -562,7 +562,7 @@ bool DatabaseTracker::LazyInit() { diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 3d3db3f6a..0b640ff96 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 be712614ac5be..7d657913c6f83 100644 +index 2f361c5d9e208..e5fd46b61fc64 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -63,6 +63,8 @@ diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index 2231581b9..ca25dd51d 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,5 +1,5 @@ diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc -index d337bee1db15b..1dfc9e77a50aa 100644 +index a49526551138a..643c73d436758 100644 --- ui/base/x/x11_os_exchange_data_provider.cc +++ ui/base/x/x11_os_exchange_data_provider.cc @@ -139,7 +139,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, diff --git a/patch/patches/underlay_1051.patch b/patch/patches/underlay_1051.patch index 634f7d1d7..6087d8e65 100644 --- a/patch/patches/underlay_1051.patch +++ b/patch/patches/underlay_1051.patch @@ -1,5 +1,5 @@ diff --git ui/base/cocoa/underlay_opengl_hosting_window.h ui/base/cocoa/underlay_opengl_hosting_window.h -index ec1c6c972ee8d..9f73342051325 100644 +index a0e5f803e62b2..d59122c483920 100644 --- ui/base/cocoa/underlay_opengl_hosting_window.h +++ ui/base/cocoa/underlay_opengl_hosting_window.h @@ -12,7 +12,7 @@ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index 9714a77bd..acc6e535c 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -1,5 +1,5 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index 016a06e5187ec..4eccdef738f00 100644 +index f1f8f33165a4a..8b07817c654e8 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h @@ -15,8 +15,11 @@ @@ -43,7 +43,7 @@ index 016a06e5187ec..4eccdef738f00 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index 851249f83555f..97f42e6f2687d 100644 +index 67fbf128ea158..230a2adb0af05 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc @@ -671,6 +671,14 @@ void RenderText::SetWhitespaceElision(absl::optional whitespace_elision) { @@ -61,7 +61,7 @@ index 851249f83555f..97f42e6f2687d 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -2001,6 +2009,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -2000,6 +2008,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -82,7 +82,7 @@ index 851249f83555f..97f42e6f2687d 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index d6e7a79fb9d9d..3b43db51102b8 100644 +index 5d9aaef31ecea..a6b47cd468270 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h @@ -347,6 +347,10 @@ class GFX_EXPORT RenderText { @@ -106,7 +106,7 @@ index d6e7a79fb9d9d..3b43db51102b8 100644 } // namespace gfx diff --git ui/views/animation/ink_drop_host_view.h ui/views/animation/ink_drop_host_view.h -index 7de6bdd643ad1..90994f096a0e0 100644 +index ab4ee48e6ecbf..448219fd2e3ee 100644 --- ui/views/animation/ink_drop_host_view.h +++ ui/views/animation/ink_drop_host_view.h @@ -175,6 +175,8 @@ class VIEWS_EXPORT InkDropHost { @@ -119,10 +119,10 @@ index 7de6bdd643ad1..90994f096a0e0 100644 friend class test::InkDropHostTestApi; diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index 2e89db6bd02de..e55d438ace669 100644 +index c9c780e772b69..706e95fb47b47 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -508,6 +508,12 @@ void LabelButton::OnThemeChanged() { +@@ -512,6 +512,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -136,7 +136,7 @@ index 2e89db6bd02de..e55d438ace669 100644 Button::StateChanged(old_state); ResetLabelEnabledColor(); diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h -index 4f173056ba875..7b746c84c63cf 100644 +index 4004c670ba7f6..5d7062efed7c2 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 { @@ -150,7 +150,7 @@ index 4f173056ba875..7b746c84c63cf 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index dacb2199b93a8..4b9a76c643120 100644 +index d7bbcd9496f13..f5a6ac2e40397 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -52,12 +52,29 @@ enum LabelPropertyKey { @@ -183,7 +183,7 @@ index dacb2199b93a8..4b9a76c643120 100644 } // namespace namespace views { -@@ -425,6 +442,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -443,6 +460,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -199,7 +199,7 @@ index dacb2199b93a8..4b9a76c643120 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -729,6 +755,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -747,6 +773,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -217,10 +217,10 @@ index dacb2199b93a8..4b9a76c643120 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index 28c9b4fc4849c..da5a726a9f929 100644 +index b856a1cb83b4f..9551454399d8a 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -234,6 +234,10 @@ class VIEWS_EXPORT Label : public View, +@@ -236,6 +236,10 @@ class VIEWS_EXPORT Label : public View, gfx::ElideBehavior GetElideBehavior() const; void SetElideBehavior(gfx::ElideBehavior elide_behavior); @@ -231,7 +231,7 @@ index 28c9b4fc4849c..da5a726a9f929 100644 // Gets/Sets the tooltip text. Default behavior for a label (single-line) is // to show the full text if it is wider than its bounds. Calling this // overrides the default behavior and lets you set a custom tooltip. To -@@ -491,6 +495,7 @@ class VIEWS_EXPORT Label : public View, +@@ -495,6 +499,7 @@ class VIEWS_EXPORT Label : public View, int max_width_ = 0; // This is used in single-line mode. int max_width_single_line_ = 0; @@ -240,7 +240,7 @@ index 28c9b4fc4849c..da5a726a9f929 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index b46a42d9ee999..d38a11453ef93 100644 +index 9202c2a1fa6d1..956cb370882a7 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc @@ -474,7 +474,8 @@ void MenuController::Run(Widget* parent, @@ -261,7 +261,7 @@ index b46a42d9ee999..d38a11453ef93 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2190,6 +2192,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2198,6 +2200,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 b46a42d9ee999..d38a11453ef93 100644 if (item->GetParentMenuItem()) { params.context = state_.item->GetWidget(); -@@ -2876,8 +2879,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2884,8 +2887,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -284,7 +284,7 @@ index b46a42d9ee999..d38a11453ef93 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2896,8 +2904,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2904,8 +2912,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -297,7 +297,7 @@ index b46a42d9ee999..d38a11453ef93 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 ed374eab8e481..8853e45d32e17 100644 +index da5848241cb5b..05a7f9f0e4932 100644 --- ui/views/controls/menu/menu_controller.h +++ ui/views/controls/menu/menu_controller.h @@ -105,7 +105,9 @@ class VIEWS_EXPORT MenuController @@ -321,7 +321,7 @@ index ed374eab8e481..8853e45d32e17 100644 bool possible_drag_ = false; diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index 7101143c63803..058da34d3499e 100644 +index b8fa1c116ebcd..015f15ed72385 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h @@ -73,6 +73,22 @@ class VIEWS_EXPORT MenuDelegate { @@ -360,7 +360,7 @@ index 7101143c63803..058da34d3499e 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc -index 702391702c399..cc669d448fc20 100644 +index 693ef7fa66575..c3a1e70e8ea72 100644 --- ui/views/controls/menu/menu_host.cc +++ ui/views/controls/menu/menu_host.cc @@ -144,6 +144,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) { @@ -383,7 +383,7 @@ index 702391702c399..cc669d448fc20 100644 #if BUILDFLAG(IS_WIN) diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h -index 9c8c5de34d064..b054688cca148 100644 +index ff34179c3b7fe..3d257e06e3fbb 100644 --- ui/views/controls/menu/menu_host.h +++ ui/views/controls/menu/menu_host.h @@ -54,6 +54,8 @@ class MenuHost : public Widget, public WidgetObserver { @@ -396,10 +396,10 @@ index 9c8c5de34d064..b054688cca148 100644 explicit MenuHost(SubmenuView* submenu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index 854398921a3b9..435790a289d8a 100644 +index c2433154425be..af00acb2bd5b5 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -1094,6 +1094,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1095,6 +1095,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, spilling_rect.set_y(spilling_rect.y() - corner_radius_); spilling_rect.set_height(spilling_rect.height() + corner_radius_); canvas->DrawRoundRect(spilling_rect, corner_radius_, flags); @@ -415,7 +415,7 @@ index 854398921a3b9..435790a289d8a 100644 } else if (paint_as_selected) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1160,6 +1169,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { +@@ -1161,6 +1170,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) { } SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const { @@ -430,7 +430,7 @@ index 854398921a3b9..435790a289d8a 100644 GetMenuController() && GetMenuController()->use_ash_system_ui_layout() ? style::CONTEXT_TOUCH_MENU diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 285e4a829ed6f..327c54778886f 100644 +index 71385398057f6..9bf3f69b1cfd6 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc @@ -4,6 +4,7 @@ @@ -519,7 +519,7 @@ index 285e4a829ed6f..327c54778886f 100644 // Look up the menu model for this menu. const std::map::const_iterator map_iterator = diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h -index ebbc36a305ade..a6c9e80430cf3 100644 +index 5795a5b0e9eb7..025d8fc107c5f 100644 --- ui/views/controls/menu/menu_model_adapter.h +++ ui/views/controls/menu/menu_model_adapter.h @@ -88,6 +88,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate, @@ -544,7 +544,7 @@ index ebbc36a305ade..a6c9e80430cf3 100644 void WillHideMenu(MenuItemView* menu) override; void OnMenuClosed(MenuItemView* menu) override; diff --git ui/views/controls/menu/menu_runner.cc ui/views/controls/menu/menu_runner.cc -index 31716d454d1cd..f778a989ad663 100644 +index 5f931d0f55510..876f9a6a464e9 100644 --- ui/views/controls/menu/menu_runner.cc +++ ui/views/controls/menu/menu_runner.cc @@ -34,7 +34,8 @@ void MenuRunner::RunMenuAt(Widget* parent, @@ -567,7 +567,7 @@ index 31716d454d1cd..f778a989ad663 100644 bool MenuRunner::IsRunning() const { diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h -index 17c074cbd7dc9..53921c55671cf 100644 +index 797c2c0d90b64..f36fe5f19166d 100644 --- ui/views/controls/menu/menu_runner.h +++ ui/views/controls/menu/menu_runner.h @@ -146,7 +146,9 @@ class VIEWS_EXPORT MenuRunner { @@ -582,7 +582,7 @@ index 17c074cbd7dc9..53921c55671cf 100644 // Returns true if we're in a nested run loop running the menu. bool IsRunning() const; diff --git ui/views/controls/menu/menu_runner_impl.cc ui/views/controls/menu/menu_runner_impl.cc -index 4311a517b1179..7eed89badd038 100644 +index 067f30cd0e44c..4628a22821443 100644 --- ui/views/controls/menu/menu_runner_impl.cc +++ ui/views/controls/menu/menu_runner_impl.cc @@ -119,7 +119,8 @@ void MenuRunnerImpl::RunMenuAt(Widget* parent, @@ -605,7 +605,7 @@ index 4311a517b1179..7eed89badd038 100644 void MenuRunnerImpl::Cancel() { diff --git ui/views/controls/menu/menu_runner_impl.h ui/views/controls/menu/menu_runner_impl.h -index c99ef21736a5b..f24375fed0f48 100644 +index 3fd1c7b5c4d2a..9a03e50cc9eee 100644 --- ui/views/controls/menu/menu_runner_impl.h +++ ui/views/controls/menu/menu_runner_impl.h @@ -47,7 +47,8 @@ class VIEWS_EXPORT MenuRunnerImpl : public MenuRunnerImplInterface, @@ -619,7 +619,7 @@ index c99ef21736a5b..f24375fed0f48 100644 base::TimeTicks GetClosingEventTime() const override; diff --git ui/views/controls/menu/menu_runner_impl_adapter.cc ui/views/controls/menu/menu_runner_impl_adapter.cc -index fbc9166e188a8..48f87d01e61f4 100644 +index 3cead46aa1450..64157a7149ea2 100644 --- ui/views/controls/menu/menu_runner_impl_adapter.cc +++ ui/views/controls/menu/menu_runner_impl_adapter.cc @@ -34,9 +34,10 @@ void MenuRunnerImplAdapter::RunMenuAt( @@ -636,7 +636,7 @@ index fbc9166e188a8..48f87d01e61f4 100644 void MenuRunnerImplAdapter::Cancel() { diff --git ui/views/controls/menu/menu_runner_impl_adapter.h ui/views/controls/menu/menu_runner_impl_adapter.h -index 4bec3df3f3d32..0ebb3b2ac73df 100644 +index 87b0622eb7891..f677d1a7f4cc6 100644 --- ui/views/controls/menu/menu_runner_impl_adapter.h +++ ui/views/controls/menu/menu_runner_impl_adapter.h @@ -38,7 +38,8 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface { @@ -650,7 +650,7 @@ index 4bec3df3f3d32..0ebb3b2ac73df 100644 base::TimeTicks GetClosingEventTime() const override; diff --git ui/views/controls/menu/menu_runner_impl_cocoa.h ui/views/controls/menu/menu_runner_impl_cocoa.h -index 27bc7381ba22c..5d13b85fcc5cf 100644 +index 162640a8ba448..6cd869b5c2191 100644 --- ui/views/controls/menu/menu_runner_impl_cocoa.h +++ ui/views/controls/menu/menu_runner_impl_cocoa.h @@ -37,7 +37,8 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface { @@ -664,7 +664,7 @@ index 27bc7381ba22c..5d13b85fcc5cf 100644 base::TimeTicks GetClosingEventTime() const override; diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm -index a6dec3b24f56d..8ca46798afa1f 100644 +index 542b2856967e2..df7e88c91f13e 100644 --- ui/views/controls/menu/menu_runner_impl_cocoa.mm +++ ui/views/controls/menu/menu_runner_impl_cocoa.mm @@ -516,7 +516,8 @@ void MenuRunnerImplCocoa::RunMenuAt(Widget* parent, @@ -678,7 +678,7 @@ index a6dec3b24f56d..8ca46798afa1f 100644 DCHECK(parent); closing_event_time_ = base::TimeTicks(); diff --git ui/views/controls/menu/menu_runner_impl_interface.h ui/views/controls/menu/menu_runner_impl_interface.h -index 54c95d830233e..408f090b55698 100644 +index 5246bbf6f143b..d722e2a014ea2 100644 --- ui/views/controls/menu/menu_runner_impl_interface.h +++ ui/views/controls/menu/menu_runner_impl_interface.h @@ -40,7 +40,9 @@ class MenuRunnerImplInterface { @@ -693,7 +693,7 @@ index 54c95d830233e..408f090b55698 100644 // Hides and cancels the menu. virtual void Cancel() = 0; diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 1ffec7052a314..3a2be376fb000 100644 +index 5f5da1f46e59b..38b0a525a8652 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc @@ -259,6 +259,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) @@ -709,7 +709,7 @@ index 1ffec7052a314..3a2be376fb000 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 7afae16e92297..23d755ab0c2cc 100644 +index 3be783bf139be..ccbd77c2a2797 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc @@ -16,6 +16,7 @@ @@ -733,7 +733,7 @@ index 7afae16e92297..23d755ab0c2cc 100644 bool moved_cursor = false; #if !BUILDFLAG(IS_CHROMEOS_LACROS) diff --git ui/views/view.h ui/views/view.h -index 19e8d4180d09c..32ca9ea7668e8 100644 +index 5546d26fc701c..2a9797943b9f2 100644 --- ui/views/view.h +++ ui/views/view.h @@ -22,6 +22,7 @@ diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index e6c2b06c3..e1bad099f 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index 999eeb6fc817a..8a0c56bc23bcb 100644 +index 8500ee5f439c3..7fde560103ec2 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc @@ -662,6 +662,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { @@ -18,7 +18,7 @@ index 999eeb6fc817a..8a0c56bc23bcb 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 f3a4f3961b543..4ac493f0f03da 100644 +index 129bb651df425..f9ee144e84083 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -68,6 +68,7 @@ class CursorManager; @@ -85,7 +85,7 @@ index f3a4f3961b543..4ac493f0f03da 100644 // renderer process changes. This method is called before notifying // RenderWidgetHostImpl in order to allow the view to allocate a new diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc -index 80f8f5d2be88d..7b3ec5e68ab4b 100644 +index fe52808643114..58197f52e19e5 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc @@ -52,6 +52,10 @@ namespace { @@ -133,7 +133,7 @@ index 80f8f5d2be88d..7b3ec5e68ab4b 100644 if (host_ && set_focus_on_mouse_down_or_key_event_) { set_focus_on_mouse_down_or_key_event_ = false; diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 5d291f223feba..1999fbc5bf67a 100644 +index 2e0bffa928f82..d1787b29f3762 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h @@ -257,6 +257,14 @@ class CONTENT_EXPORT RenderWidgetHostView { @@ -152,10 +152,10 @@ index 5d291f223feba..1999fbc5bf67a 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 6c1689e6ab2e2..7933acdd2eac9 100644 +index d59b6c8f3fc58..c5597c901150d 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1774,7 +1774,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1775,7 +1775,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -166,7 +166,7 @@ index 6c1689e6ab2e2..7933acdd2eac9 100644 req.y = bounds_in_pixels_.y(); req.width = bounds_in_pixels_.width(); diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc -index 87a4458f9fbfc..bc3edd88fac7f 100644 +index 4d15a5c0937e6..9db89f2ac8d91 100644 --- ui/views/widget/desktop_aura/desktop_screen_win.cc +++ ui/views/widget/desktop_aura/desktop_screen_win.cc @@ -23,6 +23,8 @@ DesktopScreenWin::~DesktopScreenWin() { @@ -179,7 +179,7 @@ index 87a4458f9fbfc..bc3edd88fac7f 100644 return host ? host->GetAcceleratedWidget() : nullptr; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -index 5cb499fa35436..38659ad852b10 100644 +index b130d165f109b..b53cd077c8d7f 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc @@ -164,6 +164,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( @@ -201,7 +201,7 @@ index 5cb499fa35436..38659ad852b10 100644 void DesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) { // In Windows, the native events sent to chrome are separated into client // and non-client versions of events, which we record on our LocatedEvent -@@ -289,6 +301,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( +@@ -286,6 +298,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( properties->wayland_app_id = params.wayland_app_id; @@ -211,7 +211,7 @@ index 5cb499fa35436..38659ad852b10 100644 properties->x11_extension_delegate = this; } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h -index e6842b0848c74..d214247587d41 100644 +index 01d4ffe408a84..fbe41fefbb2bd 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h @@ -57,6 +57,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux @@ -232,7 +232,7 @@ index e6842b0848c74..d214247587d41 100644 // PlatformWindowDelegate: void DispatchEvent(ui::Event* event) override; -@@ -112,6 +116,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux +@@ -114,6 +118,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux uint32_t modal_dialog_counter_ = 0; @@ -243,7 +243,7 @@ index e6842b0848c74..d214247587d41 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 cfdf2f5682ee3..c36ea9dd07ac9 100644 +index a07e0668f7a82..00a9ffef2e800 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc @@ -272,8 +272,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { @@ -258,10 +258,10 @@ index cfdf2f5682ee3..c36ea9dd07ac9 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 b6d243983474c..0a5092598e69f 100644 +index 9541251b0f38d..307b0c80db6d1 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -181,8 +181,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -182,8 +182,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_); HWND parent_hwnd = nullptr; @@ -275,7 +275,7 @@ index b6d243983474c..0a5092598e69f 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -989,11 +993,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1025,11 +1029,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -293,7 +293,7 @@ index b6d243983474c..0a5092598e69f 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1001,6 +1009,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1037,6 +1045,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -307,10 +307,10 @@ index b6d243983474c..0a5092598e69f 100644 return event->handled(); } diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -index 0aae49ec83b88..ab61925742ed7 100644 +index cec35ceb25477..6eab66d5676b5 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -324,6 +324,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -326,6 +326,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -322,10 +322,10 @@ index 0aae49ec83b88..ab61925742ed7 100644 // a reference. raw_ptr tooltip_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 2cb71ae39fa7b..dcb03c59fde50 100644 +index 94c283fbe4f46..10eacde8e3eaf 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -338,7 +338,8 @@ void Widget::Init(InitParams params) { +@@ -341,7 +341,8 @@ void Widget::Init(InitParams params) { } params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -335,7 +335,7 @@ index 2cb71ae39fa7b..dcb03c59fde50 100644 if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && params.type != views::Widget::InitParams::TYPE_WINDOW) { -@@ -417,13 +418,21 @@ void Widget::Init(InitParams params) { +@@ -427,13 +428,21 @@ void Widget::Init(InitParams params) { if (show_state == ui::SHOW_STATE_MAXIMIZED) { Maximize(); @@ -357,8 +357,8 @@ index 2cb71ae39fa7b..dcb03c59fde50 100644 + } } - native_theme_observation_.Observe(GetNativeTheme()); -@@ -1434,10 +1443,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { + if (base::FeatureList::IsEnabled(features::kWidgetLayering)) { +@@ -1469,10 +1478,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -376,10 +376,10 @@ index 2cb71ae39fa7b..dcb03c59fde50 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 6e8a17f9452fb..0e45f3c72b3c2 100644 +index 35622dd9234d2..82273a6a1a1d1 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h -@@ -337,6 +337,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, +@@ -345,6 +345,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, // the concept with bubble anchoring a la BubbleDialogDelegateView. gfx::NativeView parent = nullptr; @@ -389,7 +389,7 @@ index 6e8a17f9452fb..0e45f3c72b3c2 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 431d19f2543a9..4e2e69a650118 100644 +index 8e15368a19ec6..6fe2cff9abdcb 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h @@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate { @@ -404,7 +404,7 @@ index 431d19f2543a9..4e2e69a650118 100644 bool enable_arrow_key_traversal() const { return params_.enable_arrow_key_traversal; diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index 89b4b5e0ec4bc..669583f83340f 100644 +index d24c447bb8030..29215d6578169 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc @@ -67,7 +67,8 @@ void CalculateWindowStylesFromInitParams( @@ -418,10 +418,10 @@ index 89b4b5e0ec4bc..669583f83340f 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 29e812d41d5c8..4a1c3ddc1216b 100644 +index db731ec8ab093..f63db294d8480 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -825,7 +825,11 @@ bool HWNDMessageHandler::IsVisible() const { +@@ -826,7 +826,11 @@ bool HWNDMessageHandler::IsVisible() const { } bool HWNDMessageHandler::IsActive() const { @@ -434,7 +434,7 @@ index 29e812d41d5c8..4a1c3ddc1216b 100644 } bool HWNDMessageHandler::IsMinimized() const { -@@ -3221,10 +3225,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3224,10 +3228,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 f45d0d906..d8cf58e94 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -1,5 +1,5 @@ diff --git components/viz/host/host_display_client.cc components/viz/host/host_display_client.cc -index d3970b4d86e1f..eac209e0a8159 100644 +index d212998176977..74df5b812116f 100644 --- components/viz/host/host_display_client.cc +++ components/viz/host/host_display_client.cc @@ -46,9 +46,14 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams( @@ -29,7 +29,7 @@ index d3970b4d86e1f..eac209e0a8159 100644 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git components/viz/host/host_display_client.h components/viz/host/host_display_client.h -index 1c2885c42f494..7dc5f41a7da79 100644 +index 640bfb050241d..2baf0f480c40e 100644 --- components/viz/host/host_display_client.h +++ components/viz/host/host_display_client.h @@ -34,17 +34,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient { @@ -54,7 +54,7 @@ index 1c2885c42f494..7dc5f41a7da79 100644 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. diff --git components/viz/host/layered_window_updater_impl.cc components/viz/host/layered_window_updater_impl.cc -index b04f654fe820f..131977a36591d 100644 +index 271486b45dcc8..a62210d8ca3c8 100644 --- components/viz/host/layered_window_updater_impl.cc +++ components/viz/host/layered_window_updater_impl.cc @@ -44,7 +44,7 @@ void LayeredWindowUpdaterImpl::OnAllocatedSharedMemory( @@ -67,7 +67,7 @@ index b04f654fe820f..131977a36591d 100644 if (!canvas_) { diff --git components/viz/host/layered_window_updater_impl.h components/viz/host/layered_window_updater_impl.h -index 309422bcf8581..759549f3046f4 100644 +index 8af69cac78b74..9f74e511c263d 100644 --- components/viz/host/layered_window_updater_impl.h +++ components/viz/host/layered_window_updater_impl.h @@ -38,7 +38,7 @@ class VIZ_HOST_EXPORT LayeredWindowUpdaterImpl @@ -80,7 +80,7 @@ index 309422bcf8581..759549f3046f4 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index e3056ad83f954..86fd5da510694 100644 +index f2c661fb373a3..7d7ed9f97f2ce 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -219,6 +219,8 @@ viz_component("service") { @@ -93,7 +93,7 @@ index e3056ad83f954..86fd5da510694 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 d6ffe3a759fbd..e1831e9b77a3a 100644 +index eca3105036621..116f92d2b5645 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -17,6 +17,7 @@ @@ -134,7 +134,7 @@ index d6ffe3a759fbd..e1831e9b77a3a 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 583e3e2525c75..e1836039ad8a5 100644 +index aedc4d24d3fb3..442d2e4204b93 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( @@ -150,13 +150,13 @@ index 583e3e2525c75..e1836039ad8a5 100644 TRACE_EVENT_ASYNC_BEGIN0("viz", "SoftwareOutputDeviceWinProxy::Draw", this); diff --git content/browser/compositor/viz_process_transport_factory.cc content/browser/compositor/viz_process_transport_factory.cc -index 4a9cf8ff4a94e..b8879ee146543 100644 +index 47f54d2f0a30c..aa7885347ab02 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -381,8 +381,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( - compositor_data.display_private.reset(); +@@ -384,8 +384,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( + mojo::AssociatedRemote display_private; root_params->display_private = - compositor_data.display_private.BindNewEndpointAndPassReceiver(); + display_private.BindNewEndpointAndPassReceiver(); - compositor_data.display_client = - std::make_unique(compositor); + if (compositor->delegate()) { @@ -168,9 +168,9 @@ index 4a9cf8ff4a94e..b8879ee146543 100644 + } root_params->display_client = compositor_data.display_client->GetBoundRemote(resize_task_runner_); - + mojo::AssociatedRemote diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h -index e7e67ee824b2a..bb044cff83f58 100644 +index 46e283304761c..624f4030acc6a 100644 --- mojo/public/cpp/bindings/sync_call_restrictions.h +++ mojo/public/cpp/bindings/sync_call_restrictions.h @@ -42,6 +42,7 @@ class Compositor; @@ -191,7 +191,7 @@ index e7e67ee824b2a..bb044cff83f58 100644 // running in the same process, so it won't block anything. // TODO(159346933) Remove once the origin isolation logic is moved outside of diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom -index b2f873919d686..5250a6be86cc3 100644 +index c837cc126bce8..269f94610c90c 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom +++ services/viz/privileged/mojom/compositing/display_private.mojom @@ -97,12 +97,14 @@ interface DisplayPrivate { @@ -211,7 +211,7 @@ index b2f873919d686..5250a6be86cc3 100644 // Notifies that a swap has occurred and provides information about the pixel diff --git services/viz/privileged/mojom/compositing/layered_window_updater.mojom services/viz/privileged/mojom/compositing/layered_window_updater.mojom -index 6b7fbb6cf13dc..e2af75168cb91 100644 +index 2f462f0deb5fc..695869b83cefa 100644 --- services/viz/privileged/mojom/compositing/layered_window_updater.mojom +++ services/viz/privileged/mojom/compositing/layered_window_updater.mojom @@ -26,5 +26,5 @@ interface LayeredWindowUpdater { @@ -222,7 +222,7 @@ index 6b7fbb6cf13dc..e2af75168cb91 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 5dee5932ce9ca..c25e5f5b4e069 100644 +index f80dce5bcef9f..c24176696305e 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -31,7 +31,9 @@ @@ -232,10 +232,10 @@ index 5dee5932ce9ca..c25e5f5b4e069 100644 +#include "components/viz/host/host_display_client.h" #include "components/viz/host/host_frame_sink_client.h" +#include "components/viz/service/display/software_output_device.h" + #include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/pending_remote.h" - #include "services/viz/privileged/mojom/compositing/vsync_parameter_observer.mojom-forward.h" - #include "third_party/skia/include/core/SkColor.h" -@@ -139,6 +141,14 @@ class COMPOSITOR_EXPORT ContextFactory { + #include "services/viz/privileged/mojom/compositing/display_private.mojom.h" +@@ -142,6 +144,14 @@ class COMPOSITOR_EXPORT ContextFactory { virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0; }; @@ -250,7 +250,7 @@ index 5dee5932ce9ca..c25e5f5b4e069 100644 // Compositor object to take care of GPU painting. // A Browser compositor object is responsible for generating the final // displayable form of pixels comprising a single widget's contents. It draws an -@@ -180,6 +190,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -185,6 +195,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, // Schedules a redraw of the layer tree associated with this compositor. void ScheduleDraw(); @@ -260,7 +260,7 @@ index 5dee5932ce9ca..c25e5f5b4e069 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 -@@ -482,6 +495,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -483,6 +496,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 e741cf570..d1337d9ca 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,8 +1,8 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 8e1c0feede6dc..4fcc1fc5cbbac 100644 +index 536bbd4cf825c..87aa33a115b7e 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -3089,6 +3089,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3082,6 +3082,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, site_instance.get(), params.renderer_initiated_creation, params.main_frame_name, GetOpener(), primary_main_frame_policy); @@ -15,7 +15,7 @@ index 8e1c0feede6dc..4fcc1fc5cbbac 100644 std::unique_ptr delegate = GetContentClient()->browser()->GetWebContentsViewDelegate(this); -@@ -3099,6 +3105,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, +@@ -3092,6 +3098,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, view_ = CreateWebContentsView(this, std::move(delegate), &render_view_host_delegate_view_); } @@ -23,7 +23,7 @@ index 8e1c0feede6dc..4fcc1fc5cbbac 100644 CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -3276,6 +3283,9 @@ void WebContentsImpl::RenderWidgetCreated( +@@ -3267,6 +3274,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 8e1c0feede6dc..4fcc1fc5cbbac 100644 } void WebContentsImpl::RenderWidgetDeleted( -@@ -4002,6 +4012,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( +@@ -3995,6 +4005,15 @@ FrameTree* WebContentsImpl::CreateNewWindow( params.pip_options->lock_aspect_ratio; } @@ -49,7 +49,7 @@ index 8e1c0feede6dc..4fcc1fc5cbbac 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -7880,6 +7899,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -7871,6 +7890,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). SetFocusedFrameTree(node->frame_tree()); } @@ -60,10 +60,10 @@ index 8e1c0feede6dc..4fcc1fc5cbbac 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 024cd37e818e1..6c7fca35b8bc8 100644 +index c5e2f70696e93..fd9000dd087d5 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -94,10 +94,12 @@ class BrowserContext; +@@ -95,10 +95,12 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; @@ -76,7 +76,7 @@ index 024cd37e818e1..6c7fca35b8bc8 100644 class WebUI; struct DropData; struct MHTMLGenerationParams; -@@ -237,6 +239,10 @@ class WebContents : public PageNavigator, +@@ -238,6 +240,10 @@ class WebContents : public PageNavigator, network::mojom::WebSandboxFlags starting_sandbox_flags = network::mojom::WebSandboxFlags::kNone; @@ -88,10 +88,10 @@ index 024cd37e818e1..6c7fca35b8bc8 100644 // the value that'll be returned by GetLastActiveTime(). If this is left // default initialized then the value is not passed on to the WebContents diff --git content/public/browser/web_contents_delegate.h content/public/browser/web_contents_delegate.h -index 0274e3bb5cc62..8807f4a901096 100644 +index 89c14ce2d9700..fdb71d8fe4b0e 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h -@@ -57,9 +57,11 @@ class EyeDropperListener; +@@ -58,9 +58,11 @@ class EyeDropperListener; class FileSelectListener; class JavaScriptDialogManager; class RenderFrameHost; @@ -103,7 +103,7 @@ index 0274e3bb5cc62..8807f4a901096 100644 struct ContextMenuParams; struct DropData; struct MediaPlayerWatchTime; -@@ -338,6 +340,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -342,6 +344,14 @@ class CONTENT_EXPORT WebContentsDelegate { const StoragePartitionConfig& partition_config, SessionStorageNamespace* session_storage_namespace); @@ -119,7 +119,7 @@ index 0274e3bb5cc62..8807f4a901096 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 bea8d6a0d6ac4..c7ab08ceb7790 100644 +index 01f8b94f08e99..c8cc74bad6411 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h @@ -215,6 +215,9 @@ class CONTENT_EXPORT WebContentsObserver { @@ -132,7 +132,7 @@ index bea8d6a0d6ac4..c7ab08ceb7790 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() {} -@@ -782,6 +785,10 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -791,6 +794,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 b59c2d841..9122211c7 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index ad34b6230f57a..57883181237ed 100644 +index 18008b93d9066..a9775e0153fbe 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -762,6 +762,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -763,6 +763,11 @@ class BLINK_PLATFORM_EXPORT Platform { const WebURL& url, blink::WebVector* csp) {} @@ -12,8 +12,8 @@ index ad34b6230f57a..57883181237ed 100644 + virtual void DevToolsAgentDetached() {} + private: - static void InitializeMainThreadCommon(Platform* platform, - std::unique_ptr main_thread); + 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 53bac961859ad..ee55382ce2641 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 5f184665c..eeec5197d 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,20 +1,20 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index 3af33a4d699b5..55bb35f92fd1f 100644 +index f3b681ec44c57..f6fdbc0312fe0 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -338,6 +338,7 @@ class WebView { +@@ -338,6 +338,7 @@ class BLINK_EXPORT WebView { // Sets whether select popup menus should be rendered by the browser. - BLINK_EXPORT static void SetUseExternalPopupMenus(bool); + static void SetUseExternalPopupMenus(bool); + virtual void SetUseExternalPopupMenusThisInstance(bool) = 0; // 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 231f76d07d8a0..1f0bb9c047f68 100644 +index b2fede3c231cd..736e1fd7f8a00 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) { +@@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -30,7 +30,7 @@ index 231f76d07d8a0..1f0bb9c047f68 100644 } namespace { -@@ -559,6 +564,7 @@ WebViewImpl::WebViewImpl( +@@ -561,6 +566,7 @@ WebViewImpl::WebViewImpl( chrome_client_(MakeGarbageCollected(this)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), @@ -39,7 +39,7 @@ index 231f76d07d8a0..1f0bb9c047f68 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 08cc81481cbe4..9c1c90b298393 100644 +index 49da24df2b013..6de6a098b2713 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h @@ -133,7 +133,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -62,10 +62,10 @@ index 08cc81481cbe4..9c1c90b298393 100644 TransformationMatrix 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 00ce475fc621f..fd9a93ed87991 100644 +index 228d7777a4ae4..39243a45311b9 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -913,7 +913,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -915,7 +915,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webkit_runtime_enabled_features.patch b/patch/patches/webkit_runtime_enabled_features.patch index ac0a121af..1103f653b 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 f5462b5ff494e..cf4984b6effd0 100644 +index d414c5db40cc4..29efc4024b67d 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 f5462b5ff494e..cf4984b6effd0 100644 #define ASSERT_ORIGIN_TRIAL(feature) \ static_assert(std::is_sameGetImageHotspot(); EXPECT_GT(hotspot.x, 0); - EXPECT_LT(hotspot.x, GetScaledInt(dragdiv.width)); + EXPECT_LE(hotspot.x, GetScaledInt(dragdiv.width)); EXPECT_GT(hotspot.y, 0); - EXPECT_LT(hotspot.y, GetScaledInt(dragdiv.height)); + EXPECT_LE(hotspot.y, GetScaledInt(dragdiv.height)); DestroySucceededTestSoon(); return false; diff --git a/tools/gn_args.py b/tools/gn_args.py index ae1c45221..aa14b3803 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -262,6 +262,11 @@ def GetRecommendedDefaultArgs(): # TODO(cef): Remove this flag once we require a newer host system. result['fatal_linker_warnings'] = False + # Disable QT by default because we don't want to introduce the build + # dependencies at this time. For background see + # https://groups.google.com/a/chromium.org/g/chromium-packagers/c/-2VGexQAK6w/m/5K5ppK9WBAAJ + result['use_qt'] = False + return result