Update to Chromium version 122.0.6261.0 (#1250580)

Frame identifiers have changed from int64_t to string type. This is due
to https://crbug.com/1502660 which removes access to frame routing IDs
in the renderer process. New cross-process frame identifiers are 160-bit
values (32-bit child process ID + 128-bit local frame token) and most
easily represented as strings. All other frame-related expectations and
behaviors remain the same.
This commit is contained in:
Marshall Greenblatt
2024-01-25 21:12:43 -05:00
parent 2a86a02bdd
commit 2f1e782f62
156 changed files with 1452 additions and 1436 deletions

View File

@@ -1,13 +0,0 @@
diff --git base/allocator/partition_allocator/src/partition_alloc/thread_cache.h base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
index 381245c374382..c98aed1663517 100644
--- base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
+++ base/allocator/partition_allocator/src/partition_alloc/thread_cache.h
@@ -184,7 +184,7 @@ class PA_COMPONENT_EXPORT(PARTITION_ALLOC) ThreadCacheRegistry {
internal::base::TimeDelta periodic_purge_next_interval_;
bool is_purging_configured_ = false;
- uint8_t largest_active_bucket_index_ = internal::BucketIndexLookup::GetIndex(
+ uint16_t largest_active_bucket_index_ = internal::BucketIndexLookup::GetIndex(
ThreadCacheLimits::kDefaultSizeThreshold);
};

View File

@@ -1,8 +1,8 @@
diff --git base/command_line.cc base/command_line.cc
index d762b168a9ccf..f58b4f783df16 100644
index 69e4303165259..682e8d2bfa6ce 100644
--- base/command_line.cc
+++ base/command_line.cc
@@ -346,11 +346,10 @@ void CommandLine::AppendSwitchNative(StringPiece switch_string,
@@ -355,11 +355,10 @@ void CommandLine::AppendSwitchNative(StringPiece switch_string,
#if BUILDFLAG(ENABLE_COMMANDLINE_SEQUENCE_CHECKS)
sequence_checker_.Check();
#endif

View File

@@ -1,16 +1,16 @@
diff --git base/BUILD.gn base/BUILD.gn
index 3d538b3370caa..5a4ba79e0af64 100644
index c00c41bc2c7fd..166b3e74fd3bd 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -40,6 +40,7 @@ import("//build/config/ui.gni")
import("//build/nocompile.gni")
@@ -41,6 +41,7 @@ import("//build/nocompile.gni")
import("//build/timestamp.gni")
import("//build/util/process_version.gni")
import("//build_overrides/build.gni")
+import("//cef/libcef/features/features.gni")
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
@@ -1483,7 +1484,11 @@ component("base") {
@@ -1494,7 +1495,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@@ -23,7 +23,7 @@ index 3d538b3370caa..5a4ba79e0af64 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1907,6 +1912,12 @@ component("base") {
@@ -1918,6 +1923,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}
@@ -88,11 +88,11 @@ index 29626e5853c6e..2fb1c61504c5d 100644
#else
#include "base/hash/sha1_boringssl.h"
diff --git base/rand_util.h base/rand_util.h
index 8387bc9596ad7..c3dafe80e33b7 100644
index 00e901a3262ca..88ce372eb0a1a 100644
--- base/rand_util.h
+++ base/rand_util.h
@@ -16,8 +16,9 @@
#include "base/compiler_specific.h"
@@ -17,8 +17,9 @@
#include "base/containers/span.h"
#include "base/gtest_prod_util.h"
#include "build/build_config.h"
+#include "cef/libcef/features/features.h"
@@ -102,7 +102,7 @@ index 8387bc9596ad7..c3dafe80e33b7 100644
#include "third_party/boringssl/src/include/openssl/rand.h"
#endif
@@ -122,7 +123,7 @@ class RandomBitGenerator {
@@ -125,7 +126,7 @@ class RandomBitGenerator {
~RandomBitGenerator() = default;
};
@@ -112,7 +112,7 @@ index 8387bc9596ad7..c3dafe80e33b7 100644
public:
using result_type = uint64_t;
diff --git base/rand_util_win.cc base/rand_util_win.cc
index 549f4362af8b6..f08b1b2e7f061 100644
index 6aae763d98715..7f55cb70e94d2 100644
--- base/rand_util_win.cc
+++ base/rand_util_win.cc
@@ -15,8 +15,12 @@
@@ -150,21 +150,21 @@ index 549f4362af8b6..f08b1b2e7f061 100644
@@ -66,6 +75,7 @@ decltype(&ProcessPrng) GetProcessPrng() {
}
void RandBytes(void* output, size_t output_length, bool avoid_allocation) {
void RandBytes(span<uint8_t> output, bool avoid_allocation) {
+#if !BUILDFLAG(IS_CEF_SANDBOX_BUILD)
if (!avoid_allocation && internal::UseBoringSSLForRandBytes()) {
// Ensure BoringSSL is initialized so it can use things like RDRAND.
CRYPTO_library_init();
@@ -73,6 +83,7 @@ void RandBytes(void* output, size_t output_length, bool avoid_allocation) {
(void)RAND_bytes(static_cast<uint8_t*>(output), output_length);
@@ -73,6 +83,7 @@ void RandBytes(span<uint8_t> output, bool avoid_allocation) {
(void)RAND_bytes(output.data(), output.size());
return;
}
+#endif // !BUILDFLAG(IS_CEF_SANDBOX_BUILD)
static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng();
BOOL success = process_prng_fn(static_cast<BYTE*>(output), output_length);
BOOL success =
diff --git base/unguessable_token.cc base/unguessable_token.cc
index 44bfc3e2624d5..cccb306a383ce 100644
index da65502f75c3a..8b9d6eec4a1e2 100644
--- base/unguessable_token.cc
+++ base/unguessable_token.cc
@@ -10,8 +10,9 @@
@@ -178,7 +178,7 @@ index 44bfc3e2624d5..cccb306a383ce 100644
#include "third_party/boringssl/src/include/openssl/mem.h"
#endif
@@ -46,7 +47,7 @@ absl::optional<UnguessableToken> UnguessableToken::Deserialize(uint64_t high,
@@ -57,7 +58,7 @@ absl::optional<UnguessableToken> UnguessableToken::DeserializeFromString(
}
bool operator==(const UnguessableToken& lhs, const UnguessableToken& rhs) {

View File

@@ -1,5 +1,5 @@
diff --git base/ranges/ranges.h base/ranges/ranges.h
index 641bbaf2c7576..afdd641e38452 100644
index 27eac4f3a4c39..2cb63bec79e63 100644
--- base/ranges/ranges.h
+++ base/ranges/ranges.h
@@ -30,12 +30,14 @@ constexpr T* begin(std::array<T, N>& array, priority_tag<2> tag) {

View File

@@ -1,5 +1,5 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index f2026e17e6638..aec8bd2743f3a 100644
index bffe24a080a34..9191487142995 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -189,11 +189,6 @@ static_library("test_support") {
@@ -14,7 +14,7 @@ index f2026e17e6638..aec8bd2743f3a 100644
deps += [
":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor",
@@ -559,7 +554,7 @@ if (enable_base_tracing) {
@@ -560,7 +555,7 @@ if (enable_base_tracing) {
# processor depends on dev_sqlite. The two share the same symbols but have
# different implementations, so we need to hide dev_sqlite in this shared
# library even in non-component builds to prevent duplicate symbols.
@@ -23,7 +23,7 @@ index f2026e17e6638..aec8bd2743f3a 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -568,6 +563,8 @@ if (enable_base_tracing) {
@@ -569,6 +564,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@@ -32,7 +32,7 @@ index f2026e17e6638..aec8bd2743f3a 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -585,33 +582,6 @@ if (enable_base_tracing) {
@@ -586,33 +583,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ]
}

View File

@@ -1,10 +1,10 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 02fa305524694..29e77bafa710c 100644
index 9cd08e8b26410..d2dca33bdc62e 100644
--- third_party/blink/public/web/web_element.h
+++ third_party/blink/public/web/web_element.h
@@ -81,6 +81,9 @@ class BLINK_EXPORT WebElement : public WebNode {
void SetAttribute(const WebString& name, const WebString& value);
@@ -82,6 +82,9 @@ class BLINK_EXPORT WebElement : public WebNode {
WebString TextContent() const;
WebString TextContentAbridged(unsigned int max_length) const;
WebString InnerHTML() const;
+ WebString AttributeLocalName(unsigned index) const;
+ WebString AttributeValue(unsigned index) const;
@@ -13,7 +13,7 @@ index 02fa305524694..29e77bafa710c 100644
// Returns true if the element's contenteditable attribute is in the true
// state or in the plaintext-only state:
diff --git third_party/blink/renderer/core/exported/web_element.cc third_party/blink/renderer/core/exported/web_element.cc
index e8c7cb3cdb29f..1cf10e52779e1 100644
index 0c2400696ecbc..3dd6e5574eb39 100644
--- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc
@@ -116,6 +116,24 @@ void WebElement::SetAttribute(const WebString& attr_name,

View File

@@ -1,5 +1,5 @@
diff --git content/browser/scheduler/browser_task_executor.cc content/browser/scheduler/browser_task_executor.cc
index 307d5b7ffca63..9a8f0a4d3d7bd 100644
index 24f9538d6fd0d..0d57d47d70d38 100644
--- content/browser/scheduler/browser_task_executor.cc
+++ content/browser/scheduler/browser_task_executor.cc
@@ -209,7 +209,7 @@ BrowserTaskExecutor::OnUserInputStart() {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 0f781fe1c2b2e..6456de7ad1c39 100644
index 72b1e46a91e78..2aea3ca80157e 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1878,6 +1878,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
@@ -20,10 +20,10 @@ index 0f781fe1c2b2e..6456de7ad1c39 100644
// Make an exception to allow most visited tiles to commit in
diff --git content/browser/renderer_host/navigation_request.cc content/browser/renderer_host/navigation_request.cc
index 64248db4bfc64..ea5037256498f 100644
index dead84566f239..9fffaa0c20c97 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -7610,10 +7610,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -7772,10 +7772,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
@@ -47,7 +47,7 @@ index 64248db4bfc64..ea5037256498f 100644
}
return origin_and_debug_info;
@@ -7721,6 +7733,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -7883,6 +7895,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host()));

View File

@@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index de1cd6efc67b4..956d45892f31c 100644
index 89b4755ac8b39..453a1758fa253 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -2160,8 +2160,6 @@ config("thin_archive") {
@@ -2162,8 +2162,6 @@ config("thin_archive") {
# confuses lldb.
if ((is_posix && !is_nacl && !is_apple) || is_fuchsia) {
arflags = [ "-T" ]

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/BUILD.gn chrome/browser/BUILD.gn
index 6572022524828..f39800b4a7da2 100644
index 81dceec0b449c..ca76a507bb657 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 6572022524828..f39800b4a7da2 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -2043,6 +2044,7 @@ static_library("browser") {
@@ -2025,6 +2026,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index 6572022524828..f39800b4a7da2 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2700,6 +2702,10 @@ static_library("browser") {
@@ -2679,6 +2681,10 @@ static_library("browser") {
]
}

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/browser_process.h chrome/browser/browser_process.h
index e50822a2c8d5f..b44dd9191ed08 100644
index 3e7de43022a41..21354d14d11c3 100644
--- chrome/browser/browser_process.h
+++ chrome/browser/browser_process.h
@@ -207,9 +207,9 @@ class BrowserProcess {
@@ -14,10 +14,10 @@ index e50822a2c8d5f..b44dd9191ed08 100644
std::unique_ptr<BackgroundModeManager> manager) = 0;
#endif
diff --git chrome/browser/browser_process_impl.cc chrome/browser/browser_process_impl.cc
index 15e4fdcda89d2..66d26abb33af5 100644
index 57cb42c63eb6a..b8df2da97a7a1 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -1063,18 +1063,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -1072,18 +1072,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@@ -38,10 +38,10 @@ index 15e4fdcda89d2..66d26abb33af5 100644
std::unique_ptr<BackgroundModeManager> manager) {
background_mode_manager_ = std::move(manager);
diff --git chrome/browser/browser_process_impl.h chrome/browser/browser_process_impl.h
index af96779d25b87..4ef9f7945136c 100644
index e569e2d1a0dd0..fc5703af98b58 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -191,8 +191,8 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -190,8 +190,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;
@@ -52,10 +52,10 @@ index af96779d25b87..4ef9f7945136c 100644
std::unique_ptr<BackgroundModeManager> manager) override;
#endif
diff --git chrome/browser/lifetime/browser_close_manager.cc chrome/browser/lifetime/browser_close_manager.cc
index 1fbc225de7b84..55847e48ed0c2 100644
index bfffa272e6458..460a35e0c708f 100644
--- chrome/browser/lifetime/browser_close_manager.cc
+++ chrome/browser/lifetime/browser_close_manager.cc
@@ -157,12 +157,14 @@ void BrowserCloseManager::CloseBrowsers() {
@@ -158,12 +158,14 @@ void BrowserCloseManager::CloseBrowsers() {
// exit can restore all browsers open before exiting.
ProfileManager::ShutdownSessionServices();
#endif

View File

@@ -13,7 +13,7 @@ index 2480282a19d12..dbd1fbf8a15b5 100644
return false;
}
diff --git chrome/browser/devtools/devtools_window.cc chrome/browser/devtools/devtools_window.cc
index d64ccdc765368..5e8f892ff793d 100644
index ec31f050c1abb..ec30fd71f536d 100644
--- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc
@@ -31,6 +31,7 @@
@@ -24,7 +24,7 @@ index d64ccdc765368..5e8f892ff793d 100644
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
@@ -1189,6 +1190,13 @@ DevToolsWindow* DevToolsWindow::Create(
@@ -1193,6 +1194,13 @@ DevToolsWindow* DevToolsWindow::Create(
!browser->is_type_normal()) {
can_dock = false;
}
@@ -38,7 +38,7 @@ index d64ccdc765368..5e8f892ff793d 100644
}
// Create WebContents with devtools.
@@ -1760,12 +1768,29 @@ void DevToolsWindow::CreateDevToolsBrowser() {
@@ -1800,12 +1808,29 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) {
return;
}
@@ -75,10 +75,10 @@ index d64ccdc765368..5e8f892ff793d 100644
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index fc880e0dd1eb8..d8b3e4e21d092 100644
index b0146268b3384..742d5b50d054f 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@@ -8,6 +8,7 @@ import("//build/config/compiler/compiler.gni")
import("//build/config/features.gni")
import("//build/config/ozone.gni")
import("//build/config/ui.gni")
@@ -86,7 +86,7 @@ index fc880e0dd1eb8..d8b3e4e21d092 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -382,6 +383,10 @@ static_library("ui") {
@@ -395,6 +396,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -97,7 +97,7 @@ index fc880e0dd1eb8..d8b3e4e21d092 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
@@ -407,6 +412,7 @@ static_library("ui") {
@@ -420,6 +425,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
@@ -105,7 +105,7 @@ index fc880e0dd1eb8..d8b3e4e21d092 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/app:chrome_dll_resources",
@@ -2863,6 +2869,8 @@ static_library("ui") {
@@ -2918,6 +2924,8 @@ static_library("ui") {
"views/apps/app_dialog/app_block_dialog_view.h",
"views/apps/app_dialog/app_pause_dialog_view.cc",
"views/apps/app_dialog/app_pause_dialog_view.h",
@@ -114,7 +114,7 @@ index fc880e0dd1eb8..d8b3e4e21d092 100644
"views/apps/app_info_dialog/arc_app_info_links_panel.cc",
"views/apps/app_info_dialog/arc_app_info_links_panel.h",
"views/apps/chrome_app_window_client_views_chromeos.cc",
@@ -4874,8 +4882,6 @@ static_library("ui") {
@@ -4956,8 +4964,6 @@ static_library("ui") {
"views/accessibility/theme_tracking_non_accessible_image_view.h",
"views/apps/app_dialog/app_dialog_view.cc",
"views/apps/app_dialog/app_dialog_view.h",
@@ -123,7 +123,7 @@ index fc880e0dd1eb8..d8b3e4e21d092 100644
"views/apps/app_info_dialog/app_info_dialog_container.cc",
"views/apps/app_info_dialog/app_info_dialog_container.h",
"views/apps/app_info_dialog/app_info_dialog_views.cc",
@@ -6605,6 +6611,7 @@ static_library("ui") {
@@ -6725,6 +6731,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@@ -132,10 +132,10 @@ index fc880e0dd1eb8..d8b3e4e21d092 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index aa28c2ec1efb2..7ad06de961e9d 100644
index a001626c9f470..52d803a867172 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -262,6 +262,25 @@
@@ -263,6 +263,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@@ -161,7 +161,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -458,6 +477,10 @@ Browser::Browser(const CreateParams& params)
@@ -459,6 +478,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type),
profile_(params.profile),
window_(nullptr),
@@ -185,7 +185,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1061,6 +1090,8 @@ void Browser::WindowFullscreenStateChanged() {
@@ -1076,6 +1105,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@@ -194,7 +194,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
void Browser::FullscreenTopUIStateChanged() {
@@ -1400,6 +1431,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1415,6 +1446,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@@ -209,7 +209,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1407,8 +1446,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1422,8 +1461,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@@ -229,8 +229,8 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
+ return window()->HandleKeyboardEvent(event);
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1610,6 +1659,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
bool Browser::TabsNeedBeforeUnloadFired() const {
@@ -1625,6 +1674,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -245,7 +245,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1767,6 +1824,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1782,6 +1839,8 @@ void Browser::LoadingStateChanged(WebContents* source,
bool should_show_loading_ui) {
ScheduleUIUpdate(source, content::INVALIDATE_TYPE_LOAD);
UpdateWindowForLoadingStateChanged(source, should_show_loading_ui);
@@ -254,7 +254,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1795,6 +1854,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1810,6 +1869,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -263,7 +263,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
if (!GetStatusBubble())
return;
@@ -1802,6 +1863,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1817,6 +1878,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@@ -281,7 +281,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1826,6 +1898,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -1841,6 +1913,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@@ -301,7 +301,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -1925,6 +2010,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1940,6 +2025,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@@ -312,7 +312,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
void Browser::RendererUnresponsive(
@@ -2069,11 +2158,15 @@ void Browser::EnterFullscreenModeForTab(
@@ -2084,11 +2173,15 @@ void Browser::EnterFullscreenModeForTab(
const blink::mojom::FullscreenOptions& options) {
exclusive_access_manager_->fullscreen_controller()->EnterFullscreenModeForTab(
requesting_frame, options.display_id);
@@ -328,7 +328,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2266,6 +2359,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2281,6 +2374,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@@ -344,7 +344,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2808,9 +2910,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -2817,9 +2919,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@@ -357,7 +357,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
// We hide the status bar for web apps windows as this matches native
@@ -2818,6 +2922,12 @@ StatusBubble* Browser::GetStatusBubble() {
@@ -2827,6 +2931,12 @@ StatusBubble* Browser::GetStatusBubble() {
// mode, as the minimal browser UI includes the status bar.
if (web_app::AppBrowserController::IsWebApp(this) &&
!app_controller()->HasMinimalUiButtons()) {
@@ -370,7 +370,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
return nullptr;
}
@@ -2954,6 +3064,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2963,6 +3073,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
BookmarkTabHelper::FromWebContents(web_contents)->RemoveObserver(this);
web_contents_collection_.StopObserving(web_contents);
}
@@ -379,7 +379,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
}
void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3108,6 +3220,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
@@ -3117,6 +3229,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const {
@@ -395,7 +395,7 @@ index aa28c2ec1efb2..7ad06de961e9d 100644
case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 91ff945f74fd3..bdf661d7fdfc9 100644
index f1f279121056f..5758d8543d69e 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@@ -417,9 +417,9 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
#if BUILDFLAG(IS_ANDROID)
#error This file should only be included on desktop.
#endif
@@ -331,6 +336,15 @@ class Browser : public TabStripModelObserver,
@@ -347,6 +352,15 @@ class Browser : public TabStripModelObserver,
// Document Picture in Picture options, specific to TYPE_PICTURE_IN_PICTURE.
absl::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
std::optional<blink::mojom::PictureInPictureWindowOptions> pip_options;
+#if BUILDFLAG(ENABLE_CEF)
+ // Opaque CEF-specific configuration. Will be propagated to new Browsers.
@@ -433,7 +433,7 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
private:
friend class Browser;
friend class WindowSizerChromeOSTest;
@@ -412,6 +426,13 @@ class Browser : public TabStripModelObserver,
@@ -428,6 +442,13 @@ class Browser : public TabStripModelObserver,
update_ui_immediately_for_testing_ = true;
}
@@ -447,7 +447,7 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -486,6 +507,12 @@ class Browser : public TabStripModelObserver,
@@ -502,6 +523,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
@@ -460,7 +460,7 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -875,11 +902,19 @@ class Browser : public TabStripModelObserver,
@@ -906,11 +933,19 @@ class Browser : public TabStripModelObserver,
void SetContentsBounds(content::WebContents* source,
const gfx::Rect& bounds) override;
void UpdateTargetURL(content::WebContents* source, const GURL& url) override;
@@ -480,7 +480,7 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1220,6 +1255,10 @@ class Browser : public TabStripModelObserver,
@@ -1248,6 +1283,10 @@ class Browser : public TabStripModelObserver,
// This Browser's window.
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
@@ -491,7 +491,7 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1289,6 +1328,8 @@ class Browser : public TabStripModelObserver,
@@ -1314,6 +1353,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@@ -501,10 +501,10 @@ index 91ff945f74fd3..bdf661d7fdfc9 100644
UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index 3e4f480c35ea3..7dd7609b36367 100644
index e805d59f87b45..21e7d5fb70a7d 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -296,6 +296,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
@@ -293,6 +293,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
: 1.0;
browser_params.pip_options = pip_options;
@@ -515,7 +515,7 @@ index 3e4f480c35ea3..7dd7609b36367 100644
const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow()
@@ -581,6 +585,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -578,6 +582,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);
@@ -530,7 +530,7 @@ index 3e4f480c35ea3..7dd7609b36367 100644
// tab helpers, so the entire set of tab helpers needs to be set up
// immediately.
diff --git chrome/browser/ui/browser_tabstrip.cc chrome/browser/ui/browser_tabstrip.cc
index 8154aaa9c2aff..1e88bfed111ee 100644
index 435851d0f6f11..43a70f915a22c 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/content_settings/host_content_settings_map_factory.cc chrome/browser/content_settings/host_content_settings_map_factory.cc
index 6f842a7535a56..faaee032e82bd 100644
index 36335ba63ee83..e14005d6a4e86 100644
--- chrome/browser/content_settings/host_content_settings_map_factory.cc
+++ chrome/browser/content_settings/host_content_settings_map_factory.cc
@@ -9,6 +9,7 @@
@@ -10,7 +10,7 @@ index 6f842a7535a56..faaee032e82bd 100644
#include "chrome/browser/content_settings/one_time_permission_provider.h"
#include "chrome/browser/permissions/one_time_permissions_tracker_factory.h"
#include "chrome/browser/profiles/off_the_record_profile_impl.h"
@@ -23,6 +24,10 @@
@@ -24,6 +25,10 @@
#include "extensions/buildflags/buildflags.h"
#include "ui/webui/webui_allowlist_provider.h"
@@ -21,9 +21,9 @@ index 6f842a7535a56..faaee032e82bd 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "base/trace_event/trace_event.h"
#include "extensions/browser/api/content_settings/content_settings_custom_extension_provider.h"
@@ -68,7 +73,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
DependsOn(OneTimePermissionsTrackerFactory::GetInstance());
@@ -64,7 +69,13 @@ HostContentSettingsMapFactory::HostContentSettingsMapFactory()
#endif
DependsOn(OneTimePermissionsTrackerFactory::GetInstance());
#if BUILDFLAG(ENABLE_EXTENSIONS)
+#if BUILDFLAG(ENABLE_CEF)
+ if (!cef::IsAlloyRuntimeEnabled() || extensions::ExtensionsEnabled()) {
@@ -35,7 +35,7 @@ index 6f842a7535a56..faaee032e82bd 100644
#endif
// Used by way of ShouldRestoreOldSessionCookies().
#if BUILDFLAG(ENABLE_SESSION_SERVICE)
@@ -132,6 +143,9 @@ scoped_refptr<RefcountedKeyedService>
@@ -118,6 +129,9 @@ scoped_refptr<RefcountedKeyedService>
std::move(allowlist_provider));
#if BUILDFLAG(ENABLE_EXTENSIONS)
@@ -45,7 +45,7 @@ index 6f842a7535a56..faaee032e82bd 100644
// These must be registered before before the HostSettings are passed over to
// the IOThread. Simplest to do this on construction.
settings_map->RegisterProvider(
@@ -144,6 +158,9 @@ scoped_refptr<RefcountedKeyedService>
@@ -130,6 +144,9 @@ scoped_refptr<RefcountedKeyedService>
// the case where profile->IsOffTheRecord() is true? And what is the
// interaction with profile->IsGuestSession()?
false));
@@ -56,10 +56,10 @@ index 6f842a7535a56..faaee032e82bd 100644
#if BUILDFLAG(ENABLE_SUPERVISED_USERS)
supervised_user::SupervisedUserSettingsService* supervised_service =
diff --git components/content_settings/renderer/content_settings_agent_impl.cc components/content_settings/renderer/content_settings_agent_impl.cc
index c62382c00a48b..a560eafc3ec80 100644
index 54c18d58aea64..66d3721a392ec 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -145,7 +145,7 @@ ContentSetting GetContentSettingFromRules(
@@ -143,7 +143,7 @@ ContentSetting GetContentSettingFromRules(
return rule.GetContentSetting();
}
}

View File

@@ -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 331f5dc64de39..803b471e9764a 100644
index 5ebec17f77393..f94c18f8de78e 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -355,6 +355,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -360,6 +360,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@@ -16,7 +16,7 @@ index 331f5dc64de39..803b471e9764a 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -609,6 +616,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -616,6 +623,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@@ -27,7 +27,7 @@ index 331f5dc64de39..803b471e9764a 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -833,6 +844,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -857,6 +868,14 @@ RenderViewContextMenu::RenderViewContextMenu(
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@@ -42,7 +42,7 @@ index 331f5dc64de39..803b471e9764a 100644
observers_.AddObserver(&autofill_context_menu_manager_);
}
@@ -1300,6 +1319,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1331,6 +1350,12 @@ void RenderViewContextMenu::InitMenu() {
autofill::PopupHidingReason::kContextMenuOpened);
}
}
@@ -55,7 +55,7 @@ index 331f5dc64de39..803b471e9764a 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3452,6 +3477,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -3515,6 +3540,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}
@@ -69,10 +69,10 @@ index 331f5dc64de39..803b471e9764a 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 efd9049faacfd..8a75cdb0dfcfa 100644
index d8f1b10c18771..00702b672353d 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.h
+++ chrome/browser/renderer_context_menu/render_view_context_menu.h
@@ -157,6 +157,12 @@ class RenderViewContextMenu
@@ -159,6 +159,12 @@ class RenderViewContextMenu
}
#endif
@@ -85,7 +85,7 @@ index efd9049faacfd..8a75cdb0dfcfa 100644
protected:
Profile* GetProfile() const;
@@ -465,6 +471,9 @@ class RenderViewContextMenu
@@ -471,6 +477,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;
@@ -96,7 +96,7 @@ index efd9049faacfd..8a75cdb0dfcfa 100644
// "Use enhanced spell check" items.
std::unique_ptr<SpellingMenuObserver> spelling_suggestions_menu_observer_;
diff --git chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
index 18283c801689e..9838c25d6e584 100644
index c88a77a0b49e2..785ded198741e 100644
--- chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
+++ chrome/browser/ui/views/renderer_context_menu/render_view_context_menu_views.cc
@@ -149,6 +149,9 @@ void RenderViewContextMenuViews::RunMenuAt(views::Widget* parent,
@@ -110,10 +110,10 @@ index 18283c801689e..9838c25d6e584 100644
// that Ctrl+C, Ctrl+V, Ctrl+X, Ctrl-A, etc do what they normally do.
switch (command_id) {
diff --git components/renderer_context_menu/render_view_context_menu_base.cc components/renderer_context_menu/render_view_context_menu_base.cc
index ffe4002bc8ca3..b179f39ebdd59 100644
index ad4f00959e98b..54368373a6a99 100644
--- components/renderer_context_menu/render_view_context_menu_base.cc
+++ components/renderer_context_menu/render_view_context_menu_base.cc
@@ -382,6 +382,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
@@ -374,6 +374,17 @@ bool RenderViewContextMenuBase::IsCommandIdChecked(int id) const {
return false;
}
@@ -132,7 +132,7 @@ index ffe4002bc8ca3..b179f39ebdd59 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 ce17ade37f154..89bbd8609e815 100644
index 6249528399f44..9c4dd0d8f0100 100644
--- components/renderer_context_menu/render_view_context_menu_base.h
+++ components/renderer_context_menu/render_view_context_menu_base.h
@@ -87,6 +87,9 @@ class RenderViewContextMenuBase : public ui::SimpleMenuModel::Delegate,

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 391482bbfa815..0dbd682dd35a3 100644
index 25ccc6c633df5..7d439c4d9cc3c 100644
--- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@
@@ -10,7 +10,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/platform_util.h"
@@ -258,6 +259,13 @@ void FileSelectHelper::OnListFile(
@@ -242,6 +243,13 @@ void FileSelectHelper::OnListFile(
void FileSelectHelper::LaunchConfirmationDialog(
const base::FilePath& path,
std::vector<ui::SelectedFileInfo> selected_files) {
@@ -24,7 +24,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
ShowFolderUploadConfirmationDialog(
path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
@@ -342,6 +350,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
@@ -326,6 +334,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
if (AbortIfWebContentsDestroyed())
return;
@@ -37,7 +37,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
enterprise_connectors::ContentAnalysisDelegate::Data data;
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
@@ -472,7 +486,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
@@ -456,7 +470,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
FileSelectHelper::GetFileTypesFromAcceptType(
@@ -47,7 +47,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>();
if (accept_types.empty())
return base_file_type;
@@ -485,17 +500,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -469,17 +484,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back();
@@ -73,7 +73,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
} else {
if (!base::IsStringASCII(accept_type))
continue;
@@ -506,10 +528,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -490,10 +512,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
description_id = IDS_AUDIO_FILES;
else if (ascii_type == "video/*")
description_id = IDS_VIDEO_FILES;
@@ -94,7 +94,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
if (extensions->size() > old_extension_size)
valid_type_count++;
}
@@ -534,6 +564,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -518,6 +548,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
l10n_util::GetStringUTF16(description_id));
}
@@ -110,7 +110,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
return file_type;
}
@@ -541,7 +580,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -525,7 +564,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -120,7 +120,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
Profile* profile = Profile::FromBrowserContext(
render_frame_host->GetProcess()->GetBrowserContext());
@@ -560,6 +600,7 @@ void FileSelectHelper::RunFileChooser(
@@ -544,6 +584,7 @@ void FileSelectHelper::RunFileChooser(
// message.
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
@@ -128,7 +128,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
params.Clone());
}
@@ -611,7 +652,8 @@ void FileSelectHelper::RunFileChooser(
@@ -595,7 +636,8 @@ void FileSelectHelper::RunFileChooser(
}
void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) {
@@ -139,7 +139,7 @@ index 391482bbfa815..0dbd682dd35a3 100644
params->need_local_path ? ui::SelectFileDialog::FileTypeInfo::NATIVE_PATH
: ui::SelectFileDialog::FileTypeInfo::ANY_PATH;
diff --git chrome/browser/file_select_helper.h chrome/browser/file_select_helper.h
index 57dae0b3670ae..85eeda4cbaa5b 100644
index bd975f96585b8..abf0a24222ded 100644
--- chrome/browser/file_select_helper.h
+++ chrome/browser/file_select_helper.h
@@ -62,7 +62,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@@ -152,7 +152,7 @@ index 57dae0b3670ae..85eeda4cbaa5b 100644
// Enumerates all the files in directory.
static void EnumerateDirectory(
@@ -268,7 +269,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@@ -262,7 +263,8 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
// |accept_types| contains only valid lowercased MIME types or file extensions
// beginning with a period (.).
static std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
@@ -162,7 +162,7 @@ index 57dae0b3670ae..85eeda4cbaa5b 100644
// Check the accept type is valid. It is expected to be all lower case with
// no whitespace.
@@ -329,6 +331,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
@@ -323,6 +325,9 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
// Set to false in unit tests since there is no WebContents.
bool abort_on_missing_web_contents_in_tests_ = true;
@@ -238,10 +238,10 @@ index 9361287ac3411..59567b485bf99 100644
paths.push_back(std::move(path));
}
diff --git ui/shell_dialogs/select_file_dialog.cc ui/shell_dialogs/select_file_dialog.cc
index e2c00b2ec1532..a2e8753766597 100644
index 68dd62159b686..e94831cd44a2d 100644
--- ui/shell_dialogs/select_file_dialog.cc
+++ ui/shell_dialogs/select_file_dialog.cc
@@ -88,8 +88,10 @@ void SelectFileDialog::SetFactory(
@@ -73,8 +73,10 @@ void SelectFileDialog::SetFactory(
// static
scoped_refptr<SelectFileDialog> SelectFileDialog::Create(
Listener* listener,
@@ -255,10 +255,10 @@ index e2c00b2ec1532..a2e8753766597 100644
return CreateSelectFileDialog(listener, std::move(policy));
}
diff --git ui/shell_dialogs/select_file_dialog.h ui/shell_dialogs/select_file_dialog.h
index 65f0342389117..c4b79bc0dab91 100644
index 9b12fae59c3cc..dfb534a6f06e6 100644
--- ui/shell_dialogs/select_file_dialog.h
+++ ui/shell_dialogs/select_file_dialog.h
@@ -116,7 +116,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -102,7 +102,8 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// is refcounted and uses a background thread.
static scoped_refptr<SelectFileDialog> Create(
Listener* listener,
@@ -268,7 +268,7 @@ index 65f0342389117..c4b79bc0dab91 100644
SelectFileDialog(const SelectFileDialog&) = delete;
SelectFileDialog& operator=(const SelectFileDialog&) = delete;
@@ -213,6 +214,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -199,6 +200,19 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
const GURL* caller = nullptr);
bool HasMultipleFileTypeChoices();
@@ -288,7 +288,7 @@ index 65f0342389117..c4b79bc0dab91 100644
protected:
friend class base::RefCountedThreadSafe<SelectFileDialog>;
@@ -238,6 +252,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -224,6 +238,11 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// The listener to be notified of selection completion.
raw_ptr<Listener> listener_;
@@ -300,7 +300,7 @@ index 65f0342389117..c4b79bc0dab91 100644
private:
// Tests if the file selection dialog can be displayed by
// testing if the AllowFileSelectionDialogs-Policy is
@@ -250,8 +269,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
@@ -236,8 +255,6 @@ class SHELL_DIALOGS_EXPORT SelectFileDialog
// Returns true if the dialog has multiple file type choices.
virtual bool HasMultipleFileTypeChoicesImpl() = 0;
@@ -323,10 +323,10 @@ index c7acd9b05fbb8..3e95e4125fa24 100644
} // namespace ui
diff --git ui/shell_dialogs/select_file_dialog_mac.mm ui/shell_dialogs/select_file_dialog_mac.mm
index 0b8aaa3c0e4f0..fe01d3db2eabe 100644
index bf99047fa53cf..0efdb76233331 100644
--- ui/shell_dialogs/select_file_dialog_mac.mm
+++ ui/shell_dialogs/select_file_dialog_mac.mm
@@ -102,6 +102,10 @@ void SelectFileDialogImpl::SelectFileImpl(
@@ -107,6 +107,10 @@ void SelectFileDialogImpl::SelectFileImpl(
mojo_window->CreateSelectFileDialog(std::move(receiver));
} else {
NSWindow* ns_window = gfx_window.GetNativeNSWindow();
@@ -338,10 +338,10 @@ index 0b8aaa3c0e4f0..fe01d3db2eabe 100644
std::make_unique<remote_cocoa::SelectFileDialogBridge>(ns_window),
std::move(receiver));
diff --git ui/shell_dialogs/select_file_dialog_win.cc ui/shell_dialogs/select_file_dialog_win.cc
index 04aa920d91675..93ea4988839cf 100644
index cb1a0d203b448..307158e8117fe 100644
--- ui/shell_dialogs/select_file_dialog_win.cc
+++ ui/shell_dialogs/select_file_dialog_win.cc
@@ -252,6 +252,8 @@ void SelectFileDialogImpl::SelectFileImpl(
@@ -253,6 +253,8 @@ void SelectFileDialogImpl::SelectFileImpl(
HWND owner = owning_window && owning_window->GetRootWindow()
? owning_window->GetHost()->GetAcceleratedWidget()
: nullptr;

View File

@@ -12,7 +12,7 @@ index b169371e4d42f..509e4bda85b47 100644
// on the screen, we can't actually attach to it.
parent_window = nullptr;
diff --git components/constrained_window/constrained_window_views.cc components/constrained_window/constrained_window_views.cc
index 9e07412327ce9..3ac78725eba18 100644
index 3daf40d463e32..dc3712bf6dc89 100644
--- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@@ -91,7 +91,7 @@ index 9e07412327ce9..3ac78725eba18 100644
}
} // namespace
@@ -224,7 +219,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
@@ -234,7 +229,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
dialog, nullptr,
@@ -101,7 +101,7 @@ index 9e07412327ce9..3ac78725eba18 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -246,8 +242,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -256,8 +252,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
@@ -116,7 +116,7 @@ index 9e07412327ce9..3ac78725eba18 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -263,8 +264,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -273,8 +274,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
if (!requires_positioning)
return widget;
@@ -170,7 +170,7 @@ index 51ed6bcf6b540..c6e1161140655 100644
virtual gfx::Point GetDialogPosition(const gfx::Size& size) = 0;
// Returns whether a dialog currently about to be shown should be activated.
diff --git ui/views/window/dialog_delegate.cc ui/views/window/dialog_delegate.cc
index 89942cb82dee4..ce30f3bb93fc0 100644
index ed132b017f10e..590ab9760c36a 100644
--- ui/views/window/dialog_delegate.cc
+++ ui/views/window/dialog_delegate.cc
@@ -60,10 +60,12 @@ DialogDelegate::DialogDelegate() {
@@ -239,7 +239,7 @@ index 89942cb82dee4..ce30f3bb93fc0 100644
// Web-modal (ui::MODAL_TYPE_CHILD) dialogs with parents are marked as child
// widgets to prevent top-level window behavior (independent movement, etc).
diff --git ui/views/window/dialog_delegate.h ui/views/window/dialog_delegate.h
index 083874eb3f0bc..2ccacfca7d413 100644
index d0bd746875ed9..1643e6d841108 100644
--- ui/views/window/dialog_delegate.h
+++ ui/views/window/dialog_delegate.h
@@ -96,13 +96,18 @@ class VIEWS_EXPORT DialogDelegate : public WidgetDelegate {

View File

@@ -33,7 +33,7 @@ index a5ee05ae5f5e9..97fd2e8da450e 100644
~BrowserFrameMac() override;
diff --git chrome/browser/ui/views/frame/browser_frame_mac.mm chrome/browser/ui/views/frame/browser_frame_mac.mm
index 1473ed154f906..bf861087fe292 100644
index 24b68406431ce..5d58296a7a7f4 100644
--- chrome/browser/ui/views/frame/browser_frame_mac.mm
+++ chrome/browser/ui/views/frame/browser_frame_mac.mm
@@ -182,7 +182,14 @@ void BrowserFrameMac::OnWindowFullscreenTransitionComplete() {

View File

@@ -44,7 +44,7 @@ index ea1467d09700d..5537a99500e7f 100644
base::FeatureList::IsEnabled(
features::kPeriodicSyncPermissionForDefaultSearchEngine) &&
diff --git chrome/browser/permissions/chrome_permissions_client.cc chrome/browser/permissions/chrome_permissions_client.cc
index c26bff9382b26..8c93b7b8351c7 100644
index 58b162e099e70..2dcfe0cda550a 100644
--- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@
@@ -55,7 +55,7 @@ index c26bff9382b26..8c93b7b8351c7 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"
@@ -186,6 +187,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
@@ -187,6 +188,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
double ChromePermissionsClient::GetSiteEngagementScore(
content::BrowserContext* browser_context,
const GURL& origin) {
@@ -65,7 +65,7 @@ index c26bff9382b26..8c93b7b8351c7 100644
return site_engagement::SiteEngagementService::Get(
Profile::FromBrowserContext(browser_context))
->GetScore(origin);
@@ -350,8 +354,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
@@ -358,8 +362,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
std::make_unique<ContextualNotificationPermissionUiSelector>());
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
Profile::FromBrowserContext(browser_context)));
@@ -77,7 +77,7 @@ index c26bff9382b26..8c93b7b8351c7 100644
}
diff --git chrome/browser/permissions/permission_manager_factory.cc chrome/browser/permissions/permission_manager_factory.cc
index b0374f3adafea..faf9e7102f571 100644
index f020355c1969d..ff3c3e26b14bf 100644
--- chrome/browser/permissions/permission_manager_factory.cc
+++ chrome/browser/permissions/permission_manager_factory.cc
@@ -6,6 +6,7 @@
@@ -88,7 +88,7 @@ index b0374f3adafea..faf9e7102f571 100644
#include "chrome/browser/background_fetch/background_fetch_permission_context.h"
#include "chrome/browser/background_sync/periodic_background_sync_permission_context.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
@@ -56,8 +57,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
@@ -61,8 +62,10 @@ permissions::PermissionManager::PermissionContextMap CreatePermissionContexts(
std::make_unique<GeolocationPermissionContextDelegate>(profile);
#endif // BUILDFLAG(IS_ANDROID)
#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
@@ -142,10 +142,10 @@ index fbce13c16ad10..0512b2f09937e 100644
std::unique_ptr<permissions::PermissionPrompt> 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 3a4d21b89411f..75673d62f5738 100644
index 3a1224da26b6c..24735fe79498d 100644
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -173,11 +173,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
@@ -181,11 +181,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
}
}
@@ -175,7 +175,7 @@ index 3a4d21b89411f..75673d62f5738 100644
if (!browser) {
DLOG(WARNING) << "Permission prompt suppressed because the WebContents is "
diff --git components/embedder_support/permission_context_utils.cc components/embedder_support/permission_context_utils.cc
index 07f3c7c86b22d..110e48d59a75a 100644
index 402fe1588c459..091625f54b340 100644
--- components/embedder_support/permission_context_utils.cc
+++ components/embedder_support/permission_context_utils.cc
@@ -5,6 +5,7 @@
@@ -186,7 +186,7 @@ index 07f3c7c86b22d..110e48d59a75a 100644
#include "components/background_sync/background_sync_permission_context.h"
#include "components/permissions/contexts/accessibility_permission_context.h"
#include "components/permissions/contexts/camera_pan_tilt_zoom_permission_context.h"
@@ -77,12 +78,19 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context,
@@ -77,10 +78,17 @@ CreateDefaultPermissionContexts(content::BrowserContext* browser_context,
std::move(delegates.geolocation_permission_context_delegate),
is_regular_profile);
#elif BUILDFLAG(IS_MAC) || BUILDFLAG(IS_CHROMEOS)
@@ -196,12 +196,10 @@ index 07f3c7c86b22d..110e48d59a75a 100644
+ browser_context,
+ std::move(delegates.geolocation_permission_context_delegate));
+ } else {
DCHECK(delegates.geolocation_manager);
permission_contexts[ContentSettingsType::GEOLOCATION] =
std::make_unique<permissions::GeolocationPermissionContextSystem>(
browser_context,
std::move(delegates.geolocation_permission_context_delegate),
delegates.geolocation_manager);
std::move(delegates.geolocation_permission_context_delegate));
+ }
#else
permission_contexts[ContentSettingsType::GEOLOCATION] =

View File

@@ -33,18 +33,18 @@ index 10085136f52ce..ec1be9babecc2 100644
}
diff --git chrome/browser/policy/browser_dm_token_storage_mac.mm chrome/browser/policy/browser_dm_token_storage_mac.mm
index 5cb3cff75871c..51333ff7d85e2 100644
index 27af6ec08f593..6dfab7c74e8da 100644
--- chrome/browser/policy/browser_dm_token_storage_mac.mm
+++ chrome/browser/policy/browser_dm_token_storage_mac.mm
@@ -26,6 +26,7 @@
@@ -27,6 +27,7 @@
#include "base/syslog_logging.h"
#include "base/task/thread_pool.h"
#include "base/threading/scoped_blocking_call.h"
+#include "chrome/browser/policy/chrome_browser_policy_connector.h"
#include "chrome/common/chrome_paths.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@@ -47,11 +48,6 @@
namespace policy {
@@ -47,11 +48,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL(
"/Library/Google/Chrome/CloudManagementEnrollmentOptions");
const char kEnrollmentMandatoryOption[] = "Mandatory";
@@ -85,7 +85,7 @@ index 5cb3cff75871c..51333ff7d85e2 100644
@@ -138,12 +141,19 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) {
}
absl::optional<bool> IsEnrollmentMandatoryByPolicy() {
std::optional<bool> IsEnrollmentMandatoryByPolicy() {
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(
+ ChromeBrowserPolicyConnector::GetBundleId());
+ CFStringRef bundle_id = bundle_id_scoper.get();
@@ -101,11 +101,11 @@ index 5cb3cff75871c..51333ff7d85e2 100644
if (!value || !CFPreferencesAppValueIsForced(
- kEnrollmentMandatoryOptionPolicyName, kBundleId)) {
+ kEnrollmentMandatoryOptionPolicyName, bundle_id)) {
return absl::optional<bool>();
return std::optional<bool>();
}
diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc
index c012642290973..3f4d1be7f2092 100644
index c2ecd1b63f0d7..c83704788a803 100644
--- chrome/browser/policy/chrome_browser_policy_connector.cc
+++ chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -13,11 +13,14 @@
@@ -135,7 +135,7 @@ index c012642290973..3f4d1be7f2092 100644
} // namespace
ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector()
@@ -265,6 +273,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
@@ -270,6 +278,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
g_command_line_enabled_for_testing = true;
}
@@ -209,7 +209,7 @@ index c012642290973..3f4d1be7f2092 100644
base::flat_set<std::string>
ChromeBrowserPolicyConnector::device_affiliation_ids() const {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -336,23 +411,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
@@ -341,23 +416,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
std::unique_ptr<ConfigurationPolicyProvider>
ChromeBrowserPolicyConnector::CreatePlatformProvider() {
#if BUILDFLAG(IS_WIN)
@@ -242,7 +242,7 @@ index c012642290973..3f4d1be7f2092 100644
auto loader = std::make_unique<PolicyLoaderMac>(
base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
@@ -362,7 +436,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
@@ -367,7 +441,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
std::move(loader));
#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
base::FilePath config_dir_path;
@@ -252,7 +252,7 @@ index c012642290973..3f4d1be7f2092 100644
// If the folder containing the policy files doesn't exist, there's no need
// to have a provider for them. Note that in verified boot, the folder
diff --git chrome/browser/policy/chrome_browser_policy_connector.h chrome/browser/policy/chrome_browser_policy_connector.h
index daa1a4cf0820d..c33db32822fbf 100644
index f6147bc3c59a6..78b1170dd52bb 100644
--- chrome/browser/policy/chrome_browser_policy_connector.h
+++ chrome/browser/policy/chrome_browser_policy_connector.h
@@ -28,6 +28,10 @@
@@ -266,7 +266,7 @@ index daa1a4cf0820d..c33db32822fbf 100644
class PrefService;
namespace policy {
@@ -122,6 +126,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
@@ -125,6 +129,25 @@ class ChromeBrowserPolicyConnector : public BrowserPolicyConnector {
static void EnableCommandLineSupportForTesting();
@@ -304,7 +304,7 @@ index 1a2e78c3472ec..5d1bd95a15113 100644
#include "components/policy/policy_constants.h"
namespace policy::path_parser {
@@ -97,16 +98,12 @@
@@ -97,16 +98,12 @@ base::FilePath::StringType ExpandPathVariables(
void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
// Since the configuration management infrastructure is not initialized when
// this code runs, read the policy preference directly.
@@ -355,10 +355,10 @@ index 8dbf958c189dd..6eaccc6688eca 100644
*dir = base::FilePath(policy::path_parser::ExpandPathVariables(value));
return true;
diff --git chrome/common/chrome_paths.cc chrome/common/chrome_paths.cc
index 89678edacdadf..821c4448a8188 100644
index 94843ce782e80..0e3cc5bdb0bd5 100644
--- chrome/common/chrome_paths.cc
+++ chrome/common/chrome_paths.cc
@@ -523,7 +523,8 @@ bool PathProvider(int key, base::FilePath* result) {
@@ -539,7 +539,8 @@ bool PathProvider(int key, base::FilePath* result) {
return false;
}
break;
@@ -369,7 +369,7 @@ index 89678edacdadf..821c4448a8188 100644
cur = base::FilePath(policy::kPolicyPath);
break;
diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h
index 03387b9680834..76191ba98e80b 100644
index 4cde94111918e..aaf8245abd9a6 100644
--- chrome/common/chrome_paths.h
+++ chrome/common/chrome_paths.h
@@ -8,6 +8,7 @@
@@ -380,7 +380,7 @@ index 03387b9680834..76191ba98e80b 100644
#include "extensions/buildflags/buildflags.h"
#include "third_party/widevine/cdm/buildflags.h"
@@ -47,7 +48,7 @@ enum {
@@ -48,7 +49,7 @@ enum {
DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside.
DIR_COMPONENTS, // Directory where built-in implementations of
// component-updated libraries or data reside.
@@ -390,10 +390,10 @@ index 03387b9680834..76191ba98e80b 100644
// policy files that allow sys-admins
// to set policies for chrome. This directory
diff --git components/policy/tools/generate_policy_source.py components/policy/tools/generate_policy_source.py
index a17b30c37e07a..adcdf25e38ed1 100755
index d225da88a04fb..191bb6b56df40 100755
--- components/policy/tools/generate_policy_source.py
+++ components/policy/tools/generate_policy_source.py
@@ -486,6 +486,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
@@ -448,6 +448,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
#include <cstdint>
#include <string>
@@ -401,7 +401,7 @@ index a17b30c37e07a..adcdf25e38ed1 100755
#include "components/policy/core/common/policy_details.h"
#include "components/policy/core/common/policy_map.h"
@@ -508,9 +509,11 @@ struct SchemaData;
@@ -470,9 +471,11 @@ struct SchemaData;
''')
if target_platform == 'win':
@@ -415,7 +415,7 @@ index a17b30c37e07a..adcdf25e38ed1 100755
f.write('''#if BUILDFLAG(IS_CHROMEOS)
// Sets default profile policies values for enterprise users.
@@ -1153,12 +1156,14 @@ namespace policy {
@@ -1115,12 +1118,14 @@ namespace policy {
f.write('} // namespace\n\n')
if target_platform == 'win':

View File

@@ -14,7 +14,7 @@ index 7ae18c5a960b0..d48ba838efe6f 100644
? profile_metrics::BrowserProfileType::kRegular
: profile_metrics::BrowserProfileType::kIncognito;
diff --git chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
index 9f1cb38d90303..986ac5ed9bdaf 100644
index 826fa20afbb56..f08891c4aaa0d 100644
--- chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
+++ chrome/browser/ui/views/incognito_clear_browsing_data_dialog.cc
@@ -31,7 +31,9 @@ IncognitoClearBrowsingDataDialog::IncognitoClearBrowsingDataDialog(
@@ -44,7 +44,7 @@ index caa20ec03434a..2a3ca921445c1 100644
avatar_toolbar_button, GetBrowser().profile(), type);
DCHECK_EQ(nullptr, bubble_tracker_.view());
diff --git chrome/browser/ui/views/profiles/incognito_menu_view.cc chrome/browser/ui/views/profiles/incognito_menu_view.cc
index f5f266328283d..672609d94d1b7 100644
index 3e46e2ce50219..ce905695bfe18 100644
--- chrome/browser/ui/views/profiles/incognito_menu_view.cc
+++ chrome/browser/ui/views/profiles/incognito_menu_view.cc
@@ -36,7 +36,9 @@
@@ -59,7 +59,7 @@ index f5f266328283d..672609d94d1b7 100644
base::RecordAction(base::UserMetricsAction("IncognitoMenu_Show"));
diff --git chrome/browser/ui/views/profiles/profile_menu_coordinator.cc chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
index 9945ca59efde6..1a071f42bb538 100644
index 38e38d6eabc85..0856ae8d5f5ff 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -56,7 +56,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {

View File

@@ -14,10 +14,10 @@ index 9bba6cea235e0..9dc5b40559207 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 94f17d4c532c4..e9605b415a5aa 100644
index 28b166f4f499c..5892638bb43c8 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -88,6 +88,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@@ -87,6 +87,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
namespace {
@@ -25,7 +25,7 @@ index 94f17d4c532c4..e9605b415a5aa 100644
const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext";
const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation";
const char kTestOTRProfileIDPrefix[] = "Test::OTR";
@@ -108,6 +109,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
@@ -107,6 +108,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
// DevTools::BrowserContext, MediaRouter::Presentation, and
// CaptivePortal::Signin are exceptions to this ban.
if (*this == PrimaryID() ||
@@ -34,7 +34,7 @@ index 94f17d4c532c4..e9605b415a5aa 100644
base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix,
base::CompareCase::SENSITIVE) ||
base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix,
@@ -145,6 +148,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
@@ -144,6 +147,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str()));
}
@@ -52,10 +52,10 @@ index 94f17d4c532c4..e9605b415a5aa 100644
Profile::OTRProfileID Profile::OTRProfileID::CreateUniqueForDevTools() {
return CreateUnique(kDevToolsOTRProfileIDPrefix);
diff --git chrome/browser/profiles/profile.h chrome/browser/profiles/profile.h
index 52eb459e9deba..11a92e9e5cfdc 100644
index 4bf4b36f01890..b8a966db377db 100644
--- chrome/browser/profiles/profile.h
+++ chrome/browser/profiles/profile.h
@@ -104,6 +104,10 @@ class Profile : public content::BrowserContext {
@@ -103,6 +103,10 @@ class Profile : public content::BrowserContext {
// be applicable to run. Please see crbug.com/1098697#c3 for more details.
static OTRProfileID CreateUnique(const std::string& profile_id_prefix);
@@ -66,7 +66,7 @@ index 52eb459e9deba..11a92e9e5cfdc 100644
// Creates a unique OTR profile id to be used for DevTools browser contexts.
static OTRProfileID CreateUniqueForDevTools();
@@ -521,6 +525,8 @@ class Profile : public content::BrowserContext {
@@ -522,6 +526,8 @@ class Profile : public content::BrowserContext {
return instant_service_;
}
@@ -75,7 +75,7 @@ index 52eb459e9deba..11a92e9e5cfdc 100644
protected:
// Creates an OffTheRecordProfile which points to this Profile.
static std::unique_ptr<Profile> CreateOffTheRecordProfile(
@@ -532,7 +538,6 @@ class Profile : public content::BrowserContext {
@@ -533,7 +539,6 @@ class Profile : public content::BrowserContext {
static PrefStore* CreateExtensionPrefStore(Profile*,
bool incognito_pref_store);
@@ -84,10 +84,10 @@ index 52eb459e9deba..11a92e9e5cfdc 100644
// Returns whether the user has signed in this profile to an account.
diff --git chrome/browser/profiles/profile_impl.cc chrome/browser/profiles/profile_impl.cc
index 52a5f08810e85..ce21b2ea52f06 100644
index c70593cc14b9d..df5ba6a9432da 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1034,7 +1034,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1020,7 +1020,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);
@@ -99,10 +99,10 @@ index 52a5f08810e85..ce21b2ea52f06 100644
return raw_otr_profile;
}
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index 861f7d92b35c3..996ae52dcdaab 100644
index 2b7782afe7506..ed52e68ebdc91 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -438,7 +438,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -439,7 +439,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
profile_manager_android_ = std::make_unique<ProfileManagerAndroid>(this);
#endif
@@ -112,7 +112,7 @@ index 861f7d92b35c3..996ae52dcdaab 100644
zombie_metrics_timer_.Start(FROM_HERE, base::Minutes(30), this,
diff --git chrome/browser/profiles/profile_manager.h chrome/browser/profiles/profile_manager.h
index f1530f47eebf0..a41dcf65d9f11 100644
index 3d5fd0d5ca858..965ab69b3fe8f 100644
--- chrome/browser/profiles/profile_manager.h
+++ chrome/browser/profiles/profile_manager.h
@@ -134,7 +134,7 @@ class ProfileManager : public Profile::Delegate {

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/safe_browsing/BUILD.gn chrome/browser/safe_browsing/BUILD.gn
index e317e16a513ab..570b5ed114b62 100644
index 4a67fbf1512e0..8491024a30bf2 100644
--- chrome/browser/safe_browsing/BUILD.gn
+++ chrome/browser/safe_browsing/BUILD.gn
@@ -32,6 +32,7 @@ static_library("safe_browsing") {

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index d830d64348d63..a4a84c1214163 100644
index ef53c8296d9af..659e077436bbe 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -580,6 +580,14 @@ void OpenNewWindowForFirstRun(
@@ -17,7 +17,7 @@ index d830d64348d63..a4a84c1214163 100644
} // namespace
StartupProfileMode StartupProfileModeFromReason(
@@ -1450,6 +1458,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
@@ -1452,6 +1460,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles);
}
@@ -30,7 +30,7 @@ index d830d64348d63..a4a84c1214163 100644
// static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line,
@@ -1459,6 +1473,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
@@ -1461,6 +1475,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index c1ff8fe7df4f4..86d9b53f39360 100644
index ae7735b2bee81..fc3ba3599db28 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -29,6 +29,7 @@
@@ -30,6 +30,7 @@
#include "base/task/thread_pool.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"

View File

@@ -42,10 +42,10 @@ index 438276b719c2f..69635e429be78 100644
const extensions::Extension* extension =
registry->enabled_extensions().GetByID(extension_id);
diff --git chrome/renderer/chrome_content_renderer_client.cc chrome/renderer/chrome_content_renderer_client.cc
index d99e0959551ce..5d69ddac55ab4 100644
index 1521706e2be6b..08f77de0886dd 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -980,6 +980,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -999,6 +999,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@@ -53,7 +53,7 @@ index d99e0959551ce..5d69ddac55ab4 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1142,7 +1143,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1161,7 +1162,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@@ -63,7 +63,7 @@ index d99e0959551ce..5d69ddac55ab4 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1151,7 +1153,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1170,7 +1172,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
l10n_util::GetStringFUTF16(IDS_PLUGIN_BLOCKED, group_name));
placeholder->AllowLoading();
RenderThread::Get()->RecordAction(UserMetricsAction("Plugin_Blocked"));
@@ -73,7 +73,7 @@ index d99e0959551ce..5d69ddac55ab4 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1161,7 +1164,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1180,7 +1183,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 9cc63fbd174db..4ed6c1b0f1af3 100644
index da32ae82101ed..87342245c746f 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@
@@ -18,7 +18,7 @@ index 9cc63fbd174db..4ed6c1b0f1af3 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -239,6 +241,10 @@ static_library("renderer") {
@@ -242,6 +244,10 @@ static_library("renderer") {
configs += [ "//build/config/compiler:wexit_time_destructors" ]

View File

@@ -1,5 +1,5 @@
diff --git chrome/app/chrome_main_delegate.cc chrome/app/chrome_main_delegate.cc
index af3bbf41a347d..f055dce3ae036 100644
index 227843d1197b0..eba67645bb16b 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -41,6 +41,7 @@
@@ -10,7 +10,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -571,6 +572,9 @@ struct MainFunction {
@@ -608,6 +609,9 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
@@ -20,7 +20,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// In debug builds of Lacros, we keep track of when the user data dir
// is initialized, to ensure the cryptohome is not accessed before login
@@ -749,6 +753,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -823,6 +827,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@@ -28,10 +28,10 @@ index af3bbf41a347d..f055dce3ae036 100644
+ memory_system_.reset();
+}
+
absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -783,7 +791,7 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -857,7 +865,7 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@@ -40,7 +40,7 @@ index af3bbf41a347d..f055dce3ae036 100644
// In the case the process is not the singleton process, the uninstall tasks
// need to be executed here. A window will be displayed asking to close all
// running instances.
@@ -950,7 +958,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -1032,7 +1040,8 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@@ -50,7 +50,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#if BUILDFLAG(IS_ANDROID)
record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1399,6 +1408,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1487,6 +1496,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -58,7 +58,7 @@ index af3bbf41a347d..f055dce3ae036 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -1429,6 +1439,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1505,6 +1515,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@@ -66,7 +66,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#if BUILDFLAG(IS_WIN)
child_process_logging::Init();
@@ -1641,6 +1652,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1717,6 +1728,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@@ -74,7 +74,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1684,6 +1696,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1760,6 +1772,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -82,7 +82,7 @@ index af3bbf41a347d..f055dce3ae036 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1809,6 +1822,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1885,6 +1898,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -90,7 +90,7 @@ index af3bbf41a347d..f055dce3ae036 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 =
@@ -1831,6 +1845,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1907,6 +1921,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -98,7 +98,7 @@ index af3bbf41a347d..f055dce3ae036 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1931,6 +1946,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -2006,6 +2021,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
channel == version_info::Channel::DEV);
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
@@ -106,7 +106,7 @@ index af3bbf41a347d..f055dce3ae036 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(channel,
@@ -1940,5 +1956,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -2015,5 +2031,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kDynamic,
process_type)
@@ -114,7 +114,7 @@ index af3bbf41a347d..f055dce3ae036 100644
+ .Initialize(*memory_system_);
}
diff --git chrome/app/chrome_main_delegate.h chrome/app/chrome_main_delegate.h
index 176b6248f18e8..1360e8c209eba 100644
index 3553377e96017..5207128b768f2 100644
--- chrome/app/chrome_main_delegate.h
+++ chrome/app/chrome_main_delegate.h
@@ -49,6 +49,8 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
@@ -125,7 +125,7 @@ index 176b6248f18e8..1360e8c209eba 100644
+
protected:
// content::ContentMainDelegate:
absl::optional<int> BasicStartupComplete() override;
std::optional<int> BasicStartupComplete() override;
@@ -98,7 +100,7 @@ class ChromeMainDelegate : public content::ContentMainDelegate {
ChromeContentClient chrome_content_client_;
@@ -136,7 +136,7 @@ index 176b6248f18e8..1360e8c209eba 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
std::unique_ptr<chromeos::LacrosService> lacros_service_;
diff --git chrome/browser/chrome_browser_main.cc chrome/browser/chrome_browser_main.cc
index 5a2adb9fcc983..a3ce0913825d1 100644
index b5859c06d56e9..3a702aad4f453 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@@ -147,7 +147,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -506,7 +507,7 @@ void ProcessSingletonNotificationCallbackImpl(
@@ -503,7 +504,7 @@ void ProcessSingletonNotificationCallbackImpl(
return;
}
@@ -156,7 +156,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// The uninstall command-line switch is handled by the origin process; see
// ChromeMainDelegate::PostEarlyInitialization(...). The other process won't
// be able to become the singleton process and will display a window asking
@@ -800,7 +801,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -799,7 +800,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -165,7 +165,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser(
@@ -813,7 +814,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -812,7 +813,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
// result in browser startup bailing.
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
}
@@ -174,7 +174,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
return load_local_state_result;
}
@@ -915,7 +916,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -914,7 +915,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback());
@@ -183,7 +183,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
if (first_run::IsChromeFirstRun()) {
bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -928,7 +929,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -927,7 +928,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
: metrics::EnableMetricsDefault::OPT_IN);
}
}
@@ -192,7 +192,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
std::string locale =
startup_data_->chrome_feature_list_creator()->actual_locale();
@@ -961,6 +962,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -960,6 +961,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@@ -200,7 +200,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
@@ -994,6 +996,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -993,6 +995,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit);
}
#endif // BUILDFLAG(IS_MAC)
@@ -208,7 +208,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -1060,6 +1063,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1059,6 +1062,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@@ -216,7 +216,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// Android does first run in Java instead of native.
// Chrome OS has its own out-of-box-experience code.
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -1081,6 +1085,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1080,6 +1084,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -224,7 +224,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#if BUILDFLAG(IS_CHROMEOS)
// Set the product channel for crash reports.
@@ -1457,6 +1462,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1458,6 +1463,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN)
@@ -232,7 +232,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// If the command line specifies 'uninstall' then we need to work here
// unless we detect another chrome browser running.
if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kUninstall)) {
@@ -1468,6 +1474,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1469,6 +1475,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess());
}
@@ -240,7 +240,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1485,6 +1492,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1486,6 +1493,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
@@ -248,7 +248,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1498,18 +1506,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1499,18 +1507,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@@ -271,7 +271,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
// Begin relaunch processing immediately if User Data migration is required
@@ -1548,7 +1560,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1549,7 +1561,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -280,7 +280,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// Check if there is any machine level Chrome installed on the current
// machine. If yes and the current Chrome process is user level, we do not
// allow the user level Chrome to run. So we notify the user and uninstall
@@ -1557,7 +1569,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1558,7 +1570,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// obtained but before potentially creating the first run sentinel).
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
@@ -289,7 +289,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// Desktop construction occurs here, (required before profile creation).
PreProfileInit();
@@ -1600,12 +1612,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1601,12 +1613,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
@@ -304,7 +304,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1632,6 +1646,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1633,6 +1647,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@@ -312,7 +312,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
// Execute first run specific code after the PrefService has been initialized
// and preferences have been registered since some of the import code depends
@@ -1671,6 +1686,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1672,6 +1687,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@@ -320,7 +320,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1750,6 +1766,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1751,6 +1767,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -332,7 +332,7 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
base::FilePath(), profile_info,
@@ -1782,11 +1803,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1783,11 +1804,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@@ -348,10 +348,10 @@ index 5a2adb9fcc983..a3ce0913825d1 100644
#endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index fce89997a3a60..2c1228e740216 100644
index 7c438a75e086c..f3088e0e6d564 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -17,6 +17,7 @@
@@ -16,6 +16,7 @@
#include "base/path_service.h"
#include "base/strings/sys_string_conversions.h"
#include "build/branding_buildflags.h"
@@ -359,7 +359,7 @@ index fce89997a3a60..2c1228e740216 100644
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h"
@@ -110,6 +111,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -100,6 +101,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
}
#endif // !BUILDFLAG(CHROME_FOR_TESTING)
@@ -367,7 +367,7 @@ index fce89997a3a60..2c1228e740216 100644
// Create the app delegate by requesting the shared AppController.
CHECK_EQ(nil, NSApp.delegate);
AppController* app_controller = AppController.sharedController;
@@ -118,6 +120,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -108,6 +110,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated];
@@ -375,7 +375,7 @@ index fce89997a3a60..2c1228e740216 100644
ui::WarmScreenCapture();
@@ -167,5 +170,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
@@ -145,5 +148,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
}
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
@@ -384,7 +384,7 @@ index fce89997a3a60..2c1228e740216 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index a9b87ac2fcd74..c3469d0bded81 100644
index c8f705069d25b..aa9e0fd6efd0e 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -46,6 +46,7 @@
@@ -395,7 +395,7 @@ index a9b87ac2fcd74..c3469d0bded81 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"
@@ -1512,6 +1513,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1409,6 +1410,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@@ -404,7 +404,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1544,6 +1547,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1441,6 +1444,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@@ -416,7 +416,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4442,9 +4450,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4299,9 +4307,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@@ -428,7 +428,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6546,7 +6556,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6373,7 +6383,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@@ -437,7 +437,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6564,6 +6574,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6391,6 +6401,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@@ -446,7 +446,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
}
std::vector<base::FilePath>
@@ -7721,10 +7733,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -7535,10 +7547,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -459,7 +459,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7743,7 +7755,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -7557,7 +7569,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -469,7 +469,7 @@ index a9b87ac2fcd74..c3469d0bded81 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -7885,7 +7898,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -7699,7 +7712,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -479,7 +479,7 @@ index a9b87ac2fcd74..c3469d0bded81 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 efc041c50771c..51d187aa9d39a 100644
index 8ac74856217e4..e7632e1e08e96 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -142,6 +142,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -491,7 +491,7 @@ index efc041c50771c..51d187aa9d39a 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.
@@ -672,7 +674,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -667,7 +669,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -500,7 +500,7 @@ index efc041c50771c..51d187aa9d39a 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1149,7 +1151,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1160,7 +1162,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@@ -510,10 +510,10 @@ index efc041c50771c..51d187aa9d39a 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 2c9e95b07c762..c70fdab5e0bcc 100644
index 94a93ca5c715c..17cc9e515d99c 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -14,6 +14,7 @@
@@ -15,6 +15,7 @@
#include "build/build_config.h"
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"
@@ -521,7 +521,7 @@ index 2c9e95b07c762..c70fdab5e0bcc 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h"
@@ -195,6 +196,10 @@
@@ -194,6 +195,10 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -532,7 +532,7 @@ index 2c9e95b07c762..c70fdab5e0bcc 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1664,7 +1669,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1626,7 +1631,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
RegisterDefaultBrowserPromptPrefs(registry);
@@ -542,7 +542,7 @@ index 2c9e95b07c762..c70fdab5e0bcc 100644
DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
#endif
@@ -1692,6 +1699,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1649,6 +1656,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@@ -554,7 +554,7 @@ index 2c9e95b07c762..c70fdab5e0bcc 100644
}
// Register prefs applicable to all profiles.
@@ -2128,6 +2140,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2085,6 +2097,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
const std::string& locale) {
RegisterProfilePrefs(registry, locale);

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/ui/browser_command_controller.cc chrome/browser/ui/browser_command_controller.cc
index 7d57988659286..576550dd75111 100644
index 5664d44624283..e025126ed235f 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -41,10 +41,10 @@ index 7d57988659286..576550dd75111 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index 6ce427cb564af..8a59dc84c75ec 100644
index bb41ecd06518b..ab7d617e419ad 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -596,6 +596,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@@ -604,6 +604,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@@ -102,7 +102,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1481,7 +1532,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1470,7 +1521,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@@ -111,7 +111,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1496,6 +1547,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1485,6 +1536,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@@ -142,7 +142,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1689,11 +1764,15 @@ void AppMenuModel::Build() {
@@ -1652,11 +1727,15 @@ void AppMenuModel::Build() {
kDefaultIconSize));
}
@@ -163,7 +163,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -1799,9 +1878,13 @@ void AppMenuModel::Build() {
@@ -1762,9 +1841,13 @@ void AppMenuModel::Build() {
kMoreToolsMenuItem);
if (!features::IsChromeRefresh2023()) {
@@ -180,7 +180,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
}
if (!features::IsChromeRefresh2023()) {
@@ -1889,6 +1972,11 @@ void AppMenuModel::Build() {
@@ -1853,6 +1936,11 @@ void AppMenuModel::Build() {
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
}
@@ -193,7 +193,7 @@ index 6ce427cb564af..8a59dc84c75ec 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index 55425f15d49fa..06cb8ed2acaa1 100644
index d7c9df2e12df2..5dd6080454806 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -215,6 +215,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -205,8 +205,8 @@ index 55425f15d49fa..06cb8ed2acaa1 100644
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
@@ -256,6 +257,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
absl::optional<safety_hub::SafetyHubModuleType> expected_module =
absl::nullopt);
safety_hub::SafetyHubModuleType sh_module,
int event_flags);
+ bool IsCommandIdEnabledInternal(int command_id) const;
+
@@ -231,7 +231,7 @@ index 59024587ef6b7..0c30aa71768cf 100644
void FindBarHost::RegisterAccelerators() {
diff --git chrome/browser/ui/views/frame/browser_frame.cc chrome/browser/ui/views/frame/browser_frame.cc
index bb4b3821bcfda..4014f61a7057f 100644
index a52bb8913d37f..dd5030f9bfb74 100644
--- chrome/browser/ui/views/frame/browser_frame.cc
+++ chrome/browser/ui/views/frame/browser_frame.cc
@@ -114,15 +114,23 @@ ui::ColorProviderKey::SchemeVariant GetSchemeVariant(
@@ -330,7 +330,7 @@ index bb4b3821bcfda..4014f61a7057f 100644
chrome::SaveWindowWorkspace(browser_view_->browser(), GetWorkspace());
chrome::SaveWindowVisibleOnAllWorkspaces(browser_view_->browser(),
IsVisibleOnAllWorkspaces());
@@ -478,6 +510,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
@@ -483,6 +515,8 @@ void BrowserFrame::OnNativeThemeUpdated(ui::NativeTheme* observed_theme) {
ui::ColorProviderKey BrowserFrame::GetColorProviderKey() const {
auto key = Widget::GetColorProviderKey();
@@ -339,7 +339,7 @@ index bb4b3821bcfda..4014f61a7057f 100644
key.app_controller = browser_view_->browser()->app_controller();
@@ -632,5 +666,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
@@ -637,5 +671,8 @@ bool BrowserFrame::RegenerateFrameOnThemeChange(
}
bool BrowserFrame::IsIncognitoBrowser() const {
@@ -349,10 +349,10 @@ index bb4b3821bcfda..4014f61a7057f 100644
return browser_view_->browser()->profile()->IsIncognitoProfile();
}
diff --git chrome/browser/ui/views/frame/browser_frame.h chrome/browser/ui/views/frame/browser_frame.h
index 0c231b6ac5b01..6b5af98e18e42 100644
index 2e973c9e279b0..12b62efb8071f 100644
--- chrome/browser/ui/views/frame/browser_frame.h
+++ chrome/browser/ui/views/frame/browser_frame.h
@@ -61,7 +61,9 @@ enum class TabDragKind {
@@ -58,7 +58,9 @@ enum class TabDragKind {
// This is a virtual interface that allows system specific browser frames.
class BrowserFrame : public views::Widget, public views::ContextMenuController {
public:
@@ -363,10 +363,10 @@ index 0c231b6ac5b01..6b5af98e18e42 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 c74a820ce00ad..0c3b3bd49e5b7 100644
index e2827eb98518f..3e33205a91f1b 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -342,11 +342,10 @@ using content::NativeWebKeyboardEvent;
@@ -346,11 +346,10 @@ using content::NativeWebKeyboardEvent;
using content::WebContents;
using web_modal::WebContentsModalDialogHost;
@@ -381,7 +381,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -700,6 +699,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
@@ -677,6 +676,14 @@ class BrowserViewLayoutDelegateImpl : public BrowserViewLayoutDelegate {
return browser_view_->frame()->GetTopInset() - browser_view_->y();
}
@@ -396,7 +396,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
bool IsToolbarVisible() const override {
return browser_view_->IsToolbarVisible();
}
@@ -861,11 +868,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -835,11 +842,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -417,9 +417,9 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
+ browser_ = std::move(browser);
+
// Store the actions so that the access is available for other classes.
if (base::FeatureList::IsEnabled(features::kSidePanelPinning)) {
if (features::IsSidePanelPinningEnabled()) {
browser_->SetUserData(BrowserActions::UserDataKey(),
@@ -962,8 +979,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -933,8 +950,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@@ -437,7 +437,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1037,7 +1061,9 @@ BrowserView::~BrowserView() {
@@ -1008,7 +1032,9 @@ BrowserView::~BrowserView() {
// All the tabs should have been destroyed already. If we were closed by the
// OS with some tabs than the NativeBrowserFrame should have destroyed them.
@@ -447,7 +447,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1051,12 +1077,14 @@ BrowserView::~BrowserView() {
@@ -1022,12 +1048,14 @@ BrowserView::~BrowserView() {
// child views and it is an observer for avatar toolbar button if any.
autofill_bubble_handler_.reset();
@@ -462,7 +462,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
// The TabStrip attaches a listener to the model. Make sure we shut down the
// TabStrip first so that it can cleanly remove the listener.
@@ -1074,7 +1102,9 @@ BrowserView::~BrowserView() {
@@ -1045,7 +1073,9 @@ BrowserView::~BrowserView() {
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
// SidePanelCoordinator.
@@ -472,7 +472,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
}
// static
@@ -1949,9 +1979,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -1966,9 +1996,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -488,7 +488,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3060,7 +3095,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -3083,7 +3118,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -498,7 +498,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3611,7 +3647,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3642,7 +3678,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@@ -508,7 +508,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4073,11 +4110,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4123,11 +4160,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -549,7 +549,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
// Draggable regions are defined relative to the web contents.
gfx::Point point_in_contents_web_view_coords(location);
views::View::ConvertPointToTarget(GetWidget()->GetRootView(),
@@ -4086,7 +4150,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4136,7 +4200,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
// Draggable regions should be ignored for clicks into any browser view's
// owned widgets, for example alerts, permission prompts or find bar.
@@ -558,7 +558,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4194,8 +4258,10 @@ void BrowserView::Layout() {
@@ -4247,8 +4311,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -569,9 +569,9 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
+ if (frame()->GetFrameView())
+ frame()->GetFrameView()->UpdateMinimumSize();
#if BUILDFLAG(IS_CHROMEOS_ASH)
// In chromeOS ash we round the bottom two corners of the browser frame by
@@ -4273,6 +4339,11 @@ void BrowserView::AddedToWidget() {
// Some of the situations when the BrowserView is laid out are:
// - Enter/exit immersive fullscreen mode.
@@ -4314,6 +4380,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -583,7 +583,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4321,13 +4392,9 @@ void BrowserView::AddedToWidget() {
@@ -4362,13 +4433,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -599,7 +599,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4744,7 +4811,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4793,7 +4860,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -609,7 +609,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -5133,6 +5201,8 @@ Profile* BrowserView::GetProfile() {
@@ -5191,6 +5259,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -618,7 +618,7 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -5155,6 +5225,8 @@ void BrowserView::HideDownloadShelf() {
@@ -5213,6 +5283,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -628,13 +628,13 @@ index c74a820ce00ad..0c3b3bd49e5b7 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index 2e4054890db75..1a518ba936fd1 100644
index f3f5944785e5e..ec369e0fb2fe1 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
kUnknown
};
@@ -127,11 +127,16 @@ class BrowserView : public BrowserWindow,
METADATA_HEADER(BrowserView, views::ClientView)
public:
+ BrowserView();
explicit BrowserView(std::unique_ptr<Browser> browser);
+ void InitBrowser(std::unique_ptr<Browser> browser);
@@ -648,9 +648,9 @@ index 2e4054890db75..1a518ba936fd1 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -832,6 +837,9 @@ class BrowserView : public BrowserWindow,
// TopContainerBackground::PaintThemeCustomImage for details.
gfx::Point GetThemeOffsetFromBrowserView() const;
@@ -839,6 +844,9 @@ class BrowserView : public BrowserWindow,
const gfx::Rect& contents_webview_bounds,
const gfx::Rect& local_webview_container_bounds);
+ protected:
+ virtual ToolbarView* OverrideCreateToolbar() { return nullptr; }
@@ -659,7 +659,7 @@ index 2e4054890db75..1a518ba936fd1 100644
// Do not friend BrowserViewLayout. Use the BrowserViewLayoutDelegate
// interface to keep these two classes decoupled and testable.
diff --git chrome/browser/ui/views/frame/browser_view_layout.cc chrome/browser/ui/views/frame/browser_view_layout.cc
index 5e39a622e391e..1d4504370305f 100644
index 0991a57cccfe8..3ed3d43497460 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -48,6 +48,10 @@
@@ -760,13 +760,14 @@ index 29ad5517bd3c9..b0fe093467abc 100644
virtual bool IsBookmarkBarVisible() const = 0;
virtual bool IsContentsSeparatorEnabled() const = 0;
diff --git chrome/browser/ui/views/frame/contents_web_view.cc chrome/browser/ui/views/frame/contents_web_view.cc
index 8267a265a8e10..ee08f18e96a34 100644
index 71445bfab1824..c77750ea2a820 100644
--- chrome/browser/ui/views/frame/contents_web_view.cc
+++ chrome/browser/ui/views/frame/contents_web_view.cc
@@ -23,6 +23,11 @@
ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
@@ -28,6 +28,12 @@ ContentsWebView::ContentsWebView(content::BrowserContext* browser_context)
: views::WebView(browser_context),
status_bubble_(nullptr) {
SetProperty(views::kElementIdentifierKey, kContentsWebViewElementId);
+
+ // Mouse events on draggable regions will not be handled by the WebView.
+ // Avoid the resulting DCHECK in NativeViewHost::OnMousePressed by
+ // configuring the NativeViewHost not to process events via the view
@@ -776,10 +777,10 @@ index 8267a265a8e10..ee08f18e96a34 100644
ContentsWebView::~ContentsWebView() {
diff --git chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
index 84e2a84c15907..3f010beb931b6 100644
index 8f8eae2b243b3..288d584c61548 100644
--- chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
+++ chrome/browser/ui/views/frame/picture_in_picture_browser_frame_view.cc
@@ -585,6 +585,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
@@ -590,6 +590,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame->GetNativeWindow()->SetEventTargeter(
std::make_unique<chromeos::InteriorResizeHandleTargeter>());
#endif
@@ -791,7 +792,7 @@ index 84e2a84c15907..3f010beb931b6 100644
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -681,18 +686,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
@@ -686,18 +691,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@@ -842,7 +843,7 @@ index 84e2a84c15907..3f010beb931b6 100644
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
@@ -759,7 +788,8 @@ void PictureInPictureBrowserFrameView::Layout() {
@@ -764,7 +793,8 @@ void PictureInPictureBrowserFrameView::Layout() {
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@@ -852,7 +853,7 @@ index 84e2a84c15907..3f010beb931b6 100644
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
@@ -1234,7 +1264,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
@@ -1236,7 +1266,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@@ -877,7 +878,7 @@ index b862ceac7225d..9575440a77d67 100644
LocationBarView* location_bar_view = browser_view_->GetLocationBarView();
CHECK(location_bar_view);
diff --git chrome/browser/ui/views/page_action/page_action_icon_controller.cc chrome/browser/ui/views/page_action/page_action_icon_controller.cc
index 0e24efef68ace..f1cda2809f398 100644
index b6e4a01ae450d..14b7fd84ed7df 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@@ -894,7 +895,7 @@ index 0e24efef68ace..f1cda2809f398 100644
case PageActionIconType::kPaymentsOfferNotification:
add_page_action_icon(
diff --git chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
index 9536b049aeb9d..30f3091939675 100644
index c592f23b0c972..adca2e8db1cc6 100644
--- chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
+++ chrome/browser/ui/views/tabs/browser_tab_strip_controller.cc
@@ -558,29 +558,41 @@ gfx::Range BrowserTabStripController::ListTabsInGroup(
@@ -932,18 +933,18 @@ index 9536b049aeb9d..30f3091939675 100644
return GetFrameView()->GetFrameColor(active_state);
}
absl::optional<int> BrowserTabStripController::GetCustomBackgroundId(
std::optional<int> BrowserTabStripController::GetCustomBackgroundId(
BrowserFrameActiveState active_state) const {
+ if (!GetFrameView())
+ return absl::nullopt;
+ return std::nullopt;
return GetFrameView()->GetCustomBackgroundId(active_state);
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index f7f763cac17f4..788185cc57cae 100644
index 0cf2fbd962501..ccdc0a92ccde1 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background {
@@ -191,7 +191,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -952,7 +953,7 @@ index f7f763cac17f4..788185cc57cae 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -219,12 +219,13 @@ END_METADATA
@@ -220,12 +220,13 @@ END_METADATA
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
@@ -968,7 +969,7 @@ index f7f763cac17f4..788185cc57cae 100644
SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -249,6 +250,19 @@ ToolbarView::~ToolbarView() {
@@ -250,6 +251,19 @@ ToolbarView::~ToolbarView() {
}
void ToolbarView::Init() {
@@ -988,7 +989,7 @@ index f7f763cac17f4..788185cc57cae 100644
#if defined(USE_AURA)
// Avoid generating too many occlusion tracking calculation events before this
// function returns. The occlusion status will be computed only once once this
@@ -273,12 +287,12 @@ void ToolbarView::Init() {
@@ -274,12 +288,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@@ -1003,7 +1004,7 @@ index f7f763cac17f4..788185cc57cae 100644
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -360,8 +374,10 @@ void ToolbarView::Init() {
@@ -361,8 +375,10 @@ void ToolbarView::Init() {
}
}
std::unique_ptr<media_router::CastToolbarButton> cast;
@@ -1015,7 +1016,7 @@ index f7f763cac17f4..788185cc57cae 100644
std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -371,7 +387,8 @@ void ToolbarView::Init() {
@@ -372,7 +388,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@@ -1025,21 +1026,20 @@ index f7f763cac17f4..788185cc57cae 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -443,7 +460,8 @@ void ToolbarView::Init() {
@@ -451,7 +468,7 @@ void ToolbarView::Init() {
send_tab_to_self_button_ =
container_view_->AddChildView(std::move(send_tab_to_self_button));
- if (!base::FeatureList::IsEnabled(features::kSidePanelPinning)) {
+ if (!base::FeatureList::IsEnabled(features::kSidePanelPinning) &&
+ BUTTON_VISIBLE(kSidePanel)) {
- if (!features::IsSidePanelPinningEnabled()) {
+ if (!features::IsSidePanelPinningEnabled() && BUTTON_VISIBLE(kSidePanel)) {
if (companion::IsCompanionFeatureEnabled()) {
side_panel_container_ = container_view_->AddChildView(
std::make_unique<SidePanelToolbarContainer>(browser_view_));
diff --git chrome/browser/ui/views/toolbar/toolbar_view.h chrome/browser/ui/views/toolbar/toolbar_view.h
index 3bfe52cff3511..11373de4c2a3a 100644
index ec3e34a86f4c5..c10866a7b1ace 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.h
+++ chrome/browser/ui/views/toolbar/toolbar_view.h
@@ -92,7 +92,8 @@ class ToolbarView : public views::AccessiblePaneView,
@@ -93,7 +93,8 @@ class ToolbarView : public views::AccessiblePaneView,
// needs to be displayed.
};

View File

@@ -1,10 +1,10 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index 4300a5d94e04a..7ff40d52d3ec5 100644
index 67b7e7ca509e1..de84b8f7ecde9 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -108,7 +108,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -110,7 +110,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
absl::optional<blink::UserAgentMetadata>* override_out);
std::optional<blink::UserAgentMetadata>* override_out);
-bool WillCreateURLLoaderFactory(
+CONTENT_EXPORT bool WillCreateURLLoaderFactory(
@@ -55,12 +55,12 @@ index 1a1a07dad71dd..42048c360e797 100644
explicit SyntheticGestureTargetBase(RenderWidgetHostImpl* host);
diff --git content/common/content_switches_internal.h content/common/content_switches_internal.h
index 97c7dc7c25000..63c42610bfd9c 100644
index 6af484f35f576..2462700b6d1fb 100644
--- content/common/content_switches_internal.h
+++ content/common/content_switches_internal.h
@@ -17,7 +17,7 @@ namespace content {
@@ -15,7 +15,7 @@ class CommandLine;
extern const char kFirstRendererProcess[];
namespace content {
-bool IsPinchToZoomEnabled();
+CONTENT_EXPORT bool IsPinchToZoomEnabled();
@@ -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 af07b543f8a96..ff537ffb32224 100644
index ee83c6167eb18..44ed50b19bd70 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -35,6 +35,7 @@ component("controller") {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_http_handler.cc content/browser/devtools/devtools_http_handler.cc
index 34cacda8ef225..e0465b8ac1185 100644
index b7430b7d7027f..721144dde86d8 100644
--- content/browser/devtools/devtools_http_handler.cc
+++ content/browser/devtools/devtools_http_handler.cc
@@ -588,7 +588,7 @@ void DevToolsHttpHandler::OnJsonRequest(
@@ -589,7 +589,7 @@ void DevToolsHttpHandler::OnJsonRequest(
base::Value::Dict version;
version.Set("Protocol-Version", DevToolsAgentHost::GetProtocolVersion());
version.Set("WebKit-Version", GetWebKitVersion());
@@ -12,7 +12,7 @@ index 34cacda8ef225..e0465b8ac1185 100644
version.Set("V8-Version", V8_VERSION_STRING);
std::string host = info.GetHeaderValue("host");
diff --git content/browser/loader/navigation_url_loader_impl.cc content/browser/loader/navigation_url_loader_impl.cc
index 16b5afde04752..01561da6aee2d 100644
index 5da07b9eff248..72fc63ba456c5 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -751,6 +751,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
@@ -39,10 +39,10 @@ index 16b5afde04752..01561da6aee2d 100644
factory = base::MakeRefCounted<network::WrapperSharedURLLoaderFactory>(
std::move(loader_factory));
diff --git content/public/browser/content_browser_client.cc content/public/browser/content_browser_client.cc
index ed845bfab9e73..fc694c9d62f4d 100644
index d004abc6fe3da..3aeb9ab07d2a6 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -1084,7 +1084,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1070,7 +1070,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@@ -51,7 +51,7 @@ index ed845bfab9e73..fc694c9d62f4d 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1093,6 +1093,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1079,6 +1079,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = "en-us,en";
@@ -60,10 +60,10 @@ index ed845bfab9e73..fc694c9d62f4d 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 966f79ab782fa..9b820f69835b8 100644
index d0a5dbc454670..0814479cf64e1 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -42,6 +42,7 @@
@@ -43,6 +43,7 @@
#include "content/public/browser/mojo_binder_policy_map.h"
#include "content/public/browser/privacy_sandbox_invoking_api.h"
#include "content/public/browser/storage_partition_config.h"
@@ -71,7 +71,7 @@ index 966f79ab782fa..9b820f69835b8 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"
@@ -2008,7 +2009,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -1989,7 +1990,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.
@@ -80,7 +80,7 @@ index 966f79ab782fa..9b820f69835b8 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2229,6 +2230,19 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2210,6 +2211,19 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -100,7 +100,7 @@ index 966f79ab782fa..9b820f69835b8 100644
// Creates an OverlayWindow to be used for video or Picture-in-Picture.
// This window will house the content shown when in Picture-in-Picture mode.
// This will return a new OverlayWindow.
@@ -2286,6 +2300,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2267,6 +2281,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -112,10 +112,10 @@ index 966f79ab782fa..9b820f69835b8 100644
// on blink::features::kUserAgentReduction. Content may cache this value.
virtual std::string GetUserAgent();
diff --git content/public/renderer/content_renderer_client.h content/public/renderer/content_renderer_client.h
index 72f72e2c6627d..f5ca688e5d9f4 100644
index ff20508d76a60..03a83b28fd678 100644
--- content/public/renderer/content_renderer_client.h
+++ content/public/renderer/content_renderer_client.h
@@ -100,6 +100,9 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -101,6 +101,9 @@ class CONTENT_EXPORT ContentRendererClient {
// binding requests from RenderProcessHost::BindReceiver().
virtual void ExposeInterfacesToBrowser(mojo::BinderMap* binders) {}
@@ -125,7 +125,7 @@ index 72f72e2c6627d..f5ca688e5d9f4 100644
// Notifies that a new RenderFrame has been created.
virtual void RenderFrameCreated(RenderFrame* render_frame) {}
@@ -323,6 +326,10 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -324,6 +327,10 @@ class CONTENT_EXPORT ContentRendererClient {
// This method may invalidate the frame.
virtual void RunScriptsAtDocumentIdle(RenderFrame* render_frame) {}
@@ -137,10 +137,10 @@ index 72f72e2c6627d..f5ca688e5d9f4 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index e72f99daf2fea..d3b5bd5565da0 100644
index b67ee7e79eea7..13ac29a392b6e 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -584,6 +584,8 @@ void RenderThreadImpl::Init() {
@@ -545,6 +545,8 @@ void RenderThreadImpl::Init() {
GetContentClient()->renderer()->CreateURLLoaderThrottleProvider(
blink::URLLoaderThrottleProviderType::kFrame);
@@ -150,10 +150,10 @@ index e72f99daf2fea..d3b5bd5565da0 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 5790d6ed3e4d9..d7519f9032c78 100644
index 619323f485c6a..324017a67e989 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -984,6 +984,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -994,6 +994,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@@ -170,10 +170,10 @@ index 5790d6ed3e4d9..d7519f9032c78 100644
RendererBlinkPlatformImpl::CreateWebV8ValueConverter() {
return std::make_unique<V8ValueConverterImpl>();
diff --git content/renderer/renderer_blink_platform_impl.h content/renderer/renderer_blink_platform_impl.h
index 328a108d2bd1c..f44846ddc2c9e 100644
index ecbcf12493f77..2c529b2f07a14 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -234,6 +234,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -236,6 +236,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID)
@@ -184,10 +184,10 @@ index 328a108d2bd1c..f44846ddc2c9e 100644
// plus eTLD+1, such as https://google.com), or to a more specific origin.
void SetIsLockedToSite();
diff --git content/shell/browser/shell_content_browser_client.cc content/shell/browser/shell_content_browser_client.cc
index 84da983df907b..7a9390e069df5 100644
index 3e0b86f6834c5..624610b39a399 100644
--- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc
@@ -701,7 +701,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
@@ -703,7 +703,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
// BUILDFLAG(IS_ANDROID)
@@ -196,7 +196,7 @@ index 84da983df907b..7a9390e069df5 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -710,6 +710,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
@@ -712,6 +712,7 @@ void ShellContentBrowserClient::ConfigureNetworkContextParams(
cert_verifier_creation_params) {
ConfigureNetworkContextParamsForShell(context, network_context_params,
cert_verifier_creation_params);
@@ -205,10 +205,10 @@ index 84da983df907b..7a9390e069df5 100644
std::vector<base::FilePath>
diff --git content/shell/browser/shell_content_browser_client.h content/shell/browser/shell_content_browser_client.h
index 950e82cd59ab4..1f8b23da6fec5 100644
index 83253e9feb3eb..ca0fd605ee613 100644
--- content/shell/browser/shell_content_browser_client.h
+++ content/shell/browser/shell_content_browser_client.h
@@ -138,7 +138,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
@@ -140,7 +140,7 @@ class ShellContentBrowserClient : public ContentBrowserClient {
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) ||
// BUILDFLAG(IS_ANDROID)
device::GeolocationManager* GetGeolocationManager() override;

View File

@@ -1,8 +1,8 @@
diff --git content/app/content_main.cc content/app/content_main.cc
index 4320694e7f691..bb9b6629bc384 100644
index aebbccad2a503..2537281b0e872 100644
--- content/app/content_main.cc
+++ content/app/content_main.cc
@@ -174,11 +174,8 @@ ContentMainParams::~ContentMainParams() = default;
@@ -175,11 +175,8 @@ ContentMainParams::~ContentMainParams() = default;
ContentMainParams::ContentMainParams(ContentMainParams&&) = default;
ContentMainParams& ContentMainParams::operator=(ContentMainParams&&) = default;
@@ -16,7 +16,7 @@ index 4320694e7f691..bb9b6629bc384 100644
base::FeatureList::FailOnFeatureAccessWithoutFeatureList();
#if BUILDFLAG(IS_CHROMEOS_LACROS)
// Lacros is launched with inherited priority. Revert to normal priority
@@ -186,9 +183,6 @@ RunContentProcess(ContentMainParams params,
@@ -187,9 +184,6 @@ RunContentProcess(ContentMainParams params,
base::PlatformThread::SetCurrentThreadType(base::ThreadType::kDefault);
#endif
int exit_code = -1;
@@ -26,7 +26,7 @@ index 4320694e7f691..bb9b6629bc384 100644
// A flag to indicate whether Main() has been called before. On Android, we
// may re-run Main() without restarting the browser process. This flag
@@ -274,14 +268,6 @@ RunContentProcess(ContentMainParams params,
@@ -275,14 +269,6 @@ RunContentProcess(ContentMainParams params,
#endif
#if BUILDFLAG(IS_MAC)
@@ -41,7 +41,7 @@ index 4320694e7f691..bb9b6629bc384 100644
InitializeMac();
#endif
@@ -331,12 +317,46 @@ RunContentProcess(ContentMainParams params,
@@ -332,12 +318,46 @@ RunContentProcess(ContentMainParams params,
if (IsSubprocess())
CommonSubprocessInit();
@@ -90,7 +90,7 @@ index 4320694e7f691..bb9b6629bc384 100644
}
diff --git content/app/content_main_runner_impl.cc content/app/content_main_runner_impl.cc
index f3988a35b1df7..8dd8c652b105e 100644
index 0e6cd686e0b05..a26433ccb9307 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -46,6 +46,7 @@
@@ -101,7 +101,7 @@ index f3988a35b1df7..8dd8c652b105e 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -1334,6 +1335,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1335,6 +1336,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}
@@ -114,7 +114,7 @@ index f3988a35b1df7..8dd8c652b105e 100644
std::unique_ptr<ContentMainRunner> ContentMainRunner::Create() {
return ContentMainRunnerImpl::Create();
diff --git content/app/content_main_runner_impl.h content/app/content_main_runner_impl.h
index da60e9346b283..c36effdd7e5ee 100644
index cbbc2f3ec12fa..f097b3cdded2f 100644
--- content/app/content_main_runner_impl.h
+++ content/app/content_main_runner_impl.h
@@ -27,7 +27,7 @@ class DiscardableSharedMemoryManager;
@@ -149,10 +149,10 @@ index 283161145d792..9f3f635abdd1c 100644
if (main_argv)
setproctitle_init(main_argv);
diff --git content/public/app/content_main.h content/public/app/content_main.h
index 44d9aa44ae430..47f916f566696 100644
index 7f9b515297357..89b52e34fa31a 100644
--- content/public/app/content_main.h
+++ content/public/app/content_main.h
@@ -96,6 +96,13 @@ struct CONTENT_EXPORT ContentMainParams {
@@ -94,6 +94,13 @@ struct CONTENT_EXPORT ContentMainParams {
}
};

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_process_host_impl.cc content/browser/renderer_host/render_process_host_impl.cc
index 67b608870e591..f8f47a606ea51 100644
index b656054d342f5..7889656173b0e 100644
--- content/browser/renderer_host/render_process_host_impl.cc
+++ content/browser/renderer_host/render_process_host_impl.cc
@@ -1614,7 +1614,8 @@ bool RenderProcessHostImpl::Init() {
@@ -1629,7 +1629,8 @@ bool RenderProcessHostImpl::Init() {
// initialized because in tests the factory may never have been initialized.
if (!GetBrowserContext()->IsOffTheRecord() &&
!base::CommandLine::ForCurrentProcess()->HasSwitch(

View File

@@ -454,7 +454,7 @@ index eb5bcfe0234c3..8963b26806922 100644
handler_path, *database_path, metrics_path, url,
GetProcessSimpleAnnotations(), arguments, true, false);
diff --git components/crash/core/app/crashpad_win.cc components/crash/core/app/crashpad_win.cc
index 9ab5fb1c82275..740014c1119bd 100644
index 15addd5c5e663..f30027b9b6f3c 100644
--- components/crash/core/app/crashpad_win.cc
+++ components/crash/core/app/crashpad_win.cc
@@ -36,8 +36,8 @@ void GetPlatformCrashpadAnnotations(
@@ -525,7 +525,7 @@ index 9ab5fb1c82275..740014c1119bd 100644
start_arguments.push_back(std::string("--user-data-dir=") +
user_data_dir);
@@ -124,9 +131,12 @@ bool PlatformCrashpadInitialization(
start_arguments.push_back("/prefetch:7");
start_arguments.push_back("/prefetch:4");
} else {
base::FilePath exe_dir = exe_file.DirName();
- exe_file = exe_dir.Append(FILE_PATH_LITERAL("crashpad_handler.exe"));

View File

@@ -60,10 +60,10 @@ index 8cea5bf4591cd..c5fca9dd1a9e8 100644
std::unique_ptr<StreamContainer> stream_container(
new StreamContainer(tab_id, embedded, handler_url, extension_id,
diff --git extensions/browser/extension_host.cc extensions/browser/extension_host.cc
index 55f83aa0e801a..e111e3273796e 100644
index 52e6a29f65a91..8e8f92a45526c 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -62,12 +62,13 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -105,12 +105,13 @@ ExtensionHost::ExtensionHost(const Extension* extension,
host_type == mojom::ViewType::kOffscreenDocument ||
host_type == mojom::ViewType::kExtensionPopup ||
host_type == mojom::ViewType::kExtensionSidePanel);
@@ -80,7 +80,7 @@ index 55f83aa0e801a..e111e3273796e 100644
main_frame_host_ = host_contents_->GetPrimaryMainFrame();
// Listen for when an extension is unloaded from the same profile, as it may
@@ -83,11 +84,49 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -126,11 +127,49 @@ ExtensionHost::ExtensionHost(const Extension* extension,
// Create password reuse detection manager when new extension web contents are
// created.
ExtensionsBrowserClient::Get()->CreatePasswordReuseDetectionManager(
@@ -132,7 +132,7 @@ index 55f83aa0e801a..e111e3273796e 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index c0398bdd68648..93fc2409ab3d7 100644
index 94b02bca9b70b..5e3dacc34452a 100644
--- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h
@@ -62,6 +62,12 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -157,7 +157,7 @@ index c0398bdd68648..93fc2409ab3d7 100644
content::RenderFrameHost* main_frame_host() const { return main_frame_host_; }
content::RenderProcessHost* render_process_host() const;
bool has_loaded_once() const { return has_loaded_once_; }
@@ -238,7 +244,8 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -248,7 +254,8 @@ class ExtensionHost : public DeferredStartRenderHost,
raw_ptr<content::BrowserContext> browser_context_;
// The host for our HTML content.
@@ -199,10 +199,10 @@ index c3197eb4790fa..1e7ae767b0582 100644
}
diff --git extensions/browser/extensions_browser_client.h extensions/browser/extensions_browser_client.h
index bded50cb03354..4df474bd3c7bb 100644
index 5da1cae2970c6..4e193c09c54b1 100644
--- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h
@@ -31,6 +31,7 @@
@@ -34,6 +34,7 @@
#include "url/gurl.h"
class ExtensionFunctionRegistry;
@@ -210,7 +210,7 @@ index bded50cb03354..4df474bd3c7bb 100644
class PrefService;
namespace base {
@@ -79,6 +80,7 @@ class ComponentExtensionResourceManager;
@@ -82,6 +83,7 @@ class ComponentExtensionResourceManager;
class Extension;
class ExtensionCache;
class ExtensionError;
@@ -218,7 +218,7 @@ index bded50cb03354..4df474bd3c7bb 100644
class ExtensionHostDelegate;
class ExtensionSet;
class ExtensionSystem;
@@ -264,6 +266,14 @@ class ExtensionsBrowserClient {
@@ -272,6 +274,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0;
@@ -234,7 +234,7 @@ index bded50cb03354..4df474bd3c7bb 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 fcfb4635bfc23..619f210c7240e 100644
index 399eba92dc627..60ad5d7dd3831 100644
--- extensions/browser/process_manager.cc
+++ extensions/browser/process_manager.cc
@@ -379,9 +379,17 @@ bool ProcessManager::CreateBackgroundHost(const Extension* extension,
@@ -257,10 +257,10 @@ index fcfb4635bfc23..619f210c7240e 100644
base::BindOnce(&ProcessManager::HandleCloseExtensionHost,
weak_ptr_factory_.GetWeakPtr()));
diff --git extensions/common/extensions_client.cc extensions/common/extensions_client.cc
index 713e66b05abcf..de97074586d0f 100644
index 5142f341b8392..d3242aae96ece 100644
--- extensions/common/extensions_client.cc
+++ extensions/common/extensions_client.cc
@@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr;
@@ -25,7 +25,7 @@ ExtensionsClient* g_client = nullptr;
} // namespace
ExtensionsClient* ExtensionsClient::Get() {

View File

@@ -1,5 +1,5 @@
diff --git .gn .gn
index 321877844bd21..f7f00a99d6244 100644
index afe0b3e90fafb..daae3b0e0e8d3 100644
--- .gn
+++ .gn
@@ -153,6 +153,8 @@ exec_script_whitelist =
@@ -12,7 +12,7 @@ index 321877844bd21..f7f00a99d6244 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index 678989ac85db1..b05b5aac2fc64 100644
index 067b08552d5fc..bbb280ef9e307 100644
--- BUILD.gn
+++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@@ -21,9 +21,9 @@ index 678989ac85db1..b05b5aac2fc64 100644
import("//build/util/generate_wrapper.gni")
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//components/enterprise/buildflags/buildflags.gni")
import("//components/nacl/features.gni")
import("//device/vr/buildflags/buildflags.gni")
@@ -273,6 +274,10 @@ group("gn_all") {
@@ -277,6 +278,10 @@ group("gn_all") {
deps += root_extra_deps
@@ -76,18 +76,18 @@ index 1da479dd5eebc..ff9c7e467997c 100644
- visual_studio_runtime_dirs = []
}
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 5a4ddf12a9db3..6c255f9db2433 100644
index 95d82be2f9050..191232294b59f 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
import("//build/config/chromebox_for_meetings/buildflags.gni")
@@ -5,6 +5,7 @@
import("//ash/ambient/resources/resources.gni")
import("//build/config/chromeos/ui_mode.gni")
import("//build/config/locales.gni")
+import("//cef/libcef/features/features.gni")
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//components/compose/features.gni")
@@ -82,6 +83,10 @@ template("chrome_repack_percent") {
@@ -80,6 +81,10 @@ template("chrome_repack_percent") {
"//ui/chromeos/resources",
]
}

View File

@@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index cdce083b1bea8..f59c624b3c7c0 100644
index df93fa972dff6..3228d8377f597 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1266,6 +1266,15 @@
@@ -1269,6 +1269,15 @@
# END "everything else" section.
# Everything but chrome/, components/, content/, and ios/

View File

@@ -1,5 +1,5 @@
diff --git third_party/libxml/BUILD.gn third_party/libxml/BUILD.gn
index aab483d6b00ce..ed3c1e10a7fe7 100644
index 1621a215784c9..5a13a75cea0dd 100644
--- third_party/libxml/BUILD.gn
+++ third_party/libxml/BUILD.gn
@@ -140,6 +140,7 @@ static_library("libxml") {

View File

@@ -32,7 +32,7 @@ index 6b9d2c180c904..3570ef071ba07 100644
return (dark_mode_support.allow_dark_mode_for_app ||
dark_mode_support.set_preferred_app_mode) &&
diff --git ui/native_theme/native_theme_mac.mm ui/native_theme/native_theme_mac.mm
index b9feac1c87c51..bb63c6d350bfe 100644
index be2f769afe2d1..51bcf353b8797 100644
--- ui/native_theme/native_theme_mac.mm
+++ ui/native_theme/native_theme_mac.mm
@@ -50,6 +50,13 @@ bool InvertedColors() {
@@ -49,7 +49,7 @@ index b9feac1c87c51..bb63c6d350bfe 100644
} // namespace
// Helper object to respond to light mode/dark mode changeovers.
@@ -577,11 +584,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
@@ -594,11 +601,15 @@ void NativeThemeMac::PaintSelectedMenuItem(
void NativeThemeMac::InitializeDarkModeStateAndObserver() {
__block auto theme = this;
@@ -67,22 +67,11 @@ index b9feac1c87c51..bb63c6d350bfe 100644
theme->set_preferred_color_scheme(CalculatePreferredColorScheme());
theme->NotifyOnNativeThemeUpdated();
}];
@@ -590,7 +601,9 @@ void NativeThemeMac::InitializeDarkModeStateAndObserver() {
void NativeThemeMac::ConfigureWebInstance() {
// NativeThemeAura is used as web instance so we need to initialize its state.
NativeTheme* web_instance = NativeTheme::GetInstanceForWeb();
- web_instance->set_use_dark_colors(IsDarkMode());
+ if (!IsForcedLightMode()) {
+ web_instance->set_use_dark_colors(IsForcedDarkMode() || IsDarkMode());
+ }
web_instance->set_preferred_color_scheme(CalculatePreferredColorScheme());
web_instance->SetPreferredContrast(CalculatePreferredContrast());
web_instance->set_prefers_reduced_transparency(PrefersReducedTransparency());
diff --git ui/native_theme/native_theme_win.cc ui/native_theme/native_theme_win.cc
index 50647269ec84f..c947bd2717d04 100644
index 6af4df92820d5..c2ae96510d011 100644
--- ui/native_theme/native_theme_win.cc
+++ ui/native_theme/native_theme_win.cc
@@ -662,14 +662,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -653,14 +653,17 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// Windows high contrast modes are entirely different themes,
// so let them take priority over dark mode.
// ...unless --force-dark-mode was specified in which case caveat emptor.
@@ -102,7 +91,7 @@ index 50647269ec84f..c947bd2717d04 100644
return NativeTheme::CalculatePreferredColorScheme();
// According to the spec, the preferred color scheme for web content is 'dark'
@@ -1660,8 +1663,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
@@ -1651,8 +1654,9 @@ void NativeThemeWin::RegisterColorFilteringRegkeyObserver() {
}
void NativeThemeWin::UpdateDarkModeStatus() {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/child_process_launcher_helper_linux.cc content/browser/child_process_launcher_helper_linux.cc
index 321faab043958..7586dc52e50ca 100644
index e21cd3f9c447d..3e366eab65155 100644
--- content/browser/child_process_launcher_helper_linux.cc
+++ content/browser/child_process_launcher_helper_linux.cc
@@ -188,7 +188,7 @@ ZygoteCommunication* ChildProcessLauncherHelper::GetZygoteForLaunch() {

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/renderer/platform/heap/thread_local.h third_party/blink/renderer/platform/heap/thread_local.h
index e0519b0982e43..40637ce5952e3 100644
index a672ba785ac06..13d794dc15c16 100644
--- third_party/blink/renderer/platform/heap/thread_local.h
+++ third_party/blink/renderer/platform/heap/thread_local.h
@@ -36,7 +36,7 @@
@@ -37,7 +37,7 @@
#if BLINK_HEAP_HIDE_THREAD_LOCAL_IN_LIBRARY
#define BLINK_HEAP_THREAD_LOCAL_MODEL "local-dynamic"
#else

View File

@@ -1,5 +1,5 @@
diff --git device/bluetooth/BUILD.gn device/bluetooth/BUILD.gn
index 6a662873b042a..5d0eb2347513e 100644
index e09b425de7f7c..d2f0993eac5cb 100644
--- device/bluetooth/BUILD.gn
+++ device/bluetooth/BUILD.gn
@@ -47,10 +47,12 @@ source_set("deprecated_experimental_mojo") {

View File

@@ -1,68 +0,0 @@
diff --git ui/gfx/x/connection.cc ui/gfx/x/connection.cc
index e9034ec7dea3e..b11df74c1d9dd 100644
--- ui/gfx/x/connection.cc
+++ ui/gfx/x/connection.cc
@@ -183,6 +183,7 @@ Connection::Connection(const std::string& address)
Connection::~Connection() {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
+ window_event_manager_.Reset();
platform_event_source.reset();
}
diff --git ui/gfx/x/window_event_manager.cc ui/gfx/x/window_event_manager.cc
index 7aee20ec3d2b7..9b5b320402ff8 100644
--- ui/gfx/x/window_event_manager.cc
+++ ui/gfx/x/window_event_manager.cc
@@ -113,10 +113,18 @@ WindowEventManager::WindowEventManager(Connection* connection)
: connection_(connection) {}
WindowEventManager::~WindowEventManager() {
+ Reset();
+}
+
+void WindowEventManager::Reset() {
+ if (!connection_) {
+ return;
+ }
// Clear events still requested by not-yet-deleted ScopedEventSelectors.
for (const auto& mask_pair : mask_map_) {
SetEventMask(connection_, mask_pair.first, EventMask::NoEvent);
}
+ connection_ = nullptr;
}
void WindowEventManager::SelectEvents(Window window, EventMask event_mask) {
@@ -143,7 +151,9 @@ void WindowEventManager::AfterMaskChanged(Window window, EventMask old_mask) {
return;
}
- SetEventMask(connection_, window, new_mask);
+ if (connection_) {
+ SetEventMask(connection_, window, new_mask);
+ }
if (new_mask == EventMask::NoEvent) {
mask_map_.erase(window);
diff --git ui/gfx/x/window_event_manager.h ui/gfx/x/window_event_manager.h
index 4b85f49d3b2cc..c0158edd6901b 100644
--- ui/gfx/x/window_event_manager.h
+++ ui/gfx/x/window_event_manager.h
@@ -53,6 +53,8 @@ class WindowEventManager {
~WindowEventManager();
+ void Reset();
+
private:
friend class ScopedEventSelector;
@@ -70,7 +72,7 @@ class WindowEventManager {
// necessary.
void AfterMaskChanged(Window window, EventMask old_mask);
- const raw_ptr<Connection> connection_;
+ raw_ptr<Connection> connection_;
std::map<Window, std::unique_ptr<MultiMask>> mask_map_;
};

View File

@@ -1,8 +1,8 @@
diff --git ui/accessibility/platform/BUILD.gn ui/accessibility/platform/BUILD.gn
index 4e23c38763184..162f8b453f4ac 100644
index 181b77f7ca411..79461dc7690ae 100644
--- ui/accessibility/platform/BUILD.gn
+++ ui/accessibility/platform/BUILD.gn
@@ -287,6 +287,10 @@ component("platform") {
@@ -290,6 +290,10 @@ component("platform") {
if (use_gio) {
configs += [ "//build/linux:gio_config" ]
}
@@ -14,10 +14,10 @@ index 4e23c38763184..162f8b453f4ac 100644
}
}
diff --git ui/gtk/BUILD.gn ui/gtk/BUILD.gn
index f4c5a2bcebbb7..5faf19980b1bd 100644
index 24f32893160ad..3315d46b4a910 100644
--- ui/gtk/BUILD.gn
+++ ui/gtk/BUILD.gn
@@ -174,4 +174,8 @@ component("gtk") {
@@ -175,4 +175,8 @@ component("gtk") {
# TODO: This should be removed.
deps += [ "//ui/ozone" ]

View File

@@ -1,13 +0,0 @@
diff --git third_party/libxml/linux/config.h third_party/libxml/linux/config.h
index c064071ce1545..65110af9a78f5 100644
--- third_party/libxml/linux/config.h
+++ third_party/libxml/linux/config.h
@@ -171,7 +171,7 @@
/* #undef XML_SOCKLEN_T */
/* TLS specifier */
-#define XML_THREAD_LOCAL _Thread_local
+/* #undef XML_THREAD_LOCAL */
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the

View File

@@ -76,7 +76,7 @@ index 29db798e8b171..f8b9546b90321 100644
}
diff --git ui/linux/linux_ui.h ui/linux/linux_ui.h
index 9cc65cf571346..275b548fcc2cf 100644
index 69f678a91012f..d518b476002b3 100644
--- ui/linux/linux_ui.h
+++ ui/linux/linux_ui.h
@@ -19,6 +19,10 @@

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/views/profiles/profile_menu_view_base.cc chrome/browser/ui/views/profiles/profile_menu_view_base.cc
index 7de5f5de28091..b2bccf7d9e3d9 100644
index 1ea1910a5bfe1..c73433d1ad893 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1038,8 +1038,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
@@ -1042,8 +1042,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom();

View File

@@ -30,10 +30,10 @@ index c30066f515f63..450c67882ea91 100644
}
if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc
index 96b2fd7cad015..2fa7f4016fe5a 100644
index 200d6692664e9..62dce72284b83 100644
--- base/task/current_thread.cc
+++ base/task/current_thread.cc
@@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver(
@@ -51,6 +51,8 @@ void CurrentThread::AddDestructionObserver(
void CurrentThread::RemoveDestructionObserver(
DestructionObserver* destruction_observer) {
@@ -43,12 +43,12 @@ index 96b2fd7cad015..2fa7f4016fe5a 100644
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/task/current_thread.h base/task/current_thread.h
index 33e320fd647cb..5f67ef65d4392 100644
index f572b46819262..06b0a15e359ae 100644
--- base/task/current_thread.h
+++ base/task/current_thread.h
@@ -133,6 +133,12 @@ class BASE_EXPORT CurrentThread {
// with a null callback to clear any potentially pending callbacks.
void RegisterOnNextIdleCallback(OnceClosure on_next_idle_callback);
@@ -163,6 +163,12 @@ class BASE_EXPORT CurrentThread {
RegisterOnNextIdleCallbackPasskey,
OnceClosure on_next_idle_callback);
+#if BUILDFLAG(IS_WIN)
+ void set_os_modal_loop(bool os_modal_loop) { os_modal_loop_ = os_modal_loop; }
@@ -59,7 +59,7 @@ index 33e320fd647cb..5f67ef65d4392 100644
// Enables nested task processing in scope of an upcoming native message loop.
// Some unwanted message loops may occur when using common controls or printer
// functions. Hence, nested task processing is disabled by default to avoid
@@ -197,6 +203,13 @@ class BASE_EXPORT CurrentThread {
@@ -227,6 +233,13 @@ class BASE_EXPORT CurrentThread {
friend class web::WebTaskEnvironment;
raw_ptr<sequence_manager::internal::SequenceManagerImpl> current_;

View File

@@ -1,13 +0,0 @@
diff --git mojo/public/tools/bindings/generators/mojom_ts_generator.py mojo/public/tools/bindings/generators/mojom_ts_generator.py
index 98516f03276e4..a1bda9c021c52 100644
--- mojo/public/tools/bindings/generators/mojom_ts_generator.py
+++ mojo/public/tools/bindings/generators/mojom_ts_generator.py
@@ -177,6 +177,8 @@ def _GetWebUiModulePath(module):
path = module.metadata.get('webui_module_path')
if path is None or path == '/':
return path
+ if path == '':
+ return '/'
if _IsAbsoluteChromeResourcesPath(path):
return path.rstrip('/') + '/'
return '/{}/'.format(path.strip('/'))

View File

@@ -1,8 +1,8 @@
diff --git net/base/load_flags_list.h net/base/load_flags_list.h
index 17b1395583e24..9b41b21f42b1f 100644
index 0e563dbb253ca..891b2bbc3785c 100644
--- net/base/load_flags_list.h
+++ net/base/load_flags_list.h
@@ -114,3 +114,6 @@ LOAD_FLAG(DISABLE_SHARED_DICTIONARY_AFTER_CROSS_ORIGIN_REDIRECT, 1 << 18)
@@ -115,3 +115,6 @@ LOAD_FLAG(DISABLE_SHARED_DICTIONARY_AFTER_CROSS_ORIGIN_REDIRECT, 1 << 18)
// This flag is used to bypass HSTS upgrades. This flag must be set for AIA,
// CRL, and OCSP requests in order to prevent circular dependencies.
LOAD_FLAG(SHOULD_BYPASS_HSTS, 1 << 19)
@@ -10,10 +10,10 @@ index 17b1395583e24..9b41b21f42b1f 100644
+// This load will not send any cookies. For CEF usage.
+LOAD_FLAG(DO_NOT_SEND_COOKIES, 1 << 20)
diff --git net/url_request/url_request_http_job.cc net/url_request/url_request_http_job.cc
index dd14dce03cc93..eb25e13036d1a 100644
index 6eeea59318bbc..6e46770ca0f74 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -1812,7 +1812,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
@@ -1850,7 +1850,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.

View File

@@ -1,8 +1,8 @@
diff --git net/test/embedded_test_server/embedded_test_server.cc net/test/embedded_test_server/embedded_test_server.cc
index 357b362117d20..b5c7cfe5dd511 100644
index 3167953b790e5..bc328c0a1cedc 100644
--- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc
@@ -997,7 +997,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
@@ -1015,7 +1015,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@@ -11,7 +11,7 @@ index 357b362117d20..b5c7cfe5dd511 100644
if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false;
@@ -1024,7 +1024,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
@@ -1042,7 +1042,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@@ -13,10 +13,10 @@ index 431df5d50debe..0fcc9ea8fbb1a 100644
return nullptr;
}
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index a6c27fe9b7f71..11060758d670f 100644
index b62442d2213a7..e7275588c01ce 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3272,6 +3272,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
@@ -3305,6 +3305,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
@@ -29,17 +29,17 @@ index a6c27fe9b7f71..11060758d670f 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 28f81135df654..85125c19aaa2f 100644
index 709246523b417..1245082f6016c 100644
--- content/browser/renderer_host/render_widget_host_impl.h
+++ content/browser/renderer_host/render_widget_host_impl.h
@@ -807,6 +807,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -808,6 +808,7 @@ class CONTENT_EXPORT RenderWidgetHostImpl
void ProgressFlingIfNeeded(base::TimeTicks current_time);
void StopFling();
+ void SetCompositorForFlingScheduler(ui::Compositor* compositor);
// The RenderWidgetHostImpl will keep showing the old page (for a while) after
// navigation until the first frame of the new page arrives. This reduces
RenderWidgetHostViewBase* GetRenderWidgetHostViewBase();
diff --git content/common/input/fling_scheduler_base.h content/common/input/fling_scheduler_base.h
index e8ee63f3abc2e..2d1717082759d 100644
--- content/common/input/fling_scheduler_base.h

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index 1d30371b0131c..1ba3d15a3c0af 100644
index dc474d9ca5c3a..764ae7c3ddce2 100644
--- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc
@@ -23,6 +23,7 @@
@@ -11,7 +11,7 @@ index 1d30371b0131c..1ba3d15a3c0af 100644
#include "chrome/browser/download/download_core_service_factory.h"
#include "chrome/browser/download/download_core_service_impl.h"
@@ -63,6 +64,10 @@
#include "chrome/browser/download/bubble/download_bubble_prefs.h"
#include "chrome/browser/flags/android/chrome_feature_list.h"
#endif
+#if BUILDFLAG(ENABLE_CEF)
@@ -84,7 +84,7 @@ index c85248ab0d0a0..05b3454c0356d 100644
}
diff --git chrome/browser/ui/webui/print_preview/print_preview_ui.cc chrome/browser/ui/webui/print_preview/print_preview_ui.cc
index e13101506295d..4acd84f6c150f 100644
index ef26355bd31b8..6b00ae03e6ac8 100644
--- chrome/browser/ui/webui/print_preview/print_preview_ui.cc
+++ chrome/browser/ui/webui/print_preview/print_preview_ui.cc
@@ -25,6 +25,7 @@
@@ -109,7 +109,7 @@ index e13101506295d..4acd84f6c150f 100644
constexpr char kInvalidArgsForDidStartPreview[] =
"Invalid arguments for DidStartPreview";
constexpr char kInvalidPageIndexForDidPreviewPage[] =
@@ -301,7 +309,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
@@ -309,7 +317,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
source->AddLocalizedStrings(kLocalizedStrings);
#if !BUILDFLAG(IS_CHROMEOS)

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
index 75fb743f95c37..a79ca84b4ff4c 100644
index 418f53b0db3a2..4abcc0005eb1d 100644
--- chrome/browser/printing/printer_query.cc
+++ chrome/browser/printing/printer_query.cc
@@ -124,6 +124,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
@@ -11,12 +11,12 @@ index 75fb743f95c37..a79ca84b4ff4c 100644
PrinterQuery::~PrinterQuery() {
diff --git printing/printing_context.h printing/printing_context.h
index 6db58a9992642..ac57e5c200079 100644
index 63f170c950504..962e60d23da59 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -204,6 +204,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
int job_id() const { return job_id_; }
@@ -215,6 +215,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
void SetJobId(int job_id);
#endif
+ void set_render_ids(int render_process_id, int render_frame_id) {
+ render_process_id_ = render_process_id;
@@ -28,9 +28,9 @@ index 6db58a9992642..ac57e5c200079 100644
protected:
PrintingContext(Delegate* delegate, ProcessBehavior process_behavior);
@@ -234,6 +241,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
// The job id for the current job. The value is 0 if no jobs are active.
int job_id_;
@@ -248,6 +255,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
// management.
int job_id_ = kNoPrintJobId;
+ // Routing IDs for the frame that owns this object.
+ int render_process_id_ = 0;

View File

@@ -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 401a00dba286c..d8b2f261bc6e6 100644
index caa732b8f72d3..ccddb59643734 100644
--- content/browser/renderer_host/render_view_host_impl.cc
+++ content/browser/renderer_host/render_view_host_impl.cc
@@ -710,6 +710,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
@@ -709,6 +709,8 @@ bool RenderViewHostImpl::IsRenderViewLive() const {
}
void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {

View File

@@ -1,8 +1,8 @@
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index 6377dafc2eeac..1e0062bd83343 100644
index 9b37b8a18c5c0..048e70377224c 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -10082,6 +10082,7 @@ void RenderFrameHostImpl::CommitNavigation(
@@ -10278,6 +10278,7 @@ void RenderFrameHostImpl::CommitNavigation(
auto browser_calc_origin_to_commit =
navigation_request->GetOriginToCommitWithDebugInfo();
if (!process_lock.is_error_page() && !is_mhtml_subframe &&

View File

@@ -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 268533e5bd0ef..48e2089d95729 100644
index 7942ee12c003c..a742da36eb1a6 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 268533e5bd0ef..48e2089d95729 100644
#include <set>
#include <utility>
@@ -747,10 +748,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
@@ -725,10 +726,12 @@ gfx::Rect RenderWidgetHostViewAura::GetViewBounds() {
void RenderWidgetHostViewAura::UpdateBackgroundColor() {
DCHECK(GetBackgroundColor());
@@ -27,7 +27,7 @@ index 268533e5bd0ef..48e2089d95729 100644
}
#if BUILDFLAG(IS_WIN)
@@ -2381,6 +2384,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
@@ -2353,6 +2356,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor()
: SK_ColorWHITE);
UpdateFrameSinkIdRegistration();

View File

@@ -19,10 +19,10 @@ index 22747ebcf31c0..8fba5da85a656 100644
bool Screen::GetDisplayWithDisplayId(int64_t display_id,
diff --git ui/display/win/screen_win.cc ui/display/win/screen_win.cc
index 773fbb8e90276..bdbda65c05dd6 100644
index 6b6189a124e3f..02fc6c885d11d 100644
--- ui/display/win/screen_win.cc
+++ ui/display/win/screen_win.cc
@@ -535,7 +535,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
@@ -534,7 +534,7 @@ gfx::Rect ScreenWin::ScreenToDIPRect(HWND hwnd, const gfx::Rect& pixel_bounds) {
gfx::PointF(pixel_bounds.origin()), screen_win_display));
const float scale_factor =
1.0f / screen_win_display.display().device_scale_factor();
@@ -31,7 +31,7 @@ index 773fbb8e90276..bdbda65c05dd6 100644
}
// static
@@ -550,7 +550,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
@@ -549,7 +549,7 @@ gfx::Rect ScreenWin::DIPToScreenRect(HWND hwnd, const gfx::Rect& dip_bounds) {
const gfx::Point origin =
display::win::DIPToScreenPoint(dip_bounds.origin(), screen_win_display);
const float scale_factor = screen_win_display.display().device_scale_factor();

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
index 7df34f2bc2409..fdc9d91e9d29b 100644
index 101044d12aa89..795fb5f2d0738 100644
--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
+++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
@@ -23,6 +23,7 @@
@@ -10,7 +10,7 @@ index 7df34f2bc2409..fdc9d91e9d29b 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/analysis/analysis_settings.h"
#include "chrome/browser/enterprise/connectors/analysis/content_analysis_dialog.h"
@@ -246,6 +247,9 @@ bool ContentAnalysisDelegate::IsEnabled(Profile* profile,
@@ -265,6 +266,9 @@ bool ContentAnalysisDelegate::IsEnabled(Profile* profile,
GURL url,
Data* data,
AnalysisConnector connector) {
@@ -20,33 +20,11 @@ index 7df34f2bc2409..fdc9d91e9d29b 100644
auto* service = ConnectorsServiceFactory::GetForBrowserContext(profile);
// If the corresponding Connector policy isn't set, don't perform scans.
if (!service || !service->IsConnectorEnabled(connector))
diff --git chrome/browser/feedback/system_logs/log_sources/related_website_sets_source.cc chrome/browser/feedback/system_logs/log_sources/related_website_sets_source.cc
index e6f1e81de0eb4..1b2333023320a 100644
--- chrome/browser/feedback/system_logs/log_sources/related_website_sets_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/related_website_sets_source.cc
@@ -9,6 +9,7 @@
#include "base/json/json_writer.h"
#include "base/values.h"
+#include "cef/libcef/features/runtime.h"
#include "chrome/browser/first_party_sets/first_party_sets_policy_service.h"
#include "chrome/browser/first_party_sets/first_party_sets_policy_service_factory.h"
#include "chrome/browser/profiles/profile.h"
@@ -50,6 +51,9 @@ const char* GetSiteType(const net::SiteType type) {
// "PrimarySites": [ "https://example2.com", "https://example2.com.co" ]
// } ]
std::string ComputeRelatedWebsiteSetsInfo() {
+ if (cef::IsAlloyRuntimeEnabled()) {
+ return "";
+ }
#if BUILDFLAG(IS_CHROMEOS_ASH)
Profile* profile = ProfileManager::GetActiveUserProfile();
#else
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index 5923117661980..c363f0039d243 100644
index 62d54608cfe39..b0c5e3970de03 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -22,6 +22,7 @@
@@ -23,6 +23,7 @@
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -54,7 +32,7 @@ index 5923117661980..c363f0039d243 100644
#include "chrome/browser/browser_features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
@@ -271,8 +272,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile)
@@ -275,8 +276,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile)
base::Unretained(this)));
cookie_settings_ = CookieSettingsFactory::GetForProfile(profile);
cookie_settings_observation_.Observe(cookie_settings_.get());
@@ -67,7 +45,7 @@ index 5923117661980..c363f0039d243 100644
DisableQuicIfNotAllowed();
@@ -442,6 +445,9 @@ void ProfileNetworkContextService::OnTruncatedCookieBlockingChanged() {
@@ -468,6 +471,9 @@ void ProfileNetworkContextService::OnTruncatedCookieBlockingChanged() {
void ProfileNetworkContextService::OnFirstPartySetsEnabledChanged(
bool enabled) {
@@ -77,7 +55,7 @@ index 5923117661980..c363f0039d243 100644
// Update all FPS Access Delegates on the FPS service to be `enabled`.
first_party_sets::FirstPartySetsPolicyServiceFactory::GetForBrowserContext(
profile_)
@@ -814,9 +820,26 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -913,9 +919,26 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
network_context_params->cookie_manager_params =
CreateCookieManagerParams(profile_, *cookie_settings_);
@@ -105,7 +83,7 @@ index 5923117661980..c363f0039d243 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -825,15 +848,14 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -924,15 +947,14 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
local_state->GetFilePath(prefs::kDiskCacheDir);
if (!disk_cache_dir.empty())
base_cache_path = disk_cache_dir.Append(base_cache_path.BaseName());
@@ -125,7 +103,7 @@ index 5923117661980..c363f0039d243 100644
network_context_params->file_paths->data_directory =
path.Append(chrome::kNetworkDataDirname);
network_context_params->file_paths->unsandboxed_data_path = path;
@@ -986,6 +1008,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -1104,6 +1126,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
network_context_params->block_trust_tokens =
anti_abuse_content_setting == CONTENT_SETTING_BLOCK;
@@ -133,7 +111,7 @@ index 5923117661980..c363f0039d243 100644
network_context_params->first_party_sets_access_delegate_params =
network::mojom::FirstPartySetsAccessDelegateParams::New();
network_context_params->first_party_sets_access_delegate_params->enabled =
@@ -1002,6 +1025,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -1120,6 +1143,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
GetForBrowserContext(profile_);
DCHECK(fps_service);
fps_service->AddRemoteAccessDelegate(std::move(fps_access_delegate_remote));
@@ -186,7 +164,7 @@ index 77522f65b7b6e..51cc2d60d4b8d 100644
GetInstance()->GetServiceForBrowserContext(profile, true));
}
diff --git net/cookies/cookie_monster.cc net/cookies/cookie_monster.cc
index 0c3ce2e289b59..7ea3744e33b60 100644
index 643279afbb341..aadd242e17cd0 100644
--- net/cookies/cookie_monster.cc
+++ net/cookies/cookie_monster.cc
@@ -552,6 +552,25 @@ void CookieMonster::SetCookieableSchemes(
@@ -216,7 +194,7 @@ index 0c3ce2e289b59..7ea3744e33b60 100644
void CookieMonster::SetPersistSessionCookies(bool persist_session_cookies) {
DCHECK_CALLED_ON_VALID_THREAD(thread_checker_);
diff --git net/cookies/cookie_monster.h net/cookies/cookie_monster.h
index 40d12ecb55155..b87a1cb86f85c 100644
index 6871ed30edce4..594c0c5b5f4d5 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -208,6 +208,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@@ -245,10 +223,10 @@ index 61fd008fc067e..73909be088278 100644
// reset to null.
const CookieAccessDelegate* cookie_access_delegate() const {
diff --git services/network/cookie_manager.cc services/network/cookie_manager.cc
index 708a4ae904d88..dc63376f7a50e 100644
index e5e410525d8a6..ca1225642ef64 100644
--- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc
@@ -303,14 +303,9 @@ void CookieManager::AllowFileSchemeCookies(
@@ -310,14 +310,9 @@ void CookieManager::AllowFileSchemeCookies(
AllowFileSchemeCookiesCallback callback) {
OnSettingsWillChange();
@@ -267,10 +245,10 @@ index 708a4ae904d88..dc63376f7a50e 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 5ac5baaa6a86c..77575748bfacf 100644
index 4547a0dc69562..d03e771ee52b8 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2506,16 +2506,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2385,16 +2385,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@@ -299,10 +277,10 @@ index 5ac5baaa6a86c..77575748bfacf 100644
base::FeatureList::IsEnabled(features::kFledgePst)) {
trust_token_store_ = std::make_unique<PendingTrustTokenStore>();
diff --git services/network/public/mojom/network_context.mojom services/network/public/mojom/network_context.mojom
index 93c755060193d..0ee9441892cda 100644
index 3096bd7d6719b..1c383acba0207 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -371,6 +371,9 @@ struct NetworkContextParams {
@@ -358,6 +358,9 @@ struct NetworkContextParams {
// cookies. Otherwise it should be false.
bool persist_session_cookies = false;

View File

@@ -1,32 +1,8 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 9aad7b5bb5ac8..bb31eb35c9aa4 100644
index a1db5b377647e..3442371165570 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -543,10 +543,6 @@ class LoginHandlerDelegate {
}
WebContents* web_contents = web_contents_getter_.Run();
- if (!web_contents) {
- OnAuthCredentials(absl::nullopt);
- return;
- }
// WeakPtr is not strictly necessary here due to OnRequestCancelled.
creating_login_delegate_ = true;
@@ -598,12 +594,6 @@ void OnAuthRequiredContinuation(
mojo::PendingRemote<network::mojom::AuthChallengeResponder>
auth_challenge_responder,
base::RepeatingCallback<WebContents*(void)> web_contents_getter) {
- if (!web_contents_getter || !web_contents_getter.Run()) {
- mojo::Remote<network::mojom::AuthChallengeResponder>
- auth_challenge_responder_remote(std::move(auth_challenge_responder));
- auth_challenge_responder_remote->OnAuthCredentials(absl::nullopt);
- return;
- }
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,
@@ -3349,8 +3339,12 @@ void StoragePartitionImpl::GetQuotaSettings(
@@ -3345,8 +3345,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@@ -40,7 +16,7 @@ index 9aad7b5bb5ac8..bb31eb35c9aa4 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -3360,9 +3354,12 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -3356,9 +3360,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New();

View File

@@ -1,8 +1,8 @@
diff --git ui/views/controls/webview/webview.cc ui/views/controls/webview/webview.cc
index a2459f3137633..ad29bed6db43a 100644
index 8df4e98500b1e..f649d016e1e5a 100644
--- ui/views/controls/webview/webview.cc
+++ ui/views/controls/webview/webview.cc
@@ -160,6 +160,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
@@ -159,6 +159,10 @@ void WebView::EnableSizingFromWebContents(const gfx::Size& min_size,
}
}
@@ -14,10 +14,10 @@ index a2459f3137633..ad29bed6db43a 100644
if (crashed_overlay_view_.view() == crashed_overlay_view) {
return;
diff --git ui/views/controls/webview/webview.h ui/views/controls/webview/webview.h
index ff8755f0cfa28..0c7d3e22b863a 100644
index 3b829d69e4254..6d58b64600c58 100644
--- ui/views/controls/webview/webview.h
+++ ui/views/controls/webview/webview.h
@@ -91,6 +91,10 @@ class WEBVIEW_EXPORT WebView : public View,
@@ -93,6 +93,10 @@ class WEBVIEW_EXPORT WebView : public View,
void EnableSizingFromWebContents(const gfx::Size& min_size,
const gfx::Size& max_size);

View File

@@ -13,7 +13,7 @@ index 01d2a426e2c17..c239a2f6fc786 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 ba0387d5e3c5e..cc8f21ede9967 100644
index 9f955ab67a071..80f911e8157dd 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition(
@@ -25,7 +25,7 @@ index ba0387d5e3c5e..cc8f21ede9967 100644
// An off the record profile MUST only use in memory storage partitions.
CHECK(storage_partition_config.in_memory());
}
@@ -356,7 +356,8 @@ BrowserContext::CreateVideoDecodePerfHistory() {
@@ -364,7 +364,8 @@ BrowserContext::CreateVideoDecodePerfHistory() {
const bool kUseInMemoryDBDefault = false;
bool use_in_memory_db = base::GetFieldTrialParamByFeatureAsBool(
media::kMediaCapabilitiesWithParameters, kUseInMemoryDBParamName,
@@ -36,7 +36,7 @@ index ba0387d5e3c5e..cc8f21ede9967 100644
std::unique_ptr<media::VideoDecodeStatsDB> stats_db;
if (use_in_memory_db) {
diff --git content/public/browser/storage_partition_config.cc content/public/browser/storage_partition_config.cc
index 81013d6eb993a..89abfbe7fec6c 100644
index e82cdd66a2d5c..1816b2fe54ff5 100644
--- content/public/browser/storage_partition_config.cc
+++ content/public/browser/storage_partition_config.cc
@@ -7,6 +7,7 @@

View File

@@ -1,5 +1,5 @@
diff --git base/trace_event/builtin_categories.h base/trace_event/builtin_categories.h
index 85e831614b7f0..039db32544b4e 100644
index f82e41ee24e1d..b0b64ec7c249c 100644
--- base/trace_event/builtin_categories.h
+++ base/trace_event/builtin_categories.h
@@ -65,6 +65,8 @@

View File

@@ -1,15 +1,15 @@
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
index 4b17c7f0423bd..ea4c5838ec73f 100644
index bd539436f7204..7fa48b6b3dba0 100644
--- chrome/browser/ui/views/toolbar/app_menu.cc
+++ chrome/browser/ui/views/toolbar/app_menu.cc
@@ -993,7 +993,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
@@ -999,7 +999,9 @@ void AppMenu::RunMenu(views::MenuButtonController* host) {
host->button()->GetWidget(), host,
host->button()->GetAnchorBoundsInScreen(),
views::MenuAnchorPosition::kTopRight, ui::MENU_SOURCE_NONE,
- /*native_view_for_gestures=*/gfx::NativeView(), /*corners=*/absl::nullopt,
- /*native_view_for_gestures=*/gfx::NativeView(), /*corners=*/std::nullopt,
+ /*native_view_for_gestures=*/gfx::NativeView(),
+ /*parent_widget=*/gfx::kNullAcceleratedWidget,
+ /*corners=*/absl::nullopt,
+ /*corners=*/std::nullopt,
"Chrome.AppMenu.MenuHostInitToNextFramePresented");
}
@@ -58,10 +58,10 @@ index a6d70c71a1b3a..1b628f5284409 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index 2a0591cd1bc1a..99e1da00e1c75 100644
index cf08dd7f0a3ad..8366b2e4104d0 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -670,6 +670,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) {
@@ -671,6 +671,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) {
}
}
@@ -76,7 +76,7 @@ index 2a0591cd1bc1a..99e1da00e1c75 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -2070,6 +2078,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -2071,6 +2079,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false;
@@ -97,7 +97,7 @@ index 2a0591cd1bc1a..99e1da00e1c75 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 6195f237d49ba..fa566294dcdc7 100644
index 5b3eda36fa332..d307017905c7d 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -347,6 +347,10 @@ class GFX_EXPORT RenderText {
@@ -134,10 +134,10 @@ index c1c0631071a11..aa2c01ebce43e 100644
friend class test::InkDropHostTestApi;
diff --git ui/views/controls/button/label_button.cc ui/views/controls/button/label_button.cc
index 1fb9b89c56e6c..031221a565e4f 100644
index 0181ca73b3545..5a36c3b7a0a22 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -577,6 +577,12 @@ void LabelButton::OnThemeChanged() {
@@ -579,6 +579,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint();
}
@@ -151,24 +151,24 @@ index 1fb9b89c56e6c..031221a565e4f 100644
Button::StateChanged(old_state);
ResetLabelEnabledColor();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index 518d9d1d8d022..a997b7982bfb0 100644
index d5f56eb7b0bbf..65c8572b3f6d8 100644
--- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h
@@ -164,6 +164,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
ui::NativeTheme::State GetForegroundThemeState(
ui::NativeTheme::ExtraParams* params) const override;
@@ -173,6 +173,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
// widget, and the parent of the containing widget.
ButtonState GetVisualState() const;
+ // Sets the font list used by this button.
+ void SetFontList(const gfx::FontList& font_list);
+
protected:
ImageView* image() const { return image_; }
Label* label() const { return label_; }
LabelButtonImageContainer* image_container() {
return image_container_.get();
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index ac9fcfc932d0b..88b14d92d7278 100644
index bee3e8a14eb85..6246560284fe8 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -56,12 +56,29 @@ enum LabelPropertyKey {
@@ -51,12 +51,29 @@ enum LabelPropertyKey {
kLabelLineHeight,
kLabelObscured,
kLabelAllowCharacterBreak,
@@ -198,7 +198,7 @@ index ac9fcfc932d0b..88b14d92d7278 100644
} // namespace
namespace views {
@@ -481,6 +498,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
@@ -472,6 +489,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged);
}
@@ -214,7 +214,7 @@ index ac9fcfc932d0b..88b14d92d7278 100644
std::u16string Label::GetTooltipText() const {
return tooltip_text_;
}
@@ -801,6 +827,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
@@ -780,6 +806,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SelectRange(stored_selection_range_);
}
@@ -232,7 +232,7 @@ index ac9fcfc932d0b..88b14d92d7278 100644
}
diff --git ui/views/controls/label.h ui/views/controls/label.h
index a2c47313841e2..9123b35b320f9 100644
index c51219fabae91..7a84f2bb266d8 100644
--- ui/views/controls/label.h
+++ ui/views/controls/label.h
@@ -241,6 +241,10 @@ class VIEWS_EXPORT Label : public View,
@@ -246,7 +246,7 @@ index a2c47313841e2..9123b35b320f9 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
@@ -527,6 +531,7 @@ class VIEWS_EXPORT Label : public View,
@@ -521,6 +525,7 @@ class VIEWS_EXPORT Label : public View,
int max_width_ = 0;
// This is used in single-line mode.
int max_width_single_line_ = 0;
@@ -255,7 +255,7 @@ index a2c47313841e2..9123b35b320f9 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 896190761b3b2..66b128ac4ab89 100644
index 50fd3ae4ff13e..12961bf3e8316 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -566,7 +566,8 @@ void MenuController::Run(Widget* parent,
@@ -284,7 +284,7 @@ index 896190761b3b2..66b128ac4ab89 100644
if (item->GetParentMenuItem()) {
params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -2919,8 +2922,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
@@ -2918,8 +2921,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@@ -299,7 +299,7 @@ index 896190761b3b2..66b128ac4ab89 100644
// Show the sub-menu.
SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -2940,8 +2948,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2939,8 +2947,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@@ -411,10 +411,10 @@ index aafbdb2535951..8a8e78be4a649 100644
explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index f556d3d550f5f..5fc809acc0373 100644
index 372d0ce15587d..bbb7aec20c5e4 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1055,6 +1055,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -1072,6 +1072,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@@ -430,7 +430,7 @@ index f556d3d550f5f..5fc809acc0373 100644
} else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1119,6 +1128,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1136,6 +1145,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
}
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@@ -692,10 +692,10 @@ index 5db5ddfec3c1f..af0ee5a3ae030 100644
absl::optional<std::string> show_menu_host_duration_histogram =
absl::nullopt) = 0;
diff --git ui/views/controls/menu/menu_scroll_view_container.cc ui/views/controls/menu/menu_scroll_view_container.cc
index 8c093e002326c..3a500adcd39bb 100644
index 28ec8796ddf48..91e0bb2cbc1d2 100644
--- ui/views/controls/menu/menu_scroll_view_container.cc
+++ ui/views/controls/menu/menu_scroll_view_container.cc
@@ -250,6 +250,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
@@ -252,6 +252,11 @@ MenuScrollViewContainer::MenuScrollViewContainer(SubmenuView* content_view)
scroll_down_button_ = background_view_->AddChildView(
std::make_unique<MenuScrollButton>(content_view, false));
@@ -732,7 +732,7 @@ index 616efdce0e7c5..e0e20fdb0f80b 100644
#if !BUILDFLAG(IS_CHROMEOS_LACROS)
if (root_location != root_current_location &&
diff --git ui/views/view.h ui/views/view.h
index b5891ddd8c8ba..a2e494818836a 100644
index 73b9ef4f25337..aba651e745223 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -22,6 +22,7 @@
@@ -743,7 +743,7 @@ index b5891ddd8c8ba..a2e494818836a 100644
#include "build/build_config.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -286,7 +287,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -284,7 +285,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler,
public ui::PropertyHandler,

View File

@@ -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 84105424b8682..8aa281ca9d7e2 100644
index 6b51fa563b1b7..4dfac0e609ae6 100644
--- content/browser/renderer_host/render_widget_host_view_base.cc
+++ content/browser/renderer_host/render_widget_host_view_base.cc
@@ -648,6 +648,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
@@ -651,6 +651,14 @@ float RenderWidgetHostViewBase::GetScaleOverrideForCapture() const {
return scale_override_for_capture_;
}
@@ -18,7 +18,7 @@ index 84105424b8682..8aa281ca9d7e2 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 7c84c4deec00d..3a65053deca93 100644
index cc3738cade39a..acd61e28af374 100644
--- content/browser/renderer_host/render_widget_host_view_base.h
+++ content/browser/renderer_host/render_widget_host_view_base.h
@@ -71,6 +71,7 @@ class CursorManager;
@@ -29,7 +29,7 @@ index 7c84c4deec00d..3a65053deca93 100644
class SyntheticGestureTarget;
class TextInputManager;
class TouchSelectionControllerClientManager;
@@ -150,6 +151,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -151,6 +152,8 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
const gfx::Size& max_size) override;
void DisableAutoResize(const gfx::Size& new_size) override;
float GetDeviceScaleFactor() const final;
@@ -38,7 +38,7 @@ index 7c84c4deec00d..3a65053deca93 100644
TouchSelectionControllerClientManager*
GetTouchSelectionControllerClientManager() override;
ui::mojom::VirtualKeyboardMode GetVirtualKeyboardMode() override;
@@ -186,6 +189,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -190,6 +193,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// Called when screen information or native widget bounds change.
virtual void UpdateScreenInfo();
@@ -49,7 +49,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// Called by the TextInputManager to notify the view about being removed from
// the list of registered views, i.e., TextInputManager is no longer tracking
// TextInputState from this view. The RWHV should reset |text_input_manager_|
@@ -450,6 +457,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -451,6 +458,12 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
const gfx::Rect& bounds,
const gfx::Rect& anchor_rect) = 0;
@@ -62,7 +62,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// Sets the cursor for this view to the one specified.
virtual void UpdateCursor(const ui::Cursor& cursor) = 0;
@@ -733,6 +746,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -734,6 +747,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
// to all displays.
gfx::Size system_cursor_size_;
@@ -73,7 +73,7 @@ index 7c84c4deec00d..3a65053deca93 100644
private:
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
@@ -754,10 +771,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -755,10 +772,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView,
void SynchronizeVisualProperties();
@@ -85,7 +85,7 @@ index 7c84c4deec00d..3a65053deca93 100644
// renderer process changes. This method is called before notifying
// RenderWidgetHostImpl in order to allow the view to allocate a new
diff --git content/browser/renderer_host/render_widget_host_view_event_handler.cc content/browser/renderer_host/render_widget_host_view_event_handler.cc
index 9ced2dff5d5ff..7f8eba9858726 100644
index c3648f4e5158e..152f4fbcdac11 100644
--- content/browser/renderer_host/render_widget_host_view_event_handler.cc
+++ content/browser/renderer_host/render_widget_host_view_event_handler.cc
@@ -52,6 +52,10 @@ namespace {
@@ -133,7 +133,7 @@ index 9ced2dff5d5ff..7f8eba9858726 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 78d3cac258f65..d87bd0b564062 100644
index b3acdceb83879..7a2de7e7d0678 100644
--- content/public/browser/render_widget_host_view.h
+++ content/public/browser/render_widget_host_view.h
@@ -259,6 +259,14 @@ class CONTENT_EXPORT RenderWidgetHostView {
@@ -152,19 +152,19 @@ index 78d3cac258f65..d87bd0b564062 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 f3a0e657041d8..e9c01e177ea1a 100644
index 449f721727fb1..ab549b482bc36 100644
--- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc
@@ -1868,7 +1868,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1846,7 +1846,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds);
last_set_bounds_px_ = SanitizeBounds(bounds);
- req.parent = x_root_window_;
+ req.parent = properties.parent_widget == gfx::kNullAcceleratedWidget ?
+ x_root_window_ : static_cast<x11::Window>(properties.parent_widget);
req.x = bounds_in_pixels_.x();
req.y = bounds_in_pixels_.y();
req.width = bounds_in_pixels_.width();
req.x = last_set_bounds_px_.x();
req.y = last_set_bounds_px_.y();
req.width = last_set_bounds_px_.width();
diff --git ui/views/widget/desktop_aura/desktop_screen_win.cc ui/views/widget/desktop_aura/desktop_screen_win.cc
index e4e6d3104da9e..bb372b0cd2960 100644
--- ui/views/widget/desktop_aura/desktop_screen_win.cc
@@ -179,7 +179,7 @@ index e4e6d3104da9e..bb372b0cd2960 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 237f041a3a350..af978b38eb7e4 100644
index cb1601bffadd2..072ad958cc90c 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
@@ -175,6 +175,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
@@ -211,10 +211,10 @@ index 237f041a3a350..af978b38eb7e4 100644
properties->x11_extension_delegate = this;
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
index ee09e16753ff0..256a24a0c6ebd 100644
index 3151a2c872f4e..e14caeb1e6645 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.h
@@ -59,6 +59,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -58,6 +58,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
// Disables event listening to make |dialog| modal.
base::OnceClosure DisableEventListening();
@@ -223,7 +223,7 @@ index ee09e16753ff0..256a24a0c6ebd 100644
protected:
// Overridden from DesktopWindowTreeHost:
void Init(const Widget::InitParams& params) override;
@@ -68,6 +70,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -67,6 +69,8 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
const gfx::Vector2d& drag_offset,
Widget::MoveLoopSource source,
Widget::MoveLoopEscapeBehavior escape_behavior) override;
@@ -232,7 +232,7 @@ index ee09e16753ff0..256a24a0c6ebd 100644
// PlatformWindowDelegate:
void DispatchEvent(ui::Event* event) override;
@@ -116,6 +120,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
@@ -115,6 +119,9 @@ class VIEWS_EXPORT DesktopWindowTreeHostLinux
uint32_t modal_dialog_counter_ = 0;
@@ -243,10 +243,10 @@ index ee09e16753ff0..256a24a0c6ebd 100644
base::WeakPtrFactory<DesktopWindowTreeHostLinux> 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 23e321bf8ae39..2611612b2d3ed 100644
index f841bc5750537..aa2d4720c8152 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
@@ -286,8 +286,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
@@ -287,8 +287,8 @@ void DesktopWindowTreeHostPlatform::Init(const Widget::InitParams& params) {
if (properties.parent_widget) {
window_parent_ = DesktopWindowTreeHostPlatform::GetHostForWidget(
properties.parent_widget);
@@ -258,7 +258,7 @@ index 23e321bf8ae39..2611612b2d3ed 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 e4ab78b55cf4a..246f34a3fb471 100644
index d877d237b2c16..95ee3dd3253fd 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -181,16 +181,29 @@ void DesktopWindowTreeHostWin::Init(const Widget::InitParams& params) {
@@ -345,10 +345,10 @@ index e4ab78b55cf4a..246f34a3fb471 100644
}
diff --git ui/views/widget/desktop_aura/desktop_window_tree_host_win.h ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
index 013f571b52168..508054726fb7d 100644
index e963c861f7099..6bc0ac23db5e9 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -323,6 +323,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -322,6 +322,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@@ -360,10 +360,10 @@ index 013f571b52168..508054726fb7d 100644
// the implementation of ::ShowCursor() is based on a counter, so making this
// member static ensures that ::ShowCursor() is always called exactly once
diff --git ui/views/widget/widget.cc ui/views/widget/widget.cc
index 93b17a67f9541..320f7452d3567 100644
index 5093dee22b9da..3f29234369599 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -384,7 +384,8 @@ void Widget::Init(InitParams params) {
@@ -399,7 +399,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
@@ -373,7 +373,7 @@ index 93b17a67f9541..320f7452d3567 100644
is_headless_ = params.ShouldInitAsHeadless();
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
@@ -494,14 +495,22 @@ void Widget::Init(InitParams params) {
@@ -497,14 +498,22 @@ void Widget::Init(InitParams params) {
if (show_state == ui::SHOW_STATE_MAXIMIZED) {
Maximize();
@@ -397,7 +397,7 @@ index 93b17a67f9541..320f7452d3567 100644
}
}
@@ -1656,10 +1665,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
@@ -1646,10 +1655,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -415,10 +415,10 @@ index 93b17a67f9541..320f7452d3567 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index c7ba1a40a7e46..81a37e6ab2a87 100644
index 1939476d29da5..895df61324a2e 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -357,6 +357,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -356,6 +356,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// the concept with bubble anchoring a la BubbleDialogDelegateView.
gfx::NativeView parent = gfx::NativeView();
@@ -427,7 +427,7 @@ index c7ba1a40a7e46..81a37e6ab2a87 100644
// Specifies the initial bounds of the Widget. Default is empty, which means
// the NativeWidget may specify a default size. If the parent is specified,
// |bounds| is in the parent's coordinate system. If the parent is not
@@ -751,7 +753,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -752,7 +754,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
void ShowInactive();
// Activates the widget, assuming it already exists and is visible.
@@ -437,10 +437,10 @@ index c7ba1a40a7e46..81a37e6ab2a87 100644
// Deactivates the widget, making the next window in the Z order the active
// window.
diff --git ui/views/widget/widget_delegate.h ui/views/widget/widget_delegate.h
index 5fa4c9c0d4635..eadf9808c90ed 100644
index 30dfd721cceef..30831b22580a4 100644
--- ui/views/widget/widget_delegate.h
+++ ui/views/widget/widget_delegate.h
@@ -380,6 +380,10 @@ class VIEWS_EXPORT WidgetDelegate
@@ -375,6 +375,10 @@ class VIEWS_EXPORT WidgetDelegate
// Returns true if the title text should be centered.
bool ShouldCenterWindowTitleText() const;
@@ -466,7 +466,7 @@ index 3b9b00b7d79ae..e759e3c1a9f34 100644
if (native_widget_delegate->IsDialogBox()) {
*style |= DS_MODALFRAME;
diff --git ui/views/win/hwnd_message_handler.cc ui/views/win/hwnd_message_handler.cc
index 8044dca7ed9de..8db07e39c6822 100644
index 36a6e980495ea..24d75fb85a65f 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -767,7 +767,11 @@ bool HWNDMessageHandler::IsVisible() const {

View File

@@ -80,13 +80,13 @@ index 8af69cac78b74..9f74e511c263d 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 2dddd66f9326f..6d1979c993f10 100644
index 5a5791600d1aa..43cbd8abe4a75 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -228,6 +228,8 @@ viz_component("service") {
@@ -249,6 +249,8 @@ viz_component("service") {
"transitions/surface_animation_manager.h",
"transitions/transferable_resource_tracker.cc",
"transitions/transferable_resource_tracker.h",
"viz_service_export.h",
+ "//cef/libcef/browser/osr/software_output_device_proxy.cc",
+ "//cef/libcef/browser/osr/software_output_device_proxy.h",
]
@@ -150,7 +150,7 @@ index 796ae2688436e..37a3406790210 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 d149ead2520ed..a81dca282b8ae 100644
index 516c7f65097f1..49e0fdc6b4109 100644
--- content/browser/compositor/viz_process_transport_factory.cc
+++ content/browser/compositor/viz_process_transport_factory.cc
@@ -408,8 +408,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -223,7 +223,7 @@ index 2f462f0deb5fc..695869b83cefa 100644
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git ui/compositor/compositor.h ui/compositor/compositor.h
index d2d3757f75a6b..a69f9af6c2c08 100644
index 86d021ca68674..26f6096b99c1f 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -33,7 +33,9 @@
@@ -236,7 +236,7 @@ index d2d3757f75a6b..a69f9af6c2c08 100644
#include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "services/viz/privileged/mojom/compositing/display_private.mojom.h"
@@ -149,6 +151,14 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -146,6 +148,14 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@@ -251,7 +251,7 @@ index d2d3757f75a6b..a69f9af6c2c08 100644
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -192,6 +202,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -189,6 +199,9 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -261,7 +261,7 @@ index d2d3757f75a6b..a69f9af6c2c08 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
@@ -543,6 +556,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -539,6 +552,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

View File

@@ -1,8 +1,8 @@
diff --git content/browser/web_contents/web_contents_impl.cc content/browser/web_contents/web_contents_impl.cc
index be3b154fa5155..9887b0e3d0419 100644
index 21815a78d2429..bcad76251473b 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3450,6 +3450,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3471,6 +3471,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
params.main_frame_name, GetOpener(), primary_main_frame_policy,
base::UnguessableToken::Create());
@@ -15,7 +15,7 @@ index be3b154fa5155..9887b0e3d0419 100644
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3460,6 +3466,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3481,6 +3487,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -23,7 +23,7 @@ index be3b154fa5155..9887b0e3d0419 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3655,6 +3662,9 @@ void WebContentsImpl::RenderWidgetCreated(
@@ -3676,6 +3683,9 @@ void WebContentsImpl::RenderWidgetCreated(
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
"render_widget_host", render_widget_host);
created_widgets_.insert(render_widget_host);
@@ -33,7 +33,7 @@ index be3b154fa5155..9887b0e3d0419 100644
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -4455,6 +4465,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4480,6 +4490,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options);
}
@@ -49,7 +49,7 @@ index be3b154fa5155..9887b0e3d0419 100644
// Check whether there is an available prerendered page for this navigation if
// this is not for guest. If it exists, take WebContents pre-created for
// hosting the prerendered page instead of creating new WebContents.
@@ -8613,6 +8632,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -8679,6 +8698,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
}
CloseListenerManager::DidChangeFocusedFrame(this);
@@ -60,10 +60,10 @@ index be3b154fa5155..9887b0e3d0419 100644
void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 668d0802d8d9f..8fc7836524f42 100644
index 943d2c2a16821..976c257189bda 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -99,10 +99,12 @@ class BrowserContext;
@@ -101,10 +101,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@@ -76,7 +76,7 @@ index 668d0802d8d9f..8fc7836524f42 100644
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -249,6 +251,10 @@ class WebContents : public PageNavigator,
@@ -251,6 +253,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
@@ -88,7 +88,7 @@ index 668d0802d8d9f..8fc7836524f42 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 4b32bf8ccc4ed..a0c43926070aa 100644
index 0a80169aa10cf..8165b00da16c2 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -60,9 +60,11 @@ class EyeDropperListener;
@@ -119,10 +119,10 @@ index 4b32bf8ccc4ed..a0c43926070aa 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 a3b5e3b1ad2df..c85cb62b01cc2 100644
index 839fa5e82f140..891784b2f3e5a 100644
--- content/public/browser/web_contents_observer.h
+++ content/public/browser/web_contents_observer.h
@@ -225,6 +225,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -227,6 +227,9 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
virtual void OnCaptureHandleConfigUpdate(
const blink::mojom::CaptureHandleConfig& config) {}
@@ -132,7 +132,7 @@ index a3b5e3b1ad2df..c85cb62b01cc2 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() {}
@@ -840,6 +843,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -846,6 +849,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
// WebContents has gained/lost focus.
virtual void OnFocusChangedInPage(FocusedNodeDetails* details) {}

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/platform/platform.h third_party/blink/public/platform/platform.h
index df350be109056..f55ab1705ecc0 100644
index 52829e870d30a..bf87e1750cd3f 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -780,6 +780,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -781,6 +781,11 @@ class BLINK_PLATFORM_EXPORT Platform {
}
#endif
@@ -15,7 +15,7 @@ index df350be109056..f55ab1705ecc0 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 b9a32cced2024..39982bd04f736 100644
index ae0907dfd95ec..63620f0aadc14 100644
--- third_party/blink/renderer/core/inspector/devtools_session.cc
+++ third_party/blink/renderer/core/inspector/devtools_session.cc
@@ -10,6 +10,7 @@

View File

@@ -1,5 +1,5 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index 6219eadefa976..ff0c649c46af1 100644
index 2ba868f0efb2e..4ec2a9ca69cab 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -345,6 +345,7 @@ class BLINK_EXPORT WebView {
@@ -11,7 +11,7 @@ index 6219eadefa976..ff0c649c46af1 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 adb1c7ca2fcdf..4cc86141a88bf 100644
index aafdfd4fffd0b..4215f48d15284 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) {
@@ -39,7 +39,7 @@ index adb1c7ca2fcdf..4cc86141a88bf 100644
fullscreen_controller_(std::make_unique<FullscreenController>(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 5a9992141dbbf..ce030e2b02ff0 100644
index 25566d1e5a367..6ad48660a42ee 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -139,7 +139,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -52,7 +52,7 @@ index 5a9992141dbbf..ce030e2b02ff0 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -861,6 +862,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -871,6 +872,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 5a9992141dbbf..ce030e2b02ff0 100644
gfx::Transform device_emulation_transform_;
diff --git third_party/blink/renderer/core/page/chrome_client_impl.cc third_party/blink/renderer/core/page/chrome_client_impl.cc
index 4d1c8dcd1fca7..f8de0cf7498aa 100644
index e8c40f756f746..d3738d1388c96 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -928,7 +928,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
@@ -981,7 +981,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();

View File

@@ -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 44d34bbffa88f..39ca99524dda6 100644
index 6f6a3c9c374f7..00caa794fdd26 100644
--- chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
+++ chrome/browser/feedback/system_logs/log_sources/chrome_internal_log_source.cc
@@ -19,10 +19,12 @@
@@ -15,7 +15,7 @@ index 44d34bbffa88f..39ca99524dda6 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/extensions/chrome_content_browser_client_extensions_part.h"
#include "chrome/browser/google/google_brand.h"
@@ -425,7 +427,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
@@ -421,7 +423,11 @@ void ChromeInternalLogSource::Fetch(SysLogsSourceCallback callback) {
response->emplace(kOsVersionTag, os_version);
#endif
@@ -28,7 +28,7 @@ index 44d34bbffa88f..39ca99524dda6 100644
PopulateExtensionInfoLogs(response.get());
PopulatePowerApiLogs(response.get());
#if BUILDFLAG(IS_WIN)
@@ -513,8 +519,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
@@ -509,8 +515,12 @@ void ChromeInternalLogSource::PopulateExtensionInfoLogs(
if (!profile)
return;
@@ -41,7 +41,7 @@ index 44d34bbffa88f..39ca99524dda6 100644
std::string extensions_list;
for (const scoped_refptr<const extensions::Extension>& extension :
extension_registry->enabled_extensions()) {
@@ -615,6 +625,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
@@ -611,6 +621,8 @@ void ChromeInternalLogSource::PopulateOnboardingTime(
#if BUILDFLAG(IS_WIN)
void ChromeInternalLogSource::PopulateUsbKeyboardDetected(
SystemLogsResponse* response) {

View File

@@ -1,8 +1,8 @@
diff --git sandbox/policy/win/sandbox_win.cc sandbox/policy/win/sandbox_win.cc
index 322f0e4b0f944..5e2a99dc27a25 100644
index 714422bd2d088..3aa2e830e6148 100644
--- sandbox/policy/win/sandbox_win.cc
+++ sandbox/policy/win/sandbox_win.cc
@@ -1003,6 +1003,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
@@ -993,6 +993,13 @@ ResultCode SandboxWin::StartSandboxedProcess(
const base::HandlesToInheritVector& handles_to_inherit,
SandboxDelegate* delegate,
base::Process* process) {

View File

@@ -12,7 +12,7 @@ index 57409176ff044..58bb027580bbb 100644
} // namespace sandbox
diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc
index f54b6c9d83627..3a513f05e851e 100644
index 1d5c93a0792b1..46600d1ae70cc 100644
--- sandbox/win/src/sandbox_policy_base.cc
+++ sandbox/win/src/sandbox_policy_base.cc
@@ -189,12 +189,12 @@ PolicyGlobal* ConfigBase::policy() {
@@ -31,7 +31,7 @@ index f54b6c9d83627..3a513f05e851e 100644
}
return std::nullopt;
}
@@ -751,19 +751,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
@@ -756,19 +756,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
return handle_closer->InitializeTargetHandles(target);
}