diff --git a/BUILD.gn b/BUILD.gn index 92e2b2375..4583f1942 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -1377,7 +1377,7 @@ make_pack_header("strings") { "$root_gen_dir/chrome/grit/generated_resources.h", "$root_gen_dir/chrome/grit/locale_settings.h", "$root_gen_dir/chrome/grit/platform_locale_settings.h", - "$root_gen_dir/components/omnibox/resources/grit/omnibox_resources.h", + "$root_gen_dir/components/omnibox/resources/grit/omnibox_pedal_synonyms.h", "$root_gen_dir/components/strings/grit/components_chromium_strings.h", "$root_gen_dir/components/strings/grit/components_strings.h", "$root_gen_dir/extensions/strings/grit/extensions_strings.h", @@ -1393,7 +1393,7 @@ make_pack_header("strings") { "//chrome/app:generated_resources", "//chrome/app/resources:locale_settings", "//chrome/app/resources:platform_locale_settings", - "//components/omnibox/resources:omnibox_resources", + "//components/omnibox/resources:omnibox_pedal_synonyms", "//components/strings:components_chromium_strings", "//components/strings:components_locale_settings", "//components/strings:components_strings", diff --git a/CHROMIUM_BUILD_COMPATIBILITY.txt b/CHROMIUM_BUILD_COMPATIBILITY.txt index 0881b7055..5f70233fa 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/107.0.5304.0' + 'chromium_checkout': 'refs/tags/108.0.5359.0' } diff --git a/include/cef_api_hash.h b/include/cef_api_hash.h index 1ccf8b812..766002ae6 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 "057e58f3e7e2fcd056a78d2354f3de44f31c00a5" +#define CEF_API_HASH_UNIVERSAL "b52718166004e2be9d225454b9999445e1a5d131" #if defined(OS_WIN) -#define CEF_API_HASH_PLATFORM "ceffda27fda02aa102a6241b65cd3fdeb531d2c1" +#define CEF_API_HASH_PLATFORM "f327210f819821b0f53a9071281622e16c8515bd" #elif defined(OS_MAC) -#define CEF_API_HASH_PLATFORM "18faa4c5663b9665a4b64347bfeb26eaa8d0acfd" +#define CEF_API_HASH_PLATFORM "41b7d845bec3d93f820e6e940583085351fda410" #elif defined(OS_LINUX) -#define CEF_API_HASH_PLATFORM "8e087e42c70649ae19534a1680090d8f130cbc56" +#define CEF_API_HASH_PLATFORM "fd19a4db781e699f7b2492f9fc2c63544934a6e4" #endif #ifdef __cplusplus diff --git a/include/internal/cef_types.h b/include/internal/cef_types.h index 009539c0a..4fee982b7 100644 --- a/include/internal/cef_types.h +++ b/include/internal/cef_types.h @@ -3384,7 +3384,7 @@ typedef enum { CEF_PERMISSION_TYPE_STORAGE_ACCESS = 1 << 16, CEF_PERMISSION_TYPE_U2F_API_REQUEST = 1 << 17, CEF_PERMISSION_TYPE_VR_SESSION = 1 << 18, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT = 1 << 19, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT = 1 << 19, } cef_permission_request_types_t; /// diff --git a/libcef/browser/alloy/alloy_content_browser_client.cc b/libcef/browser/alloy/alloy_content_browser_client.cc index d5326f55e..7f739362a 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.cc +++ b/libcef/browser/alloy/alloy_content_browser_client.cc @@ -1010,9 +1010,7 @@ AlloyContentBrowserClient::CreateURLLoaderThrottles( std::vector> AlloyContentBrowserClient::WillCreateURLLoaderRequestInterceptors( content::NavigationUIData* navigation_ui_data, - int frame_tree_node_id, - const scoped_refptr& - network_loader_factory) { + int frame_tree_node_id) { std::vector> interceptors; diff --git a/libcef/browser/alloy/alloy_content_browser_client.h b/libcef/browser/alloy/alloy_content_browser_client.h index f5de87474..ca5a628b7 100644 --- a/libcef/browser/alloy/alloy_content_browser_client.h +++ b/libcef/browser/alloy/alloy_content_browser_client.h @@ -135,9 +135,7 @@ class AlloyContentBrowserClient : public content::ContentBrowserClient { std::vector> WillCreateURLLoaderRequestInterceptors( content::NavigationUIData* navigation_ui_data, - int frame_tree_node_id, - const scoped_refptr& - network_loader_factory) override; + int frame_tree_node_id) override; #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) void GetAdditionalMappedFilesForChildProcess( diff --git a/libcef/browser/file_dialog_runner.cc b/libcef/browser/file_dialog_runner.cc index ccb842eae..a9fc3318b 100644 --- a/libcef/browser/file_dialog_runner.cc +++ b/libcef/browser/file_dialog_runner.cc @@ -68,7 +68,8 @@ class CefSelectFileDialog final : public ui::SelectFileDialog { int file_type_index, const base::FilePath::StringType& default_extension, gfx::NativeWindow owning_window, - void* params) override { + void* params, + const GURL* caller) override { // Try to determine the associated browser (with decreasing levels of // confidence). // 1. Browser associated with the SelectFilePolicy. This is the most diff --git a/libcef/browser/permission_prompt.cc b/libcef/browser/permission_prompt.cc index 515cc079e..5fdb6f1f8 100644 --- a/libcef/browser/permission_prompt.cc +++ b/libcef/browser/permission_prompt.cc @@ -117,7 +117,7 @@ class CefPermissionPrompt : public permissions::PermissionPrompt { } // PermissionPrompt methods: - void UpdateAnchor() override { NOTIMPLEMENTED(); } + bool UpdateAnchor() override { return true; } TabSwitchingBehavior GetTabSwitchingBehavior() override { return TabSwitchingBehavior::kKeepPromptAlive; } @@ -219,8 +219,8 @@ cef_permission_request_types_t GetCefRequestType( return CEF_PERMISSION_TYPE_U2F_API_REQUEST; case permissions::RequestType::kVrSession: return CEF_PERMISSION_TYPE_VR_SESSION; - case permissions::RequestType::kWindowPlacement: - return CEF_PERMISSION_TYPE_WINDOW_PLACEMENT; + case permissions::RequestType::kWindowManagement: + return CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT; } NOTREACHED(); diff --git a/libcef/browser/prefs/browser_prefs.cc b/libcef/browser/prefs/browser_prefs.cc index a48e562db..88ae3aa95 100644 --- a/libcef/browser/prefs/browser_prefs.cc +++ b/libcef/browser/prefs/browser_prefs.cc @@ -52,6 +52,7 @@ #include "components/prefs/pref_filter.h" #include "components/prefs/pref_registry_simple.h" #include "components/prefs/pref_service.h" +#include "components/privacy_sandbox/privacy_sandbox_prefs.h" #include "components/proxy_config/pref_proxy_config_tracker_impl.h" #include "components/proxy_config/proxy_config_dictionary.h" #include "components/safe_browsing/core/common/safe_browsing_prefs.h" @@ -272,6 +273,7 @@ std::unique_ptr CreatePrefService(Profile* profile, PermissionBubbleMediaAccessHandler::RegisterProfilePrefs(registry.get()); permissions::PermissionActionsHistory::RegisterProfilePrefs(registry.get()); prefetch::RegisterPredictionOptionsProfilePrefs(registry.get()); + privacy_sandbox::RegisterProfilePrefs(registry.get()); ProfileNetworkContextService::RegisterProfilePrefs(registry.get()); safe_browsing::RegisterProfilePrefs(registry.get()); RegisterProfilePrefs(registry.get()); diff --git a/libcef/browser/prefs/pref_store.cc b/libcef/browser/prefs/pref_store.cc index 881373123..6cc730c94 100644 --- a/libcef/browser/prefs/pref_store.cc +++ b/libcef/browser/prefs/pref_store.cc @@ -19,7 +19,7 @@ CefPrefStore::CefPrefStore() init_complete_(false), committed_(true) {} -bool CefPrefStore::GetValue(const std::string& key, +bool CefPrefStore::GetValue(base::StringPiece key, const base::Value** value) const { return prefs_.GetValue(key, value); } @@ -50,18 +50,18 @@ bool CefPrefStore::IsInitializationComplete() const { } void CefPrefStore::SetValue(const std::string& key, - std::unique_ptr value, + base::Value value, uint32_t flags) { - if (prefs_.SetValue(key, base::Value::FromUniquePtrValue(std::move(value)))) { + if (prefs_.SetValue(key, std::move(value))) { committed_ = false; NotifyPrefValueChanged(key); } } void CefPrefStore::SetValueSilently(const std::string& key, - std::unique_ptr value, + base::Value value, uint32_t flags) { - if (prefs_.SetValue(key, base::Value::FromUniquePtrValue(std::move(value)))) + if (prefs_.SetValue(key, std::move(value))) committed_ = false; } @@ -139,15 +139,15 @@ void CefPrefStore::ReportValueChanged(const std::string& key, uint32_t flags) { } void CefPrefStore::SetString(const std::string& key, const std::string& value) { - SetValue(key, std::make_unique(value), DEFAULT_PREF_WRITE_FLAGS); + SetValue(key, base::Value(value), DEFAULT_PREF_WRITE_FLAGS); } void CefPrefStore::SetInteger(const std::string& key, int value) { - SetValue(key, std::make_unique(value), DEFAULT_PREF_WRITE_FLAGS); + SetValue(key, base::Value(value), DEFAULT_PREF_WRITE_FLAGS); } void CefPrefStore::SetBoolean(const std::string& key, bool value) { - SetValue(key, std::make_unique(value), DEFAULT_PREF_WRITE_FLAGS); + SetValue(key, base::Value(value), DEFAULT_PREF_WRITE_FLAGS); } bool CefPrefStore::GetString(const std::string& key, std::string* value) const { diff --git a/libcef/browser/prefs/pref_store.h b/libcef/browser/prefs/pref_store.h index 3b8aca6ed..a279ae45a 100644 --- a/libcef/browser/prefs/pref_store.h +++ b/libcef/browser/prefs/pref_store.h @@ -24,7 +24,7 @@ class CefPrefStore : public PersistentPrefStore { CefPrefStore& operator=(const CefPrefStore&) = delete; // Overriden from PrefStore. - bool GetValue(const std::string& key, + bool GetValue(base::StringPiece key, const base::Value** result) const override; base::Value::Dict GetValues() const override; void AddObserver(PrefStore::Observer* observer) override; @@ -36,10 +36,10 @@ class CefPrefStore : public PersistentPrefStore { bool GetMutableValue(const std::string& key, base::Value** result) override; void ReportValueChanged(const std::string& key, uint32_t flags) override; void SetValue(const std::string& key, - std::unique_ptr value, + base::Value value, uint32_t flags) override; void SetValueSilently(const std::string& key, - std::unique_ptr value, + base::Value value, uint32_t flags) override; void RemoveValuesByPrefixSilently(const std::string& prefix) override; void RemoveValue(const std::string& key, uint32_t flags) override; diff --git a/libcef/browser/prefs/renderer_prefs.cc b/libcef/browser/prefs/renderer_prefs.cc index 334a05e57..011ad594c 100644 --- a/libcef/browser/prefs/renderer_prefs.cc +++ b/libcef/browser/prefs/renderer_prefs.cc @@ -172,12 +172,12 @@ void SetExtensionPrefs(content::WebContents* web_contents, void SetString(CommandLinePrefStore* prefs, const std::string& key, const std::string& value) { - prefs->SetValue(key, base::WrapUnique(new base::Value(value)), + prefs->SetValue(key, base::Value(value), WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } void SetBool(CommandLinePrefStore* prefs, const std::string& key, bool value) { - prefs->SetValue(key, base::WrapUnique(new base::Value(value)), + prefs->SetValue(key, base::Value(value), WriteablePrefStore::DEFAULT_PREF_WRITE_FLAGS); } diff --git a/libcef/browser/request_context_impl.cc b/libcef/browser/request_context_impl.cc index 6902e2aef..e222f1c5f 100644 --- a/libcef/browser/request_context_impl.cc +++ b/libcef/browser/request_context_impl.cc @@ -75,7 +75,7 @@ class ResolveHostHelper : public network::ResolveHostClientBase { host_resolver_->ResolveHost( network::mojom::HostResolverHost::NewHostPortPair( net::HostPortPair::FromURL(GURL(origin.ToString()))), - net::NetworkIsolationKey::CreateTransient(), nullptr, + net::NetworkAnonymizationKey::CreateTransient(), nullptr, receiver_.BindNewPipeAndPassRemote()); } diff --git a/libcef_dll/sandbox/sandbox_win.cc b/libcef_dll/sandbox/sandbox_win.cc index ea2b5448f..bb5c77c54 100644 --- a/libcef_dll/sandbox/sandbox_win.cc +++ b/libcef_dll/sandbox/sandbox_win.cc @@ -3,7 +3,7 @@ // governed by a BSD-style license that can be found in the LICENSE file. #include "base/notreached.h" -#include "sandbox/win/src/process_mitigations.h" +#include "sandbox/win/src/sandbox.h" #include "sandbox/win/src/sandbox_factory.h" #include "cef/libcef/features/features.h" @@ -11,19 +11,19 @@ namespace { -// From content/app/startup_helper_win.cc: +// From content/app/sandbox_helper_win.cc: void InitializeSandboxInfo(sandbox::SandboxInterfaceInfo* info) { info->broker_services = sandbox::SandboxFactory::GetBrokerServices(); - if (!info->broker_services) { - info->target_services = sandbox::SandboxFactory::GetTargetServices(); - } else { + if (info->broker_services) { // Ensure the proper mitigations are enforced for the browser process. - sandbox::ApplyProcessMitigationsToCurrentProcess( + info->broker_services->RatchetDownSecurityMitigations( sandbox::MITIGATION_DEP | sandbox::MITIGATION_DEP_NO_ATL_THUNK | sandbox::MITIGATION_HARDEN_TOKEN_IL_POLICY); // Note: these mitigations are "post-startup". Some mitigations that need // to be enabled sooner (e.g. MITIGATION_EXTENSION_POINT_DISABLE) are done // so in Chrome_ELF. + } else { + info->target_services = sandbox::SandboxFactory::GetTargetServices(); } } diff --git a/patch/patch.cfg b/patch/patch.cfg index 86a3847de..4dbc27b3d 100644 --- a/patch/patch.cfg +++ b/patch/patch.cfg @@ -592,21 +592,5 @@ patches = [ # Fix deadlock in EmbeddedTestServer::ShutdownAndWaitUntilComplete. # https://chromium-review.googlesource.com/c/chromium/src/+/3798752 'name': 'net_test_server_3798752' - }, - { - # Fix duplicate symbols for media_router::LoggerList. - # https://bugs.chromium.org/p/chromium/issues/detail?id=1368642 - 'name': 'chrome_browser_media_router_1368642' - }, - { - # Fix unnecessary pdf_nup_converter_client.h include from - # chrome/browser/devtools/protocol/page_handler.cc. - # https://bugs.chromium.org/p/chromium/issues/detail?id=1366011 - 'name': 'chrome_browser_devtools_1366011' - }, - { - # Support GN configuration of enable_rlz (see issue #3404). - # https://chromium-review.googlesource.com/c/chromium/src/+/3934411 - 'name': 'rlz_3934411' } ] diff --git a/patch/patches/base_command_line_1872.patch b/patch/patches/base_command_line_1872.patch index c34262b95..cdb310b10 100644 --- a/patch/patches/base_command_line_1872.patch +++ b/patch/patches/base_command_line_1872.patch @@ -1,5 +1,5 @@ diff --git base/command_line.cc base/command_line.cc -index 124a9d59c3ea4..516003f762e60 100644 +index 77a452c8f84b5..78d39b419b8d4 100644 --- base/command_line.cc +++ base/command_line.cc @@ -339,11 +339,10 @@ void CommandLine::AppendSwitchPath(StringPiece switch_string, diff --git a/patch/patches/base_sandbox_2743.patch b/patch/patches/base_sandbox_2743.patch index e8dcbcb90..2f0532a0a 100644 --- a/patch/patches/base_sandbox_2743.patch +++ b/patch/patches/base_sandbox_2743.patch @@ -1,8 +1,8 @@ diff --git base/BUILD.gn base/BUILD.gn -index 60fdc3b8e47ed..fee7412fb46ce 100644 +index a56c5fc803675..e5018871ad80a 100644 --- base/BUILD.gn +++ base/BUILD.gn -@@ -37,6 +37,7 @@ import("//build/nocompile.gni") +@@ -38,6 +38,7 @@ import("//build/nocompile.gni") import("//build/rust/mixed_component.gni") import("//build/timestamp.gni") import("//build_overrides/build.gni") @@ -10,7 +10,7 @@ index 60fdc3b8e47ed..fee7412fb46ce 100644 import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") -@@ -1971,7 +1972,11 @@ mixed_component("base") { +@@ -1973,7 +1974,11 @@ mixed_component("base") { "hash/md5_constexpr_internal.h", "hash/sha1.h", ] @@ -23,7 +23,7 @@ index 60fdc3b8e47ed..fee7412fb46ce 100644 sources += [ "hash/md5_nacl.cc", "hash/md5_nacl.h", -@@ -2112,6 +2117,12 @@ mixed_component("base") { +@@ -2114,6 +2119,12 @@ mixed_component("base") { defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ] } @@ -87,8 +87,32 @@ index 29626e5853c6e..2fb1c61504c5d 100644 #include "base/hash/sha1_nacl.h" #else #include "base/hash/sha1_boringssl.h" +diff --git base/rand_util.h base/rand_util.h +index 04024537ee698..59864cb084559 100644 +--- base/rand_util.h ++++ base/rand_util.h +@@ -15,8 +15,9 @@ + #include "base/compiler_specific.h" + #include "base/gtest_prod_util.h" + #include "build/build_config.h" ++#include "cef/libcef/features/features.h" + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + #include "third_party/boringssl/src/include/openssl/rand.h" + #endif + +@@ -93,7 +94,7 @@ class RandomBitGenerator { + ~RandomBitGenerator() = default; + }; + +-#if !BUILDFLAG(IS_NACL) ++#if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_CEF_SANDBOX_BUILD) + class NonAllocatingRandomBitGenerator { + public: + using result_type = uint64_t; diff --git base/rand_util_win.cc base/rand_util_win.cc -index 0a81ed63d1e3c..b08ff362d511e 100644 +index 099fe2912be23..758fa0c4296af 100644 --- base/rand_util_win.cc +++ base/rand_util_win.cc @@ -20,14 +20,19 @@ @@ -111,7 +135,7 @@ index 0a81ed63d1e3c..b08ff362d511e 100644 namespace { // The BoringSSl helpers are duplicated in rand_util_fuchsia.cc and -@@ -48,9 +53,14 @@ bool UseBoringSSLForRandBytes() { +@@ -49,11 +54,16 @@ bool UseBoringSSLForRandBytes() { return g_use_boringssl.load(std::memory_order_relaxed); } @@ -121,12 +145,14 @@ index 0a81ed63d1e3c..b08ff362d511e 100644 + } // namespace internal - void RandBytes(void* output, size_t output_length) { + namespace { + + void RandBytes(void* output, size_t output_length, bool avoid_allocation) { +#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD) - if (internal::UseBoringSSLForRandBytes()) { + if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) { // Ensure BoringSSL is initialized so it can use things like RDRAND. CRYPTO_library_init(); -@@ -58,6 +68,7 @@ void RandBytes(void* output, size_t output_length) { +@@ -61,6 +71,7 @@ void RandBytes(void* output, size_t output_length, bool avoid_allocation) { (void)RAND_bytes(static_cast(output), output_length); return; } diff --git a/patch/patches/browser_scheduler.patch b/patch/patches/browser_scheduler.patch index 8f8896a94..908194e40 100644 --- a/patch/patches/browser_scheduler.patch +++ b/patch/patches/browser_scheduler.patch @@ -1,8 +1,8 @@ diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc -index c495691fe78a2..7452b3b63b79d 100644 +index fc584089f05cc..9f827226c197f 100644 --- content/browser/scheduler/browser_task_executor.cc +++ content/browser/scheduler/browser_task_executor.cc -@@ -285,7 +285,7 @@ BrowserTaskExecutor::OnUserInputStart() { +@@ -286,7 +286,7 @@ BrowserTaskExecutor::OnUserInputStart() { // static void BrowserTaskExecutor::Shutdown() { diff --git a/patch/patches/browser_security_policy_1081397.patch b/patch/patches/browser_security_policy_1081397.patch index 08333a14a..87c06cf4c 100644 --- a/patch/patches/browser_security_policy_1081397.patch +++ b/patch/patches/browser_security_policy_1081397.patch @@ -20,10 +20,10 @@ index 18c138c21a853..554e22458da45 100644 // TODO(wjmaclean): We should update the ProcessLock comparison API diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc -index fe59047aca94b..a2b6583dba0b5 100644 +index 14dfb45da60c0..7e3ebfa6fb431 100644 --- content/browser/renderer_host/navigation_request.cc +++ content/browser/renderer_host/navigation_request.cc -@@ -6542,6 +6542,14 @@ std::pair NavigationRequest:: +@@ -6669,6 +6669,14 @@ std::pair NavigationRequest:: origin_and_debug_info.second += ", error"; } @@ -38,7 +38,7 @@ index fe59047aca94b..a2b6583dba0b5 100644 if (use_opaque_origin) { origin_and_debug_info = std::make_pair(origin_and_debug_info.first.DeriveNewOpaqueOrigin(), -@@ -6569,6 +6577,15 @@ std::pair NavigationRequest:: +@@ -6696,6 +6704,15 @@ std::pair NavigationRequest:: GetOriginForURLLoaderFactoryWithoutFinalFrameHostWithDebugInfo( SandboxFlagsToCommit()); diff --git a/patch/patches/build.patch b/patch/patches/build.patch index 2d1f05788..0213814c5 100644 --- a/patch/patches/build.patch +++ b/patch/patches/build.patch @@ -1,8 +1,8 @@ diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn -index a094aa41ec525..8f3fa35fe40bb 100644 +index cd9b186a1252f..2d0d9310485fe 100644 --- build/config/compiler/BUILD.gn +++ build/config/compiler/BUILD.gn -@@ -1840,8 +1840,6 @@ config("thin_archive") { +@@ -1862,8 +1862,6 @@ config("thin_archive") { # confuses lldb. if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) { arflags = [ "-T" ] diff --git a/patch/patches/chrome_browser.patch b/patch/patches/chrome_browser.patch index 5f0463227..9db2349eb 100644 --- a/patch/patches/chrome_browser.patch +++ b/patch/patches/chrome_browser.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn -index 073ded4a9482b..55edbcad5b2a3 100644 +index 68415e75360ce..7a144a035b0a7 100644 --- chrome/browser/BUILD.gn +++ chrome/browser/BUILD.gn @@ -11,6 +11,7 @@ import("//build/config/compiler/pgo/pgo.gni") @@ -10,7 +10,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644 import("//chrome/browser/buildflags.gni") import("//chrome/browser/downgrade/buildflags.gni") import("//chrome/common/features.gni") -@@ -1974,6 +1975,7 @@ static_library("browser") { +@@ -1986,6 +1987,7 @@ static_library("browser") { "//build/config/chromebox_for_meetings:buildflags", "//build/config/compiler:compiler_buildflags", "//cc", @@ -18,7 +18,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -2520,6 +2522,10 @@ static_library("browser") { +@@ -2537,6 +2539,10 @@ static_library("browser") { ] } @@ -29,7 +29,7 @@ index 073ded4a9482b..55edbcad5b2a3 100644 if (is_android) { sources += [ "after_startup_task_utils_android.cc", -@@ -6349,8 +6355,6 @@ static_library("browser") { +@@ -6394,8 +6400,6 @@ static_library("browser") { sources += [ "enterprise/chrome_browser_main_extra_parts_enterprise.cc", "enterprise/chrome_browser_main_extra_parts_enterprise.h", diff --git a/patch/patches/chrome_browser_background_mode_1100085.patch b/patch/patches/chrome_browser_background_mode_1100085.patch index 1042c48ee..5294f9149 100644 --- a/patch/patches/chrome_browser_background_mode_1100085.patch +++ b/patch/patches/chrome_browser_background_mode_1100085.patch @@ -14,7 +14,7 @@ index f365449df16a8..91afb283a41f5 100644 std::unique_ptr manager) = 0; #endif diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc -index 984c1d637f792..74d7807e43a3c 100644 +index a7a2bfe6738c3..7dfc99596ef26 100644 --- chrome/browser/browser_process_impl.cc +++ chrome/browser/browser_process_impl.cc @@ -1007,18 +1007,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() { @@ -38,7 +38,7 @@ index 984c1d637f792..74d7807e43a3c 100644 std::unique_ptr manager) { background_mode_manager_ = std::move(manager); diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h -index 81c00ee7aab8e..3a069f1eb2df0 100644 +index f8a1250d7ba07..0ce11cd182281 100644 --- chrome/browser/browser_process_impl.h +++ chrome/browser/browser_process_impl.h @@ -174,8 +174,8 @@ class BrowserProcessImpl : public BrowserProcess, diff --git a/patch/patches/chrome_browser_browser.patch b/patch/patches/chrome_browser_browser.patch index ca6d58556..76db52716 100644 --- a/patch/patches/chrome_browser_browser.patch +++ b/patch/patches/chrome_browser_browser.patch @@ -13,7 +13,7 @@ index af62c19be9db6..d58f033cffecc 100644 return false; } diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn -index 7b4b0ed936514..8949125070a54 100644 +index f335c3dd28a5f..0798e05a47e10 100644 --- chrome/browser/ui/BUILD.gn +++ chrome/browser/ui/BUILD.gn @@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni") @@ -24,7 +24,7 @@ index 7b4b0ed936514..8949125070a54 100644 import("//chrome/browser/buildflags.gni") import("//chrome/common/features.gni") import("//chromeos/ash/components/assistant/assistant.gni") -@@ -361,6 +362,10 @@ static_library("ui") { +@@ -366,6 +367,10 @@ static_library("ui") { "//build/config/compiler:wexit_time_destructors", ] @@ -35,7 +35,7 @@ index 7b4b0ed936514..8949125070a54 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 -@@ -384,6 +389,7 @@ static_library("ui") { +@@ -389,6 +394,7 @@ static_library("ui") { "//build:chromeos_buildflags", "//build/config/chromebox_for_meetings:buildflags", "//cc/paint", @@ -43,7 +43,7 @@ index 7b4b0ed936514..8949125070a54 100644 "//chrome:extra_resources", "//chrome:resources", "//chrome:strings", -@@ -5665,6 +5671,7 @@ static_library("ui") { +@@ -5713,6 +5719,7 @@ static_library("ui") { if (enable_basic_printing) { deps += [ "//components/printing/browser", @@ -52,10 +52,10 @@ index 7b4b0ed936514..8949125070a54 100644 ] } diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc -index 1678328cf34cf..4b7dafe1193db 100644 +index a3853924c98fa..bdd854c5dff54 100644 --- chrome/browser/ui/browser.cc +++ chrome/browser/ui/browser.cc -@@ -265,6 +265,25 @@ +@@ -266,6 +266,25 @@ #include "components/captive_portal/content/captive_portal_tab_helper.h" #endif @@ -81,7 +81,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/extensions/extension_browser_window_helper.h" #endif -@@ -508,6 +527,13 @@ Browser::Browser(const CreateParams& params) +@@ -509,6 +528,13 @@ Browser::Browser(const CreateParams& params) tab_strip_model_->AddObserver(this); @@ -95,7 +95,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 location_bar_model_ = std::make_unique( location_bar_model_delegate_.get(), content::kMaxURLDisplayChars); -@@ -1334,6 +1360,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( +@@ -1339,6 +1365,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent( if (exclusive_access_manager_->HandleUserKeyEvent(event)) return content::KeyboardEventProcessingResult::HANDLED; @@ -110,7 +110,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 return window()->PreHandleKeyboardEvent(event); } -@@ -1341,8 +1375,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, +@@ -1346,8 +1380,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source, const NativeWebKeyboardEvent& event) { DevToolsWindow* devtools_window = DevToolsWindow::GetInstanceForInspectedWebContents(source); @@ -131,7 +131,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 } bool Browser::TabsNeedBeforeUnloadFired() { -@@ -1549,6 +1593,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, +@@ -1554,6 +1598,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source, return window->OpenURLFromTab(source, params); } @@ -146,7 +146,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 NavigateParams nav_params(this, params.url, params.transition); nav_params.FillNavigateParamsFromOpenURLParams(params); nav_params.source_contents = source; -@@ -1681,6 +1733,15 @@ void Browser::AddNewContents( +@@ -1686,6 +1738,15 @@ void Browser::AddNewContents( return; } @@ -162,7 +162,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 chrome::AddWebContents(this, source, std::move(new_contents), target_url, disposition, window_features, window_action); } -@@ -1699,6 +1760,8 @@ void Browser::LoadingStateChanged(WebContents* source, +@@ -1704,6 +1765,8 @@ void Browser::LoadingStateChanged(WebContents* source, bool should_show_loading_ui) { ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD); UpdateWindowForLoadingStateChanged(source, should_show_loading_ui); @@ -171,7 +171,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 } void Browser::CloseContents(WebContents* source) { -@@ -1726,6 +1789,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { +@@ -1731,6 +1794,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) { } void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { @@ -180,7 +180,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 if (!GetStatusBubble()) return; -@@ -1733,6 +1798,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { +@@ -1738,6 +1803,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) { GetStatusBubble()->SetURL(url); } @@ -198,7 +198,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 void Browser::ContentsMouseEvent(WebContents* source, bool motion, bool exited) { -@@ -1757,6 +1833,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { +@@ -1762,6 +1838,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) { return false; } @@ -218,7 +218,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 void Browser::BeforeUnloadFired(WebContents* web_contents, bool proceed, bool* proceed_to_fire_unload) { -@@ -1849,6 +1938,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, +@@ -1854,6 +1943,10 @@ void Browser::WebContentsCreated(WebContents* source_contents, // Make the tab show up in the task manager. task_manager::WebContentsTags::CreateForTabContents(new_contents); @@ -229,7 +229,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 } void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) { -@@ -1893,6 +1986,8 @@ void Browser::RendererResponsive( +@@ -1898,6 +1991,8 @@ void Browser::RendererResponsive( void Browser::DidNavigatePrimaryMainFramePostCommit(WebContents* web_contents) { if (web_contents == tab_strip_model_->GetActiveWebContents()) UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TAB_STATE); @@ -238,7 +238,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 } content::JavaScriptDialogManager* Browser::GetJavaScriptDialogManager( -@@ -1953,11 +2048,15 @@ void Browser::EnterFullscreenModeForTab( +@@ -1958,11 +2053,15 @@ void Browser::EnterFullscreenModeForTab( const blink::mojom::FullscreenOptions& options) { exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab( requesting_frame, options.display_id); @@ -254,7 +254,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 } bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) { -@@ -2152,6 +2251,15 @@ void Browser::RequestMediaAccessPermission( +@@ -2157,6 +2256,15 @@ void Browser::RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, content::MediaResponseCallback callback) { @@ -270,7 +270,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 const extensions::Extension* extension = GetExtensionForOrigin(profile_, request.security_origin); MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( -@@ -2690,13 +2798,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { +@@ -2695,13 +2803,20 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) { // Browser, Getters for UI (private): StatusBubble* Browser::GetStatusBubble() { @@ -292,7 +292,7 @@ index 1678328cf34cf..4b7dafe1193db 100644 return window_ ? window_->GetStatusBubble() : nullptr; } -@@ -2823,6 +2938,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { +@@ -2828,6 +2943,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) { content_translate_driver->RemoveTranslationObserver(this); BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this); } @@ -404,7 +404,7 @@ index e80e3d192f615..97c97042e993e 100644 // The following factory is used for chrome update coalescing. diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc -index b20e91c512f9b..389cba1d27ca0 100644 +index 7325d09920245..9052e408de44c 100644 --- chrome/browser/ui/browser_navigator.cc +++ chrome/browser/ui/browser_navigator.cc @@ -559,6 +559,13 @@ std::unique_ptr CreateTargetContents( diff --git a/patch/patches/chrome_browser_content_settings.patch b/patch/patches/chrome_browser_content_settings.patch index 92fbbba86..2b238e128 100644 --- a/patch/patches/chrome_browser_content_settings.patch +++ b/patch/patches/chrome_browser_content_settings.patch @@ -56,7 +56,7 @@ index 09e166d182eed..5e5d0d3554600 100644 #if BUILDFLAG(ENABLE_SUPERVISED_USERS) SupervisedUserSettingsService* supervised_service = diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc -index 9b9f37709511a..acff569de15d9 100644 +index 41947c7d3ff0c..dbfbca256e0d1 100644 --- components/content_settings/renderer/content_settings_agent_impl.cc +++ components/content_settings/renderer/content_settings_agent_impl.cc @@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules( diff --git a/patch/patches/chrome_browser_context_menus.patch b/patch/patches/chrome_browser_context_menus.patch index 1f05bd5ef..2838e0d4f 100644 --- a/patch/patches/chrome_browser_context_menus.patch +++ b/patch/patches/chrome_browser_context_menus.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/renderer_context_menu/render_view_context_menu.cc chrome/browser/renderer_context_menu/render_view_context_menu.cc -index d1244c71932df..fab3cb730f084 100644 +index a4c41a8be6b23..0724b0e6e4ccf 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.cc +++ chrome/browser/renderer_context_menu/render_view_context_menu.cc -@@ -310,6 +310,13 @@ base::OnceCallback* GetMenuShownCallback() { +@@ -309,6 +309,13 @@ base::OnceCallback* GetMenuShownCallback() { return callback.get(); } @@ -27,7 +27,7 @@ index d1244c71932df..fab3cb730f084 100644 id = CollapseCommandsForUMA(id); const auto& map = GetIdcToUmaMap(type); auto it = map.find(id); -@@ -743,6 +754,14 @@ RenderViewContextMenu::RenderViewContextMenu( +@@ -742,6 +753,14 @@ RenderViewContextMenu::RenderViewContextMenu( ? GetBrowser()->app_controller()->system_app() : nullptr; #endif // BUILDFLAG(IS_CHROMEOS_ASH) @@ -55,7 +55,7 @@ index d1244c71932df..fab3cb730f084 100644 } Profile* RenderViewContextMenu::GetProfile() const { -@@ -3015,6 +3040,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( +@@ -3031,6 +3056,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting( execute_plugin_action_callback_ = std::move(cb); } @@ -69,12 +69,12 @@ index d1244c71932df..fab3cb730f084 100644 RenderViewContextMenu::GetHandlersForLinkUrl() { custom_handlers::ProtocolHandlerRegistry::ProtocolHandlerList handlers = diff --git chrome/browser/renderer_context_menu/render_view_context_menu.h chrome/browser/renderer_context_menu/render_view_context_menu.h -index 0156137c2853a..ad27c7920e6e7 100644 +index a6df6ba30d454..9bbd84c9c8820 100644 --- chrome/browser/renderer_context_menu/render_view_context_menu.h +++ chrome/browser/renderer_context_menu/render_view_context_menu.h -@@ -127,6 +127,12 @@ class RenderViewContextMenu - base::OnceCallback cb); +@@ -134,6 +134,12 @@ class RenderViewContextMenu + } + #endif + // Registers a callback that will be called each time a context menu is + // created. @@ -85,7 +85,7 @@ index 0156137c2853a..ad27c7920e6e7 100644 protected: Profile* GetProfile() const; -@@ -356,6 +362,9 @@ class RenderViewContextMenu +@@ -381,6 +387,9 @@ class RenderViewContextMenu // built. bool is_protocol_submenu_valid_ = false; @@ -132,7 +132,7 @@ index c174f3aff2780..d072711c15c4e 100644 command_executed_ = true; RecordUsedItem(id); diff --git components/renderer_context_menu/render_view_context_menu_base.h components/renderer_context_menu/render_view_context_menu_base.h -index 7a16d8bb602e5..b06b811a6fb33 100644 +index 1651d80a9547e..b06b811a6fb33 100644 --- components/renderer_context_menu/render_view_context_menu_base.h +++ components/renderer_context_menu/render_view_context_menu_base.h @@ -86,6 +86,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate, @@ -155,26 +155,6 @@ index 7a16d8bb602e5..b06b811a6fb33 100644 void ExecuteCommand(int command_id, int event_flags) override; void OnMenuWillShow(ui::SimpleMenuModel* source) override; void MenuClosed(ui::SimpleMenuModel* source) override; -@@ -124,6 +130,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate, - content::WebContents* GetWebContents() const override; - content::BrowserContext* GetBrowserContext() const override; - -+ // May return nullptr if the frame was deleted while the menu was open. -+ content::RenderFrameHost* GetRenderFrameHost() const; -+ - protected: - friend class RenderViewContextMenuTest; - friend class RenderViewContextMenuPrefsTest; -@@ -162,9 +171,6 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate, - virtual void AppendPlatformEditableItems() {} - virtual void ExecOpenInReadAnything() = 0; - -- // May return nullptr if the frame was deleted while the menu was open. -- content::RenderFrameHost* GetRenderFrameHost() const; -- - bool IsCustomItemChecked(int id) const; - bool IsCustomItemEnabled(int id) const; - diff --git components/renderer_context_menu/render_view_context_menu_observer.cc components/renderer_context_menu/render_view_context_menu_observer.cc index 9fdda1636003d..538bd05a41296 100644 --- components/renderer_context_menu/render_view_context_menu_observer.cc diff --git a/patch/patches/chrome_browser_devtools_1366011.patch b/patch/patches/chrome_browser_devtools_1366011.patch deleted file mode 100644 index cf7a5a28d..000000000 --- a/patch/patches/chrome_browser_devtools_1366011.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git chrome/browser/devtools/protocol/page_handler.cc chrome/browser/devtools/protocol/page_handler.cc -index 663a27ff332f2..5c8222267f860 100644 ---- chrome/browser/devtools/protocol/page_handler.cc -+++ chrome/browser/devtools/protocol/page_handler.cc -@@ -14,7 +14,6 @@ - #if BUILDFLAG(ENABLE_PRINTING) - #include "components/printing/browser/print_to_pdf/pdf_print_utils.h" - #if BUILDFLAG(ENABLE_PRINT_PREVIEW) --#include "chrome/browser/printing/pdf_nup_converter_client.h" - #include "chrome/browser/printing/print_view_manager.h" - #else - #include "chrome/browser/printing/print_view_manager_basic.h" diff --git a/patch/patches/chrome_browser_dialogs_native.patch b/patch/patches/chrome_browser_dialogs_native.patch index a35212a1f..eaf2bc0f3 100644 --- a/patch/patches/chrome_browser_dialogs_native.patch +++ b/patch/patches/chrome_browser_dialogs_native.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc -index ab0022f97fd3a..4f27ddec84153 100644 +index 5bcfac8fffa01..859b04b90551b 100644 --- chrome/browser/file_select_helper.cc +++ chrome/browser/file_select_helper.cc @@ -20,6 +20,7 @@ @@ -44,10 +44,10 @@ index ab0022f97fd3a..4f27ddec84153 100644 - const std::vector& accept_types) { + const std::vector& accept_types, + bool run_from_cef) { - std::unique_ptr base_file_type( - new ui::SelectFileDialog::FileTypeInfo()); + auto base_file_type = std::make_unique(); if (accept_types.empty()) -@@ -494,17 +509,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( + return base_file_type; +@@ -493,17 +508,24 @@ FileSelectHelper::GetFileTypesFromAcceptType( std::vector* extensions = &file_type->extensions.back(); @@ -73,7 +73,7 @@ index ab0022f97fd3a..4f27ddec84153 100644 } else { if (!base::IsStringASCII(accept_type)) continue; -@@ -515,10 +537,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -514,10 +536,18 @@ FileSelectHelper::GetFileTypesFromAcceptType( description_id = IDS_AUDIO_FILES; else if (ascii_type == "video/*") description_id = IDS_VIDEO_FILES; @@ -94,7 +94,7 @@ index ab0022f97fd3a..4f27ddec84153 100644 if (extensions->size() > old_extension_size) valid_type_count++; } -@@ -543,6 +573,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -542,6 +572,15 @@ FileSelectHelper::GetFileTypesFromAcceptType( l10n_util::GetStringUTF16(description_id)); } @@ -110,7 +110,7 @@ index ab0022f97fd3a..4f27ddec84153 100644 return file_type; } -@@ -550,7 +589,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( +@@ -549,7 +588,8 @@ FileSelectHelper::GetFileTypesFromAcceptType( void FileSelectHelper::RunFileChooser( content::RenderFrameHost* render_frame_host, scoped_refptr listener, @@ -120,7 +120,7 @@ index ab0022f97fd3a..4f27ddec84153 100644 Profile* profile = Profile::FromBrowserContext( render_frame_host->GetProcess()->GetBrowserContext()); -@@ -569,6 +609,7 @@ void FileSelectHelper::RunFileChooser( +@@ -568,6 +608,7 @@ void FileSelectHelper::RunFileChooser( // message. scoped_refptr file_select_helper( new FileSelectHelper(profile)); @@ -128,7 +128,7 @@ index ab0022f97fd3a..4f27ddec84153 100644 file_select_helper->RunFileChooser(render_frame_host, std::move(listener), params.Clone()); } -@@ -622,7 +663,8 @@ void FileSelectHelper::RunFileChooser( +@@ -621,7 +662,8 @@ void FileSelectHelper::RunFileChooser( } void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) { @@ -186,10 +186,10 @@ index e4dc653c7be45..5aeeb0b970484 100644 raw_ptr source_contents_; }; diff --git ui/shell_dialogs/execute_select_file_win.cc ui/shell_dialogs/execute_select_file_win.cc -index 9243e4a7fb736..e56605fca4e2d 100644 +index 53b143e844879..f3c90339c8695 100644 --- ui/shell_dialogs/execute_select_file_win.cc +++ ui/shell_dialogs/execute_select_file_win.cc -@@ -286,9 +286,7 @@ bool ExecuteSelectSingleFile(HWND owner, +@@ -297,9 +297,7 @@ bool ExecuteSelectSingleFile(HWND owner, const std::vector& filter, int* filter_index, std::vector* paths) { @@ -200,7 +200,7 @@ index 9243e4a7fb736..e56605fca4e2d 100644 default_path, filter, 0, filter_index, paths); } -@@ -300,14 +298,13 @@ bool ExecuteSelectMultipleFile(HWND owner, +@@ -311,14 +309,13 @@ bool ExecuteSelectMultipleFile(HWND owner, std::vector* paths) { DWORD dialog_options = FOS_ALLOWMULTISELECT; @@ -217,7 +217,7 @@ index 9243e4a7fb736..e56605fca4e2d 100644 const base::FilePath& default_path, const std::vector& filter, const std::wstring& def_ext, -@@ -320,9 +317,7 @@ bool ExecuteSaveFile(HWND owner, +@@ -331,9 +328,7 @@ bool ExecuteSaveFile(HWND owner, DWORD dialog_options = FOS_OVERWRITEPROMPT; @@ -228,7 +228,7 @@ index 9243e4a7fb736..e56605fca4e2d 100644 dialog_options, def_ext, filter_index, path); } -@@ -347,7 +342,7 @@ void ExecuteSelectFile( +@@ -358,7 +353,7 @@ void ExecuteSelectFile( break; case SelectFileDialog::SELECT_SAVEAS_FILE: { base::FilePath path; @@ -238,10 +238,10 @@ index 9243e4a7fb736..e56605fca4e2d 100644 paths.push_back(std::move(path)); } diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc -index 9b466a0bbe8b5..4c2c336d6f397 100644 +index 6260f90352141..99f1e0d7227ab 100644 --- ui/shell_dialogs/select_file_dialog.cc +++ ui/shell_dialogs/select_file_dialog.cc -@@ -64,8 +64,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { +@@ -88,8 +88,10 @@ void SelectFileDialog::SetFactory(ui::SelectFileDialogFactory* factory) { // static scoped_refptr SelectFileDialog::Create( Listener* listener, @@ -255,10 +255,10 @@ index 9b466a0bbe8b5..4c2c336d6f397 100644 return CreateSelectFileDialog(listener, std::move(policy)); } diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h -index 45989e4982d49..05675d1d96350 100644 +index cff3cfc241cd1..13626cc306f61 100644 --- ui/shell_dialogs/select_file_dialog.h +++ ui/shell_dialogs/select_file_dialog.h -@@ -111,7 +111,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -113,7 +113,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // is refcounted and uses a background thread. static scoped_refptr Create( Listener* listener, @@ -268,8 +268,8 @@ index 45989e4982d49..05675d1d96350 100644 SelectFileDialog(const SelectFileDialog&) = delete; SelectFileDialog& operator=(const SelectFileDialog&) = delete; -@@ -205,6 +206,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog - void* params); +@@ -210,6 +211,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog + const GURL* caller = nullptr); bool HasMultipleFileTypeChoices(); + // Match the types used by CefWindowHandle. @@ -288,7 +288,7 @@ index 45989e4982d49..05675d1d96350 100644 protected: friend class base::RefCountedThreadSafe; -@@ -229,6 +243,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -235,6 +249,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // The listener to be notified of selection completion. raw_ptr listener_; @@ -300,7 +300,7 @@ index 45989e4982d49..05675d1d96350 100644 private: // Tests if the file selection dialog can be displayed by // testing if the AllowFileSelectionDialogs-Policy is -@@ -241,8 +260,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog +@@ -247,8 +266,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog // Returns true if the dialog has multiple file type choices. virtual bool HasMultipleFileTypeChoicesImpl() = 0; @@ -310,7 +310,7 @@ index 45989e4982d49..05675d1d96350 100644 SelectFileDialog* CreateSelectFileDialog( diff --git ui/shell_dialogs/select_file_dialog_factory.h ui/shell_dialogs/select_file_dialog_factory.h -index d861d1d86c957..6167e0a5b549f 100644 +index c7acd9b05fbb8..3e95e4125fa24 100644 --- ui/shell_dialogs/select_file_dialog_factory.h +++ ui/shell_dialogs/select_file_dialog_factory.h @@ -24,6 +24,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialogFactory { @@ -323,10 +323,10 @@ index d861d1d86c957..6167e0a5b549f 100644 } // namespace ui diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm -index 14f26f55dad2f..db4b7d96243db 100644 +index 3cd217d5a0af9..5826fe4aea689 100644 --- ui/shell_dialogs/select_file_dialog_mac.mm +++ ui/shell_dialogs/select_file_dialog_mac.mm -@@ -100,6 +100,10 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -102,6 +102,10 @@ void SelectFileDialogImpl::SelectFileImpl( mojo_window->CreateSelectFileDialog(std::move(receiver)); } else { NSWindow* ns_window = gfx_window.GetNativeNSWindow(); @@ -338,10 +338,10 @@ index 14f26f55dad2f..db4b7d96243db 100644 std::make_unique(ns_window), std::move(receiver)); diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc -index a1b7af0abde64..4998abc1fb52f 100644 +index 5deb21f760aaa..c8cb093492db4 100644 --- ui/shell_dialogs/select_file_dialog_win.cc +++ ui/shell_dialogs/select_file_dialog_win.cc -@@ -249,6 +249,8 @@ void SelectFileDialogImpl::SelectFileImpl( +@@ -252,6 +252,8 @@ void SelectFileDialogImpl::SelectFileImpl( HWND owner = owning_window && owning_window->GetRootWindow() ? owning_window->GetHost()->GetAcceleratedWidget() : nullptr; diff --git a/patch/patches/chrome_browser_extensions.patch b/patch/patches/chrome_browser_extensions.patch index f98446e45..3c5791648 100644 --- a/patch/patches/chrome_browser_extensions.patch +++ b/patch/patches/chrome_browser_extensions.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/extensions/api/chrome_extensions_api_client.cc chrome/browser/extensions/api/chrome_extensions_api_client.cc -index a9703dcc02f48..aea89290f6080 100644 +index 19a81f51a14c1..d23f6db838d41 100644 --- chrome/browser/extensions/api/chrome_extensions_api_client.cc +++ chrome/browser/extensions/api/chrome_extensions_api_client.cc @@ -13,6 +13,7 @@ @@ -10,7 +10,7 @@ index a9703dcc02f48..aea89290f6080 100644 #include "chrome/browser/extensions/api/automation_internal/chrome_automation_internal_api_delegate.h" #include "chrome/browser/extensions/api/chrome_device_permissions_prompt.h" #include "chrome/browser/extensions/api/declarative_content/chrome_content_rules_registry.h" -@@ -81,6 +82,10 @@ +@@ -83,6 +84,10 @@ #include "chrome/browser/extensions/clipboard_extension_helper_chromeos.h" #endif @@ -21,7 +21,7 @@ index a9703dcc02f48..aea89290f6080 100644 #if BUILDFLAG(ENABLE_PDF) #include "chrome/browser/ui/pdf/chrome_pdf_web_contents_helper_client.h" #include "components/pdf/browser/pdf_web_contents_helper.h" -@@ -303,6 +308,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( +@@ -305,6 +310,9 @@ ChromeExtensionsAPIClient::CreateGuestViewManagerDelegate( std::unique_ptr ChromeExtensionsAPIClient::CreateMimeHandlerViewGuestDelegate( MimeHandlerViewGuest* guest) const { diff --git a/patch/patches/chrome_browser_media_router_1368642.patch b/patch/patches/chrome_browser_media_router_1368642.patch deleted file mode 100644 index f4e72576d..000000000 --- a/patch/patches/chrome_browser_media_router_1368642.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff --git chrome/browser/media/router/BUILD.gn chrome/browser/media/router/BUILD.gn -index c782ea4601eaf..5f39557b6768a 100644 ---- chrome/browser/media/router/BUILD.gn -+++ chrome/browser/media/router/BUILD.gn -@@ -113,8 +113,6 @@ static_library("router") { - public_deps += [ "//components/media_router/common/mojom:logger" ] - - sources += [ -- "logger_list.cc", -- "logger_list.h", - "mojo/media_router_desktop.cc", - "mojo/media_router_desktop.h", - "mojo/media_router_mojo_impl.cc", -@@ -170,6 +168,8 @@ static_library("router") { - "providers/wired_display/wired_display_presentation_receiver_factory.h", - ] - -+ deps += [ ":logger_list" ] -+ - if (is_win) { - sources += [ - "mojo/media_route_provider_util_win.cc", diff --git a/patch/patches/chrome_browser_permission_prompt.patch b/patch/patches/chrome_browser_permission_prompt.patch index 11289ffcd..e96441cd9 100644 --- a/patch/patches/chrome_browser_permission_prompt.patch +++ b/patch/patches/chrome_browser_permission_prompt.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/background_fetch/background_fetch_permission_context.cc chrome/browser/background_fetch/background_fetch_permission_context.cc -index 07a544f4fd8a3..7dfe80b9de4c1 100644 +index 82193be08677a..c7290039cbe96 100644 --- chrome/browser/background_fetch/background_fetch_permission_context.cc +++ chrome/browser/background_fetch/background_fetch_permission_context.cc @@ -4,6 +4,7 @@ @@ -10,7 +10,7 @@ index 07a544f4fd8a3..7dfe80b9de4c1 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/download/download_request_limiter.h" -@@ -29,7 +30,8 @@ ContentSetting BackgroundFetchPermissionContext::GetPermissionStatusInternal( +@@ -25,7 +26,8 @@ ContentSetting BackgroundFetchPermissionContext::GetPermissionStatusInternal( const GURL& embedding_origin) const { DCHECK_CURRENTLY_ON(content::BrowserThread::UI); @@ -21,7 +21,7 @@ index 07a544f4fd8a3..7dfe80b9de4c1 100644 g_browser_process->download_request_limiter(); DCHECK(limiter); diff --git chrome/browser/background_sync/periodic_background_sync_permission_context.cc chrome/browser/background_sync/periodic_background_sync_permission_context.cc -index cfab9f642611f..cc2c6c1f6e9c9 100644 +index 40d27e69a17ce..a7e18b475dd18 100644 --- chrome/browser/background_sync/periodic_background_sync_permission_context.cc +++ chrome/browser/background_sync/periodic_background_sync_permission_context.cc @@ -6,6 +6,7 @@ @@ -32,7 +32,7 @@ index cfab9f642611f..cc2c6c1f6e9c9 100644 #include "chrome/browser/content_settings/host_content_settings_map_factory.h" #include "chrome/browser/installable/installable_utils.h" #include "chrome/browser/profiles/profile.h" -@@ -94,6 +95,10 @@ PeriodicBackgroundSyncPermissionContext::GetPermissionStatusInternal( +@@ -89,6 +90,10 @@ PeriodicBackgroundSyncPermissionContext::GetPermissionStatusInternal( return CONTENT_SETTING_ALLOW; #endif @@ -44,10 +44,10 @@ index cfab9f642611f..cc2c6c1f6e9c9 100644 base::FeatureList::IsEnabled( features::kPeriodicSyncPermissionForDefaultSearchEngine) && diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc -index 644eb40b81297..0715d54f84745 100644 +index 77faa54c6e8dc..d986538d36c2e 100644 --- chrome/browser/permissions/chrome_permissions_client.cc +++ chrome/browser/permissions/chrome_permissions_client.cc -@@ -12,6 +12,7 @@ +@@ -13,6 +13,7 @@ #include "base/strings/string_util.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -55,7 +55,7 @@ index 644eb40b81297..0715d54f84745 100644 #include "chrome/browser/bluetooth/bluetooth_chooser_context_factory.h" #include "chrome/browser/content_settings/cookie_settings_factory.h" #include "chrome/browser/content_settings/host_content_settings_map_factory.h" -@@ -210,6 +211,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( +@@ -211,6 +212,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker( double ChromePermissionsClient::GetSiteEngagementScore( content::BrowserContext* browser_context, const GURL& origin) { @@ -65,7 +65,7 @@ index 644eb40b81297..0715d54f84745 100644 return site_engagement::SiteEngagementService::Get( Profile::FromBrowserContext(browser_context)) ->GetScore(origin); -@@ -300,8 +304,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( +@@ -295,8 +299,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors( std::make_unique()); selectors.emplace_back(std::make_unique( Profile::FromBrowserContext(browser_context))); @@ -77,7 +77,7 @@ index 644eb40b81297..0715d54f84745 100644 } diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc -index ad86b42a1698e..74f046951383d 100644 +index 3649a61d07b7d..22fe4f512e93b 100644 --- chrome/browser/permissions/permission_manager_factory.cc +++ chrome/browser/permissions/permission_manager_factory.cc @@ -6,6 +6,7 @@ @@ -100,7 +100,7 @@ index ad86b42a1698e..74f046951383d 100644 delegates.media_stream_device_enumerator = MediaCaptureDevicesDispatcher::GetInstance(); diff --git chrome/browser/storage/durable_storage_permission_context.cc chrome/browser/storage/durable_storage_permission_context.cc -index b60603e7843eb..9051a490f0b44 100644 +index c515cd600c0a4..04adc37b4a24c 100644 --- chrome/browser/storage/durable_storage_permission_context.cc +++ chrome/browser/storage/durable_storage_permission_context.cc @@ -8,6 +8,7 @@ @@ -141,10 +141,10 @@ index fbce13c16ad10..0512b2f09937e 100644 std::unique_ptr CreatePermissionPrompt( content::WebContents* web_contents, diff --git chrome/browser/ui/views/permissions/permission_prompt_factory.cc chrome/browser/ui/views/permissions/permission_prompt_factory.cc -index 4584985a62cfa..3e894a8c8ca9d 100644 +index 18923a76ceea2..368b82a6c4151 100644 --- chrome/browser/ui/views/permissions/permission_prompt_factory.cc +++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc -@@ -142,11 +142,28 @@ std::unique_ptr CreateQuietPrompt( +@@ -150,11 +150,28 @@ std::unique_ptr CreateQuietPrompt( } } diff --git a/patch/patches/chrome_browser_profiles.patch b/patch/patches/chrome_browser_profiles.patch index 164f3cb5f..5c5536131 100644 --- a/patch/patches/chrome_browser_profiles.patch +++ b/patch/patches/chrome_browser_profiles.patch @@ -1,8 +1,8 @@ diff --git chrome/browser/profiles/off_the_record_profile_impl.cc chrome/browser/profiles/off_the_record_profile_impl.cc -index c3841b69790cf..aa10941fa843d 100644 +index 8f94c350756b4..a243dbaadbc2b 100644 --- chrome/browser/profiles/off_the_record_profile_impl.cc +++ chrome/browser/profiles/off_the_record_profile_impl.cc -@@ -662,7 +662,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( +@@ -652,7 +652,9 @@ std::unique_ptr Profile::CreateOffTheRecordProfile( #endif if (!profile) profile = std::make_unique(parent, otr_profile_id); @@ -14,7 +14,7 @@ index c3841b69790cf..aa10941fa843d 100644 } diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc -index 7cd45d8df99ef..4781f131c253c 100644 +index bd0f46ee1edce..f8efd6222175d 100644 --- chrome/browser/profiles/profile.cc +++ chrome/browser/profiles/profile.cc @@ -83,6 +83,7 @@ base::LazyInstance>::Leaky @@ -25,16 +25,16 @@ index 7cd45d8df99ef..4781f131c253c 100644 const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext"; const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation"; const char kTestOTRProfileIDPrefix[] = "Test::OTR"; -@@ -99,6 +100,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { - // DevTools::BrowserContext and MediaRouter::Presentation are an - // exception to this ban. - return *this == PrimaryID() || -+ base::StartsWith(profile_id_, kCEFOTRProfileIDPrefix, -+ base::CompareCase::SENSITIVE) || - base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, - base::CompareCase::SENSITIVE) || - base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, -@@ -120,6 +123,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( +@@ -103,6 +104,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const { + // DevTools::BrowserContext, MediaRouter::Presentation, and + // CaptivePortal::Signin are exceptions to this ban. + if (*this == PrimaryID() || ++ base::StartsWith(profile_id_, kCEFOTRProfileIDPrefix, ++ base::CompareCase::SENSITIVE) || + base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix, + base::CompareCase::SENSITIVE) || + base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix, +@@ -133,6 +136,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique( base::GUID::GenerateRandomV4().AsLowercaseString().c_str())); } @@ -52,7 +52,7 @@ index 7cd45d8df99ef..4781f131c253c 100644 Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() { return CreateUnique(kDevToolsOTRProfileIDPrefix); diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h -index fc84e8f683a7a..1c4de56dfc9cc 100644 +index eb5172ba4789c..147c9d828708b 100644 --- chrome/browser/profiles/profile.h +++ chrome/browser/profiles/profile.h @@ -99,6 +99,10 @@ class Profile : public content::BrowserContext { @@ -66,7 +66,7 @@ index fc84e8f683a7a..1c4de56dfc9cc 100644 // Creates a unique OTR profile id to be used for DevTools browser contexts. static OTRProfileID CreateUniqueForDevTools(); -@@ -483,6 +487,8 @@ class Profile : public content::BrowserContext { +@@ -488,6 +492,8 @@ class Profile : public content::BrowserContext { virtual void RecordPrimaryMainFrameNavigation() = 0; @@ -75,7 +75,7 @@ index fc84e8f683a7a..1c4de56dfc9cc 100644 protected: // Creates an OffTheRecordProfile which points to this Profile. static std::unique_ptr CreateOffTheRecordProfile( -@@ -494,8 +500,6 @@ class Profile : public content::BrowserContext { +@@ -499,8 +505,6 @@ class Profile : public content::BrowserContext { static PrefStore* CreateExtensionPrefStore(Profile*, bool incognito_pref_store); @@ -85,10 +85,10 @@ index fc84e8f683a7a..1c4de56dfc9cc 100644 virtual bool IsSignedIn() = 0; diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc -index 9f2ccdfbc8e55..c2fab7e33b06e 100644 +index 2b1fd89740659..2bfefe3ba148d 100644 --- chrome/browser/profiles/profile_impl.cc +++ chrome/browser/profiles/profile_impl.cc -@@ -1019,7 +1019,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, +@@ -985,7 +985,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id, otr_profiles_[otr_profile_id] = std::move(otr_profile); @@ -100,10 +100,10 @@ index 9f2ccdfbc8e55..c2fab7e33b06e 100644 return raw_otr_profile; } diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc -index 3048e397fd831..56ba0bcb6d762 100644 +index 9b6a595c13b32..27830714cd85f 100644 --- chrome/browser/profiles/profile_manager.cc +++ chrome/browser/profiles/profile_manager.cc -@@ -523,7 +523,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) +@@ -524,7 +524,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir) base::Unretained(this))); #endif diff --git a/patch/patches/chrome_browser_safe_browsing.patch b/patch/patches/chrome_browser_safe_browsing.patch index b07633af2..08a00b638 100644 --- a/patch/patches/chrome_browser_safe_browsing.patch +++ b/patch/patches/chrome_browser_safe_browsing.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn -index 848a6365ce97d..5d6185d8402a5 100644 +index 1197ad7d00986..0174e5e2b76d5 100644 --- chrome/browser/safe_browsing/BUILD.gn +++ chrome/browser/safe_browsing/BUILD.gn @@ -30,6 +30,7 @@ static_library("safe_browsing") { diff --git a/patch/patches/chrome_plugins.patch b/patch/patches/chrome_plugins.patch index ef7711d29..5fc63ce46 100644 --- a/patch/patches/chrome_plugins.patch +++ b/patch/patches/chrome_plugins.patch @@ -125,10 +125,10 @@ index a29a2739af3c8..0feb1a87cef64 100644 // that the X-Frame-Options protection mechanism is set to either DENY or // SAMEORIGIN. diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc -index 0320c23e07862..6151e7744bdee 100644 +index 2c7ca0d57ec44..7194f42b52335 100644 --- chrome/renderer/chrome_content_renderer_client.cc +++ chrome/renderer/chrome_content_renderer_client.cc -@@ -969,6 +969,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -980,6 +980,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( if ((status == chrome::mojom::PluginStatus::kUnauthorized || status == chrome::mojom::PluginStatus::kBlocked) && @@ -136,7 +136,7 @@ index 0320c23e07862..6151e7744bdee 100644 content_settings_agent_delegate->IsPluginTemporarilyAllowed( identifier)) { status = chrome::mojom::PluginStatus::kAllowed; -@@ -1139,7 +1140,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1150,7 +1151,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( render_frame->GetRemoteAssociatedInterfaces()->GetInterface( plugin_auth_host.BindNewEndpointAndPassReceiver()); plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier); @@ -146,7 +146,7 @@ index 0320c23e07862..6151e7744bdee 100644 break; } case chrome::mojom::PluginStatus::kBlocked: { -@@ -1148,7 +1150,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1159,7 +1161,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name)); placeholder->AllowLoading(); RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked")); @@ -156,7 +156,7 @@ index 0320c23e07862..6151e7744bdee 100644 break; } case chrome::mojom::PluginStatus::kBlockedByPolicy: { -@@ -1158,7 +1161,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( +@@ -1169,7 +1172,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin( group_name)); RenderThread::Get()->RecordAction( UserMetricsAction("Plugin_BlockedByPolicy")); diff --git a/patch/patches/chrome_runtime.patch b/patch/patches/chrome_runtime.patch index 4b7af1cdb..30b33d384 100644 --- a/patch/patches/chrome_runtime.patch +++ b/patch/patches/chrome_runtime.patch @@ -1,8 +1,8 @@ diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc -index 377b2eb646b0a..740f2e9c8a05e 100644 +index 87c1c47fc868a..42d7929172abc 100644 --- chrome/app/chrome_main_delegate.cc +++ chrome/app/chrome_main_delegate.cc -@@ -39,6 +39,7 @@ +@@ -40,6 +40,7 @@ #include "base/trace_event/trace_event_impl.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -10,7 +10,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 #include "chrome/browser/chrome_content_browser_client.h" #include "chrome/browser/chrome_resource_bundle_helper.h" #include "chrome/browser/defaults.h" -@@ -489,6 +490,8 @@ struct MainFunction { +@@ -494,6 +495,8 @@ struct MainFunction { // Initializes the user data dir. Must be called before InitializeLocalState(). void InitializeUserDataDir(base::CommandLine* command_line) { @@ -19,7 +19,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 #if BUILDFLAG(IS_WIN) // Reach out to chrome_elf for the truth on the user data directory. // Note that in tests, this links to chrome_elf_test_stubs. -@@ -621,6 +624,10 @@ ChromeMainDelegate::ChromeMainDelegate(base::TimeTicks exe_entry_point_ticks) { +@@ -626,6 +629,10 @@ ChromeMainDelegate::ChromeMainDelegate(base::TimeTicks exe_entry_point_ticks) { ChromeMainDelegate::~ChromeMainDelegate() = default; @@ -30,7 +30,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 absl::optional ChromeMainDelegate::PostEarlyInitialization( InvokedIn invoked_in) { DCHECK(base::ThreadPoolInstance::Get()); -@@ -867,7 +874,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { +@@ -883,7 +890,9 @@ void ChromeMainDelegate::CommonEarlyInitialization() { } #if BUILDFLAG(IS_WIN) @@ -40,7 +40,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 base::sequence_manager::internal::ThreadControllerPowerMonitor:: InitializeOnMainThread(); base::InitializePlatformThreadFeatures(); -@@ -1190,6 +1199,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1221,6 +1230,7 @@ void ChromeMainDelegate::PreSandboxStartup() { std::string process_type = command_line.GetSwitchValueASCII(switches::kProcessType); @@ -48,7 +48,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 crash_reporter::InitializeCrashKeys(); #if BUILDFLAG(IS_POSIX) -@@ -1200,6 +1210,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1231,6 +1241,7 @@ void ChromeMainDelegate::PreSandboxStartup() { InitMacCrashReporter(command_line, process_type); SetUpInstallerPreferences(command_line); #endif @@ -56,7 +56,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 #if BUILDFLAG(IS_WIN) child_process_logging::Init(); -@@ -1402,6 +1413,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1433,6 +1444,7 @@ void ChromeMainDelegate::PreSandboxStartup() { CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale; } @@ -64,7 +64,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 #if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC) // Zygote needs to call InitCrashReporter() in RunZygote(). if (process_type != switches::kZygoteProcess) { -@@ -1441,6 +1453,7 @@ void ChromeMainDelegate::PreSandboxStartup() { +@@ -1476,6 +1488,7 @@ void ChromeMainDelegate::PreSandboxStartup() { // After all the platform Breakpads have been initialized, store the command // line for crash reporting. crash_keys::SetCrashKeysFromCommandLine(command_line); @@ -72,7 +72,7 @@ index 377b2eb646b0a..740f2e9c8a05e 100644 #if BUILDFLAG(ENABLE_PDF) MaybePatchGdiGetFontData(); -@@ -1530,6 +1543,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1574,6 +1587,7 @@ void ChromeMainDelegate::ZygoteForked() { SetUpProfilingShutdownHandler(); } @@ -80,7 +80,7 @@ index 377b2eb646b0a..740f2e9c8a05e 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 = -@@ -1546,6 +1560,7 @@ void ChromeMainDelegate::ZygoteForked() { +@@ -1596,6 +1610,7 @@ void ChromeMainDelegate::ZygoteForked() { // Reset the command line for the newly spawned process. crash_keys::SetCrashKeysFromCommandLine(*command_line); @@ -102,7 +102,7 @@ index de1b45f921123..077894e4a42c9 100644 // content::ContentMainDelegate: absl::optional BasicStartupComplete() override; diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc -index d1ddad3b91515..9fd596595b0ff 100644 +index e6e88723a8ea1..f03f277646775 100644 --- chrome/browser/chrome_browser_main.cc +++ chrome/browser/chrome_browser_main.cc @@ -52,6 +52,7 @@ @@ -113,7 +113,7 @@ index d1ddad3b91515..9fd596595b0ff 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/active_use_util.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1598,12 +1599,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1614,12 +1615,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { browser_process_->local_state()); } @@ -128,7 +128,7 @@ index d1ddad3b91515..9fd596595b0ff 100644 #if BUILDFLAG(IS_ANDROID) page_info::SetPageInfoClient(new ChromePageInfoClient()); -@@ -1754,14 +1757,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1771,14 +1774,17 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // This step is costly and is already measured in // Startup.StartupBrowserCreator_Start. // See the comment above for an explanation of |process_command_line|. @@ -147,7 +147,7 @@ index d1ddad3b91515..9fd596595b0ff 100644 // TODO(crbug.com/1052397): Revisit the macro expression once build flag switch // of lacros-chrome is complete. #if BUILDFLAG(IS_WIN) || (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS_LACROS)) -@@ -1789,8 +1795,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { +@@ -1806,8 +1812,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() { // Create the RunLoop for MainMessageLoopRun() to use and transfer // ownership of the browser's lifetime to the BrowserProcess. @@ -160,7 +160,7 @@ index d1ddad3b91515..9fd596595b0ff 100644 GetMainRunLoopInstance()->QuitWhenIdleClosure()); } diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm -index 791b74ef57995..20cd406ff81bb 100644 +index 70f6abda15030..d7a6dcc541464 100644 --- chrome/browser/chrome_browser_main_mac.mm +++ chrome/browser/chrome_browser_main_mac.mm @@ -16,6 +16,7 @@ @@ -171,7 +171,7 @@ index 791b74ef57995..20cd406ff81bb 100644 #import "chrome/browser/app_controller_mac.h" #include "chrome/browser/apps/app_shim/app_shim_listener.h" #include "chrome/browser/browser_process.h" -@@ -111,6 +112,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -113,6 +114,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { } #endif // !BUILDFLAG(GOOGLE_CHROME_FOR_TESTING_BRANDING) @@ -179,7 +179,7 @@ index 791b74ef57995..20cd406ff81bb 100644 // Create the app delegate. This object is intentionally leaked as a global // singleton. It is accessed through -[NSApp delegate]. AppController* app_controller = [[AppController alloc] init]; -@@ -119,6 +121,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { +@@ -121,6 +123,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() { chrome::BuildMainMenu(NSApp, app_controller, l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false); [app_controller mainMenuCreated]; @@ -187,7 +187,7 @@ index 791b74ef57995..20cd406ff81bb 100644 ui::WarmScreenCapture(); -@@ -177,7 +180,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, +@@ -179,7 +182,9 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile, } void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() { @@ -198,10 +198,10 @@ index 791b74ef57995..20cd406ff81bb 100644 +#endif } diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc -index 6f268f5937bd5..2152a26496ceb 100644 +index 3038bbd2f7ada..73c55394367fa 100644 --- chrome/browser/chrome_content_browser_client.cc +++ chrome/browser/chrome_content_browser_client.cc -@@ -31,6 +31,7 @@ +@@ -32,6 +32,7 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -209,7 +209,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_labels_service_factory.h" #include "chrome/browser/after_startup_task_utils.h" -@@ -1395,6 +1396,8 @@ bool DoesGaiaOriginRequireDedicatedProcess() { +@@ -1403,6 +1404,8 @@ bool DoesGaiaOriginRequireDedicatedProcess() { } // namespace ChromeContentBrowserClient::ChromeContentBrowserClient() { @@ -218,7 +218,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 #if BUILDFLAG(ENABLE_PLUGINS) extra_parts_.push_back(new ChromeContentBrowserClientPluginsPart); #endif -@@ -1420,6 +1423,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { +@@ -1428,6 +1431,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() { extra_parts_.clear(); } @@ -230,7 +230,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 // static void ChromeContentBrowserClient::RegisterLocalStatePrefs( PrefRegistrySimple* registry) { -@@ -4011,9 +4019,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( +@@ -4035,9 +4043,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated( &search::HandleNewTabURLReverseRewrite); #endif // BUILDFLAG(IS_ANDROID) @@ -242,7 +242,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 } base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() { -@@ -5731,7 +5741,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( +@@ -5771,7 +5781,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated( network_service); } @@ -251,7 +251,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -5749,6 +5759,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( +@@ -5789,6 +5799,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams( network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = GetApplicationLocale(); } @@ -260,7 +260,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 } std::vector -@@ -6623,10 +6635,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( +@@ -6656,10 +6668,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted( const auto now = base::TimeTicks::Now(); const auto timeout = GetKeepaliveTimerTimeout(context); keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout); @@ -273,7 +273,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 FROM_HERE, keepalive_deadline_ - now, base::BindOnce( &ChromeContentBrowserClient::OnKeepaliveTimerFired, -@@ -6645,7 +6657,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { +@@ -6678,7 +6690,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() { --num_keepalive_requests_; if (num_keepalive_requests_ == 0) { DVLOG(1) << "Stopping the keepalive timer"; @@ -283,7 +283,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 // This deletes the keep alive handle attached to the timer function and // unblock the shutdown sequence. } -@@ -6777,7 +6790,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( +@@ -6810,7 +6823,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired( const auto now = base::TimeTicks::Now(); const auto then = keepalive_deadline_; if (now < then) { @@ -293,7 +293,7 @@ index 6f268f5937bd5..2152a26496ceb 100644 base::BindOnce(&ChromeContentBrowserClient::OnKeepaliveTimerFired, weak_factory_.GetWeakPtr(), diff --git chrome/browser/chrome_content_browser_client.h chrome/browser/chrome_content_browser_client.h -index cb93058f317e4..27215441c206c 100644 +index 10b5cf030a944..49b773042ad24 100644 --- chrome/browser/chrome_content_browser_client.h +++ chrome/browser/chrome_content_browser_client.h @@ -119,6 +119,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { @@ -305,7 +305,7 @@ index cb93058f317e4..27215441c206c 100644 // TODO(https://crbug.com/787567): This file is about calls from content/ out // to chrome/ to get values or notify about events, but both of these // functions are from chrome/ to chrome/ and don't involve content/ at all. -@@ -592,7 +594,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -591,7 +593,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { override; void OnNetworkServiceCreated( network::mojom::NetworkService* network_service) override; @@ -314,7 +314,7 @@ index cb93058f317e4..27215441c206c 100644 content::BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -943,7 +945,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { +@@ -947,7 +949,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient { #if !BUILDFLAG(IS_ANDROID) uint64_t num_keepalive_requests_ = 0; @@ -324,7 +324,7 @@ index cb93058f317e4..27215441c206c 100644 #endif diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc -index 5e72dbd77de9b..40c346953edb0 100644 +index 621b03d86a86a..9123aa34187d1 100644 --- chrome/browser/prefs/browser_prefs.cc +++ chrome/browser/prefs/browser_prefs.cc @@ -11,6 +11,7 @@ @@ -335,7 +335,7 @@ index 5e72dbd77de9b..40c346953edb0 100644 #include "chrome/browser/about_flags.h" #include "chrome/browser/accessibility/accessibility_labels_service.h" #include "chrome/browser/accessibility/accessibility_ui.h" -@@ -165,6 +166,10 @@ +@@ -168,6 +169,10 @@ #include "chrome/browser/background/background_mode_manager.h" #endif @@ -346,7 +346,7 @@ index 5e72dbd77de9b..40c346953edb0 100644 #if BUILDFLAG(ENABLE_EXTENSIONS) #include "chrome/browser/accessibility/animation_policy_prefs.h" #include "chrome/browser/apps/platform_apps/shortcut_manager.h" -@@ -1347,6 +1352,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, +@@ -1321,6 +1326,10 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry, SessionDataService::RegisterProfilePrefs(registry); #endif diff --git a/patch/patches/chrome_runtime_views.patch b/patch/patches/chrome_runtime_views.patch index 27eb63aae..cdade7799 100644 --- a/patch/patches/chrome_runtime_views.patch +++ b/patch/patches/chrome_runtime_views.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc -index 6eece67e8548a..eb78e5157eec8 100644 +index 56762e4de844e..ec026e5b69cc7 100644 --- chrome/browser/ui/browser_command_controller.cc +++ chrome/browser/ui/browser_command_controller.cc @@ -382,8 +382,10 @@ bool BrowserCommandController::ExecuteCommandWithDisposition( @@ -28,7 +28,7 @@ index 6eece67e8548a..eb78e5157eec8 100644 // The order of commands in this switch statement must match the function // declaration order in browser.h! switch (id) { -@@ -1043,11 +1052,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( +@@ -1044,11 +1053,13 @@ void BrowserCommandController::TabRestoreServiceLoaded( // BrowserCommandController, private: bool BrowserCommandController::IsShowingMainUI() { @@ -179,10 +179,10 @@ index 195674a56169c..bee591ec8f2f3 100644 BrowserFrame(const BrowserFrame&) = delete; BrowserFrame& operator=(const BrowserFrame&) = delete; diff --git chrome/browser/ui/views/frame/browser_view.cc chrome/browser/ui/views/frame/browser_view.cc -index a8e5cd8826ca4..0b958e49730d4 100644 +index ed0b1e375c5e4..0274783e07ad9 100644 --- chrome/browser/ui/views/frame/browser_view.cc +++ chrome/browser/ui/views/frame/browser_view.cc -@@ -305,11 +305,10 @@ using content::NativeWebKeyboardEvent; +@@ -309,11 +309,10 @@ using content::NativeWebKeyboardEvent; using content::WebContents; using web_modal::WebContentsModalDialogHost; @@ -197,7 +197,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 #if BUILDFLAG(IS_CHROMEOS_ASH) // UMA histograms that record animation smoothness for tab loading animation. -@@ -802,11 +801,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { +@@ -806,11 +805,22 @@ class BrowserView::SidePanelVisibilityController : public views::ViewObserver { /////////////////////////////////////////////////////////////////////////////// // BrowserView, public: @@ -221,7 +221,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 SetShowIcon( ::ShouldShowWindowIcon(browser_.get(), AppUsesWindowControlsOverlay())); -@@ -848,7 +858,6 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -852,7 +862,6 @@ BrowserView::BrowserView(std::unique_ptr browser) } browser_->tab_strip_model()->AddObserver(this); @@ -229,7 +229,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 // Top container holds tab strip region and toolbar and lives at the front of // the view hierarchy. -@@ -894,8 +903,15 @@ BrowserView::BrowserView(std::unique_ptr browser) +@@ -898,8 +907,15 @@ BrowserView::BrowserView(std::unique_ptr browser) contents_container->SetLayoutManager(std::make_unique( devtools_web_view_, contents_web_view_)); @@ -247,7 +247,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 contents_separator_ = top_container_->AddChildView(std::make_unique()); -@@ -1841,6 +1857,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { +@@ -1877,6 +1893,8 @@ bool BrowserView::ShouldHideUIForFullscreen() const { if (immersive_mode_controller_->IsEnabled()) return false; @@ -256,7 +256,17 @@ index a8e5cd8826ca4..0b958e49730d4 100644 return frame_->GetFrameView()->ShouldHideTopUIForFullscreen(); } -@@ -3202,7 +3220,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { +@@ -2755,7 +2773,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() { + } + + DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() { +- DCHECK(toolbar_button_provider_); ++ if (!toolbar_button_provider_) ++ return nullptr; + if (auto* download_button = toolbar_button_provider_->GetDownloadButton()) + return download_button->bubble_controller(); + return nullptr; +@@ -3247,7 +3266,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() { if (top_container()->parent() == this) return; @@ -266,7 +276,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 top_container()->DestroyLayer(); AddChildViewAt(top_container(), 0); EnsureFocusOrder(); -@@ -3747,8 +3766,10 @@ void BrowserView::Layout() { +@@ -3792,8 +3812,10 @@ void BrowserView::Layout() { // TODO(jamescook): Why was this in the middle of layout code? toolbar_->location_bar()->omnibox_view()->SetFocusBehavior( @@ -279,7 +289,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 // Some of the situations when the BrowserView is laid out are: // - Enter/exit immersive fullscreen mode. -@@ -3814,6 +3835,11 @@ void BrowserView::AddedToWidget() { +@@ -3859,6 +3881,11 @@ void BrowserView::AddedToWidget() { SetThemeProfileForWindow(GetNativeWindow(), browser_->profile()); #endif @@ -291,7 +301,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 toolbar_->Init(); // TODO(pbos): Manage this either inside SidePanel or the corresponding button -@@ -3874,13 +3900,9 @@ void BrowserView::AddedToWidget() { +@@ -3919,13 +3946,9 @@ void BrowserView::AddedToWidget() { EnsureFocusOrder(); @@ -307,7 +317,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 using_native_frame_ = frame_->ShouldUseNativeFrame(); MaybeInitializeWebUITabStrip(); -@@ -4296,7 +4318,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, +@@ -4341,7 +4364,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen, // Undo our anti-jankiness hacks and force a re-layout. in_process_fullscreen_ = false; ToolbarSizeChanged(false); @@ -317,7 +327,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 } bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { -@@ -4638,6 +4661,8 @@ Profile* BrowserView::GetProfile() { +@@ -4683,6 +4707,8 @@ Profile* BrowserView::GetProfile() { } void BrowserView::UpdateUIForTabFullscreen() { @@ -326,7 +336,7 @@ index a8e5cd8826ca4..0b958e49730d4 100644 frame()->GetFrameView()->UpdateFullscreenTopUI(); } -@@ -4660,6 +4685,8 @@ void BrowserView::HideDownloadShelf() { +@@ -4705,6 +4731,8 @@ void BrowserView::HideDownloadShelf() { } bool BrowserView::CanUserExitFullscreen() const { @@ -336,10 +346,10 @@ index a8e5cd8826ca4..0b958e49730d4 100644 } diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h -index 0dfde39f4bd1f..dc9ba028c22bb 100644 +index 7813973b71372..c223beb92a102 100644 --- chrome/browser/ui/views/frame/browser_view.h +++ chrome/browser/ui/views/frame/browser_view.h -@@ -130,11 +130,16 @@ class BrowserView : public BrowserWindow, +@@ -131,11 +131,16 @@ class BrowserView : public BrowserWindow, public webapps::AppBannerManager::Observer { public: METADATA_HEADER(BrowserView); @@ -356,9 +366,9 @@ index 0dfde39f4bd1f..dc9ba028c22bb 100644 void set_frame(BrowserFrame* frame) { frame_ = frame; } BrowserFrame* frame() const { return frame_; } -@@ -791,6 +796,12 @@ class BrowserView : public BrowserWindow, - return should_show_window_controls_overlay_toggle_; - } +@@ -798,6 +803,12 @@ class BrowserView : public BrowserWindow, + void SetLoadingAnimationStateChangeClosureForTesting( + base::OnceClosure closure); + protected: + virtual ToolbarView* OverrideCreateToolbar(Browser* browser, @@ -465,10 +475,10 @@ index 57d5e9f7b4e3c..da7b2d14bae49 100644 } diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc -index 73869775288dc..524f32d3ae877 100644 +index 89ea1bf57ef43..22c39b3c6566d 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.cc +++ chrome/browser/ui/views/toolbar/toolbar_view.cc -@@ -170,12 +170,13 @@ auto& GetViewCommandMap() { +@@ -171,12 +171,13 @@ auto& GetViewCommandMap() { //////////////////////////////////////////////////////////////////////////////// // ToolbarView, public: @@ -484,7 +494,7 @@ index 73869775288dc..524f32d3ae877 100644 SetID(VIEW_ID_TOOLBAR); UpgradeDetector::GetInstance()->AddObserver(this); -@@ -210,7 +211,7 @@ void ToolbarView::Init() { +@@ -211,7 +212,7 @@ void ToolbarView::Init() { #endif auto location_bar = std::make_unique( browser_, browser_->profile(), browser_->command_controller(), this, @@ -494,7 +504,7 @@ index 73869775288dc..524f32d3ae877 100644 size_animation_.Reset(1); diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h -index e597548896482..b9985ed50a2e3 100644 +index da32d80ee4f08..8a5e1af098414 100644 --- chrome/browser/ui/views/toolbar/toolbar_view.h +++ chrome/browser/ui/views/toolbar/toolbar_view.h @@ -95,7 +95,8 @@ class ToolbarView : public views::AccessiblePaneView, diff --git a/patch/patches/component_build.patch b/patch/patches/component_build.patch index 1e4504741..f1c72aa69 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 596612c8e9757..af6b9f8e0b11f 100644 +index fde774ad3e4b9..a22b4692de7c8 100644 --- content/browser/devtools/devtools_instrumentation.h +++ content/browser/devtools/devtools_instrumentation.h @@ -101,7 +101,7 @@ bool ApplyUserAgentMetadataOverrides( @@ -68,7 +68,7 @@ index 97c7dc7c25000..63c42610bfd9c 100644 blink::mojom::V8CacheOptions GetV8CacheOptions(); diff --git third_party/blink/renderer/controller/BUILD.gn third_party/blink/renderer/controller/BUILD.gn -index 33b07692dee48..733f15342f321 100644 +index bb3dc58a360cf..823b0c6582eb1 100644 --- third_party/blink/renderer/controller/BUILD.gn +++ third_party/blink/renderer/controller/BUILD.gn @@ -32,6 +32,7 @@ component("controller") { diff --git a/patch/patches/content_2015.patch b/patch/patches/content_2015.patch index badfe4946..ce0796b7d 100644 --- a/patch/patches/content_2015.patch +++ b/patch/patches/content_2015.patch @@ -12,10 +12,10 @@ index 286e99d804cd0..2f431dcab0283 100644 GetContentClient()->browser()->GetUserAgent()); version.SetString("V8-Version", V8_VERSION_STRING); diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc -index cbadbda605709..048c88486ce06 100644 +index 95ab3cd395b8a..1a82cf112454e 100644 --- content/browser/loader/navigation_url_loader_impl.cc +++ content/browser/loader/navigation_url_loader_impl.cc -@@ -716,6 +716,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( +@@ -715,6 +715,17 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest( resource_request_->has_user_gesture, initiating_origin, initiator_document_.AsRenderFrameHostIfValid(), &loader_factory); @@ -34,10 +34,10 @@ index cbadbda605709..048c88486ce06 100644 factory = base::MakeRefCounted( std::move(loader_factory)); diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc -index 804a179c88580..c889d833f97c6 100644 +index f31156ba6ea6d..bc890c2a0319c 100644 --- content/public/browser/content_browser_client.cc +++ content/public/browser/content_browser_client.cc -@@ -957,7 +957,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( +@@ -955,7 +955,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload( void ContentBrowserClient::OnNetworkServiceCreated( network::mojom::NetworkService* network_service) {} @@ -46,7 +46,7 @@ index 804a179c88580..c889d833f97c6 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -966,6 +966,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( +@@ -964,6 +964,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams( cert_verifier_creation_params) { network_context_params->user_agent = GetUserAgentBasedOnPolicy(context); network_context_params->accept_language = "en-us,en"; @@ -55,7 +55,7 @@ index 804a179c88580..c889d833f97c6 100644 std::vector diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h -index 3f276c5394dde..4963c61ef73e6 100644 +index 9b6c2b8b249af..75ac41f88708b 100644 --- content/public/browser/content_browser_client.h +++ content/public/browser/content_browser_client.h @@ -34,6 +34,7 @@ @@ -66,7 +66,7 @@ index 3f276c5394dde..4963c61ef73e6 100644 #include "content/public/common/alternative_error_page_override_info.mojom-forward.h" #include "content/public/common/page_visibility_state.h" #include "content/public/common/window_container_type.mojom-forward.h" -@@ -1751,7 +1752,7 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1753,7 +1754,7 @@ class CONTENT_EXPORT ContentBrowserClient { // // If |relative_partition_path| is the empty string, it means this needs to // create the default NetworkContext for the BrowserContext. @@ -75,7 +75,7 @@ index 3f276c5394dde..4963c61ef73e6 100644 BrowserContext* context, bool in_memory, const base::FilePath& relative_partition_path, -@@ -1957,6 +1958,19 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -1959,6 +1960,19 @@ class CONTENT_EXPORT ContentBrowserClient { RenderFrameHost* initiator_document, mojo::PendingRemote* out_factory); @@ -95,7 +95,7 @@ index 3f276c5394dde..4963c61ef73e6 100644 // Creates an OverlayWindow to be used for video or document // Picture-in-Picture respectively. This window will house the content shown // when in Picture-in-Picture mode. This will return a new OverlayWindow. -@@ -2012,6 +2026,10 @@ class CONTENT_EXPORT ContentBrowserClient { +@@ -2014,6 +2028,10 @@ class CONTENT_EXPORT ContentBrowserClient { // Used as part of the user agent string. virtual std::string GetProduct(); @@ -132,10 +132,10 @@ index 69e9da01fd708..32ed3641566c2 100644 // started. virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {} diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc -index b3b8ee2ac0c33..1e2a73265fd1f 100644 +index 17b628006b06f..cea55de60c5d3 100644 --- content/renderer/render_thread_impl.cc +++ content/renderer/render_thread_impl.cc -@@ -594,6 +594,8 @@ void RenderThreadImpl::Init() { +@@ -597,6 +597,8 @@ void RenderThreadImpl::Init() { GetContentClient()->renderer()->CreateURLLoaderThrottleProvider( blink::URLLoaderThrottleProviderType::kFrame); @@ -145,10 +145,10 @@ index b3b8ee2ac0c33..1e2a73265fd1f 100644 base::BindRepeating(&RenderThreadImpl::OnRendererInterfaceReceiver, base::Unretained(this))); diff --git content/renderer/renderer_blink_platform_impl.cc content/renderer/renderer_blink_platform_impl.cc -index 90e08c610ccc0..96e8061b4c966 100644 +index 4cedfbfaa2f7b..6d9c87b5c2247 100644 --- content/renderer/renderer_blink_platform_impl.cc +++ content/renderer/renderer_blink_platform_impl.cc -@@ -1009,6 +1009,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { +@@ -1021,6 +1021,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() { //------------------------------------------------------------------------------ @@ -165,10 +165,10 @@ index 90e08c610ccc0..96e8061b4c966 100644 RendererBlinkPlatformImpl::CreateWebV8ValueConverter() { return std::make_unique(); diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h -index e607746a2ef60..a2a8fdc7270c7 100644 +index 78ffa14e79f12..ca007abcacf51 100644 --- content/renderer/renderer_blink_platform_impl.h +++ content/renderer/renderer_blink_platform_impl.h -@@ -225,6 +225,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { +@@ -227,6 +227,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl { blink::WebVector* csp) override; base::PlatformThreadId GetIOThreadId() const override; diff --git a/patch/patches/content_main_654986.patch b/patch/patches/content_main_654986.patch index 0f31a2b82..513d9ac6f 100644 --- a/patch/patches/content_main_654986.patch +++ b/patch/patches/content_main_654986.patch @@ -105,7 +105,7 @@ index 58f891fd7af7a..3178a0aeab935 100644 } diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc -index 8967bb5066eb6..4705bf64b2dc6 100644 +index 6965f862853af..d674963c89a64 100644 --- content/app/content_main_runner_impl.cc +++ content/app/content_main_runner_impl.cc @@ -43,6 +43,7 @@ @@ -116,7 +116,7 @@ index 8967bb5066eb6..4705bf64b2dc6 100644 #include "base/time/time.h" #include "base/trace_event/trace_event.h" #include "build/build_config.h" -@@ -1262,6 +1263,12 @@ void ContentMainRunnerImpl::Shutdown() { +@@ -1269,6 +1270,12 @@ void ContentMainRunnerImpl::Shutdown() { is_shutdown_ = true; } @@ -130,7 +130,7 @@ index 8967bb5066eb6..4705bf64b2dc6 100644 std::unique_ptr ContentMainRunner::Create() { return ContentMainRunnerImpl::Create(); diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h -index 9dda5702a4c97..10a35923f5965 100644 +index c96e733faf281..77f5b458c3160 100644 --- content/app/content_main_runner_impl.h +++ content/app/content_main_runner_impl.h @@ -29,7 +29,7 @@ class DiscardableSharedMemoryManager; diff --git a/patch/patches/crashpad_1995.patch b/patch/patches/crashpad_1995.patch index 4f08247ff..7c60f4c03 100644 --- a/patch/patches/crashpad_1995.patch +++ b/patch/patches/crashpad_1995.patch @@ -264,7 +264,7 @@ index 9f8f20dfa6506..5d42f6fc1b003 100644 } // namespace crash_reporter diff --git components/crash/core/app/crashpad.cc components/crash/core/app/crashpad.cc -index afa205b987b5b..6a959deee9d4a 100644 +index d6a90f5185a43..7c8e2176d8432 100644 --- components/crash/core/app/crashpad.cc +++ components/crash/core/app/crashpad.cc @@ -131,7 +131,8 @@ bool InitializeCrashpadImpl(bool initial_client, diff --git a/patch/patches/extensions_1947.patch b/patch/patches/extensions_1947.patch index 74f313c49..7a239fdf8 100644 --- a/patch/patches/extensions_1947.patch +++ b/patch/patches/extensions_1947.patch @@ -196,10 +196,10 @@ index 7465d1831d9bc..a4bcf0c5527de 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 1ada4dfbdeca8..0720ce6014098 100644 +index ae89ae7c91cfd..af518c8319503 100644 --- extensions/browser/process_manager.cc +++ extensions/browser/process_manager.cc -@@ -379,9 +379,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, +@@ -380,9 +380,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension, return true; // TODO(kalman): return false here? It might break things... DVLOG(1) << "CreateBackgroundHost " << extension->id(); diff --git a/patch/patches/gn_config.patch b/patch/patches/gn_config.patch index b82075b23..8fba53f13 100644 --- a/patch/patches/gn_config.patch +++ b/patch/patches/gn_config.patch @@ -12,7 +12,7 @@ index 55f5ee19f13e4..55ad3bccc3ebd 100644 # https://crbug.com/474506. "//clank/java/BUILD.gn", diff --git BUILD.gn BUILD.gn -index 710257cbb808c..fb38b7f91890c 100644 +index a6b18dea12365..b139718e9386b 100644 --- BUILD.gn +++ BUILD.gn @@ -17,6 +17,7 @@ import("//build/config/sanitizers/sanitizers.gni") @@ -80,7 +80,7 @@ index 1d6be612da8d4..c8ea70f2f256d 100644 +_OBJC_METACLASS_$_UnderlayOpenGLHostingWindow + diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni -index 1d943a762ccd8..3c659b1ca21a7 100644 +index c298d35d6268b..89cdd261ba37e 100644 --- chrome/chrome_paks.gni +++ chrome/chrome_paks.gni @@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni") @@ -103,7 +103,7 @@ index 1d943a762ccd8..3c659b1ca21a7 100644 sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ] deps += [ "//extensions:extensions_browser_resources" ] diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni -index 4f67dd86c1f26..a0d92db77c6ce 100644 +index adc881122cb9c..cafa71386fad6 100644 --- chrome/chrome_repack_locales.gni +++ chrome/chrome_repack_locales.gni @@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni") @@ -114,7 +114,7 @@ index 4f67dd86c1f26..a0d92db77c6ce 100644 import("//extensions/buildflags/buildflags.gni") import("//tools/grit/repack.gni") -@@ -93,6 +94,10 @@ template("chrome_repack_locales") { +@@ -91,6 +92,10 @@ template("chrome_repack_locales") { [ "${root_gen_dir}/chromeos/strings/chromeos_strings_" ] deps += [ "//chromeos/strings" ] } diff --git a/patch/patches/gritsettings.patch b/patch/patches/gritsettings.patch index 47e672073..533911dac 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 6500444349ead..ee37ee13dc062 100644 +index 01f27f9eb13bd..fdf9ad6b62e9a 100644 --- tools/gritsettings/resource_ids.spec +++ tools/gritsettings/resource_ids.spec -@@ -1026,6 +1026,15 @@ +@@ -1035,6 +1035,15 @@ # END "everything else" section. # Everything but chrome/, components/, content/, and ios/ diff --git a/patch/patches/libxml_visibility.patch b/patch/patches/libxml_visibility.patch index c81cb5540..22b5fb324 100644 --- a/patch/patches/libxml_visibility.patch +++ b/patch/patches/libxml_visibility.patch @@ -1,5 +1,5 @@ diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn -index 03d14f984420c..54dad01160a51 100644 +index c46cf43dba13b..a11069a6b2d82 100644 --- third_party/libxml/BUILD.gn +++ third_party/libxml/BUILD.gn @@ -141,6 +141,7 @@ static_library("libxml") { diff --git a/patch/patches/linux_blink_thread_local.patch b/patch/patches/linux_blink_thread_local.patch index 084c95a1e..b4134f16f 100644 --- a/patch/patches/linux_blink_thread_local.patch +++ b/patch/patches/linux_blink_thread_local.patch @@ -1,5 +1,5 @@ diff --git third_party/blink/renderer/platform/heap/thread_local.h third_party/blink/renderer/platform/heap/thread_local.h -index 744b91e5b0c86..e67f542126ac6 100644 +index 6993877c6c3ad..bf4f1626fa332 100644 --- third_party/blink/renderer/platform/heap/thread_local.h +++ third_party/blink/renderer/platform/heap/thread_local.h @@ -36,7 +36,7 @@ diff --git a/patch/patches/linux_bluetooth_1319006.patch b/patch/patches/linux_bluetooth_1319006.patch index ad4239dda..fae81e3e0 100644 --- a/patch/patches/linux_bluetooth_1319006.patch +++ b/patch/patches/linux_bluetooth_1319006.patch @@ -1,5 +1,5 @@ diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn -index 1ca290c63575e..ea33e05dd41eb 100644 +index facb18d9bc855..77edc67f54653 100644 --- device/bluetooth/BUILD.gn +++ device/bluetooth/BUILD.gn @@ -45,13 +45,6 @@ source_set("deprecated_experimental_mojo") { diff --git a/patch/patches/message_loop.patch b/patch/patches/message_loop.patch index 0032aa7a2..9730f2b37 100644 --- a/patch/patches/message_loop.patch +++ b/patch/patches/message_loop.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc -index 646dcfb16bf03..83a3b61d93d5a 100644 +index 5d6cbbdcab2d8..33a650036e909 100644 --- base/message_loop/message_pump_win.cc +++ base/message_loop/message_pump_win.cc @@ -2,6 +2,7 @@ diff --git a/patch/patches/message_pump_mac_2495.patch b/patch/patches/message_pump_mac_2495.patch index 15b0bd410..5a90c9ce0 100644 --- a/patch/patches/message_pump_mac_2495.patch +++ b/patch/patches/message_pump_mac_2495.patch @@ -1,5 +1,5 @@ diff --git base/message_loop/message_pump_mac.mm base/message_loop/message_pump_mac.mm -index 416ea2f87d9a6..c41d34fa604e6 100644 +index 1beda5f800827..879f4948b6bcd 100644 --- base/message_loop/message_pump_mac.mm +++ base/message_loop/message_pump_mac.mm @@ -813,7 +813,8 @@ void MessagePumpUIApplication::Detach() { diff --git a/patch/patches/mime_handler_view_guest_1565_2727.patch b/patch/patches/mime_handler_view_guest_1565_2727.patch index 328218f03..266e47823 100644 --- a/patch/patches/mime_handler_view_guest_1565_2727.patch +++ b/patch/patches/mime_handler_view_guest_1565_2727.patch @@ -12,18 +12,18 @@ index 031dd5eeaef8e..25c2f0e42e22b 100644 virtual ~WebContentsView() = default; diff --git extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -index 6e0cb46a6b913..2c10a5f9acfb4 100644 +index 98bc3a82d40f8..f2049fb07eb0c 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc -@@ -225,6 +225,8 @@ void MimeHandlerViewGuest::CreateWebContents( +@@ -227,6 +227,8 @@ void MimeHandlerViewGuest::CreateWebContents( WebContents::CreateParams params(browser_context(), guest_site_instance.get()); params.guest_delegate = this; + if (delegate_) + delegate_->OverrideWebContentsCreateParams(¶ms); - // TODO(erikchen): Fix ownership semantics for guest views. - // https://crbug.com/832879. - std::move(callback).Run( + std::move(callback).Run(std::move(owned_this), + WebContents::CreateWithSessionStorage( + params, owner_web_contents() @@ -235,6 +237,10 @@ void MimeHandlerViewGuest::CreateWebContents( } @@ -33,32 +33,35 @@ index 6e0cb46a6b913..2c10a5f9acfb4 100644 + delegate_->OnGuestAttached(); + DCHECK(stream_->handler_url().SchemeIs(extensions::kExtensionScheme)); - web_contents()->GetController().LoadURL( - stream_->handler_url(), content::Referrer(), -@@ -261,6 +267,11 @@ bool MimeHandlerViewGuest::ZoomPropagatesFromEmbedderToGuest() const { - return false; + GetController().LoadURL(stream_->handler_url(), content::Referrer(), + ui::PAGE_TRANSITION_AUTO_TOPLEVEL, std::string()); +@@ -483,6 +489,14 @@ void MimeHandlerViewGuest::DidFinishNavigation( + } } -+void MimeHandlerViewGuest::WillDestroy() { ++void MimeHandlerViewGuest::WebContentsDestroyed() { + if (is_guest_attached_ && delegate_) + delegate_->OnGuestDetached(); ++ ++ // May delete |this|. ++ GuestView::WebContentsDestroyed(); +} + - WebContents* MimeHandlerViewGuest::OpenURLFromTab( - WebContents* source, - const content::OpenURLParams& params) { + void MimeHandlerViewGuest::FuseBeforeUnloadControl( + mojo::PendingReceiver receiver) { + if (!pending_before_unload_control_) 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 33bb494fb68d1..9236cf3fd98bf 100644 +index 06d3ed32b6570..eb85372754783 100644 --- extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h +++ extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h -@@ -142,6 +142,7 @@ class MimeHandlerViewGuest - void DidInitialize(const base::Value::Dict& create_params) final; - void EmbedderFullscreenToggled(bool entered_fullscreen) final; - bool ZoomPropagatesFromEmbedderToGuest() const final; -+ void WillDestroy() override; +@@ -191,6 +191,7 @@ class MimeHandlerViewGuest + void ReadyToCommitNavigation( + content::NavigationHandle* navigation_handle) final; + void DidFinishNavigation(content::NavigationHandle* navigation_handle) final; ++ void WebContentsDestroyed() override; - // WebContentsDelegate implementation. - content::WebContents* OpenURLFromTab( + std::unique_ptr delegate_; + std::unique_ptr stream_; @@ -199,6 +200,7 @@ class MimeHandlerViewGuest content::ChildProcessHost::kInvalidUniqueID, MSG_ROUTING_NONE}; int embedder_widget_routing_id_ = MSG_ROUTING_NONE; diff --git a/patch/patches/net_cookie_flags.patch b/patch/patches/net_cookie_flags.patch index d1750cfc5..c806632e8 100644 --- a/patch/patches/net_cookie_flags.patch +++ b/patch/patches/net_cookie_flags.patch @@ -10,10 +10,10 @@ index 38062cfb9329e..14429ff0ee7eb 100644 +// This load will not send any cookies. For CEF usage. +LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 17) diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc -index 696d21520e076..874954e24bc8c 100644 +index 0a622f7f9948d..8b5c9c7b4d4c5 100644 --- net/url_request/url_request_http_job.cc +++ net/url_request/url_request_http_job.cc -@@ -1734,7 +1734,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { +@@ -1758,7 +1758,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const { // Read cookies whenever allow_credentials() is true, even if the PrivacyMode // is being overridden by NetworkDelegate and will eventually block them, as // blocked cookies still need to be logged in that case. diff --git a/patch/patches/osr_fling_2745.patch b/patch/patches/osr_fling_2745.patch index 41cc9f383..1b867550b 100644 --- a/patch/patches/osr_fling_2745.patch +++ b/patch/patches/osr_fling_2745.patch @@ -41,10 +41,10 @@ index afefe3cd83dee..6668463247644 100644 } // namespace content diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc -index c868b13d8e7f9..ac881b5c85f61 100644 +index 0133090585389..9f619e6577bbd 100644 --- content/browser/renderer_host/render_widget_host_impl.cc +++ content/browser/renderer_host/render_widget_host_impl.cc -@@ -3170,6 +3170,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { +@@ -3175,6 +3175,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() { GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE); } @@ -57,7 +57,7 @@ index c868b13d8e7f9..ac881b5c85f61 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 8c1133a510ef8..6db0e757a8b2d 100644 +index 688c6b226d839..f4b8a63aca530 100644 --- content/browser/renderer_host/render_widget_host_impl.h +++ content/browser/renderer_host/render_widget_host_impl.h @@ -789,6 +789,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl diff --git a/patch/patches/print_preview_123.patch b/patch/patches/print_preview_123.patch index 0306fa19c..adf7e7b7b 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 a4b81c3c8860a..9b20275b4709c 100644 +index 04d7b8ae25192..7da00aa535bea 100644 --- chrome/browser/download/download_prefs.cc +++ chrome/browser/download/download_prefs.cc @@ -24,6 +24,7 @@ @@ -46,7 +46,7 @@ index 37d7f35d314cc..7ddd2f44118bf 100644 #include "chrome/browser/printing/print_view_manager.h" #include "chrome/browser/task_manager/web_contents_tags.h" diff --git chrome/browser/printing/print_view_manager_base.cc chrome/browser/printing/print_view_manager_base.cc -index cbb6c5925c2ae..f4faa42ca0b04 100644 +index d252084bffded..dc49864291c94 100644 --- chrome/browser/printing/print_view_manager_base.cc +++ chrome/browser/printing/print_view_manager_base.cc @@ -599,13 +599,14 @@ void PrintViewManagerBase::UpdatePrintSettings( @@ -104,10 +104,10 @@ index ff180eb75c935..711b51ed039a5 100644 } diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc -index 47e46e16ae625..86ebc3488300f 100644 +index 72ebe05ad7d83..3a780a36d21d1 100644 --- chrome/browser/ui/webui/print_preview/print_preview_ui.cc +++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc -@@ -22,6 +22,7 @@ +@@ -23,6 +23,7 @@ #include "base/values.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -115,7 +115,7 @@ index 47e46e16ae625..86ebc3488300f 100644 #include "chrome/browser/browser_process.h" #include "chrome/browser/pdf/pdf_extension_util.h" #include "chrome/browser/printing/background_printing_manager.h" -@@ -96,6 +97,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; +@@ -98,6 +99,13 @@ const char16_t kBasicPrintShortcut[] = u"\u0028\u21e7\u2318\u0050\u0029"; const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)"; #endif @@ -129,7 +129,7 @@ index 47e46e16ae625..86ebc3488300f 100644 constexpr char kInvalidArgsForDidStartPreview[] = "Invalid arguments for DidStartPreview"; constexpr char kInvalidPageNumberForDidPreviewPage[] = -@@ -324,7 +332,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { +@@ -328,7 +336,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) { source->AddLocalizedStrings(kLocalizedStrings); #if !BUILDFLAG(IS_CHROMEOS) diff --git a/patch/patches/renderer_host_1070713.patch b/patch/patches/renderer_host_1070713.patch index f002128fa..ba9e7e4b6 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 54724fac309f7..e785a620aa9fa 100644 +index 564822b722580..424b6688c2b5b 100644 --- content/browser/renderer_host/render_view_host_impl.cc +++ content/browser/renderer_host/render_view_host_impl.cc -@@ -659,6 +659,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { +@@ -672,6 +672,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const { } void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) { diff --git a/patch/patches/rlz_3934411.patch b/patch/patches/rlz_3934411.patch deleted file mode 100644 index 41467346c..000000000 --- a/patch/patches/rlz_3934411.patch +++ /dev/null @@ -1,15 +0,0 @@ -diff --git rlz/buildflags/buildflags.gni rlz/buildflags/buildflags.gni -index 8090796ea3ec7..acfc599577296 100644 ---- rlz/buildflags/buildflags.gni -+++ rlz/buildflags/buildflags.gni -@@ -9,4 +9,9 @@ import("//build/config/chromeos/ui_mode.gni") - # rlz codes for searches but do not use the library. - enable_rlz_support = is_win || is_apple || is_chromeos_ash - --enable_rlz = is_chrome_branded && enable_rlz_support -+declare_args() { -+ enable_rlz = is_chrome_branded && enable_rlz_support -+} -+ -+assert(!enable_rlz || enable_rlz_support, -+ "RLZ is only supported on Windows, Apple and ChromeOS Ash.") diff --git a/patch/patches/rwh_background_color_1984.patch b/patch/patches/rwh_background_color_1984.patch index fc7886631..27f0c1959 100644 --- a/patch/patches/rwh_background_color_1984.patch +++ b/patch/patches/rwh_background_color_1984.patch @@ -1,5 +1,5 @@ diff --git content/browser/renderer_host/render_widget_host_view_aura.cc content/browser/renderer_host/render_widget_host_view_aura.cc -index 8fe62e794b219..bd83d4bb88ade 100644 +index 8b712a21e7ee1..ba679e81b85ae 100644 --- content/browser/renderer_host/render_widget_host_view_aura.cc +++ content/browser/renderer_host/render_widget_host_view_aura.cc @@ -6,6 +6,7 @@ @@ -10,7 +10,7 @@ index 8fe62e794b219..bd83d4bb88ade 100644 #include #include -@@ -721,10 +722,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { +@@ -723,10 +724,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() { void RenderWidgetHostViewAura::UpdateBackgroundColor() { DCHECK(GetBackgroundColor()); @@ -27,7 +27,7 @@ index 8fe62e794b219..bd83d4bb88ade 100644 } absl::optional RenderWidgetHostViewAura::GetDisplayFeature() { -@@ -2231,6 +2234,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { +@@ -2233,6 +2236,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) { // This needs to happen only after |window_| has been initialized using // Init(), because it needs to have the layer. window_->SetEmbedFrameSinkId(frame_sink_id_); diff --git a/patch/patches/services_network_2622.patch b/patch/patches/services_network_2622.patch index b9b3e6a59..7e2502a9a 100644 --- a/patch/patches/services_network_2622.patch +++ b/patch/patches/services_network_2622.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc -index a41ab3c6e50f0..1dd98219869cf 100644 +index efebd1c7cfc1e..4bd54c05f4adf 100644 --- chrome/browser/net/profile_network_context_service.cc +++ chrome/browser/net/profile_network_context_service.cc @@ -22,6 +22,7 @@ @@ -10,7 +10,7 @@ index a41ab3c6e50f0..1dd98219869cf 100644 #include "chrome/browser/browser_features.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/chrome_content_browser_client.h" -@@ -788,7 +789,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -796,7 +797,19 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( // Configure on-disk storage for non-OTR profiles. OTR profiles just use // default behavior (in memory storage, default sizes). @@ -31,7 +31,7 @@ index a41ab3c6e50f0..1dd98219869cf 100644 PrefService* local_state = g_browser_process->local_state(); // Configure the HTTP cache path and size. base::FilePath base_cache_path; -@@ -801,7 +814,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( +@@ -809,7 +822,9 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal( base_cache_path.Append(chrome::kCacheDirname); network_context_params->http_cache_max_size = local_state->GetInteger(prefs::kDiskCacheSize); @@ -42,17 +42,17 @@ index a41ab3c6e50f0..1dd98219869cf 100644 ::network::mojom::NetworkContextFilePaths::New(); diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc -index 4c79de32e5f01..9ff92cda4dc3c 100644 +index 0a5f457219345..0f611cb2634cd 100644 --- net/cookies/cookie_monster.cc +++ net/cookies/cookie_monster.cc -@@ -549,6 +549,25 @@ void CookieMonster::SetCookieableSchemes( +@@ -548,6 +548,25 @@ void CookieMonster::SetCookieableSchemes( MaybeRunCookieCallback(std::move(callback), true); } +void CookieMonster::AddCookieableSchemes( + const std::vector& schemes, + SetCookieableSchemesCallback callback) { -+ DCHECK(thread_checker_.CalledOnValidThread()); ++ DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); + + // Calls to this method will have no effect if made after a WebView or + // CookieManager instance has been created. @@ -70,12 +70,12 @@ index 4c79de32e5f01..9ff92cda4dc3c 100644 + // This function must be called before the CookieMonster is used. void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) { - DCHECK(thread_checker_.CalledOnValidThread()); + DCHECK_CALLED_ON_VALID_THREAD(thread_checker_); diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h -index 0e48488a03aa5..412f09945878d 100644 +index 227ca621fe05d..82bd37a746652 100644 --- net/cookies/cookie_monster.h +++ net/cookies/cookie_monster.h -@@ -209,6 +209,8 @@ class NET_EXPORT CookieMonster : public CookieStore { +@@ -207,6 +207,8 @@ class NET_EXPORT CookieMonster : public CookieStore { CookieChangeDispatcher& GetChangeDispatcher() override; void SetCookieableSchemes(const std::vector& schemes, SetCookieableSchemesCallback callback) override; @@ -101,10 +101,10 @@ index cf3aac9f8544f..f40de6b160bab 100644 // reset to null. const CookieAccessDelegate* cookie_access_delegate() const { diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc -index 955126eed8968..cda1d55350d1e 100644 +index ac4d26f0bcc4b..0ca4305c9b7f1 100644 --- services/network/cookie_manager.cc +++ services/network/cookie_manager.cc -@@ -387,14 +387,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { +@@ -283,14 +283,9 @@ void CookieManager::FlushCookieStore(FlushCookieStoreCallback callback) { void CookieManager::AllowFileSchemeCookies( bool allow, AllowFileSchemeCookiesCallback callback) { @@ -123,24 +123,22 @@ index 955126eed8968..cda1d55350d1e 100644 void CookieManager::SetForceKeepSessionState() { diff --git services/network/network_context.cc services/network/network_context.cc -index 757059958a1ea..6eeac7e1df7a6 100644 +index a5974ea868cfc..563216e6a29eb 100644 --- services/network/network_context.cc +++ services/network/network_context.cc -@@ -2385,17 +2385,21 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( +@@ -2382,16 +2382,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext( network_service_->network_quality_estimator()); } - if (session_cleanup_cookie_store) { - std::unique_ptr cookie_store = -- std::make_unique( -- session_cleanup_cookie_store.get(), net_log, -- first_party_sets_access_delegate_.is_enabled()); +- std::make_unique(session_cleanup_cookie_store.get(), +- net_log); - if (params_->persist_session_cookies) - cookie_store->SetPersistSessionCookies(true); + std::unique_ptr cookie_store = -+ std::make_unique( -+ session_cleanup_cookie_store.get(), net_log, -+ first_party_sets_access_delegate_.is_enabled()); ++ std::make_unique(session_cleanup_cookie_store.get(), ++ net_log); + if (session_cleanup_cookie_store && params_->persist_session_cookies) + cookie_store->SetPersistSessionCookies(true); @@ -157,7 +155,7 @@ index 757059958a1ea..6eeac7e1df7a6 100644 trust_token_store_ = std::make_unique(); diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom -index ecb6f95f694c0..7a567de87c2b1 100644 +index 88e964da0580c..bb5dc7f0bc22e 100644 --- services/network/public/mojom/network_context.mojom +++ services/network/public/mojom/network_context.mojom @@ -341,6 +341,9 @@ struct NetworkContextParams { diff --git a/patch/patches/services_network_2718.patch b/patch/patches/services_network_2718.patch index 9072297bc..b765c5b0b 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 ac917a5bdcdf2..e0b2fa64cb158 100644 +index fe77d59121ff3..c4caf0ff2b0f3 100644 --- content/browser/storage_partition_impl.cc +++ content/browser/storage_partition_impl.cc -@@ -490,10 +490,6 @@ class LoginHandlerDelegate { +@@ -491,10 +491,6 @@ class LoginHandlerDelegate { } WebContents* web_contents = web_contents_getter_.Run(); @@ -13,7 +13,7 @@ index ac917a5bdcdf2..e0b2fa64cb158 100644 // WeakPtr is not strictly necessary here due to OnRequestCancelled. creating_login_delegate_ = true; -@@ -545,12 +541,6 @@ void OnAuthRequiredContinuation( +@@ -546,12 +542,6 @@ void OnAuthRequiredContinuation( mojo::PendingRemote auth_challenge_responder, base::RepeatingCallback web_contents_getter) { @@ -26,7 +26,7 @@ index ac917a5bdcdf2..e0b2fa64cb158 100644 new LoginHandlerDelegate( std::move(auth_challenge_responder), std::move(web_contents_getter), auth_info, is_request_for_primary_main_frame, process_id, request_id, url, -@@ -2859,8 +2849,12 @@ void StoragePartitionImpl::GetQuotaSettings( +@@ -2947,8 +2937,12 @@ void StoragePartitionImpl::GetQuotaSettings( return; } @@ -40,7 +40,7 @@ index ac917a5bdcdf2..e0b2fa64cb158 100644 storage::GetDefaultDeviceInfoHelper(), std::move(callback)); } -@@ -2870,9 +2864,12 @@ void StoragePartitionImpl::InitNetworkContext() { +@@ -2958,9 +2952,12 @@ void StoragePartitionImpl::InitNetworkContext() { cert_verifier::mojom::CertVerifierCreationParamsPtr cert_verifier_creation_params = cert_verifier::mojom::CertVerifierCreationParams::New(); diff --git a/patch/patches/storage_incognito_2289.patch b/patch/patches/storage_incognito_2289.patch index dad95b923..3a42c6fd7 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 ae376f6ed4352..98f39fd468961 100644 +index 133e047583c26..8e5667420f7fc 100644 --- content/browser/blob_storage/chrome_blob_storage_context.cc +++ content/browser/blob_storage/chrome_blob_storage_context.cc -@@ -115,7 +115,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( +@@ -122,7 +122,8 @@ ChromeBlobStorageContext* ChromeBlobStorageContext::GetFor( // If we're not incognito mode, schedule all of our file tasks to enable // disk on the storage context. @@ -13,7 +13,7 @@ index ae376f6ed4352..98f39fd468961 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 a0caa162ffd0b..e83dd75aca7ae 100644 +index db928f54e1901..d05c8b8dd8c58 100644 --- content/browser/browser_context.cc +++ content/browser/browser_context.cc @@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition( diff --git a/patch/patches/trace_event.patch b/patch/patches/trace_event.patch index 0b640ff96..8b252fbde 100644 --- a/patch/patches/trace_event.patch +++ b/patch/patches/trace_event.patch @@ -1,8 +1,8 @@ diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h -index 2f361c5d9e208..e5fd46b61fc64 100644 +index cfa800eb9fc77..22c99788f05c3 100644 --- base/trace_event/builtin_categories.h +++ base/trace_event/builtin_categories.h -@@ -63,6 +63,8 @@ +@@ -64,6 +64,8 @@ X("cc") \ X("cc.debug") \ X("cdp.perf") \ diff --git a/patch/patches/views_1749_2102_3330.patch b/patch/patches/views_1749_2102_3330.patch index acc6e535c..4cbda9394 100644 --- a/patch/patches/views_1749_2102_3330.patch +++ b/patch/patches/views_1749_2102_3330.patch @@ -150,7 +150,7 @@ index 4004c670ba7f6..5d7062efed7c2 100644 ImageView* image() const { return image_; } Label* label() const { return label_; } diff --git ui/views/controls/label.cc ui/views/controls/label.cc -index d7bbcd9496f13..f5a6ac2e40397 100644 +index 7869347fa1408..a5464bde376b7 100644 --- ui/views/controls/label.cc +++ ui/views/controls/label.cc @@ -52,12 +52,29 @@ enum LabelPropertyKey { @@ -183,7 +183,7 @@ index d7bbcd9496f13..f5a6ac2e40397 100644 } // namespace namespace views { -@@ -443,6 +460,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { +@@ -445,6 +462,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) { OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged); } @@ -199,7 +199,7 @@ index d7bbcd9496f13..f5a6ac2e40397 100644 std::u16string Label::GetTooltipText() const { return tooltip_text_; } -@@ -747,6 +773,16 @@ std::unique_ptr Label::CreateRenderText() const { +@@ -749,6 +775,16 @@ std::unique_ptr Label::CreateRenderText() const { render_text->SelectRange(stored_selection_range_); } @@ -217,7 +217,7 @@ index d7bbcd9496f13..f5a6ac2e40397 100644 } diff --git ui/views/controls/label.h ui/views/controls/label.h -index b856a1cb83b4f..9551454399d8a 100644 +index 5d945cc819055..c11ebddb6bb49 100644 --- ui/views/controls/label.h +++ ui/views/controls/label.h @@ -236,6 +236,10 @@ class VIEWS_EXPORT Label : public View, @@ -231,7 +231,7 @@ index b856a1cb83b4f..9551454399d8a 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 -@@ -495,6 +499,7 @@ class VIEWS_EXPORT Label : public View, +@@ -496,6 +500,7 @@ class VIEWS_EXPORT Label : public View, int max_width_ = 0; // This is used in single-line mode. int max_width_single_line_ = 0; @@ -240,10 +240,10 @@ index b856a1cb83b4f..9551454399d8a 100644 std::unique_ptr selection_controller_; diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc -index 9202c2a1fa6d1..956cb370882a7 100644 +index 59b96ef7a5730..9effa5344d98c 100644 --- ui/views/controls/menu/menu_controller.cc +++ ui/views/controls/menu/menu_controller.cc -@@ -474,7 +474,8 @@ void MenuController::Run(Widget* parent, +@@ -475,7 +475,8 @@ void MenuController::Run(Widget* parent, MenuAnchorPosition position, bool context_menu, bool is_nested_drag, @@ -253,7 +253,7 @@ index 9202c2a1fa6d1..956cb370882a7 100644 exit_type_ = ExitType::kNone; possible_drag_ = false; drag_in_progress_ = false; -@@ -521,6 +522,7 @@ void MenuController::Run(Widget* parent, +@@ -522,6 +523,7 @@ void MenuController::Run(Widget* parent, owner_->AddObserver(this); native_view_for_gestures_ = native_view_for_gestures; @@ -261,7 +261,7 @@ index 9202c2a1fa6d1..956cb370882a7 100644 // Only create a MenuPreTargetHandler for non-nested menus. Nested menus // will use the existing one. -@@ -2198,6 +2200,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { +@@ -2203,6 +2205,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) { params.do_capture = do_capture; params.native_view_for_gestures = native_view_for_gestures_; params.owned_window_anchor = anchor; @@ -269,7 +269,7 @@ index 9202c2a1fa6d1..956cb370882a7 100644 if (item->GetParentMenuItem()) { params.context = state_.item->GetWidget(); -@@ -2884,8 +2887,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( +@@ -2889,8 +2892,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem( void MenuController::OpenSubmenuChangeSelectionIfCan() { MenuItemView* item = pending_state_.item; @@ -284,7 +284,7 @@ index 9202c2a1fa6d1..956cb370882a7 100644 MenuItemView* to_select = nullptr; if (!item->GetSubmenu()->GetMenuItems().empty()) to_select = FindInitialSelectableMenuItem(item, INCREMENT_SELECTION_DOWN); -@@ -2904,8 +2912,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { +@@ -2909,8 +2917,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() { void MenuController::CloseSubmenu() { MenuItemView* item = state_.item; DCHECK(item); @@ -297,7 +297,7 @@ index 9202c2a1fa6d1..956cb370882a7 100644 SetSelection(item, SELECTION_UPDATE_IMMEDIATELY); else if (item->GetParentMenuItem()->GetParentMenuItem()) diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h -index da5848241cb5b..05a7f9f0e4932 100644 +index b39ff8c3ae2d4..402aa6d7237c1 100644 --- ui/views/controls/menu/menu_controller.h +++ ui/views/controls/menu/menu_controller.h @@ -105,7 +105,9 @@ class VIEWS_EXPORT MenuController @@ -311,7 +311,7 @@ index da5848241cb5b..05a7f9f0e4932 100644 bool for_drop() const { return for_drop_; } -@@ -711,6 +713,8 @@ class VIEWS_EXPORT MenuController +@@ -717,6 +719,8 @@ class VIEWS_EXPORT MenuController // RunType::SEND_GESTURE_EVENTS_TO_OWNER is set. gfx::NativeView native_view_for_gestures_ = nullptr; @@ -383,10 +383,10 @@ index 693ef7fa66575..c3a1e70e8ea72 100644 #if BUILDFLAG(IS_WIN) diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h -index ff34179c3b7fe..3d257e06e3fbb 100644 +index a1c6d8f0aa889..06d445b478d3d 100644 --- ui/views/controls/menu/menu_host.h +++ ui/views/controls/menu/menu_host.h -@@ -54,6 +54,8 @@ class MenuHost : public Widget, public WidgetObserver { +@@ -55,6 +55,8 @@ class MenuHost : public Widget, public WidgetObserver { // Additional information that helps to position anchored windows in such // backends as Wayland. ui::OwnedWindowAnchor owned_window_anchor; @@ -693,10 +693,10 @@ index 5246bbf6f143b..d722e2a014ea2 100644 // Hides and cancels the menu. virtual void Cancel() = 0; diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc -index 5f5da1f46e59b..38b0a525a8652 100644 +index fd2cf17bd9088..6a2979d8bccf9 100644 --- ui/views/controls/menu/menu_scroll_view_container.cc +++ ui/views/controls/menu/menu_scroll_view_container.cc -@@ -259,6 +259,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) +@@ -263,6 +263,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view) scroll_down_button_ = background_view_->AddChildView( std::make_unique(content_view, false)); @@ -709,10 +709,10 @@ index 5f5da1f46e59b..38b0a525a8652 100644 content_view_->GetMenuItem()->GetMenuController()->GetAnchorPosition()); diff --git ui/views/test/ui_controls_factory_desktop_aura_ozone.cc ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -index 3be783bf139be..ccbd77c2a2797 100644 +index 4a6cde118cc86..0e8dafff6103a 100644 --- ui/views/test/ui_controls_factory_desktop_aura_ozone.cc +++ ui/views/test/ui_controls_factory_desktop_aura_ozone.cc -@@ -16,6 +16,7 @@ +@@ -17,6 +17,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "build/build_config.h" #include "build/chromeos_buildflags.h" @@ -720,7 +720,7 @@ index 3be783bf139be..ccbd77c2a2797 100644 #include "ui/aura/client/screen_position_client.h" #include "ui/aura/env.h" #include "ui/aura/test/aura_test_utils.h" -@@ -100,9 +101,11 @@ class UIControlsDesktopOzone : public UIControlsAura { +@@ -101,9 +102,11 @@ class UIControlsDesktopOzone : public UIControlsAura { aura::test::QueryLatestMousePositionRequestInHost(host); host->ConvertPixelsToDIP(&root_current_location); @@ -733,10 +733,10 @@ index 3be783bf139be..ccbd77c2a2797 100644 bool moved_cursor = false; #if !BUILDFLAG(IS_CHROMEOS_LACROS) diff --git ui/views/view.h ui/views/view.h -index 5546d26fc701c..2a9797943b9f2 100644 +index 32ee6dda68889..98d127b6847a1 100644 --- ui/views/view.h +++ ui/views/view.h -@@ -22,6 +22,7 @@ +@@ -21,6 +21,7 @@ #include "base/memory/raw_ptr.h" #include "base/observer_list.h" #include "base/strings/string_piece.h" @@ -744,7 +744,7 @@ index 5546d26fc701c..2a9797943b9f2 100644 #include "build/build_config.h" #include "third_party/abseil-cpp/absl/types/optional.h" #include "third_party/skia/include/core/SkPath.h" -@@ -272,7 +273,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, +@@ -271,7 +272,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate, public ui::EventTarget, public ui::EventHandler, public ui::PropertyHandler, diff --git a/patch/patches/views_widget.patch b/patch/patches/views_widget.patch index e1bad099f..b9dda5291 100644 --- a/patch/patches/views_widget.patch +++ b/patch/patches/views_widget.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 8500ee5f439c3..7fde560103ec2 100644 +index b0c9044e9978f..13191e2d38387 100644 --- content/browser/renderer_host/render_widget_host_view_base.cc +++ content/browser/renderer_host/render_widget_host_view_base.cc -@@ -662,6 +662,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { +@@ -663,6 +663,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const { return scale_override_for_capture_; } @@ -18,7 +18,7 @@ index 8500ee5f439c3..7fde560103ec2 100644 if (!GetMouseWheelPhaseHandler()) return; diff --git content/browser/renderer_host/render_widget_host_view_base.h content/browser/renderer_host/render_widget_host_view_base.h -index 129bb651df425..f9ee144e84083 100644 +index 467eaa32808b3..58aa91e172af3 100644 --- content/browser/renderer_host/render_widget_host_view_base.h +++ content/browser/renderer_host/render_widget_host_view_base.h @@ -68,6 +68,7 @@ class CursorManager; @@ -37,7 +37,7 @@ index 129bb651df425..f9ee144e84083 100644 + bool HasExternalParent() const override; TouchSelectionControllerClientManager* GetTouchSelectionControllerClientManager() override; - bool ShouldVirtualKeyboardOverlayContent() override; + ui::mojom::VirtualKeyboardMode GetVirtualKeyboardMode() override; @@ -176,6 +179,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView { // Called when screen information or native widget bounds change. virtual void UpdateScreenInfo(); @@ -133,10 +133,10 @@ index fe52808643114..58197f52e19e5 100644 if (host_ && set_focus_on_mouse_down_or_key_event_) { set_focus_on_mouse_down_or_key_event_ = false; diff --git content/public/browser/render_widget_host_view.h content/public/browser/render_widget_host_view.h -index 2e0bffa928f82..d1787b29f3762 100644 +index 5342397d0a2e8..3b3878a714e56 100644 --- content/public/browser/render_widget_host_view.h +++ content/public/browser/render_widget_host_view.h -@@ -257,6 +257,14 @@ class CONTENT_EXPORT RenderWidgetHostView { +@@ -258,6 +258,14 @@ class CONTENT_EXPORT RenderWidgetHostView { // This must always return the same device scale factor as GetScreenInfo. virtual float GetDeviceScaleFactor() const = 0; @@ -152,10 +152,10 @@ index 2e0bffa928f82..d1787b29f3762 100644 // Set the view's active state (i.e., tint state of controls). virtual void SetActive(bool active) = 0; diff --git ui/ozone/platform/x11/x11_window.cc ui/ozone/platform/x11/x11_window.cc -index d59b6c8f3fc58..c5597c901150d 100644 +index 45e0a75a643c2..af8dcb682d9d8 100644 --- ui/ozone/platform/x11/x11_window.cc +++ ui/ozone/platform/x11/x11_window.cc -@@ -1775,7 +1775,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { +@@ -1789,7 +1789,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) { req.border_pixel = 0; bounds_in_pixels_ = SanitizeBounds(bounds); @@ -179,10 +179,10 @@ index 4d15a5c0937e6..9db89f2ac8d91 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 b130d165f109b..b53cd077c8d7f 100644 +index 19e84689c878f..a8943c34699c5 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc -@@ -164,6 +164,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( +@@ -165,6 +165,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop( return result; } @@ -201,7 +201,7 @@ index b130d165f109b..b53cd077c8d7f 100644 void DesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) { // In Windows, the native events sent to chrome are separated into client // and non-client versions of events, which we record on our LocatedEvent -@@ -286,6 +298,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( +@@ -288,6 +300,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties( properties->wayland_app_id = params.wayland_app_id; @@ -243,10 +243,10 @@ index 01d4ffe408a84..fbe41fefbb2bd 100644 base::WeakPtrFactory weak_factory_{this}; }; diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -index a07e0668f7a82..00a9ffef2e800 100644 +index 774a2d23a87a6..88769ad800d22 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc -@@ -272,8 +272,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { +@@ -273,8 +273,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) { if (properties.parent_widget) { window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget( properties.parent_widget); @@ -258,10 +258,10 @@ index a07e0668f7a82..00a9ffef2e800 100644 // Calculate initial bounds. diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -index 9541251b0f38d..307b0c80db6d1 100644 +index 0d5595767664e..dc9162d3c6eb3 100644 --- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc +++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc -@@ -182,8 +182,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { +@@ -183,8 +183,12 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) { native_widget_delegate_); HWND parent_hwnd = nullptr; @@ -275,7 +275,7 @@ index 9541251b0f38d..307b0c80db6d1 100644 remove_standard_frame_ = params.remove_standard_frame; has_non_client_view_ = Widget::RequiresNonClientView(params.type); -@@ -1025,11 +1029,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { +@@ -1033,11 +1037,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() { } void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) { @@ -293,7 +293,7 @@ index 9541251b0f38d..307b0c80db6d1 100644 } bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { -@@ -1037,6 +1045,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { +@@ -1045,6 +1053,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) { if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents()) return true; @@ -322,10 +322,10 @@ index cec35ceb25477..6eab66d5676b5 100644 // a reference. raw_ptr tooltip_; diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc -index 94c283fbe4f46..10eacde8e3eaf 100644 +index 8e2d4979b8a31..d7cf97b77d267 100644 --- ui/views/widget/widget.cc +++ ui/views/widget/widget.cc -@@ -341,7 +341,8 @@ void Widget::Init(InitParams params) { +@@ -344,7 +344,8 @@ void Widget::Init(InitParams params) { } params.child |= (params.type == InitParams::TYPE_CONTROL); @@ -335,7 +335,7 @@ index 94c283fbe4f46..10eacde8e3eaf 100644 if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred && params.type != views::Widget::InitParams::TYPE_WINDOW) { -@@ -427,13 +428,21 @@ void Widget::Init(InitParams params) { +@@ -430,13 +431,21 @@ void Widget::Init(InitParams params) { if (show_state == ui::SHOW_STATE_MAXIMIZED) { Maximize(); @@ -358,7 +358,7 @@ index 94c283fbe4f46..10eacde8e3eaf 100644 } if (base::FeatureList::IsEnabled(features::kWidgetLayering)) { -@@ -1469,10 +1478,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { +@@ -1480,10 +1489,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) { } gfx::Size Widget::GetMinimumSize() const { @@ -376,7 +376,7 @@ index 94c283fbe4f46..10eacde8e3eaf 100644 } diff --git ui/views/widget/widget.h ui/views/widget/widget.h -index 35622dd9234d2..82273a6a1a1d1 100644 +index 04135ed11fa00..cfc074bad31dd 100644 --- ui/views/widget/widget.h +++ ui/views/widget/widget.h @@ -345,6 +345,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate, @@ -418,10 +418,10 @@ index d24c447bb8030..29215d6578169 100644 if (native_widget_delegate->IsDialogBox()) { *style |= DS_MODALFRAME; diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc -index db731ec8ab093..f63db294d8480 100644 +index ec39cb0d15c80..1bafc2fd817e5 100644 --- ui/views/win/hwnd_message_handler.cc +++ ui/views/win/hwnd_message_handler.cc -@@ -826,7 +826,11 @@ bool HWNDMessageHandler::IsVisible() const { +@@ -827,7 +827,11 @@ bool HWNDMessageHandler::IsVisible() const { } bool HWNDMessageHandler::IsActive() const { diff --git a/patch/patches/viz_osr_2575.patch b/patch/patches/viz_osr_2575.patch index d8cf58e94..4b9597b11 100644 --- a/patch/patches/viz_osr_2575.patch +++ b/patch/patches/viz_osr_2575.patch @@ -80,10 +80,10 @@ index 8af69cac78b74..9f74e511c263d 100644 private: const HWND hwnd_; diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn -index f2c661fb373a3..7d7ed9f97f2ce 100644 +index f8ceaa5f44852..6010dfe943bde 100644 --- components/viz/service/BUILD.gn +++ components/viz/service/BUILD.gn -@@ -219,6 +219,8 @@ viz_component("service") { +@@ -220,6 +220,8 @@ viz_component("service") { "transitions/transferable_resource_tracker.cc", "transitions/transferable_resource_tracker.h", "viz_service_export.h", @@ -150,10 +150,10 @@ index aedc4d24d3fb3..442d2e4204b93 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 47f54d2f0a30c..aa7885347ab02 100644 +index 4c5bf12286fbc..8067b12a373d4 100644 --- content/browser/compositor/viz_process_transport_factory.cc +++ content/browser/compositor/viz_process_transport_factory.cc -@@ -384,8 +384,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( +@@ -388,8 +388,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel( mojo::AssociatedRemote display_private; root_params->display_private = display_private.BindNewEndpointAndPassReceiver(); @@ -222,7 +222,7 @@ index 2f462f0deb5fc..695869b83cefa 100644 + Draw(gfx.mojom.Rect damage_rect) => (); }; diff --git ui/compositor/compositor.h ui/compositor/compositor.h -index f80dce5bcef9f..c24176696305e 100644 +index ad691e760c31c..7533b409c22e5 100644 --- ui/compositor/compositor.h +++ ui/compositor/compositor.h @@ -31,7 +31,9 @@ @@ -260,7 +260,7 @@ index f80dce5bcef9f..c24176696305e 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 -@@ -483,6 +496,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, +@@ -486,6 +499,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver, std::unique_ptr pending_begin_frame_args_; diff --git a/patch/patches/web_contents_1257_1565.patch b/patch/patches/web_contents_1257_1565.patch index d1337d9ca..aeb686bac 100644 --- a/patch/patches/web_contents_1257_1565.patch +++ b/patch/patches/web_contents_1257_1565.patch @@ -1,5 +1,5 @@ diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc -index 536bbd4cf825c..87aa33a115b7e 100644 +index 04bd45199b0db..f55241b38fc7b 100644 --- content/browser/web_contents/web_contents_impl.cc +++ content/browser/web_contents/web_contents_impl.cc @@ -3082,6 +3082,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params, @@ -49,7 +49,7 @@ index 536bbd4cf825c..87aa33a115b7e 100644 std::unique_ptr new_contents; if (!is_guest) { create_params.context = view_->GetNativeView(); -@@ -7871,6 +7890,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, +@@ -7879,6 +7898,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node, // frames). SetFocusedFrameTree(node->frame_tree()); } @@ -60,7 +60,7 @@ index 536bbd4cf825c..87aa33a115b7e 100644 void WebContentsImpl::DidCallFocus() { diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h -index c5e2f70696e93..fd9000dd087d5 100644 +index aea5078136b95..3371a5ee23330 100644 --- content/public/browser/web_contents.h +++ content/public/browser/web_contents.h @@ -95,10 +95,12 @@ class BrowserContext; @@ -88,7 +88,7 @@ index c5e2f70696e93..fd9000dd087d5 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 89c14ce2d9700..fdb71d8fe4b0e 100644 +index 7119f2fe8397a..12d493533075a 100644 --- content/public/browser/web_contents_delegate.h +++ content/public/browser/web_contents_delegate.h @@ -58,9 +58,11 @@ class EyeDropperListener; @@ -119,10 +119,10 @@ index 89c14ce2d9700..fdb71d8fe4b0e 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 01f8b94f08e99..c8cc74bad6411 100644 +index b6e021165de91..336cbe3a96ddf 100644 --- content/public/browser/web_contents_observer.h +++ content/public/browser/web_contents_observer.h -@@ -215,6 +215,9 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -219,6 +219,9 @@ class CONTENT_EXPORT WebContentsObserver { virtual void OnCaptureHandleConfigUpdate( const blink::mojom::CaptureHandleConfig& config) {} @@ -132,7 +132,7 @@ index 01f8b94f08e99..c8cc74bad6411 100644 // This method is invoked when the `blink::WebView` of the current // RenderViewHost is ready, e.g. because we recreated it after a crash. virtual void RenderViewReady() {} -@@ -791,6 +794,10 @@ class CONTENT_EXPORT WebContentsObserver { +@@ -802,6 +805,10 @@ class CONTENT_EXPORT WebContentsObserver { // WebContents has gained/lost focus. virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {} diff --git a/patch/patches/webkit_plugin_info_2015.patch b/patch/patches/webkit_plugin_info_2015.patch index 9122211c7..a62b48317 100644 --- a/patch/patches/webkit_plugin_info_2015.patch +++ b/patch/patches/webkit_plugin_info_2015.patch @@ -1,8 +1,8 @@ diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h -index 18008b93d9066..a9775e0153fbe 100644 +index bb82952036825..c828b70c4b889 100644 --- third_party/blink/public/platform/platform.h +++ third_party/blink/public/platform/platform.h -@@ -763,6 +763,11 @@ class BLINK_PLATFORM_EXPORT Platform { +@@ -772,6 +772,11 @@ class BLINK_PLATFORM_EXPORT Platform { const WebURL& url, blink::WebVector* csp) {} @@ -15,7 +15,7 @@ index 18008b93d9066..a9775e0153fbe 100644 static void InitializeMainThreadCommon( Platform* platform, diff --git third_party/blink/renderer/core/inspector/devtools_session.cc third_party/blink/renderer/core/inspector/devtools_session.cc -index 53bac961859ad..ee55382ce2641 100644 +index d9274f6ccb882..548ed543b880e 100644 --- third_party/blink/renderer/core/inspector/devtools_session.cc +++ third_party/blink/renderer/core/inspector/devtools_session.cc @@ -8,6 +8,7 @@ diff --git a/patch/patches/webkit_popups.patch b/patch/patches/webkit_popups.patch index eeec5197d..abc858ba5 100644 --- a/patch/patches/webkit_popups.patch +++ b/patch/patches/webkit_popups.patch @@ -11,10 +11,10 @@ index f3b681ec44c57..f6fdbc0312fe0 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 b2fede3c231cd..736e1fd7f8a00 100644 +index 33cd38a8e24a2..a9206c121d0ea 100644 --- third_party/blink/renderer/core/exported/web_view_impl.cc +++ third_party/blink/renderer/core/exported/web_view_impl.cc -@@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { +@@ -249,8 +249,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) { g_should_use_external_popup_menus = use_external_popup_menus; } @@ -30,7 +30,7 @@ index b2fede3c231cd..736e1fd7f8a00 100644 } namespace { -@@ -561,6 +566,7 @@ WebViewImpl::WebViewImpl( +@@ -564,6 +569,7 @@ WebViewImpl::WebViewImpl( chrome_client_(MakeGarbageCollected(this)), minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)), maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)), @@ -39,10 +39,10 @@ index b2fede3c231cd..736e1fd7f8a00 100644 fullscreen_controller_(std::make_unique(this)), page_base_background_color_( diff --git third_party/blink/renderer/core/exported/web_view_impl.h third_party/blink/renderer/core/exported/web_view_impl.h -index 49da24df2b013..6de6a098b2713 100644 +index ac38111515f40..456718de6364a 100644 --- third_party/blink/renderer/core/exported/web_view_impl.h +++ third_party/blink/renderer/core/exported/web_view_impl.h -@@ -133,7 +133,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -134,7 +134,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, static HashSet& AllInstances(); // Returns true if popup menus should be rendered by the browser, false if // they should be rendered by WebKit (which is the default). @@ -52,7 +52,7 @@ index 49da24df2b013..6de6a098b2713 100644 // Returns whether frames under this WebView are backed by a compositor. bool does_composite() const { return does_composite_; } -@@ -819,6 +820,8 @@ class CORE_EXPORT WebViewImpl final : public WebView, +@@ -823,6 +824,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 49da24df2b013..6de6a098b2713 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 228d7777a4ae4..39243a45311b9 100644 +index 5a1b86b62db11..deb01890a0d0a 100644 --- third_party/blink/renderer/core/page/chrome_client_impl.cc +++ third_party/blink/renderer/core/page/chrome_client_impl.cc -@@ -915,7 +915,7 @@ bool ChromeClientImpl::HasOpenedPopup() const { +@@ -930,7 +930,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 70884cee7..cbb6bbdf2 100644 --- a/patch/patches/webui_2037.patch +++ b/patch/patches/webui_2037.patch @@ -1,5 +1,5 @@ diff --git chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc -index 53dec4e257c45..e1f4776ff2b04 100644 +index cc28ba2a60c35..cc4848f2324c2 100644 --- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc +++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc @@ -10,6 +10,7 @@ diff --git a/patch/patches/win_sandbox_3210.patch b/patch/patches/win_sandbox_3210.patch index 1805877cf..b758b761c 100644 --- a/patch/patches/win_sandbox_3210.patch +++ b/patch/patches/win_sandbox_3210.patch @@ -1,8 +1,8 @@ diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc -index 5f2860593bfbe..e5f1e5bf9e7a2 100644 +index 2191f51de17cf..4c46aeea4d8bb 100644 --- sandbox/policy/win/sandbox_win.cc +++ sandbox/policy/win/sandbox_win.cc -@@ -1136,6 +1136,13 @@ ResultCode SandboxWin::StartSandboxedProcess( +@@ -1135,6 +1135,13 @@ ResultCode SandboxWin::StartSandboxedProcess( const base::HandlesToInheritVector& handles_to_inherit, SandboxDelegate* delegate, base::Process* process) { diff --git a/tests/ceftests/permission_prompt_unittest.cc b/tests/ceftests/permission_prompt_unittest.cc index 593012445..6cd1acabf 100644 --- a/tests/ceftests/permission_prompt_unittest.cc +++ b/tests/ceftests/permission_prompt_unittest.cc @@ -117,7 +117,7 @@ class PermissionPromptTestHandler : public TestHandler, "}" "function makeRequest() {"; - if (request_ == CEF_PERMISSION_TYPE_WINDOW_PLACEMENT) { + if (request_ == CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT) { page += " window.getScreenDetails().then(function(details) {" " onResult(`SUCCESS`, {got_data: details.screens.length > 0});" @@ -301,13 +301,13 @@ class PermissionPromptTestHandler : public TestHandler, } // namespace // Window placement permission requests. -TEST(PermissionPromptTest, WindowPlacementReturningFalse) { +TEST(PermissionPromptTest, WindowManagementReturningFalse) { TestSetup test_setup; test_setup.deny_implicitly = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_IGNORE); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -318,13 +318,13 @@ TEST(PermissionPromptTest, WindowPlacementReturningFalse) { EXPECT_FALSE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementNoGesture) { +TEST(PermissionPromptTest, WindowManagementNoGesture) { TestSetup test_setup; test_setup.deny_no_gesture = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_IGNORE); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -338,13 +338,13 @@ TEST(PermissionPromptTest, WindowPlacementNoGesture) { EXPECT_FALSE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementNoContinue) { +TEST(PermissionPromptTest, WindowManagementNoContinue) { TestSetup test_setup; test_setup.deny_with_navigation = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_IGNORE); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -354,12 +354,12 @@ TEST(PermissionPromptTest, WindowPlacementNoContinue) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultAccept) { +TEST(PermissionPromptTest, WindowManagementResultAccept) { TestSetup test_setup; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_ACCEPT); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -370,13 +370,13 @@ TEST(PermissionPromptTest, WindowPlacementResultAccept) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultAcceptAsync) { +TEST(PermissionPromptTest, WindowManagementResultAcceptAsync) { TestSetup test_setup; test_setup.continue_async = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_ACCEPT); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -387,12 +387,12 @@ TEST(PermissionPromptTest, WindowPlacementResultAcceptAsync) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultDeny) { +TEST(PermissionPromptTest, WindowManagementResultDeny) { TestSetup test_setup; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_DENY); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -404,13 +404,13 @@ TEST(PermissionPromptTest, WindowPlacementResultDeny) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultDenyAsync) { +TEST(PermissionPromptTest, WindowManagementResultDenyAsync) { TestSetup test_setup; test_setup.continue_async = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_DENY); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -422,12 +422,12 @@ TEST(PermissionPromptTest, WindowPlacementResultDenyAsync) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultDismiss) { +TEST(PermissionPromptTest, WindowManagementResultDismiss) { TestSetup test_setup; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_DISMISS); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -439,13 +439,13 @@ TEST(PermissionPromptTest, WindowPlacementResultDismiss) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultDismissAsync) { +TEST(PermissionPromptTest, WindowManagementResultDismissAsync) { TestSetup test_setup; test_setup.continue_async = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_DISMISS); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -457,12 +457,12 @@ TEST(PermissionPromptTest, WindowPlacementResultDismissAsync) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultIgnore) { +TEST(PermissionPromptTest, WindowManagementResultIgnore) { TestSetup test_setup; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_IGNORE); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler); @@ -474,13 +474,13 @@ TEST(PermissionPromptTest, WindowPlacementResultIgnore) { EXPECT_TRUE(test_setup.got_dismiss); } -TEST(PermissionPromptTest, WindowPlacementResultIgnoreAsync) { +TEST(PermissionPromptTest, WindowManagementResultIgnoreAsync) { TestSetup test_setup; test_setup.continue_async = true; CefRefPtr handler = new PermissionPromptTestHandler(&test_setup, - CEF_PERMISSION_TYPE_WINDOW_PLACEMENT, + CEF_PERMISSION_TYPE_WINDOW_MANAGEMENT, CEF_PERMISSION_RESULT_IGNORE); handler->ExecuteTest(); ReleaseAndWaitForDestructor(handler);