diff --git a/BUILD.gn b/BUILD.gn index 2f1e91441..cd2024992 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1370,13 +1370,15 @@ repack("pak_devtools") { # Add associated .h files in the make_pack_header("resources") target. sources = [ "$root_gen_dir/content/browser/devtools/devtools_resources.pak", + "$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak", ] # Use public_deps so that generated grit headers are discoverable from # the libcef_static target. Grit deps that generate .cc files must be # listed both here and in the libcef_static target. public_deps = [ - "//content/browser/devtools:resources", + "//content/browser/devtools:devtools_resources", + "//third_party/blink/public:devtools_inspector_resources", ] output = "$root_out_dir/devtools_resources.pak" diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 30ba21668..f4da2f260 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/84.0.4147.0' + 'chromium_checkout': 'refs/tags/85.0.4183.0' } diff --git a/include/base/cef_logging.h b/include/base/cef_logging.h index ba93097a5..58da121fe 100644 --- a/include/base/cef_logging.h +++ b/include/base/cef_logging.h @@ -136,7 +136,11 @@ #define CEF_INCLUDE_BASE_CEF_LOGGING_H_ #pragma once -#if defined(DCHECK) +#if defined(USING_CHROMIUM_INCLUDES) +// When building CEF include the Chromium header directly. +#include "base/logging.h" +#include "base/notreached.h" +#elif defined(DCHECK) // Do nothing if the macros provided by this header already exist. // This can happen in cases where Chromium code is used directly by the // client application. When using Chromium code directly always include @@ -149,10 +153,7 @@ #define DCHECK_IS_ON() true #endif -#elif defined(USING_CHROMIUM_INCLUDES) -// When building CEF include the Chromium header directly. -#include "base/logging.h" -#else // !USING_CHROMIUM_INCLUDES +#else // !defined(DCHECK) // The following is substantially similar to the Chromium implementation. // If the Chromium implementation diverges the below implementation should be // updated to match. diff --git a/include/capi/cef_media_router_capi.h b/include/capi/cef_media_router_capi.h index 9bcf16b82..dfb78cd70 100644 --- a/include/capi/cef_media_router_capi.h +++ b/include/capi/cef_media_router_capi.h @@ -33,7 +33,7 @@ // by hand. See the translator.README.txt file in the tools directory for // more information. // -// $hash=aa1310919932145744d5347d449d6ee10a3a0813$ +// $hash=a259fab661bc913498ae4f46f8dee1c1e592823d$ // #ifndef CEF_INCLUDE_CAPI_CEF_MEDIA_ROUTER_CAPI_H_ @@ -246,11 +246,6 @@ typedef struct _cef_media_sink_t { // The resulting string must be freed by calling cef_string_userfree_free(). cef_string_userfree_t(CEF_CALLBACK* get_id)(struct _cef_media_sink_t* self); - /// - // Returns true (1) if this sink is valid. - /// - int(CEF_CALLBACK* is_valid)(struct _cef_media_sink_t* self); - /// // Returns the name of this sink. /// @@ -305,11 +300,6 @@ typedef struct _cef_media_source_t { // The resulting string must be freed by calling cef_string_userfree_free(). cef_string_userfree_t(CEF_CALLBACK* get_id)(struct _cef_media_source_t* self); - /// - // Returns true (1) if this source is valid. - /// - int(CEF_CALLBACK* is_valid)(struct _cef_media_source_t* self); - /// // Returns true (1) if this source outputs its content via Cast. /// diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index 13d5ad45f..01d90d624 100644 --- a/include/cef_api_hash.h +++ b/include/cef_api_hash.h @@ -42,13 +42,13 @@ // way that may cause binary incompatibility with other builds. The universal // hash value will change if any platform is affected whereas the platform hash // values will change only if that particular platform is affected. -#define CEF_API_HASH_UNIVERSAL "74ccf587a0aab55a284b42ee0f68e506441213ee" +#define CEF_API_HASH_UNIVERSAL "cb61274ecf3ff56fdd90572f6e71a278c35ca634" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "ae24a93d1d41a9cf2e5405dc02e62bf9c0eb95b8" +#define CEF_API_HASH_PLATFORM "b44de0d5c0a0a915d78c334d962befad828cb7ab" #elif defined(OS_MACOSX) -#define CEF_API_HASH_PLATFORM "aec384331cfba6541bc267f5a1587931e33cb632" +#define CEF_API_HASH_PLATFORM "5110de7013537cf845a02484d39e47669b328e8a" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "775c9c45cd801ff0b462acc181660f271152ac61" +#define CEF_API_HASH_PLATFORM "be51e7502fede165defcae5cfd9c8ce9e80622be" #endif #ifdef __cplusplus diff --git a/include/cef_media_router.h b/include/cef_media_router.h index 3234d3ef2..40ca8fafe 100644 --- a/include/cef_media_router.h +++ b/include/cef_media_router.h @@ -229,12 +229,6 @@ class CefMediaSink : public virtual CefBaseRefCounted { /*--cef()--*/ virtual CefString GetId() = 0; - /// - // Returns true if this sink is valid. - /// - /*--cef()--*/ - virtual bool IsValid() = 0; - /// // Returns the name of this sink. /// @@ -286,12 +280,6 @@ class CefMediaSource : public virtual CefBaseRefCounted { /*--cef()--*/ virtual CefString GetId() = 0; - /// - // Returns true if this source is valid. - /// - /*--cef()--*/ - virtual bool IsValid() = 0; - /// // Returns true if this source outputs its content via Cast. /// diff --git a/libcef/browser/alloy/alloy_browser_context.cc b/libcef/browser/alloy/alloy_browser_context.cc index 6dedc6d86..ed619a73a 100644 --- a/libcef/browser/alloy/alloy_browser_context.cc +++ b/libcef/browser/alloy/alloy_browser_context.cc @@ -155,7 +155,7 @@ void AlloyBrowserContext::Initialize() { // Initialize proxy configuration tracker. pref_proxy_config_tracker_.reset(new PrefProxyConfigTrackerImpl( - GetPrefs(), base::CreateSingleThreadTaskRunner({BrowserThread::IO}))); + GetPrefs(), content::GetIOThreadTaskRunner({}))); // Spell checking support and possibly other subsystems retrieve the // PrefService associated with a BrowserContext via UserPrefs::Get(). diff --git a/libcef/browser/alloy/alloy_browser_main.cc b/libcef/browser/alloy/alloy_browser_main.cc index 0bb5a360e..a4c8864f2 100644 --- a/libcef/browser/alloy/alloy_browser_main.cc +++ b/libcef/browser/alloy/alloy_browser_main.cc @@ -24,7 +24,6 @@ #include "libcef/common/net/net_resource_provider.h" #include "base/bind.h" -#include "base/message_loop/message_loop.h" #include "base/strings/string_number_conversions.h" #include "base/task/post_task.h" #include "chrome/browser/browser_process.h" diff --git a/libcef/browser/alloy/browser_platform_delegate_alloy.cc b/libcef/browser/alloy/browser_platform_delegate_alloy.cc index c6b898583..4e73ddc6b 100644 --- a/libcef/browser/alloy/browser_platform_delegate_alloy.cc +++ b/libcef/browser/alloy/browser_platform_delegate_alloy.cc @@ -210,16 +210,25 @@ void CefBrowserPlatformDelegateAlloy::BrowserDestroyed( } void CefBrowserPlatformDelegateAlloy::SendCaptureLostEvent() { - content::RenderWidgetHostImpl* widget = content::RenderWidgetHostImpl::From( - browser_->web_contents()->GetRenderViewHost()->GetWidget()); + if (!web_contents_) + return; + content::RenderViewHost* host = web_contents_->GetRenderViewHost(); + if (!host) + return; + + content::RenderWidgetHostImpl* widget = + content::RenderWidgetHostImpl::From(host->GetWidget()); if (widget) widget->LostCapture(); } #if defined(OS_WIN) || (defined(OS_POSIX) && !defined(OS_MACOSX)) void CefBrowserPlatformDelegateAlloy::NotifyMoveOrResizeStarted() { + if (!web_contents_) + return; + // Dismiss any existing popups. - content::RenderViewHost* host = browser_->web_contents()->GetRenderViewHost(); + content::RenderViewHost* host = web_contents_->GetRenderViewHost(); if (host) host->NotifyMoveOrResizeStarted(); } @@ -360,7 +369,7 @@ void CefBrowserPlatformDelegateAlloy::Find(int identifier, auto options = blink::mojom::FindOptions::New(); options->forward = forward; options->match_case = matchCase; - options->find_next = findNext; + options->find_next_if_selection_matches = findNext; web_contents_->Find(identifier, searchText, std::move(options)); } diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.cc b/libcef/browser/alloy/chrome_browser_process_alloy.cc index 6b4b20ea0..9067afaca 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.cc +++ b/libcef/browser/alloy/chrome_browser_process_alloy.cc @@ -319,6 +319,12 @@ ChromeBrowserProcessAlloy::subresource_filter_ruleset_service() { return nullptr; } +federated_learning::FlocBlocklistService* +ChromeBrowserProcessAlloy::floc_blocklist_service() { + NOTREACHED(); + return nullptr; +} + optimization_guide::OptimizationGuideService* ChromeBrowserProcessAlloy::optimization_guide_service() { NOTREACHED(); diff --git a/libcef/browser/alloy/chrome_browser_process_alloy.h b/libcef/browser/alloy/chrome_browser_process_alloy.h index 138c1b56d..9135b1f56 100644 --- a/libcef/browser/alloy/chrome_browser_process_alloy.h +++ b/libcef/browser/alloy/chrome_browser_process_alloy.h @@ -82,6 +82,7 @@ class ChromeBrowserProcessAlloy : public BrowserProcess { safe_browsing::SafeBrowsingService* safe_browsing_service() override; subresource_filter::RulesetService* subresource_filter_ruleset_service() override; + federated_learning::FlocBlocklistService* floc_blocklist_service() override; optimization_guide::OptimizationGuideService* optimization_guide_service() override; StartupData* startup_data() override; diff --git a/libcef/browser/alloy/chrome_profile_alloy.cc b/libcef/browser/alloy/chrome_profile_alloy.cc index 38af012ae..29dd7e8ed 100644 --- a/libcef/browser/alloy/chrome_profile_alloy.cc +++ b/libcef/browser/alloy/chrome_profile_alloy.cc @@ -18,7 +18,7 @@ class CefVariationsClient : public variations::VariationsClient { ~CefVariationsClient() override = default; - bool IsIncognito() const override { + bool IsOffTheRecord() const override { return browser_context_->IsOffTheRecord(); } @@ -68,10 +68,6 @@ std::string ChromeProfileAlloy::GetProfileUserName() const { return std::string(); } -Profile::ProfileType ChromeProfileAlloy::GetProfileType() const { - return REGULAR_PROFILE; -} - Profile* ChromeProfileAlloy::GetOffTheRecordProfile( const Profile::OTRProfileID& otr_profile_id) { NOTREACHED(); @@ -79,7 +75,6 @@ Profile* ChromeProfileAlloy::GetOffTheRecordProfile( } std::vector ChromeProfileAlloy::GetAllOffTheRecordProfiles() { - NOTREACHED(); return {}; } @@ -127,7 +122,7 @@ PrefService* ChromeProfileAlloy::GetOffTheRecordPrefs() { return nullptr; } -bool ChromeProfileAlloy::IsSameProfile(Profile* profile) { +bool ChromeProfileAlloy::IsSameOrParent(Profile* profile) { NOTREACHED(); return false; } diff --git a/libcef/browser/alloy/chrome_profile_alloy.h b/libcef/browser/alloy/chrome_profile_alloy.h index bb31c051d..f62a8665d 100644 --- a/libcef/browser/alloy/chrome_profile_alloy.h +++ b/libcef/browser/alloy/chrome_profile_alloy.h @@ -26,7 +26,6 @@ class ChromeProfileAlloy : public Profile { variations::VariationsClient* GetVariationsClient() override; scoped_refptr GetIOTaskRunner() override; std::string GetProfileUserName() const override; - ProfileType GetProfileType() const override; Profile* GetOffTheRecordProfile( const Profile::OTRProfileID& otr_profile_id) override; std::vector GetAllOffTheRecordProfiles() override; @@ -41,7 +40,7 @@ class ChromeProfileAlloy : public Profile { bool IsLegacySupervised() const override; ExtensionSpecialStoragePolicy* GetExtensionSpecialStoragePolicy() override; PrefService* GetOffTheRecordPrefs() override; - bool IsSameProfile(Profile* profile) override; + bool IsSameOrParent(Profile* profile) override; base::Time GetStartTime() const override; base::FilePath last_selected_directory() override; void set_last_selected_directory(const base::FilePath& path) override; diff --git a/libcef/browser/audio_capturer.cc b/libcef/browser/audio_capturer.cc index 872ec6407..578006032 100644 --- a/libcef/browser/audio_capturer.cc +++ b/libcef/browser/audio_capturer.cc @@ -77,7 +77,8 @@ CefAudioCapturer::CefAudioCapturer(const CefAudioParameters& params, std::make_unique(base::BindRepeating( &StreamCreatorHelper, base::Unretained(browser_->web_contents()), base::Unretained(audio_stream_creator_.get()))), - media::AudioInputDevice::kLoopback); + media::AudioInputDevice::kLoopback, + media::AudioInputDevice::DeadStreamDetection::kEnabled); audio_input_device_->Initialize(audio_params, this); audio_input_device_->Start(); diff --git a/libcef/browser/browser_host_impl.cc b/libcef/browser/browser_host_impl.cc index b6e41f35b..de31171b9 100644 --- a/libcef/browser/browser_host_impl.cc +++ b/libcef/browser/browser_host_impl.cc @@ -1701,8 +1701,7 @@ bool CefBrowserHostImpl::EmbedsFullscreenWidget() { } void CefBrowserHostImpl::EnterFullscreenModeForTab( - content::WebContents* web_contents, - const GURL& origin, + content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) { OnFullscreenModeChange(true); } @@ -2633,6 +2632,7 @@ void CefBrowserHostImpl::PluginCrashed(const base::FilePath& plugin_path, } void CefBrowserHostImpl::DidUpdateFaviconURL( + content::RenderFrameHost* render_frame_host, const std::vector& candidates) { if (client_.get()) { CefRefPtr handler = client_->GetDisplayHandler(); diff --git a/libcef/browser/browser_host_impl.h b/libcef/browser/browser_host_impl.h index 5fee920bb..339075e78 100644 --- a/libcef/browser/browser_host_impl.h +++ b/libcef/browser/browser_host_impl.h @@ -434,8 +434,7 @@ class CefBrowserHostImpl : public CefBrowserHost, const blink::mojom::FileChooserParams& params) override; bool EmbedsFullscreenWidget() override; void EnterFullscreenModeForTab( - content::WebContents* web_contents, - const GURL& origin, + content::RenderFrameHost* requesting_frame, const blink::mojom::FullscreenOptions& options) override; void ExitFullscreenModeForTab(content::WebContents* web_contents) override; bool IsFullscreenForTabOrPending( @@ -487,6 +486,7 @@ class CefBrowserHostImpl : public CefBrowserHost, void PluginCrashed(const base::FilePath& plugin_path, base::ProcessId plugin_pid) override; void DidUpdateFaviconURL( + content::RenderFrameHost* render_frame_host, const std::vector& candidates) override; void OnAudioStateChanged(bool audible) override; bool OnMessageReceived(const IPC::Message& message, diff --git a/libcef/browser/devtools/devtools_file_manager.cc b/libcef/browser/devtools/devtools_file_manager.cc index 9307824cc..420a3cad8 100644 --- a/libcef/browser/devtools/devtools_file_manager.cc +++ b/libcef/browser/devtools/devtools_file_manager.cc @@ -16,7 +16,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/task/post_task.h" #include "base/threading/sequenced_task_runner_handle.h" -#include "base/value_conversions.h" +#include "base/util/values/values_util.h" #include "base/values.h" #include "chrome/common/pref_names.h" #include "components/prefs/scoped_user_pref_update.h" @@ -81,9 +81,9 @@ void CefDevToolsFileManager::Save(const std::string& url, const base::Value* path_value; if (file_map->Get(base::MD5String(url), &path_value)) { - // Ignore base::GetValueAsFilePath() failure since we handle empty - // |initial_path| below. - ignore_result(base::GetValueAsFilePath(*path_value, &initial_path)); + base::Optional path = util::ValueToFilePath(*path_value); + if (path) + initial_path = std::move(*path); } if (initial_path.empty()) { @@ -142,7 +142,7 @@ void CefDevToolsFileManager::SaveAsFileSelected(const std::string& url, DictionaryPrefUpdate update(prefs_, prefs::kDevToolsEditedFiles); base::DictionaryValue* files_map = update.Get(); - files_map->SetKey(base::MD5String(url), base::CreateFilePathValue(path)); + files_map->SetKey(base::MD5String(url), util::FilePathToValue(path)); std::string file_system_path = path.AsUTF8Unsafe(); callback.Run(file_system_path); file_task_runner_->PostTask(FROM_HERE, diff --git a/libcef/browser/download_manager_delegate.cc b/libcef/browser/download_manager_delegate.cc index e15c9a54e..9a949cd21 100644 --- a/libcef/browser/download_manager_delegate.cc +++ b/libcef/browser/download_manager_delegate.cc @@ -152,6 +152,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { suggested_path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, suggested_path, + base::nullopt /*download_schedule*/, download::DOWNLOAD_INTERRUPT_REASON_NONE); } } @@ -170,7 +171,8 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback { std::move(callback).Run(path, DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - path, download::DOWNLOAD_INTERRUPT_REASON_NONE); + path, base::nullopt /*download_schedule*/, + download::DOWNLOAD_INTERRUPT_REASON_NONE); } base::WeakPtr manager_; @@ -355,7 +357,8 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget( item->GetForcedFilePath(), DownloadItem::TARGET_DISPOSITION_OVERWRITE, download::DOWNLOAD_DANGER_TYPE_NOT_DANGEROUS, download::DownloadItem::MixedContentStatus::UNKNOWN, - item->GetForcedFilePath(), download::DOWNLOAD_INTERRUPT_REASON_NONE); + item->GetForcedFilePath(), base::nullopt /*download_schedule*/, + download::DOWNLOAD_INTERRUPT_REASON_NONE); return true; } diff --git a/libcef/browser/extensions/component_extension_resource_manager.h b/libcef/browser/extensions/component_extension_resource_manager.h index 9f29af926..c6ed3f930 100644 --- a/libcef/browser/extensions/component_extension_resource_manager.h +++ b/libcef/browser/extensions/component_extension_resource_manager.h @@ -8,6 +8,7 @@ #include #include "base/files/file_path.h" +#include "base/macros.h" #include "extensions/browser/component_extension_resource_manager.h" struct GritResourceMap; diff --git a/libcef/browser/extensions/extension_system.cc b/libcef/browser/extensions/extension_system.cc index 4c6d563c7..446692b5b 100644 --- a/libcef/browser/extensions/extension_system.cc +++ b/libcef/browser/extensions/extension_system.cc @@ -20,7 +20,6 @@ #include "base/path_service.h" #include "base/strings/string_tokenizer.h" #include "base/strings/utf_string_conversions.h" -#include "base/task/post_task.h" #include "base/threading/thread_restrictions.h" #include "chrome/browser/profiles/profile.h" #include "chrome/common/chrome_paths.h" @@ -54,7 +53,6 @@ #include "net/base/mime_util.h" using content::BrowserContext; -using content::BrowserThread; namespace extensions { @@ -179,10 +177,6 @@ void CefExtensionSystem::Init() { // Inform the rest of the extensions system to start. ready_.Signal(); - content::NotificationService::current()->Notify( - NOTIFICATION_EXTENSIONS_READY_DEPRECATED, - content::Source(browser_context_), - content::NotificationService::NoDetails()); // Add the internal PDF extension. PDF loading works as follows: // 1. The PDF PPAPI plugin is registered in libcef/common/content_client.cc @@ -413,7 +407,7 @@ ServiceWorkerManager* CefExtensionSystem::service_worker_manager() { return service_worker_manager_.get(); } -SharedUserScriptMaster* CefExtensionSystem::shared_user_script_master() { +SharedUserScriptManager* CefExtensionSystem::shared_user_script_manager() { return nullptr; } @@ -450,8 +444,8 @@ void CefExtensionSystem::RegisterExtensionWithRequestContexts( base::OnceClosure callback) { // TODO(extensions): The |incognito_enabled| value should be set based on // manifest settings. - base::PostTaskAndReply( - FROM_HERE, {BrowserThread::IO}, + content::GetIOThreadTaskRunner({})->PostTaskAndReply( + FROM_HERE, base::Bind(&InfoMap::AddExtension, info_map(), base::RetainedRef(extension), base::Time::Now(), true, // incognito_enabled @@ -464,8 +458,8 @@ void CefExtensionSystem::RegisterExtensionWithRequestContexts( void CefExtensionSystem::UnregisterExtensionWithRequestContexts( const std::string& extension_id, const UnloadedExtensionReason reason) { - base::PostTask( - FROM_HERE, {BrowserThread::IO}, + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::Bind(&InfoMap::RemoveExtension, info_map(), extension_id, reason)); } @@ -473,6 +467,10 @@ const base::OneShotEvent& CefExtensionSystem::ready() const { return ready_; } +bool CefExtensionSystem::is_ready() const { + return ready_.is_signaled(); +} + ContentVerifier* CefExtensionSystem::content_verifier() { return nullptr; } diff --git a/libcef/browser/extensions/extension_system.h b/libcef/browser/extensions/extension_system.h index d6c834e12..ed2bfb9c4 100644 --- a/libcef/browser/extensions/extension_system.h +++ b/libcef/browser/extensions/extension_system.h @@ -17,12 +17,9 @@ #include "base/one_shot_event.h" #include "extensions/browser/extension_system.h" -class BrowserContextKeyedServiceFactory; - namespace base { class DictionaryValue; -class FilePath; -} // namespace base +} namespace content { class BrowserContext; @@ -31,11 +28,8 @@ class BrowserContext; namespace extensions { class ExtensionRegistry; -class InfoMap; class ProcessManager; class RendererStartupHelper; -class SharedUserScriptMaster; -class ValueStoreFactory; // Used to manage extensions. class CefExtensionSystem : public ExtensionSystem { @@ -93,7 +87,7 @@ class CefExtensionSystem : public ExtensionSystem { RuntimeData* runtime_data() override; ManagementPolicy* management_policy() override; ServiceWorkerManager* service_worker_manager() override; - SharedUserScriptMaster* shared_user_script_master() override; + SharedUserScriptManager* shared_user_script_manager() override; StateStore* state_store() override; StateStore* rules_store() override; scoped_refptr store_factory() override; @@ -107,6 +101,7 @@ class CefExtensionSystem : public ExtensionSystem { const std::string& extension_id, const UnloadedExtensionReason reason) override; const base::OneShotEvent& ready() const override; + bool is_ready() const override; ContentVerifier* content_verifier() override; std::unique_ptr GetDependentExtensions( const Extension* extension) override; diff --git a/libcef/browser/extensions/value_store/cef_value_store.cc b/libcef/browser/extensions/value_store/cef_value_store.cc index 569c3363c..350c0a8f7 100644 --- a/libcef/browser/extensions/value_store/cef_value_store.cc +++ b/libcef/browser/extensions/value_store/cef_value_store.cc @@ -9,6 +9,7 @@ #include "base/logging.h" #include "base/memory/ptr_util.h" +#include "base/notreached.h" namespace { diff --git a/libcef/browser/media_router/media_router_impl.cc b/libcef/browser/media_router/media_router_impl.cc index 52c4f5e14..91950f8e5 100644 --- a/libcef/browser/media_router/media_router_impl.cc +++ b/libcef/browser/media_router/media_router_impl.cc @@ -209,9 +209,9 @@ void CefMediaRouterImpl::CreateRoute( auto browser_context = GetBrowserContext(browser_context_getter_); if (!browser_context) { error = "Context has already been destroyed"; - } else if (!source || !source->IsValid()) { + } else if (!source) { error = "Source is empty or invalid"; - } else if (!sink || !sink->IsValid()) { + } else if (!sink) { error = "Sink is empty or invalid"; } else if (!sink->IsCompatibleWith(source)) { error = "Sink is not compatible with source"; diff --git a/libcef/browser/media_router/media_sink_impl.cc b/libcef/browser/media_router/media_sink_impl.cc index 0743e3c19..48a2f8fd4 100644 --- a/libcef/browser/media_router/media_sink_impl.cc +++ b/libcef/browser/media_router/media_sink_impl.cc @@ -15,10 +15,6 @@ CefString CefMediaSinkImpl::GetId() { return sink_.id(); } -bool CefMediaSinkImpl::IsValid() { - return true; -} - CefString CefMediaSinkImpl::GetName() { return sink_.name(); } diff --git a/libcef/browser/media_router/media_sink_impl.h b/libcef/browser/media_router/media_sink_impl.h index adaef2459..aa05f3e99 100644 --- a/libcef/browser/media_router/media_sink_impl.h +++ b/libcef/browser/media_router/media_sink_impl.h @@ -19,7 +19,6 @@ class CefMediaSinkImpl : public CefMediaSink { // CefMediaSink methods. CefString GetId() override; - bool IsValid() override; CefString GetName() override; CefString GetDescription() override; IconType GetIconType() override; diff --git a/libcef/browser/media_router/media_source_impl.cc b/libcef/browser/media_router/media_source_impl.cc index 2b722c762..e8e18a416 100644 --- a/libcef/browser/media_router/media_source_impl.cc +++ b/libcef/browser/media_router/media_source_impl.cc @@ -15,10 +15,6 @@ CefString CefMediaSourceImpl::GetId() { return source_.id(); } -bool CefMediaSourceImpl::IsValid() { - return source_.IsValid(); -} - bool CefMediaSourceImpl::IsCastSource() { return !IsDialSource(); } diff --git a/libcef/browser/media_router/media_source_impl.h b/libcef/browser/media_router/media_source_impl.h index 8e5015855..4f87f5ed0 100644 --- a/libcef/browser/media_router/media_source_impl.h +++ b/libcef/browser/media_router/media_source_impl.h @@ -18,7 +18,6 @@ class CefMediaSourceImpl : public CefMediaSource { // CefMediaSource methods. CefString GetId() override; - bool IsValid() override; bool IsCastSource() override; bool IsDialSource() override; diff --git a/libcef/browser/menu_model_impl.cc b/libcef/browser/menu_model_impl.cc index 23e7b3096..341f1a72a 100644 --- a/libcef/browser/menu_model_impl.cc +++ b/libcef/browser/menu_model_impl.cc @@ -12,7 +12,6 @@ #include "base/bind.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" #include "content/public/common/menu_item.h" #include "ui/base/accelerators/accelerator.h" #include "ui/base/models/image_model.h" diff --git a/libcef/browser/native/browser_platform_delegate_native_aura.cc b/libcef/browser/native/browser_platform_delegate_native_aura.cc index e9f5a1d24..89aeec53f 100644 --- a/libcef/browser/native/browser_platform_delegate_native_aura.cc +++ b/libcef/browser/native/browser_platform_delegate_native_aura.cc @@ -226,5 +226,5 @@ int CefBrowserPlatformDelegateNativeAura::TranslateUiChangedButtonFlags( content::RenderWidgetHostViewAura* CefBrowserPlatformDelegateNativeAura::GetHostView() const { return static_cast( - browser_->web_contents()->GetRenderWidgetHostView()); + web_contents_->GetRenderWidgetHostView()); } diff --git a/libcef/browser/native/browser_platform_delegate_native_linux.cc b/libcef/browser/native/browser_platform_delegate_native_linux.cc index 2784d30e5..6ed86840f 100644 --- a/libcef/browser/native/browser_platform_delegate_native_linux.cc +++ b/libcef/browser/native/browser_platform_delegate_native_linux.cc @@ -40,6 +40,11 @@ long GetSystemUptime() { return 0; } +// See https://crbug.com/1066670#c57 for background. +inline x11::Window ToX11Window(::Window window) { + return static_cast(window); +} + } // namespace CefBrowserPlatformDelegateNativeLinux::CefBrowserPlatformDelegateNativeLinux( @@ -87,7 +92,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() { CefWindowDelegateView* delegate_view = new CefWindowDelegateView( GetBackgroundColor(), window_x11_->TopLevelAlwaysOnTop(), GetBoundsChangedCallback()); - delegate_view->Init(window_info_.window, browser_->web_contents(), + delegate_view->Init(ToX11Window(window_info_.window), web_contents_, gfx::Rect(gfx::Point(), rect.size())); window_widget_ = delegate_view->GetWidget(); @@ -99,7 +104,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() { // As an additional requirement on Linux, we must set the colors for the // render widgets in webkit. blink::mojom::RendererPreferences* prefs = - browser_->web_contents()->GetMutableRendererPrefs(); + web_contents_->GetMutableRendererPrefs(); prefs->focus_ring_color = SkColorSetARGB(255, 229, 151, 0); prefs->active_selection_bg_color = SkColorSetRGB(30, 144, 255); @@ -117,7 +122,7 @@ bool CefBrowserPlatformDelegateNativeLinux::CreateHostWindow() { prefs->use_bitmaps = params->use_bitmaps; prefs->subpixel_rendering = params->subpixel_rendering; - browser_->web_contents()->SyncRendererPrefs(); + web_contents_->SyncRendererPrefs(); return true; } @@ -144,10 +149,10 @@ void CefBrowserPlatformDelegateNativeLinux::SendFocusEvent(bool setFocus) { if (!setFocus) return; - if (browser_->web_contents()) { + if (web_contents_) { // Give logical focus to the RenderWidgetHostViewAura in the views // hierarchy. This does not change the native keyboard focus. - browser_->web_contents()->Focus(); + web_contents_->Focus(); } #if defined(USE_X11) @@ -164,6 +169,9 @@ void CefBrowserPlatformDelegateNativeLinux::NotifyMoveOrResizeStarted() { // Call the parent method to dismiss any existing popups. CefBrowserPlatformDelegateNative::NotifyMoveOrResizeStarted(); + if (!web_contents_) + return; + #if defined(USE_X11) if (!window_x11_) return; @@ -180,7 +188,7 @@ void CefBrowserPlatformDelegateNativeLinux::NotifyMoveOrResizeStarted() { // Send updated screen rectangle information to the renderer process so that // popups are displayed in the correct location. content::RenderWidgetHostImpl::From( - browser_->web_contents()->GetRenderViewHost()->GetWidget()) + web_contents_->GetRenderViewHost()->GetWidget()) ->SendScreenRects(); #endif // defined(USE_X11) } diff --git a/libcef/browser/native/browser_platform_delegate_native_mac.mm b/libcef/browser/native/browser_platform_delegate_native_mac.mm index 9dc266618..ea108142b 100644 --- a/libcef/browser/native/browser_platform_delegate_native_mac.mm +++ b/libcef/browser/native/browser_platform_delegate_native_mac.mm @@ -221,8 +221,7 @@ bool CefBrowserPlatformDelegateNativeMac::CreateHostWindow() { // Parent the TabContents to the browser view. const NSRect bounds = [browser_view bounds]; - NSView* native_view = - browser_->web_contents()->GetNativeView().GetNativeNSView(); + NSView* native_view = web_contents_->GetNativeView().GetNativeNSView(); [browser_view addSubview:native_view]; [native_view setFrame:bounds]; [native_view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)]; @@ -314,8 +313,7 @@ void CefBrowserPlatformDelegateNativeMac::SendFocusEvent(bool setFocus) { if (setFocus) { // Give keyboard focus to the native view. - NSView* view = - browser_->web_contents()->GetContentNativeView().GetNativeNSView(); + NSView* view = web_contents_->GetContentNativeView().GetNativeNSView(); DCHECK([view canBecomeKeyView]); [[view window] makeFirstResponder:view]; } @@ -383,9 +381,12 @@ gfx::Point CefBrowserPlatformDelegateNativeMac::GetDialogPosition( } gfx::Size CefBrowserPlatformDelegateNativeMac::GetMaximumDialogSize() { + if (!web_contents_) + return gfx::Size(); + // The dialog should try to fit within the overlay for the web contents. // Note that, for things like print preview, this is just a suggested maximum. - return browser_->web_contents()->GetContainerBounds().size(); + return web_contents_->GetContainerBounds().size(); } content::NativeWebKeyboardEvent @@ -560,6 +561,8 @@ void CefBrowserPlatformDelegateNativeMac::TranslateWebMouseEvent( content::RenderWidgetHostViewMac* CefBrowserPlatformDelegateNativeMac::GetHostView() const { + if (!web_contents_) + return nullptr; return static_cast( - browser_->web_contents()->GetRenderWidgetHostView()); + web_contents_->GetRenderWidgetHostView()); } diff --git a/libcef/browser/native/browser_platform_delegate_native_win.cc b/libcef/browser/native/browser_platform_delegate_native_win.cc index 23e9ee2d1..d240f3bef 100644 --- a/libcef/browser/native/browser_platform_delegate_native_win.cc +++ b/libcef/browser/native/browser_platform_delegate_native_win.cc @@ -199,7 +199,7 @@ bool CefBrowserPlatformDelegateNativeWin::CreateHostWindow() { CefWindowDelegateView* delegate_view = new CefWindowDelegateView( GetBackgroundColor(), always_on_top, GetBoundsChangedCallback()); - delegate_view->Init(window_info_.window, browser_->web_contents(), + delegate_view->Init(window_info_.window, web_contents_, gfx::Rect(0, 0, point.x(), point.y())); window_widget_ = delegate_view->GetWidget(); @@ -249,10 +249,10 @@ void CefBrowserPlatformDelegateNativeWin::SendFocusEvent(bool setFocus) { if (!setFocus) return; - if (browser_->web_contents()) { + if (web_contents_) { // Give logical focus to the RenderWidgetHostViewAura in the views // hierarchy. This does not change the native keyboard focus. - browser_->web_contents()->Focus(); + web_contents_->Focus(); } if (window_widget_) { diff --git a/libcef/browser/native/menu_runner_mac.mm b/libcef/browser/native/menu_runner_mac.mm index 7270a09af..d514e34d2 100644 --- a/libcef/browser/native/menu_runner_mac.mm +++ b/libcef/browser/native/menu_runner_mac.mm @@ -8,7 +8,6 @@ #include "base/compiler_specific.h" #import "base/mac/scoped_sending_event.h" -#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h" #import "ui/base/cocoa/menu_controller.h" #include "ui/gfx/geometry/point.h" diff --git a/libcef/browser/native/menu_runner_win.cc b/libcef/browser/native/menu_runner_win.cc index 3ea125bb0..06db58c71 100644 --- a/libcef/browser/native/menu_runner_win.cc +++ b/libcef/browser/native/menu_runner_win.cc @@ -7,7 +7,6 @@ #include "libcef/browser/browser_host_impl.h" #include "libcef/browser/native/menu_2.h" -#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop_current.h" #include "ui/gfx/geometry/point.h" diff --git a/libcef/browser/native/native_menu_win.cc b/libcef/browser/native/native_menu_win.cc index 3482417ef..6b54369cb 100644 --- a/libcef/browser/native/native_menu_win.cc +++ b/libcef/browser/native/native_menu_win.cc @@ -9,7 +9,6 @@ #include "base/bind.h" #include "base/logging.h" #include "base/memory/ptr_util.h" -#include "base/message_loop/message_loop.h" #include "base/stl_util.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" @@ -132,7 +131,7 @@ class CefNativeMenuWin::MenuHostWindow { RegisterClass(); hwnd_ = CreateWindowEx(l10n_util::GetExtendedStyles(), kWindowClassName, L"", 0, 0, 0, 0, 0, HWND_MESSAGE, NULL, NULL, NULL); - gfx::CheckWindowCreated(hwnd_); + gfx::CheckWindowCreated(hwnd_, ::GetLastError()); gfx::SetWindowUserData(hwnd_, this); } diff --git a/libcef/browser/native/window_x11.cc b/libcef/browser/native/window_x11.cc index ce8bf4764..f821b5cda 100644 --- a/libcef/browser/native/window_x11.cc +++ b/libcef/browser/native/window_x11.cc @@ -19,6 +19,10 @@ namespace { +// Restore Xlib constants that were #undef'ed by gen/ui/gfx/x/xproto.h. +constexpr int CopyFromParent = 0; +constexpr int InputOutput = 1; + const char kAtom[] = "ATOM"; const char kWMDeleteWindow[] = "WM_DELETE_WINDOW"; const char kWMProtocols[] = "WM_PROTOCOLS"; @@ -29,6 +33,19 @@ const char kNetWMState[] = "_NET_WM_STATE"; const char kXdndProxy[] = "XdndProxy"; const char kUTF8String[] = "UTF8_STRING"; +// See https://crbug.com/1066670#c57 for background. +inline x11::Window ToX11Window(::Window window) { + return static_cast(window); +} +inline ::Window ToWindow(x11::Window window) { + return static_cast<::Window>(window); +} + +// See https://crbug.com/1066670#c29 for background. +inline ::Atom GetAtom(const std::string& atom_name) { + return static_cast<::Atom>(gfx::GetAtom(atom_name)); +} + ::Window FindChild(::Display* display, ::Window window) { ::Window root; ::Window parent; @@ -59,7 +76,7 @@ const char kUTF8String[] = "UTF8_STRING"; } top_level_window = window; - if (!ui::PropertyExists(parent, kNetWMPid) || parent == root) { + if (!ui::PropertyExists(ToX11Window(parent), kNetWMPid) || parent == root) { break; } window = parent; @@ -99,7 +116,7 @@ CefWindowX11::CefWindowX11(CefRefPtr browser, 0, // border width CopyFromParent, // depth InputOutput, - CopyFromParent, // visual + nullptr, // visual CWBackPixmap | CWOverrideRedirect, &swa); CHECK(xwindow_); @@ -114,8 +131,8 @@ CefWindowX11::CefWindowX11(CefRefPtr browser, // should listen for activation events and anything else that GTK+ listens // for, and do something useful. ::Atom protocols[2]; - protocols[0] = gfx::GetAtom(kWMDeleteWindow); - protocols[1] = gfx::GetAtom(kNetWMPing); + protocols[0] = GetAtom(kWMDeleteWindow); + protocols[1] = GetAtom(kNetWMPing); XSetWMProtocols(xdisplay_, xwindow_, protocols, 2); // We need a WM_CLIENT_MACHINE and WM_LOCALE_NAME value so we integrate with @@ -128,13 +145,13 @@ CefWindowX11::CefWindowX11(CefRefPtr browser, static_assert(sizeof(long) >= sizeof(pid_t), "pid_t should not be larger than long"); long pid = getpid(); - XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom(kNetWMPid), XA_CARDINAL, 32, + XChangeProperty(xdisplay_, xwindow_, GetAtom(kNetWMPid), XA_CARDINAL, 32, PropModeReplace, reinterpret_cast(&pid), 1); // Set the initial window name, if provided. if (!title.empty()) { - XChangeProperty(xdisplay_, xwindow_, gfx::GetAtom(kNetWMName), - gfx::GetAtom(kUTF8String), 8, PropModeReplace, + XChangeProperty(xdisplay_, xwindow_, GetAtom(kNetWMName), + GetAtom(kUTF8String), 8, PropModeReplace, reinterpret_cast(title.c_str()), title.size()); } @@ -150,9 +167,9 @@ void CefWindowX11::Close() { XEvent ev = {0}; ev.xclient.type = ClientMessage; ev.xclient.window = xwindow_; - ev.xclient.message_type = gfx::GetAtom(kWMProtocols); + ev.xclient.message_type = GetAtom(kWMProtocols); ev.xclient.format = 32; - ev.xclient.data.l[0] = gfx::GetAtom(kWMDeleteWindow); + ev.xclient.data.l[0] = GetAtom(kWMDeleteWindow); ev.xclient.data.l[1] = x11::CurrentTime; XSendEvent(xdisplay_, xwindow_, false, NoEventMask, &ev); @@ -193,17 +210,19 @@ void CefWindowX11::Show() { // that all drag&drop-related messages will be sent to the child // DesktopWindowTreeHostX11. The proxy property is referenced by // DesktopDragDropClientAuraX11::FindWindowFor. - ::Window proxy_target = gfx::kNullAcceleratedWidget; - ui::GetXIDProperty(toplevel_window, kXdndProxy, &proxy_target); + x11::Window window = x11::Window::None; + ui::GetProperty(ToX11Window(toplevel_window), gfx::GetAtom(kXdndProxy), + &window); + ::Window proxy_target = ToWindow(window); if (proxy_target != child) { // Set the proxy target for the top-most window. - XChangeProperty(xdisplay_, toplevel_window, gfx::GetAtom(kXdndProxy), + XChangeProperty(xdisplay_, toplevel_window, GetAtom(kXdndProxy), XA_WINDOW, 32, PropModeReplace, reinterpret_cast(&child), 1); // Do the same for the proxy target per the spec. - XChangeProperty(xdisplay_, child, gfx::GetAtom(kXdndProxy), XA_WINDOW, - 32, PropModeReplace, + XChangeProperty(xdisplay_, child, GetAtom(kXdndProxy), XA_WINDOW, 32, + PropModeReplace, reinterpret_cast(&child), 1); } } @@ -226,7 +245,7 @@ void CefWindowX11::Focus() { if (browser_.get()) { ::Window child = FindChild(xdisplay_, xwindow_); - if (child && ui::IsWindowVisible(child)) { + if (child && ui::IsWindowVisible(ToX11Window(child))) { // Give focus to the child DesktopWindowTreeHostX11. XSetInputFocus(xdisplay_, child, RevertToParent, x11::CurrentTime); } @@ -275,7 +294,8 @@ views::DesktopWindowTreeHostX11* CefWindowX11::GetHost() { ::Window child = FindChild(xdisplay_, xwindow_); if (child) { return static_cast( - views::DesktopWindowTreeHostLinux::GetHostForWidget(child)); + views::DesktopWindowTreeHostLinux::GetHostForWidget( + ToX11Window(child))); } } return nullptr; @@ -297,8 +317,9 @@ uint32_t CefWindowX11::DispatchEvent(const ui::PlatformEvent& event) { // Called by X11EventSourceLibevent to determine whether this XEventDispatcher // implementation is able to process the next translated event sent by it. -void CefWindowX11::CheckCanDispatchNextPlatformEvent(XEvent* xev) { - current_xevent_ = IsTargetedBy(*xev) ? xev : nullptr; +void CefWindowX11::CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) { + XEvent* xev = &x11_event->xlib_event(); + current_xevent_ = IsTargetedBy(*x11_event) ? xev : nullptr; } void CefWindowX11::PlatformEventDispatchFinished() { @@ -309,9 +330,10 @@ ui::PlatformEventDispatcher* CefWindowX11::GetPlatformEventDispatcher() { return this; } -bool CefWindowX11::DispatchXEvent(XEvent* xev) { - if (!IsTargetedBy(*xev)) +bool CefWindowX11::DispatchXEvent(x11::Event* x11_event) { + if (!IsTargetedBy(*x11_event)) return false; + XEvent* xev = &x11_event->xlib_event(); ProcessXEvent(xev); return true; } @@ -327,8 +349,8 @@ void CefWindowX11::ContinueFocus() { bool CefWindowX11::TopLevelAlwaysOnTop() const { ::Window toplevel_window = FindToplevelParent(xdisplay_, xwindow_); - Atom state_atom = gfx::GetAtom("_NET_WM_STATE"); - Atom state_keep_above = gfx::GetAtom("_NET_WM_STATE_KEEP_ABOVE"); + Atom state_atom = GetAtom("_NET_WM_STATE"); + Atom state_keep_above = GetAtom("_NET_WM_STATE_KEEP_ABOVE"); Atom* states; Atom actual_type; @@ -355,9 +377,10 @@ bool CefWindowX11::TopLevelAlwaysOnTop() const { return always_on_top; } -bool CefWindowX11::IsTargetedBy(const XEvent& xev) const { +bool CefWindowX11::IsTargetedBy(const x11::Event& x11_event) const { + const XEvent& xev = x11_event.xlib_event(); ::Window target_window = - (xev.type == GenericEvent) + xev.type == x11::GeGenericEvent::opcode ? static_cast(xev.xcookie.data)->event : xev.xany.window; return target_window == xwindow_; @@ -391,9 +414,9 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) { } case ClientMessage: { Atom message_type = xev->xclient.message_type; - if (message_type == gfx::GetAtom(kWMProtocols)) { + if (message_type == GetAtom(kWMProtocols)) { Atom protocol = static_cast(xev->xclient.data.l[0]); - if (protocol == gfx::GetAtom(kWMDeleteWindow)) { + if (protocol == GetAtom(kWMDeleteWindow)) { // We have received a close message from the window manager. if (!browser_ || browser_->TryCloseBrowser()) { // Allow the close. @@ -409,7 +432,7 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) { delete this; } - } else if (protocol == gfx::GetAtom(kNetWMPing)) { + } else if (protocol == GetAtom(kNetWMPing)) { XEvent reply_event = *xev; reply_event.xclient.window = parent_xwindow_; @@ -444,7 +467,7 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) { break; case PropertyNotify: { ::Atom changed_atom = xev->xproperty.atom; - if (changed_atom == gfx::GetAtom(kNetWMState)) { + if (changed_atom == GetAtom(kNetWMState)) { // State change event like minimize/maximize. if (browser_.get()) { ::Window child = FindChild(xdisplay_, xwindow_); @@ -452,16 +475,18 @@ void CefWindowX11::ProcessXEvent(XEvent* xev) { // Forward the state change to the child DesktopWindowTreeHostX11 // window so that resource usage will be reduced while the window is // minimized. - std::vector<::Atom> atom_list; - if (ui::GetAtomArrayProperty(xwindow_, kNetWMState, &atom_list) && + std::vector atom_list; + if (ui::GetAtomArrayProperty(ToX11Window(xwindow_), kNetWMState, + &atom_list) && !atom_list.empty()) { - ui::SetAtomArrayProperty(child, kNetWMState, "ATOM", atom_list); + ui::SetAtomArrayProperty(ToX11Window(child), kNetWMState, "ATOM", + atom_list); } else { // Set an empty list of property values to pass the check in // DesktopWindowTreeHostX11::OnWMStateUpdated(). XChangeProperty(xdisplay_, child, - gfx::GetAtom(kNetWMState), // name - gfx::GetAtom(kAtom), // type + GetAtom(kNetWMState), // name + GetAtom(kAtom), // type 32, // size in bits of items in 'value' PropModeReplace, NULL, 0); // num items diff --git a/libcef/browser/native/window_x11.h b/libcef/browser/native/window_x11.h index dbf841f01..30fec5d58 100644 --- a/libcef/browser/native/window_x11.h +++ b/libcef/browser/native/window_x11.h @@ -53,10 +53,10 @@ class CefWindowX11 : public ui::PlatformEventDispatcher, uint32_t DispatchEvent(const ui::PlatformEvent& event) override; // ui::XEventDispatcher methods: - void CheckCanDispatchNextPlatformEvent(XEvent* xev) override; + void CheckCanDispatchNextPlatformEvent(x11::Event* x11_event) override; void PlatformEventDispatchFinished() override; ui::PlatformEventDispatcher* GetPlatformEventDispatcher() override; - bool DispatchXEvent(XEvent* event) override; + bool DispatchXEvent(x11::Event* x11_event) override; ::Window xwindow() const { return xwindow_; } gfx::Rect bounds() const { return bounds_; } @@ -66,7 +66,7 @@ class CefWindowX11 : public ui::PlatformEventDispatcher, private: void ContinueFocus(); - bool IsTargetedBy(const XEvent& xev) const; + bool IsTargetedBy(const x11::Event& x11_event) const; void ProcessXEvent(XEvent* xev); CefRefPtr browser_; diff --git a/libcef/browser/net/internal_scheme_handler.cc b/libcef/browser/net/internal_scheme_handler.cc index 5c79f81f8..d476d850d 100644 --- a/libcef/browser/net/internal_scheme_handler.cc +++ b/libcef/browser/net/internal_scheme_handler.cc @@ -10,6 +10,7 @@ #include "libcef/common/app_manager.h" +#include "base/notreached.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" #include "base/threading/thread_restrictions.h" diff --git a/libcef/browser/net_service/browser_urlrequest_impl.cc b/libcef/browser/net_service/browser_urlrequest_impl.cc index b429bbdf2..f203856bb 100644 --- a/libcef/browser/net_service/browser_urlrequest_impl.cc +++ b/libcef/browser/net_service/browser_urlrequest_impl.cc @@ -21,7 +21,6 @@ #include "base/lazy_instance.h" #include "base/logging.h" #include "base/memory/weak_ptr.h" -#include "base/message_loop/message_loop.h" #include "base/strings/string_util.h" #include "content/public/browser/global_request_id.h" #include "content/public/browser/render_frame_host.h" diff --git a/libcef/browser/net_service/cookie_helper.cc b/libcef/browser/net_service/cookie_helper.cc index cea9bb9b7..2a9e2a7cc 100644 --- a/libcef/browser/net_service/cookie_helper.cc +++ b/libcef/browser/net_service/cookie_helper.cc @@ -34,7 +34,7 @@ network::mojom::CookieManager* GetCookieManager( void ContinueWithLoadedCookies(const AllowCookieCallback& allow_cookie_callback, DoneCookieCallback done_callback, - const net::CookieStatusList& cookies) { + const net::CookieAccessResultList& cookies) { CEF_REQUIRE_IOT(); net::CookieList allowed_cookies; for (const auto& status : cookies) { @@ -48,8 +48,8 @@ void ContinueWithLoadedCookies(const AllowCookieCallback& allow_cookie_callback, void GetCookieListCallback(const AllowCookieCallback& allow_cookie_callback, DoneCookieCallback done_callback, - const net::CookieStatusList& included_cookies, - const net::CookieStatusList&) { + const net::CookieAccessResultList& included_cookies, + const net::CookieAccessResultList&) { CEF_REQUIRE_UIT(); CEF_POST_TASK(CEF_IOT, base::BindOnce(ContinueWithLoadedCookies, allow_cookie_callback, @@ -80,10 +80,9 @@ struct SaveCookiesProgress { int num_cookie_lines_left_; }; -void SetCanonicalCookieCallback( - SaveCookiesProgress* progress, - const net::CanonicalCookie& cookie, - net::CanonicalCookie::CookieInclusionStatus status) { +void SetCanonicalCookieCallback(SaveCookiesProgress* progress, + const net::CanonicalCookie& cookie, + net::CookieInclusionStatus status) { CEF_REQUIRE_UIT(); progress->num_cookie_lines_left_--; if (status.IsInclude()) { @@ -132,8 +131,8 @@ void SaveCookiesOnUIThread(content::BrowserContext* browser_context, SetCanonicalCookieCallback( progress, net::CanonicalCookie(), - net::CanonicalCookie::CookieInclusionStatus( - net::CanonicalCookie::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR)); + net::CookieInclusionStatus( + net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR)); } } // namespace @@ -203,7 +202,7 @@ void SaveCookies(content::BrowserContext* browser_context, while (headers->EnumerateHeader(&iter, name, &cookie_string)) { total_count++; - net::CanonicalCookie::CookieInclusionStatus returned_status; + net::CookieInclusionStatus returned_status; std::unique_ptr cookie = net::CanonicalCookie::Create( request.url, cookie_string, base::Time::Now(), base::make_optional(response_date), &returned_status); diff --git a/libcef/browser/net_service/cookie_manager_impl.cc b/libcef/browser/net_service/cookie_manager_impl.cc index 5d9453737..033812e81 100644 --- a/libcef/browser/net_service/cookie_manager_impl.cc +++ b/libcef/browser/net_service/cookie_manager_impl.cc @@ -45,7 +45,7 @@ void RunAsyncCompletionOnUIThread(CefRefPtr callback) { // Always execute the callback asynchronously. void SetCookieCallbackImpl(CefRefPtr callback, - net::CanonicalCookie::CookieInclusionStatus status) { + net::CookieInclusionStatus status) { if (!callback.get()) return; if (!status.IsInclude()) { @@ -104,8 +104,8 @@ void GetAllCookiesCallbackImpl( void GetCookiesCallbackImpl( CefRefPtr visitor, const CefBrowserContext::Getter& browser_context_getter, - const net::CookieStatusList& include_cookies, - const net::CookieStatusList&) { + const net::CookieAccessResultList& include_cookies, + const net::CookieAccessResultList&) { net::CookieList cookies; for (const auto& status : include_cookies) { cookies.push_back(status.cookie); @@ -259,10 +259,9 @@ bool CefCookieManagerImpl::SetCookie(const CefString& url, priority); if (!canonical_cookie) { - SetCookieCallbackImpl(callback, - net::CanonicalCookie::CookieInclusionStatus( - net::CanonicalCookie::CookieInclusionStatus:: - EXCLUDE_UNKNOWN_ERROR)); + SetCookieCallbackImpl( + callback, net::CookieInclusionStatus( + net::CookieInclusionStatus::EXCLUDE_UNKNOWN_ERROR)); return true; } diff --git a/libcef/browser/net_service/resource_request_handler_wrapper.cc b/libcef/browser/net_service/resource_request_handler_wrapper.cc index e4428c892..904796bd0 100644 --- a/libcef/browser/net_service/resource_request_handler_wrapper.cc +++ b/libcef/browser/net_service/resource_request_handler_wrapper.cc @@ -20,7 +20,6 @@ #include "libcef/common/response_impl.h" #include "chrome/browser/profiles/profile.h" -#include "chrome/common/chrome_features.h" #include "components/language/core/browser/pref_names.h" #include "components/prefs/pref_service.h" #include "content/public/browser/browser_context.h" @@ -98,9 +97,7 @@ std::string GetAcceptLanguageList(content::BrowserContext* browser_context, // Match the logic in chrome/browser/net/profile_network_context_service.cc. std::string ComputeAcceptLanguageFromPref(const std::string& language_pref) { std::string accept_languages_str = - base::FeatureList::IsEnabled(features::kUseNewAcceptLanguageHeader) - ? net::HttpUtil::ExpandLanguageList(language_pref) - : language_pref; + net::HttpUtil::ExpandLanguageList(language_pref); return net::HttpUtil::GenerateAcceptLanguageHeader(accept_languages_str); } diff --git a/libcef/browser/net_service/response_filter_wrapper.cc b/libcef/browser/net_service/response_filter_wrapper.cc index 770286884..ec81b92f3 100644 --- a/libcef/browser/net_service/response_filter_wrapper.cc +++ b/libcef/browser/net_service/response_filter_wrapper.cc @@ -6,6 +6,7 @@ #include +#include "base/logging.h" #include "mojo/public/cpp/system/simple_watcher.h" #include "mojo/public/cpp/system/string_data_source.h" diff --git a/libcef/browser/net_service/response_filter_wrapper.h b/libcef/browser/net_service/response_filter_wrapper.h index 241007f92..be3b4c0e2 100644 --- a/libcef/browser/net_service/response_filter_wrapper.h +++ b/libcef/browser/net_service/response_filter_wrapper.h @@ -7,6 +7,7 @@ #include "include/cef_response_filter.h" +#include "base/callback_forward.h" #include "mojo/public/cpp/system/data_pipe.h" namespace net_service { diff --git a/libcef/browser/osr/browser_platform_delegate_osr.cc b/libcef/browser/osr/browser_platform_delegate_osr.cc index 22d01b9ec..7e2730b41 100644 --- a/libcef/browser/osr/browser_platform_delegate_osr.cc +++ b/libcef/browser/osr/browser_platform_delegate_osr.cc @@ -531,7 +531,8 @@ void CefBrowserPlatformDelegateOsr::DragSourceSystemDragEnded() { if (!drag_start_rwh_) return; - content::WebContents* web_contents = browser_->web_contents(); + content::WebContentsImpl* web_contents = + static_cast(browser_->web_contents()); if (!web_contents) return; diff --git a/libcef/browser/osr/render_widget_host_view_osr.cc b/libcef/browser/osr/render_widget_host_view_osr.cc index 7517119d4..16d1edc06 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.cc +++ b/libcef/browser/osr/render_widget_host_view_osr.cc @@ -53,6 +53,11 @@ #include "ui/gfx/geometry/dip_util.h" #include "ui/gfx/geometry/size_conversions.h" +#if defined(USE_X11) +#include "ui/base/x/x11_cursor.h" +#include "ui/base/x/x11_util.h" +#endif + namespace { // The maximum number of damage rects to cache for outstanding frame requests @@ -187,6 +192,17 @@ ui::ImeTextSpan::UnderlineStyle GetImeUnderlineStyle( return ui::ImeTextSpan::UnderlineStyle::kSolid; } +#if defined(USE_AURA) +CefCursorHandle ToCursorHandle(ui::PlatformCursor cursor) { +#if defined(USE_X11) + // See https://crbug.com/1029142 for background. + return static_cast(cursor)->xcursor(); +#else + return cursor; +#endif +} +#endif // defined(USE_AURA) + } // namespace CefRenderWidgetHostViewOSR::CefRenderWidgetHostViewOSR( @@ -611,10 +627,10 @@ void CefRenderWidgetHostViewOSR::UpdateCursor( #if defined(USE_AURA) content::WebCursor web_cursor(ui_cursor); - ui::PlatformCursor platform_cursor; + CefCursorHandle platform_cursor; if (ui_cursor.type() == ui::mojom::CursorType::kCustom) { // |web_cursor| owns the resulting |platform_cursor|. - platform_cursor = web_cursor.GetPlatformCursor(ui_cursor); + platform_cursor = ToCursorHandle(web_cursor.GetPlatformCursor(ui_cursor)); } else { platform_cursor = GetPlatformCursor(ui_cursor.type()); } @@ -1330,8 +1346,7 @@ void CefRenderWidgetHostViewOSR::OnUpdateTextInputStateCalled( content::TextInputManager* text_input_manager, content::RenderWidgetHostViewBase* updated_view, bool did_update_state) { - const content::TextInputState* state = - text_input_manager->GetTextInputState(); + const auto state = text_input_manager->GetTextInputState(); if (state && !state->show_ime_if_needed) return; diff --git a/libcef/browser/osr/render_widget_host_view_osr.h b/libcef/browser/osr/render_widget_host_view_osr.h index 6ff29fcfd..52e9b5abe 100644 --- a/libcef/browser/osr/render_widget_host_view_osr.h +++ b/libcef/browser/osr/render_widget_host_view_osr.h @@ -36,10 +36,6 @@ #include "ui/events/gesture_detection/motion_event_generic.h" #include "ui/gfx/geometry/rect.h" -#if defined(OS_LINUX) -#include "ui/base/x/x11_util.h" -#endif - #if defined(OS_MACOSX) #include "content/browser/renderer_host/browser_compositor_view_mac.h" #endif @@ -68,6 +64,9 @@ class CefVideoConsumerOSR; class CefWebContentsViewOSR; #if defined(USE_X11) +namespace ui { +class XScopedCursor; +} class CefWindowX11; #endif @@ -324,7 +323,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase, void UpdateBackgroundColorFromRenderer(SkColor color); #if defined(USE_AURA) - ui::PlatformCursor GetPlatformCursor(ui::mojom::CursorType type); + CefCursorHandle GetPlatformCursor(ui::mojom::CursorType type); #endif // The background color of the web content. diff --git a/libcef/browser/osr/render_widget_host_view_osr_linux.cc b/libcef/browser/osr/render_widget_host_view_osr_linux.cc index 0e4025b5b..37e8709cb 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_linux.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_linux.cc @@ -179,7 +179,7 @@ XCursorCache* cursor_cache = nullptr; } // namespace #endif // defined(USE_X11) -ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( +CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor( ui::mojom::CursorType type) { #if defined(USE_X11) if (type == ui::mojom::CursorType::kNone) { diff --git a/libcef/browser/osr/render_widget_host_view_osr_win.cc b/libcef/browser/osr/render_widget_host_view_osr_win.cc index 46ac0eb1e..3e68e6bbc 100644 --- a/libcef/browser/osr/render_widget_host_view_osr_win.cc +++ b/libcef/browser/osr/render_widget_host_view_osr_win.cc @@ -153,7 +153,7 @@ bool IsSystemCursorID(LPCWSTR cursor_id) { } // namespace -ui::PlatformCursor CefRenderWidgetHostViewOSR::GetPlatformCursor( +CefCursorHandle CefRenderWidgetHostViewOSR::GetPlatformCursor( ui::mojom::CursorType type) { // Using a dark 1x1 bit bmp kNone cursor may still cause DWM to do composition // work unnecessarily. Better to totally remove it from the screen. diff --git a/libcef/browser/osr/video_consumer_osr.cc b/libcef/browser/osr/video_consumer_osr.cc index d52725d7d..3af1fc8b3 100644 --- a/libcef/browser/osr/video_consumer_osr.cc +++ b/libcef/browser/osr/video_consumer_osr.cc @@ -106,8 +106,7 @@ void CefVideoConsumerOSR::OnFrameCaptured( // API requires a non-const pointer. So, cast away the const. void* const pixels = const_cast(mapping.memory()); - media::VideoFrameMetadata metadata; - metadata.MergeInternalValuesFrom(info->metadata); + media::VideoFrameMetadata metadata = info->metadata; gfx::Rect damage_rect; if (bounds_in_pixels_) { @@ -123,9 +122,10 @@ void CefVideoConsumerOSR::OnFrameCaptured( // This rectangle is relative to the full frame data, i.e. [0, 0, // coded_size.width(), coded_size.height()]. It does not have to be // fully contained within visible_rect. - if (!metadata.GetRect(media::VideoFrameMetadata::CAPTURE_UPDATE_RECT, - &damage_rect) || - damage_rect.IsEmpty()) { + if (metadata.capture_update_rect) { + damage_rect = *metadata.capture_update_rect; + } + if (damage_rect.IsEmpty()) { damage_rect = gfx::Rect(info->coded_size); } } diff --git a/libcef/browser/osr/web_contents_view_osr.cc b/libcef/browser/osr/web_contents_view_osr.cc index 92f1adfa8..3d3649158 100644 --- a/libcef/browser/osr/web_contents_view_osr.cc +++ b/libcef/browser/osr/web_contents_view_osr.cc @@ -48,8 +48,8 @@ gfx::NativeWindow CefWebContentsViewOSR::GetTopLevelNativeWindow() const { return gfx::NativeWindow(); } -void CefWebContentsViewOSR::GetContainerBounds(gfx::Rect* out) const { - *out = GetViewBounds(); +gfx::Rect CefWebContentsViewOSR::GetContainerBounds() const { + return GetViewBounds(); } void CefWebContentsViewOSR::Focus() {} @@ -150,7 +150,8 @@ void CefWebContentsViewOSR::StartDragging( browser->StartDragging(drop_data, allowed_ops, image, image_offset, event_info, source_rwh); } else if (web_contents_) { - web_contents_->SystemDragEnded(source_rwh); + static_cast(web_contents_) + ->SystemDragEnded(source_rwh); } } diff --git a/libcef/browser/osr/web_contents_view_osr.h b/libcef/browser/osr/web_contents_view_osr.h index 8d918ac57..fd5ca2b40 100644 --- a/libcef/browser/osr/web_contents_view_osr.h +++ b/libcef/browser/osr/web_contents_view_osr.h @@ -35,7 +35,7 @@ class CefWebContentsViewOSR : public content::WebContentsView, gfx::NativeView GetNativeView() const override; gfx::NativeView GetContentNativeView() const override; gfx::NativeWindow GetTopLevelNativeWindow() const override; - void GetContainerBounds(gfx::Rect* out) const override; + gfx::Rect GetContainerBounds() const override; void Focus() override; void SetInitialFocus() override; void StoreFocus() override; diff --git a/libcef/browser/path_util_impl.cc b/libcef/browser/path_util_impl.cc index 4d30d0d70..7e33cf5a2 100644 --- a/libcef/browser/path_util_impl.cc +++ b/libcef/browser/path_util_impl.cc @@ -6,6 +6,7 @@ #include "base/files/file_path.h" #include "base/logging.h" +#include "base/notreached.h" #include "base/path_service.h" #include "chrome/common/chrome_paths.h" diff --git a/libcef/browser/printing/print_dialog_linux.cc b/libcef/browser/printing/print_dialog_linux.cc index 2296ead3f..bd0fc967a 100644 --- a/libcef/browser/printing/print_dialog_linux.cc +++ b/libcef/browser/printing/print_dialog_linux.cc @@ -317,7 +317,7 @@ void CefPrintDialogLinux::OnPrintCancel() { void CefPrintDialogLinux::OnJobCompleted() { CEF_POST_BACKGROUND_TASK( - base::Bind(base::IgnoreResult(&base::DeleteFile), path_to_pdf_, false)); + base::BindOnce(base::GetDeleteFileCallback(), path_to_pdf_)); // Printing finished. Matches AddRef() in PrintDocument(); Release(); diff --git a/libcef/browser/printing/print_view_manager.cc b/libcef/browser/printing/print_view_manager.cc index 5db1d1e81..a2ad9db0b 100644 --- a/libcef/browser/printing/print_view_manager.cc +++ b/libcef/browser/printing/print_view_manager.cc @@ -139,8 +139,8 @@ void StopWorker(int document_cookie) { std::unique_ptr printer_query = queue->PopPrinterQuery(document_cookie); if (printer_query.get()) { - base::PostTask( - FROM_HERE, {BrowserThread::IO}, + content::GetIOThreadTaskRunner({})->PostTask( + FROM_HERE, base::BindOnce(&PrinterQuery::StopWorker, std::move(printer_query))); } } @@ -160,7 +160,8 @@ void SavePdfFile(scoped_refptr data, bool ok = file.IsValid() && metafile.SaveTo(&file); if (!callback.is_null()) { - base::PostTask(FROM_HERE, {BrowserThread::UI}, base::Bind(callback, ok)); + content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE, + base::Bind(callback, ok)); } } @@ -193,9 +194,8 @@ bool CefPrintViewManager::PrintToPDF(content::RenderFrameHost* rfh, if (pdf_print_state_) return false; - // Don't print interstitials or crashed tabs. - if (!web_contents() || web_contents()->ShowingInterstitialPage() || - web_contents()->IsCrashed()) { + // Don't print crashed tabs. + if (!web_contents() || web_contents()->IsCrashed()) { return false; } @@ -342,8 +342,8 @@ void CefPrintViewManager::TerminatePdfPrintJob() { if (!pdf_print_state_->callback_.is_null()) { // Execute the callback. - base::PostTask(FROM_HERE, {BrowserThread::UI}, - base::Bind(pdf_print_state_->callback_, false)); + content::GetUIThreadTaskRunner({})->PostTask( + FROM_HERE, base::Bind(pdf_print_state_->callback_, false)); } // Reset state information. diff --git a/libcef/browser/printing/printing_message_filter.cc b/libcef/browser/printing/printing_message_filter.cc index cfe0e2d50..3255b75b5 100644 --- a/libcef/browser/printing/printing_message_filter.cc +++ b/libcef/browser/printing/printing_message_filter.cc @@ -79,8 +79,7 @@ CefPrintingMessageFilter::CefPrintingMessageFilter(int render_process_id, ->Subscribe(base::Bind(&CefPrintingMessageFilter::ShutdownOnUIThread, base::Unretained(this))); is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs()); - is_printing_enabled_.MoveToSequence( - base::CreateSingleThreadTaskRunner({BrowserThread::IO})); + is_printing_enabled_.MoveToSequence(content::GetIOThreadTaskRunner({})); } void CefPrintingMessageFilter::EnsureShutdownNotifierFactoryBuilt() { diff --git a/libcef/browser/process_util_impl.cc b/libcef/browser/process_util_impl.cc index fb42a9558..31a5fe8d0 100644 --- a/libcef/browser/process_util_impl.cc +++ b/libcef/browser/process_util_impl.cc @@ -6,6 +6,7 @@ #include "libcef/common/command_line_impl.h" #include "base/logging.h" +#include "base/notreached.h" #include "base/process/launch.h" #include "content/public/browser/child_process_launcher_utils.h" diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index c8ff3d28d..f74b9edd8 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -357,7 +357,7 @@ bool CefRequestContextImpl::ClearSchemeHandlerFactories() { void CefRequestContextImpl::PurgePluginListCache(bool reload_pages) { GetBrowserContext( - base::CreateSingleThreadTaskRunner({BrowserThread::UI}), + content::GetUIThreadTaskRunner({}), base::Bind(&CefRequestContextImpl::PurgePluginListCacheInternal, this, reload_pages)); } @@ -489,7 +489,7 @@ bool CefRequestContextImpl::SetPreference(const CefString& name, void CefRequestContextImpl::ClearCertificateExceptions( CefRefPtr callback) { GetBrowserContext( - base::CreateSingleThreadTaskRunner({BrowserThread::UI}), + content::GetUIThreadTaskRunner({}), base::Bind(&CefRequestContextImpl::ClearCertificateExceptionsInternal, this, callback)); } @@ -497,7 +497,7 @@ void CefRequestContextImpl::ClearCertificateExceptions( void CefRequestContextImpl::ClearHttpAuthCredentials( CefRefPtr callback) { GetBrowserContext( - base::CreateSingleThreadTaskRunner({BrowserThread::UI}), + content::GetUIThreadTaskRunner({}), base::Bind(&CefRequestContextImpl::ClearHttpAuthCredentialsInternal, this, callback)); } @@ -505,7 +505,7 @@ void CefRequestContextImpl::ClearHttpAuthCredentials( void CefRequestContextImpl::CloseAllConnections( CefRefPtr callback) { GetBrowserContext( - base::CreateSingleThreadTaskRunner({BrowserThread::UI}), + content::GetUIThreadTaskRunner({}), base::Bind(&CefRequestContextImpl::CloseAllConnectionsInternal, this, callback)); } @@ -513,7 +513,7 @@ void CefRequestContextImpl::CloseAllConnections( void CefRequestContextImpl::ResolveHost( const CefString& origin, CefRefPtr callback) { - GetBrowserContext(base::CreateSingleThreadTaskRunner({BrowserThread::UI}), + GetBrowserContext(content::GetUIThreadTaskRunner({}), base::Bind(&CefRequestContextImpl::ResolveHostInternal, this, origin, callback)); } diff --git a/libcef/browser/views/view_util.cc b/libcef/browser/views/view_util.cc index 4e22f99e4..0430839e7 100644 --- a/libcef/browser/views/view_util.cc +++ b/libcef/browser/views/view_util.cc @@ -119,6 +119,15 @@ class UserData : public base::SupportsUserData::Data { CefView* view_ref_; }; +inline CefWindowHandle ToWindowHandle(gfx::AcceleratedWidget widget) { +#if defined(USE_X11) + // See https://crbug.com/1066670#c57 for background. + return static_cast(widget); +#else + return widget; +#endif +} + } // namespace const SkColor kDefaultBackgroundColor = SkColorSetARGB(255, 255, 255, 255); @@ -304,7 +313,7 @@ CefWindowHandle GetWindowHandle(views::Widget* widget) { if (widget) { aura::Window* window = widget->GetNativeWindow(); if (window && window->GetRootWindow()) - return window->GetHost()->GetAcceleratedWidget(); + return ToWindowHandle(window->GetHost()->GetAcceleratedWidget()); } return kNullWindowHandle; } diff --git a/libcef/browser/xml_reader_impl.cc b/libcef/browser/xml_reader_impl.cc index 5a18a6f3e..193575d45 100644 --- a/libcef/browser/xml_reader_impl.cc +++ b/libcef/browser/xml_reader_impl.cc @@ -3,9 +3,12 @@ // can be found in the LICENSE file. #include "libcef/browser/xml_reader_impl.h" -#include "base/logging.h" + #include "include/cef_stream.h" +#include "base/logging.h" +#include "base/notreached.h" + // Static functions // static diff --git a/libcef/browser/zip_reader_impl.cc b/libcef/browser/zip_reader_impl.cc index 57bc299f8..ff61ba894 100644 --- a/libcef/browser/zip_reader_impl.cc +++ b/libcef/browser/zip_reader_impl.cc @@ -5,6 +5,7 @@ #include "libcef/browser/zip_reader_impl.h" #include #include "base/logging.h" +#include "base/notreached.h" #include "include/cef_stream.h" // Static functions diff --git a/libcef/common/cef_crash_report_upload_thread.cc b/libcef/common/cef_crash_report_upload_thread.cc index 1c81feb29..34c5fb647 100644 --- a/libcef/common/cef_crash_report_upload_thread.cc +++ b/libcef/common/cef_crash_report_upload_thread.cc @@ -4,6 +4,7 @@ #include "libcef/common/cef_crash_report_upload_thread.h" +#include "base/notreached.h" #include "libcef/common/cef_crash_report_utils.h" #include "third_party/crashpad/crashpad/client/settings.h" diff --git a/libcef/common/crash_reporter_client.cc b/libcef/common/crash_reporter_client.cc index 964014f78..55310772f 100644 --- a/libcef/common/crash_reporter_client.cc +++ b/libcef/common/crash_reporter_client.cc @@ -15,6 +15,7 @@ #include "base/stl_util.h" #include "base/strings/string16.h" #include "base/strings/string_number_conversions.h" +#include "base/strings/string_piece.h" #include "base/strings/string_split.h" #include "base/strings/string_util.h" #include "base/strings/utf_string_conversions.h" diff --git a/libcef/common/crash_reporter_client.h b/libcef/common/crash_reporter_client.h index b0c9d6ed4..673088df2 100644 --- a/libcef/common/crash_reporter_client.h +++ b/libcef/common/crash_reporter_client.h @@ -14,6 +14,7 @@ #include "include/cef_version.h" #include "base/macros.h" +#include "base/strings/string_piece_forward.h" #include "base/synchronization/lock.h" #include "build/build_config.h" #include "components/crash/core/app/crash_reporter_client.h" diff --git a/libcef/common/crash_reporting.cc b/libcef/common/crash_reporting.cc index d4bf6fd6b..5661e4466 100644 --- a/libcef/common/crash_reporting.cc +++ b/libcef/common/crash_reporting.cc @@ -11,6 +11,7 @@ #include "base/base_switches.h" #include "base/command_line.h" #include "base/debug/crash_logging.h" +#include "base/logging.h" #include "base/stl_util.h" #include "base/strings/string_piece.h" #include "base/strings/string_util.h" diff --git a/libcef/common/drag_data_impl.cc b/libcef/common/drag_data_impl.cc index 1b9eeda0c..7fbd282c1 100644 --- a/libcef/common/drag_data_impl.cc +++ b/libcef/common/drag_data_impl.cc @@ -81,12 +81,12 @@ CefString CefDragDataImpl::GetLinkMetadata() { CefString CefDragDataImpl::GetFragmentText() { base::AutoLock lock_scope(lock_); - return data_.text.is_null() ? CefString() : CefString(data_.text.string()); + return data_.text ? CefString(*data_.text) : CefString(); } CefString CefDragDataImpl::GetFragmentHtml() { base::AutoLock lock_scope(lock_); - return data_.html.is_null() ? CefString() : CefString(data_.html.string()); + return data_.html ? CefString(*data_.html) : CefString(); } CefString CefDragDataImpl::GetFragmentBaseURL() { @@ -96,8 +96,7 @@ CefString CefDragDataImpl::GetFragmentBaseURL() { CefString CefDragDataImpl::GetFileName() { base::AutoLock lock_scope(lock_); - base::Optional filename = - data_.GetSafeFilenameForImageFileContents(); + auto filename = data_.GetSafeFilenameForImageFileContents(); return filename ? CefString(filename->value()) : CefString(); } @@ -148,13 +147,13 @@ void CefDragDataImpl::SetLinkMetadata(const CefString& data) { void CefDragDataImpl::SetFragmentText(const CefString& text) { base::AutoLock lock_scope(lock_); CHECK_READONLY_RETURN_VOID(); - data_.text = base::NullableString16(text.ToString16(), false); + data_.text = text.ToString16(); } void CefDragDataImpl::SetFragmentHtml(const CefString& fragment) { base::AutoLock lock_scope(lock_); CHECK_READONLY_RETURN_VOID(); - data_.html = base::NullableString16(fragment.ToString16(), false); + data_.html = fragment.ToString16(); } void CefDragDataImpl::SetFragmentBaseURL(const CefString& fragment) { diff --git a/libcef/common/net/net_resource_provider.cc b/libcef/common/net/net_resource_provider.cc index 229439d4c..ee98b5783 100644 --- a/libcef/common/net/net_resource_provider.cc +++ b/libcef/common/net/net_resource_provider.cc @@ -4,6 +4,7 @@ #include "libcef/common/net/net_resource_provider.h" +#include "base/logging.h" #include "chrome/common/net/net_resource_provider.h" scoped_refptr NetResourceProvider(int key) { diff --git a/libcef/common/net/upload_element.h b/libcef/common/net/upload_element.h index 9fb487d17..8d0f0d3e9 100644 --- a/libcef/common/net/upload_element.h +++ b/libcef/common/net/upload_element.h @@ -11,6 +11,7 @@ #include #include "base/files/file_path.h" +#include "base/macros.h" #include "base/time/time.h" #include "net/base/net_export.h" diff --git a/libcef/common/resource_util.cc b/libcef/common/resource_util.cc index 3b7e0b2b6..7d0fe5822 100644 --- a/libcef/common/resource_util.cc +++ b/libcef/common/resource_util.cc @@ -11,6 +11,7 @@ #include "base/command_line.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/notreached.h" #include "base/path_service.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" diff --git a/libcef/common/task_runner_impl.cc b/libcef/common/task_runner_impl.cc index 488e1fce0..4c0895d28 100644 --- a/libcef/common/task_runner_impl.cc +++ b/libcef/common/task_runner_impl.cc @@ -8,7 +8,6 @@ #include "base/bind.h" #include "base/location.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" #include "base/task/post_task.h" #include "base/threading/thread_task_runner_handle.h" #include "content/public/browser/browser_task_traits.h" diff --git a/libcef/common/urlrequest_impl.cc b/libcef/common/urlrequest_impl.cc index d38a688f4..039a80dec 100644 --- a/libcef/common/urlrequest_impl.cc +++ b/libcef/common/urlrequest_impl.cc @@ -6,11 +6,11 @@ #include "libcef/browser/net_service/browser_urlrequest_impl.h" #include "libcef/common/app_manager.h" #include "libcef/common/task_runner_impl.h" -#include "libcef/renderer/render_urlrequest_impl.h" #include "libcef/features/runtime_checks.h" +#include "libcef/renderer/render_urlrequest_impl.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" +#include "base/notreached.h" #include "content/public/common/content_client.h" // static diff --git a/libcef/common/value_base.h b/libcef/common/value_base.h index 3fd1c9225..de86a418f 100644 --- a/libcef/common/value_base.h +++ b/libcef/common/value_base.h @@ -12,6 +12,7 @@ #include "base/logging.h" #include "base/memory/ref_counted.h" +#include "base/notreached.h" #include "base/synchronization/lock.h" #include "base/thread_annotations.h" #include "base/threading/platform_thread.h" diff --git a/libcef/common/waitable_event_impl.cc b/libcef/common/waitable_event_impl.cc index 81217bb0a..ee34451c7 100644 --- a/libcef/common/waitable_event_impl.cc +++ b/libcef/common/waitable_event_impl.cc @@ -6,6 +6,7 @@ #include "include/cef_task.h" +#include "base/notreached.h" #include "base/time/time.h" namespace { diff --git a/libcef/renderer/blink_glue.cc b/libcef/renderer/blink_glue.cc index 36d8731c5..d82b7ebff 100644 --- a/libcef/renderer/blink_glue.cc +++ b/libcef/renderer/blink_glue.cc @@ -24,6 +24,7 @@ #include "third_party/blink/renderer/core/editing/serializers/serialization.h" #include "third_party/blink/renderer/core/exported/web_view_impl.h" #include "third_party/blink/renderer/core/frame/frame_owner.h" +#include "third_party/blink/renderer/core/frame/local_dom_window.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/frame/settings.h" #include "third_party/blink/renderer/core/frame/web_local_frame_impl.h" @@ -150,7 +151,7 @@ v8::MaybeLocal CallV8Function(v8::Local context, blink::LocalFrame* frame = blink::ToLocalFrameIfNotDetached(context); DCHECK(frame); if (frame && - frame->GetDocument()->CanExecuteScripts(blink::kAboutToExecuteScript)) { + frame->DomWindow()->CanExecuteScripts(blink::kAboutToExecuteScript)) { func_rv = blink::V8ScriptRunner::CallFunction( function, frame->GetDocument()->GetExecutionContext(), receiver, argc, args, isolate); diff --git a/libcef/renderer/blink_glue.h b/libcef/renderer/blink_glue.h index 21d6bc12e..6f81e8ce9 100644 --- a/libcef/renderer/blink_glue.h +++ b/libcef/renderer/blink_glue.h @@ -13,6 +13,7 @@ #include "include/internal/cef_types.h" +#include "base/macros.h" #include "third_party/blink/public/platform/web_common.h" #include "third_party/blink/renderer/bindings/core/v8/sanitize_script_errors.h" #include "v8/include/v8.h" diff --git a/libcef/renderer/render_frame_observer.cc b/libcef/renderer/render_frame_observer.cc index 02cce72db..0b8435f05 100644 --- a/libcef/renderer/render_frame_observer.cc +++ b/libcef/renderer/render_frame_observer.cc @@ -51,7 +51,6 @@ bool CefRenderFrameObserver::OnAssociatedInterfaceRequestForFrame( } void CefRenderFrameObserver::DidCommitProvisionalLoad( - bool is_same_document_navigation, ui::PageTransition transition) { if (!frame_) return; diff --git a/libcef/renderer/render_frame_observer.h b/libcef/renderer/render_frame_observer.h index d395e4bba..d61fa92aa 100644 --- a/libcef/renderer/render_frame_observer.h +++ b/libcef/renderer/render_frame_observer.h @@ -28,8 +28,7 @@ class CefRenderFrameObserver : public content::RenderFrameObserver { bool OnAssociatedInterfaceRequestForFrame( const std::string& interface_name, mojo::ScopedInterfaceEndpointHandle* handle) override; - void DidCommitProvisionalLoad(bool is_same_document_navigation, - ui::PageTransition transition) override; + void DidCommitProvisionalLoad(ui::PageTransition transition) override; void DidFailProvisionalLoad() override; void DidFinishLoad() override; void FrameDetached() override; diff --git a/libcef/renderer/render_urlrequest_impl.cc b/libcef/renderer/render_urlrequest_impl.cc index 4749d644f..742554d4a 100644 --- a/libcef/renderer/render_urlrequest_impl.cc +++ b/libcef/renderer/render_urlrequest_impl.cc @@ -14,7 +14,6 @@ #include "libcef/renderer/frame_impl.h" #include "base/logging.h" -#include "base/message_loop/message_loop.h" #include "net/base/request_priority.h" #include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom.h" #include "third_party/blink/public/mojom/loader/resource_load_info.mojom.h" diff --git a/libcef_dll/cpptoc/media_sink_cpptoc.cc b/libcef_dll/cpptoc/media_sink_cpptoc.cc index beddb9568..fb4453296 100644 --- a/libcef_dll/cpptoc/media_sink_cpptoc.cc +++ b/libcef_dll/cpptoc/media_sink_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=3a295e7d6703e2e8effd94da8e97d8b7f451dc32$ +// $hash=53dca3d842bb3d2f8a329a38759eb623620439a2$ // #include "libcef_dll/cpptoc/media_sink_cpptoc.h" @@ -37,22 +37,6 @@ media_sink_get_id(struct _cef_media_sink_t* self) { return _retval.DetachToUserFree(); } -int CEF_CALLBACK media_sink_is_valid(struct _cef_media_sink_t* self) { - shutdown_checker::AssertNotShutdown(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMediaSinkCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - cef_string_userfree_t CEF_CALLBACK media_sink_get_name(struct _cef_media_sink_t* self) { shutdown_checker::AssertNotShutdown(); @@ -166,7 +150,6 @@ media_sink_is_compatible_with(struct _cef_media_sink_t* self, CefMediaSinkCppToC::CefMediaSinkCppToC() { GetStruct()->get_id = media_sink_get_id; - GetStruct()->is_valid = media_sink_is_valid; GetStruct()->get_name = media_sink_get_name; GetStruct()->get_description = media_sink_get_description; GetStruct()->get_icon_type = media_sink_get_icon_type; diff --git a/libcef_dll/cpptoc/media_source_cpptoc.cc b/libcef_dll/cpptoc/media_source_cpptoc.cc index 09b939436..be30e2ea0 100644 --- a/libcef_dll/cpptoc/media_source_cpptoc.cc +++ b/libcef_dll/cpptoc/media_source_cpptoc.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=ddd51b3c8020de1b10b00eef06d745a498168323$ +// $hash=74a4cfec87c4f42891695c46b3cfcc8683403923$ // #include "libcef_dll/cpptoc/media_source_cpptoc.h" @@ -36,22 +36,6 @@ media_source_get_id(struct _cef_media_source_t* self) { return _retval.DetachToUserFree(); } -int CEF_CALLBACK media_source_is_valid(struct _cef_media_source_t* self) { - shutdown_checker::AssertNotShutdown(); - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - DCHECK(self); - if (!self) - return 0; - - // Execute - bool _retval = CefMediaSourceCppToC::Get(self)->IsValid(); - - // Return type: bool - return _retval; -} - int CEF_CALLBACK media_source_is_cast_source(struct _cef_media_source_t* self) { shutdown_checker::AssertNotShutdown(); @@ -90,7 +74,6 @@ int CEF_CALLBACK media_source_is_dial_source(struct _cef_media_source_t* self) { CefMediaSourceCppToC::CefMediaSourceCppToC() { GetStruct()->get_id = media_source_get_id; - GetStruct()->is_valid = media_source_is_valid; GetStruct()->is_cast_source = media_source_is_cast_source; GetStruct()->is_dial_source = media_source_is_dial_source; } diff --git a/libcef_dll/ctocpp/media_sink_ctocpp.cc b/libcef_dll/ctocpp/media_sink_ctocpp.cc index 749642c6e..bf420d548 100644 --- a/libcef_dll/ctocpp/media_sink_ctocpp.cc +++ b/libcef_dll/ctocpp/media_sink_ctocpp.cc @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=63071af2d949b451ad0e7273ca0f5d7bfec425db$ +// $hash=6ffdd140e2cb688f1d7db2eb1e2356a62ac08e5e$ // #include "libcef_dll/ctocpp/media_sink_ctocpp.h" @@ -36,22 +36,6 @@ NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetId() { return _retvalStr; } -NO_SANITIZE("cfi-icall") bool CefMediaSinkCToCpp::IsValid() { - shutdown_checker::AssertNotShutdown(); - - cef_media_sink_t* _struct = GetStruct(); - if (CEF_MEMBER_MISSING(_struct, is_valid)) - return false; - - // AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING - - // Execute - int _retval = _struct->is_valid(_struct); - - // Return type: bool - return _retval ? true : false; -} - NO_SANITIZE("cfi-icall") CefString CefMediaSinkCToCpp::GetName() { shutdown_checker::AssertNotShutdown(); diff --git a/libcef_dll/ctocpp/media_sink_ctocpp.h b/libcef_dll/ctocpp/media_sink_ctocpp.h index f3bd084fb..811f2976b 100644 --- a/libcef_dll/ctocpp/media_sink_ctocpp.h +++ b/libcef_dll/ctocpp/media_sink_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=c57a82e66fdcd26f70a69fbd92554ca8aa38495c$ +// $hash=9d3af9897a857a63abec8327f84f5d809be603da$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SINK_CTOCPP_H_ @@ -35,7 +35,6 @@ class CefMediaSinkCToCpp : public CefCToCppRefCountedis_valid(_struct); - - // Return type: bool - return _retval ? true : false; -} - NO_SANITIZE("cfi-icall") bool CefMediaSourceCToCpp::IsCastSource() { shutdown_checker::AssertNotShutdown(); diff --git a/libcef_dll/ctocpp/media_source_ctocpp.h b/libcef_dll/ctocpp/media_source_ctocpp.h index fd54e19d8..5d97007ca 100644 --- a/libcef_dll/ctocpp/media_source_ctocpp.h +++ b/libcef_dll/ctocpp/media_source_ctocpp.h @@ -9,7 +9,7 @@ // implementations. See the translator.README.txt file in the tools directory // for more information. // -// $hash=73aeb0f58611c0d7a9fa13f1d9268912e0fba0bd$ +// $hash=91c81b57c0fef20afad90845e5e71def3163cd20$ // #ifndef CEF_LIBCEF_DLL_CTOCPP_MEDIA_SOURCE_CTOCPP_H_ @@ -35,7 +35,6 @@ class CefMediaSourceCToCpp : public CefCToCppRefCounted(applications.size())); const extensions::Extension* extension = applications.GetExtension(tag); BackgroundModeManager::LaunchBackgroundApplication(profile, extension); @@ -18,7 +18,7 @@ index 559e51776e42..a429421f7c61 100644 } // Same as |-commandDispatch:|, but executes commands using a disposition -@@ -1529,6 +1531,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender { +@@ -1529,6 +1531,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; // TODO(rickcam): Mock out BackgroundApplicationListModel, then add unit // tests which use the mock in place of the profile-initialized model. @@ -26,7 +26,7 @@ index 559e51776e42..a429421f7c61 100644 // Avoid breaking unit tests which have no profile. if (profile) { BackgroundApplicationListModel applications(profile); -@@ -1555,6 +1558,7 @@ - (NSMenu*)applicationDockMenu:(NSApplication*)sender { +@@ -1555,6 +1558,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; } } } @@ -35,10 +35,10 @@ index 559e51776e42..a429421f7c61 100644 return dockMenu; } diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h -index 6332572ac884..bf555124ce59 100644 +index 132f2a8d15fd..1262f31d39db 100644 --- chrome/browser/browser_process.h +++ chrome/browser/browser_process.h -@@ -197,10 +197,12 @@ class BrowserProcess { +@@ -201,10 +201,12 @@ class BrowserProcess { virtual DownloadStatusUpdater* download_status_updater() = 0; virtual DownloadRequestLimiter* download_request_limiter() = 0; @@ -52,10 +52,10 @@ index 6332572ac884..bf555124ce59 100644 // Returns the StatusTray, which provides an API for displaying status icons // in the system status tray. Returns NULL if status icons are not supported diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 13958187a750..0017954a32da 100644 +index 77faedcc2944..4d06b472dc64 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc -@@ -963,24 +963,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { +@@ -964,24 +964,19 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { return download_request_limiter_.get(); } @@ -83,7 +83,7 @@ index 13958187a750..0017954a32da 100644 StatusTray* BrowserProcessImpl::status_tray() { DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index 12c76fb96762..60637b2b0044 100644 +index 5ac13a0eecee..0bb9262acf1b 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -164,9 +164,11 @@ class BrowserProcessImpl : public BrowserProcess, @@ -99,10 +99,10 @@ index 12c76fb96762..60637b2b0044 100644 safe_browsing::SafeBrowsingService* safe_browsing_service() override; subresource_filter::RulesetService* subresource_filter_ruleset_service() diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc -index bc7995a47fbd..28d3658d2885 100644 +index 2f6bb4a8cd34..d6ba58c228aa 100644 --- chrome/browser/lifetime/browser_close_manager.cc +++ chrome/browser/lifetime/browser_close_manager.cc -@@ -147,12 +147,14 @@ void BrowserCloseManager::CloseBrowsers() { +@@ -148,12 +148,14 @@ void BrowserCloseManager::CloseBrowsers() { // exit can restore all browsers open before exiting. ProfileManager::ShutdownSessionServices(); #endif diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 645ff295b..9d8f06825 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 bf7534ed9436..dbbc552ce1b3 100644 +index e5c0070b722e..987ded2bacfb 100644 --- chrome/browser/content_settings/host_content_settings_map_factory.cc +++ chrome/browser/content_settings/host_content_settings_map_factory.cc @@ -8,6 +8,7 @@ @@ -36,7 +36,7 @@ index bf7534ed9436..dbbc552ce1b3 100644 #endif } -@@ -97,10 +108,16 @@ scoped_refptr +@@ -99,10 +110,16 @@ scoped_refptr std::move(allowlist_provider)); #if BUILDFLAG(ENABLE_EXTENSIONS) diff --git a/patch/patches/chrome_browser_net_export.patch b/patch/patches/chrome_browser_net_export.patch index 32ab7fb45..f28e196f5 100644 --- a/patch/patches/chrome_browser_net_export.patch +++ b/patch/patches/chrome_browser_net_export.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 284154368652..cdd775136329 100644 +index 7f8d13d8c4c2..ab5688900991 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/crypto.gni") @@ -10,7 +10,7 @@ index 284154368652..cdd775136329 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/assistant/assistant.gni") -@@ -362,6 +363,10 @@ static_library("ui") { +@@ -335,6 +336,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -21,7 +21,7 @@ index 284154368652..cdd775136329 100644 # Since browser and browser_ui actually depend on each other, # we must omit the dependency from browser_ui to browser. # However, this means browser_ui and browser should more or less -@@ -383,6 +388,7 @@ static_library("ui") { +@@ -356,6 +361,7 @@ static_library("ui") { "//base/allocator:buildflags", "//build:branding_buildflags", "//cc/paint", @@ -29,7 +29,7 @@ index 284154368652..cdd775136329 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -1489,6 +1495,7 @@ static_library("ui") { +@@ -1473,6 +1479,7 @@ static_library("ui") { "//components/keep_alive_registry", "//components/network_session_configurator/common", "//components/page_load_metrics/browser", diff --git a/patch/patches/chrome_browser_product_override.patch b/patch/patches/chrome_browser_product_override.patch index 1a4417fca..7cc17d0ee 100644 --- a/patch/patches/chrome_browser_product_override.patch +++ b/patch/patches/chrome_browser_product_override.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index dd86e2e35910..624904c5fef2 100644 +index d27f4eb65fa9..9bf1bde37e63 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -1001,10 +1001,6 @@ void LaunchURL(const GURL& url, +@@ -1021,10 +1021,6 @@ void LaunchURL(const GURL& url, } } @@ -13,7 +13,7 @@ index dd86e2e35910..624904c5fef2 100644 void MaybeAppendSecureOriginsAllowlistSwitch(base::CommandLine* cmdline) { // |allowlist| combines pref/policy + cmdline switch in the browser process. // For renderer and utility (e.g. NetworkService) processes the switch is the -@@ -1171,6 +1167,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() { +@@ -1191,6 +1187,14 @@ const blink::UserAgentBrandList& GetBrandVersionList() { return *greased_brand_version_list; } @@ -29,10 +29,10 @@ index dd86e2e35910..624904c5fef2 100644 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); if (command_line->HasSwitch(switches::kUserAgent)) { diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index cd96f6bf1cb7..007d024f7dc8 100644 +index dad13f199206..43fbc32b5d83 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h -@@ -90,7 +90,8 @@ class ChromeXrIntegrationClient; +@@ -91,7 +91,8 @@ class ChromeXrIntegrationClient; } #endif diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index fb70a71f6..e513b12d4 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 8ce681f0d694..9bc310da1695 100644 +index f81028b5cda7..9b934d020ce6 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -378,7 +378,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -377,7 +377,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) registrar_.Add(this, chrome::NOTIFICATION_BROWSER_CLOSE_CANCELLED, content::NotificationService::AllSources()); diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index 4d101f703..126bcf19d 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 d041bd3f61a8..5f2feb9cd4c5 100644 +index 82edacf2604a..01c21d259dda 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn -@@ -248,6 +248,7 @@ static_library("safe_browsing") { +@@ -251,6 +251,7 @@ static_library("safe_browsing") { "//chrome/common/safe_browsing:download_type_util", "//chrome/services/file_util/public/cpp", "//components/content_settings/core/browser", diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index 409b5fd1c..dece2347c 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -164,16 +164,18 @@ index 4e64db143b8a..3dc127b7b992 100644 Profile* profile = Profile::FromBrowserContext(browser_context); std::vector whitelist = MimeTypesHandler::GetMIMETypeWhitelist(); diff --git chrome/common/google_url_loader_throttle.cc chrome/common/google_url_loader_throttle.cc -index a9ee607a2cb0..347261030e0e 100644 +index c1870b0f56ef..d32b8d54fb3f 100644 --- chrome/common/google_url_loader_throttle.cc +++ chrome/common/google_url_loader_throttle.cc -@@ -5,10 +5,15 @@ - #include "chrome/common/google_url_loader_throttle.h" - +@@ -7,12 +7,17 @@ + #include "base/feature_list.h" + #include "base/metrics/histogram_functions.h" #include "build/build_config.h" -+#include "cef/libcef/features/features.h" ++#include "cef/libcef/features/runtime.h" + #include "chrome/common/chrome_features.h" #include "chrome/common/net/safe_search_util.h" #include "components/google/core/common/google_util.h" + #include "net/base/url_util.h" #include "services/network/public/mojom/url_response_head.mojom.h" +#if BUILDFLAG(ENABLE_CEF) @@ -183,12 +185,12 @@ index a9ee607a2cb0..347261030e0e 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "extensions/common/extension_urls.h" #endif -@@ -126,6 +131,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( +@@ -152,6 +157,11 @@ void GoogleURLLoaderThrottle::WillProcessResponse( const GURL& response_url, network::mojom::URLResponseHead* response_head, bool* defer) { +#if BUILDFLAG(ENABLE_CEF) -+ if (!extensions::ExtensionsEnabled()) ++ if (cef::IsAlloyRuntimeEnabled() && !extensions::ExtensionsEnabled()) + return; +#endif + @@ -196,10 +198,10 @@ index a9ee607a2cb0..347261030e0e 100644 GURL webstore_url(extension_urls::GetWebstoreLaunchURL()); if (response_url.SchemeIsHTTPOrHTTPS() && diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index c1d92ae00fe5..2574fb1430ed 100644 +index 03d1e6a07843..2fd040ed87b5 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -831,6 +831,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -842,6 +842,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -207,7 +209,7 @@ index c1d92ae00fe5..2574fb1430ed 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1034,7 +1035,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1045,7 +1046,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -217,7 +219,7 @@ index c1d92ae00fe5..2574fb1430ed 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1043,7 +1045,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1054,7 +1056,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -227,7 +229,7 @@ index c1d92ae00fe5..2574fb1430ed 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1053,7 +1056,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1064,7 +1067,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); @@ -237,7 +239,7 @@ index c1d92ae00fe5..2574fb1430ed 100644 break; } case chrome::mojom::PluginStatus::kBlockedNoLoading: { -@@ -1061,7 +1065,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1072,7 +1076,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( IDR_BLOCKED_PLUGIN_HTML, l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED_NO_LOADING, group_name)); @@ -248,7 +250,7 @@ index c1d92ae00fe5..2574fb1430ed 100644 } case chrome::mojom::PluginStatus::kComponentUpdateRequired: { diff --git chrome/renderer/plugins/chrome_plugin_placeholder.cc chrome/renderer/plugins/chrome_plugin_placeholder.cc -index 4410ede5cb61..b15fa6406a9d 100644 +index d662fe9310c9..c4c406d16b95 100644 --- chrome/renderer/plugins/chrome_plugin_placeholder.cc +++ chrome/renderer/plugins/chrome_plugin_placeholder.cc @@ -360,8 +360,11 @@ void ChromePluginPlaceholder::OnBlockedContent( diff --git a/patch/patches/chrome_renderer.patch b/patch/patches/chrome_renderer.patch index 03a9e2432..42904dda4 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 2ea489762ef5..707431840be8 100644 +index 22e0426b61aa..88d226174831 100644 --- chrome/renderer/BUILD.gn +++ chrome/renderer/BUILD.gn @@ -4,6 +4,7 @@ @@ -10,7 +10,7 @@ index 2ea489762ef5..707431840be8 100644 import("//chrome/common/features.gni") import("//components/nacl/features.gni") import("//components/offline_pages/buildflags/features.gni") -@@ -128,6 +129,7 @@ static_library("renderer") { +@@ -137,6 +138,7 @@ static_library("renderer") { public_deps = [ "//components/contextual_search:buildflags" ] deps = [ @@ -18,7 +18,7 @@ index 2ea489762ef5..707431840be8 100644 "//chrome:resources", "//chrome:strings", "//chrome/common", -@@ -192,6 +194,10 @@ static_library("renderer") { +@@ -201,6 +203,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 cde1cd92f..5247b8bbf 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,5 +1,5 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index d18dbaa7d058..650031520b25 100644 +index 945cee14368b..38c180a6e7e6 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc @@ -25,6 +25,7 @@ @@ -10,7 +10,7 @@ index d18dbaa7d058..650031520b25 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -391,6 +392,8 @@ struct MainFunction { +@@ -392,6 +393,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index d18dbaa7d058..650031520b25 100644 #if defined(OS_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. -@@ -628,7 +631,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { +@@ -629,7 +632,9 @@ void ChromeMainDelegate::PostFieldTrialInitialization() { } #if defined(OS_WIN) @@ -27,9 +27,9 @@ index d18dbaa7d058..650031520b25 100644 SetUpExtendedCrashReporting(is_browser_process); + } base::Time::ReadMinTimerIntervalLowResMs(); - base::sequence_manager::PostFieldTrialInitialization(); - #endif -@@ -904,6 +909,7 @@ void ChromeMainDelegate::PreSandboxStartup() { + base::sequence_manager::internal::ThreadControllerPowerMonitor:: + InitializeOnMainThread(); +@@ -906,6 +911,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -37,7 +37,7 @@ index d18dbaa7d058..650031520b25 100644 crash_reporter::InitializeCrashKeys(); #if defined(OS_POSIX) -@@ -914,6 +920,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -916,6 +922,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -45,7 +45,7 @@ index d18dbaa7d058..650031520b25 100644 #if defined(OS_WIN) child_process_logging::Init(); -@@ -1037,6 +1044,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1039,6 +1046,7 @@ void ChromeMainDelegate::PreSandboxStartup() { locale; } @@ -53,7 +53,7 @@ index d18dbaa7d058..650031520b25 100644 #if defined(OS_POSIX) && !defined(OS_MACOSX) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != service_manager::switches::kZygoteProcess) { -@@ -1063,6 +1071,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1071,6 +1079,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 d18dbaa7d058..650031520b25 100644 #if BUILDFLAG(ENABLE_PDF) MaybeInitializeGDI(); -@@ -1162,6 +1171,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1169,6 +1178,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -69,7 +69,7 @@ index d18dbaa7d058..650031520b25 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 = -@@ -1178,6 +1188,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1185,6 +1195,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -78,10 +78,10 @@ index d18dbaa7d058..650031520b25 100644 #endif // defined(OS_LINUX) diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index c06585b15b8f..763212a575ce 100644 +index 5117fe3b5ee3..e8f37fa7066f 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc -@@ -49,6 +49,7 @@ +@@ -48,6 +48,7 @@ #include "build/branding_buildflags.h" #include "build/build_config.h" #include "cc/base/switches.h" @@ -89,7 +89,7 @@ index c06585b15b8f..763212a575ce 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -885,8 +886,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { +@@ -889,8 +890,10 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() { #if !defined(OS_ANDROID) // Create the RunLoop for MainMessageLoopRun() to use, and pass a copy of // its QuitClosure to the BrowserProcessImpl to call when it is time to exit. @@ -101,7 +101,7 @@ index c06585b15b8f..763212a575ce 100644 // These members must be initialized before returning from this function. // Android doesn't use StartupBrowserCreator. -@@ -1580,11 +1583,13 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1592,11 +1595,13 @@ 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|. @@ -117,18 +117,18 @@ index c06585b15b8f..763212a575ce 100644 // Initialize autoupdate timer. Timer callback costs basically nothing // when browser is not in persistent mode, so it's OK to let it ride on diff --git chrome/browser/notifications/notification_platform_bridge_mac.mm chrome/browser/notifications/notification_platform_bridge_mac.mm -index acf1849aa1b3..27efc35d74d6 100644 +index ad52e63ed83a..6b16ee3ccc96 100644 --- chrome/browser/notifications/notification_platform_bridge_mac.mm +++ chrome/browser/notifications/notification_platform_bridge_mac.mm -@@ -25,6 +25,7 @@ +@@ -24,6 +24,7 @@ + #include "base/strings/sys_string_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/system/sys_info.h" - #include "base/task/post_task.h" +#include "cef/libcef/features/runtime.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/notifications/notification_common.h" #include "chrome/browser/notifications/notification_display_service_impl.h" -@@ -642,6 +643,12 @@ - (void)notificationClick:(NSDictionary*)notificationResponseData { +@@ -651,6 +652,12 @@ getDisplayedAlertsForProfileId:(NSString*)profileId - (id)serviceProxy { id proxy = [_xpcConnection remoteObjectProxy]; @@ -142,7 +142,7 @@ index acf1849aa1b3..27efc35d74d6 100644 base::mac::ScopedMachSendRight exceptionPort( crash_reporter::GetCrashpadClient().GetHandlerMachPort()); diff --git ui/gtk/select_file_dialog_impl_kde.cc ui/gtk/select_file_dialog_impl_kde.cc -index f09501d6cd8e..edfc2a4c9bb5 100644 +index 4eba97d573d8..4697b24f4e34 100644 --- ui/gtk/select_file_dialog_impl_kde.cc +++ ui/gtk/select_file_dialog_impl_kde.cc @@ -6,6 +6,8 @@ diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 466cb1b9e..c01d9055d 100644 --- a/patch/patches/component_build.patch +++ b/patch/patches/component_build.patch @@ -1,5 +1,5 @@ diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h -index e15c71b22a5d..2aee7bcdb149 100644 +index 3746ac12a072..fbc31dd14729 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -12,6 +12,7 @@ @@ -10,7 +10,7 @@ index e15c71b22a5d..2aee7bcdb149 100644 #include "content/common/navigation_params.mojom.h" #include "content/public/browser/certificate_request_result_type.h" #include "mojo/public/cpp/bindings/pending_receiver.h" -@@ -68,7 +69,7 @@ bool ApplyUserAgentMetadataOverrides( +@@ -75,7 +76,7 @@ bool ApplyUserAgentMetadataOverrides( FrameTreeNode* frame_tree_node, base::Optional* override_out); diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index da226692a..24cb5a47c 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/download/download_target_determiner.cc chrome/browser/download/download_target_determiner.cc -index 16c71312d84f..1a706a8d2018 100644 +index b5bb5e01d7db..f2e23f9fffef 100644 --- chrome/browser/download/download_target_determiner.cc +++ chrome/browser/download/download_target_determiner.cc -@@ -657,7 +657,7 @@ void IsHandledBySafePlugin(int render_process_id, +@@ -660,7 +660,7 @@ void IsHandledBySafePlugin(int render_process_id, content::PluginService* plugin_service = content::PluginService::GetInstance(); bool plugin_found = plugin_service->GetPluginInfo( @@ -49,7 +49,7 @@ index 5b780f8bf34c..a75d0da983b4 100644 false /* allow_wildcard */, is_stale, &plugin_info, nullptr /* actual_mime_type */); diff --git chrome/browser/ui/views/frame/browser_root_view.cc chrome/browser/ui/views/frame/browser_root_view.cc -index d20d6f084b67..13f655dbceaa 100644 +index f64e2a94062e..b1bf9689321c 100644 --- chrome/browser/ui/views/frame/browser_root_view.cc +++ chrome/browser/ui/views/frame/browser_root_view.cc @@ -76,7 +76,7 @@ void OnFindURLMimeType(const GURL& url, @@ -62,10 +62,10 @@ index d20d6f084b67..13f655dbceaa 100644 #endif diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc -index 4956b35c1278..2f9c0621f53e 100644 +index f66e6bca5e2b..c99998449b6b 100644 --- content/browser/devtools/devtools_http_handler.cc +++ content/browser/devtools/devtools_http_handler.cc -@@ -571,7 +571,7 @@ void DevToolsHttpHandler::OnJsonRequest( +@@ -570,7 +570,7 @@ void DevToolsHttpHandler::OnJsonRequest( version.SetString("Protocol-Version", DevToolsAgentHost::GetProtocolVersion()); version.SetString("WebKit-Version", GetWebKitVersion()); @@ -75,10 +75,10 @@ index 4956b35c1278..2f9c0621f53e 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/frame_host/render_frame_message_filter.cc content/browser/frame_host/render_frame_message_filter.cc -index 33e2c5f972de..9dd9cd29baa4 100644 +index 75e5dbaa10c9..36f1c1dd5b9f 100644 --- content/browser/frame_host/render_frame_message_filter.cc +++ content/browser/frame_host/render_frame_message_filter.cc -@@ -301,6 +301,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame( +@@ -300,6 +300,7 @@ void RenderFrameMessageFilter::OnCreateChildFrame( void RenderFrameMessageFilter::OnGetPluginInfo( int render_frame_id, const GURL& url, @@ -86,7 +86,7 @@ index 33e2c5f972de..9dd9cd29baa4 100644 const url::Origin& main_frame_origin, const std::string& mime_type, bool* found, -@@ -308,8 +309,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( +@@ -307,8 +308,9 @@ void RenderFrameMessageFilter::OnGetPluginInfo( std::string* actual_mime_type) { bool allow_wildcard = true; *found = plugin_service_->GetPluginInfo( @@ -111,34 +111,34 @@ index 8d1c932e9f3a..e6a2c525da06 100644 const std::string& mime_type, bool* found, diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index 9ecb16d776d8..db2373890942 100644 +index 6eb685137044..f0cc9ed2cb92 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -735,6 +735,13 @@ class NavigationURLLoaderImpl::URLLoaderRequestController - resource_request_->has_user_gesture, - resource_request_->request_initiator, &loader_factory); +@@ -635,6 +635,13 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( + resource_request_->has_user_gesture, + resource_request_->request_initiator, &loader_factory); -+ if (!handled) { -+ handled = GetContentClient()->browser()->HandleExternalProtocol( -+ web_contents_getter_, frame_tree_node_id_, -+ navigation_ui_data_.get(), *resource_request_, -+ &loader_factory); -+ } ++ if (!handled) { ++ handled = GetContentClient()->browser()->HandleExternalProtocol( ++ web_contents_getter_, frame_tree_node_id_, ++ navigation_ui_data_.get(), *resource_request_, ++ &loader_factory); ++ } + - if (loader_factory) { - factory = - base::MakeRefCounted( -@@ -945,7 +952,7 @@ class NavigationURLLoaderImpl::URLLoaderRequestController - frame_tree_node->current_frame_host()->GetProcess()->GetID(); - int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); - bool has_plugin = PluginService::GetInstance()->GetPluginInfo( -- render_process_id, routing_id, resource_request_->url, url::Origin(), -+ render_process_id, routing_id, resource_request_->url, true, url::Origin(), - head->mime_type, false /* allow_wildcard */, &stale, &plugin, nullptr); + if (loader_factory) { + factory = base::MakeRefCounted( + std::move(loader_factory)); +@@ -836,7 +843,7 @@ void NavigationURLLoaderImpl::CheckPluginAndContinueOnReceiveResponse( + frame_tree_node->current_frame_host()->GetProcess()->GetID(); + int routing_id = frame_tree_node->current_frame_host()->GetRoutingID(); + bool has_plugin = PluginService::GetInstance()->GetPluginInfo( +- render_process_id, routing_id, resource_request_->url, url::Origin(), ++ render_process_id, routing_id, resource_request_->url, true, url::Origin(), + head->mime_type, false /* allow_wildcard */, &stale, &plugin, nullptr); - if (stale) { + if (stale) { diff --git content/browser/plugin_service_impl.cc content/browser/plugin_service_impl.cc -index b8800c3381ef..e260d7e56554 100644 +index 20035324c2ad..76785da413c6 100644 --- content/browser/plugin_service_impl.cc +++ content/browser/plugin_service_impl.cc @@ -340,6 +340,7 @@ bool PluginServiceImpl::GetPluginInfoArray( @@ -224,10 +224,10 @@ index 632ae86c6fd6..55b749ec1242 100644 const std::vector& all_plugins); diff --git content/common/frame_messages.h content/common/frame_messages.h -index 0821c7061118..fed37861b6b2 100644 +index 01c30cb72181..f1caf9b44f44 100644 --- content/common/frame_messages.h +++ content/common/frame_messages.h -@@ -615,9 +615,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, +@@ -529,9 +529,10 @@ IPC_MESSAGE_ROUTED1(FrameHostMsg_PepperStopsPlayback, // type. If there is no matching plugin, |found| is false. // |actual_mime_type| is the actual mime type supported by the // found plugin. @@ -240,31 +240,31 @@ index 0821c7061118..fed37861b6b2 100644 std::string /* mime_type */, bool /* found */, diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index 5c344d9b9ff7..776e506d2a10 100644 +index 87375b2ef10c..28a43be9229d 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc @@ -9,7 +9,7 @@ // declarations instead of including more headers. If that is infeasible, adjust // the limit. For more info, see // https://chromium.googlesource.com/chromium/src/+/HEAD/docs/wmax_tokens.md --#pragma clang max_tokens_here 840000 -+// #pragma clang max_tokens_here 840000 +-#pragma clang max_tokens_here 860000 ++// #pragma clang max_tokens_here 860000 #include diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index d6c203ab546d..621bf11f32e9 100644 +index edf60410ba57..21da7fc05692 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h -@@ -28,6 +28,7 @@ - #include "content/public/browser/allow_service_worker_result.h" +@@ -29,6 +29,7 @@ #include "content/public/browser/certificate_request_result_type.h" #include "content/public/browser/generated_code_cache_settings.h" + #include "content/public/browser/storage_partition_config.h" +#include "content/public/browser/web_contents.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/previews_state.h" #include "content/public/common/window_container_type.mojom-forward.h" -@@ -1624,6 +1625,14 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1625,6 +1626,14 @@ class CONTENT_EXPORT ContentBrowserClient { const base::Optional& initiating_origin, mojo::PendingRemote* out_factory); @@ -279,7 +279,7 @@ index d6c203ab546d..621bf11f32e9 100644 // Creates an OverlayWindow to be used for Picture-in-Picture. This window // will house the content shown when in Picture-in-Picture mode. This will // return a new OverlayWindow. -@@ -1692,6 +1701,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1693,6 +1702,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -315,7 +315,7 @@ index 98c59005599e..69752184745d 100644 WebPluginInfo* plugin) = 0; diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h -index 7da02ee54143..6436dc300c43 100644 +index f6d2f50e8d6b..6eb51fcda2eb 100644 --- content/public/renderer/content_renderer_client.h +++ content/public/renderer/content_renderer_client.h @@ -85,6 +85,9 @@ class CONTENT_EXPORT ContentRendererClient { @@ -328,7 +328,7 @@ index 7da02ee54143..6436dc300c43 100644 // Notifies that a new RenderFrame has been created. virtual void RenderFrameCreated(RenderFrame* render_frame) {} -@@ -326,6 +329,10 @@ class CONTENT_EXPORT ContentRendererClient { +@@ -329,6 +332,10 @@ class CONTENT_EXPORT ContentRendererClient { // This method may invalidate the frame. virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {} @@ -340,10 +340,10 @@ index 7da02ee54143..6436dc300c43 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_frame_impl.cc content/renderer/render_frame_impl.cc -index 34cdad7f7205..60042cb8b4e6 100644 +index 74e98485b464..c183359360c2 100644 --- content/renderer/render_frame_impl.cc +++ content/renderer/render_frame_impl.cc -@@ -3663,7 +3663,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( +@@ -3644,7 +3644,8 @@ blink::WebPlugin* RenderFrameImpl::CreatePlugin( std::string mime_type; bool found = false; Send(new FrameHostMsg_GetPluginInfo( @@ -354,7 +354,7 @@ index 34cdad7f7205..60042cb8b4e6 100644 if (!found) return nullptr; diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index 3b99b09c45e9..a6b9562d1c5c 100644 +index baee6cbd6369..0c786588a57f 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc @@ -633,6 +633,8 @@ void RenderThreadImpl::Init() { @@ -367,10 +367,10 @@ index 3b99b09c45e9..a6b9562d1c5c 100644 &RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 9b6fb9c13ed5..0bc31784d5be 100644 +index a4382a6afa32..9c830bf29e72 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -898,6 +898,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { +@@ -895,6 +895,15 @@ RendererBlinkPlatformImpl::GetGpuFactories() { //------------------------------------------------------------------------------ @@ -387,10 +387,10 @@ index 9b6fb9c13ed5..0bc31784d5be 100644 if (!code_cache_host_) { code_cache_host_ = mojo::SharedRemote( diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index 80490f5b8d52..8c07dc87edbb 100644 +index 59d7d92cf5f7..221d8e9249d9 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -198,6 +198,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -199,6 +199,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { media::GpuVideoAcceleratorFactories* GetGpuFactories() override; diff --git a/patch/patches/content_app_shutdown_2798.patch b/patch/patches/content_app_shutdown_2798.patch index 19f2e2fc6..2683c5f3e 100644 --- a/patch/patches/content_app_shutdown_2798.patch +++ b/patch/patches/content_app_shutdown_2798.patch @@ -1,5 +1,5 @@ diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 01327e6e6c53..d7b737592833 100644 +index f5e5576fd745..086ba8edc63a 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -44,6 +44,7 @@ @@ -10,7 +10,7 @@ index 01327e6e6c53..d7b737592833 100644 #include "base/trace_event/trace_event.h" #include "components/discardable_memory/service/discardable_shared_memory_manager.h" #include "components/download/public/common/download_task_runner.h" -@@ -974,6 +975,11 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1027,6 +1028,11 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -36,10 +36,10 @@ index 299af2871498..8639eb8843f7 100644 int RunServiceManager(MainFunctionParams& main_function_params, bool start_service_manager_only); diff --git content/app/content_service_manager_main_delegate.cc content/app/content_service_manager_main_delegate.cc -index 86d0a470a7c2..5e4b91d31e3f 100644 +index 1983ab5b217d..25344b70d343 100644 --- content/app/content_service_manager_main_delegate.cc +++ content/app/content_service_manager_main_delegate.cc -@@ -130,4 +130,8 @@ void ContentServiceManagerMainDelegate::SetStartServiceManagerOnly( +@@ -174,4 +174,8 @@ void ContentServiceManagerMainDelegate::SetStartServiceManagerOnly( start_service_manager_only_ = start_service_manager_only; } @@ -49,7 +49,7 @@ index 86d0a470a7c2..5e4b91d31e3f 100644 + } // namespace content diff --git content/app/content_service_manager_main_delegate.h content/app/content_service_manager_main_delegate.h -index 0b4042aec2ae..b8643b10a02e 100644 +index ae9796957e51..f26a578d60ed 100644 --- content/app/content_service_manager_main_delegate.h +++ content/app/content_service_manager_main_delegate.h @@ -18,7 +18,8 @@ namespace content { diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index a9c3cc4e0..f450d047b 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -47,7 +47,7 @@ index 9b08e23e921b..49182504ae36 100644 source_set("dll_hash") { diff --git chrome/chrome_elf/crash/crash_helper.cc chrome/chrome_elf/crash/crash_helper.cc -index 42a4bfcdb856..9f674625a155 100644 +index 886372e11489..ad3bc2242883 100644 --- chrome/chrome_elf/crash/crash_helper.cc +++ chrome/chrome_elf/crash/crash_helper.cc @@ -11,12 +11,17 @@ @@ -127,7 +127,7 @@ index bcf172e645a2..f879aa745adf 100644 // on the given |command_line|. void SetCrashKeysFromCommandLine(const base::CommandLine& command_line); diff --git components/crash/core/app/breakpad_linux.cc components/crash/core/app/breakpad_linux.cc -index 8ca43e2a8a10..5425a33709bb 100644 +index d2ca4a9056e5..3a4d8e1e82d9 100644 --- components/crash/core/app/breakpad_linux.cc +++ components/crash/core/app/breakpad_linux.cc @@ -28,6 +28,7 @@ @@ -138,7 +138,7 @@ index 8ca43e2a8a10..5425a33709bb 100644 #include "base/files/file_path.h" #include "base/lazy_instance.h" #include "base/linux_util.h" -@@ -721,7 +722,7 @@ bool CrashDone(const MinidumpDescriptor& minidump, +@@ -722,7 +723,7 @@ bool CrashDone(const MinidumpDescriptor& minidump, info.process_type_length = 7; info.distro = base::g_linux_distro; info.distro_length = my_strlen(base::g_linux_distro); @@ -147,7 +147,7 @@ index 8ca43e2a8a10..5425a33709bb 100644 info.process_start_time = g_process_start_time; info.oom_size = base::g_oom_size; info.pid = g_pid; -@@ -1748,10 +1749,19 @@ void HandleCrashDump(const BreakpadInfo& info) { +@@ -1749,10 +1750,19 @@ void HandleCrashDump(const BreakpadInfo& info) { GetCrashReporterClient()->GetProductNameAndVersion(&product_name, &version); writer.AddBoundary(); @@ -169,7 +169,7 @@ index 8ca43e2a8a10..5425a33709bb 100644 if (info.pid > 0) { char pid_value_buf[kUint64StringSize]; uint64_t pid_value_len = my_uint64_len(info.pid); -@@ -1868,6 +1878,9 @@ void HandleCrashDump(const BreakpadInfo& info) { +@@ -1869,6 +1879,9 @@ void HandleCrashDump(const BreakpadInfo& info) { crash_reporter::internal::TransitionalCrashKeyStorage; CrashKeyStorage::Iterator crash_key_iterator(*info.crash_keys); const CrashKeyStorage::Entry* entry; @@ -179,7 +179,7 @@ index 8ca43e2a8a10..5425a33709bb 100644 while ((entry = crash_key_iterator.Next())) { if (g_use_crash_key_white_list && !IsInWhiteList(entry->key)) continue; -@@ -1880,7 +1893,13 @@ void HandleCrashDump(const BreakpadInfo& info) { +@@ -1881,7 +1894,13 @@ void HandleCrashDump(const BreakpadInfo& info) { ? CrashKeyStorage::value_size - 1 : my_strlen(entry->value); diff --git a/patch/patches/crashpad_tp_1995.patch b/patch/patches/crashpad_tp_1995.patch index 474a2952f..8d0a11d55 100644 --- a/patch/patches/crashpad_tp_1995.patch +++ b/patch/patches/crashpad_tp_1995.patch @@ -1,8 +1,8 @@ diff --git third_party/crashpad/crashpad/client/prune_crash_reports.cc third_party/crashpad/crashpad/client/prune_crash_reports.cc -index 8eed18d4944c..3e1fb7ac3ba5 100644 +index 492d466239d1..a1df635870ed 100644 --- third_party/crashpad/crashpad/client/prune_crash_reports.cc +++ third_party/crashpad/crashpad/client/prune_crash_reports.cc -@@ -72,13 +72,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database, +@@ -73,13 +73,19 @@ size_t PruneCrashReportDatabase(CrashReportDatabase* database, } // static @@ -184,10 +184,10 @@ index b314e0a11b92..a374df4728c0 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 e144bddc67d1..f3d727d0b247 100644 +index fd48e1b6bc1f..42a753fafe47 100644 --- third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc +++ third_party/crashpad/crashpad/handler/crash_report_upload_thread.cc -@@ -262,6 +262,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( +@@ -263,6 +263,8 @@ CrashReportUploadThread::UploadResult CrashReportUploadThread::UploadReport( if (minidump_process_snapshot.Initialize(reader)) { parameters = BreakpadHTTPFormParametersFromMinidump(&minidump_process_snapshot); diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 5f269bc83..a7725f57d 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -97,10 +97,10 @@ index da431bd8ecc5..587952b1af1c 100644 ExtensionRegistry::Get(browser_context_)->RemoveObserver(this); diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h -index 3b4afb96942f..ae832c720dd8 100644 +index ee031971ea4c..c82a4f30eb7f 100644 --- extensions/browser/extension_host.h +++ extensions/browser/extension_host.h -@@ -52,13 +52,19 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -51,13 +51,19 @@ class ExtensionHost : public DeferredStartRenderHost, ExtensionHost(const Extension* extension, content::SiteInstance* site_instance, const GURL& url, ViewType host_type); @@ -121,7 +121,7 @@ index 3b4afb96942f..ae832c720dd8 100644 content::RenderViewHost* render_view_host() const; content::RenderProcessHost* render_process_host() const; bool has_loaded_once() const { return has_loaded_once_; } -@@ -177,7 +183,8 @@ class ExtensionHost : public DeferredStartRenderHost, +@@ -176,7 +182,8 @@ class ExtensionHost : public DeferredStartRenderHost, content::BrowserContext* browser_context_; // The host for our HTML content. @@ -132,7 +132,7 @@ index 3b4afb96942f..ae832c720dd8 100644 // A weak pointer to the current or pending RenderViewHost. We don't access // this through the host_contents because we want to deal with the pending diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h -index e2723b1a42e3..cb176afba5aa 100644 +index 757ed5668b94..142c0ea7f801 100644 --- extensions/browser/extensions_browser_client.h +++ extensions/browser/extensions_browser_client.h @@ -56,6 +56,7 @@ class ComponentExtensionResourceManager; @@ -143,7 +143,7 @@ index e2723b1a42e3..cb176afba5aa 100644 class ExtensionHostDelegate; class ExtensionSet; class ExtensionSystem; -@@ -195,6 +196,14 @@ class ExtensionsBrowserClient { +@@ -196,6 +197,14 @@ class ExtensionsBrowserClient { virtual std::unique_ptr CreateExtensionHostDelegate() = 0; @@ -159,10 +159,10 @@ index e2723b1a42e3..cb176afba5aa 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 374f722809b4..c0e22f4ad697 100644 +index fc25df40852a..5f14f04835bb 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -386,9 +386,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -385,9 +385,16 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index edd930071..592b5f319 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -1,8 +1,8 @@ diff --git .gn .gn -index b6d50b724d74..f6f87492bd93 100644 +index c789fe56958f..2c57543a71d8 100644 --- .gn +++ .gn -@@ -638,6 +638,8 @@ exec_script_whitelist = +@@ -640,6 +640,8 @@ exec_script_whitelist = "//chrome/android/webapk/shell_apk/prepare_upload_dir/BUILD.gn", @@ -12,10 +12,10 @@ index b6d50b724d74..f6f87492bd93 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 97494c0a0782..da1c1eeabd85 100644 +index 16ad01eac88d..71275b71be81 100644 --- BUILD.gn +++ BUILD.gn -@@ -223,6 +223,7 @@ group("gn_all") { +@@ -228,6 +228,7 @@ group("gn_all") { if (!is_ios && !is_fuchsia) { deps += [ @@ -56,7 +56,7 @@ index 982fbe8d3f0d..e757be4688f1 100644 + "studio path") } diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index deef406b9273..ad338636cf5d 100644 +index 4c051291ab4c..5b3a61149522 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -3,6 +3,7 @@ @@ -67,7 +67,7 @@ index deef406b9273..ad338636cf5d 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/components/media_app_ui/media_app_ui.gni") -@@ -289,6 +290,7 @@ template("chrome_paks") { +@@ -307,6 +308,7 @@ template("chrome_paks") { } } @@ -75,7 +75,7 @@ index deef406b9273..ad338636cf5d 100644 chrome_repack_locales("${target_name}_locales") { forward_variables_from(invoker, [ -@@ -311,14 +313,17 @@ template("chrome_paks") { +@@ -329,14 +331,17 @@ template("chrome_paks") { output_locales = locales } } @@ -95,7 +95,7 @@ index deef406b9273..ad338636cf5d 100644 public_deps += [ ":${target_name}_200_percent" ] } diff --git chrome/installer/mini_installer/BUILD.gn chrome/installer/mini_installer/BUILD.gn -index 056d425c4194..0c0e0f22ab66 100644 +index a04d7f31c2a6..68303e3ab3be 100644 --- chrome/installer/mini_installer/BUILD.gn +++ chrome/installer/mini_installer/BUILD.gn @@ -5,6 +5,7 @@ diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index e9b9cad33..834b71050 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 535829b4eed3..1f9dfcb571de 100644 +index fa2306ead7d2..c7816f841a3b 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -611,4 +611,13 @@ +@@ -656,4 +656,13 @@ # Please read the header and find the right section above instead. # Resource ids starting at 31000 are reserved for projects built on Chromium. diff --git a/patch/patches/ime_1610.patch b/patch/patches/ime_1610.patch index 8dcc653fa..065142059 100644 --- a/patch/patches/ime_1610.patch +++ b/patch/patches/ime_1610.patch @@ -1,8 +1,8 @@ diff --git ui/base/ime/win/input_method_win_base.cc ui/base/ime/win/input_method_win_base.cc -index 83850840d83b..3d5ffcc54f1e 100644 +index fc9c8d3a0f2c..6098c4d1c9b9 100644 --- ui/base/ime/win/input_method_win_base.cc +++ ui/base/ime/win/input_method_win_base.cc -@@ -263,8 +263,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { +@@ -246,8 +246,9 @@ bool InputMethodWinBase::IsWindowFocused(const TextInputClient* client) const { // receiving keyboard input as long as it is an active window. This works well // even when the |attached_window_handle| becomes active but has not received // WM_FOCUS yet. diff --git a/patch/patches/linux_assets_path_1936.patch b/patch/patches/linux_assets_path_1936.patch index 3837e46ef..d797cc018 100644 --- a/patch/patches/linux_assets_path_1936.patch +++ b/patch/patches/linux_assets_path_1936.patch @@ -1,8 +1,8 @@ diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc -index e53e60ef146f..9b6db4a69d41 100644 +index e63dfcf43147..3b7b69a688f9 100644 --- content/browser/child_process_launcher_helper_linux.cc +++ content/browser/child_process_launcher_helper_linux.cc -@@ -164,7 +164,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( +@@ -162,7 +162,7 @@ void ChildProcessLauncherHelper::SetProcessPriorityOnLauncherThread( base::File OpenFileToShare(const base::FilePath& path, base::MemoryMappedFile::Region* region) { base::FilePath exe_dir; @@ -24,10 +24,10 @@ index 0aaed76c1dda..517c3d8b5772 100644 base::FilePath sandbox_candidate = exe_dir.AppendASCII("chrome-sandbox"); if (base::PathExists(sandbox_candidate)) sandbox_binary = sandbox_candidate; -diff --git ui/gl/init/gl_initializer_x11.cc ui/gl/init/gl_initializer_x11.cc -index d76d146b0d86..f4d9b4d748bb 100644 ---- ui/gl/init/gl_initializer_x11.cc -+++ ui/gl/init/gl_initializer_x11.cc +diff --git ui/gl/init/gl_initializer_linux_x11.cc ui/gl/init/gl_initializer_linux_x11.cc +index 0c57d500c0d2..9e82845e7fce 100644 +--- ui/gl/init/gl_initializer_linux_x11.cc ++++ ui/gl/init/gl_initializer_linux_x11.cc @@ -87,7 +87,7 @@ bool InitializeStaticEGLInternal(GLImplementation implementation) { if (implementation == kGLImplementationSwiftShaderGL) { #if BUILDFLAG(ENABLE_SWIFTSHADER) diff --git a/patch/patches/linux_chrome_views_1085806.patch b/patch/patches/linux_chrome_views_1085806.patch deleted file mode 100644 index 87111b2c3..000000000 --- a/patch/patches/linux_chrome_views_1085806.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc -index b0f91ff72823..ba0660ffcdc2 100644 ---- chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc -+++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux.cc -@@ -48,7 +48,7 @@ ChromeBrowserMainExtraPartsViewsLinux:: - } - - void ChromeBrowserMainExtraPartsViewsLinux::ToolkitInitialized() { --#if defined(USE_X11) -+#if defined(USE_X11) && BUILDFLAG(USE_GTK) - // In Aura/X11, Gtk-based LinuxUI implementation is used, so we instantiate - // and inject the GtkUiDelegate before ChromeBrowserMainExtraPartsViewsLinux, - // so it can properly initialize GtkUi on its |ToolkitInitialized| override. diff --git a/patch/patches/linux_poll_2466.patch b/patch/patches/linux_poll_2466.patch index 1ffb92f7a..fde9c2d5c 100644 --- a/patch/patches/linux_poll_2466.patch +++ b/patch/patches/linux_poll_2466.patch @@ -1,5 +1,5 @@ diff --git base/files/file_path_watcher_linux.cc base/files/file_path_watcher_linux.cc -index 563e08067585..3200fa658457 100644 +index 7a04ac7dfeff..f95c4811746c 100644 --- base/files/file_path_watcher_linux.cc +++ base/files/file_path_watcher_linux.cc @@ -5,6 +5,7 @@ diff --git a/patch/patches/mac_gpu.patch b/patch/patches/mac_gpu.patch index 81234109d..162101a61 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 0deebafe135f..fdbd9a7ecf17 100644 +index d8ad42a07552..57f725b1d088 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 3a25c5602..a64a464da 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_loop_current.cc base/message_loop/message_loop_current.cc -index 7688ba3d7b0d..9acaaa0d5c7f 100644 +index 14d7b8fbb596..4cf58414c2f0 100644 --- base/message_loop/message_loop_current.cc +++ base/message_loop/message_loop_current.cc @@ -47,6 +47,8 @@ void MessageLoopCurrent::AddDestructionObserver( @@ -12,7 +12,7 @@ index 7688ba3d7b0d..9acaaa0d5c7f 100644 current_->RemoveDestructionObserver(destruction_observer); } diff --git base/message_loop/message_loop_current.h base/message_loop/message_loop_current.h -index 61b8c6fcc42d..d439b00a87bb 100644 +index 462098e2522a..b853e6dc0c40 100644 --- base/message_loop/message_loop_current.h +++ base/message_loop/message_loop_current.h @@ -117,6 +117,12 @@ class BASE_EXPORT MessageLoopCurrent { @@ -25,10 +25,10 @@ index 61b8c6fcc42d..d439b00a87bb 100644 + bool os_modal_loop() const { return os_modal_loop_; } +#endif // OS_WIN + - // Enables or disables the recursive task processing. This happens in the case - // of recursive message loops. Some unwanted message loops may occur when - // using common controls or printer functions. By default, recursive task -@@ -186,6 +192,13 @@ class BASE_EXPORT MessageLoopCurrent { + // Enables nested task processing in scope of an upcoming native message loop. + // Some unwanted message loops may occur when using common controls or printer + // functions. Hence, nested task processing is disabled by default to avoid +@@ -183,6 +189,13 @@ class BASE_EXPORT MessageLoopCurrent { friend class web::WebTaskEnvironment; sequence_manager::internal::SequenceManagerImpl* current_; @@ -43,7 +43,7 @@ index 61b8c6fcc42d..d439b00a87bb 100644 #if !defined(OS_NACL) diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 83cbec19c292..a890a324c8db 100644 +index 4c500064bcd8..9b82c906b659 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ @@ -54,25 +54,22 @@ index 83cbec19c292..a890a324c8db 100644 #include "base/message_loop/message_pump_win.h" #include -@@ -550,10 +551,18 @@ bool MessagePumpForUI::ProcessPumpReplacementMessage() { - state_->delegate->BeforeDoInternalWork(); - - MSG msg; -- const bool have_message = -- ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; -+ bool have_message = false; -+ // We should not process all window messages if we are in the context of an -+ // OS modal loop, i.e. in the context of a windows API call like MessageBox. -+ // This is to ensure that these messages are peeked out by the OS modal loop. -+ if (MessageLoopCurrent::Get()->os_modal_loop()) { -+ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above. -+ have_message = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) || -+ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE); -+ } else { -+ have_message = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE; -+ } - -- // Expect no message or a message different than kMsgHaveWork. - DCHECK(!have_message || kMsgHaveWork != msg.message || - msg.hwnd != message_window_.hwnd()); - +@@ -497,7 +498,17 @@ bool MessagePumpForUI::ProcessNextWindowsMessage() { + TRACE_EVENT1("base", + "MessagePumpForUI::ProcessNextWindowsMessage PeekMessage", + "sent_messages_in_queue", more_work_is_plausible); +- has_msg = ::PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE) != FALSE; ++ ++ // We should not process all window messages if we are in the context of an ++ // OS modal loop, i.e. in the context of a windows API call like MessageBox. ++ // This is to ensure that these messages are peeked out by the OS modal loop. ++ if (MessageLoopCurrent::Get()->os_modal_loop()) { ++ // We only peek out WM_PAINT and WM_TIMER here for reasons mentioned above. ++ has_msg = PeekMessage(&msg, NULL, WM_PAINT, WM_PAINT, PM_REMOVE) || ++ PeekMessage(&msg, NULL, WM_TIMER, WM_TIMER, PM_REMOVE); ++ } else { ++ has_msg = PeekMessage(&msg, NULL, 0, 0, PM_REMOVE) != FALSE; ++ } + } + if (has_msg) + more_work_is_plausible |= ProcessMessageHelper(msg); diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 1a4373904..639b9a317 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,8 +1,8 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index cbda789a0d23..1a99b274abeb 100644 +index 1d0ac66a9174..4ddaca449e8b 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm -@@ -786,7 +786,8 @@ void MessagePumpUIApplication::Detach() { +@@ -644,7 +644,8 @@ void MessagePumpUIApplication::Detach() { #else ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { @@ -12,7 +12,7 @@ index cbda789a0d23..1a99b274abeb 100644 DCHECK_EQ(kNSApplicationModalSafeModeMask, g_app_pump->GetModeMask()); // Pumping events in private runloop modes is known to interact badly with // app modal windows like NSAlert. -@@ -798,7 +799,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { +@@ -654,7 +655,8 @@ ScopedPumpMessagesInPrivateModes::ScopedPumpMessagesInPrivateModes() { } ScopedPumpMessagesInPrivateModes::~ScopedPumpMessagesInPrivateModes() { @@ -20,5 +20,5 @@ index cbda789a0d23..1a99b274abeb 100644 + if (!g_app_pump) + return; g_app_pump->SetModeMask(kNSApplicationModalSafeModeMask); - g_app_pump->SetTimerInvalidationAllowed(true); } + diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index 239bf8124..833f71019 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 2277fc44cf2f..42cf0b8db757 100644 +index d722cbe08060..615a03b15f71 100644 --- content/browser/web_contents/web_contents_view.h +++ content/browser/web_contents/web_contents_view.h @@ -23,7 +23,7 @@ struct DropData; @@ -12,7 +12,7 @@ index 2277fc44cf2f..42cf0b8db757 100644 virtual ~WebContentsView() {} 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 e1789871c949..61d3ae65a5ea 100644 +index 390b07fc5775..a432ea7fe6a4 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 @@ -207,6 +207,8 @@ void MimeHandlerViewGuest::CreateWebContents( @@ -47,7 +47,7 @@ index e1789871c949..61d3ae65a5ea 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 242db17f8f3b..80e9a5663588 100644 +index 56babf6fff59..b97d63128d70 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 @@ -130,6 +130,7 @@ class MimeHandlerViewGuest diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index c3b15cb15..f8c88a329 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index cc4b13a7b9c6..84f3b9ed7cf4 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index bb483be1fbfb..d33a95e2dee3 100644 +index 1bce7961d24d..ff3baa4560ea 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -2735,6 +2735,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -2831,6 +2831,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,10 +57,10 @@ index bb483be1fbfb..d33a95e2dee3 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 7200b0616892..733833deb5e0 100644 +index 5f3f2feec8c7..73f2bad72132 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h -@@ -741,6 +741,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl +@@ -734,6 +734,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl void ProgressFlingIfNeeded(base::TimeTicks current_time); void StopFling(); diff --git a/patch/patches/prefs_content_1161.patch b/patch/patches/prefs_content_1161.patch index 9abffa903..2d220fd9b 100644 --- a/patch/patches/prefs_content_1161.patch +++ b/patch/patches/prefs_content_1161.patch @@ -1,8 +1,8 @@ diff --git content/public/common/common_param_traits_macros.h content/public/common/common_param_traits_macros.h -index c7a871602f5b..e208e699836f 100644 +index d67aa115c4ed..c799f2e32011 100644 --- content/public/common/common_param_traits_macros.h +++ content/public/common/common_param_traits_macros.h -@@ -178,6 +178,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) +@@ -176,6 +176,7 @@ IPC_STRUCT_TRAITS_BEGIN(content::WebPreferences) IPC_STRUCT_TRAITS_MEMBER(main_frame_resizes_are_orientation_changes) IPC_STRUCT_TRAITS_MEMBER(initialize_at_minimum_page_scale) IPC_STRUCT_TRAITS_MEMBER(smart_insert_delete_enabled) @@ -11,10 +11,10 @@ index c7a871602f5b..e208e699836f 100644 IPC_STRUCT_TRAITS_MEMBER(navigate_on_drag_drop) IPC_STRUCT_TRAITS_MEMBER(spatial_navigation_enabled) diff --git content/public/common/web_preferences.cc content/public/common/web_preferences.cc -index eac2562c779e..249b5c51ad1d 100644 +index f85ad51fb34b..6168136649ea 100644 --- content/public/common/web_preferences.cc +++ content/public/common/web_preferences.cc -@@ -165,6 +165,7 @@ WebPreferences::WebPreferences() +@@ -163,6 +163,7 @@ WebPreferences::WebPreferences() spatial_navigation_enabled(false), caret_browsing_enabled(false), navigate_on_drag_drop(true), @@ -23,10 +23,10 @@ index eac2562c779e..249b5c51ad1d 100644 record_whole_document(false), cookie_enabled(true), diff --git content/public/common/web_preferences.h content/public/common/web_preferences.h -index 4ba03d3a6219..0996e06eb683 100644 +index bf98747b7b38..fa046af3e0ee 100644 --- content/public/common/web_preferences.h +++ content/public/common/web_preferences.h -@@ -182,6 +182,7 @@ struct CONTENT_EXPORT WebPreferences { +@@ -180,6 +180,7 @@ struct CONTENT_EXPORT WebPreferences { bool spatial_navigation_enabled; bool caret_browsing_enabled; bool navigate_on_drag_drop; @@ -35,10 +35,10 @@ index 4ba03d3a6219..0996e06eb683 100644 bool record_whole_document; diff --git content/renderer/render_view_impl.cc content/renderer/render_view_impl.cc -index 6fc04eb140eb..019295dd241a 100644 +index c6a990f87306..1b9759f2b603 100644 --- content/renderer/render_view_impl.cc +++ content/renderer/render_view_impl.cc -@@ -972,6 +972,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, +@@ -963,6 +963,8 @@ void RenderView::ApplyWebPreferences(const WebPreferences& prefs, #endif WebRuntimeFeatures::EnableTranslateService(prefs.translate_service_available); diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index ac7c1546c..8dfa61ad4 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 a996e15eeba1..cbc0ad1f9019 100644 +index b4c6ef8fec23..1e2586810d7c 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -23,6 +23,7 @@ @@ -10,7 +10,7 @@ index a996e15eeba1..cbc0ad1f9019 100644 #include "chrome/browser/download/chrome_download_manager_delegate.h" #include "chrome/browser/download/download_core_service_factory.h" #include "chrome/browser/download/download_core_service_impl.h" -@@ -56,6 +57,10 @@ +@@ -57,6 +58,10 @@ #include "chrome/browser/ui/pdf/adobe_reader_info_win.h" #endif @@ -21,7 +21,7 @@ index a996e15eeba1..cbc0ad1f9019 100644 using content::BrowserContext; using content::BrowserThread; using content::DownloadManager; -@@ -340,6 +345,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( +@@ -349,6 +354,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager( // static DownloadPrefs* DownloadPrefs::FromBrowserContext( content::BrowserContext* context) { @@ -34,7 +34,7 @@ index a996e15eeba1..cbc0ad1f9019 100644 } diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc -index 84818167bce1..cdbd3f7f6f27 100644 +index 3fadaba3336f..5ef67b35883d 100644 --- chrome/browser/printing/print_preview_dialog_controller.cc +++ chrome/browser/printing/print_preview_dialog_controller.cc @@ -16,6 +16,7 @@ @@ -262,7 +262,7 @@ index 0881b3dd9303..4df6883d4d05 100644 Profile* const profile_; PrintPreviewStickySettings* const sticky_settings_; diff --git chrome/browser/ui/webui/print_preview/print_preview_handler.cc chrome/browser/ui/webui/print_preview/print_preview_handler.cc -index 1d2254cefc2c..7aa5fe7f11a4 100644 +index a61439ed8cae..3e210caffafe 100644 --- chrome/browser/ui/webui/print_preview/print_preview_handler.cc +++ chrome/browser/ui/webui/print_preview/print_preview_handler.cc @@ -24,6 +24,7 @@ @@ -273,7 +273,7 @@ index 1d2254cefc2c..7aa5fe7f11a4 100644 #include "chrome/browser/app_mode/app_mode_utils.h" #include "chrome/browser/bad_message.h" #include "chrome/browser/browser_process.h" -@@ -1243,7 +1244,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1244,7 +1245,7 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return extension_printer_handler_.get(); } @@ -282,7 +282,7 @@ index 1d2254cefc2c..7aa5fe7f11a4 100644 if (printer_type == PrinterType::kPrivet) { if (!privet_printer_handler_) { privet_printer_handler_ = -@@ -1251,6 +1252,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( +@@ -1252,6 +1253,9 @@ PrinterHandler* PrintPreviewHandler::GetPrinterHandler( } return privet_printer_handler_.get(); } @@ -292,7 +292,7 @@ index 1d2254cefc2c..7aa5fe7f11a4 100644 #endif if (printer_type == PrinterType::kPdf) { if (!pdf_printer_handler_) { -@@ -1323,6 +1327,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, +@@ -1324,6 +1328,7 @@ void PrintPreviewHandler::OnPrintResult(const std::string& callback_id, } void PrintPreviewHandler::RegisterForGaiaCookieChanges() { @@ -300,7 +300,7 @@ index 1d2254cefc2c..7aa5fe7f11a4 100644 DCHECK(!identity_manager_); cloud_print_enabled_ = !base::Contains(printer_type_deny_list_, PrinterType::kCloud) && -@@ -1339,6 +1344,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { +@@ -1340,6 +1345,7 @@ void PrintPreviewHandler::RegisterForGaiaCookieChanges() { identity_manager_ = IdentityManagerFactory::GetForProfile(profile); identity_manager_->AddObserver(this); @@ -309,18 +309,18 @@ index 1d2254cefc2c..7aa5fe7f11a4 100644 void PrintPreviewHandler::UnregisterForGaiaCookieChanges() { diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 43cddc1495e9..c4307c9f7292 100644 +index 1d226233cce3..7ce5bc268410 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc -@@ -28,6 +28,7 @@ - #include "base/task/post_task.h" +@@ -27,6 +27,7 @@ + #include "base/synchronization/lock.h" #include "base/values.h" #include "build/build_config.h" +#include "cef/libcef/features/features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process_platform_part.h" - #include "chrome/browser/printing/background_printing_manager.h" -@@ -84,12 +85,16 @@ namespace printing { + #include "chrome/browser/pdf/pdf_extension_util.h" +@@ -86,12 +87,16 @@ namespace printing { namespace { diff --git a/patch/patches/printing_context_2196.patch b/patch/patches/printing_context_2196.patch index ce53f9270..3c75ad618 100644 --- a/patch/patches/printing_context_2196.patch +++ b/patch/patches/printing_context_2196.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/printing/print_job_worker.cc chrome/browser/printing/print_job_worker.cc -index 9122bbf4f15c..b6a190193a87 100644 +index 52efa2037a31..cc1792facfca 100644 --- chrome/browser/printing/print_job_worker.cc +++ chrome/browser/printing/print_job_worker.cc -@@ -134,6 +134,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) +@@ -133,6 +133,7 @@ PrintJobWorker::PrintJobWorker(int render_process_id, int render_frame_id) PrintingContext::Create(printing_context_delegate_.get())), thread_("Printing_Worker") { DCHECK_CURRENTLY_ON(content::BrowserThread::IO); diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index 654c569b0..fdee9ff87 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 8c6deced5a7a..5bded2a7e8f1 100644 +index f2c4cbf78618..2a2f4d475538 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -487,6 +487,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { +@@ -509,6 +509,8 @@ bool RenderViewHostImpl::IsRenderViewLive() { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/resource_bundle_2512.patch b/patch/patches/resource_bundle_2512.patch index a78f1747f..ab97748af 100644 --- a/patch/patches/resource_bundle_2512.patch +++ b/patch/patches/resource_bundle_2512.patch @@ -1,8 +1,8 @@ diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc -index 133540ca848f..d442344715af 100644 +index eeb09546b453..b97a392faf74 100644 --- ui/base/resource/resource_bundle.cc +++ ui/base/resource/resource_bundle.cc -@@ -854,6 +854,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) +@@ -865,6 +865,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate) : delegate_(delegate), locale_resources_data_lock_(new base::Lock), max_scale_factor_(SCALE_FACTOR_100P) { @@ -15,7 +15,7 @@ index 133540ca848f..d442344715af 100644 mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch( switches::kMangleLocalizedStrings); } -@@ -863,6 +869,11 @@ ResourceBundle::~ResourceBundle() { +@@ -874,6 +880,11 @@ ResourceBundle::~ResourceBundle() { UnloadLocaleResources(); } @@ -28,10 +28,10 @@ index 133540ca848f..d442344715af 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 0b62c5dba949..ddcb938a26ed 100644 +index 9cbc1d512acb..26b5f99f5214 100644 --- ui/base/resource/resource_bundle.h +++ ui/base/resource/resource_bundle.h -@@ -159,6 +159,11 @@ class UI_BASE_EXPORT ResourceBundle { +@@ -160,6 +160,11 @@ class COMPONENT_EXPORT(UI_BASE) ResourceBundle { // Return the global resource loader instance. static ResourceBundle& GetSharedInstance(); diff --git a/patch/patches/runhooks.patch b/patch/patches/runhooks.patch index fb2b6b610..071ef581c 100644 --- a/patch/patches/runhooks.patch +++ b/patch/patches/runhooks.patch @@ -1,8 +1,8 @@ diff --git build/toolchain/win/setup_toolchain.py build/toolchain/win/setup_toolchain.py -index 9c936c69d684..13be02ae33f8 100644 +index 1a7c3d74b5c5..00c166906396 100644 --- build/toolchain/win/setup_toolchain.py +++ build/toolchain/win/setup_toolchain.py -@@ -142,22 +142,25 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): +@@ -142,13 +142,17 @@ def _LoadToolchainEnv(cpu, sdk_dir, target_store): # variable. if 'VSINSTALLDIR' in os.environ: del os.environ['VSINSTALLDIR'] @@ -14,36 +14,19 @@ index 9c936c69d684..13be02ae33f8 100644 - raise Exception('%s is missing - make sure VC++ tools are installed.' % - script_path) - script_path = other_path -- cpu_arg = "amd64" -- if (cpu != 'x64'): -- # x64 is default target CPU thus any other CPU requires a target set -- cpu_arg += '_' + cpu -- args = [script_path, cpu_arg] -- # Store target must come before any SDK version declaration -- if (target_store): -- args.append(['store']) -- variables = _LoadEnvFromBat(args) -+ if os.path.exists(script_path): -+ cpu_arg = "amd64" -+ if (cpu != 'x64'): -+ # x64 is default target CPU thus any other CPU requires a target set -+ cpu_arg += '_' + cpu -+ args = [script_path, cpu_arg] -+ # Store target must come before any SDK version declaration -+ if (target_store): -+ args.append(['store']) -+ variables = _LoadEnvFromBat(args) -+ else: ++ if not os.path.exists(script_path): ++ # Compiler environment variables must already be specified. + variables = [] + for k in sorted(os.environ.keys()): + variables.append('%s=%s' % (str(k), str(os.environ[k]))) + variables = '\n'.join(variables) ++ return _ExtractImportantEnvironment(variables) + - return _ExtractImportantEnvironment(variables) - - + cpu_arg = "amd64" + 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 f3557ad32eea..b3e056acccdb 100755 +index e60770e9b4e6..edeb0c357878 100755 --- build/vs_toolchain.py +++ build/vs_toolchain.py @@ -89,9 +89,16 @@ def SetEnvironmentAndGetRuntimeDllDirs(): diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index 79bc572c1..6824eaa76 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index f22bf4255266..3b1025cd1a8f 100644 +index 3ff69bf8cd7d..fe5fbf5f79fb 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc -@@ -745,10 +745,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -676,10 +676,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -19,7 +19,7 @@ index f22bf4255266..3b1025cd1a8f 100644 } void RenderWidgetHostViewAura::WindowTitleChanged() { -@@ -2029,6 +2031,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -1968,6 +1970,15 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // Init(), because it needs to have the layer. if (frame_sink_id_.is_valid()) window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/service_manager_654986.patch b/patch/patches/service_manager_654986.patch index 9a1e5ee05..846119645 100644 --- a/patch/patches/service_manager_654986.patch +++ b/patch/patches/service_manager_654986.patch @@ -1,5 +1,5 @@ diff --git services/service_manager/embedder/main.cc services/service_manager/embedder/main.cc -index f9c275cdd78f..247142951d99 100644 +index d277d1eea17e..5f87c13a47b1 100644 --- services/service_manager/embedder/main.cc +++ services/service_manager/embedder/main.cc @@ -244,22 +244,36 @@ int RunService(MainDelegate* delegate) { @@ -57,7 +57,7 @@ index f9c275cdd78f..247142951d99 100644 InitializeMac(); #endif -@@ -422,18 +431,16 @@ int Main(const MainParams& params) { +@@ -421,18 +430,16 @@ int Main(const MainParams& params) { } } @@ -85,7 +85,7 @@ index f9c275cdd78f..247142951d99 100644 switch (process_type) { case ProcessType::kDefault: NOTREACHED(); -@@ -455,6 +462,8 @@ int Main(const MainParams& params) { +@@ -454,6 +461,8 @@ int Main(const MainParams& params) { break; } @@ -94,7 +94,7 @@ index f9c275cdd78f..247142951d99 100644 if (tracker) { if (exit_code == 0) { tracker->SetProcessPhaseIfEnabled( -@@ -466,13 +475,38 @@ int Main(const MainParams& params) { +@@ -465,13 +474,38 @@ int Main(const MainParams& params) { } } diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index 0d13f20da..dbb1c99bc 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index 75a5ee192358..379e0bdd11b1 100644 +index b409f1bd146c..4536b21241e6 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc -@@ -18,6 +18,7 @@ +@@ -19,6 +19,7 @@ #include "base/strings/string_split.h" #include "base/task/post_task.h" #include "base/task/thread_pool.h" @@ -10,7 +10,7 @@ index 75a5ee192358..379e0bdd11b1 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -661,9 +662,23 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -723,9 +724,23 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( network_context_params->cookie_manager_params = CreateCookieManagerParams(profile_, *cookie_settings_); @@ -35,7 +35,7 @@ index 75a5ee192358..379e0bdd11b1 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -676,7 +691,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -738,7 +753,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -46,10 +46,10 @@ index 75a5ee192358..379e0bdd11b1 100644 // change. network_context_params->http_server_properties_path = diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index a48ead96b3f7..967a5975c330 100644 +index 4e621c3366ab..0a8bdbc51f9c 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h -@@ -464,6 +464,11 @@ class Profile : public content::BrowserContext { +@@ -447,6 +447,11 @@ class Profile : public content::BrowserContext { virtual bool ShouldRestoreOldSessionCookies(); virtual bool ShouldPersistSessionCookies(); @@ -62,10 +62,10 @@ index a48ead96b3f7..967a5975c330 100644 // specified isolated app (or for the profile itself, if |relative_path| is // empty). diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 69652bdb5952..f1554d00df7b 100644 +index 477b47a77211..1dca6b496350 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -476,6 +476,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -479,6 +479,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } @@ -92,10 +92,10 @@ index 69652bdb5952..f1554d00df7b 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 46001bd4e4e1..7ac1fc4f49ce 100644 +index 9908e6f8e7ed..d85793db29de 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -180,6 +180,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -184,6 +184,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -105,10 +105,10 @@ index 46001bd4e4e1..7ac1fc4f49ce 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 4157f0ce83a5..1a0966ce73c8 100644 +index 47f2942cd329..b226df4c358a 100644 --- net/cookies/cookie_store.h +++ net/cookies/cookie_store.h -@@ -148,6 +148,11 @@ class NET_EXPORT CookieStore { +@@ -149,6 +149,11 @@ class NET_EXPORT CookieStore { // Transfer ownership of a CookieAccessDelegate. void SetCookieAccessDelegate(std::unique_ptr delegate); @@ -143,10 +143,10 @@ index 1d988375b00a..e71cbc3b612f 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 2c3f75ea4ad1..2e639893913b 100644 +index 3bb208bad23c..fd50ae357d3f 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -1746,6 +1746,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1809,6 +1809,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( } scoped_refptr session_cleanup_cookie_store; @@ -154,7 +154,7 @@ index 2c3f75ea4ad1..2e639893913b 100644 if (params_->cookie_path) { scoped_refptr client_task_runner = base::ThreadTaskRunnerHandle::Get(); -@@ -1772,18 +1773,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() { +@@ -1835,18 +1836,26 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( session_cleanup_cookie_store = base::MakeRefCounted(sqlite_store); @@ -185,10 +185,10 @@ index 2c3f75ea4ad1..2e639893913b 100644 trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index 6589fe215cfa..481fabeef3a1 100644 +index 6d5110add0e3..250175c0d05f 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom -@@ -258,6 +258,9 @@ struct NetworkContextParams { +@@ -274,6 +274,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 d19c44585..adf820061 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 f06c5b512342..1e8d5eef47fc 100644 +index a0034ad3a21d..80fa8da263ac 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -489,10 +489,6 @@ class LoginHandlerDelegate { +@@ -490,10 +490,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index f06c5b512342..1e8d5eef47fc 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -549,12 +545,6 @@ void OnAuthRequiredContinuation( +@@ -550,12 +546,6 @@ void OnAuthRequiredContinuation( web_contents_getter = base::BindRepeating(GetWebContents, process_id, routing_id); } @@ -26,7 +26,7 @@ index f06c5b512342..1e8d5eef47fc 100644 new LoginHandlerDelegate(std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_main_frame, process_id, routing_id, -@@ -2363,8 +2353,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2358,8 +2348,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index f06c5b512342..1e8d5eef47fc 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2387,7 +2381,10 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2396,7 +2390,10 @@ void StoragePartitionImpl::InitNetworkContext() { network_context_.reset(); GetNetworkService()->CreateNetworkContext( network_context_.BindNewPipeAndPassReceiver(), std::move(context_params)); diff --git a/patch/patches/set_resize_background_color.patch b/patch/patches/set_resize_background_color.patch index 2ff4f1f51..c5e3a62f1 100644 --- a/patch/patches/set_resize_background_color.patch +++ b/patch/patches/set_resize_background_color.patch @@ -39,7 +39,7 @@ index f92961e9f79b..f1ff80b244ef 100644 }; diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc -index 7bef84b8c9ea..9b9f0a789fe9 100644 +index 0c523877565b..694e3bdc7d0d 100644 --- ui/views/controls/webview/webview.cc +++ ui/views/controls/webview/webview.cc @@ -127,6 +127,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size, @@ -54,7 +54,7 @@ index 7bef84b8c9ea..9b9f0a789fe9 100644 if (crashed_overlay_view_ == crashed_overlay_view) return; diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h -index 84d5cd520f7a..c7a2c7644c4f 100644 +index 624dcb1a4d8a..70a48e40022d 100644 --- ui/views/controls/webview/webview.h +++ ui/views/controls/webview/webview.h @@ -82,6 +82,10 @@ class WEBVIEW_EXPORT WebView : public View, diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index 6385f1b4c..151c566e3 100644 --- a/patch/patches/storage_incognito_2289.patch +++ b/patch/patches/storage_incognito_2289.patch @@ -1,8 +1,8 @@ diff --git content/browser/blob_storage/chrome_blob_storage_context.cc content/browser/blob_storage/chrome_blob_storage_context.cc -index f90e9fce0675..33551a2874bc 100644 +index 12d84e3d4a09..526048daac85 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc -@@ -117,7 +117,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( +@@ -116,7 +116,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( // If we're not incognito mode, schedule all of our file tasks to enable // disk on the storage context. @@ -13,19 +13,19 @@ index f90e9fce0675..33551a2874bc 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 05473c622dbd..9cd0e465fd2d 100644 +index 13e78598fea9..f5f3fc28c46a 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc -@@ -129,7 +129,7 @@ StoragePartition* GetStoragePartitionFromConfig( - StoragePartitionImplMap* partition_map = +@@ -255,7 +255,7 @@ StoragePartition* BrowserContext::GetStoragePartition( GetStoragePartitionMap(browser_context); + auto config_to_use = storage_partition_config; - if (browser_context->IsOffTheRecord()) + if (browser_context->IsOffTheRecord() || browser_context->GetPath().empty()) - in_memory = true; + config_to_use = storage_partition_config.CopyWithInMemorySet(); - return partition_map->Get(partition_domain, partition_name, in_memory, -@@ -543,7 +543,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { + return partition_map->Get(config_to_use, can_create); +@@ -536,7 +536,7 @@ media::VideoDecodePerfHistory* BrowserContext::GetVideoDecodePerfHistory() { kUseInMemoryDBDefault); std::unique_ptr stats_db; @@ -35,10 +35,10 @@ index 05473c622dbd..9cd0e465fd2d 100644 std::make_unique(nullptr); } else { diff --git storage/browser/database/database_tracker.cc storage/browser/database/database_tracker.cc -index ecc6a0d2b8e5..b120add8abab 100644 +index 4f8cfb3eb34a..8c357827e893 100644 --- storage/browser/database/database_tracker.cc +++ storage/browser/database/database_tracker.cc -@@ -506,7 +506,7 @@ bool DatabaseTracker::LazyInit() { +@@ -508,7 +508,7 @@ bool DatabaseTracker::LazyInit() { meta_table_.reset(new sql::MetaTable()); is_initialized_ = diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 855779a88..8ab885c17 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 7ce21d4711b6..a1a9008f9887 100644 +index 31f563dd4d59..a68423706c60 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h @@ -58,6 +58,8 @@ diff --git a/patch/patches/ui_dragdrop_355390.patch b/patch/patches/ui_dragdrop_355390.patch index b5861b67c..150e47498 100644 --- a/patch/patches/ui_dragdrop_355390.patch +++ b/patch/patches/ui_dragdrop_355390.patch @@ -1,8 +1,8 @@ diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc -index 88a24bab57b5..d130fcc0eca8 100644 +index 5a38c3f841bf..bb374d08ee95 100644 --- ui/base/x/x11_os_exchange_data_provider.cc +++ ui/base/x/x11_os_exchange_data_provider.cc -@@ -134,7 +134,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, +@@ -122,7 +122,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url, format_map_.Insert(gfx::GetAtom(kMimeTypeMozillaURL), mem); // Set a string fallback as well. diff --git a/patch/patches/underlay_1051.patch b/patch/patches/underlay_1051.patch index 330aaa640..864c7def1 100644 --- a/patch/patches/underlay_1051.patch +++ b/patch/patches/underlay_1051.patch @@ -1,12 +1,12 @@ diff --git ui/base/cocoa/underlay_opengl_hosting_window.h ui/base/cocoa/underlay_opengl_hosting_window.h -index d673c31a0f31..806d1341567b 100644 +index ec1c6c972ee8..9f7334205132 100644 --- ui/base/cocoa/underlay_opengl_hosting_window.h +++ ui/base/cocoa/underlay_opengl_hosting_window.h @@ -12,7 +12,7 @@ // Common base class for windows that host a OpenGL surface that renders under // the window. Previously contained methods related to hole punching, now just // contains common asserts. --UI_BASE_EXPORT +-COMPONENT_EXPORT(UI_BASE) +__attribute__((visibility("default"))) @interface UnderlayOpenGLHostingWindow : NSWindow @end diff --git a/patch/patches/views_1749_2102.patch b/patch/patches/views_1749_2102.patch index 089ec7828..80a69f30d 100644 --- a/patch/patches/views_1749_2102.patch +++ b/patch/patches/views_1749_2102.patch @@ -1,9 +1,9 @@ diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h -index 887eee64e27f..31d4d453a481 100644 +index 4c08fbf43c16..e319f8b6782f 100644 --- ui/base/models/menu_model.h +++ ui/base/models/menu_model.h @@ -12,8 +12,11 @@ - #include "ui/base/ui_base_export.h" + #include "ui/base/models/menu_separator_types.h" #include "ui/gfx/native_widget_types.h" +#include "third_party/skia/include/core/SkColor.h" @@ -14,7 +14,7 @@ index 887eee64e27f..31d4d453a481 100644 } namespace ui { -@@ -119,6 +122,27 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr { +@@ -129,6 +132,27 @@ class COMPONENT_EXPORT(UI_BASE) MenuModel // |event_flags| is a bit mask of ui::EventFlags. virtual void ActivatedAt(int index, int event_flags); @@ -43,10 +43,10 @@ index 887eee64e27f..31d4d453a481 100644 virtual void MenuWillShow() {} diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc -index ddbad437878c..4e86541fb68b 100644 +index 383943809398..c859bd0799d3 100644 --- ui/gfx/render_text.cc +++ ui/gfx/render_text.cc -@@ -610,6 +610,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { +@@ -614,6 +614,14 @@ void RenderText::SetWhitespaceElision(base::Optional whitespace_elision) { } } @@ -61,7 +61,7 @@ index ddbad437878c..4e86541fb68b 100644 void RenderText::SetDisplayRect(const Rect& r) { if (r != display_rect_) { display_rect_ = r; -@@ -1990,6 +1998,19 @@ void RenderText::OnTextAttributeChanged() { +@@ -1966,6 +1974,19 @@ void RenderText::OnTextAttributeChanged() { layout_text_up_to_date_ = false; @@ -82,10 +82,10 @@ index ddbad437878c..4e86541fb68b 100644 } diff --git ui/gfx/render_text.h ui/gfx/render_text.h -index 8cfbd5c5c4af..80a6c8a8674c 100644 +index 9ef49c1dfda4..33d02455f24b 100644 --- ui/gfx/render_text.h +++ ui/gfx/render_text.h -@@ -324,6 +324,10 @@ class GFX_EXPORT RenderText { +@@ -346,6 +346,10 @@ class GFX_EXPORT RenderText { return whitespace_elision_; } @@ -96,7 +96,7 @@ index 8cfbd5c5c4af..80a6c8a8674c 100644 const Rect& display_rect() const { return display_rect_; } void SetDisplayRect(const Rect& r); -@@ -1015,6 +1019,8 @@ class GFX_EXPORT RenderText { +@@ -1045,6 +1049,8 @@ class GFX_EXPORT RenderText { // Tell whether or not the |layout_text_| needs an update or is up to date. mutable bool layout_text_up_to_date_ = false; @@ -119,10 +119,10 @@ index b711c5f08f80..d0d428057e5d 100644 // Size used for the default SquareInkDropRipple. static constexpr gfx::Size kDefaultInkDropSize = gfx::Size(24, 24); diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc -index bb9105f1a18e..45ae9cdb4ab0 100644 +index 3aef54f32cd9..ee16da5c2670 100644 --- ui/views/controls/button/label_button.cc +++ ui/views/controls/button/label_button.cc -@@ -480,6 +480,12 @@ void LabelButton::OnThemeChanged() { +@@ -487,6 +487,12 @@ void LabelButton::OnThemeChanged() { SchedulePaint(); } @@ -150,7 +150,7 @@ index ac348aa7dd46..88ab098daddc 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index ad6af149e286..bef8ab77d961 100644 +index febce15ff860..c373f786d0ae 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -53,6 +53,20 @@ bool IsOpaque(SkColor color) { @@ -174,7 +174,7 @@ index ad6af149e286..bef8ab77d961 100644 } // namespace namespace views { -@@ -308,6 +322,14 @@ base::string16 Label::GetTooltipText() const { +@@ -329,6 +343,14 @@ base::string16 Label::GetTooltipText() const { return tooltip_text_; } @@ -189,7 +189,7 @@ index ad6af149e286..bef8ab77d961 100644 void Label::SetTooltipText(const base::string16& tooltip_text) { DCHECK(handles_tooltips_); if (tooltip_text_ == tooltip_text) -@@ -582,7 +604,19 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -603,7 +625,19 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SetFontList(font_list()); render_text->set_shadows(GetShadows()); render_text->SetCursorEnabled(false); @@ -211,10 +211,10 @@ index ad6af149e286..bef8ab77d961 100644 render_text->SetMultiline(multiline); render_text->SetMaxLines(multiline ? GetMaxLines() : 0); diff --git ui/views/controls/label.h ui/views/controls/label.h -index dc690b22dc25..d07d1df9aa2f 100644 +index 5a45ef3cbf00..597d5f1e8767 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h -@@ -183,6 +183,10 @@ class VIEWS_EXPORT Label : public View, +@@ -195,6 +195,10 @@ class VIEWS_EXPORT Label : public View, gfx::ElideBehavior GetElideBehavior() const; void SetElideBehavior(gfx::ElideBehavior elide_behavior); @@ -225,7 +225,7 @@ index dc690b22dc25..d07d1df9aa2f 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 -@@ -416,6 +420,7 @@ class VIEWS_EXPORT Label : public View, +@@ -428,6 +432,7 @@ class VIEWS_EXPORT Label : public View, bool collapse_when_hidden_ = false; int fixed_width_ = 0; int max_width_ = 0; @@ -234,10 +234,10 @@ index dc690b22dc25..d07d1df9aa2f 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index d9938916a535..bc7eaa23c9c6 100644 +index a039303e8b9a..60d429d88aa5 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -2651,8 +2651,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( +@@ -2652,8 +2652,13 @@ MenuItemView* MenuController::FindNextSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -252,7 +252,7 @@ index d9938916a535..bc7eaa23c9c6 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2671,8 +2676,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2672,8 +2677,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -265,10 +265,10 @@ index d9938916a535..bc7eaa23c9c6 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_delegate.h ui/views/controls/menu/menu_delegate.h -index 2a03ff43f4a6..c12d68eb212c 100644 +index 158724b4752c..c82192848584 100644 --- ui/views/controls/menu/menu_delegate.h +++ ui/views/controls/menu/menu_delegate.h -@@ -81,6 +81,22 @@ class VIEWS_EXPORT MenuDelegate { +@@ -80,6 +80,22 @@ class VIEWS_EXPORT MenuDelegate { // parts of |style| or leave it unmodified. virtual void GetLabelStyle(int id, LabelStyle* style) const; @@ -291,7 +291,7 @@ index 2a03ff43f4a6..c12d68eb212c 100644 // The tooltip shown for the menu item. This is invoked when the user // hovers over the item, and no tooltip text has been set for that item. virtual base::string16 GetTooltipText(int id, -@@ -207,6 +223,11 @@ class VIEWS_EXPORT MenuDelegate { +@@ -206,6 +222,11 @@ class VIEWS_EXPORT MenuDelegate { bool* has_mnemonics, MenuButton** button); @@ -304,10 +304,10 @@ index 2a03ff43f4a6..c12d68eb212c 100644 virtual int GetMaxWidthForMenu(MenuItemView* menu); diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc -index d00618f37c3a..3157ba4f219b 100644 +index 6d06d6fc20ea..28722992c551 100644 --- ui/views/controls/menu/menu_item_view.cc +++ ui/views/controls/menu/menu_item_view.cc -@@ -987,6 +987,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas, +@@ -1030,6 +1030,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); @@ -323,7 +323,7 @@ index d00618f37c3a..3157ba4f219b 100644 } else if (render_selection) { gfx::Rect item_bounds = GetLocalBounds(); if (type_ == Type::kActionableSubMenu) { -@@ -1054,6 +1063,13 @@ void MenuItemView::PaintMinorIconAndText( +@@ -1097,6 +1106,13 @@ void MenuItemView::PaintMinorIconAndText( } SkColor MenuItemView::GetTextColor(bool minor, bool render_selection) const { @@ -338,10 +338,10 @@ index d00618f37c3a..3157ba4f219b 100644 GetMenuController() && GetMenuController()->use_touchable_layout() ? style::CONTEXT_TOUCH_MENU diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc -index 79af9195b11f..a30375d1a6ed 100644 +index 7d0d04e10a19..a2fbe6b62328 100644 --- ui/views/controls/menu/menu_model_adapter.cc +++ ui/views/controls/menu/menu_model_adapter.cc -@@ -233,6 +233,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { +@@ -236,6 +236,77 @@ bool MenuModelAdapter::IsItemChecked(int id) const { return false; } @@ -461,10 +461,10 @@ index 3ba6950690e3..f500022cc083 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aurax11.cc ui/views/test/ui_controls_factory_desktop_aurax11.cc -index 0ba3742be89f..6187478ecfc7 100644 +index 3e603f8011dc..cb64fec8d45d 100644 --- ui/views/test/ui_controls_factory_desktop_aurax11.cc +++ ui/views/test/ui_controls_factory_desktop_aurax11.cc -@@ -150,10 +150,6 @@ class UIControlsDesktopX11 : public UIControlsAura { +@@ -154,10 +154,6 @@ class UIControlsDesktopX11 : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -476,7 +476,7 @@ index 0ba3742be89f..6187478ecfc7 100644 // Move the cursor because EnterNotify/LeaveNotify are generated with the // current mouse position as a result of XGrabPointer() diff --git ui/views/view.h ui/views/view.h -index 1f4f1eb78fe2..15bda55cb8f9 100644 +index 23b5d3ffd8be..c468ef4b6a25 100644 --- ui/views/view.h +++ ui/views/view.h @@ -23,6 +23,7 @@ diff --git a/patch/patches/views_widget_180_1481_1565_1677_1749.patch b/patch/patches/views_widget_180_1481_1565_1677_1749.patch index e6e896e08..09e185b4b 100644 --- a/patch/patches/views_widget_180_1481_1565_1677_1749.patch +++ b/patch/patches/views_widget_180_1481_1565_1677_1749.patch @@ -1,8 +1,8 @@ diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc -index 403a8c870a59..da2ced627c2f 100644 +index 85b265f70047..691e04ddcf97 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -558,6 +558,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { +@@ -565,6 +565,14 @@ float RenderWidgetHostViewBase::GetDeviceScaleFactor() { return screen_info.device_scale_factor; } @@ -18,10 +18,10 @@ index 403a8c870a59..da2ced627c2f 100644 return renderer_frame_number_; } diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 39f1c8d6ee46..503fe5668de3 100644 +index d6363c75664b..45288fdafdee 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h -@@ -65,6 +65,7 @@ class CursorManager; +@@ -66,6 +66,7 @@ class CursorManager; class MouseWheelPhaseHandler; class RenderWidgetHostImpl; class RenderWidgetHostViewBaseObserver; @@ -29,7 +29,7 @@ index 39f1c8d6ee46..503fe5668de3 100644 class SyntheticGestureTarget; class TextInputManager; class TouchSelectionControllerClientManager; -@@ -82,6 +83,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -83,6 +84,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase float current_device_scale_factor() const { return current_device_scale_factor_; } @@ -39,7 +39,7 @@ index 39f1c8d6ee46..503fe5668de3 100644 // Returns the focused RenderWidgetHost inside this |view|'s RWH. RenderWidgetHostImpl* GetFocusedWidget() const; -@@ -116,6 +120,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -117,6 +121,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase void DisableAutoResize(const gfx::Size& new_size) override; bool IsScrollOffsetAtTop() override; float GetDeviceScaleFactor() final; @@ -48,7 +48,7 @@ index 39f1c8d6ee46..503fe5668de3 100644 TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; void SetRecordContentToVisibleTimeRequest( -@@ -435,6 +441,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase +@@ -439,6 +445,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase // helps to position the full screen widget on the correct monitor. virtual void InitAsFullscreen(RenderWidgetHostView* reference_host_view) = 0; @@ -61,9 +61,9 @@ index 39f1c8d6ee46..503fe5668de3 100644 // Sets the cursor for this view to the one associated with the specified // cursor_type. virtual void UpdateCursor(const WebCursor& cursor) = 0; -@@ -600,6 +612,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase - - bool is_currently_scrolling_viewport_ = false; +@@ -616,6 +628,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase + // specific RenderWidgetHostView. + base::Optional display_feature_; + // True if the widget has a external parent view/window outside of the + // Chromium-controlled view/window hierarchy. @@ -73,10 +73,10 @@ index 39f1c8d6ee46..503fe5668de3 100644 FRIEND_TEST_ALL_PREFIXES( BrowserSideFlingBrowserTest, 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 a21600fc77a3..08bc5f01702b 100644 +index df6f607a65ae..e37f7bf73f0f 100644 --- content/browser/renderer_host/render_widget_host_view_event_handler.cc +++ content/browser/renderer_host/render_widget_host_view_event_handler.cc -@@ -33,6 +33,10 @@ +@@ -34,6 +34,10 @@ #include "ui/events/keycodes/dom/dom_code.h" #include "ui/touch_selection/touch_selection_controller.h" @@ -87,7 +87,7 @@ index a21600fc77a3..08bc5f01702b 100644 #if defined(OS_WIN) #include "content/browser/frame_host/render_frame_host_impl.h" #include "ui/aura/window_tree_host.h" -@@ -928,6 +932,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { +@@ -931,6 +935,14 @@ void RenderWidgetHostViewEventHandler::SetKeyboardFocus() { ::SetFocus(hwnd); } } @@ -103,7 +103,7 @@ index a21600fc77a3..08bc5f01702b 100644 // TODO(wjmaclean): can host_ ever be null? if (host_ && set_focus_on_mouse_down_or_key_event_) { diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 3e5bf09f1cf7..bc8ea335d501 100644 +index 4810a45aa4b0..33e32192f975 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h @@ -243,6 +243,14 @@ class CONTENT_EXPORT RenderWidgetHostView { @@ -122,36 +122,32 @@ index 3e5bf09f1cf7..bc8ea335d501 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/base/x/x11_window.cc ui/base/x/x11_window.cc -index 70f520bccd47..361e99d462a1 100644 +index bc5f4fefa7a0..4b2e110441be 100644 --- ui/base/x/x11_window.cc +++ ui/base/x/x11_window.cc -@@ -255,8 +255,12 @@ void XWindow::Init(const Configuration& config) { - attribute_mask |= CWBorderPixel; - swa.border_pixel = 0; +@@ -270,7 +270,8 @@ void XWindow::Init(const Configuration& config) { + req.border_pixel = 0; -+ gfx::AcceleratedWidget parent_widget = config.parent_widget; -+ if (parent_widget == gfx::kNullAcceleratedWidget) -+ parent_widget = x_root_window_; -+ bounds_in_pixels_ = SanitizeBounds(config.bounds); -- xwindow_ = XCreateWindow(xdisplay_, x_root_window_, bounds_in_pixels_.x(), -+ xwindow_ = XCreateWindow(xdisplay_, parent_widget, bounds_in_pixels_.x(), - bounds_in_pixels_.y(), bounds_in_pixels_.width(), - bounds_in_pixels_.height(), - 0, // border width +- req.parent = x_root_window_; ++ req.parent = config.parent_widget == gfx::kNullAcceleratedWidget ? ++ x_root_window_ : config.parent_widget; + req.x = bounds_in_pixels_.x(); + req.y = bounds_in_pixels_.y(); + req.width = bounds_in_pixels_.width(); diff --git ui/base/x/x11_window.h ui/base/x/x11_window.h -index feec9b62e6d7..62a509218b57 100644 +index c5b0d7227a5d..69d4f6013f3d 100644 --- ui/base/x/x11_window.h +++ ui/base/x/x11_window.h -@@ -19,6 +19,7 @@ +@@ -20,6 +20,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/geometry/size.h" #include "ui/gfx/geometry/size_f.h" +#include "ui/gfx/native_widget_types.h" + #include "ui/gfx/x/event.h" + #include "ui/gfx/x/sync.h" #include "ui/gfx/x/x11.h" - #include "ui/gfx/x/x11_types.h" - -@@ -86,6 +87,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { +@@ -91,6 +92,7 @@ class COMPONENT_EXPORT(UI_BASE_X) XWindow { std::string wm_class_name; std::string wm_class_class; std::string wm_role_name; @@ -160,10 +156,10 @@ index feec9b62e6d7..62a509218b57 100644 XWindow(); diff --git ui/platform_window/x11/x11_window.cc ui/platform_window/x11/x11_window.cc -index c9fc5e2670dd..b3d591e516d4 100644 +index bc2c18233b75..4e2f72b51cdf 100644 --- ui/platform_window/x11/x11_window.cc +++ ui/platform_window/x11/x11_window.cc -@@ -85,6 +85,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( +@@ -97,6 +97,7 @@ ui::XWindow::Configuration ConvertInitPropertiesToXWindowConfig( config.wm_class_class = properties.wm_class_class; config.wm_role_name = properties.wm_role_name; config.activatable = properties.activatable; @@ -172,11 +168,11 @@ index c9fc5e2670dd..b3d591e516d4 100644 config.background_color = properties.background_color; return config; diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc -index 963e7053e7ac..b734cbef7c81 100644 +index e9bb45ad238c..68f2a5ef5d0c 100644 --- ui/views/widget/desktop_aura/desktop_screen_win.cc +++ ui/views/widget/desktop_aura/desktop_screen_win.cc -@@ -16,6 +16,8 @@ DesktopScreenWin::DesktopScreenWin() = default; - DesktopScreenWin::~DesktopScreenWin() = default; +@@ -18,6 +18,8 @@ DesktopScreenWin::~DesktopScreenWin() { + } HWND DesktopScreenWin::GetHWNDFromNativeWindow(gfx::NativeWindow window) const { + if (!window) @@ -185,10 +181,10 @@ index 963e7053e7ac..b734cbef7c81 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 4168fa1a51f1..98367686fba0 100644 +index 61d8b3a06783..7f9552f2b36b 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -@@ -332,6 +332,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( +@@ -315,6 +315,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( properties->wm_class_class = params.wm_class_class; properties->wm_role_name = params.wm_role_name; @@ -198,10 +194,10 @@ index 4168fa1a51f1..98367686fba0 100644 properties->x11_extension_delegate = this; } 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 6051aadee62e..fc5b7a2f64b7 100644 +index b5430b871cfc..f0d5d8521e4b 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -134,8 +134,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -140,8 +140,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_); HWND parent_hwnd = nullptr; @@ -215,7 +211,7 @@ index 6051aadee62e..fc5b7a2f64b7 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -912,11 +916,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -918,11 +922,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -234,10 +230,10 @@ index 6051aadee62e..fc5b7a2f64b7 100644 bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { 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 75ca9e99f2ca..416fe48ff90a 100644 +index c0f00b6d86d3..0a4da77de31a 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h -@@ -288,6 +288,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin +@@ -294,6 +294,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin // True if the window should have the frame removed. bool remove_standard_frame_; @@ -249,10 +245,10 @@ index 75ca9e99f2ca..416fe48ff90a 100644 // a reference. corewm::TooltipWin* tooltip_; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -index 44e9eef3492e..ddf197d53b8c 100644 +index af81a254b0ce..42474f1e7c1e 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.cc -@@ -77,6 +77,9 @@ DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() = default; +@@ -78,6 +78,9 @@ DesktopWindowTreeHostX11::~DesktopWindowTreeHostX11() = default; // DesktopWindowTreeHostX11, DesktopWindowTreeHost implementation: void DesktopWindowTreeHostX11::Init(const Widget::InitParams& params) { @@ -278,14 +274,14 @@ index 44e9eef3492e..ddf197d53b8c 100644 + return DesktopWindowTreeHostLinux::GetLocationOnScreenInPixels(); +} + - void DesktopWindowTreeHostX11::OnXWindowSelectionEvent(XEvent* xev) { + void DesktopWindowTreeHostX11::OnXWindowSelectionEvent(x11::Event* xev) { DCHECK(xev); DCHECK(drag_drop_client_); diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h -index 8cd6b80ee1ea..442c33c77d92 100644 +index 695019454640..9d85e934f6e5 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h +++ ui/views/widget/desktop_aura/desktop_window_tree_host_x11.h -@@ -30,12 +30,21 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, +@@ -31,12 +31,21 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, DesktopNativeWidgetAura* desktop_native_widget_aura); ~DesktopWindowTreeHostX11() override; @@ -307,7 +303,7 @@ index 8cd6b80ee1ea..442c33c77d92 100644 private: friend class DesktopWindowTreeHostX11HighDPITest; -@@ -49,8 +58,18 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, +@@ -50,8 +59,18 @@ class VIEWS_EXPORT DesktopWindowTreeHostX11 : public DesktopWindowTreeHostLinux, // directly. See https://crbug.com/990756. const ui::XWindow* GetXWindow() const; @@ -327,10 +323,10 @@ index 8cd6b80ee1ea..442c33c77d92 100644 }; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index ecd7be9185fd..d03a5bcf8e7c 100644 +index a06ebe82c33f..559ec6d0130d 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -287,7 +287,8 @@ void Widget::Init(InitParams params) { +@@ -285,7 +285,8 @@ void Widget::Init(InitParams params) { params.name = params.delegate->GetContentsView()->GetClassName(); params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -385,22 +381,22 @@ index 0cbc349dd3d1..3dd288962851 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 23396ad8c3a9..d30f71cedc1c 100644 +index 6b4ef19ee72e..08fd84fe2e6e 100644 --- ui/views/widget/widget_delegate.h +++ ui/views/widget/widget_delegate.h -@@ -263,6 +263,10 @@ class VIEWS_EXPORT WidgetDelegate { - - bool focus_traverses_out() const { return params_.focus_traverses_out; } +@@ -305,6 +305,10 @@ class VIEWS_EXPORT WidgetDelegate { + // Returns true if the title text should be centered. + bool ShouldCenterWindowTitleText() const; + // CEF supports override of min/max size values. + virtual bool MaybeGetMinimumSize(gfx::Size* size) const { return false; } + virtual bool MaybeGetMaximumSize(gfx::Size* size) const { return false; } + - protected: - virtual ~WidgetDelegate(); + bool focus_traverses_out() const { return params_.focus_traverses_out; } + private: diff --git ui/views/widget/widget_hwnd_utils.cc ui/views/widget/widget_hwnd_utils.cc -index 40e66a212e3e..08ee8523ab15 100644 +index 89f5b62f95df..8f6971929a12 100644 --- ui/views/widget/widget_hwnd_utils.cc +++ ui/views/widget/widget_hwnd_utils.cc @@ -67,7 +67,7 @@ void CalculateWindowStylesFromInitParams( @@ -413,10 +409,10 @@ index 40e66a212e3e..08ee8523ab15 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 c981cfc6b0ac..2b0dafd7b2ab 100644 +index db4fe784c7e1..a7af3bbb4e0a 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -3034,10 +3034,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message, +@@ -3072,10 +3072,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 7bfdbb0ec..86b85003b 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,7 +80,7 @@ index 1026b739d283..fe562ab60ce9 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index b2ba22d8da65..efe9686d32d7 100644 +index 7b6f69e3dcce..b04d7984d855 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn @@ -13,7 +13,10 @@ config("viz_service_implementation") { @@ -95,7 +95,7 @@ index b2ba22d8da65..efe9686d32d7 100644 "display/bsp_tree.h", "display/bsp_walk_action.cc", diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc -index b4d4b1c1c597..9ce685048ab1 100644 +index da8936a87cfe..2992b7616f05 100644 --- components/viz/service/display_embedder/output_surface_provider_impl.cc +++ components/viz/service/display_embedder/output_surface_provider_impl.cc @@ -13,6 +13,7 @@ @@ -106,7 +106,7 @@ index b4d4b1c1c597..9ce685048ab1 100644 #include "components/viz/common/display/renderer_settings.h" #include "components/viz/common/frame_sinks/begin_frame_source.h" #include "components/viz/service/display_embedder/gl_output_surface.h" -@@ -224,6 +225,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( +@@ -223,6 +224,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform( if (headless_) return std::make_unique(); @@ -144,10 +144,10 @@ index 2bb30e5318b6..535535dd6c10 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 ffb3a04236be..fa746c7fd350 100644 +index 641a63e8c18e..cdb9a23a1f3e 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -404,8 +404,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -403,8 +403,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( compositor_data.display_private.reset(); root_params->display_private = compositor_data.display_private.BindNewEndpointAndPassReceiver(); @@ -164,10 +164,10 @@ index ffb3a04236be..fa746c7fd350 100644 compositor_data.display_client->GetBoundRemote(resize_task_runner_); diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h -index 60e114920575..01f2ce164a3b 100644 +index 599d24e260ae..13bb4cc5910f 100644 --- mojo/public/cpp/bindings/sync_call_restrictions.h +++ mojo/public/cpp/bindings/sync_call_restrictions.h -@@ -29,6 +29,7 @@ class Compositor; +@@ -33,6 +33,7 @@ class Compositor; namespace viz { class HostFrameSinkManager; @@ -175,15 +175,15 @@ index 60e114920575..01f2ce164a3b 100644 } namespace mojo { -@@ -82,6 +83,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { +@@ -86,6 +87,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions { // For preventing frame swaps of wrong size during resize on Windows. // (https://crbug.com/811945) friend class ui::Compositor; + // For query of whether to use SoftwareOutputDevice or not. + friend class viz::GpuDisplayProvider; - // END ALLOWED USAGE. - - #if ENABLE_SYNC_CALL_RESTRICTIONS + // For calling sync mojo API to get cdm origin. The service and the client are + // 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 d88fab3b7d0a..54984d27a75e 100644 --- services/viz/privileged/mojom/compositing/display_private.mojom @@ -216,7 +216,7 @@ index 6b7fbb6cf13d..e2af75168cb9 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index 48cd5ff63d76..31c4cac2ede4 100644 +index 438dd212d881..c2e112def4e9 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -25,7 +25,9 @@ @@ -254,7 +254,7 @@ index 48cd5ff63d76..31c4cac2ede4 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 -@@ -417,6 +430,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, +@@ -424,6 +437,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient, 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 36a261ae6..0b030939b 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 024415bb096e..0166b65c74ad 100644 +index 1afd8ac2c2cf..34d1ec7938b2 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc -@@ -2096,15 +2096,22 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { +@@ -2225,15 +2225,22 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) { std::string unique_name; frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name); @@ -33,7 +33,7 @@ index 024415bb096e..0166b65c74ad 100644 } CHECK(render_view_host_delegate_view_); CHECK(view_.get()); -@@ -2905,6 +2912,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( +@@ -3035,6 +3042,15 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow( // objects. create_params.renderer_initiated_creation = !is_new_browsing_instance; @@ -49,7 +49,7 @@ index 024415bb096e..0166b65c74ad 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -6262,6 +6278,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -6405,6 +6421,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // This is an outermost WebContents. SetAsFocusedWebContentsIfNecessary(); } @@ -72,22 +72,21 @@ index f1dcf53ea481..192f7c0ddd04 100644 WebContents::CreateParams::CreateParams(const CreateParams& other) = default; diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index 039f001f1294..9ee4058d46b4 100644 +index 40b5d17d9c73..662068b57f36 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h -@@ -82,9 +82,11 @@ class BrowserContext; +@@ -82,8 +82,10 @@ class BrowserContext; class BrowserPluginGuestDelegate; class RenderFrameHost; class RenderViewHost; +class RenderViewHostDelegateView; - class RenderWidgetHost; class RenderWidgetHostView; class WebContentsDelegate; +class WebContentsView; class WebUI; struct CustomContextMenuContext; struct DropData; -@@ -212,6 +214,10 @@ class WebContents : public PageNavigator, +@@ -211,6 +213,10 @@ class WebContents : public PageNavigator, // Sandboxing flags set on the new WebContents. network::mojom::WebSandboxFlags starting_sandbox_flags; @@ -99,7 +98,7 @@ index 039f001f1294..9ee4058d46b4 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 7757c7720406..356fb0577bae 100644 +index e545ff70c612..41cd5299898f 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -61,10 +61,12 @@ class EyeDropperListener; @@ -115,7 +114,7 @@ index 7757c7720406..356fb0577bae 100644 struct ContextMenuParams; struct DropData; struct MediaPlayerWatchTime; -@@ -331,6 +333,14 @@ class CONTENT_EXPORT WebContentsDelegate { +@@ -337,6 +339,14 @@ class CONTENT_EXPORT WebContentsDelegate { const std::string& partition_id, SessionStorageNamespace* session_storage_namespace); @@ -131,10 +130,10 @@ index 7757c7720406..356fb0577bae 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 f80da27979a7..0a04f21c131d 100644 +index 0cab1ba9e1ef..1f74ccca4ff2 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h -@@ -570,6 +570,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener { +@@ -599,6 +599,10 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener { // 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 0c92644de..841ca02bc 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -10,10 +10,10 @@ index ff7a8ed89e94..77f44956ff22 100644 + GetPlugins(bool refresh, bool is_main_frame, url.mojom.Origin main_frame_origin) => (array plugins); }; diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 6c813f0484f8..ce691562e7a8 100644 +index 3278250b6d3d..4a111438d58d 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -669,6 +669,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -671,6 +671,11 @@ class BLINK_PLATFORM_EXPORT Platform { // runs during Chromium's build step). virtual bool IsTakingV8ContextSnapshot() { return false; } @@ -26,10 +26,10 @@ index 6c813f0484f8..ce691562e7a8 100644 static void InitializeMainThreadCommon(Platform* platform, std::unique_ptr main_thread); diff --git third_party/blink/renderer/core/dom/document_init.cc third_party/blink/renderer/core/dom/document_init.cc -index 8d1802954e22..4ec2caa2fd92 100644 +index bab98605009b..92709eee4924 100644 --- third_party/blink/renderer/core/dom/document_init.cc +++ third_party/blink/renderer/core/dom/document_init.cc -@@ -225,11 +225,11 @@ PluginData* DocumentInit::GetPluginData(LocalFrame* frame, const KURL& url) { +@@ -252,11 +252,11 @@ PluginData* DocumentInit::GetPluginData(LocalFrame* frame, const KURL& url) { // frame()->tree().top()->securityContext() returns nullptr. // For that reason, the origin must be retrieved directly from |url|. if (frame->IsMainFrame()) @@ -44,10 +44,10 @@ index 8d1802954e22..4ec2caa2fd92 100644 DocumentInit& DocumentInit::WithTypeFrom(const String& mime_type) { diff --git third_party/blink/renderer/core/frame/local_frame.cc third_party/blink/renderer/core/frame/local_frame.cc -index 453cc53860af..f42e2a34ab23 100644 +index 81585d785de9..726ee5466d21 100644 --- third_party/blink/renderer/core/frame/local_frame.cc +++ third_party/blink/renderer/core/frame/local_frame.cc -@@ -1365,7 +1365,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { +@@ -1483,7 +1483,7 @@ WebContentSettingsClient* LocalFrame::GetContentSettingsClient() { PluginData* LocalFrame::GetPluginData() const { if (!Loader().AllowPlugins(kNotAboutToInstantiatePlugin)) return nullptr; @@ -57,7 +57,7 @@ index 453cc53860af..f42e2a34ab23 100644 } diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 4ee6a0ea5689..8b6d5b1a6e06 100644 +index 0608c4defc6d..54eaa2197957 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -8,6 +8,7 @@ @@ -68,7 +68,7 @@ index 4ee6a0ea5689..8b6d5b1a6e06 100644 #include "third_party/blink/renderer/bindings/core/v8/script_controller.h" #include "third_party/blink/renderer/core/frame/local_frame.h" #include "third_party/blink/renderer/core/inspector/devtools_agent.h" -@@ -142,6 +143,7 @@ DevToolsSession::DevToolsSession( +@@ -144,6 +145,7 @@ DevToolsSession::DevToolsSession( for (wtf_size_t i = 0; i < agents_.size(); i++) agents_[i]->Restore(); } @@ -76,7 +76,7 @@ index 4ee6a0ea5689..8b6d5b1a6e06 100644 } DevToolsSession::~DevToolsSession() { -@@ -182,6 +184,7 @@ void DevToolsSession::Detach() { +@@ -184,6 +186,7 @@ void DevToolsSession::Detach() { agents_.clear(); v8_session_.reset(); agent_->client_->DebuggerTaskFinished(); @@ -85,10 +85,10 @@ index 4ee6a0ea5689..8b6d5b1a6e06 100644 void DevToolsSession::DispatchProtocolCommand( diff --git third_party/blink/renderer/core/page/page.cc third_party/blink/renderer/core/page/page.cc -index 608f9d8f2b43..c82b92f0cd02 100644 +index 8f2a7581185b..4fd9a3c650fd 100644 --- third_party/blink/renderer/core/page/page.cc +++ third_party/blink/renderer/core/page/page.cc -@@ -193,7 +193,8 @@ Page::Page(PageClients& page_clients) +@@ -210,7 +210,8 @@ Page::Page(PageClients& page_clients) MakeGarbageCollected(GetVisualViewport(), GetChromeClient())), link_highlight_(MakeGarbageCollected(*this)), @@ -98,7 +98,7 @@ index 608f9d8f2b43..c82b92f0cd02 100644 // TODO(pdr): Initialize |validation_message_client_| lazily. validation_message_client_( MakeGarbageCollected(*this)), -@@ -378,21 +379,41 @@ void Page::InitialStyleChanged() { +@@ -390,21 +391,41 @@ void Page::InitialStyleChanged() { } } @@ -149,7 +149,7 @@ index 608f9d8f2b43..c82b92f0cd02 100644 page->NotifyPluginsChanged(); } } -@@ -907,7 +928,8 @@ void Page::Trace(Visitor* visitor) { +@@ -908,7 +929,8 @@ void Page::Trace(Visitor* visitor) const { visitor->Trace(link_highlight_); visitor->Trace(spatial_navigation_controller_); visitor->Trace(main_frame_); @@ -160,7 +160,7 @@ index 608f9d8f2b43..c82b92f0cd02 100644 visitor->Trace(agent_metrics_collector_); visitor->Trace(plugins_changed_observers_); diff --git third_party/blink/renderer/core/page/page.h third_party/blink/renderer/core/page/page.h -index 181c13e9e6e3..6384ae98b36e 100644 +index d397e83eb4d8..dff04386de22 100644 --- third_party/blink/renderer/core/page/page.h +++ third_party/blink/renderer/core/page/page.h @@ -145,7 +145,8 @@ class CORE_EXPORT Page final : public GarbageCollected, @@ -173,7 +173,7 @@ index 181c13e9e6e3..6384ae98b36e 100644 // Resets the plugin data for all pages in the renderer process and notifies // PluginsChangedObservers. -@@ -405,7 +406,8 @@ class CORE_EXPORT Page final : public GarbageCollected, +@@ -406,7 +407,8 @@ class CORE_EXPORT Page final : public GarbageCollected, const Member link_highlight_; Member spatial_navigation_controller_; @@ -184,7 +184,7 @@ index 181c13e9e6e3..6384ae98b36e 100644 Member validation_message_client_; diff --git third_party/blink/renderer/core/page/plugin_data.cc third_party/blink/renderer/core/page/plugin_data.cc -index 9b6a945105c6..63c7c43114bc 100644 +index 89beb74dae8a..63bfa84b45b7 100644 --- third_party/blink/renderer/core/page/plugin_data.cc +++ third_party/blink/renderer/core/page/plugin_data.cc @@ -91,10 +91,12 @@ void PluginData::RefreshBrowserSidePluginCache() { @@ -212,7 +212,7 @@ index 9b6a945105c6..63c7c43114bc 100644 auto* plugin_info = MakeGarbageCollected( plugin->name, FilePathToWebString(plugin->filename), diff --git third_party/blink/renderer/core/page/plugin_data.h third_party/blink/renderer/core/page/plugin_data.h -index d0260f9f6b1b..675ba5a7c893 100644 +index fe5aa20243d8..c2b3540d3bb5 100644 --- third_party/blink/renderer/core/page/plugin_data.h +++ third_party/blink/renderer/core/page/plugin_data.h @@ -97,7 +97,8 @@ class CORE_EXPORT PluginData final : public GarbageCollected { diff --git a/patch/patches/webkit_pointer_event_781966.patch b/patch/patches/webkit_pointer_event_781966.patch index 42db7a29d..c7a17163a 100644 --- a/patch/patches/webkit_pointer_event_781966.patch +++ b/patch/patches/webkit_pointer_event_781966.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/renderer/core/input/pointer_event_manager.cc third_party/blink/renderer/core/input/pointer_event_manager.cc -index 08a017090502..6ef3584b2fe6 100644 +index 99b37de3d6a1..918c6a62d4e1 100644 --- third_party/blink/renderer/core/input/pointer_event_manager.cc +++ third_party/blink/renderer/core/input/pointer_event_manager.cc -@@ -310,7 +310,7 @@ void PointerEventManager::HandlePointerInterruption( +@@ -302,7 +302,7 @@ void PointerEventManager::HandlePointerInterruption( for (auto pointer_event : canceled_pointer_events) { // If we are sending a pointercancel we have sent the pointerevent to some // target before. diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index 8a619ff1b..0cce868e9 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h -index 18ecf7968a4b..a74fc5b26b35 100644 +index baa1cec07522..57d22d50ccb7 100644 --- third_party/blink/public/web/web_view.h +++ third_party/blink/public/web/web_view.h -@@ -358,6 +358,7 @@ class WebView { +@@ -363,6 +363,7 @@ class WebView { // Sets whether select popup menus should be rendered by the browser. BLINK_EXPORT static void SetUseExternalPopupMenus(bool); @@ -11,10 +11,10 @@ index 18ecf7968a4b..a74fc5b26b35 100644 // Cancels and hides the current popup (datetime, select...) if any. virtual void CancelPagePopup() = 0; diff --git third_party/blink/renderer/core/exported/web_view_impl.cc third_party/blink/renderer/core/exported/web_view_impl.cc -index ebebe2f3b210..2d1e42c74f3b 100644 +index 27adaed62fe2..00ea31a5995b 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -214,8 +214,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -215,8 +215,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -30,7 +30,7 @@ index ebebe2f3b210..2d1e42c74f3b 100644 } namespace { -@@ -284,6 +289,7 @@ WebViewImpl::WebViewImpl( +@@ -285,6 +290,7 @@ WebViewImpl::WebViewImpl( chrome_client_(MakeGarbageCollected(this)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), @@ -39,7 +39,7 @@ index ebebe2f3b210..2d1e42c74f3b 100644 fullscreen_controller_(std::make_unique(this)), lifecycle_state_(mojom::blink::PageLifecycleState::New()), diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index ae5bf526b8ae..3cffd679a402 100644 +index e2124434e0d8..e12d31e8c520 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h @@ -118,7 +118,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, @@ -52,7 +52,7 @@ index ae5bf526b8ae..3cffd679a402 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -618,6 +619,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -614,6 +615,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, float fake_page_scale_animation_page_scale_factor_ = 0.f; bool fake_page_scale_animation_use_anchor_ = false; @@ -62,10 +62,10 @@ index ae5bf526b8ae..3cffd679a402 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 7042aadd14dc..198d39e5be57 100644 +index 45bf5dc55210..d358e7c406e4 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -830,7 +830,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -842,7 +842,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame, HTMLSelectElement& select) { NotifyPopupOpeningObservers(); diff --git a/patch/patches/webui_2037.patch b/patch/patches/webui_2037.patch index 9acaa07d7..73c779f19 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -53,10 +53,10 @@ index 29953fdc7c55..89dd4e61f66f 100644 bool result = base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason); diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc -index 593623510f6b..e2bdc3a6f416 100644 +index 9b25ce547635..90ab09d73df8 100644 --- chrome/browser/memory_details.cc +++ chrome/browser/memory_details.cc -@@ -18,6 +18,7 @@ +@@ -17,6 +17,7 @@ #include "base/task/thread_pool.h" #include "build/build_config.h" #include "chrome/browser/profiles/profile.h" @@ -64,7 +64,7 @@ index 593623510f6b..e2bdc3a6f416 100644 #include "components/nacl/common/nacl_process_type.h" #include "components/strings/grit/components_strings.h" #include "content/public/browser/browser_child_process_host_iterator.h" -@@ -253,8 +254,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { +@@ -252,8 +253,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() { #if BUILDFLAG(ENABLE_EXTENSIONS) // Determine if this is an extension process. diff --git a/patch/patches/webview_plugin_2020.patch b/patch/patches/webview_plugin_2020.patch index bfadb9cc5..70365a025 100644 --- a/patch/patches/webview_plugin_2020.patch +++ b/patch/patches/webview_plugin_2020.patch @@ -1,8 +1,8 @@ diff --git chrome/app/generated_resources.grd chrome/app/generated_resources.grd -index 389326ded5a4..07c48ccb54f0 100644 +index 39f6ac6a3f52..a9540fd77690 100644 --- chrome/app/generated_resources.grd +++ chrome/app/generated_resources.grd -@@ -5002,7 +5002,7 @@ Keep your key file in a safe place. You will need it to create new versions of y +@@ -5051,7 +5051,7 @@ Keep your key file in a safe place. You will need it to create new versions of y diff --git a/patch/patches/win_base_msvc_sandbox.patch b/patch/patches/win_base_msvc_sandbox.patch index 86fa4ef5f..2ee09a0d7 100644 --- a/patch/patches/win_base_msvc_sandbox.patch +++ b/patch/patches/win_base_msvc_sandbox.patch @@ -1,8 +1,8 @@ diff --git base/values.cc base/values.cc -index 4315dbc20684..91ce4e8e9ba1 100644 +index 5f5657935d92..8e4b33a1eb29 100644 --- base/values.cc +++ base/values.cc -@@ -25,20 +25,6 @@ +@@ -29,20 +29,6 @@ namespace base { diff --git a/patch/patches/win_rt_2274.patch b/patch/patches/win_rt_2274.patch index f9d8f519a..adf3d8796 100644 --- a/patch/patches/win_rt_2274.patch +++ b/patch/patches/win_rt_2274.patch @@ -1,8 +1,8 @@ diff --git services/service_manager/sandbox/win/sandbox_win.cc services/service_manager/sandbox/win/sandbox_win.cc -index a05106e2611f..4161e4e6cc23 100644 +index cde75bd07101..34f6853596d5 100644 --- services/service_manager/sandbox/win/sandbox_win.cc +++ services/service_manager/sandbox/win/sandbox_win.cc -@@ -934,8 +934,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( +@@ -959,8 +959,11 @@ sandbox::ResultCode SandboxWin::StartSandboxedProcess( } // TODO(wfh): Relax strict handle checks for network process until root cause // for this crash can be resolved. See https://crbug.com/939590. diff --git a/patch/patches/win_screenlock_1058556.patch b/patch/patches/win_screenlock_1058556.patch index b740048e7..80ae76112 100644 --- a/patch/patches/win_screenlock_1058556.patch +++ b/patch/patches/win_screenlock_1058556.patch @@ -1,8 +1,8 @@ diff --git content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc -index 1cc7bf44645f..7ec28c21ec1d 100644 +index 444e19ccb601..6d696b28f417 100644 --- content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc +++ content/browser/screenlock_monitor/screenlock_monitor_device_source_win.cc -@@ -48,7 +48,7 @@ bool ScreenlockMonitorDeviceSource::SessionMessageWindow::OnWndProc( +@@ -49,7 +49,7 @@ bool ScreenlockMonitorDeviceSource::SessionMessageWindow::OnWndProc( if (message == WM_WTSSESSION_CHANGE) { ProcessWTSSessionLockMessage(wparam); } diff --git a/tests/cefclient/browser/media_router_test.cc b/tests/cefclient/browser/media_router_test.cc index 587469d6b..271ec7f20 100644 --- a/tests/cefclient/browser/media_router_test.cc +++ b/tests/cefclient/browser/media_router_test.cc @@ -224,7 +224,7 @@ class MediaObserver : public CefMediaObserver { private: CefRefPtr GetSource(const std::string& source_urn) { CefRefPtr source = media_router_->GetSource(source_urn); - if (!source || !source->IsValid()) + if (!source) return NULL; return source; } diff --git a/tools/make_views_stub_impl.py b/tools/make_views_stub_impl.py index 5302b8682..21db8bb91 100644 --- a/tools/make_views_stub_impl.py +++ b/tools/make_views_stub_impl.py @@ -60,7 +60,7 @@ def make_views_stub_impl(header): impl += cls_impl includes += '#include "include/' + cls.get_file_name() + '"\n' - includes += '\n#include "base/logging.h"\n' + includes += '\n#include "base/logging.h"\n#include "base/notreached.h"\n' # Build the final output. result = get_copyright() + includes