Update to Chromium version 121.0.6167.0 (#1233107)

This commit is contained in:
Marshall Greenblatt
2023-12-06 15:16:15 -05:00
parent 2f0b00f8f5
commit 80c65f25a3
122 changed files with 1044 additions and 986 deletions

View File

@@ -0,0 +1,13 @@
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,5 +1,5 @@
diff --git base/BUILD.gn base/BUILD.gn
index 24f2397278ccb..e511ec4aedd97 100644
index 3d538b3370caa..5a4ba79e0af64 100644
--- base/BUILD.gn
+++ base/BUILD.gn
@@ -40,6 +40,7 @@ import("//build/config/ui.gni")
@@ -10,7 +10,7 @@ index 24f2397278ccb..e511ec4aedd97 100644
import("//testing/libfuzzer/fuzzer_test.gni")
import("//testing/test.gni")
@@ -1497,7 +1498,11 @@ component("base") {
@@ -1483,7 +1484,11 @@ component("base") {
"hash/md5_constexpr_internal.h",
"hash/sha1.h",
]
@@ -23,7 +23,7 @@ index 24f2397278ccb..e511ec4aedd97 100644
sources += [
"hash/md5_nacl.cc",
"hash/md5_nacl.h",
@@ -1919,6 +1924,12 @@ component("base") {
@@ -1907,6 +1912,12 @@ component("base") {
defines += [ "COM_INIT_CHECK_HOOK_DISABLED" ]
}
@@ -88,10 +88,10 @@ index 29626e5853c6e..2fb1c61504c5d 100644
#else
#include "base/hash/sha1_boringssl.h"
diff --git base/rand_util.h base/rand_util.h
index 47e7917f785f7..42fe89f3ded27 100644
index 8387bc9596ad7..c3dafe80e33b7 100644
--- base/rand_util.h
+++ base/rand_util.h
@@ -15,8 +15,9 @@
@@ -16,8 +16,9 @@
#include "base/compiler_specific.h"
#include "base/gtest_prod_util.h"
#include "build/build_config.h"
@@ -102,7 +102,7 @@ index 47e7917f785f7..42fe89f3ded27 100644
#include "third_party/boringssl/src/include/openssl/rand.h"
#endif
@@ -112,7 +113,7 @@ class RandomBitGenerator {
@@ -122,7 +123,7 @@ class RandomBitGenerator {
~RandomBitGenerator() = default;
};
@@ -164,7 +164,7 @@ index 549f4362af8b6..f08b1b2e7f061 100644
static decltype(&ProcessPrng) process_prng_fn = GetProcessPrng();
BOOL success = process_prng_fn(static_cast<BYTE*>(output), output_length);
diff --git base/unguessable_token.cc base/unguessable_token.cc
index aa7423f88d278..1b2c7d3e3c4a0 100644
index 44bfc3e2624d5..cccb306a383ce 100644
--- base/unguessable_token.cc
+++ base/unguessable_token.cc
@@ -10,8 +10,9 @@
@@ -181,11 +181,11 @@ index aa7423f88d278..1b2c7d3e3c4a0 100644
@@ -46,7 +47,7 @@ absl::optional<UnguessableToken> UnguessableToken::Deserialize(uint64_t high,
}
bool UnguessableToken::operator==(const UnguessableToken& other) const {
bool operator==(const UnguessableToken& lhs, const UnguessableToken& rhs) {
-#if BUILDFLAG(IS_NACL)
+#if BUILDFLAG(IS_NACL) || BUILDFLAG(IS_CEF_SANDBOX_BUILD)
// BoringSSL is unavailable for NaCl builds so it remains timing dependent.
return token_ == other.token_;
return lhs.token_ == rhs.token_;
#else
diff --git base/win/sid.cc base/win/sid.cc
index 0f1a2ec79aa4b..7f92778a4a776 100644

View File

@@ -1,5 +1,5 @@
diff --git base/test/BUILD.gn base/test/BUILD.gn
index d6d708d9871ed..d7a2d2fee007e 100644
index f2026e17e6638..aec8bd2743f3a 100644
--- base/test/BUILD.gn
+++ base/test/BUILD.gn
@@ -189,11 +189,6 @@ static_library("test_support") {
@@ -14,7 +14,7 @@ index d6d708d9871ed..d7a2d2fee007e 100644
deps += [
":amalgamated_perfetto_sql_stdlib",
":gen_cc_chrome_track_event_descriptor",
@@ -556,7 +551,7 @@ if (enable_base_tracing) {
@@ -559,7 +554,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 d6d708d9871ed..d7a2d2fee007e 100644
if (is_ios) {
_target_type = "ios_framework_bundle"
}
@@ -565,6 +560,8 @@ if (enable_base_tracing) {
@@ -568,6 +563,8 @@ if (enable_base_tracing) {
defines = [ "TEST_TRACE_PROCESSOR_IMPL" ]
testonly = true
sources = [
@@ -32,7 +32,7 @@ index d6d708d9871ed..d7a2d2fee007e 100644
"test_trace_processor_export.h",
"test_trace_processor_impl.cc",
"test_trace_processor_impl.h",
@@ -582,33 +579,6 @@ if (enable_base_tracing) {
@@ -585,33 +582,6 @@ if (enable_base_tracing) {
output_name = "TestTraceProcessor"
bundle_deps_filter = [ "//third_party/icu:icudata" ]
}
@@ -88,10 +88,10 @@ index f5191b804bc07..aadb7d66ba4c3 100644
+
#endif // BASE_TEST_TEST_TRACE_PROCESSOR_EXPORT_H_
diff --git content/shell/BUILD.gn content/shell/BUILD.gn
index 098c17ec80f92..cec62843d6d38 100644
index c27c82e1753df..0007879aa0a15 100644
--- content/shell/BUILD.gn
+++ content/shell/BUILD.gn
@@ -840,7 +840,6 @@ if (is_mac) {
@@ -844,7 +844,6 @@ if (is_mac) {
# Specify a sensible install_name for static builds. The library is
# dlopen()ed so this is not used to resolve the module.
ldflags = [ "-Wl,-install_name,@executable_path/../Frameworks/$output_name.framework/$output_name" ]

View File

@@ -1,5 +1,5 @@
diff --git third_party/blink/public/web/web_element.h third_party/blink/public/web/web_element.h
index 68855feea1605..69e5d1e064601 100644
index 02fa305524694..29e77bafa710c 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 {
@@ -13,10 +13,10 @@ index 68855feea1605..69e5d1e064601 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 214c3196b1fb2..ca2c35b1edecb 100644
index e8c7cb3cdb29f..1cf10e52779e1 100644
--- third_party/blink/renderer/core/exported/web_element.cc
+++ third_party/blink/renderer/core/exported/web_element.cc
@@ -115,6 +115,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
@@ -116,6 +116,24 @@ void WebElement::SetAttribute(const WebString& attr_name,
IGNORE_EXCEPTION_FOR_TESTING);
}

View File

@@ -1,8 +1,8 @@
diff --git content/browser/child_process_security_policy_impl.cc content/browser/child_process_security_policy_impl.cc
index 401eb0cd40ee2..5e7ac0b6d9d0a 100644
index 0f781fe1c2b2e..6456de7ad1c39 100644
--- content/browser/child_process_security_policy_impl.cc
+++ content/browser/child_process_security_policy_impl.cc
@@ -1866,6 +1866,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
@@ -1878,6 +1878,16 @@ bool ChildProcessSecurityPolicyImpl::CanAccessDataForMaybeOpaqueOrigin(
// DeclarativeApiTest.PersistRules.
if (actual_process_lock.matches_scheme(url::kDataScheme))
return true;
@@ -20,10 +20,10 @@ index 401eb0cd40ee2..5e7ac0b6d9d0a 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 159a0e1c17214..0a65b3b75b158 100644
index 64248db4bfc64..ea5037256498f 100644
--- content/browser/renderer_host/navigation_request.cc
+++ content/browser/renderer_host/navigation_request.cc
@@ -7457,10 +7457,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
@@ -7610,10 +7610,22 @@ NavigationRequest::GetOriginForURLLoaderFactoryBeforeResponseWithDebugInfo(
bool use_opaque_origin =
(sandbox_flags & network::mojom::WebSandboxFlags::kOrigin) ==
network::mojom::WebSandboxFlags::kOrigin;
@@ -47,7 +47,7 @@ index 159a0e1c17214..0a65b3b75b158 100644
}
return origin_and_debug_info;
@@ -7565,6 +7577,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
@@ -7721,6 +7733,15 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
DetermineInitiatorRelationship(initiator_rfh,
frame_tree_node_->current_frame_host()));

View File

@@ -13,12 +13,12 @@ index 9d9c17ffd6474..4eb79c65369af 100644
};
diff --git content/public/browser/webui_config_map.h content/public/browser/webui_config_map.h
index a80034506bf45..4bda477df0558 100644
index e7b6a9b841abb..1c98be86c0db1 100644
--- content/public/browser/webui_config_map.h
+++ content/public/browser/webui_config_map.h
@@ -61,6 +61,10 @@ class CONTENT_EXPORT WebUIConfigMap {
// Returns the size of the map, i.e. how many WebUIConfigs are registered.
size_t GetSizeForTesting() { return configs_map_.size(); }
@@ -68,6 +68,10 @@ class CONTENT_EXPORT WebUIConfigMap {
std::vector<WebUIConfigInfo> GetWebUIConfigList(
BrowserContext* browser_context);
+ WebUIControllerFactory* controller_factory() const {
+ return webui_controller_factory_.get();

View File

@@ -1,8 +1,8 @@
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
index 80bc79e5fb350..cc49ce7d592f5 100644
index de1cd6efc67b4..956d45892f31c 100644
--- build/config/compiler/BUILD.gn
+++ build/config/compiler/BUILD.gn
@@ -2161,8 +2161,6 @@ config("thin_archive") {
@@ -2160,8 +2160,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 bce36d7ffb408..3e8fd566a375c 100644
index 6572022524828..f39800b4a7da2 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 bce36d7ffb408..3e8fd566a375c 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/browser/downgrade/buildflags.gni")
import("//chrome/common/features.gni")
@@ -2073,6 +2074,7 @@ static_library("browser") {
@@ -2043,6 +2044,7 @@ static_library("browser") {
"//build/config/chromebox_for_meetings:buildflags",
"//build/config/compiler:compiler_buildflags",
"//cc",
@@ -18,7 +18,7 @@ index bce36d7ffb408..3e8fd566a375c 100644
"//chrome:extra_resources",
"//chrome:resources",
"//chrome:strings",
@@ -2729,6 +2731,10 @@ static_library("browser") {
@@ -2700,6 +2702,10 @@ static_library("browser") {
]
}

View File

@@ -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 228c377a1bec5..d296c7e46591f 100644
index 15e4fdcda89d2..66d26abb33af5 100644
--- chrome/browser/browser_process_impl.cc
+++ chrome/browser/browser_process_impl.cc
@@ -1059,18 +1059,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
@@ -1063,18 +1063,14 @@ DownloadRequestLimiter* BrowserProcessImpl::download_request_limiter() {
return download_request_limiter_.get();
}
@@ -38,10 +38,10 @@ index 228c377a1bec5..d296c7e46591f 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 906ec958256ef..f7c6973bcad3b 100644
index af96779d25b87..4ef9f7945136c 100644
--- chrome/browser/browser_process_impl.h
+++ chrome/browser/browser_process_impl.h
@@ -189,8 +189,8 @@ class BrowserProcessImpl : public BrowserProcess,
@@ -191,8 +191,8 @@ class BrowserProcessImpl : public BrowserProcess,
void SetApplicationLocale(const std::string& actual_locale) override;
DownloadStatusUpdater* download_status_updater() override;
DownloadRequestLimiter* download_request_limiter() override;

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 169b2041595fe..a5d3ec34d36bd 100644
index d64ccdc765368..5e8f892ff793d 100644
--- chrome/browser/devtools/devtools_window.cc
+++ chrome/browser/devtools/devtools_window.cc
@@ -31,6 +31,7 @@
@@ -24,7 +24,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/browser_window.h"
@@ -1176,6 +1177,13 @@ DevToolsWindow* DevToolsWindow::Create(
@@ -1189,6 +1190,13 @@ DevToolsWindow* DevToolsWindow::Create(
!browser->is_type_normal()) {
can_dock = false;
}
@@ -38,7 +38,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
}
// Create WebContents with devtools.
@@ -1752,12 +1760,29 @@ void DevToolsWindow::CreateDevToolsBrowser() {
@@ -1760,12 +1768,29 @@ void DevToolsWindow::CreateDevToolsBrowser() {
Browser::CreationStatus::kOk) {
return;
}
@@ -75,7 +75,7 @@ index 169b2041595fe..a5d3ec34d36bd 100644
}
diff --git chrome/browser/ui/BUILD.gn chrome/browser/ui/BUILD.gn
index 83bb8314906d5..0970f80bf9ae8 100644
index fc880e0dd1eb8..d8b3e4e21d092 100644
--- chrome/browser/ui/BUILD.gn
+++ chrome/browser/ui/BUILD.gn
@@ -9,6 +9,7 @@ import("//build/config/compiler/compiler.gni")
@@ -86,7 +86,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
import("//chrome/browser/buildflags.gni")
import("//chrome/common/features.gni")
import("//chromeos/ash/components/assistant/assistant.gni")
@@ -378,6 +379,10 @@ static_library("ui") {
@@ -382,6 +383,10 @@ static_library("ui") {
"//build/config/compiler:wexit_time_destructors",
]
@@ -97,7 +97,7 @@ index 83bb8314906d5..0970f80bf9ae8 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
@@ -403,6 +408,7 @@ static_library("ui") {
@@ -407,6 +412,7 @@ static_library("ui") {
"//build:chromeos_buildflags",
"//build/config/chromebox_for_meetings:buildflags",
"//cc/paint",
@@ -105,7 +105,7 @@ index 83bb8314906d5..0970f80bf9ae8 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/app:chrome_dll_resources",
@@ -2810,6 +2816,8 @@ static_library("ui") {
@@ -2863,6 +2869,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 83bb8314906d5..0970f80bf9ae8 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",
@@ -4768,8 +4776,6 @@ static_library("ui") {
@@ -4874,8 +4882,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 83bb8314906d5..0970f80bf9ae8 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",
@@ -6494,6 +6500,7 @@ static_library("ui") {
@@ -6605,6 +6611,7 @@ static_library("ui") {
if (enable_printing) {
deps += [
"//components/printing/browser",
@@ -132,10 +132,10 @@ index 83bb8314906d5..0970f80bf9ae8 100644
]
}
diff --git chrome/browser/ui/browser.cc chrome/browser/ui/browser.cc
index bd2f3d64f3f38..7f70339454e16 100644
index aa28c2ec1efb2..7ad06de961e9d 100644
--- chrome/browser/ui/browser.cc
+++ chrome/browser/ui/browser.cc
@@ -264,6 +264,25 @@
@@ -262,6 +262,25 @@
#include "components/captive_portal/content/captive_portal_tab_helper.h"
#endif
@@ -161,7 +161,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/extensions/extension_browser_window_helper.h"
#endif
@@ -459,6 +478,10 @@ Browser::Browser(const CreateParams& params)
@@ -458,6 +477,10 @@ Browser::Browser(const CreateParams& params)
type_(params.type),
profile_(params.profile),
window_(nullptr),
@@ -172,7 +172,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
tab_strip_model_delegate_(
std::make_unique<chrome::BrowserTabStripModelDelegate>(this)),
tab_strip_model_(std::make_unique<TabStripModel>(
@@ -654,6 +677,12 @@ Browser::~Browser() {
@@ -653,6 +676,12 @@ Browser::~Browser() {
// away so they don't try and call back to us.
if (select_file_dialog_.get())
select_file_dialog_->ListenerDestroyed();
@@ -185,7 +185,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
}
///////////////////////////////////////////////////////////////////////////////
@@ -1058,6 +1087,8 @@ void Browser::WindowFullscreenStateChanged() {
@@ -1061,6 +1090,8 @@ void Browser::WindowFullscreenStateChanged() {
->WindowFullscreenStateChanged();
command_controller_->FullscreenStateChanged();
UpdateBookmarkBarState(BOOKMARK_BAR_STATE_CHANGE_TOGGLE_FULLSCREEN);
@@ -194,7 +194,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
}
void Browser::FullscreenTopUIStateChanged() {
@@ -1397,6 +1428,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
@@ -1400,6 +1431,14 @@ content::KeyboardEventProcessingResult Browser::PreHandleKeyboardEvent(
if (exclusive_access_manager_->HandleUserKeyEvent(event))
return content::KeyboardEventProcessingResult::HANDLED;
@@ -209,7 +209,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
return window()->PreHandleKeyboardEvent(event);
}
@@ -1404,8 +1443,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
@@ -1407,8 +1446,18 @@ bool Browser::HandleKeyboardEvent(content::WebContents* source,
const NativeWebKeyboardEvent& event) {
DevToolsWindow* devtools_window =
DevToolsWindow::GetInstanceForInspectedWebContents(source);
@@ -230,7 +230,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
}
bool Browser::TabsNeedBeforeUnloadFired() {
@@ -1616,6 +1665,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
@@ -1610,6 +1659,14 @@ WebContents* Browser::OpenURLFromTab(WebContents* source,
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
@@ -245,7 +245,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
NavigateParams nav_params(this, params.url, params.transition);
nav_params.FillNavigateParamsFromOpenURLParams(params);
nav_params.source_contents = source;
@@ -1773,6 +1830,8 @@ void Browser::LoadingStateChanged(WebContents* source,
@@ -1767,6 +1824,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 bd2f3d64f3f38..7f70339454e16 100644
}
void Browser::CloseContents(WebContents* source) {
@@ -1801,6 +1860,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
@@ -1795,6 +1854,8 @@ void Browser::SetContentsBounds(WebContents* source, const gfx::Rect& bounds) {
}
void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -263,7 +263,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
if (!GetStatusBubble())
return;
@@ -1808,6 +1869,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
@@ -1802,6 +1863,17 @@ void Browser::UpdateTargetURL(WebContents* source, const GURL& url) {
GetStatusBubble()->SetURL(url);
}
@@ -281,7 +281,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
void Browser::ContentsMouseEvent(WebContents* source,
bool motion,
bool exited) {
@@ -1832,6 +1904,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
@@ -1826,6 +1898,19 @@ bool Browser::TakeFocus(content::WebContents* source, bool reverse) {
return false;
}
@@ -301,7 +301,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
void Browser::BeforeUnloadFired(WebContents* web_contents,
bool proceed,
bool* proceed_to_fire_unload) {
@@ -1924,6 +2009,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
@@ -1925,6 +2010,10 @@ void Browser::WebContentsCreated(WebContents* source_contents,
// Make the tab show up in the task manager.
task_manager::WebContentsTags::CreateForTabContents(new_contents);
@@ -311,8 +311,8 @@ index bd2f3d64f3f38..7f70339454e16 100644
+ frame_name, target_url, new_contents);
}
void Browser::PortalWebContentsCreated(WebContents* portal_web_contents) {
@@ -2080,11 +2169,15 @@ void Browser::EnterFullscreenModeForTab(
void Browser::RendererUnresponsive(
@@ -2069,11 +2158,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 bd2f3d64f3f38..7f70339454e16 100644
}
bool Browser::IsFullscreenForTabOrPending(const WebContents* web_contents) {
@@ -2277,6 +2370,15 @@ void Browser::RequestMediaAccessPermission(
@@ -2266,6 +2359,15 @@ void Browser::RequestMediaAccessPermission(
content::WebContents* web_contents,
const content::MediaStreamRequest& request,
content::MediaResponseCallback callback) {
@@ -344,7 +344,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
const extensions::Extension* extension =
GetExtensionForOrigin(profile_, request.security_origin);
MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest(
@@ -2828,9 +2930,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
@@ -2808,9 +2910,11 @@ void Browser::RemoveScheduledUpdatesFor(WebContents* contents) {
// Browser, Getters for UI (private):
StatusBubble* Browser::GetStatusBubble() {
@@ -357,7 +357,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
}
// We hide the status bar for web apps windows as this matches native
@@ -2838,6 +2942,12 @@ StatusBubble* Browser::GetStatusBubble() {
@@ -2818,6 +2922,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 bd2f3d64f3f38..7f70339454e16 100644
return nullptr;
}
@@ -2974,6 +3084,8 @@ void Browser::SetAsDelegate(WebContents* web_contents, bool set_delegate) {
@@ -2954,6 +3064,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 bd2f3d64f3f38..7f70339454e16 100644
}
void Browser::TabDetachedAtImpl(content::WebContents* contents,
@@ -3128,6 +3240,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
@@ -3108,6 +3220,14 @@ bool Browser::PictureInPictureBrowserSupportsWindowFeature(
bool Browser::SupportsWindowFeatureImpl(WindowFeature feature,
bool check_can_support) const {
@@ -395,7 +395,7 @@ index bd2f3d64f3f38..7f70339454e16 100644
case TYPE_NORMAL:
return NormalBrowserSupportsWindowFeature(feature, check_can_support);
diff --git chrome/browser/ui/browser.h chrome/browser/ui/browser.h
index 6544740362683..976a0e375a1f1 100644
index 91ff945f74fd3..bdf661d7fdfc9 100644
--- chrome/browser/ui/browser.h
+++ chrome/browser/ui/browser.h
@@ -22,6 +22,7 @@
@@ -447,9 +447,9 @@ index 6544740362683..976a0e375a1f1 100644
// Accessors ////////////////////////////////////////////////////////////////
const CreateParams& create_params() const { return create_params_; }
@@ -485,6 +506,12 @@ class Browser : public TabStripModelObserver,
@@ -486,6 +507,12 @@ class Browser : public TabStripModelObserver,
base::WeakPtr<Browser> AsWeakPtr();
base::WeakPtr<const Browser> AsWeakPtr() const;
+#if BUILDFLAG(ENABLE_CEF)
+ cef::BrowserDelegate* cef_delegate() const {
@@ -460,7 +460,7 @@ index 6544740362683..976a0e375a1f1 100644
// Get the FindBarController for this browser, creating it if it does not
// yet exist.
FindBarController* GetFindBarController();
@@ -877,11 +904,19 @@ class Browser : public TabStripModelObserver,
@@ -875,11 +902,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 6544740362683..976a0e375a1f1 100644
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
@@ -1227,6 +1262,10 @@ class Browser : public TabStripModelObserver,
@@ -1220,6 +1255,10 @@ class Browser : public TabStripModelObserver,
// This Browser's window.
raw_ptr<BrowserWindow, DanglingUntriaged> window_;
@@ -491,7 +491,7 @@ index 6544740362683..976a0e375a1f1 100644
std::unique_ptr<TabStripModelDelegate> const tab_strip_model_delegate_;
std::unique_ptr<TabStripModel> const tab_strip_model_;
@@ -1296,6 +1335,8 @@ class Browser : public TabStripModelObserver,
@@ -1289,6 +1328,8 @@ class Browser : public TabStripModelObserver,
const std::string initial_workspace_;
bool initial_visible_on_all_workspaces_state_;
@@ -501,10 +501,10 @@ index 6544740362683..976a0e375a1f1 100644
UnloadController unload_controller_;
diff --git chrome/browser/ui/browser_navigator.cc chrome/browser/ui/browser_navigator.cc
index b046f80bf68d9..038d217d9f29e 100644
index 3e4f480c35ea3..7dd7609b36367 100644
--- chrome/browser/ui/browser_navigator.cc
+++ chrome/browser/ui/browser_navigator.cc
@@ -291,6 +291,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
@@ -296,6 +296,10 @@ std::pair<Browser*, int> GetBrowserAndTabForDisposition(
: 1.0;
browser_params.pip_options = pip_options;
@@ -515,7 +515,7 @@ index b046f80bf68d9..038d217d9f29e 100644
const BrowserWindow* const browser_window = params.browser->window();
const gfx::NativeWindow native_window =
browser_window ? browser_window->GetNativeWindow()
@@ -561,6 +565,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
@@ -581,6 +585,13 @@ std::unique_ptr<content::WebContents> CreateTargetContents(
std::unique_ptr<WebContents> target_contents =
WebContents::Create(create_params);
@@ -530,10 +530,10 @@ index b046f80bf68d9..038d217d9f29e 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 535d038f7023b..f861a0f37bf85 100644
index 8154aaa9c2aff..1e88bfed111ee 100644
--- chrome/browser/ui/browser_tabstrip.cc
+++ chrome/browser/ui/browser_tabstrip.cc
@@ -32,9 +32,13 @@ void AddTabAt(Browser* browser,
@@ -33,9 +33,13 @@ content::WebContents* AddAndReturnTabAt(
// Time new tab page creation time. We keep track of the timing data in
// WebContents, but we want to include the time it takes to create the
// WebContents object too.
@@ -548,7 +548,7 @@ index 535d038f7023b..f861a0f37bf85 100644
params.disposition = foreground ? WindowOpenDisposition::NEW_FOREGROUND_TAB
: WindowOpenDisposition::NEW_BACKGROUND_TAB;
params.tabstrip_index = idx;
@@ -70,6 +74,16 @@ void AddWebContents(Browser* browser,
@@ -81,6 +85,16 @@ void AddWebContents(Browser* browser,
// Can't create a new contents for the current tab - invalid case.
DCHECK(disposition != WindowOpenDisposition::CURRENT_TAB);

View File

@@ -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 c65b17d8ee9e2..1c6e91858ba9e 100644
index c62382c00a48b..a560eafc3ec80 100644
--- components/content_settings/renderer/content_settings_agent_impl.cc
+++ components/content_settings/renderer/content_settings_agent_impl.cc
@@ -144,7 +144,7 @@ ContentSetting GetContentSettingFromRules(
@@ -145,7 +145,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 0aa9c67c292a6..bbc8e6900a494 100644
index 331f5dc64de39..803b471e9764a 100644
--- chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -352,6 +352,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
@@ -355,6 +355,13 @@ base::OnceCallback<void(RenderViewContextMenu*)>* GetMenuShownCallback() {
return callback.get();
}
@@ -16,7 +16,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
enum class UmaEnumIdLookupType {
GeneralEnumId,
ContextSpecificEnumId,
@@ -604,6 +611,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
@@ -609,6 +616,10 @@ int FindUMAEnumValueForCommand(int id, UmaEnumIdLookupType type) {
if (ContextMenuMatcher::IsExtensionsCustomCommandId(id))
return 1;
@@ -27,7 +27,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
id = CollapseCommandsForUMA(id);
const auto& map = GetIdcToUmaMap(type);
auto it = map.find(id);
@@ -829,6 +840,14 @@ RenderViewContextMenu::RenderViewContextMenu(
@@ -833,6 +844,14 @@ RenderViewContextMenu::RenderViewContextMenu(
pdf_ocr_submenu_model_ = std::make_unique<ui::SimpleMenuModel>(this);
#endif // BUILDFLAG(ENABLE_SCREEN_AI_SERVICE)
@@ -42,7 +42,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
observers_.AddObserver(&autofill_context_menu_manager_);
}
@@ -1289,6 +1308,12 @@ void RenderViewContextMenu::InitMenu() {
@@ -1300,6 +1319,12 @@ void RenderViewContextMenu::InitMenu() {
autofill::PopupHidingReason::kContextMenuOpened);
}
}
@@ -55,7 +55,7 @@ index 0aa9c67c292a6..bbc8e6900a494 100644
}
Profile* RenderViewContextMenu::GetProfile() const {
@@ -3376,6 +3401,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
@@ -3452,6 +3477,12 @@ void RenderViewContextMenu::RegisterExecutePluginActionCallbackForTesting(
execute_plugin_action_callback_ = std::move(cb);
}
@@ -69,7 +69,7 @@ index 0aa9c67c292a6..bbc8e6900a494 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 6f56f3b01c6b7..7af069d5e930a 100644
index efd9049faacfd..8a75cdb0dfcfa 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
@@ -85,7 +85,7 @@ index 6f56f3b01c6b7..7af069d5e930a 100644
protected:
Profile* GetProfile() const;
@@ -454,6 +460,9 @@ class RenderViewContextMenu
@@ -465,6 +471,9 @@ class RenderViewContextMenu
// built.
bool is_protocol_submenu_valid_ = false;

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/file_select_helper.cc chrome/browser/file_select_helper.cc
index 7f54e0403b6f2..a6f785d529aca 100644
index 391482bbfa815..0dbd682dd35a3 100644
--- chrome/browser/file_select_helper.cc
+++ chrome/browser/file_select_helper.cc
@@ -20,6 +20,7 @@
@@ -10,7 +10,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/platform_util.h"
@@ -257,6 +258,13 @@ void FileSelectHelper::OnListFile(
@@ -258,6 +259,13 @@ void FileSelectHelper::OnListFile(
void FileSelectHelper::LaunchConfirmationDialog(
const base::FilePath& path,
std::vector<ui::SelectedFileInfo> selected_files) {
@@ -24,7 +24,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
ShowFolderUploadConfirmationDialog(
path,
base::BindOnce(&FileSelectHelper::ConvertToFileChooserFileInfoList, this),
@@ -341,6 +349,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
@@ -342,6 +350,12 @@ void FileSelectHelper::PerformContentAnalysisIfNeeded(
if (AbortIfWebContentsDestroyed())
return;
@@ -37,7 +37,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
#if BUILDFLAG(ENTERPRISE_CLOUD_CONTENT_ANALYSIS)
enterprise_connectors::ContentAnalysisDelegate::Data data;
if (enterprise_connectors::ContentAnalysisDelegate::IsEnabled(
@@ -471,7 +485,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
@@ -472,7 +486,8 @@ void FileSelectHelper::DontAbortOnMissingWebContentsForTesting() {
std::unique_ptr<ui::SelectFileDialog::FileTypeInfo>
FileSelectHelper::GetFileTypesFromAcceptType(
@@ -47,7 +47,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
auto base_file_type = std::make_unique<ui::SelectFileDialog::FileTypeInfo>();
if (accept_types.empty())
return base_file_type;
@@ -484,17 +499,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -485,17 +500,24 @@ FileSelectHelper::GetFileTypesFromAcceptType(
std::vector<base::FilePath::StringType>* extensions =
&file_type->extensions.back();
@@ -73,7 +73,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
} else {
if (!base::IsStringASCII(accept_type))
continue;
@@ -505,10 +527,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -506,10 +528,18 @@ FileSelectHelper::GetFileTypesFromAcceptType(
description_id = IDS_AUDIO_FILES;
else if (ascii_type == "video/*")
description_id = IDS_VIDEO_FILES;
@@ -94,7 +94,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
if (extensions->size() > old_extension_size)
valid_type_count++;
}
@@ -533,6 +563,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -534,6 +564,15 @@ FileSelectHelper::GetFileTypesFromAcceptType(
l10n_util::GetStringUTF16(description_id));
}
@@ -110,7 +110,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
return file_type;
}
@@ -540,7 +579,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
@@ -541,7 +580,8 @@ FileSelectHelper::GetFileTypesFromAcceptType(
void FileSelectHelper::RunFileChooser(
content::RenderFrameHost* render_frame_host,
scoped_refptr<content::FileSelectListener> listener,
@@ -120,7 +120,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
Profile* profile = Profile::FromBrowserContext(
render_frame_host->GetProcess()->GetBrowserContext());
@@ -559,6 +599,7 @@ void FileSelectHelper::RunFileChooser(
@@ -560,6 +600,7 @@ void FileSelectHelper::RunFileChooser(
// message.
scoped_refptr<FileSelectHelper> file_select_helper(
new FileSelectHelper(profile));
@@ -128,7 +128,7 @@ index 7f54e0403b6f2..a6f785d529aca 100644
file_select_helper->RunFileChooser(render_frame_host, std::move(listener),
params.Clone());
}
@@ -610,7 +651,8 @@ void FileSelectHelper::RunFileChooser(
@@ -611,7 +652,8 @@ void FileSelectHelper::RunFileChooser(
}
void FileSelectHelper::GetFileTypesInThreadPool(FileChooserParamsPtr params) {

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 819da6b0bff94..a8e3ecd8527bd 100644
index 9e07412327ce9..f889c0e6a03d0 100644
--- components/constrained_window/constrained_window_views.cc
+++ components/constrained_window/constrained_window_views.cc
@@ -105,15 +105,24 @@ void UpdateModalDialogPosition(views::Widget* widget,
@@ -41,7 +41,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
return;
}
@@ -219,7 +228,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
@@ -224,7 +233,8 @@ views::Widget* CreateWebModalDialogViews(views::WidgetDelegate* dialog,
views::Widget* widget = views::DialogDelegate::CreateDialogWidget(
dialog, nullptr,
@@ -51,7 +51,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -241,8 +251,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -246,8 +256,13 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
gfx::NativeView parent_view =
parent ? CurrentClient()->GetDialogHostView(parent) : nullptr;
@@ -66,7 +66,7 @@ index 819da6b0bff94..a8e3ecd8527bd 100644
widget->SetNativeWindowProperty(
views::kWidgetIdentifierKey,
const_cast<void*>(kConstrainedWindowWidgetIdentifier));
@@ -258,8 +273,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
@@ -263,8 +278,7 @@ views::Widget* CreateBrowserModalDialogViews(views::DialogDelegate* dialog,
if (!requires_positioning)
return widget;

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 dff5883f7536c..27e58f8fbfe24 100644
index c26bff9382b26..8c93b7b8351c7 100644
--- chrome/browser/permissions/chrome_permissions_client.cc
+++ chrome/browser/permissions/chrome_permissions_client.cc
@@ -14,6 +14,7 @@
@@ -55,7 +55,7 @@ index dff5883f7536c..27e58f8fbfe24 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"
@@ -185,6 +186,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
@@ -186,6 +187,9 @@ ChromePermissionsClient::GetPermissionDecisionAutoBlocker(
double ChromePermissionsClient::GetSiteEngagementScore(
content::BrowserContext* browser_context,
const GURL& origin) {
@@ -65,7 +65,7 @@ index dff5883f7536c..27e58f8fbfe24 100644
return site_engagement::SiteEngagementService::Get(
Profile::FromBrowserContext(browser_context))
->GetScore(origin);
@@ -348,8 +352,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
@@ -350,8 +354,10 @@ ChromePermissionsClient::CreatePermissionUiSelectors(
std::make_unique<ContextualNotificationPermissionUiSelector>());
selectors.emplace_back(std::make_unique<PrefBasedQuietPermissionUiSelector>(
Profile::FromBrowserContext(browser_context)));
@@ -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 bc44c36d50d80..31fb2f3fe7e7e 100644
index 3a4d21b89411f..75673d62f5738 100644
--- chrome/browser/ui/views/permissions/permission_prompt_factory.cc
+++ chrome/browser/ui/views/permissions/permission_prompt_factory.cc
@@ -174,11 +174,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
@@ -173,11 +173,28 @@ std::unique_ptr<permissions::PermissionPrompt> CreateQuietPrompt(
}
}

View File

@@ -33,7 +33,7 @@ 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 22fdb0efb78c7..39adc3f192ba1 100644
index 5cb3cff75871c..51333ff7d85e2 100644
--- chrome/browser/policy/browser_dm_token_storage_mac.mm
+++ chrome/browser/policy/browser_dm_token_storage_mac.mm
@@ -26,6 +26,7 @@
@@ -44,7 +44,7 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
#include "chrome/common/chrome_paths.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
@@ -47,11 +48,6 @@ const char kEnrollmentOptionsFilePath[] = FILE_PATH_LITERAL(
@@ -47,11 +48,6 @@
"/Library/Google/Chrome/CloudManagementEnrollmentOptions");
const char kEnrollmentMandatoryOption[] = "Mandatory";
@@ -56,12 +56,13 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
constexpr char kEnrollmentTokenMetricsName[] =
"Enterprise.CloudManagementEnrollmentTokenLocation.Mac";
@@ -104,16 +100,22 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) {
@@ -104,16 +100,23 @@ bool DeleteDMTokenFromAppDataDir(const std::string& client_id) {
// Get the enrollment token from policy file: /Library/com.google.Chrome.plist.
// Return true if policy is set, otherwise false.
bool GetEnrollmentTokenFromPolicy(std::string* enrollment_token) {
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(
+ ChromeBrowserPolicyConnector::GetBundleId());
+ CFStringRef bundle_id = bundle_id_scoper.get();
+ if (!bundle_id) {
+ return false;
+ }
@@ -80,13 +81,14 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
+ !CFPreferencesAppValueIsForced(kEnrollmentTokenPolicyName, bundle_id)) {
return false;
}
CFStringRef value_string = base::apple::CFCast<CFStringRef>(value);
@@ -138,12 +140,18 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) {
CFStringRef value_string = base::apple::CFCast<CFStringRef>(value.get());
@@ -138,12 +141,19 @@ bool GetEnrollmentTokenFromFile(std::string* enrollment_token) {
}
absl::optional<bool> IsEnrollmentMandatoryByPolicy() {
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(
+ ChromeBrowserPolicyConnector::GetBundleId());
+ CFStringRef bundle_id = bundle_id_scoper.get();
+ if (!bundle_id) {
+ return absl::nullopt;
+ }
@@ -103,7 +105,7 @@ index 22fdb0efb78c7..39adc3f192ba1 100644
}
diff --git chrome/browser/policy/chrome_browser_policy_connector.cc chrome/browser/policy/chrome_browser_policy_connector.cc
index 1d38696affc60..41a711f077c5c 100644
index c012642290973..3f4d1be7f2092 100644
--- chrome/browser/policy/chrome_browser_policy_connector.cc
+++ chrome/browser/policy/chrome_browser_policy_connector.cc
@@ -13,11 +13,14 @@
@@ -121,7 +123,7 @@ index 1d38696affc60..41a711f077c5c 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "chrome/browser/policy/configuration_policy_handler_list_factory.h"
@@ -78,6 +81,11 @@
@@ -79,6 +82,11 @@
namespace policy {
namespace {
bool g_command_line_enabled_for_testing = false;
@@ -133,7 +135,7 @@ index 1d38696affc60..41a711f077c5c 100644
} // namespace
ChromeBrowserPolicyConnector::ChromeBrowserPolicyConnector()
@@ -241,6 +249,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
@@ -265,6 +273,73 @@ void ChromeBrowserPolicyConnector::EnableCommandLineSupportForTesting() {
g_command_line_enabled_for_testing = true;
}
@@ -207,7 +209,7 @@ index 1d38696affc60..41a711f077c5c 100644
base::flat_set<std::string>
ChromeBrowserPolicyConnector::device_affiliation_ids() const {
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -314,22 +389,21 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
@@ -336,23 +411,22 @@ ChromeBrowserPolicyConnector::CreatePolicyProviders() {
std::unique_ptr<ConfigurationPolicyProvider>
ChromeBrowserPolicyConnector::CreatePlatformProvider() {
#if BUILDFLAG(IS_WIN)
@@ -229,17 +231,18 @@ index 1d38696affc60..41a711f077c5c 100644
- // policies.
- CFStringRef bundle_id = CFSTR("com.google.Chrome");
-#else
- base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID()));
- base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper =
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID());
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper(GetBundleId());
CFStringRef bundle_id = bundle_id_scoper.get();
-#endif
+ base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(GetBundleId());
+ if (!bundle_id) {
+ return nullptr;
+ }
auto loader = std::make_unique<PolicyLoaderMac>(
base::ThreadPool::CreateSequencedTaskRunner(
{base::MayBlock(), base::TaskPriority::BEST_EFFORT}),
@@ -339,7 +413,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
@@ -362,7 +436,7 @@ ChromeBrowserPolicyConnector::CreatePlatformProvider() {
std::move(loader));
#elif BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_ANDROID)
base::FilePath config_dir_path;
@@ -249,7 +252,7 @@ index 1d38696affc60..41a711f077c5c 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 f949565fe137d..d6401dfededff 100644
index daa1a4cf0820d..c33db32822fbf 100644
--- chrome/browser/policy/chrome_browser_policy_connector.h
+++ chrome/browser/policy/chrome_browser_policy_connector.h
@@ -28,6 +28,10 @@
@@ -290,7 +293,7 @@ index f949565fe137d..d6401dfededff 100644
#if BUILDFLAG(IS_CHROMEOS_LACROS)
diff --git chrome/browser/policy/policy_path_parser_mac.mm chrome/browser/policy/policy_path_parser_mac.mm
index 44a46c9c37788..873a6469c7ab5 100644
index 1a2e78c3472ec..5d1bd95a15113 100644
--- chrome/browser/policy/policy_path_parser_mac.mm
+++ chrome/browser/policy/policy_path_parser_mac.mm
@@ -16,6 +16,7 @@
@@ -301,7 +304,7 @@ index 44a46c9c37788..873a6469c7ab5 100644
#include "components/policy/policy_constants.h"
namespace policy::path_parser {
@@ -97,15 +98,11 @@ base::FilePath::StringType ExpandPathVariables(
@@ -97,16 +98,12 @@
void CheckUserDataDirPolicy(base::FilePath* user_data_dir) {
// Since the configuration management infrastructure is not initialized when
// this code runs, read the policy preference directly.
@@ -311,16 +314,17 @@ index 44a46c9c37788..873a6469c7ab5 100644
- // policies.
- CFStringRef bundle_id = CFSTR("com.google.Chrome");
-#else
base::apple::ScopedCFTypeRef<CFStringRef> bundle_id(
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID()));
base::apple::ScopedCFTypeRef<CFStringRef> bundle_id_scoper =
- base::SysUTF8ToCFStringRef(base::apple::BaseBundleID());
+ policy::ChromeBrowserPolicyConnector::GetBundleId();
CFStringRef bundle_id = bundle_id_scoper.get();
-#endif
+ policy::ChromeBrowserPolicyConnector::GetBundleId());
+ if (!bundle_id) {
+ return;
+ }
base::apple::ScopedCFTypeRef<CFStringRef> key(
base::SysUTF8ToCFStringRef(policy::key::kUserDataDir));
base::apple::ScopedCFTypeRef<CFStringRef> key =
base::SysUTF8ToCFStringRef(policy::key::kUserDataDir);
diff --git chrome/browser/policy/policy_path_parser_win.cc chrome/browser/policy/policy_path_parser_win.cc
index 8dbf958c189dd..6eaccc6688eca 100644
--- chrome/browser/policy/policy_path_parser_win.cc
@@ -351,7 +355,7 @@ 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 4733d00519f56..be7ce3c4ec38b 100644
index 89678edacdadf..821c4448a8188 100644
--- chrome/common/chrome_paths.cc
+++ chrome/common/chrome_paths.cc
@@ -523,7 +523,8 @@ bool PathProvider(int key, base::FilePath* result) {
@@ -365,7 +369,7 @@ index 4733d00519f56..be7ce3c4ec38b 100644
cur = base::FilePath(policy::kPolicyPath);
break;
diff --git chrome/common/chrome_paths.h chrome/common/chrome_paths.h
index ab0301b8eb26d..3ed179ccf84bf 100644
index 03387b9680834..76191ba98e80b 100644
--- chrome/common/chrome_paths.h
+++ chrome/common/chrome_paths.h
@@ -8,6 +8,7 @@
@@ -373,10 +377,10 @@ index ab0301b8eb26d..3ed179ccf84bf 100644
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
+#include "cef/libcef/features/features.h"
#include "extensions/buildflags/buildflags.h"
#include "third_party/widevine/cdm/buildflags.h"
namespace base {
@@ -46,7 +47,7 @@ enum {
@@ -47,7 +48,7 @@ enum {
DIR_INTERNAL_PLUGINS, // Directory where internal plugins reside.
DIR_COMPONENTS, // Directory where built-in implementations of
// component-updated libraries or data reside.
@@ -386,10 +390,10 @@ index ab0301b8eb26d..3ed179ccf84bf 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 e9d31053cb2ea..793ceac3c7772 100755
index a17b30c37e07a..adcdf25e38ed1 100755
--- components/policy/tools/generate_policy_source.py
+++ components/policy/tools/generate_policy_source.py
@@ -500,6 +500,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
@@ -486,6 +486,7 @@ def _WritePolicyConstantHeader(all_policies, policy_atomic_groups,
#include <cstdint>
#include <string>
@@ -397,7 +401,7 @@ index e9d31053cb2ea..793ceac3c7772 100755
#include "components/policy/core/common/policy_details.h"
#include "components/policy/core/common/policy_map.h"
@@ -522,9 +523,11 @@ struct SchemaData;
@@ -508,9 +509,11 @@ struct SchemaData;
''')
if target_platform == 'win':
@@ -411,7 +415,7 @@ index e9d31053cb2ea..793ceac3c7772 100755
f.write('''#if BUILDFLAG(IS_CHROMEOS)
// Sets default profile policies values for enterprise users.
@@ -1167,12 +1170,14 @@ namespace policy {
@@ -1153,12 +1156,14 @@ namespace policy {
f.write('} // namespace\n\n')
if target_platform == 'win':

View File

@@ -59,10 +59,10 @@ 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 9410144d268a2..49866ff94ffbf 100644
index 9945ca59efde6..1a071f42bb538 100644
--- chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
+++ chrome/browser/ui/views/profiles/profile_menu_coordinator.cc
@@ -54,7 +54,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
@@ -56,7 +56,9 @@ void ProfileMenuCoordinator::Show(bool is_source_accelerator) {
is_incognito &= !browser.profile()->IsGuestSession();
#endif

View File

@@ -14,10 +14,10 @@ index 9bba6cea235e0..9dc5b40559207 100644
}
diff --git chrome/browser/profiles/profile.cc chrome/browser/profiles/profile.cc
index 7c7c87ce27103..f4bc0400d9268 100644
index 94f17d4c532c4..e9605b415a5aa 100644
--- chrome/browser/profiles/profile.cc
+++ chrome/browser/profiles/profile.cc
@@ -84,6 +84,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
@@ -88,6 +88,7 @@ base::LazyInstance<std::set<content::BrowserContext*>>::Leaky
namespace {
@@ -25,7 +25,7 @@ index 7c7c87ce27103..f4bc0400d9268 100644
const char kDevToolsOTRProfileIDPrefix[] = "Devtools::BrowserContext";
const char kMediaRouterOTRProfileIDPrefix[] = "MediaRouter::Presentation";
const char kTestOTRProfileIDPrefix[] = "Test::OTR";
@@ -104,6 +105,8 @@ bool Profile::OTRProfileID::AllowsBrowserWindows() const {
@@ -108,6 +109,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 7c7c87ce27103..f4bc0400d9268 100644
base::StartsWith(profile_id_, kDevToolsOTRProfileIDPrefix,
base::CompareCase::SENSITIVE) ||
base::StartsWith(profile_id_, kMediaRouterOTRProfileIDPrefix,
@@ -141,6 +144,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
@@ -145,6 +148,16 @@ Profile::OTRProfileID Profile::OTRProfileID::CreateUnique(
base::Uuid::GenerateRandomV4().AsLowercaseString().c_str()));
}
@@ -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 d397943b6fc9f..4b381fd2e27f4 100644
index 52a5f08810e85..ce21b2ea52f06 100644
--- chrome/browser/profiles/profile_impl.cc
+++ chrome/browser/profiles/profile_impl.cc
@@ -1031,7 +1031,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
@@ -1034,7 +1034,9 @@ Profile* ProfileImpl::GetOffTheRecordProfile(const OTRProfileID& otr_profile_id,
otr_profiles_[otr_profile_id] = std::move(otr_profile);
@@ -99,10 +99,10 @@ index d397943b6fc9f..4b381fd2e27f4 100644
return raw_otr_profile;
}
diff --git chrome/browser/profiles/profile_manager.cc chrome/browser/profiles/profile_manager.cc
index ae86705656ce2..3fa9ad761af3b 100644
index 861f7d92b35c3..996ae52dcdaab 100644
--- chrome/browser/profiles/profile_manager.cc
+++ chrome/browser/profiles/profile_manager.cc
@@ -434,7 +434,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
@@ -438,7 +438,7 @@ ProfileManager::ProfileManager(const base::FilePath& user_data_dir)
profile_manager_android_ = std::make_unique<ProfileManagerAndroid>(this);
#endif
@@ -134,7 +134,7 @@ index f1530f47eebf0..a41dcf65d9f11 100644
// Returns the directory where the first created profile is stored,
// relative to the user data directory currently in use.
diff --git chrome/browser/profiles/renderer_updater.cc chrome/browser/profiles/renderer_updater.cc
index 421a3a60d308a..b89123a708f79 100644
index 7b1fb9863deb6..d2821d03c4238 100644
--- chrome/browser/profiles/renderer_updater.cc
+++ chrome/browser/profiles/renderer_updater.cc
@@ -9,6 +9,7 @@

View File

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

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/ui/startup/startup_browser_creator.cc chrome/browser/ui/startup/startup_browser_creator.cc
index cef85a137d3e2..985d716ec7549 100644
index d830d64348d63..a4a84c1214163 100644
--- chrome/browser/ui/startup/startup_browser_creator.cc
+++ chrome/browser/ui/startup/startup_browser_creator.cc
@@ -578,6 +578,14 @@ void OpenNewWindowForFirstRun(
@@ -580,6 +580,14 @@ void OpenNewWindowForFirstRun(
is_first_run, std::move(launch_mode_recorder));
}
#endif // BUILDFLAG(IS_CHROMEOS_LACROS) || BUILDFLAG(ENABLE_DICE_SUPPORT)
@@ -17,7 +17,7 @@ index cef85a137d3e2..985d716ec7549 100644
} // namespace
StartupProfileMode StartupProfileModeFromReason(
@@ -1441,6 +1449,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
@@ -1450,6 +1458,12 @@ void StartupBrowserCreator::ProcessCommandLineWithProfile(
{profile, mode}, last_opened_profiles);
}
@@ -30,7 +30,7 @@ index cef85a137d3e2..985d716ec7549 100644
// static
void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
const base::CommandLine& command_line,
@@ -1450,6 +1464,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
@@ -1459,6 +1473,11 @@ void StartupBrowserCreator::ProcessCommandLineAlreadyRunning(
return;
}
@@ -43,7 +43,7 @@ index cef85a137d3e2..985d716ec7549 100644
StartupProfileMode mode =
StartupProfileModeFromReason(profile_path_info.reason);
diff --git chrome/browser/ui/startup/startup_browser_creator.h chrome/browser/ui/startup/startup_browser_creator.h
index e22ea9b782910..68724228e79f5 100644
index 5e961db0d6f21..f0c065b16d9f0 100644
--- chrome/browser/ui/startup/startup_browser_creator.h
+++ chrome/browser/ui/startup/startup_browser_creator.h
@@ -9,6 +9,7 @@

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/themes/theme_service.cc chrome/browser/themes/theme_service.cc
index 6a9fa1cca416a..e34cd38fe62f1 100644
index c1ff8fe7df4f4..86d9b53f39360 100644
--- chrome/browser/themes/theme_service.cc
+++ chrome/browser/themes/theme_service.cc
@@ -29,6 +29,7 @@

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 db900e7459540..cc691a3aa71dd 100644
index d99e0959551ce..5d69ddac55ab4 100644
--- chrome/renderer/chrome_content_renderer_client.cc
+++ chrome/renderer/chrome_content_renderer_client.cc
@@ -982,6 +982,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -980,6 +980,7 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
if ((status == chrome::mojom::PluginStatus::kUnauthorized ||
status == chrome::mojom::PluginStatus::kBlocked) &&
@@ -53,7 +53,7 @@ index db900e7459540..cc691a3aa71dd 100644
content_settings_agent_delegate->IsPluginTemporarilyAllowed(
identifier)) {
status = chrome::mojom::PluginStatus::kAllowed;
@@ -1144,7 +1145,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1142,7 +1143,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
render_frame->GetRemoteAssociatedInterfaces()->GetInterface(
plugin_auth_host.BindNewEndpointAndPassReceiver());
plugin_auth_host->BlockedUnauthorizedPlugin(group_name, identifier);
@@ -63,7 +63,7 @@ index db900e7459540..cc691a3aa71dd 100644
break;
}
case chrome::mojom::PluginStatus::kBlocked: {
@@ -1153,7 +1155,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1151,7 +1153,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 db900e7459540..cc691a3aa71dd 100644
break;
}
case chrome::mojom::PluginStatus::kBlockedByPolicy: {
@@ -1163,7 +1166,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
@@ -1161,7 +1164,8 @@ WebPlugin* ChromeContentRendererClient::CreatePlugin(
group_name));
RenderThread::Get()->RecordAction(
UserMetricsAction("Plugin_BlockedByPolicy"));
@@ -84,7 +84,7 @@ index db900e7459540..cc691a3aa71dd 100644
}
}
diff --git content/browser/browser_plugin/browser_plugin_embedder.h content/browser/browser_plugin/browser_plugin_embedder.h
index ad5f1925735fd..a871f4a7792a7 100644
index 8b26a93f7527e..17890bf20e481 100644
--- content/browser/browser_plugin/browser_plugin_embedder.h
+++ content/browser/browser_plugin/browser_plugin_embedder.h
@@ -15,6 +15,7 @@

View File

@@ -1,5 +1,5 @@
diff --git chrome/renderer/BUILD.gn chrome/renderer/BUILD.gn
index 18b342e66f11a..765b0634327d1 100644
index 9cc63fbd174db..4ed6c1b0f1af3 100644
--- chrome/renderer/BUILD.gn
+++ chrome/renderer/BUILD.gn
@@ -5,6 +5,7 @@
@@ -18,7 +18,7 @@ index 18b342e66f11a..765b0634327d1 100644
"//chrome:resources",
"//chrome:strings",
"//chrome/common",
@@ -238,6 +240,10 @@ static_library("renderer") {
@@ -239,6 +241,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 dc84cbd4c97d1..696af79e6cec5 100644
index af3bbf41a347d..f055dce3ae036 100644
--- chrome/app/chrome_main_delegate.cc
+++ chrome/app/chrome_main_delegate.cc
@@ -41,6 +41,7 @@
@@ -10,16 +10,17 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#include "chrome/browser/buildflags.h"
#include "chrome/browser/chrome_content_browser_client.h"
#include "chrome/browser/chrome_resource_bundle_helper.h"
@@ -570,6 +571,8 @@ struct MainFunction {
@@ -571,6 +572,9 @@ struct MainFunction {
// Initializes the user data dir. Must be called before InitializeLocalState().
void InitializeUserDataDir(base::CommandLine* command_line) {
+ if (cef::IsChromeRuntimeEnabled())
+ if (cef::IsChromeRuntimeEnabled()) {
+ return;
#if BUILDFLAG(IS_CHROMEOS_LACROS) && DCHECK_IS_ON()
+ }
#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
@@ -748,6 +751,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
@@ -749,6 +753,10 @@ ChromeMainDelegate::~ChromeMainDelegate() {
ChromeMainDelegate::~ChromeMainDelegate() = default;
#endif // !BUILDFLAG(IS_ANDROID)
@@ -29,8 +30,8 @@ index dc84cbd4c97d1..696af79e6cec5 100644
+
absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
InvokedIn invoked_in) {
DCHECK(base::ThreadPoolInstance::Get());
@@ -782,7 +789,7 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
DUMP_WILL_BE_CHECK(base::ThreadPoolInstance::Get());
@@ -783,7 +791,7 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
// future session's metrics.
DeferBrowserMetrics(user_data_dir);
@@ -39,7 +40,7 @@ index dc84cbd4c97d1..696af79e6cec5 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.
@@ -946,7 +953,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
@@ -950,7 +958,8 @@ absl::optional<int> ChromeMainDelegate::PostEarlyInitialization(
if (base::FeatureList::IsEnabled(
features::kWriteBasicSystemProfileToPersistentHistogramsFile)) {
@@ -49,7 +50,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_ANDROID)
record =
base::FeatureList::IsEnabled(chrome::android::kUmaBackgroundSessions);
@@ -1395,6 +1403,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1399,6 +1408,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
std::string process_type =
command_line.GetSwitchValueASCII(switches::kProcessType);
@@ -57,7 +58,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
crash_reporter::InitializeCrashKeys();
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@@ -1425,6 +1434,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1429,6 +1439,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
InitMacCrashReporter(command_line, process_type);
SetUpInstallerPreferences(command_line);
#endif
@@ -65,7 +66,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_WIN)
child_process_logging::Init();
@@ -1637,6 +1647,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1641,6 +1652,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
CHECK(!loaded_locale.empty()) << "Locale could not be found for " << locale;
}
@@ -73,7 +74,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(IS_POSIX) && !BUILDFLAG(IS_MAC)
// Zygote needs to call InitCrashReporter() in RunZygote().
if (process_type != switches::kZygoteProcess) {
@@ -1680,6 +1691,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
@@ -1684,6 +1696,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
// After all the platform Breakpads have been initialized, store the command
// line for crash reporting.
crash_keys::SetCrashKeysFromCommandLine(command_line);
@@ -81,7 +82,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
#if BUILDFLAG(ENABLE_PDF)
MaybePatchGdiGetFontData();
@@ -1805,6 +1817,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1809,6 +1822,7 @@ void ChromeMainDelegate::ZygoteForked() {
SetUpProfilingShutdownHandler();
}
@@ -89,7 +90,7 @@ index dc84cbd4c97d1..696af79e6cec5 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 =
@@ -1827,6 +1840,7 @@ void ChromeMainDelegate::ZygoteForked() {
@@ -1831,6 +1845,7 @@ void ChromeMainDelegate::ZygoteForked() {
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);
@@ -97,7 +98,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
@@ -1927,6 +1941,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1931,6 +1946,7 @@ void ChromeMainDelegate::InitializeMemorySystem() {
channel == version_info::Channel::DEV);
const bool gwp_asan_boost_sampling = is_canary_dev || is_browser_process;
@@ -105,7 +106,7 @@ index dc84cbd4c97d1..696af79e6cec5 100644
memory_system::Initializer()
.SetGwpAsanParameters(gwp_asan_boost_sampling, process_type)
.SetProfilingClientParameters(channel,
@@ -1936,5 +1951,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
@@ -1940,5 +1956,5 @@ void ChromeMainDelegate::InitializeMemorySystem() {
memory_system::DispatcherParameters::
AllocationTraceRecorderInclusion::kDynamic,
process_type)
@@ -135,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 e819129536dc0..e9287f6e03a88 100644
index 5a2adb9fcc983..a3ce0913825d1 100644
--- chrome/browser/chrome_browser_main.cc
+++ chrome/browser/chrome_browser_main.cc
@@ -52,6 +52,7 @@
@@ -146,7 +147,7 @@ index e819129536dc0..e9287f6e03a88 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/active_use_util.h"
#include "chrome/browser/after_startup_task_utils.h"
@@ -486,7 +487,7 @@ void ProcessSingletonNotificationCallbackImpl(
@@ -506,7 +507,7 @@ void ProcessSingletonNotificationCallbackImpl(
return;
}
@@ -155,7 +156,7 @@ index e819129536dc0..e9287f6e03a88 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
@@ -774,7 +775,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -800,7 +801,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -164,7 +165,7 @@ index e819129536dc0..e9287f6e03a88 100644
// If we are running stale binaries then relaunch and exit immediately.
if (upgrade_util::IsRunningOldChrome()) {
if (!upgrade_util::RelaunchChromeBrowser(
@@ -787,7 +788,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
@@ -813,7 +814,7 @@ int ChromeBrowserMainParts::PreEarlyInitialization() {
// result in browser startup bailing.
return chrome::RESULT_CODE_NORMAL_EXIT_UPGRADE_RELAUNCHED;
}
@@ -173,7 +174,7 @@ index e819129536dc0..e9287f6e03a88 100644
return load_local_state_result;
}
@@ -889,7 +890,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -915,7 +916,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
browser_process_->local_state());
platform_management_service->RefreshCache(base::NullCallback());
@@ -182,7 +183,7 @@ index e819129536dc0..e9287f6e03a88 100644
if (first_run::IsChromeFirstRun()) {
bool stats_default;
if (GoogleUpdateSettings::GetCollectStatsConsentDefault(&stats_default)) {
@@ -902,7 +903,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
@@ -928,7 +929,7 @@ int ChromeBrowserMainParts::OnLocalStateLoaded(
: metrics::EnableMetricsDefault::OPT_IN);
}
}
@@ -191,7 +192,7 @@ index e819129536dc0..e9287f6e03a88 100644
std::string locale =
startup_data_->chrome_feature_list_creator()->actual_locale();
@@ -935,6 +936,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -961,6 +962,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
master_prefs_ = std::make_unique<first_run::MasterPrefs>();
@@ -199,7 +200,7 @@ index e819129536dc0..e9287f6e03a88 100644
std::unique_ptr<installer::InitialPreferences> installer_initial_prefs =
startup_data_->chrome_feature_list_creator()->TakeInitialPrefs();
if (!installer_initial_prefs)
@@ -968,6 +970,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
@@ -994,6 +996,7 @@ int ChromeBrowserMainParts::ApplyFirstRunPrefs() {
master_prefs_->confirm_to_quit);
}
#endif // BUILDFLAG(IS_MAC)
@@ -207,7 +208,7 @@ index e819129536dc0..e9287f6e03a88 100644
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
return content::RESULT_CODE_NORMAL_EXIT;
}
@@ -1032,6 +1035,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1060,6 +1063,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
browser_process_->browser_policy_connector()->OnResourceBundleCreated();
@@ -215,7 +216,7 @@ index e819129536dc0..e9287f6e03a88 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)
@@ -1053,6 +1057,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
@@ -1081,6 +1085,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
#endif // BUILDFLAG(IS_MAC) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -223,7 +224,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if BUILDFLAG(IS_CHROMEOS)
// Set the product channel for crash reports.
@@ -1417,6 +1422,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1457,6 +1462,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->PreMainMessageLoopRun();
#if BUILDFLAG(IS_WIN)
@@ -231,7 +232,7 @@ index e819129536dc0..e9287f6e03a88 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)) {
@@ -1428,6 +1434,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1468,6 +1474,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
return ChromeBrowserMainPartsWin::HandleIconsCommands(
*base::CommandLine::ForCurrentProcess());
}
@@ -239,7 +240,7 @@ index e819129536dc0..e9287f6e03a88 100644
ui::SelectFileDialog::SetFactory(
std::make_unique<ChromeSelectFileDialogFactory>());
@@ -1445,6 +1452,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1485,6 +1492,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
@@ -247,7 +248,7 @@ index e819129536dc0..e9287f6e03a88 100644
if (base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMakeDefaultBrowser)) {
bool is_managed = g_browser_process->local_state()->IsManagedPreference(
@@ -1458,18 +1466,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1498,18 +1506,22 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
? static_cast<int>(content::RESULT_CODE_NORMAL_EXIT)
: static_cast<int>(chrome::RESULT_CODE_SHELL_INTEGRATION_FAILED);
}
@@ -270,7 +271,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if !BUILDFLAG(IS_ANDROID) && BUILDFLAG(ENABLE_DOWNGRADE_PROCESSING)
// Begin relaunch processing immediately if User Data migration is required
@@ -1508,7 +1520,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1548,7 +1560,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
}
#endif // !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
@@ -279,7 +280,7 @@ index e819129536dc0..e9287f6e03a88 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
@@ -1517,7 +1529,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1557,7 +1569,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// obtained but before potentially creating the first run sentinel).
if (ChromeBrowserMainPartsWin::CheckMachineLevelInstall())
return chrome::RESULT_CODE_MACHINE_LEVEL_INSTALL_EXISTS;
@@ -288,7 +289,7 @@ index e819129536dc0..e9287f6e03a88 100644
// Desktop construction occurs here, (required before profile creation).
PreProfileInit();
@@ -1560,12 +1572,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1600,12 +1612,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
browser_process_->local_state());
}
@@ -303,7 +304,7 @@ index e819129536dc0..e9287f6e03a88 100644
#if BUILDFLAG(IS_ANDROID)
page_info::SetPageInfoClient(new ChromePageInfoClient());
@@ -1592,6 +1606,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1632,6 +1646,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Call `PostProfileInit()`and set it up for profiles created later.
profile_init_manager_ = std::make_unique<ProfileInitManager>(this, profile);
@@ -311,7 +312,7 @@ index e819129536dc0..e9287f6e03a88 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
@@ -1631,6 +1646,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1671,6 +1686,7 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
*base::CommandLine::ForCurrentProcess());
}
#endif // BUILDFLAG(IS_WIN)
@@ -319,18 +320,19 @@ index e819129536dc0..e9287f6e03a88 100644
// Configure modules that need access to resources.
net::NetModule::SetResourceProvider(ChromeNetResourceProvider);
@@ -1711,6 +1727,10 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
@@ -1750,6 +1766,11 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
g_browser_process->profile_manager()->GetLastOpenedProfiles();
}
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
+
+ // Bypass StartupBrowserCreator and RunLoop creation with CEF.
+ // CEF with the Chrome runtime will create and manage its own RunLoop.
+#if !BUILDFLAG(ENABLE_CEF)
+
// This step is costly and is already measured in
// Startup.StartupBrowserCreator_Start.
// This step is costly.
if (browser_creator_->Start(*base::CommandLine::ForCurrentProcess(),
@@ -1744,11 +1764,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
base::FilePath(), profile_info,
@@ -1782,11 +1803,14 @@ int ChromeBrowserMainParts::PreMainMessageLoopRunImpl() {
// Create the RunLoop for MainMessageLoopRun() to use and transfer
// ownership of the browser's lifetime to the BrowserProcess.
@@ -346,7 +348,7 @@ index e819129536dc0..e9287f6e03a88 100644
#endif // !BUILDFLAG(IS_ANDROID)
diff --git chrome/browser/chrome_browser_main_mac.mm chrome/browser/chrome_browser_main_mac.mm
index a509d0b37e953..0d48c4a1f1daf 100644
index fce89997a3a60..2c1228e740216 100644
--- chrome/browser/chrome_browser_main_mac.mm
+++ chrome/browser/chrome_browser_main_mac.mm
@@ -17,6 +17,7 @@
@@ -357,7 +359,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
#import "chrome/browser/app_controller_mac.h"
#include "chrome/browser/apps/app_shim/app_shim_listener.h"
#include "chrome/browser/browser_process.h"
@@ -113,6 +114,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -110,6 +111,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
}
#endif // !BUILDFLAG(CHROME_FOR_TESTING)
@@ -365,7 +367,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
// Create the app delegate by requesting the shared AppController.
CHECK_EQ(nil, NSApp.delegate);
AppController* app_controller = AppController.sharedController;
@@ -121,6 +123,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
@@ -118,6 +120,7 @@ void ChromeBrowserMainPartsMac::PreCreateMainMessageLoop() {
chrome::BuildMainMenu(NSApp, app_controller,
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME), false);
[app_controller mainMenuCreated];
@@ -373,7 +375,7 @@ index a509d0b37e953..0d48c4a1f1daf 100644
ui::WarmScreenCapture();
@@ -179,5 +182,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
@@ -167,5 +170,7 @@ void ChromeBrowserMainPartsMac::PostProfileInit(Profile* profile,
}
void ChromeBrowserMainPartsMac::DidEndMainMessageLoop() {
@@ -382,18 +384,18 @@ index a509d0b37e953..0d48c4a1f1daf 100644
+#endif
}
diff --git chrome/browser/chrome_content_browser_client.cc chrome/browser/chrome_content_browser_client.cc
index c4d9748b5cc7c..f897335534e00 100644
index a9b87ac2fcd74..c3469d0bded81 100644
--- chrome/browser/chrome_content_browser_client.cc
+++ chrome/browser/chrome_content_browser_client.cc
@@ -43,6 +43,7 @@
#include "base/values.h"
@@ -46,6 +46,7 @@
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "build/config/chromebox_for_meetings/buildflags.h" // PLATFORM_CFM
+#include "cef/libcef/features/features.h"
#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"
@@ -1542,6 +1543,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
@@ -1512,6 +1513,8 @@ ChromeContentBrowserClient::GetPopupNavigationDelegateFactoryForTesting() {
}
ChromeContentBrowserClient::ChromeContentBrowserClient() {
@@ -402,7 +404,7 @@ index c4d9748b5cc7c..f897335534e00 100644
#if BUILDFLAG(ENABLE_PLUGINS)
extra_parts_.push_back(
std::make_unique<ChromeContentBrowserClientPluginsPart>());
@@ -1574,6 +1577,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
@@ -1544,6 +1547,11 @@ ChromeContentBrowserClient::~ChromeContentBrowserClient() {
}
}
@@ -414,7 +416,7 @@ index c4d9748b5cc7c..f897335534e00 100644
// static
void ChromeContentBrowserClient::RegisterLocalStatePrefs(
PrefRegistrySimple* registry) {
@@ -4457,9 +4465,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
@@ -4442,9 +4450,11 @@ void ChromeContentBrowserClient::BrowserURLHandlerCreated(
&search::HandleNewTabURLReverseRewrite);
#endif // BUILDFLAG(IS_ANDROID)
@@ -426,7 +428,7 @@ index c4d9748b5cc7c..f897335534e00 100644
}
base::FilePath ChromeContentBrowserClient::GetDefaultDownloadDirectory() {
@@ -6530,7 +6540,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
@@ -6546,7 +6556,7 @@ void ChromeContentBrowserClient::OnNetworkServiceCreated(
#endif
}
@@ -435,7 +437,7 @@ index c4d9748b5cc7c..f897335534e00 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -6548,6 +6558,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
@@ -6564,6 +6574,8 @@ void ChromeContentBrowserClient::ConfigureNetworkContextParams(
network_context_params->user_agent = GetUserAgentBasedOnPolicy(context);
network_context_params->accept_language = GetApplicationLocale();
}
@@ -444,7 +446,7 @@ index c4d9748b5cc7c..f897335534e00 100644
}
std::vector<base::FilePath>
@@ -7661,10 +7673,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
@@ -7721,10 +7733,10 @@ void ChromeContentBrowserClient::OnKeepaliveRequestStarted(
const auto now = base::TimeTicks::Now();
const auto timeout = GetKeepaliveTimerTimeout(context);
keepalive_deadline_ = std::max(keepalive_deadline_, now + timeout);
@@ -457,7 +459,7 @@ index c4d9748b5cc7c..f897335534e00 100644
FROM_HERE, keepalive_deadline_ - now,
base::BindOnce(
&ChromeContentBrowserClient::OnKeepaliveTimerFired,
@@ -7683,7 +7695,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
@@ -7743,7 +7755,8 @@ void ChromeContentBrowserClient::OnKeepaliveRequestFinished() {
--num_keepalive_requests_;
if (num_keepalive_requests_ == 0) {
DVLOG(1) << "Stopping the keepalive timer";
@@ -467,7 +469,7 @@ index c4d9748b5cc7c..f897335534e00 100644
// This deletes the keep alive handle attached to the timer function and
// unblock the shutdown sequence.
}
@@ -7825,7 +7838,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
@@ -7885,7 +7898,7 @@ void ChromeContentBrowserClient::OnKeepaliveTimerFired(
const auto now = base::TimeTicks::Now();
const auto then = keepalive_deadline_;
if (now < then) {
@@ -477,10 +479,10 @@ index c4d9748b5cc7c..f897335534e00 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 db4ede8eb28c8..a5ca9f6c57826 100644
index efc041c50771c..51d187aa9d39a 100644
--- chrome/browser/chrome_content_browser_client.h
+++ chrome/browser/chrome_content_browser_client.h
@@ -136,6 +136,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -142,6 +142,8 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
~ChromeContentBrowserClient() override;
@@ -489,7 +491,7 @@ index db4ede8eb28c8..a5ca9f6c57826 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.
@@ -654,7 +656,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -672,7 +674,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
override;
void OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) override;
@@ -498,7 +500,7 @@ index db4ede8eb28c8..a5ca9f6c57826 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1098,7 +1100,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
@@ -1149,7 +1151,7 @@ class ChromeContentBrowserClient : public content::ContentBrowserClient {
#if !BUILDFLAG(IS_ANDROID)
uint64_t num_keepalive_requests_ = 0;
@@ -508,7 +510,7 @@ index db4ede8eb28c8..a5ca9f6c57826 100644
#endif
diff --git chrome/browser/prefs/browser_prefs.cc chrome/browser/prefs/browser_prefs.cc
index 1e7a865273e07..d5c8889ee79d7 100644
index 2c9e95b07c762..c70fdab5e0bcc 100644
--- chrome/browser/prefs/browser_prefs.cc
+++ chrome/browser/prefs/browser_prefs.cc
@@ -14,6 +14,7 @@
@@ -519,7 +521,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
#include "chrome/browser/about_flags.h"
#include "chrome/browser/accessibility/accessibility_labels_service.h"
#include "chrome/browser/accessibility/accessibility_ui.h"
@@ -189,6 +190,10 @@
@@ -195,6 +196,10 @@
#include "chrome/browser/background/background_mode_manager.h"
#endif
@@ -530,7 +532,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
#if BUILDFLAG(ENABLE_EXTENSIONS)
#include "chrome/browser/accessibility/animation_policy_prefs.h"
#include "chrome/browser/apps/platform_apps/shortcut_manager.h"
@@ -1600,7 +1605,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1664,7 +1669,9 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
#if !BUILDFLAG(IS_ANDROID) && !BUILDFLAG(IS_CHROMEOS_ASH)
RegisterDefaultBrowserPromptPrefs(registry);
@@ -540,7 +542,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
DeviceOAuth2TokenStoreDesktop::RegisterPrefs(registry);
#endif
@@ -1618,6 +1625,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
@@ -1692,6 +1699,11 @@ void RegisterLocalState(PrefRegistrySimple* registry) {
// This is intentionally last.
RegisterLocalStatePrefsForMigration(registry);
@@ -552,7 +554,7 @@ index 1e7a865273e07..d5c8889ee79d7 100644
}
// Register prefs applicable to all profiles.
@@ -2046,6 +2058,10 @@ void RegisterUserProfilePrefs(user_prefs::PrefRegistrySyncable* registry,
@@ -2128,6 +2140,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 6fa2a2fdfe48f..eadee5fa295e6 100644
index 7d57988659286..576550dd75111 100644
--- chrome/browser/ui/browser_command_controller.cc
+++ chrome/browser/ui/browser_command_controller.cc
@@ -400,6 +400,7 @@ bool BrowserCommandController::ExecuteCommandWithDisposition(
@@ -24,7 +24,7 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
// The order of commands in this switch statement must match the function
// declaration order in browser.h!
switch (id) {
@@ -1169,11 +1177,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
@@ -1172,11 +1180,13 @@ void BrowserCommandController::TabRestoreServiceLoaded(
// BrowserCommandController, private:
bool BrowserCommandController::IsShowingMainUI() {
@@ -41,10 +41,10 @@ index 6fa2a2fdfe48f..eadee5fa295e6 100644
bool BrowserCommandController::IsWebAppOrCustomTab() const {
diff --git chrome/browser/ui/toolbar/app_menu_model.cc chrome/browser/ui/toolbar/app_menu_model.cc
index dae8cfd98ef49..2c96c0634b6a0 100644
index 6ce427cb564af..8a59dc84c75ec 100644
--- chrome/browser/ui/toolbar/app_menu_model.cc
+++ chrome/browser/ui/toolbar/app_menu_model.cc
@@ -593,6 +593,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
@@ -596,6 +596,57 @@ SaveAndShareSubMenuModel::SaveAndShareSubMenuModel(
}
}
@@ -102,7 +102,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -1397,7 +1448,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
@@ -1481,7 +1532,7 @@ bool AppMenuModel::IsCommandIdChecked(int command_id) const {
return false;
}
@@ -111,7 +111,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
GlobalError* error =
GlobalErrorServiceFactory::GetForProfile(browser_->profile())
->GetGlobalErrorByMenuItemCommandID(command_id);
@@ -1412,6 +1463,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
@@ -1496,6 +1547,30 @@ bool AppMenuModel::IsCommandIdEnabled(int command_id) const {
}
}
@@ -142,7 +142,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
bool AppMenuModel::IsCommandIdAlerted(int command_id) const {
if (command_id == IDC_VIEW_PASSWORDS ||
command_id == IDC_SHOW_PASSWORD_MANAGER) {
@@ -1593,11 +1668,15 @@ void AppMenuModel::Build() {
@@ -1689,11 +1764,15 @@ void AppMenuModel::Build() {
kDefaultIconSize));
}
@@ -163,7 +163,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
AddItemWithStringId(IDC_PRINT, IDS_PRINT);
@@ -1686,9 +1765,13 @@ void AppMenuModel::Build() {
@@ -1799,9 +1878,13 @@ void AppMenuModel::Build() {
kMoreToolsMenuItem);
if (!features::IsChromeRefresh2023()) {
@@ -180,7 +180,7 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
}
if (!features::IsChromeRefresh2023()) {
@@ -1775,6 +1858,11 @@ void AppMenuModel::Build() {
@@ -1889,6 +1972,11 @@ void AppMenuModel::Build() {
SetCommandIcon(this, IDC_EXIT, kExitMenuIcon);
}
@@ -193,10 +193,10 @@ index dae8cfd98ef49..2c96c0634b6a0 100644
}
diff --git chrome/browser/ui/toolbar/app_menu_model.h chrome/browser/ui/toolbar/app_menu_model.h
index c942243e8a63f..278a0bdc89856 100644
index 55425f15d49fa..06cb8ed2acaa1 100644
--- chrome/browser/ui/toolbar/app_menu_model.h
+++ chrome/browser/ui/toolbar/app_menu_model.h
@@ -209,6 +209,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
@@ -215,6 +215,7 @@ class AppMenuModel : public ui::SimpleMenuModel,
void ExecuteCommand(int command_id, int event_flags) override;
bool IsCommandIdChecked(int command_id) const override;
bool IsCommandIdEnabled(int command_id) const override;
@@ -204,9 +204,9 @@ index c942243e8a63f..278a0bdc89856 100644
bool IsCommandIdAlerted(int command_id) const override;
bool IsElementIdAlerted(ui::ElementIdentifier element_id) const override;
bool GetAcceleratorForCommandId(int command_id,
@@ -242,6 +243,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
// took to select the command.
void LogMenuMetrics(int command_id);
@@ -256,6 +257,8 @@ class AppMenuModel : public ui::SimpleMenuModel,
absl::optional<safety_hub::SafetyHubModuleType> expected_module =
absl::nullopt);
+ bool IsCommandIdEnabledInternal(int command_id) const;
+
@@ -363,7 +363,7 @@ 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 5ad7ca507f70c..1d195633a21db 100644
index c74a820ce00ad..55267b61c15af 100644
--- chrome/browser/ui/views/frame/browser_view.cc
+++ chrome/browser/ui/views/frame/browser_view.cc
@@ -342,11 +342,10 @@ using content::NativeWebKeyboardEvent;
@@ -381,7 +381,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// UMA histograms that record animation smoothness for tab loading animation.
@@ -861,11 +860,23 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
@@ -861,11 +860,21 @@ class BrowserView::AccessibilityModeObserver : public ui::AXModeObserver {
///////////////////////////////////////////////////////////////////////////////
// BrowserView, public:
@@ -400,21 +400,11 @@ index 5ad7ca507f70c..1d195633a21db 100644
+void BrowserView::InitBrowser(std::unique_ptr<Browser> browser) {
+ DCHECK(!browser_);
+ browser_ = std::move(browser);
+
+ immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
+
// Store the actions so that the access is available for other classes.
if (base::FeatureList::IsEnabled(features::kSidePanelPinning)) {
browser_->SetUserData(BrowserActions::UserDataKey(),
@@ -925,7 +936,6 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
}
browser_->tab_strip_model()->AddObserver(this);
- immersive_mode_controller_ = chrome::CreateImmersiveModeController(this);
// Top container holds tab strip region and toolbar and lives at the front of
// the view hierarchy.
@@ -985,8 +995,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
@@ -962,8 +971,15 @@ BrowserView::BrowserView(std::unique_ptr<Browser> browser)
contents_container->SetLayoutManager(std::make_unique<ContentsLayoutManager>(
devtools_web_view_, contents_web_view_));
@@ -432,7 +422,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
contents_separator_ =
top_container_->AddChildView(std::make_unique<ContentsSeparator>());
@@ -1060,7 +1077,9 @@ BrowserView::~BrowserView() {
@@ -1037,7 +1053,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.
@@ -442,7 +432,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
// Stop the animation timer explicitly here to avoid running it in a nested
// message loop, which may run by Browser destructor.
@@ -1074,12 +1093,14 @@ BrowserView::~BrowserView() {
@@ -1051,12 +1069,14 @@ BrowserView::~BrowserView() {
// child views and it is an observer for avatar toolbar button if any.
autofill_bubble_handler_.reset();
@@ -457,7 +447,7 @@ index 5ad7ca507f70c..1d195633a21db 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.
@@ -1097,7 +1118,9 @@ BrowserView::~BrowserView() {
@@ -1074,7 +1094,9 @@ BrowserView::~BrowserView() {
// `SidePanelUI::RemoveSidePanelUIForBrowser()` deletes the
// SidePanelCoordinator.
@@ -467,7 +457,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
}
// static
@@ -1972,9 +1995,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
@@ -1949,9 +1971,14 @@ void BrowserView::OnExclusiveAccessUserInput() {
bool BrowserView::ShouldHideUIForFullscreen() const {
// Immersive mode needs UI for the slide-down top panel.
@@ -483,7 +473,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
return frame_->GetFrameView()->ShouldHideTopUIForFullscreen();
}
@@ -3063,7 +3091,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
@@ -3060,7 +3087,8 @@ DownloadShelf* BrowserView::GetDownloadShelf() {
}
DownloadBubbleUIController* BrowserView::GetDownloadBubbleUIController() {
@@ -493,7 +483,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
if (auto* download_button = toolbar_button_provider_->GetDownloadButton())
return download_button->bubble_controller();
return nullptr;
@@ -3611,7 +3640,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
@@ -3611,7 +3639,8 @@ void BrowserView::ReparentTopContainerForEndOfImmersive() {
if (top_container()->parent() == this)
return;
@@ -503,7 +493,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
top_container()->DestroyLayer();
AddChildViewAt(top_container(), 0);
EnsureFocusOrder();
@@ -4073,11 +4103,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
@@ -4073,11 +4102,38 @@ void BrowserView::GetAccessiblePanes(std::vector<views::View*>* panes) {
bool BrowserView::ShouldDescendIntoChildForEventHandling(
gfx::NativeView child,
const gfx::Point& location) {
@@ -544,7 +534,7 @@ index 5ad7ca507f70c..1d195633a21db 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 +4143,7 @@ bool BrowserView::ShouldDescendIntoChildForEventHandling(
@@ -4086,7 +4142,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.
@@ -553,7 +543,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
point_in_contents_web_view_coords.x(),
point_in_contents_web_view_coords.y()) ||
WidgetOwnedByAnchorContainsPoint(point_in_contents_web_view_coords);
@@ -4194,8 +4251,10 @@ void BrowserView::Layout() {
@@ -4194,8 +4250,10 @@ void BrowserView::Layout() {
// TODO(jamescook): Why was this in the middle of layout code?
toolbar_->location_bar()->omnibox_view()->SetFocusBehavior(
@@ -566,7 +556,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
#if BUILDFLAG(IS_CHROMEOS_ASH)
// In chromeOS ash we round the bottom two corners of the browser frame by
@@ -4273,6 +4332,11 @@ void BrowserView::AddedToWidget() {
@@ -4273,6 +4331,11 @@ void BrowserView::AddedToWidget() {
SetThemeProfileForWindow(GetNativeWindow(), browser_->profile());
#endif
@@ -578,7 +568,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
toolbar_->Init();
// TODO(pbos): Investigate whether the side panels should be creatable when
@@ -4321,13 +4385,9 @@ void BrowserView::AddedToWidget() {
@@ -4321,13 +4384,9 @@ void BrowserView::AddedToWidget() {
EnsureFocusOrder();
@@ -594,7 +584,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
using_native_frame_ = frame_->ShouldUseNativeFrame();
MaybeInitializeWebUITabStrip();
@@ -4747,7 +4807,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
@@ -4744,7 +4803,8 @@ void BrowserView::ProcessFullscreen(bool fullscreen,
// Undo our anti-jankiness hacks and force a re-layout.
in_process_fullscreen_ = false;
ToolbarSizeChanged(false);
@@ -604,7 +594,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
}
bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const {
@@ -5136,6 +5197,8 @@ Profile* BrowserView::GetProfile() {
@@ -5133,6 +5193,8 @@ Profile* BrowserView::GetProfile() {
}
void BrowserView::UpdateUIForTabFullscreen() {
@@ -613,7 +603,7 @@ index 5ad7ca507f70c..1d195633a21db 100644
frame()->GetFrameView()->UpdateFullscreenTopUI();
}
@@ -5158,6 +5221,8 @@ void BrowserView::HideDownloadShelf() {
@@ -5155,6 +5217,8 @@ void BrowserView::HideDownloadShelf() {
}
bool BrowserView::CanUserExitFullscreen() const {
@@ -623,10 +613,10 @@ index 5ad7ca507f70c..1d195633a21db 100644
}
diff --git chrome/browser/ui/views/frame/browser_view.h chrome/browser/ui/views/frame/browser_view.h
index d6d8db2ed2341..c200381042cc9 100644
index 2e4054890db75..1a518ba936fd1 100644
--- chrome/browser/ui/views/frame/browser_view.h
+++ chrome/browser/ui/views/frame/browser_view.h
@@ -137,11 +137,16 @@ class BrowserView : public BrowserWindow,
@@ -138,11 +138,16 @@ class BrowserView : public BrowserWindow,
kUnknown
};
@@ -643,7 +633,7 @@ index d6d8db2ed2341..c200381042cc9 100644
void set_frame(BrowserFrame* frame) {
frame_ = frame;
paint_as_active_subscription_ =
@@ -826,6 +831,9 @@ class BrowserView : public BrowserWindow,
@@ -832,6 +837,9 @@ class BrowserView : public BrowserWindow,
// TopContainerBackground::PaintThemeCustomImage for details.
gfx::Point GetThemeOffsetFromBrowserView() const;
@@ -654,7 +644,7 @@ index d6d8db2ed2341..c200381042cc9 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 b358a30764051..5c67244a43251 100644
index 5e39a622e391e..e0b67a6902182 100644
--- chrome/browser/ui/views/frame/browser_view_layout.cc
+++ chrome/browser/ui/views/frame/browser_view_layout.cc
@@ -48,6 +48,10 @@
@@ -668,7 +658,7 @@ index b358a30764051..5c67244a43251 100644
using views::View;
using web_modal::ModalDialogHostObserver;
using web_modal::WebContentsModalDialogHost;
@@ -579,6 +583,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
@@ -583,6 +587,13 @@ int BrowserViewLayout::LayoutWebUITabStrip(int top) {
int BrowserViewLayout::LayoutToolbar(int top) {
TRACE_EVENT0("ui", "BrowserViewLayout::LayoutToolbar");
@@ -699,10 +689,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 4730d2459c324..714809151a0bd 100644
index 84e2a84c15907..3f010beb931b6 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
@@ -575,6 +575,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
@@ -585,6 +585,11 @@ PictureInPictureBrowserFrameView::PictureInPictureBrowserFrameView(
frame->GetNativeWindow()->SetEventTargeter(
std::make_unique<chromeos::InteriorResizeHandleTargeter>());
#endif
@@ -714,7 +704,7 @@ index 4730d2459c324..714809151a0bd 100644
}
PictureInPictureBrowserFrameView::~PictureInPictureBrowserFrameView() {
@@ -671,18 +676,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
@@ -681,18 +686,42 @@ gfx::Rect PictureInPictureBrowserFrameView::GetWindowBoundsForClientBounds(
int PictureInPictureBrowserFrameView::NonClientHitTest(
const gfx::Point& point) {
@@ -765,7 +755,7 @@ index 4730d2459c324..714809151a0bd 100644
// Allow dragging and resizing the window.
int window_component = GetHTComponentForFrame(
@@ -749,7 +778,8 @@ void PictureInPictureBrowserFrameView::Layout() {
@@ -759,7 +788,8 @@ void PictureInPictureBrowserFrameView::Layout() {
gfx::Rect content_area = GetLocalBounds();
content_area.Inset(FrameBorderInsets());
gfx::Rect top_bar = content_area;
@@ -775,7 +765,7 @@ index 4730d2459c324..714809151a0bd 100644
top_bar_container_view_->SetBoundsRect(top_bar);
#if !BUILDFLAG(IS_ANDROID)
if (auto_pip_setting_overlay_) {
@@ -1213,7 +1243,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
@@ -1234,7 +1264,8 @@ gfx::Insets PictureInPictureBrowserFrameView::ResizeBorderInsets() const {
}
int PictureInPictureBrowserFrameView::GetTopAreaHeight() const {
@@ -785,11 +775,25 @@ index 4730d2459c324..714809151a0bd 100644
}
gfx::Size PictureInPictureBrowserFrameView::GetNonClientViewAreaSize() const {
diff --git chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
index b862ceac7225d..9575440a77d67 100644
--- chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
+++ chrome/browser/ui/views/omnibox/omnibox_popup_closer.cc
@@ -27,7 +27,8 @@ OmniboxPopupCloser::OmniboxPopupCloser(BrowserView* browser_view)
OmniboxPopupCloser::~OmniboxPopupCloser() = default;
void OmniboxPopupCloser::OnMouseEvent(ui::MouseEvent* event) {
- if (!browser_view_->browser()->is_delete_scheduled() &&
+ if (browser_view_->browser() &&
+ !browser_view_->browser()->is_delete_scheduled() &&
event->type() == ui::ET_MOUSE_PRESSED) {
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 ca602db58de3a..1db448a2526a4 100644
index 0e24efef68ace..f1cda2809f398 100644
--- chrome/browser/ui/views/page_action/page_action_icon_controller.cc
+++ chrome/browser/ui/views/page_action/page_action_icon_controller.cc
@@ -97,6 +97,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
@@ -98,6 +98,12 @@ void PageActionIconController::Init(const PageActionIconParams& params,
};
for (PageActionIconType type : params.types_enabled) {
@@ -803,7 +807,7 @@ index ca602db58de3a..1db448a2526a4 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 50c887cc242fd..99428cb8eeda2 100644
index 9536b049aeb9d..30f3091939675 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(
@@ -849,10 +853,10 @@ index 50c887cc242fd..99428cb8eeda2 100644
}
diff --git chrome/browser/ui/views/toolbar/toolbar_view.cc chrome/browser/ui/views/toolbar/toolbar_view.cc
index 503fe3b9c17ec..9c3be45b4699b 100644
index f7f763cac17f4..788185cc57cae 100644
--- chrome/browser/ui/views/toolbar/toolbar_view.cc
+++ chrome/browser/ui/views/toolbar/toolbar_view.cc
@@ -192,7 +192,7 @@ class TabstripLikeBackground : public views::Background {
@@ -190,7 +190,7 @@ class TabstripLikeBackground : public views::Background {
void Paint(gfx::Canvas* canvas, views::View* view) const override {
bool painted = TopContainerBackground::PaintThemeCustomImage(canvas, view,
browser_view_);
@@ -861,7 +865,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
SkColor frame_color =
browser_view_->frame()->GetFrameView()->GetFrameColor(
BrowserFrameActiveState::kUseCurrent);
@@ -221,12 +221,13 @@ END_METADATA
@@ -219,12 +219,13 @@ END_METADATA
////////////////////////////////////////////////////////////////////////////////
// ToolbarView, public:
@@ -877,7 +881,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
SetID(VIEW_ID_TOOLBAR);
container_view_ = AddChildView(std::make_unique<ContainerView>());
@@ -251,6 +252,19 @@ ToolbarView::~ToolbarView() {
@@ -249,6 +250,19 @@ ToolbarView::~ToolbarView() {
}
void ToolbarView::Init() {
@@ -897,7 +901,7 @@ index 503fe3b9c17ec..9c3be45b4699b 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
@@ -275,12 +289,13 @@ void ToolbarView::Init() {
@@ -273,12 +287,12 @@ void ToolbarView::Init() {
auto location_bar = std::make_unique<LocationBarView>(
browser_, browser_->profile(), browser_->command_controller(), this,
@@ -907,13 +911,12 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
size_animation_.Reset(1);
std::unique_ptr<DownloadToolbarButtonView> download_button;
- if (download::IsDownloadBubbleEnabled(browser_->profile())) {
+ if (download::IsDownloadBubbleEnabled(browser_->profile()) &&
+ BUTTON_VISIBLE(kDownload)) {
- if (download::IsDownloadBubbleEnabled()) {
+ if (download::IsDownloadBubbleEnabled() && BUTTON_VISIBLE(kDownload)) {
download_button =
std::make_unique<DownloadToolbarButtonView>(browser_view_);
}
@@ -362,8 +377,10 @@ void ToolbarView::Init() {
@@ -360,8 +374,10 @@ void ToolbarView::Init() {
}
}
std::unique_ptr<media_router::CastToolbarButton> cast;
@@ -925,7 +928,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
std::unique_ptr<MediaToolbarButtonView> media_button;
if (base::FeatureList::IsEnabled(media::kGlobalMediaControls)) {
@@ -373,7 +390,8 @@ void ToolbarView::Init() {
@@ -371,7 +387,8 @@ void ToolbarView::Init() {
std::unique_ptr<send_tab_to_self::SendTabToSelfToolbarIconView>
send_tab_to_self_button;
@@ -935,7 +938,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
send_tab_to_self_button =
std::make_unique<send_tab_to_self::SendTabToSelfToolbarIconView>(
browser_view_);
@@ -444,7 +462,8 @@ void ToolbarView::Init() {
@@ -443,7 +460,8 @@ void ToolbarView::Init() {
send_tab_to_self_button_ =
container_view_->AddChildView(std::move(send_tab_to_self_button));
@@ -946,7 +949,7 @@ index 503fe3b9c17ec..9c3be45b4699b 100644
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 8411945c45330..0d50479ec2cdc 100644
index 3bfe52cff3511..11373de4c2a3a 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,

View File

@@ -1,5 +1,5 @@
diff --git chrome/utility/chrome_content_utility_client.cc chrome/utility/chrome_content_utility_client.cc
index 6413d01cb4b41..b38eb084d8508 100644
index 9b666cd9c1989..dd0814403474c 100644
--- chrome/utility/chrome_content_utility_client.cc
+++ chrome/utility/chrome_content_utility_client.cc
@@ -13,6 +13,7 @@

View File

@@ -1,8 +1,8 @@
diff --git content/browser/devtools/devtools_instrumentation.h content/browser/devtools/devtools_instrumentation.h
index 7fa53303b844c..06016ae9beb4e 100644
index 4300a5d94e04a..7ff40d52d3ec5 100644
--- content/browser/devtools/devtools_instrumentation.h
+++ content/browser/devtools/devtools_instrumentation.h
@@ -110,7 +110,7 @@ bool ApplyUserAgentMetadataOverrides(
@@ -108,7 +108,7 @@ bool ApplyUserAgentMetadataOverrides(
FrameTreeNode* frame_tree_node,
absl::optional<blink::UserAgentMetadata>* override_out);
@@ -33,17 +33,17 @@ index d69f9d4641613..e88aaf8617c52 100644
MouseWheelPhaseHandler(RenderWidgetHostViewBase* const host_view);
diff --git content/browser/renderer_host/input/synthetic_gesture_target_base.h content/browser/renderer_host/input/synthetic_gesture_target_base.h
index 95ce91508908e..94042da4b46bf 100644
index 1a1a07dad71dd..42048c360e797 100644
--- content/browser/renderer_host/input/synthetic_gesture_target_base.h
+++ content/browser/renderer_host/input/synthetic_gesture_target_base.h
@@ -9,6 +9,7 @@
@@ -8,6 +8,7 @@
#include "base/functional/callback_forward.h"
#include "base/memory/raw_ptr.h"
#include "base/time/time.h"
#include "content/browser/renderer_host/input/synthetic_gesture_target.h"
+#include "content/common/content_export.h"
#include "content/common/input/synthetic_gesture_target.h"
#include "ui/gfx/geometry/point_f.h"
namespace ui {
@@ -26,7 +27,8 @@ namespace content {
class RenderWidgetHostImpl;
@@ -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 1b0bfc81ebda9..fb5b9f1c1fc1a 100644
index af07b543f8a96..ff537ffb32224 100644
--- third_party/blink/renderer/controller/BUILD.gn
+++ third_party/blink/renderer/controller/BUILD.gn
@@ -35,6 +35,7 @@ component("controller") {

View File

@@ -12,10 +12,10 @@ 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 75cc859b67292..6b565adaef9c7 100644
index 16b5afde04752..01561da6aee2d 100644
--- content/browser/loader/navigation_url_loader_impl.cc
+++ content/browser/loader/navigation_url_loader_impl.cc
@@ -752,6 +752,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
@@ -751,6 +751,22 @@ NavigationURLLoaderImpl::PrepareForNonInterceptedRequest() {
: nullptr,
&loader_factory);
@@ -39,10 +39,10 @@ index 75cc859b67292..6b565adaef9c7 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 dcdc54f90f114..cc4d517b22809 100644
index ed845bfab9e73..fc694c9d62f4d 100644
--- content/public/browser/content_browser_client.cc
+++ content/public/browser/content_browser_client.cc
@@ -1067,7 +1067,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
@@ -1084,7 +1084,7 @@ ContentBrowserClient::CreateURLLoaderHandlerForServiceWorkerNavigationPreload(
void ContentBrowserClient::OnNetworkServiceCreated(
network::mojom::NetworkService* network_service) {}
@@ -51,7 +51,7 @@ index dcdc54f90f114..cc4d517b22809 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -1076,6 +1076,7 @@ void ContentBrowserClient::ConfigureNetworkContextParams(
@@ -1093,6 +1093,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 dcdc54f90f114..cc4d517b22809 100644
std::vector<base::FilePath>
diff --git content/public/browser/content_browser_client.h content/public/browser/content_browser_client.h
index 06e22b37dfbce..95f433c7c2a5e 100644
index 966f79ab782fa..9b820f69835b8 100644
--- content/public/browser/content_browser_client.h
+++ content/public/browser/content_browser_client.h
@@ -40,6 +40,7 @@
@@ -42,6 +42,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 06e22b37dfbce..95f433c7c2a5e 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"
@@ -1961,7 +1962,7 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2008,7 +2009,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 06e22b37dfbce..95f433c7c2a5e 100644
BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -2175,6 +2176,19 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2229,6 +2230,19 @@ class CONTENT_EXPORT ContentBrowserClient {
RenderFrameHost* initiator_document,
mojo::PendingRemote<network::mojom::URLLoaderFactory>* out_factory);
@@ -100,7 +100,7 @@ index 06e22b37dfbce..95f433c7c2a5e 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.
@@ -2232,6 +2246,10 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -2286,6 +2300,10 @@ class CONTENT_EXPORT ContentBrowserClient {
// Used as part of the user agent string.
virtual std::string GetProduct();
@@ -137,7 +137,7 @@ index 72f72e2c6627d..f5ca688e5d9f4 100644
// started.
virtual void SetRuntimeFeaturesDefaultsBeforeBlinkInitialization() {}
diff --git content/renderer/render_thread_impl.cc content/renderer/render_thread_impl.cc
index 83daef460d5dd..ec9dd64fde6d8 100644
index e72f99daf2fea..d3b5bd5565da0 100644
--- content/renderer/render_thread_impl.cc
+++ content/renderer/render_thread_impl.cc
@@ -584,6 +584,8 @@ void RenderThreadImpl::Init() {
@@ -150,10 +150,10 @@ index 83daef460d5dd..ec9dd64fde6d8 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 ee367c7306b07..440493e485874 100644
index 5790d6ed3e4d9..d7519f9032c78 100644
--- content/renderer/renderer_blink_platform_impl.cc
+++ content/renderer/renderer_blink_platform_impl.cc
@@ -948,6 +948,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
@@ -984,6 +984,15 @@ SkBitmap* RendererBlinkPlatformImpl::GetSadPageBitmap() {
//------------------------------------------------------------------------------
@@ -170,10 +170,10 @@ index ee367c7306b07..440493e485874 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 23c389ed9c731..931165a4e9a8f 100644
index 328a108d2bd1c..f44846ddc2c9e 100644
--- content/renderer/renderer_blink_platform_impl.h
+++ content/renderer/renderer_blink_platform_impl.h
@@ -224,6 +224,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -234,6 +234,9 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
InertAndMinimumIntervalOfUserLevelMemoryPressureSignal() override;
#endif // BUILDFLAG(IS_ANDROID)
@@ -184,7 +184,7 @@ index 23c389ed9c731..931165a4e9a8f 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 35b1675d9f57f..6e715215ed905 100644
index 84da983df907b..7a9390e069df5 100644
--- content/shell/browser/shell_content_browser_client.cc
+++ content/shell/browser/shell_content_browser_client.cc
@@ -701,7 +701,7 @@ void ShellContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
@@ -218,10 +218,10 @@ index 950e82cd59ab4..1f8b23da6fec5 100644
bool in_memory,
const base::FilePath& relative_partition_path,
diff --git headless/lib/browser/headless_content_browser_client.cc headless/lib/browser/headless_content_browser_client.cc
index 8d5fc50c9d528..7692150fb9ce0 100644
index 6a118e43698a1..82df4466206d2 100644
--- headless/lib/browser/headless_content_browser_client.cc
+++ headless/lib/browser/headless_content_browser_client.cc
@@ -294,7 +294,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
@@ -297,7 +297,7 @@ bool HeadlessContentBrowserClient::IsSharedStorageSelectURLAllowed(
return true;
}
@@ -230,7 +230,7 @@ index 8d5fc50c9d528..7692150fb9ce0 100644
content::BrowserContext* context,
bool in_memory,
const base::FilePath& relative_partition_path,
@@ -304,6 +304,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
@@ -307,6 +307,7 @@ void HeadlessContentBrowserClient::ConfigureNetworkContextParams(
HeadlessBrowserContextImpl::From(context)->ConfigureNetworkContextParams(
in_memory, relative_partition_path, network_context_params,
cert_verifier_creation_params);
@@ -239,7 +239,7 @@ index 8d5fc50c9d528..7692150fb9ce0 100644
std::string HeadlessContentBrowserClient::GetProduct() {
diff --git headless/lib/browser/headless_content_browser_client.h headless/lib/browser/headless_content_browser_client.h
index dfdef1bdae542..af36779ca0ed6 100644
index 18f90a11713b5..688549524fb17 100644
--- headless/lib/browser/headless_content_browser_client.h
+++ headless/lib/browser/headless_content_browser_client.h
@@ -80,7 +80,7 @@ class HeadlessContentBrowserClient : public content::ContentBrowserClient {

View File

@@ -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 965b07bc43847..89da1178ca765 100644
index f3988a35b1df7..8dd8c652b105e 100644
--- content/app/content_main_runner_impl.cc
+++ content/app/content_main_runner_impl.cc
@@ -46,6 +46,7 @@
@@ -101,7 +101,7 @@ index 965b07bc43847..89da1178ca765 100644
#include "base/time/time.h"
#include "base/trace_event/trace_event.h"
#include "build/build_config.h"
@@ -1338,6 +1339,11 @@ void ContentMainRunnerImpl::Shutdown() {
@@ -1334,6 +1335,11 @@ void ContentMainRunnerImpl::Shutdown() {
is_shutdown_ = true;
}

View File

@@ -81,7 +81,7 @@ index 27a803784eb9e..a8b033f475cb4 100644
g_crash_helper_enabled = true;
return true;
diff --git chrome/common/crash_keys.cc chrome/common/crash_keys.cc
index 680c8ec662ecf..2c898fc6e1c70 100644
index 2f69ae87fd93d..69a1bb6e008b4 100644
--- chrome/common/crash_keys.cc
+++ chrome/common/crash_keys.cc
@@ -6,6 +6,8 @@
@@ -105,7 +105,7 @@ index 680c8ec662ecf..2c898fc6e1c70 100644
static const char* const kIgnoreSwitches[] = {
switches::kEnableLogging,
switches::kFlagSwitchesBegin,
@@ -159,11 +163,9 @@ bool IsBoringSwitch(const std::string& flag) {
@@ -160,11 +164,9 @@ bool IsBoringSwitch(const std::string& flag) {
return false;
}

View File

@@ -1,5 +1,5 @@
diff --git components/embedder_support/user_agent_utils.cc components/embedder_support/user_agent_utils.cc
index c957a691efcac..127872ce6c249 100644
index 44cf15e1b4703..b3f744454f6c3 100644
--- components/embedder_support/user_agent_utils.cc
+++ components/embedder_support/user_agent_utils.cc
@@ -18,6 +18,7 @@
@@ -21,7 +21,7 @@ index c957a691efcac..127872ce6c249 100644
namespace embedder_support {
namespace {
@@ -240,6 +245,14 @@ blink::UserAgentBrandList GetUserAgentBrandFullVersionList(
@@ -253,6 +258,14 @@ std::vector<std::string> GetFormFactorClientHints(
std::string GetProductAndVersion(
UserAgentReductionEnterprisePolicyState user_agent_reduction) {

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/extensions/api/streams_private/streams_private_api.cc chrome/browser/extensions/api/streams_private/streams_private_api.cc
index cead7cfa14bae..24142c2e4896f 100644
index 8cea5bf4591cd..c5fca9dd1a9e8 100644
--- chrome/browser/extensions/api/streams_private/streams_private_api.cc
+++ chrome/browser/extensions/api/streams_private/streams_private_api.cc
@@ -6,6 +6,7 @@
@@ -10,9 +10,9 @@ index cead7cfa14bae..24142c2e4896f 100644
#include "chrome/browser/extensions/extension_tab_util.h"
#include "chrome/browser/preloading/prefetch/no_state_prefetch/chrome_no_state_prefetch_contents_delegate.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_contents.h"
@@ -18,6 +19,10 @@
#include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h"
#include "extensions/common/manifest_handlers/mime_types_handler.h"
@@ -26,6 +27,10 @@
#include "pdf/pdf_features.h"
#endif // BUILDFLAG(ENABLE_PDF)
+#if BUILDFLAG(ENABLE_CEF)
+#include "cef/libcef/browser/extensions/alloy_extensions_util.h"
@@ -21,7 +21,7 @@ index cead7cfa14bae..24142c2e4896f 100644
namespace extensions {
void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
@@ -34,6 +39,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
@@ -43,6 +48,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
if (!web_contents)
return;
@@ -29,7 +29,7 @@ index cead7cfa14bae..24142c2e4896f 100644
// If the request was for NoStatePrefetch, abort the prefetcher and do not
// continue. This is because plugins cancel NoStatePrefetch, see
// http://crbug.com/343590.
@@ -44,6 +50,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
@@ -53,6 +59,7 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
no_state_prefetch_contents->Destroy(prerender::FINAL_STATUS_DOWNLOAD);
return;
}
@@ -37,7 +37,7 @@ index cead7cfa14bae..24142c2e4896f 100644
auto* browser_context = web_contents->GetBrowserContext();
@@ -70,9 +77,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
@@ -79,9 +86,18 @@ void StreamsPrivateAPI::SendExecuteMimeTypeHandlerEvent(
// forms of zooming won't work).
// TODO(1042323): Present a coherent representation of a tab id for portal
// contents.
@@ -60,7 +60,7 @@ index cead7cfa14bae..24142c2e4896f 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 bf2c4d83e99b0..55c8c05898e2d 100644
index 55f83aa0e801a..e111e3273796e 100644
--- extensions/browser/extension_host.cc
+++ extensions/browser/extension_host.cc
@@ -62,12 +62,13 @@ ExtensionHost::ExtensionHost(const Extension* extension,
@@ -132,7 +132,7 @@ index bf2c4d83e99b0..55c8c05898e2d 100644
ExtensionRegistry::Get(browser_context_)->RemoveObserver(this);
diff --git extensions/browser/extension_host.h extensions/browser/extension_host.h
index 316d778267f30..49de50e79fa37 100644
index c0398bdd68648..93fc2409ab3d7 100644
--- extensions/browser/extension_host.h
+++ extensions/browser/extension_host.h
@@ -62,6 +62,12 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -157,7 +157,7 @@ index 316d778267f30..49de50e79fa37 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_; }
@@ -230,7 +236,8 @@ class ExtensionHost : public DeferredStartRenderHost,
@@ -238,7 +244,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 058367b7ab78d..99a9e901566ce 100644
index bded50cb03354..4df474bd3c7bb 100644
--- extensions/browser/extensions_browser_client.h
+++ extensions/browser/extensions_browser_client.h
@@ -32,6 +32,7 @@
@@ -31,6 +31,7 @@
#include "url/gurl.h"
class ExtensionFunctionRegistry;
@@ -210,7 +210,7 @@ index 058367b7ab78d..99a9e901566ce 100644
class PrefService;
namespace base {
@@ -80,6 +81,7 @@ class ComponentExtensionResourceManager;
@@ -79,6 +80,7 @@ class ComponentExtensionResourceManager;
class Extension;
class ExtensionCache;
class ExtensionError;
@@ -218,7 +218,7 @@ index 058367b7ab78d..99a9e901566ce 100644
class ExtensionHostDelegate;
class ExtensionSet;
class ExtensionSystem;
@@ -265,6 +267,14 @@ class ExtensionsBrowserClient {
@@ -264,6 +266,14 @@ class ExtensionsBrowserClient {
virtual std::unique_ptr<ExtensionHostDelegate>
CreateExtensionHostDelegate() = 0;
@@ -257,7 +257,7 @@ 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 a8108350ddde2..7ae49e78b4327 100644
index 713e66b05abcf..de97074586d0f 100644
--- extensions/common/extensions_client.cc
+++ extensions/common/extensions_client.cc
@@ -23,7 +23,7 @@ ExtensionsClient* g_client = nullptr;

View File

@@ -12,7 +12,7 @@ index 321877844bd21..f7f00a99d6244 100644
# https://crbug.com/474506.
"//clank/java/BUILD.gn",
diff --git BUILD.gn BUILD.gn
index ad4b830fa0932..f6bd36461ae40 100644
index 678989ac85db1..b05b5aac2fc64 100644
--- BUILD.gn
+++ BUILD.gn
@@ -19,6 +19,7 @@ import("//build/config/sanitizers/sanitizers.gni")
@@ -31,7 +31,7 @@ index ad4b830fa0932..f6bd36461ae40 100644
+ deps += [ "//cef" ]
+ }
+
if (enable_printing || enable_printing_unittests) {
if (enable_printing || enable_printing_tests) {
deps += [ "//printing:printing_unittests" ]
}
diff --git build/config/win/visual_studio_version.gni build/config/win/visual_studio_version.gni
@@ -76,7 +76,7 @@ index 1da479dd5eebc..ff9c7e467997c 100644
- visual_studio_runtime_dirs = []
}
diff --git chrome/chrome_paks.gni chrome/chrome_paks.gni
index 54efa2d231a3b..bee18f42509b6 100644
index 5a4ddf12a9db3..6c255f9db2433 100644
--- chrome/chrome_paks.gni
+++ chrome/chrome_paks.gni
@@ -6,6 +6,7 @@ import("//ash/ambient/resources/resources.gni")
@@ -99,7 +99,7 @@ index 54efa2d231a3b..bee18f42509b6 100644
sources += [ "$root_gen_dir/extensions/extensions_browser_resources_${percent}_percent.pak" ]
deps += [ "//extensions:extensions_browser_resources" ]
diff --git chrome/chrome_repack_locales.gni chrome/chrome_repack_locales.gni
index fdb87c7e75342..7ba91bd740c81 100644
index c43aa5873d96a..68978caa5b96b 100644
--- chrome/chrome_repack_locales.gni
+++ chrome/chrome_repack_locales.gni
@@ -6,6 +6,7 @@ import("//build/config/chrome_build.gni")
@@ -110,9 +110,9 @@ index fdb87c7e75342..7ba91bd740c81 100644
import("//extensions/buildflags/buildflags.gni")
import("//tools/grit/repack.gni")
@@ -93,6 +94,10 @@ template("chrome_repack_locales") {
[ "${root_gen_dir}/chromeos/strings/chromeos_strings_" ]
deps += [ "//chromeos/strings" ]
@@ -97,6 +98,10 @@ template("chrome_repack_locales") {
source_patterns += [ "${root_gen_dir}/components/strings/search_engine_descriptions_strings_" ]
deps += [ "//components/strings:search_engine_descriptions_strings" ]
}
+ if (enable_cef) {
+ source_patterns += [ "${root_gen_dir}/cef/cef_strings_" ]
@@ -149,7 +149,7 @@ index 6a32fb624ea4c..923a92b478368 100644
outputs = [
"$root_out_dir/chrome.7z",
diff --git tools/grit/grit_args.gni tools/grit/grit_args.gni
index 77f1be6116d0c..6bc41416af551 100644
index 79d613489bac2..86b82e96b7ec0 100644
--- tools/grit/grit_args.gni
+++ tools/grit/grit_args.gni
@@ -5,6 +5,7 @@

View File

@@ -1,8 +1,8 @@
diff --git tools/gritsettings/resource_ids.spec tools/gritsettings/resource_ids.spec
index 95e5ac768b904..58ec586338027 100644
index cdce083b1bea8..f59c624b3c7c0 100644
--- tools/gritsettings/resource_ids.spec
+++ tools/gritsettings/resource_ids.spec
@@ -1263,6 +1263,15 @@
@@ -1266,6 +1266,15 @@
# END "everything else" section.
# Everything but chrome/, components/, content/, and ios/

View File

@@ -1,16 +1,16 @@
diff --git base/win/dark_mode_support.cc base/win/dark_mode_support.cc
index 325bc70b6ba97..d4117dbb1d4d8 100644
index 6b9d2c180c904..3570ef071ba07 100644
--- base/win/dark_mode_support.cc
+++ base/win/dark_mode_support.cc
@@ -6,6 +6,7 @@
@@ -7,6 +7,7 @@
#include <windows.h>
#include "base/check.h"
+#include "base/command_line.h"
#include "base/native_library.h"
#include "base/win/windows_version.h"
@@ -85,11 +86,20 @@ const DarkModeSupport& GetDarkModeSupport() {
@@ -86,11 +87,20 @@ const DarkModeSupport& GetDarkModeSupport() {
return dark_mode_support;
}
@@ -32,7 +32,7 @@ index 325bc70b6ba97..d4117dbb1d4d8 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 e6078b2a45d88..bf051fb8a02f4 100644
index b9feac1c87c51..bb63c6d350bfe 100644
--- ui/native_theme/native_theme_mac.mm
+++ ui/native_theme/native_theme_mac.mm
@@ -50,6 +50,13 @@ bool InvertedColors() {

View File

@@ -12,7 +12,7 @@ index 239c3870a149a..9f5a34fc846bd 100644
if (use_atk) {
assert(use_glib, "use_atk=true requires that use_glib=true")
diff --git build/config/linux/atspi2/BUILD.gn build/config/linux/atspi2/BUILD.gn
index d1629205c82a3..21de94bee534b 100644
index 30bc77f9c23fb..778d4bc350036 100644
--- build/config/linux/atspi2/BUILD.gn
+++ build/config/linux/atspi2/BUILD.gn
@@ -6,7 +6,7 @@ import("//build/config/linux/pkg_config.gni")

View File

@@ -0,0 +1,68 @@
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 printing/printing_context_linux.cc printing/printing_context_linux.cc
index 2bb8fbf922692..288ec4fd4ef7f 100644
index 49f0ddab8318e..a3a9cd189fc2f 100644
--- printing/printing_context_linux.cc
+++ printing/printing_context_linux.cc
@@ -73,11 +73,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
@@ -69,11 +69,11 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
ResetSettings();
#if BUILDFLAG(IS_LINUX)
@@ -16,7 +16,7 @@ index 2bb8fbf922692..288ec4fd4ef7f 100644
if (print_dialog_) {
print_dialog_->UseDefaultSettings();
@@ -89,8 +89,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
@@ -85,8 +85,8 @@ mojom::ResultCode PrintingContextLinux::UseDefaultSettings() {
gfx::Size PrintingContextLinux::GetPdfPaperSizeDeviceUnits() {
#if BUILDFLAG(IS_LINUX)
@@ -27,7 +27,7 @@ index 2bb8fbf922692..288ec4fd4ef7f 100644
#endif
return gfx::Size();
@@ -102,11 +102,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
@@ -98,11 +98,11 @@ mojom::ResultCode PrintingContextLinux::UpdatePrinterSettings(
DCHECK(!in_print_job_);
#if BUILDFLAG(IS_LINUX)

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 2937e79e51567..36f1d2ab826f4 100644
index 7de5f5de28091..b2bccf7d9e3d9 100644
--- chrome/browser/ui/views/profiles/profile_menu_view_base.cc
+++ chrome/browser/ui/views/profiles/profile_menu_view_base.cc
@@ -1032,8 +1032,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
@@ -1038,8 +1038,8 @@ int ProfileMenuViewBase::GetMaxHeight() const {
->GetDisplayNearestPoint(anchor_rect.CenterPoint())
.work_area();
int available_space = screen_space.bottom() - anchor_rect.bottom();

View File

@@ -1,5 +1,5 @@
diff --git base/message_loop/message_pump_win.cc base/message_loop/message_pump_win.cc
index 645217ffce6ad..9e335e8234cd9 100644
index c30066f515f63..450c67882ea91 100644
--- base/message_loop/message_pump_win.cc
+++ base/message_loop/message_pump_win.cc
@@ -2,6 +2,7 @@
@@ -30,7 +30,7 @@ index 645217ffce6ad..9e335e8234cd9 100644
}
if (has_msg)
diff --git base/task/current_thread.cc base/task/current_thread.cc
index b062ee6f827b7..675a604f4b859 100644
index 96b2fd7cad015..2fa7f4016fe5a 100644
--- base/task/current_thread.cc
+++ base/task/current_thread.cc
@@ -48,6 +48,8 @@ void CurrentThread::AddDestructionObserver(
@@ -43,7 +43,7 @@ index b062ee6f827b7..675a604f4b859 100644
current_->RemoveDestructionObserver(destruction_observer);
}
diff --git base/task/current_thread.h base/task/current_thread.h
index 7d80fd4bde3e0..e2c59fc4ec88c 100644
index 33e320fd647cb..5f67ef65d4392 100644
--- base/task/current_thread.h
+++ base/task/current_thread.h
@@ -133,6 +133,12 @@ class BASE_EXPORT CurrentThread {

View File

@@ -1,8 +1,8 @@
diff --git components/metrics/persistent_system_profile.cc components/metrics/persistent_system_profile.cc
index 83c0308a977a0..9859e33d3ce7e 100644
index cf7b47f868066..bc7c1adfea855 100644
--- components/metrics/persistent_system_profile.cc
+++ components/metrics/persistent_system_profile.cc
@@ -392,6 +392,10 @@ bool PersistentSystemProfile::GetSystemProfile(
@@ -393,6 +393,10 @@ bool PersistentSystemProfile::GetSystemProfile(
return true;
}

View File

@@ -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 689818d34e56e..c4d897053b7e4 100644
index dd14dce03cc93..eb25e13036d1a 100644
--- net/url_request/url_request_http_job.cc
+++ net/url_request/url_request_http_job.cc
@@ -1808,7 +1808,8 @@ bool URLRequestHttpJob::ShouldAddCookieHeader() const {
@@ -1812,7 +1812,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.
@@ -22,9 +22,9 @@ index 689818d34e56e..c4d897053b7e4 100644
+ !(request_info_.load_flags & LOAD_DO_NOT_SEND_COOKIES);
}
bool URLRequestHttpJob::IsPartitionedCookiesEnabled() const {
bool URLRequestHttpJob::ShouldRecordPartitionedCookieUsage() const {
diff --git services/network/public/cpp/resource_request.cc services/network/public/cpp/resource_request.cc
index 2a309fe2b1dd6..4e8dcaf0e2608 100644
index 39c94526163d0..9e7bdd53e91be 100644
--- services/network/public/cpp/resource_request.cc
+++ services/network/public/cpp/resource_request.cc
@@ -312,7 +312,8 @@ bool ResourceRequest::EqualsForTesting(const ResourceRequest& request) const {

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 3db20acc9d4ea..ad7cd90aa7f0b 100644
index 357b362117d20..b5c7cfe5dd511 100644
--- net/test/embedded_test_server/embedded_test_server.cc
+++ net/test/embedded_test_server/embedded_test_server.cc
@@ -980,7 +980,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
@@ -997,7 +997,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWait(base::OnceClosure closure) {
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();
@@ -11,7 +11,7 @@ index 3db20acc9d4ea..ad7cd90aa7f0b 100644
if (!io_thread_->task_runner()->PostTaskAndReply(
FROM_HERE, std::move(closure), run_loop.QuitClosure())) {
return false;
@@ -1007,7 +1007,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
@@ -1024,7 +1024,7 @@ bool EmbeddedTestServer::PostTaskToIOThreadAndWaitWithResult(
if (!base::CurrentThread::Get())
temporary_loop = std::make_unique<base::SingleThreadTaskExecutor>();

View File

@@ -1,5 +1,5 @@
diff --git net/url_request/url_request_job.cc net/url_request/url_request_job.cc
index 28790bb292272..34791ae1b2965 100644
index dc6605dc280d3..86c4633cf7240 100644
--- net/url_request/url_request_job.cc
+++ net/url_request/url_request_job.cc
@@ -34,6 +34,7 @@

View File

@@ -12,13 +12,41 @@ index 431df5d50debe..0fcc9ea8fbb1a 100644
if (!host_->GetView()) {
return nullptr;
}
diff --git content/browser/renderer_host/input/fling_scheduler_base.h content/browser/renderer_host/input/fling_scheduler_base.h
index afefe3cd83dee..6668463247644 100644
--- content/browser/renderer_host/input/fling_scheduler_base.h
+++ content/browser/renderer_host/input/fling_scheduler_base.h
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index a6c27fe9b7f71..11060758d670f 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() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(ui::Compositor* compositor)
+{
+ fling_scheduler_->SetCompositor(compositor);
+}
+
void RenderWidgetHostImpl::AddPendingUserActivation(
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
--- 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
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
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
+++ content/common/input/fling_scheduler_base.h
@@ -7,12 +7,23 @@
#include "content/browser/renderer_host/input/fling_controller.h"
#include "content/common/input/fling_controller.h"
+namespace ui {
+class Compositor;
@@ -40,31 +68,3 @@ index afefe3cd83dee..6668463247644 100644
};
} // namespace content
diff --git content/browser/renderer_host/render_widget_host_impl.cc content/browser/renderer_host/render_widget_host_impl.cc
index a1ce7be62ca99..600b61ffafb34 100644
--- content/browser/renderer_host/render_widget_host_impl.cc
+++ content/browser/renderer_host/render_widget_host_impl.cc
@@ -3282,6 +3282,11 @@ void RenderWidgetHostImpl::OnInvalidInputEventSource() {
GetProcess(), bad_message::INPUT_ROUTER_INVALID_EVENT_SOURCE);
}
+void RenderWidgetHostImpl::SetCompositorForFlingScheduler(ui::Compositor* compositor)
+{
+ fling_scheduler_->SetCompositor(compositor);
+}
+
void RenderWidgetHostImpl::AddPendingUserActivation(
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 28001459e1357..42b6450adeef7 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
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

View File

@@ -1,5 +1,5 @@
diff --git chrome/browser/download/download_prefs.cc chrome/browser/download/download_prefs.cc
index fdbc3e45a8380..3fd34f6264120 100644
index 1d30371b0131c..1ba3d15a3c0af 100644
--- chrome/browser/download/download_prefs.cc
+++ chrome/browser/download/download_prefs.cc
@@ -23,6 +23,7 @@
@@ -21,7 +21,7 @@ index fdbc3e45a8380..3fd34f6264120 100644
using content::BrowserContext;
using content::BrowserThread;
using content::DownloadManager;
@@ -356,6 +361,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
@@ -354,6 +359,11 @@ DownloadPrefs* DownloadPrefs::FromDownloadManager(
// static
DownloadPrefs* DownloadPrefs::FromBrowserContext(
content::BrowserContext* context) {
@@ -34,7 +34,7 @@ index fdbc3e45a8380..3fd34f6264120 100644
}
diff --git chrome/browser/printing/print_preview_dialog_controller.cc chrome/browser/printing/print_preview_dialog_controller.cc
index 54efe456fd86e..a685c4e0722cc 100644
index a462e526f98a4..8b142f9e5d22a 100644
--- chrome/browser/printing/print_preview_dialog_controller.cc
+++ chrome/browser/printing/print_preview_dialog_controller.cc
@@ -16,6 +16,7 @@
@@ -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 f1a9d46a70ffb..2cf6c5aefa1c7 100644
index e13101506295d..4acd84f6c150f 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 @@
@@ -95,7 +95,7 @@ index f1a9d46a70ffb..2cf6c5aefa1c7 100644
#include "chrome/browser/browser_process.h"
#include "chrome/browser/enterprise/browser_management/management_service_factory.h"
#include "chrome/browser/pdf/pdf_extension_util.h"
@@ -107,6 +108,13 @@ const char16_t kBasicPrintShortcut[] = u"(\u2325\u2318P)";
@@ -108,6 +109,13 @@ const char16_t kBasicPrintShortcut[] = u"(\u2325\u2318P)";
const char16_t kBasicPrintShortcut[] = u"(Ctrl+Shift+P)";
#endif
@@ -109,7 +109,7 @@ index f1a9d46a70ffb..2cf6c5aefa1c7 100644
constexpr char kInvalidArgsForDidStartPreview[] =
"Invalid arguments for DidStartPreview";
constexpr char kInvalidPageIndexForDidPreviewPage[] =
@@ -300,7 +308,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
@@ -301,7 +309,7 @@ void AddPrintPreviewStrings(content::WebUIDataSource* source) {
source->AddLocalizedStrings(kLocalizedStrings);
#if !BUILDFLAG(IS_CHROMEOS)

View File

@@ -1,8 +1,8 @@
diff --git chrome/browser/printing/printer_query.cc chrome/browser/printing/printer_query.cc
index 9fefdc150acf8..6c16766e89584 100644
index 75fb743f95c37..a79ca84b4ff4c 100644
--- chrome/browser/printing/printer_query.cc
+++ chrome/browser/printing/printer_query.cc
@@ -123,6 +123,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
@@ -124,6 +124,7 @@ PrinterQuery::PrinterQuery(content::GlobalRenderFrameHostId rfh_id)
rfh_id_(rfh_id),
cookie_(PrintSettings::NewCookie()) {
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
@@ -11,10 +11,10 @@ index 9fefdc150acf8..6c16766e89584 100644
PrinterQuery::~PrinterQuery() {
diff --git printing/printing_context.h printing/printing_context.h
index c753f04d8b73a..7607571f78119 100644
index 6db58a9992642..ac57e5c200079 100644
--- printing/printing_context.h
+++ printing/printing_context.h
@@ -176,6 +176,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
@@ -204,6 +204,13 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
int job_id() const { return job_id_; }
@@ -26,9 +26,9 @@ index c753f04d8b73a..7607571f78119 100644
+ int render_frame_id() const { return render_frame_id_; }
+
protected:
explicit PrintingContext(Delegate* delegate);
PrintingContext(Delegate* delegate, ProcessBehavior process_behavior);
@@ -220,6 +227,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContext {
@@ -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_;
@@ -37,5 +37,5 @@ index c753f04d8b73a..7607571f78119 100644
+ int render_frame_id_ = 0;
+
private:
#if BUILDFLAG(ENABLE_OOP_PRINTING)
// If this instance of PrintingContext should skip making any system calls
const ProcessBehavior process_behavior_;
};

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

View File

@@ -1,8 +1,8 @@
diff --git ui/base/resource/resource_bundle.cc ui/base/resource/resource_bundle.cc
index bb38b0bd52767..91ff16ccc058b 100644
index 6da2427c7e24a..a642c054fd1f3 100644
--- ui/base/resource/resource_bundle.cc
+++ ui/base/resource/resource_bundle.cc
@@ -943,6 +943,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
@@ -944,6 +944,12 @@ ResourceBundle::ResourceBundle(Delegate* delegate)
: delegate_(delegate),
locale_resources_data_lock_(new base::Lock),
max_scale_factor_(k100Percent) {
@@ -15,7 +15,7 @@ index bb38b0bd52767..91ff16ccc058b 100644
mangle_localized_strings_ = base::CommandLine::ForCurrentProcess()->HasSwitch(
switches::kMangleLocalizedStrings);
}
@@ -952,6 +958,11 @@ ResourceBundle::~ResourceBundle() {
@@ -953,6 +959,11 @@ ResourceBundle::~ResourceBundle() {
UnloadLocaleResources();
}

View File

@@ -1,21 +1,8 @@
diff --git content/browser/renderer_host/ipc_utils.cc content/browser/renderer_host/ipc_utils.cc
index 5cb6e6463767d..84a9de1dfc6f0 100644
--- content/browser/renderer_host/ipc_utils.cc
+++ content/browser/renderer_host/ipc_utils.cc
@@ -73,7 +73,7 @@ bool VerifyInitiatorOrigin(
navigation_url_key,
navigation_url->DeprecatedGetOriginAsURL().spec());
}
- if (initiator_frame_token) {
+ if (initiator_frame_token && initiator_frame_token->has_value()) {
if (RenderFrameHostImpl* initiator_render_frame_host =
RenderFrameHostImpl::FromFrameToken(
process_id, initiator_frame_token->value())) {
diff --git content/browser/renderer_host/render_frame_host_impl.cc content/browser/renderer_host/render_frame_host_impl.cc
index fe69db83393ef..839f002fef986 100644
index 6377dafc2eeac..1e0062bd83343 100644
--- content/browser/renderer_host/render_frame_host_impl.cc
+++ content/browser/renderer_host/render_frame_host_impl.cc
@@ -10210,6 +10210,7 @@ void RenderFrameHostImpl::CommitNavigation(
@@ -10082,6 +10082,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 96dbd73ff0972..c222ef20a598a 100644
index 268533e5bd0ef..48e2089d95729 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 @@
@@ -27,10 +27,10 @@ index 96dbd73ff0972..c222ef20a598a 100644
}
#if BUILDFLAG(IS_WIN)
@@ -2387,6 +2390,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
// This needs to happen only after |window_| has been initialized using
// Init(), because it needs to have the layer.
window_->SetEmbedFrameSinkId(frame_sink_id_);
@@ -2381,6 +2384,16 @@ void RenderWidgetHostViewAura::CreateAuraWindow(aura::client::WindowType type) {
window_->layer()->SetColor(GetBackgroundColor() ? *GetBackgroundColor()
: SK_ColorWHITE);
UpdateFrameSinkIdRegistration();
+
+ // Do this after |window_| is created to avoid crashes on Win10.
+ // See https://crbug.com/761389.
@@ -43,4 +43,4 @@ index 96dbd73ff0972..c222ef20a598a 100644
+ }
}
void RenderWidgetHostViewAura::CreateDelegatedFrameHostClient() {
void RenderWidgetHostViewAura::UpdateFrameSinkIdRegistration() {

View File

@@ -1,5 +1,5 @@
diff --git ui/display/screen.cc ui/display/screen.cc
index 5e8e23ada050f..c11ea072109ec 100644
index 22747ebcf31c0..8fba5da85a656 100644
--- ui/display/screen.cc
+++ ui/display/screen.cc
@@ -107,13 +107,13 @@ base::TimeDelta Screen::CalculateIdleTime() const {

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 0a6c1f498b8fc..79e0cf27a7715 100644
index 7df34f2bc2409..fdc9d91e9d29b 100644
--- chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
+++ chrome/browser/enterprise/connectors/analysis/content_analysis_delegate.cc
@@ -23,6 +23,7 @@
@@ -21,10 +21,10 @@ index 0a6c1f498b8fc..79e0cf27a7715 100644
// 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 9f4750b283306..c00f77eefd4a7 100644
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
@@ -8,6 +8,7 @@
@@ -9,6 +9,7 @@
#include "base/json/json_writer.h"
#include "base/values.h"
@@ -32,7 +32,7 @@ index 9f4750b283306..c00f77eefd4a7 100644
#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"
@@ -49,6 +50,9 @@ const char* GetSiteType(const net::SiteType type) {
@@ -50,6 +51,9 @@ const char* GetSiteType(const net::SiteType type) {
// "PrimarySites": [ "https://example2.com", "https://example2.com.co" ]
// } ]
std::string ComputeRelatedWebsiteSetsInfo() {
@@ -43,7 +43,7 @@ index 9f4750b283306..c00f77eefd4a7 100644
Profile* profile = ProfileManager::GetActiveUserProfile();
#else
diff --git chrome/browser/net/profile_network_context_service.cc chrome/browser/net/profile_network_context_service.cc
index 9a777bb144d00..b6eeebc040351 100644
index 5923117661980..c363f0039d243 100644
--- chrome/browser/net/profile_network_context_service.cc
+++ chrome/browser/net/profile_network_context_service.cc
@@ -22,6 +22,7 @@
@@ -54,7 +54,7 @@ index 9a777bb144d00..b6eeebc040351 100644
#include "chrome/browser/browser_features.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/cookie_settings_factory.h"
@@ -272,8 +273,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile)
@@ -271,8 +272,10 @@ ProfileNetworkContextService::ProfileNetworkContextService(Profile* profile)
base::Unretained(this)));
cookie_settings_ = CookieSettingsFactory::GetForProfile(profile);
cookie_settings_observation_.Observe(cookie_settings_.get());
@@ -77,7 +77,7 @@ index 9a777bb144d00..b6eeebc040351 100644
// Update all FPS Access Delegates on the FPS service to be `enabled`.
first_party_sets::FirstPartySetsPolicyServiceFactory::GetForBrowserContext(
profile_)
@@ -817,9 +823,26 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -814,9 +820,26 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
network_context_params->cookie_manager_params =
CreateCookieManagerParams(profile_, *cookie_settings_);
@@ -105,7 +105,7 @@ index 9a777bb144d00..b6eeebc040351 100644
PrefService* local_state = g_browser_process->local_state();
// Configure the HTTP cache path and size.
base::FilePath base_cache_path;
@@ -828,15 +851,14 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -825,15 +848,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 +125,7 @@ index 9a777bb144d00..b6eeebc040351 100644
network_context_params->file_paths->data_directory =
path.Append(chrome::kNetworkDataDirname);
network_context_params->file_paths->unsandboxed_data_path = path;
@@ -989,6 +1011,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -986,6 +1008,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
network_context_params->block_trust_tokens =
anti_abuse_content_setting == CONTENT_SETTING_BLOCK;
@@ -133,7 +133,7 @@ index 9a777bb144d00..b6eeebc040351 100644
network_context_params->first_party_sets_access_delegate_params =
network::mojom::FirstPartySetsAccessDelegateParams::New();
network_context_params->first_party_sets_access_delegate_params->enabled =
@@ -1005,6 +1028,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
@@ -1002,6 +1025,7 @@ void ProfileNetworkContextService::ConfigureNetworkContextParamsInternal(
GetForBrowserContext(profile_);
DCHECK(fps_service);
fps_service->AddRemoteAccessDelegate(std::move(fps_access_delegate_remote));
@@ -216,7 +216,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 3ca2c691cfd00..a148193f96a0e 100644
index 40d12ecb55155..b87a1cb86f85c 100644
--- net/cookies/cookie_monster.h
+++ net/cookies/cookie_monster.h
@@ -208,6 +208,8 @@ class NET_EXPORT CookieMonster : public CookieStore {
@@ -245,7 +245,7 @@ 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 bcc62a6f41379..b0e052349ad35 100644
index 708a4ae904d88..dc63376f7a50e 100644
--- services/network/cookie_manager.cc
+++ services/network/cookie_manager.cc
@@ -303,14 +303,9 @@ void CookieManager::AllowFileSchemeCookies(
@@ -267,10 +267,10 @@ index bcc62a6f41379..b0e052349ad35 100644
void CookieManager::SetForceKeepSessionState() {
diff --git services/network/network_context.cc services/network/network_context.cc
index 344fb45470747..100c815cf3db4 100644
index 5ac5baaa6a86c..77575748bfacf 100644
--- services/network/network_context.cc
+++ services/network/network_context.cc
@@ -2528,16 +2528,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
@@ -2506,16 +2506,20 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
network_service_->network_quality_estimator());
}
@@ -299,7 +299,7 @@ index 344fb45470747..100c815cf3db4 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 88fc9ddba7fff..9a50865fa2d14 100644
index 93c755060193d..0ee9441892cda 100644
--- services/network/public/mojom/network_context.mojom
+++ services/network/public/mojom/network_context.mojom
@@ -371,6 +371,9 @@ struct NetworkContextParams {

View File

@@ -1,5 +1,5 @@
diff --git content/browser/storage_partition_impl.cc content/browser/storage_partition_impl.cc
index 4efe86694c37f..143c1411338c3 100644
index 9aad7b5bb5ac8..bb31eb35c9aa4 100644
--- content/browser/storage_partition_impl.cc
+++ content/browser/storage_partition_impl.cc
@@ -543,10 +543,6 @@ class LoginHandlerDelegate {
@@ -26,7 +26,7 @@ index 4efe86694c37f..143c1411338c3 100644
new LoginHandlerDelegate(
std::move(auth_challenge_responder), std::move(web_contents_getter),
auth_info, is_request_for_primary_main_frame, process_id, request_id, url,
@@ -3333,8 +3323,12 @@ void StoragePartitionImpl::GetQuotaSettings(
@@ -3349,8 +3339,12 @@ void StoragePartitionImpl::GetQuotaSettings(
return;
}
@@ -40,7 +40,7 @@ index 4efe86694c37f..143c1411338c3 100644
storage::GetDefaultDeviceInfoHelper(), std::move(callback));
}
@@ -3344,9 +3338,12 @@ void StoragePartitionImpl::InitNetworkContext() {
@@ -3360,9 +3354,12 @@ void StoragePartitionImpl::InitNetworkContext() {
cert_verifier::mojom::CertVerifierCreationParamsPtr
cert_verifier_creation_params =
cert_verifier::mojom::CertVerifierCreationParams::New();

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 c07c16f62e3fb..25b4cd3e023e4 100644
index ba0387d5e3c5e..cc8f21ede9967 100644
--- content/browser/browser_context.cc
+++ content/browser/browser_context.cc
@@ -130,7 +130,7 @@ StoragePartition* BrowserContext::GetStoragePartition(

View File

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

View File

@@ -1,8 +1,8 @@
diff --git ui/base/x/x11_os_exchange_data_provider.cc ui/base/x/x11_os_exchange_data_provider.cc
index 5d169e08b509d..aff534bddfd2f 100644
index 4a0397e34c1d3..af8be5329b5ff 100644
--- ui/base/x/x11_os_exchange_data_provider.cc
+++ ui/base/x/x11_os_exchange_data_provider.cc
@@ -157,7 +157,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url,
@@ -163,7 +163,8 @@ void XOSExchangeDataProvider::SetURL(const GURL& url,
format_map_.Insert(x11::GetAtom(kMimeTypeMozillaURL), mem);
// Set a string fallback as well.

View File

@@ -1,3 +1,18 @@
diff --git chrome/browser/ui/views/toolbar/app_menu.cc chrome/browser/ui/views/toolbar/app_menu.cc
index 4b17c7f0423bd..ea4c5838ec73f 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) {
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(),
+ /*parent_widget=*/gfx::kNullAcceleratedWidget,
+ /*corners=*/absl::nullopt,
"Chrome.AppMenu.MenuHostInitToNextFramePresented");
}
diff --git ui/base/models/menu_model.h ui/base/models/menu_model.h
index a6d70c71a1b3a..1b628f5284409 100644
--- ui/base/models/menu_model.h
@@ -43,7 +58,7 @@ index a6d70c71a1b3a..1b628f5284409 100644
virtual void MenuWillShow() {}
diff --git ui/gfx/render_text.cc ui/gfx/render_text.cc
index dab8c9be8d902..5951ec36a874e 100644
index 2a0591cd1bc1a..99e1da00e1c75 100644
--- ui/gfx/render_text.cc
+++ ui/gfx/render_text.cc
@@ -670,6 +670,14 @@ void RenderText::SetWhitespaceElision(absl::optional<bool> whitespace_elision) {
@@ -61,7 +76,7 @@ index dab8c9be8d902..5951ec36a874e 100644
void RenderText::SetDisplayRect(const Rect& r) {
if (r != display_rect_) {
display_rect_ = r;
@@ -2061,6 +2069,19 @@ void RenderText::OnTextAttributeChanged() {
@@ -2070,6 +2078,19 @@ void RenderText::OnTextAttributeChanged() {
layout_text_up_to_date_ = false;
@@ -82,7 +97,7 @@ index dab8c9be8d902..5951ec36a874e 100644
}
diff --git ui/gfx/render_text.h ui/gfx/render_text.h
index 212c98c242ed3..26f9bb4c28400 100644
index 6195f237d49ba..fa566294dcdc7 100644
--- ui/gfx/render_text.h
+++ ui/gfx/render_text.h
@@ -347,6 +347,10 @@ class GFX_EXPORT RenderText {
@@ -96,7 +111,7 @@ index 212c98c242ed3..26f9bb4c28400 100644
const Rect& display_rect() const { return display_rect_; }
void SetDisplayRect(const Rect& r);
@@ -1056,6 +1060,8 @@ class GFX_EXPORT RenderText {
@@ -1060,6 +1064,8 @@ class GFX_EXPORT RenderText {
// Tell whether or not the |layout_text_| needs an update or is up to date.
mutable bool layout_text_up_to_date_ = false;
@@ -119,10 +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 30a4011aeb0d7..d5f2bc68d3dda 100644
index 1fb9b89c56e6c..031221a565e4f 100644
--- ui/views/controls/button/label_button.cc
+++ ui/views/controls/button/label_button.cc
@@ -575,6 +575,12 @@ void LabelButton::OnThemeChanged() {
@@ -577,6 +577,12 @@ void LabelButton::OnThemeChanged() {
SchedulePaint();
}
@@ -136,10 +151,10 @@ index 30a4011aeb0d7..d5f2bc68d3dda 100644
Button::StateChanged(old_state);
ResetLabelEnabledColor();
diff --git ui/views/controls/button/label_button.h ui/views/controls/button/label_button.h
index bd646d55e25c7..b1d0089f439ac 100644
index 518d9d1d8d022..a997b7982bfb0 100644
--- ui/views/controls/button/label_button.h
+++ ui/views/controls/button/label_button.h
@@ -160,6 +160,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
@@ -164,6 +164,9 @@ class VIEWS_EXPORT LabelButton : public Button, public NativeThemeDelegate {
ui::NativeTheme::State GetForegroundThemeState(
ui::NativeTheme::ExtraParams* params) const override;
@@ -150,10 +165,10 @@ index bd646d55e25c7..b1d0089f439ac 100644
ImageView* image() const { return image_; }
Label* label() const { return label_; }
diff --git ui/views/controls/label.cc ui/views/controls/label.cc
index ec6433aa7412b..f33ca106e27c3 100644
index ac9fcfc932d0b..88b14d92d7278 100644
--- ui/views/controls/label.cc
+++ ui/views/controls/label.cc
@@ -54,12 +54,29 @@ enum LabelPropertyKey {
@@ -56,12 +56,29 @@ enum LabelPropertyKey {
kLabelLineHeight,
kLabelObscured,
kLabelAllowCharacterBreak,
@@ -183,7 +198,7 @@ index ec6433aa7412b..f33ca106e27c3 100644
} // namespace
namespace views {
@@ -479,6 +496,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
@@ -481,6 +498,15 @@ void Label::SetElideBehavior(gfx::ElideBehavior elide_behavior) {
OnPropertyChanged(&elide_behavior_, kPropertyEffectsPreferredSizeChanged);
}
@@ -199,7 +214,7 @@ index ec6433aa7412b..f33ca106e27c3 100644
std::u16string Label::GetTooltipText() const {
return tooltip_text_;
}
@@ -799,6 +825,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
@@ -801,6 +827,16 @@ std::unique_ptr<gfx::RenderText> Label::CreateRenderText() const {
render_text->SelectRange(stored_selection_range_);
}
@@ -217,10 +232,10 @@ index ec6433aa7412b..f33ca106e27c3 100644
}
diff --git ui/views/controls/label.h ui/views/controls/label.h
index 0f1f9cb251b23..9b42eac91562b 100644
index a2c47313841e2..9123b35b320f9 100644
--- ui/views/controls/label.h
+++ ui/views/controls/label.h
@@ -240,6 +240,10 @@ class VIEWS_EXPORT Label : public View,
@@ -241,6 +241,10 @@ class VIEWS_EXPORT Label : public View,
gfx::ElideBehavior GetElideBehavior() const;
void SetElideBehavior(gfx::ElideBehavior elide_behavior);
@@ -231,7 +246,7 @@ index 0f1f9cb251b23..9b42eac91562b 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
@@ -515,6 +519,7 @@ class VIEWS_EXPORT Label : public View,
@@ -527,6 +531,7 @@ class VIEWS_EXPORT Label : public View,
int max_width_ = 0;
// This is used in single-line mode.
int max_width_single_line_ = 0;
@@ -240,7 +255,7 @@ index 0f1f9cb251b23..9b42eac91562b 100644
std::unique_ptr<SelectionController> selection_controller_;
diff --git ui/views/controls/menu/menu_controller.cc ui/views/controls/menu/menu_controller.cc
index 9b0b1c6011fec..f0d037e75e790 100644
index 896190761b3b2..66b128ac4ab89 100644
--- ui/views/controls/menu/menu_controller.cc
+++ ui/views/controls/menu/menu_controller.cc
@@ -566,7 +566,8 @@ void MenuController::Run(Widget* parent,
@@ -261,7 +276,7 @@ index 9b0b1c6011fec..f0d037e75e790 100644
// Only create a MenuPreTargetHandler for non-nested menus. Nested menus
// will use the existing one.
@@ -2233,6 +2235,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
@@ -2234,6 +2236,7 @@ void MenuController::OpenMenuImpl(MenuItemView* item, bool show) {
params.do_capture = do_capture;
params.native_view_for_gestures = native_view_for_gestures_;
params.owned_window_anchor = anchor;
@@ -269,7 +284,7 @@ index 9b0b1c6011fec..f0d037e75e790 100644
if (item->GetParentMenuItem()) {
params.context = item->GetWidget();
// (crbug.com/1414232) The item to be open is a submenu. Make sure
@@ -2918,8 +2921,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
@@ -2919,8 +2922,13 @@ MenuItemView* MenuController::FindInitialSelectableMenuItem(
void MenuController::OpenSubmenuChangeSelectionIfCan() {
MenuItemView* item = pending_state_.item;
@@ -284,7 +299,7 @@ index 9b0b1c6011fec..f0d037e75e790 100644
// Show the sub-menu.
SetSelection(item, SELECTION_OPEN_SUBMENU | SELECTION_UPDATE_IMMEDIATELY);
@@ -2939,8 +2947,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
@@ -2940,8 +2948,10 @@ void MenuController::OpenSubmenuChangeSelectionIfCan() {
void MenuController::CloseSubmenu() {
MenuItemView* item = state_.item;
DCHECK(item);
@@ -297,10 +312,10 @@ index 9b0b1c6011fec..f0d037e75e790 100644
SetSelection(item, SELECTION_UPDATE_IMMEDIATELY);
else if (item->GetParentMenuItem()->GetParentMenuItem())
diff --git ui/views/controls/menu/menu_controller.h ui/views/controls/menu/menu_controller.h
index 97c1f62da483b..2c8a52f562147 100644
index 55d0bb090d221..3cf3054e4ad7b 100644
--- ui/views/controls/menu/menu_controller.h
+++ ui/views/controls/menu/menu_controller.h
@@ -138,7 +138,9 @@ class VIEWS_EXPORT MenuController
@@ -139,7 +139,9 @@ class VIEWS_EXPORT MenuController
MenuAnchorPosition position,
bool context_menu,
bool is_nested_drag,
@@ -311,7 +326,7 @@ index 97c1f62da483b..2c8a52f562147 100644
bool for_drop() const { return for_drop_; }
@@ -722,6 +724,8 @@ class VIEWS_EXPORT MenuController
@@ -734,6 +736,8 @@ class VIEWS_EXPORT MenuController
// RunType::SEND_GESTURE_EVENTS_TO_OWNER is set.
gfx::NativeView native_view_for_gestures_ = gfx::NativeView();
@@ -360,7 +375,7 @@ index b8fa1c116ebcd..015f15ed72385 100644
virtual int GetMaxWidthForMenu(MenuItemView* menu);
diff --git ui/views/controls/menu/menu_host.cc ui/views/controls/menu/menu_host.cc
index 2da9d8fb49d8d..9f344ff8180f1 100644
index 6e457f76955ce..041f1ead63339 100644
--- ui/views/controls/menu/menu_host.cc
+++ ui/views/controls/menu/menu_host.cc
@@ -141,6 +141,8 @@ void MenuHost::InitMenuHost(const InitParams& init_params) {
@@ -383,10 +398,10 @@ index 2da9d8fb49d8d..9f344ff8180f1 100644
#if BUILDFLAG(IS_WIN)
diff --git ui/views/controls/menu/menu_host.h ui/views/controls/menu/menu_host.h
index 10c4ecd08f76b..062f0c58bb805 100644
index aafbdb2535951..8a8e78be4a649 100644
--- ui/views/controls/menu/menu_host.h
+++ ui/views/controls/menu/menu_host.h
@@ -53,6 +53,8 @@ class MenuHost : public Widget, public WidgetObserver {
@@ -55,6 +55,8 @@ class MenuHost : public Widget, public WidgetObserver {
// Additional information that helps to position anchored windows in such
// backends as Wayland.
ui::OwnedWindowAnchor owned_window_anchor;
@@ -396,10 +411,10 @@ index 10c4ecd08f76b..062f0c58bb805 100644
explicit MenuHost(SubmenuView* submenu);
diff --git ui/views/controls/menu/menu_item_view.cc ui/views/controls/menu/menu_item_view.cc
index bbb50ca16f67e..9217236ef056b 100644
index f556d3d550f5f..5fc809acc0373 100644
--- ui/views/controls/menu/menu_item_view.cc
+++ ui/views/controls/menu/menu_item_view.cc
@@ -1057,6 +1057,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
@@ -1055,6 +1055,15 @@ void MenuItemView::PaintBackground(gfx::Canvas* canvas,
spilling_rect.set_y(spilling_rect.y() - corner_radius_);
spilling_rect.set_height(spilling_rect.height() + corner_radius_);
canvas->DrawRoundRect(spilling_rect, corner_radius_, flags);
@@ -415,7 +430,7 @@ index bbb50ca16f67e..9217236ef056b 100644
} else if (paint_as_selected) {
gfx::Rect item_bounds = GetLocalBounds();
if (type_ == Type::kActionableSubMenu) {
@@ -1121,6 +1130,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
@@ -1119,6 +1128,13 @@ void MenuItemView::PaintMinorIconAndText(gfx::Canvas* canvas, SkColor color) {
}
SkColor MenuItemView::GetTextColor(bool minor, bool paint_as_selected) const {
@@ -430,7 +445,7 @@ index bbb50ca16f67e..9217236ef056b 100644
// use the default color.
if (!paint_as_selected && foreground_color_id_.has_value()) {
diff --git ui/views/controls/menu/menu_model_adapter.cc ui/views/controls/menu/menu_model_adapter.cc
index 887f471c4db69..5d097994cbf72 100644
index 7e8ea9764caf3..0f407cd4a129c 100644
--- ui/views/controls/menu/menu_model_adapter.cc
+++ ui/views/controls/menu/menu_model_adapter.cc
@@ -4,6 +4,7 @@
@@ -441,7 +456,7 @@ index 887f471c4db69..5d097994cbf72 100644
#include <list>
#include <memory>
#include <utility>
@@ -225,6 +226,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
@@ -226,6 +227,76 @@ bool MenuModelAdapter::IsItemChecked(int id) const {
return model->IsItemCheckedAt(index);
}
@@ -519,10 +534,10 @@ index 887f471c4db69..5d097994cbf72 100644
// Look up the menu model for this menu.
const std::map<MenuItemView*, ui::MenuModel*>::const_iterator map_iterator =
diff --git ui/views/controls/menu/menu_model_adapter.h ui/views/controls/menu/menu_model_adapter.h
index a8354c0699920..9b5deb522c29a 100644
index 30e11b5eee406..0c08301054ffa 100644
--- ui/views/controls/menu/menu_model_adapter.h
+++ ui/views/controls/menu/menu_model_adapter.h
@@ -89,6 +89,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate,
@@ -92,6 +92,20 @@ class VIEWS_EXPORT MenuModelAdapter : public MenuDelegate,
bool IsCommandEnabled(int id) const override;
bool IsCommandVisible(int id) const override;
bool IsItemChecked(int id) const override;
@@ -544,53 +559,53 @@ index a8354c0699920..9b5deb522c29a 100644
void WillHideMenu(MenuItemView* menu) override;
void OnMenuClosed(MenuItemView* menu) override;
diff --git ui/views/controls/menu/menu_runner.cc ui/views/controls/menu/menu_runner.cc
index b434cf87b0bb2..bc13038952f64 100644
index d2d1ac027cfca..9f54154189f78 100644
--- ui/views/controls/menu/menu_runner.cc
+++ ui/views/controls/menu/menu_runner.cc
@@ -37,6 +37,7 @@ void MenuRunner::RunMenuAt(Widget* parent,
MenuAnchorPosition anchor,
ui::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners) {
@@ -42,6 +42,7 @@ void MenuRunner::RunMenuAt(
MenuAnchorPosition anchor,
ui::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners,
absl::optional<std::string> show_menu_host_duration_histogram) {
// Do not attempt to show the menu if the application is currently shutting
// down. MenuDelegate::OnMenuClosed would not be called.
@@ -83,7 +84,7 @@ void MenuRunner::RunMenuAt(Widget* parent,
@@ -89,7 +90,7 @@ void MenuRunner::RunMenuAt(
}
impl_->RunMenuAt(parent, button_controller, bounds, anchor, run_types_,
- native_view_for_gestures, corners);
+ native_view_for_gestures, parent_widget, corners);
- native_view_for_gestures, corners,
+ native_view_for_gestures, parent_widget, corners,
std::move(show_menu_host_duration_histogram));
}
bool MenuRunner::IsRunning() const {
diff --git ui/views/controls/menu/menu_runner.h ui/views/controls/menu/menu_runner.h
index 78148a4a753c5..633404c4accc9 100644
index 4531f4586d3dd..de78b3f8ac552 100644
--- ui/views/controls/menu/menu_runner.h
+++ ui/views/controls/menu/menu_runner.h
@@ -152,6 +152,8 @@ class VIEWS_EXPORT MenuRunner {
@@ -157,6 +157,8 @@ class VIEWS_EXPORT MenuRunner {
MenuAnchorPosition anchor,
ui::MenuSourceType source_type,
gfx::NativeView native_view_for_gestures = gfx::NativeView(),
+ gfx::AcceleratedWidget parent_widget =
+ gfx::kNullAcceleratedWidget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt);
// Returns true if we're in a nested run loop running the menu.
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt,
absl::optional<std::string> show_menu_host_duration_histogram =
absl::nullopt);
diff --git ui/views/controls/menu/menu_runner_impl.cc ui/views/controls/menu/menu_runner_impl.cc
index e82249ad5e887..3a7429bcaf9f1 100644
index 8100d5e1b4a44..45036c43772ee 100644
--- ui/views/controls/menu/menu_runner_impl.cc
+++ ui/views/controls/menu/menu_runner_impl.cc
@@ -117,6 +117,7 @@ void MenuRunnerImpl::RunMenuAt(Widget* parent,
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners) {
@@ -116,6 +116,7 @@ void MenuRunnerImpl::RunMenuAt(
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners,
absl::optional<std::string> show_menu_host_duration_histogram) {
closing_event_time_ = base::TimeTicks();
if (running_) {
@@ -184,7 +185,7 @@ void MenuRunnerImpl::RunMenuAt(Widget* parent,
controller->Run(parent, button_controller, menu_, bounds, anchor,
@@ -189,7 +190,7 @@ void MenuRunnerImpl::RunMenuAt(
controller->Run(parent, button_controller, menu_.get(), bounds, anchor,
(run_types & MenuRunner::CONTEXT_MENU) != 0,
(run_types & MenuRunner::NESTED_DRAG) != 0,
- native_view_for_gestures);
@@ -599,27 +614,28 @@ index e82249ad5e887..3a7429bcaf9f1 100644
void MenuRunnerImpl::Cancel() {
diff --git ui/views/controls/menu/menu_runner_impl.h ui/views/controls/menu/menu_runner_impl.h
index 4d2909b5094ab..245e1a24dd810 100644
index 9b2ac3f475acc..27c0bf33299d9 100644
--- ui/views/controls/menu/menu_runner_impl.h
+++ ui/views/controls/menu/menu_runner_impl.h
@@ -53,6 +53,7 @@ class VIEWS_EXPORT MenuRunnerImpl : public MenuRunnerImplInterface,
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
base::TimeTicks GetClosingEventTime() const override;
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt,
absl::optional<std::string> show_menu_host_duration_histogram =
absl::nullopt) override;
diff --git ui/views/controls/menu/menu_runner_impl_adapter.cc ui/views/controls/menu/menu_runner_impl_adapter.cc
index f7d363455a8bc..5f89c39338b0c 100644
index 8ba01786963e4..70d3c3b9363af 100644
--- ui/views/controls/menu/menu_runner_impl_adapter.cc
+++ ui/views/controls/menu/menu_runner_impl_adapter.cc
@@ -35,9 +35,10 @@ void MenuRunnerImplAdapter::RunMenuAt(
@@ -36,10 +36,11 @@ void MenuRunnerImplAdapter::RunMenuAt(
MenuAnchorPosition anchor,
int32_t types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners) {
absl::optional<gfx::RoundedCornersF> corners,
absl::optional<std::string> show_menu_host_duration_histogram) {
impl_->RunMenuAt(parent, button_controller, bounds, anchor, types,
- native_view_for_gestures);
+ native_view_for_gestures, parent_widget);
@@ -627,31 +643,31 @@ index f7d363455a8bc..5f89c39338b0c 100644
void MenuRunnerImplAdapter::Cancel() {
diff --git ui/views/controls/menu/menu_runner_impl_adapter.h ui/views/controls/menu/menu_runner_impl_adapter.h
index 5064010572a55..dd975e37b32cb 100644
index 8b2e1065dc9e9..c7f20c42a49ea 100644
--- ui/views/controls/menu/menu_runner_impl_adapter.h
+++ ui/views/controls/menu/menu_runner_impl_adapter.h
@@ -44,6 +44,7 @@ class VIEWS_EXPORT MenuRunnerImplAdapter : public MenuRunnerImplInterface {
MenuAnchorPosition anchor,
int32_t types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
base::TimeTicks GetClosingEventTime() const override;
MenuAnchorPosition anchor,
int32_t types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt,
absl::optional<std::string> show_menu_host_duration_histogram =
absl::nullopt) override;
diff --git ui/views/controls/menu/menu_runner_impl_cocoa.h ui/views/controls/menu/menu_runner_impl_cocoa.h
index 2325534ec9243..7573a54cc891c 100644
index 0d920c6857f8a..e3156a18dc8bc 100644
--- ui/views/controls/menu/menu_runner_impl_cocoa.h
+++ ui/views/controls/menu/menu_runner_impl_cocoa.h
@@ -42,6 +42,7 @@ class VIEWS_EXPORT MenuRunnerImplCocoa : public MenuRunnerImplInterface {
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) override;
void Cancel() override;
base::TimeTicks GetClosingEventTime() const override;
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt,
absl::optional<std::string> show_menu_host_duration_histogram =
absl::nullopt) override;
diff --git ui/views/controls/menu/menu_runner_impl_cocoa.mm ui/views/controls/menu/menu_runner_impl_cocoa.mm
index a7a82c6c40216..cdf5007d7b3ab 100644
index c7b2c7ae0bd9b..fc3c32e6ddb79 100644
--- ui/views/controls/menu/menu_runner_impl_cocoa.mm
+++ ui/views/controls/menu/menu_runner_impl_cocoa.mm
@@ -190,6 +190,7 @@ void MenuRunnerImplCocoa::RunMenuAt(
@@ -659,22 +675,22 @@ index a7a82c6c40216..cdf5007d7b3ab 100644
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget /*parent_widget*/,
absl::optional<gfx::RoundedCornersF> corners) {
absl::optional<gfx::RoundedCornersF> corners,
absl::optional<std::string> show_menu_host_duration_histogram) {
DCHECK(!IsRunning());
DCHECK(parent);
diff --git ui/views/controls/menu/menu_runner_impl_interface.h ui/views/controls/menu/menu_runner_impl_interface.h
index cf696fbcf0714..5c48fd7410b88 100644
index 5db5ddfec3c1f..af0ee5a3ae030 100644
--- ui/views/controls/menu/menu_runner_impl_interface.h
+++ ui/views/controls/menu/menu_runner_impl_interface.h
@@ -46,6 +46,8 @@ class MenuRunnerImplInterface {
@@ -47,6 +47,8 @@ class MenuRunnerImplInterface {
MenuAnchorPosition anchor,
int32_t run_types,
gfx::NativeView native_view_for_gestures,
+ gfx::AcceleratedWidget parent_widget =
+ gfx::kNullAcceleratedWidget,
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt) = 0;
// Hides and cancels the menu.
absl::optional<gfx::RoundedCornersF> corners = absl::nullopt,
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
--- ui/views/controls/menu/menu_scroll_view_container.cc
@@ -716,24 +732,24 @@ 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 6cfd912339c89..37877b3ce96be 100644
index b5891ddd8c8ba..a2e494818836a 100644
--- ui/views/view.h
+++ ui/views/view.h
@@ -21,6 +21,7 @@
#include "base/memory/raw_ptr.h"
@@ -22,6 +22,7 @@
#include "base/memory/safety_checks.h"
#include "base/observer_list.h"
#include "base/strings/string_piece.h"
+#include "base/supports_user_data.h"
#include "build/build_config.h"
#include "third_party/abseil-cpp/absl/types/optional.h"
#include "third_party/skia/include/core/SkPath.h"
@@ -283,7 +284,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
@@ -286,7 +287,8 @@ class VIEWS_EXPORT View : public ui::LayerDelegate,
public ui::EventTarget,
public ui::EventHandler,
public ui::PropertyHandler,
- public ui::metadata::MetaDataProvider {
+ public ui::metadata::MetaDataProvider,
+ public base::SupportsUserData {
public:
using Views = std::vector<View*>;
// Do not remove this macro!
// The macro is maintained by the memory safety team.
ADVANCED_MEMORY_SAFETY_CHECKS();

View File

@@ -1,5 +1,5 @@
diff --git content/browser/renderer_host/render_widget_host_view_base.cc content/browser/renderer_host/render_widget_host_view_base.cc
index 94d403ba5c7a2..125f5ad0dbf72 100644
index 84105424b8682..8aa281ca9d7e2 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 {
@@ -18,7 +18,7 @@ index 94d403ba5c7a2..125f5ad0dbf72 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 955f08e21de30..cdfcd52e2a11e 100644
index 7c84c4deec00d..3a65053deca93 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;
@@ -62,7 +62,7 @@ index 955f08e21de30..cdfcd52e2a11e 100644
// Sets the cursor for this view to the one specified.
virtual void UpdateCursor(const ui::Cursor& cursor) = 0;
@@ -710,6 +723,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -733,6 +746,10 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
// to all displays.
gfx::Size system_cursor_size_;
@@ -73,7 +73,7 @@ index 955f08e21de30..cdfcd52e2a11e 100644
private:
FRIEND_TEST_ALL_PREFIXES(
BrowserSideFlingBrowserTest,
@@ -731,10 +748,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
@@ -754,10 +771,6 @@ class CONTENT_EXPORT RenderWidgetHostViewBase : public RenderWidgetHostView {
void SynchronizeVisualProperties();
@@ -85,7 +85,7 @@ index 955f08e21de30..cdfcd52e2a11e 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 401e65a8ebe6f..b83410da96f67 100644
index 9ced2dff5d5ff..7f8eba9858726 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 {
@@ -99,7 +99,7 @@ index 401e65a8ebe6f..b83410da96f67 100644
#if BUILDFLAG(IS_WIN)
// A callback function for EnumThreadWindows to enumerate and dismiss
// any owned popup windows.
@@ -868,6 +872,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
@@ -870,6 +874,14 @@ void RenderWidgetHostViewEventHandler::MoveCursorToCenter(
}
return;
}
@@ -114,7 +114,7 @@ index 401e65a8ebe6f..b83410da96f67 100644
#endif
synthetic_move_position_ = center_in_screen;
}
@@ -897,6 +909,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
@@ -899,6 +911,17 @@ bool RenderWidgetHostViewEventHandler::MatchesSynthesizedMovePosition(
}
void RenderWidgetHostViewEventHandler::SetKeyboardFocus() {
@@ -152,10 +152,10 @@ 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 6f275a01d69ec..fdf8398e9261a 100644
index f3a0e657041d8..e9c01e177ea1a 100644
--- ui/ozone/platform/x11/x11_window.cc
+++ ui/ozone/platform/x11/x11_window.cc
@@ -1807,7 +1807,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
@@ -1868,7 +1868,8 @@ void X11Window::CreateXWindow(const PlatformWindowInitProperties& properties) {
req.border_pixel = 0;
bounds_in_pixels_ = SanitizeBounds(bounds);
@@ -179,10 +179,10 @@ 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 4b69ae243415a..5f7248ce7274c 100644
index 237f041a3a350..af978b38eb7e4 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_linux.cc
@@ -174,6 +174,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
@@ -175,6 +175,18 @@ Widget::MoveLoopResult DesktopWindowTreeHostLinux::RunMoveLoop(
return result;
}
@@ -201,7 +201,7 @@ index 4b69ae243415a..5f7248ce7274c 100644
void DesktopWindowTreeHostLinux::DispatchEvent(ui::Event* event) {
// In Windows, the native events sent to chrome are separated into client
// and non-client versions of events, which we record on our LocatedEvent
@@ -297,6 +309,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties(
@@ -298,6 +310,8 @@ void DesktopWindowTreeHostLinux::AddAdditionalInitProperties(
properties->wayland_app_id = params.wayland_app_id;
@@ -243,7 +243,7 @@ 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 9092e91e37b7d..9d749f2508eb0 100644
index 23e321bf8ae39..2611612b2d3ed 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) {
@@ -258,7 +258,7 @@ index 9092e91e37b7d..9d749f2508eb0 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 803d1c68db639..6ab8229695628 100644
index e4ab78b55cf4a..246f34a3fb471 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) {
@@ -295,7 +295,7 @@ index 803d1c68db639..6ab8229695628 100644
message_handler_->Init(parent_hwnd, pixel_bounds);
CreateCompositor(params.force_software_compositing);
OnAcceleratedWidgetAvailable();
@@ -1035,11 +1048,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
@@ -1043,11 +1056,15 @@ void DesktopWindowTreeHostWin::HandleFrameChanged() {
}
void DesktopWindowTreeHostWin::HandleNativeFocus(HWND last_focused_window) {
@@ -313,7 +313,7 @@ index 803d1c68db639..6ab8229695628 100644
}
bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
@@ -1047,6 +1064,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
@@ -1055,6 +1072,12 @@ bool DesktopWindowTreeHostWin::HandleMouseEvent(ui::MouseEvent* event) {
if (ui::PlatformEventSource::ShouldIgnoreNativePlatformEvents())
return true;
@@ -326,7 +326,7 @@ index 803d1c68db639..6ab8229695628 100644
SendEventToSink(event);
return event->handled();
}
@@ -1225,8 +1248,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
@@ -1233,8 +1256,16 @@ void DesktopWindowTreeHostWin::SetBoundsInDIP(const gfx::Rect& bounds) {
// positions in variable-DPI situations. See https://crbug.com/1224715 for
// details.
aura::Window* root = nullptr;
@@ -345,10 +345,10 @@ index 803d1c68db639..6ab8229695628 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 0a3dcdbba1d80..7041d6718a7be 100644
index 013f571b52168..508054726fb7d 100644
--- ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
+++ ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
@@ -322,6 +322,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
@@ -323,6 +323,10 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
// True if the window should have the frame removed.
bool remove_standard_frame_;
@@ -360,20 +360,20 @@ index 0a3dcdbba1d80..7041d6718a7be 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 968eebaf6719c..11948c52c3d2d 100644
index 93b17a67f9541..320f7452d3567 100644
--- ui/views/widget/widget.cc
+++ ui/views/widget/widget.cc
@@ -368,7 +368,8 @@ void Widget::Init(InitParams params) {
@@ -384,7 +384,8 @@ void Widget::Init(InitParams params) {
}
params.child |= (params.type == InitParams::TYPE_CONTROL);
- is_top_level_ = !params.child;
+ is_top_level_ = !params.child ||
+ params.parent_widget != gfx::kNullAcceleratedWidget;
is_headless_ = params.ShouldInitAsHeadless();
if (params.opacity == views::Widget::InitParams::WindowOpacity::kInferred &&
params.type != views::Widget::InitParams::TYPE_WINDOW) {
@@ -480,14 +481,22 @@ void Widget::Init(InitParams params) {
@@ -494,14 +495,22 @@ void Widget::Init(InitParams params) {
if (show_state == ui::SHOW_STATE_MAXIMIZED) {
Maximize();
@@ -397,7 +397,7 @@ index 968eebaf6719c..11948c52c3d2d 100644
}
}
@@ -1638,10 +1647,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
@@ -1656,10 +1665,16 @@ void Widget::OnNativeWidgetParentChanged(gfx::NativeView parent) {
}
gfx::Size Widget::GetMinimumSize() const {
@@ -415,10 +415,10 @@ index 968eebaf6719c..11948c52c3d2d 100644
}
diff --git ui/views/widget/widget.h ui/views/widget/widget.h
index 419b75d0608b2..57bb1fca770ed 100644
index c7ba1a40a7e46..81a37e6ab2a87 100644
--- ui/views/widget/widget.h
+++ ui/views/widget/widget.h
@@ -351,6 +351,8 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -357,6 +357,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 419b75d0608b2..57bb1fca770ed 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
@@ -742,7 +744,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
@@ -751,7 +753,7 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
void ShowInactive();
// Activates the widget, assuming it already exists and is visible.
@@ -466,10 +466,10 @@ 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 b8f58a147c751..8c4ed9ba8167d 100644
index 8044dca7ed9de..8db07e39c6822 100644
--- ui/views/win/hwnd_message_handler.cc
+++ ui/views/win/hwnd_message_handler.cc
@@ -747,7 +747,11 @@ bool HWNDMessageHandler::IsVisible() const {
@@ -767,7 +767,11 @@ bool HWNDMessageHandler::IsVisible() const {
}
bool HWNDMessageHandler::IsActive() const {
@@ -482,7 +482,7 @@ index b8f58a147c751..8c4ed9ba8167d 100644
}
bool HWNDMessageHandler::IsMinimized() const {
@@ -3186,10 +3190,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
@@ -3207,10 +3211,13 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
} else if (event.type() == ui::ET_MOUSEWHEEL) {
ui::MouseWheelEvent mouse_wheel_event(msg);
// Reroute the mouse wheel to the window under the pointer if applicable.

View File

@@ -1,5 +1,5 @@
diff --git components/viz/host/host_display_client.cc components/viz/host/host_display_client.cc
index e4e7ac767c927..7c1fd1eda14b1 100644
index 7af928a9a030c..a702033cb2d47 100644
--- components/viz/host/host_display_client.cc
+++ components/viz/host/host_display_client.cc
@@ -47,9 +47,14 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
@@ -30,10 +30,10 @@ index e4e7ac767c927..7c1fd1eda14b1 100644
gpu::SurfaceHandle child_window) {
NOTREACHED();
diff --git components/viz/host/host_display_client.h components/viz/host/host_display_client.h
index fa7f12e204cda..4706e1d19868a 100644
index cb16487f9fc08..6191f8801f302 100644
--- components/viz/host/host_display_client.h
+++ components/viz/host/host_display_client.h
@@ -42,16 +42,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
@@ -39,16 +39,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
gfx::AcceleratedWidget widget() const { return widget_; }
#endif
@@ -80,7 +80,7 @@ index 8af69cac78b74..9f74e511c263d 100644
private:
const HWND hwnd_;
diff --git components/viz/service/BUILD.gn components/viz/service/BUILD.gn
index 9e66224b5cdb1..c7dee3b3fe7c9 100644
index 2dddd66f9326f..6d1979c993f10 100644
--- components/viz/service/BUILD.gn
+++ components/viz/service/BUILD.gn
@@ -228,6 +228,8 @@ viz_component("service") {
@@ -93,18 +93,18 @@ index 9e66224b5cdb1..c7dee3b3fe7c9 100644
defines = [ "VIZ_SERVICE_IMPLEMENTATION" ]
diff --git components/viz/service/display_embedder/output_surface_provider_impl.cc components/viz/service/display_embedder/output_surface_provider_impl.cc
index 0bc450ca4faf2..bdbdca76246c6 100644
index e8e3237bb2b8f..cec146af141ba 100644
--- components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -17,6 +17,7 @@
@@ -18,6 +18,7 @@
#include "build/chromecast_buildflags.h"
#include "build/chromeos_buildflags.h"
#include "cc/base/switches.h"
+#include "cef/libcef/browser/osr/software_output_device_proxy.h"
#include "components/viz/common/display/renderer_settings.h"
#include "components/viz/common/features.h"
#include "components/viz/common/frame_sinks/begin_frame_source.h"
#include "components/viz/service/display/display_compositor_memory_and_task_controller.h"
@@ -29,6 +30,7 @@
@@ -31,6 +32,7 @@
#include "gpu/command_buffer/service/scheduler_sequence.h"
#include "gpu/config/gpu_finch_features.h"
#include "gpu/ipc/common/surface_handle.h"
@@ -112,7 +112,7 @@ index 0bc450ca4faf2..bdbdca76246c6 100644
#include "ui/base/ui_base_switches.h"
#if BUILDFLAG(IS_WIN)
@@ -144,6 +146,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
@@ -146,6 +148,20 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
if (headless_)
return std::make_unique<SoftwareOutputDevice>();
@@ -150,10 +150,10 @@ 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 2705338b960a4..94d030c3a2154 100644
index d149ead2520ed..a81dca282b8ae 100644
--- content/browser/compositor/viz_process_transport_factory.cc
+++ content/browser/compositor/viz_process_transport_factory.cc
@@ -397,8 +397,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -408,8 +408,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
mojo::AssociatedRemote<viz::mojom::DisplayPrivate> display_private;
root_params->display_private =
display_private.BindNewEndpointAndPassReceiver();
@@ -170,7 +170,7 @@ index 2705338b960a4..94d030c3a2154 100644
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
mojo::AssociatedRemote<viz::mojom::ExternalBeginFrameController>
diff --git mojo/public/cpp/bindings/sync_call_restrictions.h mojo/public/cpp/bindings/sync_call_restrictions.h
index 2b923566128b9..37c28f2978527 100644
index 0173f9b181714..36a734d64738e 100644
--- mojo/public/cpp/bindings/sync_call_restrictions.h
+++ mojo/public/cpp/bindings/sync_call_restrictions.h
@@ -43,6 +43,7 @@ class Compositor;
@@ -181,7 +181,7 @@ index 2b923566128b9..37c28f2978527 100644
class GpuHostImpl;
class HostFrameSinkManager;
class HostGpuMemoryBufferManager;
@@ -125,6 +126,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
@@ -119,6 +120,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
// For preventing frame swaps of wrong size during resize on Windows.
// (https://crbug.com/811945)
friend class ui::Compositor;
@@ -191,7 +191,7 @@ index 2b923566128b9..37c28f2978527 100644
// running in the same process, so it won't block anything.
// TODO(159346933) Remove once the origin isolation logic is moved outside of
diff --git services/viz/privileged/mojom/compositing/display_private.mojom services/viz/privileged/mojom/compositing/display_private.mojom
index 62f98959d80cf..7c988630b4bc6 100644
index d7deccb6e6ec6..6a91f4aae6259 100644
--- services/viz/privileged/mojom/compositing/display_private.mojom
+++ services/viz/privileged/mojom/compositing/display_private.mojom
@@ -108,13 +108,15 @@ interface DisplayPrivate {
@@ -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 456adfeb57253..59a553cbb1f28 100644
index d2d3757f75a6b..a69f9af6c2c08 100644
--- ui/compositor/compositor.h
+++ ui/compositor/compositor.h
@@ -33,7 +33,9 @@
@@ -261,7 +261,7 @@ index 456adfeb57253..59a553cbb1f28 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
@@ -533,6 +546,8 @@ class COMPOSITOR_EXPORT Compositor : public base::PowerSuspendObserver,
@@ -543,6 +556,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 eab88872f0cee..de1775aa46b7d 100644
index be3b154fa5155..9887b0e3d0419 100644
--- content/browser/web_contents/web_contents_impl.cc
+++ content/browser/web_contents/web_contents_impl.cc
@@ -3448,6 +3448,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3450,6 +3450,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 eab88872f0cee..de1775aa46b7d 100644
std::unique_ptr<WebContentsViewDelegate> delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -3458,6 +3464,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
@@ -3460,6 +3466,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
view_ = CreateWebContentsView(this, std::move(delegate),
&render_view_host_delegate_view_);
}
@@ -23,7 +23,7 @@ index eab88872f0cee..de1775aa46b7d 100644
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
@@ -3653,6 +3660,9 @@ void WebContentsImpl::RenderWidgetCreated(
@@ -3655,6 +3662,9 @@ void WebContentsImpl::RenderWidgetCreated(
OPTIONAL_TRACE_EVENT1("content", "WebContentsImpl::RenderWidgetCreated",
"render_widget_host", render_widget_host);
created_widgets_.insert(render_widget_host);
@@ -33,18 +33,7 @@ index eab88872f0cee..de1775aa46b7d 100644
}
void WebContentsImpl::RenderWidgetDeleted(
@@ -3984,6 +3994,10 @@ void WebContentsImpl::Restore() {
ui::WindowShowState WebContentsImpl::GetWindowShowState() {
#if defined(USE_AURA)
aura::Window* window = GetTopLevelNativeWindow();
+ if (!window) {
+ // |window| will be nullptr with CEF windowless rendering.
+ return ui::SHOW_STATE_DEFAULT;
+ }
return wm::GetWindowState(window);
#else
// TODO(laurila, crbug.com/1466855): This API function currently works only on
@@ -4451,6 +4465,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
@@ -4455,6 +4465,15 @@ FrameTree* WebContentsImpl::CreateNewWindow(
create_params.picture_in_picture_options = *(params.pip_options);
}
@@ -60,7 +49,7 @@ index eab88872f0cee..de1775aa46b7d 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.
@@ -8599,6 +8622,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
@@ -8613,6 +8632,9 @@ void WebContentsImpl::SetFocusedFrame(FrameTreeNode* node,
}
CloseListenerManager::DidChangeFocusedFrame(this);
@@ -71,10 +60,10 @@ index eab88872f0cee..de1775aa46b7d 100644
void WebContentsImpl::DidCallFocus() {
diff --git content/public/browser/web_contents.h content/public/browser/web_contents.h
index 3707858d0af59..58f794f35608a 100644
index 668d0802d8d9f..8fc7836524f42 100644
--- content/public/browser/web_contents.h
+++ content/public/browser/web_contents.h
@@ -98,10 +98,12 @@ class BrowserContext;
@@ -99,10 +99,12 @@ class BrowserContext;
class BrowserPluginGuestDelegate;
class RenderFrameHost;
class RenderViewHost;
@@ -87,7 +76,7 @@ index 3707858d0af59..58f794f35608a 100644
class WebUI;
struct DropData;
struct MHTMLGenerationParams;
@@ -244,6 +246,10 @@ class WebContents : public PageNavigator,
@@ -249,6 +251,10 @@ class WebContents : public PageNavigator,
network::mojom::WebSandboxFlags starting_sandbox_flags =
network::mojom::WebSandboxFlags::kNone;
@@ -99,10 +88,10 @@ index 3707858d0af59..58f794f35608a 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 a3da78805b9bc..982e63aee498b 100644
index 4b32bf8ccc4ed..a0c43926070aa 100644
--- content/public/browser/web_contents_delegate.h
+++ content/public/browser/web_contents_delegate.h
@@ -59,9 +59,11 @@ class EyeDropperListener;
@@ -60,9 +60,11 @@ class EyeDropperListener;
class FileSelectListener;
class JavaScriptDialogManager;
class RenderFrameHost;
@@ -114,7 +103,7 @@ index a3da78805b9bc..982e63aee498b 100644
struct ContextMenuParams;
struct DropData;
struct MediaPlayerWatchTime;
@@ -344,6 +346,14 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -345,6 +347,14 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionConfig& partition_config,
SessionStorageNamespace* session_storage_namespace);
@@ -130,7 +119,7 @@ index a3da78805b9bc..982e63aee498b 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 617b5a5609796..195d9026909a6 100644
index a3b5e3b1ad2df..c85cb62b01cc2 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 {
@@ -143,7 +132,7 @@ index 617b5a5609796..195d9026909a6 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() {}
@@ -836,6 +839,10 @@ class CONTENT_EXPORT WebContentsObserver : public base::CheckedObserver {
@@ -840,6 +843,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 70987c88d0daf..6b41a8b87d63d 100644
index df350be109056..f55ab1705ecc0 100644
--- third_party/blink/public/platform/platform.h
+++ third_party/blink/public/platform/platform.h
@@ -772,6 +772,11 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -780,6 +780,11 @@ class BLINK_PLATFORM_EXPORT Platform {
}
#endif

View File

@@ -1,8 +1,8 @@
diff --git third_party/blink/public/web/web_view.h third_party/blink/public/web/web_view.h
index e89d7153d66d1..226b0f5780944 100644
index 6219eadefa976..ff0c649c46af1 100644
--- third_party/blink/public/web/web_view.h
+++ third_party/blink/public/web/web_view.h
@@ -344,6 +344,7 @@ class BLINK_EXPORT WebView {
@@ -345,6 +345,7 @@ class BLINK_EXPORT WebView {
// Sets whether select popup menus should be rendered by the browser.
static void SetUseExternalPopupMenus(bool);
@@ -11,10 +11,10 @@ index e89d7153d66d1..226b0f5780944 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 c8b7feaa65bfb..314c168660e48 100644
index adb1c7ca2fcdf..4cc86141a88bf 100644
--- third_party/blink/renderer/core/exported/web_view_impl.cc
+++ third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -250,8 +250,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
@@ -251,8 +251,13 @@ void WebView::SetUseExternalPopupMenus(bool use_external_popup_menus) {
g_should_use_external_popup_menus = use_external_popup_menus;
}
@@ -30,7 +30,7 @@ index c8b7feaa65bfb..314c168660e48 100644
}
namespace {
@@ -587,6 +592,7 @@ WebViewImpl::WebViewImpl(
@@ -584,6 +589,7 @@ WebViewImpl::WebViewImpl(
chrome_client_(MakeGarbageCollected<ChromeClientImpl>(this)),
minimum_zoom_level_(PageZoomFactorToZoomLevel(kMinimumPageZoomFactor)),
maximum_zoom_level_(PageZoomFactorToZoomLevel(kMaximumPageZoomFactor)),
@@ -39,10 +39,10 @@ index c8b7feaa65bfb..314c168660e48 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 dde5e8c51fa5f..9a40a63b4722f 100644
index 5a9992141dbbf..ce030e2b02ff0 100644
--- third_party/blink/renderer/core/exported/web_view_impl.h
+++ third_party/blink/renderer/core/exported/web_view_impl.h
@@ -137,7 +137,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -139,7 +139,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
static HashSet<WebViewImpl*>& AllInstances();
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@@ -52,7 +52,7 @@ index dde5e8c51fa5f..9a40a63b4722f 100644
// Returns whether frames under this WebView are backed by a compositor.
bool does_composite() const { return does_composite_; }
@@ -858,6 +859,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -861,6 +862,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,15 +62,15 @@ index dde5e8c51fa5f..9a40a63b4722f 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 1b643027c374d..41525ebb63602 100644
index 4d1c8dcd1fca7..f8de0cf7498aa 100644
--- third_party/blink/renderer/core/page/chrome_client_impl.cc
+++ third_party/blink/renderer/core/page/chrome_client_impl.cc
@@ -927,7 +927,7 @@ bool ChromeClientImpl::HasOpenedPopup() const {
PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
@@ -928,7 +928,7 @@ PopupMenu* ChromeClientImpl::OpenPopupMenu(LocalFrame& frame,
HTMLSelectElement& select) {
NotifyPopupOpeningObservers();
- if (WebViewImpl::UseExternalPopupMenus())
+ if (web_view_->UseExternalPopupMenus())
return MakeGarbageCollected<ExternalPopupMenu>(frame, select);
DCHECK(RuntimeEnabledFeatures::PagePopupEnabled());
- bool use_external_popup_menus = WebViewImpl::UseExternalPopupMenus();
+ bool use_external_popup_menus = web_view_->UseExternalPopupMenus();
#if BUILDFLAG(IS_MAC)
// There is a bug that is causing popup menus in PWA windows on macOS to
// sometimes not appear if using external popup menus. Until that bug is

View File

@@ -51,7 +51,7 @@ index 44d34bbffa88f..39ca99524dda6 100644
bool result =
base::win::IsKeyboardPresentOnSlate(ui::GetHiddenWindow(), &reason);
diff --git chrome/browser/memory_details.cc chrome/browser/memory_details.cc
index 1cf8e8840a22b..79be0f2825288 100644
index 73f5816dd06ae..33255343d351e 100644
--- chrome/browser/memory_details.cc
+++ chrome/browser/memory_details.cc
@@ -298,9 +298,11 @@ void MemoryDetails::CollectChildInfoOnUIThread() {

View File

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

View File

@@ -1,8 +1,8 @@
diff --git sandbox/win/src/sandbox_policy.h sandbox/win/src/sandbox_policy.h
index ef4c6f3affaaf..b14d571ddb2dd 100644
index 57409176ff044..58bb027580bbb 100644
--- sandbox/win/src/sandbox_policy.h
+++ sandbox/win/src/sandbox_policy.h
@@ -282,7 +282,7 @@ class [[clang::lto_visibility_public]] TargetPolicy {
@@ -275,7 +275,7 @@ class [[clang::lto_visibility_public]] TargetPolicy {
// Adds a blob of data that will be made available in the child early in
// startup via sandbox::GetDelegateData(). The contents of this data should
// not vary between children with the same TargetConfig().
@@ -12,15 +12,15 @@ index ef4c6f3affaaf..b14d571ddb2dd 100644
} // namespace sandbox
diff --git sandbox/win/src/sandbox_policy_base.cc sandbox/win/src/sandbox_policy_base.cc
index 4151077e469b3..c3f280aea7789 100644
index f54b6c9d83627..3a513f05e851e 100644
--- sandbox/win/src/sandbox_policy_base.cc
+++ sandbox/win/src/sandbox_policy_base.cc
@@ -190,12 +190,12 @@ PolicyGlobal* ConfigBase::policy() {
@@ -189,12 +189,12 @@ PolicyGlobal* ConfigBase::policy() {
return policy_;
}
-absl::optional<base::span<const uint8_t>> ConfigBase::policy_span() {
+absl::optional<base::span<uint8_t>> ConfigBase::policy_span() {
-std::optional<base::span<const uint8_t>> ConfigBase::policy_span() {
+std::optional<base::span<uint8_t>> ConfigBase::policy_span() {
if (policy_) {
// Note: this is not policy().data_size as that relates to internal data,
// not the entire allocated policy area.
@@ -29,18 +29,18 @@ index 4151077e469b3..c3f280aea7789 100644
+ return base::span<uint8_t>(reinterpret_cast<uint8_t*>(policy_.get()),
+ kPolMemSize);
}
return absl::nullopt;
return std::nullopt;
}
@@ -760,19 +760,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
@@ -751,19 +751,19 @@ bool PolicyBase::SetupHandleCloser(TargetProcess& target) {
return handle_closer->InitializeTargetHandles(target);
}
-absl::optional<base::span<const uint8_t>> PolicyBase::delegate_data_span() {
+absl::optional<base::span<uint8_t>> PolicyBase::delegate_data_span() {
-std::optional<base::span<const uint8_t>> PolicyBase::delegate_data_span() {
+std::optional<base::span<uint8_t>> PolicyBase::delegate_data_span() {
if (delegate_data_) {
return base::make_span(*delegate_data_);
}
return absl::nullopt;
return std::nullopt;
}
-void PolicyBase::AddDelegateData(base::span<const uint8_t> data) {
@@ -55,19 +55,19 @@ index 4151077e469b3..c3f280aea7789 100644
} // namespace sandbox
diff --git sandbox/win/src/sandbox_policy_base.h sandbox/win/src/sandbox_policy_base.h
index 22f872d70e2c8..fcf3ed3e75857 100644
index 090d51f701614..fb2aedd4aa0ec 100644
--- sandbox/win/src/sandbox_policy_base.h
+++ sandbox/win/src/sandbox_policy_base.h
@@ -117,7 +117,7 @@ class ConfigBase final : public TargetConfig {
@@ -116,7 +116,7 @@ class ConfigBase final : public TargetConfig {
// Should only be called once the object is configured.
PolicyGlobal* policy();
- absl::optional<base::span<const uint8_t>> policy_span();
+ absl::optional<base::span<uint8_t>> policy_span();
- std::optional<base::span<const uint8_t>> policy_span();
+ std::optional<base::span<uint8_t>> policy_span();
std::vector<std::wstring>& blocklisted_dlls();
AppContainerBase* app_container();
IntegrityLevel integrity_level() { return integrity_level_; }
@@ -177,7 +177,7 @@ class PolicyBase final : public TargetPolicy {
@@ -176,7 +176,7 @@ class PolicyBase final : public TargetPolicy {
ResultCode SetStdoutHandle(HANDLE handle) override;
ResultCode SetStderrHandle(HANDLE handle) override;
void AddHandleToShare(HANDLE handle) override;
@@ -76,12 +76,12 @@ index 22f872d70e2c8..fcf3ed3e75857 100644
// Creates a Job object with the level specified in a previous call to
// SetJobLevel().
@@ -239,13 +239,13 @@ class PolicyBase final : public TargetPolicy {
@@ -238,13 +238,13 @@ class PolicyBase final : public TargetPolicy {
// time.
// Returns nullopt if no data has been set, or a view into the data.
- absl::optional<base::span<const uint8_t>> delegate_data_span();
+ absl::optional<base::span<uint8_t>> delegate_data_span();
- std::optional<base::span<const uint8_t>> delegate_data_span();
+ std::optional<base::span<uint8_t>> delegate_data_span();
// The user-defined global policy settings.
HANDLE stdout_handle_;